Hello,
I need some help on customizing the invoice. I’ve messed around with the code etc. and been able to get some things to work, but I have been very unsuccessful overall and need help. Using the clean template base and customizing it as custom1
I would like to swap the invoice details and client info so that the client info appears on the left side and the invoice details on the right. Also I would like to change the word above this line to say SOLD TO rather than invoice. If possible I’d like to also put the word invoice (which i believe is $entitytype to the top right corner of the page.
Here’s the code:
[
{
"columns": [
{
"image": "$accountLogo",
"fit": [
185,
80
]
},
{
"stack": "$accountDetails",
"margin": [
7,
0,
0,
0
]
},
{
"stack": "$accountAddress"
}
]
},
{
"text": "$entityTypeUC",
"margin": [
8,
30,
8,
5
],
"style": "entityTypeLabel"
},
{
"table": {
"headerRows": 1,
"widths": [
"65%",
"35%",
"*"
],
"body": [
[
{
"table": {
"body": "$invoiceDetails"
},
"margin": [
0,
0,
12,
0
],
"layout": "noBorders"
},
{
"stack": "$clientDetails"
},
{
"text": ""
}
]
]
},
"layout": {
"hLineWidth": "$firstAndLast:.5",
"vLineWidth": "$none",
"hLineColor": "#D8D8D8",
"paddingLeft": "$amount:8",
"paddingRight": "$amount:8",
"paddingTop": "$amount:6",
"paddingBottom": "$amount:6"
}
},
{
"style": "invoiceLineItemsTable",
"table": {
"headerRows": 1,
"widths": "$invoiceLineItemColumns",
"body": "$invoiceLineItems"
},
"layout": {
"hLineWidth": "$notFirst:.5",
"vLineWidth": "$none",
"hLineColor": "#D8D8D8",
"paddingLeft": "$amount:8",
"paddingRight": "$amount:8",
"paddingTop": "$amount:14",
"paddingBottom": "$amount:14"
}
},
{
"columns": [
"$notesAndTerms",
{
"table": {
"widths": [
"*",
"40%"
],
"body": "$subtotals"
},
"layout": {
"hLineWidth": "$none",
"vLineWidth": "$none",
"paddingLeft": "$amount:34",
"paddingRight": "$amount:8",
"paddingTop": "$amount:4",
"paddingBottom": "$amount:4"
}
}
]
},
"$signature",
{
"stack": [
"$invoiceDocuments"
],
"style": "invoiceDocuments"
}
]