Many thanks.
I tried all this, but it won’t work regrettably.
The variable $terms is built within the invoice’s “totals-table” code, which makes it impossible to split Terms, through a page break, from the rest of the table that shows the invoice’s total. As a result, the T&Cs are displayed as a column, on the page’s left-hand-side, which does not look right. Here is a screen capture:
I should perhaps consider not adding my T&Cs at all on my invoices, or having these sent to my clients as a separate attachment.
Previously, when using V4 (hosted), I was able to split the T&Cs from the remainder of the invoice. Below is an ectract of the code I used at the time.
I used " “pageBreak”: “after”,
“columns”:
and instered “$notesAndTerms” further down.
{
"style": "invoiceLineItemsTable",
"table": {
"headerRows": 1,
"widths": [
"55%",
"15%",
"15%",
"15%"
],
"body": "$invoiceLineItems"
},
"layout": {
"hLineWidth": "$notFirst:.5",
"vLineWidth": "$none",
"hLineColor": "#D8D8D8",
"paddingLeft": "$amount:8",
"paddingRight": "$amount:8",
"paddingTop": "$amount:14",
"paddingBottom": "$amount:14"
}
},
{
"columns": [],
"margin": [
40,
-20,
40,
10
]
},
{
"pageBreak": "after",
"columns": [
{
"table": {
"widths": [
"*",
"40%"
],
"body": "$subtotals"
},
"layout": {
"hLineWidth": "$none",
"vLineWidth": "$none",
"paddingLeft": "$amount:34",
"paddingRight": "$amount:8",
"paddingTop": "$amount:6",
"paddingBottom": "$amount:4"
}
}
]
},
"$notesAndTerms",
"$signature",
{
"stack": [
"$invoiceDocuments"
],
"style": "invoiceDocuments"
}
]
which resulted in the Terms being on a separate page, as shown on this screen capture.