From 8e3e5a2cb23da705ec65f17284095fba3cf90a41 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Thu, 24 Oct 2019 20:23:37 +1100 Subject: [PATCH] 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 --- app/Utils/Number.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/Utils/Number.php b/app/Utils/Number.php index 90213dc258c5..e75fe7553cce 100644 --- a/app/Utils/Number.php +++ b/app/Utils/Number.php @@ -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);