mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-08 17:34:30 -04:00
Change entity type label on delivery note
This commit is contained in:
parent
f773a5df13
commit
8e37d063fa
@ -331,6 +331,7 @@ trait PresentsInvoice
|
|||||||
'unit_cost',
|
'unit_cost',
|
||||||
'custom_value1',
|
'custom_value1',
|
||||||
'custom_value2',
|
'custom_value2',
|
||||||
|
'delivery_note',
|
||||||
];
|
];
|
||||||
|
|
||||||
foreach ($fields as $field) {
|
foreach ($fields as $field) {
|
||||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -242,8 +242,8 @@ NINJA.decodeJavascript = function(invoice, javascript)
|
|||||||
'balanceDue': formatMoneyInvoice(invoice.balance_amount, invoice),
|
'balanceDue': formatMoneyInvoice(invoice.balance_amount, invoice),
|
||||||
'invoiceFooter': NINJA.invoiceFooter(invoice),
|
'invoiceFooter': NINJA.invoiceFooter(invoice),
|
||||||
'invoiceNumber': invoice.is_statement ? '' : (invoice.invoice_number || ' '),
|
'invoiceNumber': invoice.is_statement ? '' : (invoice.invoice_number || ' '),
|
||||||
'entityType': invoice.is_statement ? invoiceLabels.statement : invoice.is_quote ? invoiceLabels.quote : invoice.balance_amount < 0 ? invoiceLabels.credit_note : invoiceLabels.invoice,
|
'entityType': NINJA.entityType(invoice),
|
||||||
'entityTypeUC': (invoice.is_statement ? invoiceLabels.statement : invoice.is_quote ? invoiceLabels.quote : invoice.balance_amount < 0 ? invoiceLabels.credit_note : invoiceLabels.invoice).toUpperCase(),
|
'entityTypeUC': NINJA.entityType(invoice).toUpperCase(),
|
||||||
'entityTaxType': invoice.is_statement ? invoiceLabels.statement : invoice.is_quote ? invoiceLabels.tax_quote : invoiceLabels.tax_invoice,
|
'entityTaxType': invoice.is_statement ? invoiceLabels.statement : invoice.is_quote ? invoiceLabels.tax_quote : invoiceLabels.tax_invoice,
|
||||||
'fontSize': NINJA.fontSize,
|
'fontSize': NINJA.fontSize,
|
||||||
'fontSizeLarger': NINJA.fontSize + 1,
|
'fontSizeLarger': NINJA.fontSize + 1,
|
||||||
@ -357,6 +357,20 @@ NINJA.decodeJavascript = function(invoice, javascript)
|
|||||||
return javascript;
|
return javascript;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
NINJA.entityType = function(invoice)
|
||||||
|
{
|
||||||
|
if (invoice.is_delivery_note) {
|
||||||
|
return invoiceLabels.delivery_note;
|
||||||
|
} else if (invoice.is_statement) {
|
||||||
|
return invoiceLabels.statement;
|
||||||
|
} else if (invoice.is_quote) {
|
||||||
|
return invoiceLabels.quote;
|
||||||
|
} else if (invoice.balance_amount < 0) {
|
||||||
|
return invoiceLabels.credit_note;
|
||||||
|
} else {
|
||||||
|
return invoiceLabels.invoice;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
NINJA.notesAndTerms = function(invoice)
|
NINJA.notesAndTerms = function(invoice)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user