mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Fixes for quantity number in line items
This commit is contained in:
parent
e719c659ea
commit
32b0479101
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user