1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-09 20:52:56 +01:00

Working on product fields

This commit is contained in:
Hillel Coren 2017-10-29 19:19:14 +02:00
parent bd98591ca7
commit 423b424acf
3 changed files with 7 additions and 5 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

@ -220,8 +220,8 @@ NINJA.decodeJavascript = function(invoice, javascript)
'accountAddress': NINJA.accountAddress(invoice), 'accountAddress': NINJA.accountAddress(invoice),
'invoiceDetails': NINJA.invoiceDetails(invoice), 'invoiceDetails': NINJA.invoiceDetails(invoice),
'invoiceDetailsHeight': (NINJA.invoiceDetails(invoice).length * 16) + 16, 'invoiceDetailsHeight': (NINJA.invoiceDetails(invoice).length * 16) + 16,
'invoiceLineItems': invoice.is_statement ? NINJA.statementLines(invoice) : NINJA.invoiceLines(invoice), 'invoiceLineItems': invoice.is_statement ? NINJA.statementLines(invoice) : NINJA.invoiceLines(invoice, ! invoice.hasSecondTable),
'invoiceLineItemColumns': invoice.is_statement ? NINJA.statementColumns(invoice) : NINJA.invoiceColumns(invoice, javascript), 'invoiceLineItemColumns': invoice.is_statement ? NINJA.statementColumns(invoice) : NINJA.invoiceColumns(invoice, javascript, ! invoice.hasSecondTable),
'taskLineItems': NINJA.invoiceLines(invoice, true), 'taskLineItems': NINJA.invoiceLines(invoice, true),
'taskLineItemColumns': NINJA.invoiceColumns(invoice, javascript, true), 'taskLineItemColumns': NINJA.invoiceColumns(invoice, javascript, true),
'invoiceDocuments' : NINJA.invoiceDocuments(invoice), 'invoiceDocuments' : NINJA.invoiceDocuments(invoice),
@ -455,6 +455,7 @@ NINJA.invoiceColumns = function(invoice, design, isTasks)
columns.push(width) columns.push(width)
} }
console.log(columns);
return columns; return columns;
} }
@ -626,7 +627,7 @@ NINJA.invoiceLines = function(invoice, isSecondTable) {
if (field == 'custom_value1' && ! invoice.has_custom_item_value1) { if (field == 'custom_value1' && ! invoice.has_custom_item_value1) {
continue; continue;
} else if (field == 'custom_value2' && ! invoice.has_custom_item_value1) { } else if (field == 'custom_value2' && ! invoice.has_custom_item_value2) {
continue; continue;
} else if (field == 'tax' && ! invoice.has_item_taxes) { } else if (field == 'tax' && ! invoice.has_item_taxes) {
continue; continue;
@ -674,6 +675,7 @@ NINJA.invoiceLines = function(invoice, isSecondTable) {
grid.push(row); grid.push(row);
} }
console.log(JSON.stringify(grid));
return NINJA.prepareDataTable(grid, 'invoiceItems'); return NINJA.prepareDataTable(grid, 'invoiceItems');
} }