Fix currency symbol when no dollars are chosen

This commit is contained in:
jekkos committed 2015-04-14 13:04:46 +02:00
1 parent 08c0c2c63f
commit 4916f98bcb
1 file changed
+2 -2
+2 -2
View File
@@ -4,7 +4,7 @@ function to_currency($number,$escape=FALSE)
{
$CI =& get_instance();
$currency_symbol = $CI->config->item('currency_symbol') ? $CI->config->item('currency_symbol') : '$';
$currency_symbol = $currency_symbol == '$' && $escape ? '\$' : '$';
$currency_symbol = $currency_symbol == '$' && $escape ? '\$' : $currency_symbol;
$thousands_separator = $CI->config->item('thousands_separator') ? $CI->config->item('thousands_separator') : '';
$decimal_point = $CI->config->item('decimal_point') ? $CI->config->item('decimal_point') : '.';
if($number >= 0)
@@ -28,4 +28,4 @@ function to_currency_no_money($number)
{
return number_format($number, 2, '.', '');
}
?>
?>