1
0
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:
David Bomba 2019-10-25 13:26:16 +11:00 committed by GitHub
parent 8e3e5a2cb2
commit 2ddc87ba6e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -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 ?: '',

View File

@ -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);