From 7823c02bf3a5ccbeb138f487ebe54101f8a57652 Mon Sep 17 00:00:00 2001 From: Marcus Hill Date: Fri, 14 Jan 2022 16:29:41 +0000 Subject: [PATCH 1/2] Add client currency to quote email --- post.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/post.php b/post.php index 80a7739b..de5f0028 100644 --- a/post.php +++ b/post.php @@ -2953,6 +2953,8 @@ if(isset($_GET['email_quote'])){ $contact_extension = $row['contact_extension']; $contact_mobile = formatPhoneNumber($row['contact_mobile']); $client_website = $row['client_website']; + $client_currency_code = $row['client_currency_code']; + $client_currency_symbol = htmlentities(get_currency_symbol($client_currency_code)); //Needs HTML entities due to encoding (Â was showing up) $base_url = $_SERVER['HTTP_HOST'] . dirname($_SERVER['REQUEST_URI']); $company_name = $row['company_name']; $company_country = $row['company_country']; @@ -2993,7 +2995,7 @@ if(isset($_GET['email_quote'])){ $mail->isHTML(true); // Set email format to HTML $mail->Subject = "Quote"; - $mail->Body = "Hello $contact_name,

Thank you for your inquiry, we are pleased to provide you with the following estimate.


Total Cost: $$quote_amount


View and accept your estimate online here


~
$company_name
$company_phone"; + $mail->Body = "Hello $contact_name,

Thank you for your inquiry, we are pleased to provide you with the following estimate.


Total Cost: $client_currency_symbol$quote_amount


View and accept your estimate online here


~
$company_name
$company_phone"; $mail->send(); echo 'Message has been sent'; From 6d20a518b756a274c41fe1468cbf5a0a91ca82cf Mon Sep 17 00:00:00 2001 From: Marcus Hill Date: Fri, 14 Jan 2022 16:33:09 +0000 Subject: [PATCH 2/2] Add client currency to invoice email --- post.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/post.php b/post.php index de5f0028..89c3c401 100644 --- a/post.php +++ b/post.php @@ -3623,6 +3623,8 @@ if(isset($_GET['email_invoice'])){ $contact_extension = $row['contact_extension']; $contact_mobile = formatPhoneNumber($row['contact_mobile']); $client_website = $row['client_website']; + $client_currency_code = $row['client_currency_code']; + $client_currency_symbol = htmlentities(get_currency_symbol($client_currency_code)); //Needs HTML entities due to encoding (Â was showing up) $base_url = $_SERVER['HTTP_HOST'] . dirname($_SERVER['REQUEST_URI']); $company_name = $row['company_name']; $company_country = $row['company_country']; @@ -3674,7 +3676,7 @@ if(isset($_GET['email_invoice'])){ }else{ $mail->Subject = "Invoice $invoice_prefix$invoice_number"; - $mail->Body = "Hello $contact_name,

Please view the details of the invoice below.

Invoice: $invoice_prefix$invoice_number
Issue Date: $invoice_date
Total: $$invoice_amount
Balance Due: $$balance
Due Date: $invoice_due


To view your invoice online click here


~
$company_name
$company_phone"; + $mail->Body = "Hello $contact_name,

Please view the details of the invoice below.

Invoice: $invoice_prefix$invoice_number
Issue Date: $invoice_date
Total: $client_currency_symbol$invoice_amount
Balance Due: $client_currency_symbol$balance
Due Date: $invoice_due


To view your invoice online click here


~
$company_name
$company_phone"; //$mail->AltBody = 'This is the body in plain text for non-HTML mail clients'; }