mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Fix 'balance due' PDF styling
This commit is contained in:
parent
661028b4e7
commit
587acbe098
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -595,8 +595,8 @@ NINJA.invoiceDocuments = function(invoice) {
|
||||
NINJA.statementSubtotals = function(invoice)
|
||||
{
|
||||
var data = [[
|
||||
{ text: invoiceLabels.balance_due, style: ['subtotalsLabel', 'balanceDueLabel'] },
|
||||
{ text: formatMoneyInvoice(invoice.balance_amount, invoice), style: ['subtotals', 'balanceDue'] }
|
||||
{ text: invoiceLabels.balance_due, style: ['subtotalsLabel', 'subtotalsBalanceDueLabel'] },
|
||||
{ text: formatMoneyInvoice(invoice.balance_amount, invoice), style: ['subtotals', 'subtotalsBalanceDue'] }
|
||||
]];
|
||||
|
||||
return NINJA.prepareDataPairs(data, 'subtotals');
|
||||
@ -662,16 +662,16 @@ NINJA.subtotals = function(invoice, hideBalance)
|
||||
|
||||
if (!hideBalance || isPartial) {
|
||||
data.push([
|
||||
{ text: invoice.is_quote || invoice.balance_amount < 0 ? invoiceLabels.total : invoiceLabels.balance_due, style: ['subtotalsLabel', isPartial ? '' : 'balanceDueLabel'] },
|
||||
{ text: formatMoneyInvoice(invoice.total_amount, invoice), style: ['subtotals', isPartial ? '' : 'balanceDue'] }
|
||||
{ text: invoice.is_quote || invoice.balance_amount < 0 ? invoiceLabels.total : invoiceLabels.balance_due, style: ['subtotalsLabel', isPartial ? '' : 'subtotalsBalanceDueLabel'] },
|
||||
{ text: formatMoneyInvoice(invoice.total_amount, invoice), style: ['subtotals', isPartial ? '' : 'subtotalsBalanceDue'] }
|
||||
]);
|
||||
}
|
||||
|
||||
if (!hideBalance) {
|
||||
if (isPartial) {
|
||||
data.push([
|
||||
{ text: invoiceLabels.partial_due, style: ['subtotalsLabel', 'balanceDueLabel'] },
|
||||
{ text: formatMoneyInvoice(invoice.balance_amount, invoice), style: ['subtotals', 'balanceDue'] }
|
||||
{ text: invoiceLabels.partial_due, style: ['subtotalsLabel', 'subtotalsBalanceDueLabel'] },
|
||||
{ text: formatMoneyInvoice(invoice.balance_amount, invoice), style: ['subtotals', 'subtotalsBalanceDue'] }
|
||||
]);
|
||||
}
|
||||
}
|
||||
@ -682,8 +682,8 @@ NINJA.subtotals = function(invoice, hideBalance)
|
||||
NINJA.subtotalsBalance = function(invoice) {
|
||||
var isPartial = NINJA.parseFloat(invoice.partial);
|
||||
return [[
|
||||
{text: isPartial ? invoiceLabels.partial_due : (invoice.is_quote || invoice.balance_amount < 0 ? invoiceLabels.total : invoiceLabels.balance_due), style:['subtotalsLabel', 'balanceDueLabel']},
|
||||
{text: formatMoneyInvoice(invoice.balance_amount, invoice), style:['subtotals', 'balanceDue']}
|
||||
{text: isPartial ? invoiceLabels.partial_due : (invoice.is_quote || invoice.balance_amount < 0 ? invoiceLabels.total : invoiceLabels.balance_due), style:['subtotalsLabel', 'subtotalsBalanceDueLabel']},
|
||||
{text: formatMoneyInvoice(invoice.balance_amount, invoice), style:['subtotals', 'subtotalsBalanceDue']}
|
||||
]];
|
||||
}
|
||||
|
||||
|
@ -171,11 +171,11 @@
|
||||
"productKey": {
|
||||
"color": "$primaryColor:#36a498"
|
||||
},
|
||||
"balanceDueLabel": {
|
||||
"subtotalsBalanceDueLabel": {
|
||||
"fontSize": "$fontSizeLargest",
|
||||
"bold": true
|
||||
},
|
||||
"balanceDue": {
|
||||
"subtotalsBalanceDue": {
|
||||
"fontSize": "$fontSizeLargest",
|
||||
"color": "$primaryColor:#36a498",
|
||||
"bold": true
|
||||
|
@ -159,12 +159,12 @@
|
||||
"productKey": {
|
||||
"bold": true
|
||||
},
|
||||
"balanceDueLabel": {
|
||||
"subtotalsBalanceDueLabel": {
|
||||
"fontSize": "$fontSizeLargest",
|
||||
"color": "#ffffff",
|
||||
"bold": true
|
||||
},
|
||||
"balanceDue": {
|
||||
"subtotalsBalanceDue": {
|
||||
"fontSize": "$fontSizeLargest",
|
||||
"bold": true,
|
||||
"color":"#ffffff",
|
||||
|
@ -144,10 +144,10 @@
|
||||
"color": "$primaryColor:#37a3c6",
|
||||
"bold": true
|
||||
},
|
||||
"balanceDueLabel": {
|
||||
"subtotalsBalanceDueLabel": {
|
||||
"fontSize": "$fontSizeLarger"
|
||||
},
|
||||
"balanceDue": {
|
||||
"subtotalsBalanceDue": {
|
||||
"fontSize": "$fontSizeLarger",
|
||||
"color": "$primaryColor:#37a3c6"
|
||||
},
|
||||
|
@ -84,11 +84,11 @@
|
||||
},
|
||||
{
|
||||
"text": "$balanceDueLabel",
|
||||
"style": "balanceDueLabel"
|
||||
"style": "subtotalsBalanceDueLabel"
|
||||
},
|
||||
{
|
||||
"text": "$balanceDue",
|
||||
"style": "balanceDue"
|
||||
"style": "subtotalsBalanceDue"
|
||||
},
|
||||
{
|
||||
"stack": [
|
||||
@ -131,11 +131,11 @@
|
||||
"productKey": {
|
||||
"bold": true
|
||||
},
|
||||
"balanceDueLabel": {
|
||||
"subtotalsBalanceDueLabel": {
|
||||
"fontSize": "$fontSizeLargest",
|
||||
"margin": [320,20,0,0]
|
||||
},
|
||||
"balanceDue": {
|
||||
"subtotalsBalanceDue": {
|
||||
"fontSize": "$fontSizeLargest",
|
||||
"color": "$primaryColor:#AE1E54",
|
||||
"bold": true,
|
||||
|
@ -86,11 +86,11 @@
|
||||
},
|
||||
{
|
||||
"text": "$balanceDueLabel",
|
||||
"style": "balanceDueLabel"
|
||||
"style": "subtotalsBalanceDueLabel"
|
||||
},
|
||||
{
|
||||
"text": "$balanceDue",
|
||||
"style": "balanceDue"
|
||||
"style": "subtotalsBalanceDue"
|
||||
},
|
||||
{
|
||||
"canvas": [{ "type": "line", "x1": 270, "y1": 20, "x2": 515, "y2": 20, "lineWidth": 1,"dash": { "length": 2 }}]
|
||||
@ -136,12 +136,12 @@
|
||||
},
|
||||
"odd": {
|
||||
},
|
||||
"balanceDueLabel": {
|
||||
"subtotalsBalanceDueLabel": {
|
||||
"fontSize": "$fontSizeLargest",
|
||||
"color": "$primaryColor:#5a7b61",
|
||||
"margin": [320,20,0,0]
|
||||
},
|
||||
"balanceDue": {
|
||||
"subtotalsBalanceDue": {
|
||||
"fontSize": "$fontSizeLargest",
|
||||
"color": "$primaryColor:#5a7b61",
|
||||
"style": true,
|
||||
|
@ -140,11 +140,11 @@
|
||||
"clientName": {
|
||||
"bold": true
|
||||
},
|
||||
"balanceDueLabel": {
|
||||
"subtotalsBalanceDueLabel": {
|
||||
"fontSize": "$fontSizeLargest",
|
||||
"bold": true
|
||||
},
|
||||
"balanceDue": {
|
||||
"subtotalsBalanceDue": {
|
||||
"fontSize": "$fontSizeLargest",
|
||||
"color": "$primaryColor:#bc9f2b",
|
||||
"bold": true
|
||||
|
@ -75,13 +75,13 @@
|
||||
},
|
||||
{
|
||||
"text": "$balanceDueLabel",
|
||||
"style": "balanceDueLabel",
|
||||
"style": "subtotalsBalanceDueLabel",
|
||||
"margin": [0, 16, 0, 0],
|
||||
"width": 370
|
||||
},
|
||||
{
|
||||
"text": "$balanceDue",
|
||||
"style": "balanceDue",
|
||||
"style": "subtotalsBalanceDue",
|
||||
"margin": [0, 16, 8, 0]
|
||||
}
|
||||
]
|
||||
@ -202,13 +202,13 @@
|
||||
"lineTotalTableHeader": {
|
||||
"alignment": "right"
|
||||
},
|
||||
"balanceDueLabel": {
|
||||
"subtotalsBalanceDueLabel": {
|
||||
"fontSize": "$fontSizeLargest",
|
||||
"color":"#FFFFFF",
|
||||
"alignment":"right",
|
||||
"bold": true
|
||||
},
|
||||
"balanceDue": {
|
||||
"subtotalsBalanceDue": {
|
||||
"fontSize": "$fontSizeLargest",
|
||||
"color":"#FFFFFF",
|
||||
"bold": true,
|
||||
|
@ -142,10 +142,10 @@
|
||||
"bold": true,
|
||||
"fontSize": "$fontSizeLarger"
|
||||
},
|
||||
"balanceDueLabel": {
|
||||
"subtotalsBalanceDueLabel": {
|
||||
"fontSize": "$fontSizeLargest"
|
||||
},
|
||||
"balanceDue": {
|
||||
"subtotalsBalanceDue": {
|
||||
"fontSize": "$fontSizeLargest",
|
||||
"color": "$primaryColor:#cd5138"
|
||||
},
|
||||
|
@ -157,10 +157,10 @@
|
||||
"invoiceDetailBalanceDue": {
|
||||
"fillColor": "#e6e6e6"
|
||||
},
|
||||
"balanceDueLabel": {
|
||||
"subtotalsBalanceDueLabel": {
|
||||
"fillColor": "#e6e6e6"
|
||||
},
|
||||
"balanceDue": {
|
||||
"subtotalsBalanceDue": {
|
||||
"fillColor": "#e6e6e6"
|
||||
},
|
||||
"header": {
|
||||
|
@ -201,12 +201,12 @@
|
||||
"lineTotalTableHeader": {
|
||||
"alignment": "right"
|
||||
},
|
||||
"balanceDueLabel": {
|
||||
"subtotalsBalanceDueLabel": {
|
||||
"fontSize": "$fontSizeLargest",
|
||||
"color":"#FFFFFF",
|
||||
"bold": true
|
||||
},
|
||||
"balanceDue": {
|
||||
"subtotalsBalanceDue": {
|
||||
"fontSize": "$fontSizeLargest",
|
||||
"bold": true,
|
||||
"color":"#FFFFFF",
|
||||
|
Loading…
x
Reference in New Issue
Block a user