Fix currency symbol when no dollars are chosen

This commit is contained in:
jekkos
2015-04-14 09:00:10 +02:00
committed by jekkos
parent 11eed40718
commit 7a9590359e

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, '.', '');
}
?>
?>