1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-08 12:12:48 +01:00

Don’t show 0.00 for line item discounts

This commit is contained in:
Hillel Coren 2018-03-27 11:55:07 +03:00
parent 83ee802fa4
commit 396995ab3c
3 changed files with 26 additions and 22 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -826,12 +826,16 @@ NINJA.invoiceLines = function(invoice, isSecondTable) {
} else if (field == 'custom_value2') {
value = customValue2;
} else if (field == 'discount') {
if (parseInt(invoice.is_amount_discount)) {
value = formatMoneyInvoice(discount, invoice);
} else {
if (discount) {
value = discount + '%';
if (NINJA.parseFloat(discount)) {
if (parseInt(invoice.is_amount_discount)) {
value = formatMoneyInvoice(discount, invoice);
} else {
if (discount) {
value = discount + '%';
}
}
} else {
value = '';
}
} else if (field == 'tax') {
value = ' ';