Moved Invoice Notes to the left of the totals on invoice

This commit is contained in:
johnnyq
2021-04-06 19:58:42 -04:00
parent a786fd7db5
commit cce19cb85b

View File

@@ -696,11 +696,24 @@ var docDefinition = {
// headers are automatically repeated if the table spans over multiple pages // headers are automatically repeated if the table spans over multiple pages
// you can declare how many rows should be treated as headers // you can declare how many rows should be treated as headers
headerRows: 0, headerRows: 0,
widths: [ '*', 80 ], widths: [ '*','auto', 80 ],
body: [ body: [
// Total // Total
[ [
{
text: 'Notes',
style:'notesTitle'
},
{},
{}
],
[
{
rowSpan: 5,
text: <?php echo json_encode($invoice_note); ?>,
style:'notesText'
},
{ {
text:'Subtotal', text:'Subtotal',
style:'itemsFooterSubTitle' style:'itemsFooterSubTitle'
@@ -711,6 +724,7 @@ var docDefinition = {
} }
], ],
[ [
{},
{ {
text:'Tax', text:'Tax',
style:'itemsFooterSubTitle' style:'itemsFooterSubTitle'
@@ -721,6 +735,7 @@ var docDefinition = {
} }
], ],
[ [
{},
{ {
text:'Total', text:'Total',
style:'itemsFooterSubTitle' style:'itemsFooterSubTitle'
@@ -731,6 +746,7 @@ var docDefinition = {
} }
], ],
[ [
{},
{ {
text:'Paid', text:'Paid',
style:'itemsFooterSubTitle' style:'itemsFooterSubTitle'
@@ -741,6 +757,7 @@ var docDefinition = {
} }
], ],
[ [
{},
{ {
text:'Balance', text:'Balance',
style:'itemsFooterTotalTitle' style:'itemsFooterTotalTitle'
@@ -754,14 +771,6 @@ var docDefinition = {
] ]
}, // table }, // table
layout: 'lightHorizontalLines' layout: 'lightHorizontalLines'
},
{
text: 'Notes',
style:'notesTitle'
},
{
text: <?php echo json_encode($invoice_note); ?>,
style:'notesText'
} }
], //End Content, ], //End Content,
styles: { styles: {
@@ -879,7 +888,7 @@ var docDefinition = {
notesTitle: { notesTitle: {
fontSize: 10, fontSize: 10,
bold: true, bold: true,
margin: [0,50,0,3], margin: [0,5,0,5],
}, },
notesText: { notesText: {
fontSize: 10 fontSize: 10