From 2ef6c6f17b0c56f5a5e58c50f65cae8ca7d3c77d Mon Sep 17 00:00:00 2001 From: johnnyq Date: Fri, 13 May 2022 16:54:49 -0400 Subject: [PATCH] Add missing Quote and Invoice Prefixes on view notifications --- guest_view_invoice.php | 2 +- guest_view_quote.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/guest_view_invoice.php b/guest_view_invoice.php index 08a5919e..372eb968 100644 --- a/guest_view_invoice.php +++ b/guest_view_invoice.php @@ -96,7 +96,7 @@ if(isset($_GET['invoice_id'], $_GET['url_key'])){ //Prevent SQL Error if client_name has ' in their name example Bill's Market $client_name_escaped = mysqli_escape_string($mysqli,$client_name); - mysqli_query($mysqli,"INSERT INTO notifications SET notification_type = 'Invoice Viewed', notification = 'Invoice $invoice_number has been viewed by $client_name_escaped - $ip - $os - $browser', notification_timestamp = NOW(), notification_client_id = $client_id, company_id = $company_id"); + mysqli_query($mysqli,"INSERT INTO notifications SET notification_type = 'Invoice Viewed', notification = 'Invoice $invoice_prefix$invoice_number has been viewed by $client_name_escaped - $ip - $os - $browser', notification_timestamp = NOW(), notification_client_id = $client_id, company_id = $company_id"); $sql_payments = mysqli_query($mysqli,"SELECT * FROM payments, accounts WHERE payment_account_id = account_id AND payment_invoice_id = $invoice_id ORDER BY payments.payment_id DESC"); diff --git a/guest_view_quote.php b/guest_view_quote.php index d5d31f84..0d4882a4 100644 --- a/guest_view_quote.php +++ b/guest_view_quote.php @@ -77,7 +77,7 @@ if(isset($_GET['quote_id'], $_GET['url_key'])){ //Mark viewed in history mysqli_query($mysqli,"INSERT INTO history SET history_status = '$quote_status', history_description = 'Quote viewed - $ip - $os - $browser - $device', history_created_at = NOW(), history_quote_id = $quote_id, company_id = $company_id"); - mysqli_query($mysqli,"INSERT INTO notifications SET notification_type = 'Quote Viewed', notification = 'Quote $quote_number has been viewed by $client_name - $ip - $os - $browser - $device', notification_timestamp = NOW(), notification_client_id = $client_id, company_id = $company_id"); + mysqli_query($mysqli,"INSERT INTO notifications SET notification_type = 'Quote Viewed', notification = 'Quote $quote_prefix$quote_number has been viewed by $client_name - $ip - $os - $browser - $device', notification_timestamp = NOW(), notification_client_id = $client_id, company_id = $company_id"); ?>