diff --git a/app/Utils/Traits/MakesInvoiceValues.php b/app/Utils/Traits/MakesInvoiceValues.php index 6dad60647d25..c51486aa3237 100644 --- a/app/Utils/Traits/MakesInvoiceValues.php +++ b/app/Utils/Traits/MakesInvoiceValues.php @@ -270,6 +270,8 @@ trait MakesInvoiceValues if (! is_array($items)) { $data; } + + $locale_info = localeconv(); foreach ($items as $key => $item) { if ($table_type == '$product' && $item->type_id != 1) { @@ -304,8 +306,7 @@ trait MakesInvoiceValues //$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 - $data[$key][$table_type.'.quantity'] = rtrim($item->quantity, "0"); - + $data[$key][$table_type.'.quantity'] = rtrim($item->quantity, $locale_info['decimal_point']); $data[$key][$table_type.'.unit_cost'] = Number::formatMoney($item->cost, $this->client); $data[$key][$table_type.'.cost'] = Number::formatMoney($item->cost, $this->client);