Merge pull request #1667 from hagendornIT/#1666-Display-unit-cost-with-currency-symbol

Display unit cost with currency symbol
This commit is contained in:
Hillel Coren 2017-09-14 20:39:50 +03:00 committed by GitHub
commit 761319ad1b

View File

@ -497,7 +497,7 @@ NINJA.invoiceLines = function(invoice, isSecondTable) {
var row = [];
var item = invoice.invoice_items[i];
var cost = formatMoneyInvoice(item.cost, invoice, 'none', getPrecision(item.cost));
var cost = formatMoneyInvoice(item.cost, invoice, null, getPrecision(item.cost));
var qty = NINJA.parseFloat(item.qty) ? roundSignificant(NINJA.parseFloat(item.qty)) + '' : '';
var notes = item.notes;
var productKey = item.product_key;
@ -526,7 +526,7 @@ NINJA.invoiceLines = function(invoice, isSecondTable) {
}
// show at most one blank line
if (shownItem && !notes && !productKey && (!cost || cost == '0' || cost == '0.00' || cost == '0,00')) {
if (shownItem && !notes && !productKey && !item.cost) {
continue;
}