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

@@ -27,6 +27,7 @@ if(isset($_GET['quote_id'], $_GET['url_key'])){
$quote_status = $row['quote_status'];
$quote_date = $row['quote_date'];
$quote_amount = $row['quote_amount'];
$quote_currency_code = $row['quote_currency_code'];
$quote_note = $row['quote_note'];
$category_id = $row['category_id'];
$client_id = $row['client_id'];
@@ -41,7 +42,6 @@ if(isset($_GET['quote_id'], $_GET['url_key'])){
$contact_mobile = formatPhoneNumber($row['contact_mobile']);
$client_website = $row['client_website'];
$client_currency_code = $row['client_currency_code'];
$client_currency_symbol = get_currency_symbol($client_currency_code);
$client_net_terms = $row['client_net_terms'];
if($client_net_terms == 0){
$client_net_terms = $config_default_net_terms;
@@ -60,6 +60,9 @@ if(isset($_GET['quote_id'], $_GET['url_key'])){
}
$config_quote_footer = $row['config_quote_footer'];
//Set Currency Format
$currency_format = numfmt_create('en-US', NumberFormatter::CURRENCY);
$ip = get_ip();
$os = get_os();
$browser = get_web_browser();