mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-05 18:52:44 +01:00
Fixes for invoice controlleR (#3019)
This commit is contained in:
parent
8e3e5a2cb2
commit
2ddc87ba6e
@ -91,7 +91,7 @@ class InvoiceTransformer extends EntityTransformer
|
||||
'updated_at' => $invoice->updated_at,
|
||||
'archived_at' => $invoice->deleted_at,
|
||||
'invoice_number' => $invoice->invoice_number,
|
||||
'discount' => (float) $invoice->discount ?: '',
|
||||
'discount' => (float) $invoice->discount,
|
||||
'po_number' => $invoice->po_number ?: '',
|
||||
'invoice_date' => $invoice->invoice_date ?: '',
|
||||
'due_date' => $invoice->due_date ?: '',
|
||||
|
@ -70,13 +70,13 @@ class Number
|
||||
$swapSymbol = $currency->swap_currency_symbol;
|
||||
|
||||
/* Country settings override client settings */
|
||||
if (property_exists($client->country), 'thousand_separator')
|
||||
if (property_exists($client->country, 'thousand_separator'))
|
||||
$thousand = $client->country->thousand_separator;
|
||||
|
||||
if (property_exists($client->country), 'decimal_separator')
|
||||
if (property_exists($client->country, 'decimal_separator'))
|
||||
$decimal = $client->country->decimal_separator;
|
||||
|
||||
if(property_exists($client->country), 'swap_currency_symbol')
|
||||
if(property_exists($client->country, 'swap_currency_symbol'))
|
||||
$swapSymbol = $client->country->swap_currency_symbol;
|
||||
|
||||
$value = number_format($value, $precision, $decimal, $thousand);
|
||||
|
Loading…
Reference in New Issue
Block a user