mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-08 12:12:48 +01:00
Copy custom values of invoice items
This commit is contained in:
parent
e4ce4e0fc8
commit
986156117e
@ -743,6 +743,8 @@ class InvoiceRepository extends BaseRepository
|
||||
$item->tax_rate1 = $recurItem->tax_rate1;
|
||||
$item->tax_name2 = $recurItem->tax_name2;
|
||||
$item->tax_rate2 = $recurItem->tax_rate2;
|
||||
$item->custom_value1 = Utils::processVariables($recurItem->custom_value1);
|
||||
$item->custom_value2 = Utils::processVariables($recurItem->custom_value2);
|
||||
$invoice->invoice_items()->save($item);
|
||||
}
|
||||
|
||||
|
@ -31359,7 +31359,9 @@ NINJA.invoiceLines = function(invoice) {
|
||||
var notes = item.notes;
|
||||
var productKey = item.product_key;
|
||||
var tax1 = '';
|
||||
var tax2 = '';
|
||||
var tax2 = '';
|
||||
var custom_value1 = item.custom_value1;
|
||||
var custom_value2 = item.custom_value2;
|
||||
|
||||
if (showItemTaxes) {
|
||||
if (item.tax_name1) {
|
||||
@ -31381,6 +31383,8 @@ NINJA.invoiceLines = function(invoice) {
|
||||
if (invoice.is_recurring) {
|
||||
notes = processVariables(notes);
|
||||
productKey = processVariables(productKey);
|
||||
custom_value1 = processVariables(item.custom_value1);
|
||||
custom_value2 = processVariables(item.custom_value2);
|
||||
}
|
||||
|
||||
var lineTotal = roundToTwo(NINJA.parseFloat(item.cost)) * roundToTwo(NINJA.parseFloat(item.qty));
|
||||
@ -31393,10 +31397,10 @@ NINJA.invoiceLines = function(invoice) {
|
||||
}
|
||||
row.push({style:["notes", rowStyle], stack:[{text:notes || ' '}]});
|
||||
if (invoice.features.invoice_settings && account.custom_invoice_item_label1) {
|
||||
row.push({style:["customValue1", rowStyle], text:item.custom_value1 || ' '});
|
||||
row.push({style:["customValue1", rowStyle], text:custom_value1 || ' '});
|
||||
}
|
||||
if (invoice.features.invoice_settings && account.custom_invoice_item_label2) {
|
||||
row.push({style:["customValue2", rowStyle], text:item.custom_value2 || ' '});
|
||||
row.push({style:["customValue2", rowStyle], text:custom_value2 || ' '});
|
||||
}
|
||||
row.push({style:["cost", rowStyle], text:cost});
|
||||
if (!hideQuantity) {
|
||||
|
@ -358,7 +358,9 @@ NINJA.invoiceLines = function(invoice) {
|
||||
var notes = item.notes;
|
||||
var productKey = item.product_key;
|
||||
var tax1 = '';
|
||||
var tax2 = '';
|
||||
var tax2 = '';
|
||||
var custom_value1 = item.custom_value1;
|
||||
var custom_value2 = item.custom_value2;
|
||||
|
||||
if (showItemTaxes) {
|
||||
if (item.tax_name1) {
|
||||
@ -380,6 +382,8 @@ NINJA.invoiceLines = function(invoice) {
|
||||
if (invoice.is_recurring) {
|
||||
notes = processVariables(notes);
|
||||
productKey = processVariables(productKey);
|
||||
custom_value1 = processVariables(item.custom_value1);
|
||||
custom_value2 = processVariables(item.custom_value2);
|
||||
}
|
||||
|
||||
var lineTotal = roundToTwo(NINJA.parseFloat(item.cost)) * roundToTwo(NINJA.parseFloat(item.qty));
|
||||
@ -392,10 +396,10 @@ NINJA.invoiceLines = function(invoice) {
|
||||
}
|
||||
row.push({style:["notes", rowStyle], stack:[{text:notes || ' '}]});
|
||||
if (invoice.features.invoice_settings && account.custom_invoice_item_label1) {
|
||||
row.push({style:["customValue1", rowStyle], text:item.custom_value1 || ' '});
|
||||
row.push({style:["customValue1", rowStyle], text:custom_value1 || ' '});
|
||||
}
|
||||
if (invoice.features.invoice_settings && account.custom_invoice_item_label2) {
|
||||
row.push({style:["customValue2", rowStyle], text:item.custom_value2 || ' '});
|
||||
row.push({style:["customValue2", rowStyle], text:custom_value2 || ' '});
|
||||
}
|
||||
row.push({style:["cost", rowStyle], text:cost});
|
||||
if (!hideQuantity) {
|
||||
|
Loading…
Reference in New Issue
Block a user