Fixes for saving invoice. (#3015)

* update company settings and OpenAPI definitions

* Fixes for tests

* Add extra variables to company settings

* Track signup platform when new account signup processed

* Fixes for invoice save
This commit is contained in:
David Bomba 2019-10-24 20:23:37 +11:00 committed by GitHub
parent a60613aa26
commit 8e3e5a2cb2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -70,13 +70,13 @@ class Number
$swapSymbol = $currency->swap_currency_symbol;
/* Country settings override client settings */
if ($client->country->thousand_separator)
if (property_exists($client->country), 'thousand_separator')
$thousand = $client->country->thousand_separator;
if ($client->country->decimal_separator)
if (property_exists($client->country), 'decimal_separator')
$decimal = $client->country->decimal_separator;
if($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);