From 629f180b8d71f5982b1c0837738014be57899973 Mon Sep 17 00:00:00 2001 From: Steve Ireland Date: Sat, 29 Jul 2017 22:54:49 -0400 Subject: [PATCH] Dispay tax decimals or currency decimals for tax amounts depending on if sales tax is enabled. --- application/helpers/locale_helper.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/application/helpers/locale_helper.php b/application/helpers/locale_helper.php index 190fc128e..3e1d61693 100644 --- a/application/helpers/locale_helper.php +++ b/application/helpers/locale_helper.php @@ -64,7 +64,16 @@ function to_currency_no_money($number) function to_currency_tax($number) { - return to_decimals($number, 'tax_decimals', \NumberFormatter::CURRENCY); + $config = get_instance()->config; + + if($config->item('customer_sales_tax_support') == '1') + { + return to_decimals($number, 'currency_decimals', \NumberFormatter::CURRENCY); + } + else + { + return to_decimals($number, 'tax_decimals', \NumberFormatter::CURRENCY); + } } function to_tax_decimals($number)