mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
fix product key
This commit is contained in:
parent
6625bd3943
commit
972099d89f
@ -303,7 +303,9 @@ class Design extends BaseDesign
|
|||||||
$elements = [];
|
$elements = [];
|
||||||
|
|
||||||
// Some of column can be aliased. This is simple workaround for these.
|
// Some of column can be aliased. This is simple workaround for these.
|
||||||
$aliases = [];
|
$aliases = [
|
||||||
|
'$product.product_key' => '$product.item',
|
||||||
|
];
|
||||||
|
|
||||||
foreach ($this->context['pdf_variables']["{$type}_columns"] as $column) {
|
foreach ($this->context['pdf_variables']["{$type}_columns"] as $column) {
|
||||||
if (array_key_exists($column, $aliases)) {
|
if (array_key_exists($column, $aliases)) {
|
||||||
|
@ -624,6 +624,7 @@ trait MakesInvoiceValues
|
|||||||
$_table_type = ltrim($table_type, '$'); // From $product -> product.
|
$_table_type = ltrim($table_type, '$'); // From $product -> product.
|
||||||
|
|
||||||
|
|
||||||
|
$data[$key][$table_type.'.product_key'] = is_null(optional($item)->product_key) ? $item->item : $item->product_key;
|
||||||
$data[$key][$table_type.'.item'] = is_null(optional($item)->item) ? $item->product_key : $item->item;
|
$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.'.service'] = is_null(optional($item)->service) ? $item->product_key : $item->service;
|
||||||
$data[$key][$table_type.'.notes'] = $item->notes;
|
$data[$key][$table_type.'.notes'] = $item->notes;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user