Use in PDF design

This commit is contained in:
Hillel Coren 2018-03-23 17:18:11 +03:00
parent d5924bc523
commit 9720e66675
13 changed files with 219 additions and 429 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -403,16 +403,16 @@ NINJA.signature = function(invoice) {
"canvas": [{ "canvas": [{
"type": "line", "type": "line",
"x1": 200, "x1": 200,
"y1": -65, "y1": -25,
"x2": 504, "x2": 504,
"y2": -65, "y2": -25,
"lineWidth": 1, "lineWidth": 1,
"lineColor": "#888888" "lineColor": "#888888"
}] }]
}, },
{ {
"text": [invoiceLabels.date, ": ", "$signatureDate"], "text": [invoiceLabels.date, ": ", "$signatureDate"],
"margin": [200, -60, 0, 0] "margin": [200, -20, 0, 0]
} }
] ]
}; };

View File

@ -1,26 +1,26 @@
{ {
"content":[ "content":[
{ {
"columns":[ "columns":[
{ {
"width":380, "width":380,
"stack":[ "stack":[
{ {
"text":"$yourInvoiceLabelUC", "text":"$yourInvoiceLabelUC",
"style":"yourInvoice" "style":"yourInvoice"
}, },
"$clientDetails" "$clientDetails"
], ],
"margin":[ "margin":[
60, 60,
100, 100,
0, 0,
10 10
] ]
}, },
{ {
"canvas":[ "canvas":[
{ {
"type":"rect", "type":"rect",
"x":0, "x":0,
"y":0, "y":0,
@ -32,19 +32,19 @@
} }
], ],
"width":10, "width":10,
"margin":[ "margin":[
-10, -10,
100, 100,
0, 0,
10 10
] ]
}, },
{ {
"table":{ "table":{
"body":"$invoiceDetails" "body":"$invoiceDetails"
}, },
"layout":"noBorders", "layout":"noBorders",
"margin":[ "margin":[
0, 0,
110, 110,
0, 0,
@ -53,14 +53,14 @@
} }
] ]
}, },
{ {
"style":"invoiceLineItemsTable", "style":"invoiceLineItemsTable",
"table":{ "table":{
"headerRows":1, "headerRows":1,
"widths":"$invoiceLineItemColumns", "widths":"$invoiceLineItemColumns",
"body":"$invoiceLineItems" "body":"$invoiceLineItems"
}, },
"layout":{ "layout":{
"hLineWidth":"$none", "hLineWidth":"$none",
"vLineWidth":"$none", "vLineWidth":"$none",
"paddingLeft":"$amount:8", "paddingLeft":"$amount:8",
@ -69,22 +69,22 @@
"paddingBottom":"$amount:14" "paddingBottom":"$amount:14"
} }
}, },
{ {
"columns":[ "columns":[
{ {
"width":46, "width":46,
"text":" " "text":" "
}, },
"$notesAndTerms", "$notesAndTerms",
{ {
"table":{ "table":{
"widths":[ "widths":[
"*", "*",
"40%" "40%"
], ],
"body":"$subtotals" "body":"$subtotals"
}, },
"layout":{ "layout":{
"hLineWidth":"$none", "hLineWidth":"$none",
"vLineWidth":"$none", "vLineWidth":"$none",
"paddingLeft":"$amount:8", "paddingLeft":"$amount:8",
@ -95,39 +95,18 @@
} }
] ]
}, },
"$signature",
{ {
"stack": [ "stack":[
{
"image": "$signatureBase64",
"margin": [
200,
10,
0,
0
]
},
{
"text": "$signatureDate",
"margin": [
200,
-40,
0,
0
]
}
]
},
{
"stack":[
"$invoiceDocuments" "$invoiceDocuments"
], ],
"style":"invoiceDocuments" "style":"invoiceDocuments"
} }
], ],
"footer":[ "footer":[
{ {
"canvas":[ "canvas":[
{ {
"type":"line", "type":"line",
"x1":0, "x1":0,
"y1":0, "y1":0,
@ -138,11 +117,11 @@
} }
] ]
}, },
{ {
"columns":[ "columns":[
{ {
"text":"$invoiceFooter", "text":"$invoiceFooter",
"margin":[ "margin":[
40, 40,
-40, -40,
40, 40,
@ -154,10 +133,10 @@
] ]
} }
], ],
"header":[ "header":[
{ {
"canvas":[ "canvas":[
{ {
"type":"line", "type":"line",
"x1":0, "x1":0,
"y1":0, "y1":0,
@ -169,24 +148,24 @@
], ],
"width":10 "width":10
}, },
{ {
"columns":[ "columns":[
{ {
"image":"$accountLogo", "image":"$accountLogo",
"fit":[ "fit":[
120, 120,
60 60
], ],
"margin":[ "margin":[
30, 30,
16, 16,
0, 0,
0 0
] ]
}, },
{ {
"stack":"$accountDetails", "stack":"$accountDetails",
"margin":[ "margin":[
0, 0,
16, 16,
0, 0,
@ -194,9 +173,9 @@
], ],
"width":140 "width":140
}, },
{ {
"stack":"$accountAddress", "stack":"$accountAddress",
"margin":[ "margin":[
20, 20,
16, 16,
0, 0,
@ -206,23 +185,23 @@
] ]
} }
], ],
"defaultStyle":{ "defaultStyle":{
"font":"$bodyFont", "font":"$bodyFont",
"fontSize":"$fontSize", "fontSize":"$fontSize",
"margin":[ "margin":[
8, 8,
4, 4,
8, 8,
4 4
] ]
}, },
"styles":{ "styles":{
"primaryColor":{ "primaryColor":{
"color":"$primaryColor:#36a498" "color":"$primaryColor:#36a498"
}, },
"accountName":{ "accountName":{
"bold":true, "bold":true,
"margin":[ "margin":[
4, 4,
2, 2,
4, 4,
@ -230,8 +209,8 @@
], ],
"color":"$primaryColor:#36a498" "color":"$primaryColor:#36a498"
}, },
"accountDetails":{ "accountDetails":{
"margin":[ "margin":[
4, 4,
2, 2,
4, 4,
@ -239,8 +218,8 @@
], ],
"color":"#FFFFFF" "color":"#FFFFFF"
}, },
"accountAddress":{ "accountAddress":{
"margin":[ "margin":[
4, 4,
2, 2,
4, 4,
@ -248,150 +227,150 @@
], ],
"color":"#FFFFFF" "color":"#FFFFFF"
}, },
"clientDetails":{ "clientDetails":{
"margin":[ "margin":[
0, 0,
2, 2,
0, 0,
1 1
] ]
}, },
"odd":{ "odd":{
"fillColor":"#ebebeb" "fillColor":"#ebebeb"
}, },
"subtotalsBalanceDueLabel":{ "subtotalsBalanceDueLabel":{
"fontSize":"$fontSizeLargest", "fontSize":"$fontSizeLargest",
"bold":true "bold":true
}, },
"subtotalsBalanceDue":{ "subtotalsBalanceDue":{
"fontSize":"$fontSizeLargest", "fontSize":"$fontSizeLargest",
"color":"$primaryColor:#36a498", "color":"$primaryColor:#36a498",
"bold":true "bold":true
}, },
"invoiceDetails":{ "invoiceDetails":{
"color":"#ffffff" "color":"#ffffff"
}, },
"invoiceNumber":{ "invoiceNumber":{
"bold":true "bold":true
}, },
"tableHeader":{ "tableHeader":{
"fontSize":12, "fontSize":12,
"bold":true "bold":true
}, },
"costTableHeader":{ "costTableHeader":{
"alignment":"right" "alignment":"right"
}, },
"qtyTableHeader":{ "qtyTableHeader":{
"alignment":"right" "alignment":"right"
}, },
"taxTableHeader":{ "taxTableHeader":{
"alignment":"right" "alignment":"right"
}, },
"lineTotalTableHeader":{ "lineTotalTableHeader":{
"alignment":"right", "alignment":"right",
"margin":[ "margin":[
0, 0,
0, 0,
40, 40,
0 0
] ]
}, },
"firstColumn":{ "firstColumn":{
"margin":[ "margin":[
40, 40,
0, 0,
0, 0,
0 0
] ]
}, },
"lastColumn":{ "lastColumn":{
"margin":[ "margin":[
0, 0,
0, 0,
40, 40,
0 0
] ]
}, },
"productKey":{ "productKey":{
"color":"$primaryColor:#36a498", "color":"$primaryColor:#36a498",
"bold":true "bold":true
}, },
"yourInvoice":{ "yourInvoice":{
"font":"$headerFont", "font":"$headerFont",
"bold":true, "bold":true,
"fontSize":14, "fontSize":14,
"color":"$primaryColor:#36a498", "color":"$primaryColor:#36a498",
"margin":[ "margin":[
0, 0,
0, 0,
0, 0,
8 8
] ]
}, },
"invoiceLineItemsTable":{ "invoiceLineItemsTable":{
"margin":[ "margin":[
0, 0,
26, 26,
0, 0,
16 16
] ]
}, },
"clientName":{ "clientName":{
"bold":true "bold":true
}, },
"cost":{ "cost":{
"alignment":"right" "alignment":"right"
}, },
"quantity":{ "quantity":{
"alignment":"right" "alignment":"right"
}, },
"tax":{ "tax":{
"alignment":"right" "alignment":"right"
}, },
"lineTotal":{ "lineTotal":{
"alignment":"right" "alignment":"right"
}, },
"subtotals":{ "subtotals":{
"alignment":"right", "alignment":"right",
"margin":[ "margin":[
0, 0,
0, 0,
40, 40,
0 0
] ]
}, },
"termsLabel":{ "termsLabel":{
"bold":true, "bold":true,
"margin":[ "margin":[
0, 0,
0, 0,
0, 0,
4 4
] ]
}, },
"fullheader":{ "fullheader":{
"font":"$headerFont", "font":"$headerFont",
"fontSize":"$fontSizeLargest", "fontSize":"$fontSizeLargest",
"bold":true "bold":true
}, },
"subheader":{ "subheader":{
"font":"$headerFont", "font":"$headerFont",
"fontSize":"$fontSizeLarger" "fontSize":"$fontSizeLarger"
}, },
"help":{ "help":{
"fontSize":"$fontSizeSmaller", "fontSize":"$fontSizeSmaller",
"color":"#737373" "color":"#737373"
}, },
"invoiceDocuments":{ "invoiceDocuments":{
"margin":[ "margin":[
47, 47,
0, 0,
47, 47,
0 0
] ]
}, },
"invoiceDocument":{ "invoiceDocument":{
"margin":[ "margin":[
0, 0,
10, 10,
0, 0,
@ -399,7 +378,7 @@
] ]
} }
}, },
"pageMargins":[ "pageMargins":[
0, 0,
80, 80,
0, 0,

View File

@ -115,28 +115,7 @@
} }
] ]
}, },
{ "$signature",
"stack": [
{
"image": "$signatureBase64",
"margin": [
200,
10,
0,
0
]
},
{
"text": "$signatureDate",
"margin": [
200,
-40,
0,
0
]
}
]
},
{ {
"stack": [ "stack": [
"$invoiceDocuments" "$invoiceDocuments"

View File

@ -1,31 +1,31 @@
{ {
"content":[ "content":[
{ {
"columns":[ "columns":[
{ {
"image":"$accountLogo", "image":"$accountLogo",
"fit":[ "fit":[
120, 120,
80 80
] ]
}, },
{ {
"stack":"$accountDetails", "stack":"$accountDetails",
"margin":[ "margin":[
7, 7,
0, 0,
0, 0,
0 0
] ]
}, },
{ {
"stack":"$accountAddress" "stack":"$accountAddress"
} }
] ]
}, },
{ {
"text":"$entityTypeUC", "text":"$entityTypeUC",
"margin":[ "margin":[
8, 8,
30, 30,
8, 8,
@ -33,21 +33,21 @@
], ],
"style":"entityTypeLabel" "style":"entityTypeLabel"
}, },
{ {
"table":{ "table":{
"headerRows":1, "headerRows":1,
"widths":[ "widths":[
"auto", "auto",
"auto", "auto",
"*" "*"
], ],
"body":[ "body":[
[ [
{ {
"table":{ "table":{
"body":"$invoiceDetails" "body":"$invoiceDetails"
}, },
"margin":[ "margin":[
0, 0,
0, 0,
12, 12,
@ -55,16 +55,16 @@
], ],
"layout":"noBorders" "layout":"noBorders"
}, },
{ {
"stack":"$clientDetails" "stack":"$clientDetails"
}, },
{ {
"text":"" "text":""
} }
] ]
] ]
}, },
"layout":{ "layout":{
"hLineWidth":"$firstAndLast:.5", "hLineWidth":"$firstAndLast:.5",
"vLineWidth":"$none", "vLineWidth":"$none",
"hLineColor":"#D8D8D8", "hLineColor":"#D8D8D8",
@ -74,14 +74,14 @@
"paddingBottom":"$amount:6" "paddingBottom":"$amount:6"
} }
}, },
{ {
"style":"invoiceLineItemsTable", "style":"invoiceLineItemsTable",
"table":{ "table":{
"headerRows":1, "headerRows":1,
"widths":"$invoiceLineItemColumns", "widths":"$invoiceLineItemColumns",
"body":"$invoiceLineItems" "body":"$invoiceLineItems"
}, },
"layout":{ "layout":{
"hLineWidth":"$notFirst:.5", "hLineWidth":"$notFirst:.5",
"vLineWidth":"$none", "vLineWidth":"$none",
"hLineColor":"#D8D8D8", "hLineColor":"#D8D8D8",
@ -91,18 +91,18 @@
"paddingBottom":"$amount:14" "paddingBottom":"$amount:14"
} }
}, },
{ {
"columns":[ "columns":[
"$notesAndTerms", "$notesAndTerms",
{ {
"table":{ "table":{
"widths":[ "widths":[
"*", "*",
"40%" "40%"
], ],
"body":"$subtotals" "body":"$subtotals"
}, },
"layout":{ "layout":{
"hLineWidth":"$none", "hLineWidth":"$none",
"vLineWidth":"$none", "vLineWidth":"$none",
"paddingLeft":"$amount:34", "paddingLeft":"$amount:34",
@ -113,197 +113,176 @@
} }
] ]
}, },
{ "$signature",
"stack": [
{
"image": "$signatureBase64",
"margin": [
200,
10,
0,
0
]
},
{
"text": "$signatureDate",
"margin": [
200,
-40,
0,
0
]
}
]
},
{ {
"stack":[ "stack":[
"$invoiceDocuments" "$invoiceDocuments"
], ],
"style":"invoiceDocuments" "style":"invoiceDocuments"
} }
], ],
"defaultStyle":{ "defaultStyle":{
"font":"$bodyFont", "font":"$bodyFont",
"fontSize":"$fontSize", "fontSize":"$fontSize",
"margin":[ "margin":[
8, 8,
4, 4,
8, 8,
4 4
] ]
}, },
"footer":{ "footer":{
"columns":[ "columns":[
{ {
"text":"$invoiceFooter", "text":"$invoiceFooter",
"alignment":"left" "alignment":"left"
} }
], ],
"margin":[ "margin":[
40, 40,
-20, -20,
40, 40,
0 0
] ]
}, },
"styles":{ "styles":{
"entityTypeLabel":{ "entityTypeLabel":{
"font":"$headerFont", "font":"$headerFont",
"fontSize":"$fontSizeLargest", "fontSize":"$fontSizeLargest",
"color":"$primaryColor:#37a3c6" "color":"$primaryColor:#37a3c6"
}, },
"primaryColor":{ "primaryColor":{
"color":"$primaryColor:#37a3c6" "color":"$primaryColor:#37a3c6"
}, },
"accountName":{ "accountName":{
"color":"$primaryColor:#37a3c6", "color":"$primaryColor:#37a3c6",
"bold":true "bold":true
}, },
"invoiceDetails":{ "invoiceDetails":{
"margin":[ "margin":[
0, 0,
0, 0,
8, 8,
0 0
] ]
}, },
"accountDetails":{ "accountDetails":{
"margin":[ "margin":[
0, 0,
2, 2,
0, 0,
2 2
] ]
}, },
"clientDetails":{ "clientDetails":{
"margin":[ "margin":[
0, 0,
2, 2,
0, 0,
2 2
] ]
}, },
"notesAndTerms":{ "notesAndTerms":{
"margin":[ "margin":[
0, 0,
2, 2,
0, 0,
2 2
] ]
}, },
"accountAddress":{ "accountAddress":{
"margin":[ "margin":[
0, 0,
2, 2,
0, 0,
2 2
] ]
}, },
"odd":{ "odd":{
"fillColor":"#fbfbfb" "fillColor":"#fbfbfb"
}, },
"productKey":{ "productKey":{
"color":"$primaryColor:#37a3c6", "color":"$primaryColor:#37a3c6",
"bold":true "bold":true
}, },
"subtotalsBalanceDueLabel":{ "subtotalsBalanceDueLabel":{
"fontSize":"$fontSizeLarger" "fontSize":"$fontSizeLarger"
}, },
"subtotalsBalanceDue":{ "subtotalsBalanceDue":{
"fontSize":"$fontSizeLarger", "fontSize":"$fontSizeLarger",
"color":"$primaryColor:#37a3c6" "color":"$primaryColor:#37a3c6"
}, },
"invoiceNumber":{ "invoiceNumber":{
"bold":true "bold":true
}, },
"tableHeader":{ "tableHeader":{
"bold":true, "bold":true,
"fontSize":"$fontSizeLarger" "fontSize":"$fontSizeLarger"
}, },
"costTableHeader":{ "costTableHeader":{
"alignment":"right" "alignment":"right"
}, },
"qtyTableHeader":{ "qtyTableHeader":{
"alignment":"right" "alignment":"right"
}, },
"taxTableHeader":{ "taxTableHeader":{
"alignment":"right" "alignment":"right"
}, },
"lineTotalTableHeader":{ "lineTotalTableHeader":{
"alignment":"right" "alignment":"right"
}, },
"invoiceLineItemsTable":{ "invoiceLineItemsTable":{
"margin":[ "margin":[
0, 0,
16, 16,
0, 0,
16 16
] ]
}, },
"clientName":{ "clientName":{
"bold":true "bold":true
}, },
"cost":{ "cost":{
"alignment":"right" "alignment":"right"
}, },
"quantity":{ "quantity":{
"alignment":"right" "alignment":"right"
}, },
"tax":{ "tax":{
"alignment":"right" "alignment":"right"
}, },
"lineTotal":{ "lineTotal":{
"alignment":"right" "alignment":"right"
}, },
"subtotals":{ "subtotals":{
"alignment":"right" "alignment":"right"
}, },
"termsLabel":{ "termsLabel":{
"bold":true "bold":true
}, },
"fullheader":{ "fullheader":{
"font":"$headerFont", "font":"$headerFont",
"fontSize":"$fontSizeLargest", "fontSize":"$fontSizeLargest",
"bold":true "bold":true
}, },
"subheader":{ "subheader":{
"font":"$headerFont", "font":"$headerFont",
"fontSize":"$fontSizeLarger" "fontSize":"$fontSizeLarger"
}, },
"help":{ "help":{
"fontSize":"$fontSizeSmaller", "fontSize":"$fontSizeSmaller",
"color":"#737373" "color":"#737373"
}, },
"invoiceDocuments":{ "invoiceDocuments":{
"margin":[ "margin":[
7, 7,
0, 0,
7, 7,
0 0
] ]
}, },
"invoiceDocument":{ "invoiceDocument":{
"margin":[ "margin":[
0, 0,
10, 10,
0, 0,
@ -311,7 +290,7 @@
] ]
} }
}, },
"pageMargins":[ "pageMargins":[
40, 40,
40, 40,
40, 40,

View File

@ -90,28 +90,7 @@
"text": "$balanceDue", "text": "$balanceDue",
"style": "subtotalsBalanceDue" "style": "subtotalsBalanceDue"
}, },
{ "$signature",
"stack": [
{
"image": "$signatureBase64",
"margin": [
200,
10,
0,
0
]
},
{
"text": "$signatureDate",
"margin": [
200,
-40,
0,
0
]
}
]
},
{ {
"stack": [ "stack": [
"$invoiceDocuments" "$invoiceDocuments"

View File

@ -95,28 +95,7 @@
{ {
"canvas": [{ "type": "line", "x1": 270, "y1": 20, "x2": 515, "y2": 20, "lineWidth": 1,"dash": { "length": 2 }}] "canvas": [{ "type": "line", "x1": 270, "y1": 20, "x2": 515, "y2": 20, "lineWidth": 1,"dash": { "length": 2 }}]
}, },
{ "$signature",
"stack": [
{
"image": "$signatureBase64",
"margin": [
200,
10,
0,
0
]
},
{
"text": "$signatureDate",
"margin": [
200,
-40,
0,
0
]
}
]
},
{ {
"stack": [ "stack": [
"$invoiceDocuments" "$invoiceDocuments"

View File

@ -9,8 +9,8 @@
{ {
"width":120, "width":120,
"stack": [ "stack": [
{"text": "$fromLabelUC", "style": "fromLabel"}, {"text": "$fromLabelUC", "style": "fromLabel"},
"$accountDetails" "$accountDetails"
] ]
}, },
{ {
@ -27,7 +27,7 @@
}, },
{ {
"stack": [ "stack": [
{"text": "$toLabelUC", "style": "toLabel"}, {"text": "$toLabelUC", "style": "toLabel"},
"$clientDetails" "$clientDetails"
] ]
}, },
@ -83,10 +83,10 @@
"layout": { "layout": {
"hLineWidth": "$none", "hLineWidth": "$none",
"vLineWidth": "$amount:.5", "vLineWidth": "$amount:.5",
"paddingLeft": "$amount:8", "paddingLeft": "$amount:8",
"paddingRight": "$amount:8", "paddingRight": "$amount:8",
"paddingTop": "$amount:8", "paddingTop": "$amount:8",
"paddingBottom": "$amount:8" "paddingBottom": "$amount:8"
} }
}, },
{ {
@ -106,36 +106,15 @@
"layout": { "layout": {
"hLineWidth": "$none", "hLineWidth": "$none",
"vLineWidth": "$notFirst:.5", "vLineWidth": "$notFirst:.5",
"paddingLeft": "$amount:8", "paddingLeft": "$amount:8",
"paddingRight": "$amount:8", "paddingRight": "$amount:8",
"paddingTop": "$amount:12", "paddingTop": "$amount:12",
"paddingBottom": "$amount:4" "paddingBottom": "$amount:4"
} }
} }
] ]
}, },
{ "$signature",
"stack": [
{
"image": "$signatureBase64",
"margin": [
200,
10,
0,
0
]
},
{
"text": "$signatureDate",
"margin": [
200,
-40,
0,
0
]
}
]
},
{ {
"stack": [ "stack": [
"$invoiceDocuments" "$invoiceDocuments"
@ -187,14 +166,14 @@
}, },
"lineTotalTableHeader": { "lineTotalTableHeader": {
"alignment": "right" "alignment": "right"
}, },
"fromLabel": { "fromLabel": {
"color": "$primaryColor:#bc9f2b", "color": "$primaryColor:#bc9f2b",
"bold": true "bold": true
}, },
"toLabel": { "toLabel": {
"color": "$primaryColor:#bc9f2b", "color": "$primaryColor:#bc9f2b",
"bold": true "bold": true
}, },
"accountDetails": { "accountDetails": {
"margin": [0, 2, 0, 1] "margin": [0, 2, 0, 1]
@ -219,7 +198,7 @@
}, },
"subtotals": { "subtotals": {
"alignment": "right" "alignment": "right"
}, },
"termsLabel": { "termsLabel": {
"bold": true, "bold": true,
"margin": [0, 16, 0, 4] "margin": [0, 16, 0, 4]

View File

@ -86,28 +86,7 @@
} }
] ]
}, },
{ "$signature",
"stack": [
{
"image": "$signatureBase64",
"margin": [
200,
10,
0,
0
]
},
{
"text": "$signatureDate",
"margin": [
200,
-40,
0,
0
]
}
]
},
{ {
"stack": [ "stack": [
"$invoiceDocuments" "$invoiceDocuments"

View File

@ -102,28 +102,7 @@
} }
}] }]
}, },
{ "$signature",
"stack": [
{
"image": "$signatureBase64",
"margin": [
200,
10,
0,
0
]
},
{
"text": "$signatureDate",
"margin": [
200,
-40,
0,
0
]
}
]
},
{ {
"stack": [ "stack": [
"$invoiceDocuments" "$invoiceDocuments"

View File

@ -13,7 +13,7 @@
"image": "$accountLogo", "image": "$accountLogo",
"fit": [120, 80] "fit": [120, 80]
} }
] ]
]}, ]},
{ {
"columns": [ "columns": [
@ -24,19 +24,19 @@
}, },
{ {
"width":200, "width":200,
"table": { "table": {
"body": "$invoiceDetails" "body": "$invoiceDetails"
}, },
"layout": { "layout": {
"hLineWidth": "$none", "hLineWidth": "$none",
"vLineWidth": "$none", "vLineWidth": "$none",
"hLineColor": "#E6E6E6", "hLineColor": "#E6E6E6",
"paddingLeft": "$amount:10", "paddingLeft": "$amount:10",
"paddingRight": "$amount:10" "paddingRight": "$amount:10"
} }
} }
] ]
}, },
{ {
"canvas": [{ "type": "rect", "x": 0, "y": 0, "w": 515, "h": 25,"r":0, "lineWidth": 1,"color":"#e6e6e6"}],"width":10,"margin":[0,30,0,-43] "canvas": [{ "type": "rect", "x": 0, "y": 0, "w": 515, "h": 25,"r":0, "lineWidth": 1,"color":"#e6e6e6"}],"width":10,"margin":[0,30,0,-43]
}, },
@ -51,10 +51,10 @@
"hLineWidth": "$notFirst:1", "hLineWidth": "$notFirst:1",
"vLineWidth": "$none", "vLineWidth": "$none",
"hLineColor": "#e6e6e6", "hLineColor": "#e6e6e6",
"paddingLeft": "$amount:8", "paddingLeft": "$amount:8",
"paddingRight": "$amount:8", "paddingRight": "$amount:8",
"paddingTop": "$amount:8", "paddingTop": "$amount:8",
"paddingBottom": "$amount:8" "paddingBottom": "$amount:8"
} }
}, },
{ {
@ -70,36 +70,15 @@
"layout": { "layout": {
"hLineWidth": "$none", "hLineWidth": "$none",
"vLineWidth": "$none", "vLineWidth": "$none",
"paddingLeft": "$amount:10", "paddingLeft": "$amount:10",
"paddingRight": "$amount:10", "paddingRight": "$amount:10",
"paddingTop": "$amount:4", "paddingTop": "$amount:4",
"paddingBottom": "$amount:4" "paddingBottom": "$amount:4"
} }
} }
] ]
},
{
"stack": [
{
"image": "$signatureBase64",
"margin": [
200,
10,
0,
0
]
},
{
"text": "$signatureDate",
"margin": [
200,
-40,
0,
0
]
}
]
}, },
"$signature",
{ {
"stack": [ "stack": [
"$invoiceDocuments" "$invoiceDocuments"
@ -147,7 +126,7 @@
}, },
"lineTotalTableHeader": { "lineTotalTableHeader": {
"alignment": "right" "alignment": "right"
}, },
"invoiceLineItemsTable": { "invoiceLineItemsTable": {
"margin": [0, 16, 0, 16] "margin": [0, 16, 0, 16]
}, },
@ -165,7 +144,7 @@
}, },
"subtotals": { "subtotals": {
"alignment": "right" "alignment": "right"
}, },
"termsLabel": { "termsLabel": {
"bold": true, "bold": true,
"margin": [0, 0, 0, 4] "margin": [0, 0, 0, 4]

View File

@ -121,28 +121,7 @@
} }
] ]
}, },
{ "$signature",
"stack": [
{
"image": "$signatureBase64",
"margin": [
200,
10,
0,
0
]
},
{
"text": "$signatureDate",
"margin": [
200,
-40,
0,
0
]
}
]
},
{ {
"stack": [ "stack": [
"$invoiceDocuments" "$invoiceDocuments"