-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Better document design, added gobal discount & tax
- Loading branch information
1 parent
1a53d4f
commit 063b66f
Showing
11 changed files
with
592 additions
and
245 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
package generator | ||
|
||
const ( | ||
// Invoice define the "invoice" document type | ||
Invoice string = "INVOICE" | ||
|
||
// Quotation define the "quotation" document type | ||
Quotation string = "QUOTATION" | ||
|
||
// DeliveryNote define the "delievry note" document type | ||
DeliveryNote string = "DELIVERY_NOTE" | ||
|
||
// BaseMargin define base margin used in documents | ||
BaseMargin float64 = 10 | ||
|
||
// BaseMarginTop define base margin top used in documents | ||
BaseMarginTop float64 = 20 | ||
|
||
// HeaderMarginTop define base header margin top used in documents | ||
HeaderMarginTop float64 = 5 | ||
|
||
// MaxPageHeight define the maximum height for a single page | ||
MaxPageHeight float64 = 260 | ||
) | ||
|
||
// Cols offsets | ||
const ( | ||
// ItemColNameOffset ... | ||
ItemColNameOffset float64 = 10 | ||
|
||
// ItemColUnitPriceOffset ... | ||
ItemColUnitPriceOffset float64 = 80 | ||
|
||
// ItemColQuantityOffset ... | ||
ItemColQuantityOffset float64 = 103 | ||
|
||
// ItemColTotalHTOffset ... | ||
ItemColTotalHTOffset float64 = 113 | ||
|
||
// ItemColDiscountOffset ... | ||
ItemColDiscountOffset float64 = 140 | ||
|
||
// ItemColTaxOffset ... | ||
ItemColTaxOffset float64 = 157 | ||
|
||
// ItemColTotalTTCOffset ... | ||
ItemColTotalTTCOffset float64 = 175 | ||
) | ||
|
||
var ( | ||
// BaseTextFontSize define the base font size for text in document | ||
BaseTextFontSize float64 = 8 | ||
|
||
// SmallTextFontSize define the small font size for text in document | ||
SmallTextFontSize float64 = 7 | ||
|
||
// ExtraSmallTextFontSize define the extra small font size for text in document | ||
ExtraSmallTextFontSize float64 = 6 | ||
|
||
// LargeTextFontSize define the large font size for text in document | ||
LargeTextFontSize float64 = 10 | ||
|
||
// BaseTextColor define the base color used for text in document | ||
BaseTextColor = []int{35, 35, 35} | ||
|
||
// GreyTextColor define the base color used for text in document | ||
GreyTextColor = []int{82, 82, 82} | ||
|
||
// GreyBgColor define the grey background color used for text in document | ||
GreyBgColor = []int{232, 232, 232} | ||
|
||
// DarkBgColor define the grey background color used for text in document | ||
DarkBgColor = []int{212, 212, 212} | ||
) |
Oops, something went wrong.