From 75902c6d3f0d2d6742ccd0940c64560aa84bbdc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Beganovi=C4=87?= Date: Mon, 21 Dec 2020 09:08:12 +0100 Subject: [PATCH] Fixes for client number formatting --- app/Utils/Number.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Utils/Number.php b/app/Utils/Number.php index 46e2d9943d83..67f6ef2d2447 100644 --- a/app/Utils/Number.php +++ b/app/Utils/Number.php @@ -102,15 +102,15 @@ class Number $swapSymbol = $currency->swap_currency_symbol; /* Country settings override client settings */ - if (isset($client->country->thousand_separator)) { + if (isset($client->country->thousand_separator) && strlen($client->country->thousand_separator) >= 1) { $thousand = $client->country->thousand_separator; } - if (isset($client->country->decimal_separator)) { + if (isset($client->country->decimal_separator) && strlen($client->country->decimal_separator) >= 1) { $decimal = $client->country->decimal_separator; } - if (isset($client->country->swap_currency_symbol)) { + if (isset($client->country->swap_currency_symbol) && strlen($client->country->swap_currency_symbol) >= 1) { $swapSymbol = $client->country->swap_currency_symbol; }