1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-20 16:31:33 +02:00

Rename product.product_key to product.item

This commit is contained in:
Benjamin Beganović 2020-12-23 14:25:12 +01:00
parent a1c438a854
commit f98627e47f
3 changed files with 3 additions and 5 deletions

View File

@ -628,7 +628,7 @@ class CompanySettings extends BaseSettings
'$credit.total',
],
'product_columns' => [
'$product.product_key',
'$product.item',
'$product.description',
'$product.unit_cost',
'$product.quantity',

View File

@ -294,6 +294,7 @@ class HtmlEngine
$data['$custom_surcharge3'] = ['value' => $this->entity->custom_surcharge3 ?: ' ', 'label' => $this->makeCustomField('custom_surcharge3')];
$data['$custom_surcharge4'] = ['value' => $this->entity->custom_surcharge4 ?: ' ', 'label' => $this->makeCustomField('custom_surcharge4')];
$data['$product.item'] = ['value' => '', 'label' => ctrans('texts.item')];
$data['$product.date'] = ['value' => '', 'label' => ctrans('texts.date')];
$data['$product.discount'] = ['value' => '', 'label' => ctrans('texts.discount')];
$data['$product.product_key'] = ['value' => '', 'label' => ctrans('texts.product_key')];

View File

@ -624,7 +624,7 @@ trait MakesInvoiceValues
$_table_type = ltrim($table_type, '$'); // From $product -> product.
$data[$key][$table_type.'.product_key'] = $item->product_key;
$data[$key][$table_type.'.item'] = is_null(optional($item)->item) ? $item->product_key : $item->item;
$data[$key][$table_type.'.service'] = is_null(optional($item)->service) ? $item->product_key : $item->service;
$data[$key][$table_type.'.notes'] = $item->notes;
$data[$key][$table_type.'.description'] = $item->notes;
@ -632,11 +632,8 @@ trait MakesInvoiceValues
$data[$key][$table_type . ".{$_table_type}1"] = $helpers->formatCustomFieldValue($this->client->company->custom_fields, "{$_table_type}1", $item->custom_value1, $this->client);
$data[$key][$table_type . ".{$_table_type}2"] = $helpers->formatCustomFieldValue($this->client->company->custom_fields, "{$_table_type}2", $item->custom_value2, $this->client);
;
$data[$key][$table_type . ".{$_table_type}3"] = $helpers->formatCustomFieldValue($this->client->company->custom_fields, "{$_table_type}3", $item->custom_value3, $this->client);
;
$data[$key][$table_type . ".{$_table_type}4"] = $helpers->formatCustomFieldValue($this->client->company->custom_fields, "{$_table_type}4", $item->custom_value4, $this->client);
;
$data[$key][$table_type.'.quantity'] = $item->quantity;