1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 05:02:36 +01:00

Hide unit cost if the quantity column is hidden

This commit is contained in:
Hillel Coren 2016-05-09 17:40:55 +03:00
parent 8bd2e84bc8
commit 786b6567b6
2 changed files with 14 additions and 13 deletions

File diff suppressed because one or more lines are too long

View File

@ -279,7 +279,7 @@ NINJA.invoiceColumns = function(invoice)
var count = 3;
if (account.hide_quantity == '1') {
count--;
count -= 2;
}
if (account.show_item_taxes == '1') {
count++;
@ -336,11 +336,10 @@ NINJA.invoiceLines = function(invoice) {
}
if (invoice.features.invoice_ettings && account.custom_invoice_item_label2) {
grid[0].push({text: account.custom_invoice_item_label2, style: ['tableHeader', 'custom2TableHeader']});
}
grid[0].push({text: invoiceLabels.unit_cost, style: ['tableHeader', 'costTableHeader']});
}
if (!hideQuantity) {
grid[0].push({text: invoiceLabels.unit_cost, style: ['tableHeader', 'costTableHeader']});
grid[0].push({text: invoiceLabels.quantity, style: ['tableHeader', 'qtyTableHeader']});
}
if (showItemTaxes) {
@ -401,8 +400,8 @@ NINJA.invoiceLines = function(invoice) {
if (invoice.features.invoice_settings && account.custom_invoice_item_label2) {
row.push({style:["customValue2", rowStyle], text:custom_value2 || ' '});
}
row.push({style:["cost", rowStyle], text:cost});
if (!hideQuantity) {
row.push({style:["cost", rowStyle], text:cost});
row.push({style:["quantity", rowStyle], text:qty || ' '});
}
if (showItemTaxes) {