From f409e22a60d4292b51e76d317765040622a9275b Mon Sep 17 00:00:00 2001 From: johnnyq Date: Wed, 18 Aug 2021 20:41:19 -0400 Subject: [PATCH] Started adding currency symbols and starting with invoice --- blank.php | 34 ++++++++++++++++++++++++++++++++++ functions.php | 35 +++++++++++++++++++++++++++++++++++ invoice.php | 31 ++++++++++++++++--------------- tickets.php | 11 ++++------- 4 files changed, 89 insertions(+), 22 deletions(-) diff --git a/blank.php b/blank.php index bd06687b..b77d8502 100644 --- a/blank.php +++ b/blank.php @@ -16,6 +16,40 @@ Copy to clipboard + + + "$" , //U.S. Dollar + "AUD" => "$" , //Australian Dollar + "BRL" => "R$" , //Brazilian Real + "CAD" => "C$" , //Canadian Dollar + "CZK" => "Kč" , //Czech Koruna + "DKK" => "kr" , //Danish Krone + "EUR" => "€" , //Euro + "HKD" => "$" , //Hong Kong Dollar + "HUF" => "Ft" , //Hungarian Forint + "ILS" => "₪" , //Israeli New Sheqel + "INR" => "₹", //Indian Rupee + "JPY" => "¥" , //Japanese Yen + "MYR" => "RM" , //Malaysian Ringgit + "MXN" => "$" , //Mexican Peso + "NOK" => "kr" , //Norwegian Krone + "NZD" => "$" , //New Zealand Dollar + "PHP" => "₱" , //Philippine Peso + "PLN" => "zł" ,//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]; + } +} + ?> \ No newline at end of file diff --git a/invoice.php b/invoice.php index 3f0d7dba..ceaf0026 100644 --- a/invoice.php +++ b/invoice.php @@ -48,6 +48,7 @@ if(isset($_GET['invoice_id'])){ } $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; @@ -271,9 +272,9 @@ if(isset($_GET['invoice_id'])){ - $ - $ - $ + + + Subtotal - $ + 0){ ?> Tax - $ + 0){ ?>
Paid to Date
- $ + Balance Due - $ + @@ -672,15 +673,15 @@ var docDefinition = { style:'itemQty' }, { - text:'$', + text:'', style:'itemNumber' }, { - text:'$', + text:'', style:'itemNumber' }, { - text: '$', + text: '', style:'itemNumber' } ], @@ -722,7 +723,7 @@ var docDefinition = { style:'itemsFooterSubTitle' }, { - text:'$', + text:'', style:'itemsFooterSubValue' } ], @@ -733,7 +734,7 @@ var docDefinition = { style:'itemsFooterSubTitle' }, { - text: '$', + text: '', style:'itemsFooterSubValue' } ], @@ -744,7 +745,7 @@ var docDefinition = { style:'itemsFooterSubTitle' }, { - text: '$', + text: '', style:'itemsFooterSubValue' } ], @@ -755,7 +756,7 @@ var docDefinition = { style:'itemsFooterSubTitle' }, { - text: '$', + text: '', style:'itemsFooterSubValue' } ], @@ -766,7 +767,7 @@ var docDefinition = { style:'itemsFooterTotalTitle' }, { - text: '$', + text: '', style:'itemsFooterTotalTitle' } diff --git a/tickets.php b/tickets.php index df468821..53c821f5 100644 --- a/tickets.php +++ b/tickets.php @@ -20,7 +20,7 @@ if(isset($_GET['status'])){ $status = mysqli_real_escape_string($mysqli,$_GET['status']); }else{ - $status = ""; + $status = "Open"; } if(!empty($_GET['sb'])){ @@ -113,12 +113,9 @@