From 74aa0e829fab87bf0d42e0e9fe899e7dc2f23993 Mon Sep 17 00:00:00 2001 From: johnnyq Date: Sat, 9 Dec 2023 16:31:28 -0500 Subject: [PATCH] Fix Invoice Item order in Ticketing, When creating an invoice from a ticket make sure the item added has an item_order of 1 --- post/ticket.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/post/ticket.php b/post/ticket.php index 039ee5f1..37f26109 100644 --- a/post/ticket.php +++ b/post/ticket.php @@ -857,7 +857,7 @@ if (isset($_POST['add_invoice_from_ticket'])) { $total = $subtotal + $tax_amount; - mysqli_query($mysqli,"INSERT INTO invoice_items SET item_name = '$item_name', item_description = '$item_description', item_quantity = $qty, item_price = $price, item_subtotal = $subtotal, item_tax = $tax_amount, item_total = $total, item_tax_id = $tax_id, item_invoice_id = $invoice_id"); + mysqli_query($mysqli,"INSERT INTO invoice_items SET item_name = '$item_name', item_description = '$item_description', item_quantity = $qty, item_price = $price, item_subtotal = $subtotal, item_tax = $tax_amount, item_total = $total, item_order = 1, item_tax_id = $tax_id, item_invoice_id = $invoice_id"); //Update Invoice Balances