From 42069e82e929a822e9f392b38c7f004f6fb3513b Mon Sep 17 00:00:00 2001 From: David Bomba Date: Tue, 8 Feb 2022 19:58:21 +1100 Subject: [PATCH] Fixes for quantity regression --- app/Utils/Traits/MakesInvoiceValues.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/Utils/Traits/MakesInvoiceValues.php b/app/Utils/Traits/MakesInvoiceValues.php index 1fa3c549b248..7bfc420e8821 100644 --- a/app/Utils/Traits/MakesInvoiceValues.php +++ b/app/Utils/Traits/MakesInvoiceValues.php @@ -302,12 +302,13 @@ trait MakesInvoiceValues $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'] = Number::formatValue($item->quantity, $this->client->currency()); + // 08-02-2022 - fix for regression below + $data[$key][$table_type.'.quantity'] = Number::formatValue($item->quantity, $this->client->currency()); //change quantity from localized number, to decimal format with no trailing zeroes 06/09/21 //30-01-2022 - improve rounding display for Unit quantity - $data[$key][$table_type.'.quantity'] = $item->quantity >=1 ? rtrim(number_format($item->quantity, $this->client->currency()->precision), $locale_info['decimal_point']) : rtrim(number_format($item->quantity,15), 0); + // $data[$key][$table_type.'.quantity'] = $item->quantity >=1 ? rtrim(number_format($item->quantity, $this->client->currency()->precision), $locale_info['decimal_point']) : rtrim(number_format($item->quantity,15), 0); // $data[$key][$table_type.'.quantity'] = rtrim($item->quantity, $locale_info['decimal_point']); //30-01-2022 - improve rounding display for Unit Cost