Refactored Currency Display using PHP numfmt_format_currency() function as this is best practice and will put the right currency symbol in the right place based off locale and currency type

This commit is contained in:
johnnyq
2022-02-17 22:20:59 -05:00
parent 8d8b922ba5
commit a9346845ab
26 changed files with 148 additions and 174 deletions

View File

@@ -183,40 +183,6 @@ function truncate($text, $chars) {
return $text;
}
function get_currency_symbol($cc){
$cc = strtoupper($cc);
$currency = array(
"USD" => "$" , //U.S. Dollar
"AUD" => "$" , //Australian Dollar
"BRL" => "R$" , //Brazilian Real
"CAD" => "C$" , //Canadian Dollar
"CZK" => "" , //Czech Koruna
"DKK" => "kr" , //Danish Krone
"EUR" => "" , //Euro
"HKD" => "&#36" , //Hong Kong Dollar
"HUF" => "Ft" , //Hungarian Forint
"ILS" => "" , //Israeli New Sheqel
"INR" => "", //Indian Rupee
"JPY" => "¥" , //Japanese Yen
"MYR" => "RM" , //Malaysian Ringgit
"MXN" => "&#36" , //Mexican Peso
"NOK" => "kr" , //Norwegian Krone
"NZD" => "&#36" , //New Zealand Dollar
"PHP" => "" , //Philippine Peso
"PLN" => "" ,//Polish Zloty
"GBP" => "£" , //Pound Sterling
"SEK" => "kr" , //Swedish Krona
"CHF" => "Fr" , //Swiss Franc
"TWD" => "$" , //Taiwan New Dollar
"THB" => "฿" , //Thai Baht
"TRY" => "" //Turkish Lira
);
if(array_key_exists($cc, $currency)){
return $currency[$cc];
}
}
function get_otp($secret_seed) {
//TOTP seed (String representation)
$otp = '';