From 3b4c2ba5b0dfd4834837d39da8ba8b99efd7b3fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Beganovi=C4=87?= Date: Tue, 22 Dec 2020 13:55:29 +0100 Subject: [PATCH] add $custom_value in makeinvoicevalues --- app/Utils/Traits/MakesInvoiceValues.php | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/app/Utils/Traits/MakesInvoiceValues.php b/app/Utils/Traits/MakesInvoiceValues.php index a10a4783c228..79efc1c9e3bb 100644 --- a/app/Utils/Traits/MakesInvoiceValues.php +++ b/app/Utils/Traits/MakesInvoiceValues.php @@ -620,10 +620,17 @@ trait MakesInvoiceValues $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; - $data[$key][$table_type.'.custom_value1'] = $item->custom_value1; - $data[$key][$table_type.'.custom_value2'] = $item->custom_value2; - $data[$key][$table_type.'.custom_value3'] = $item->custom_value3; - $data[$key][$table_type.'.custom_value4'] = $item->custom_value4; + + // $data[$key][$table_type.'.custom_value1'] = $item->custom_value1; + // $data[$key][$table_type.'.custom_value2'] = $item->custom_value2; + // $data[$key][$table_type.'.custom_value3'] = $item->custom_value3; + // $data[$key][$table_type.'.custom_value4'] = $item->custom_value4; + + $data[$key][$table_type . '.' . ltrim($table_type, '$') . '1'] = $item->custom_value1; // $product.product1 + $data[$key][$table_type . '.' . ltrim($table_type, '$') . '2'] = $item->custom_value2; + $data[$key][$table_type . '.' . ltrim($table_type, '$') . '3'] = $item->custom_value3; + $data[$key][$table_type . '.' . ltrim($table_type, '$') . '4'] = $item->custom_value4; + $data[$key][$table_type.'.quantity'] = $item->quantity; $data[$key][$table_type.'.unit_cost'] = Number::formatMoney($item->cost, $this->client);