Increased right margin for notes and Dates are now in a table under invoice pdf

This commit is contained in:
johnnyq
2021-04-06 20:31:33 -04:00
parent cce19cb85b
commit 1523ff738f
+31 -15
View File
@@ -566,36 +566,50 @@ var docDefinition = {
}, },
] ]
}, },
// Invoice Dates //Invoice Dates Table
{ {
columns: [ table: {
// headers are automatically repeated if the table spans over multiple pages
// you can declare how many rows should be treated as headers
headerRows: 0,
widths: [ '*',80, 80 ],
body: [
// Total
[
{
text:'',
rowSpan: 3
},
{},
{},
],
[
{},
{ {
text:'Invoice Date', text:'Invoice Date',
style:'invoiceDateTitle', style:'invoiceDateTitle',
width: '*'
}, },
{ {
text:'<?php echo $invoice_date ?>', text:'<?php echo $invoice_date ?>',
style:'invoiceDateValue', style:'invoiceDateValue',
width: 80
}, },
] ],
}, [
{ {},
columns: [
{ {
text:'Due Date', text:'Due Date',
style:'invoiceDateTitle', style:'invoiceDateTitle',
width: '*'
}, },
{ {
text:'<?php echo $invoice_due ?>', text:'<?php echo $invoice_due ?>',
style:'invoiceDateValue', style:'invoiceDateValue',
width: 80
}, },
],
] ]
}, // table
layout: 'lightHorizontalLines'
}, },
// Line breaks // Line breaks
'\n\n', '\n\n',
// Items // Items
@@ -776,7 +790,7 @@ var docDefinition = {
styles: { styles: {
// Document Footer // Document Footer
documentFooterCenter: { documentFooterCenter: {
fontSize: 10, fontSize: 9,
margin: [5,5,5,5], margin: [5,5,5,5],
alignment:'center' alignment:'center'
}, },
@@ -819,12 +833,13 @@ var docDefinition = {
// Invoice Dates // Invoice Dates
invoiceDateTitle: { invoiceDateTitle: {
fontSize: 10, fontSize: 10,
alignment:'right', alignment:'left',
margin:[0,0,0,3] margin:[0,5,0,5]
}, },
invoiceDateValue: { invoiceDateValue: {
fontSize: 10, fontSize: 10,
alignment:'right', alignment:'right',
margin:[0,5,0,5]
}, },
// Items Header // Items Header
itemsHeader: { itemsHeader: {
@@ -891,7 +906,8 @@ var docDefinition = {
margin: [0,5,0,5], margin: [0,5,0,5],
}, },
notesText: { notesText: {
fontSize: 10 fontSize: 9,
margin: [0,5,50,5]
}, },
left: { left: {
alignment:'left', alignment:'left',