From 32158872b26d2e117968768ad4090bb45240ab41 Mon Sep 17 00:00:00 2001 From: johnnyq Date: Mon, 18 Nov 2024 14:08:13 -0500 Subject: [PATCH] get client id for logging when adding recurring items --- client_contact_edit_modal.php | 2 +- post/user/client.php | 1 - post/user/contact.php | 4 ++-- post/user/invoice.php | 1 + 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/client_contact_edit_modal.php b/client_contact_edit_modal.php index aa3ea01f..c1674657 100644 --- a/client_contact_edit_modal.php +++ b/client_contact_edit_modal.php @@ -228,7 +228,7 @@
- + contact_photo"> diff --git a/post/user/client.php b/post/user/client.php index 59e5b14b..2da7e819 100644 --- a/post/user/client.php +++ b/post/user/client.php @@ -111,7 +111,6 @@ if (isset($_POST['add_client'])) { $_SESSION['alert_message'] = "Client $name created"; header("Location: clients.php"); - exit; } diff --git a/post/user/contact.php b/post/user/contact.php index f8902de8..4d23a59c 100644 --- a/post/user/contact.php +++ b/post/user/contact.php @@ -46,7 +46,7 @@ if (isset($_POST['add_contact'])) { } // Check for and process image/photo - if ($_FILES['file']['tmp_name']) { + if (isset($_FILES['file']['tmp_name'])) { if ($new_file_name = checkFileUpload($_FILES['file'], array('jpg', 'jpeg', 'gif', 'png'))) { $file_tmp_path = $_FILES['file']['tmp_name']; @@ -122,7 +122,7 @@ if (isset($_POST['edit_contact'])) { mysqli_query($mysqli,"UPDATE contacts SET contact_name = '$name', contact_title = '$title', contact_phone = '$phone', contact_extension = '$extension', contact_mobile = '$mobile', contact_email = '$email', contact_pin = '$pin', contact_notes = '$notes', contact_important = $contact_important, contact_billing = $contact_billing, contact_technical = $contact_technical, contact_department = '$department', contact_location_id = $location_id, contact_user_id = $contact_user_id WHERE contact_id = $contact_id"); // Upload Photo - if ($_FILES['file']['tmp_name']) { + if (isset($_FILES['file']['tmp_name'])) { if ($new_file_name = checkFileUpload($_FILES['file'], array('jpg', 'jpeg', 'gif', 'png'))) { // Set directory in which the uploaded file will be moved diff --git a/post/user/invoice.php b/post/user/invoice.php index 9996fd58..b71299f7 100644 --- a/post/user/invoice.php +++ b/post/user/invoice.php @@ -324,6 +324,7 @@ if (isset($_POST['add_recurring_item'])) { $recurring_discount = floatval($row['recurring_discount_amount']); $recurring_invoice_prefix = sanitizeInput($row['recurring_prefix']); $recurring_invoice_number = intval($row['recurring_number']); + $client_id = intval($row['recurring_client_id']); //add up all the items $sql = mysqli_query($mysqli,"SELECT * FROM invoice_items WHERE item_recurring_id = $recurring_id");