From 22f54886e217ac2572616f045ac832db8dab436c Mon Sep 17 00:00:00 2001 From: johnnyq Date: Thu, 14 Nov 2024 11:56:12 -0500 Subject: [PATCH] Fix: Broken Create Quote - regression in logging --- post/user/quote.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/post/user/quote.php b/post/user/quote.php index a925660b..d6b44c46 100644 --- a/post/user/quote.php +++ b/post/user/quote.php @@ -10,7 +10,7 @@ if (isset($_POST['add_quote'])) { require_once 'post/user/quote_model.php'; - $client = intval($_POST['client']); + $client_id = intval($_POST['client']); //Get the last Quote Number and add 1 for the new Quote number $quote_number = $config_quote_next_number; @@ -20,7 +20,7 @@ if (isset($_POST['add_quote'])) { //Generate a unique URL key for clients to access $quote_url_key = randomString(156); - mysqli_query($mysqli,"INSERT INTO quotes SET quote_prefix = '$config_quote_prefix', quote_number = $quote_number, quote_scope = '$scope', quote_date = '$date', quote_expire = '$expire', quote_currency_code = '$session_company_currency', quote_category_id = $category, quote_status = 'Draft', quote_url_key = '$quote_url_key', quote_client_id = $client"); + mysqli_query($mysqli,"INSERT INTO quotes SET quote_prefix = '$config_quote_prefix', quote_number = $quote_number, quote_scope = '$scope', quote_date = '$date', quote_expire = '$expire', quote_currency_code = '$session_company_currency', quote_category_id = $category, quote_status = 'Draft', quote_url_key = '$quote_url_key', quote_client_id = $client_id"); $quote_id = mysqli_insert_id($mysqli);