Added ability to format currency without a dollar sign (i.e. in raw numerical format).

git-svn-id: file:///svn-source/pmgr/branches/yafr_20090716@492 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
abijah
2009-08-06 05:04:34 +00:00
parent 4d62d7da73
commit 5a7b087ddc

View File

@@ -19,13 +19,13 @@ class FormatHelper extends AppHelper {
true)); true));
} }
function currency($amount, $spans = false) { function currency($amount, $spans = false, $dollar_sign = null) {
if (!isset($amount)) if (!isset($amount))
return '-'; return '-';
//return null; //return null;
$currency = self::$number->currency($amount, $currency = self::$number->currency($amount,
'USD', isset($dollar_sign) ? $dollar_sign : 'USD',
$spans ? array('before'=>'', 'after'=>'') : array()); $spans ? array('before'=>'', 'after'=>'') : array());
if ($spans) if ($spans)