From f97f6ebdb61099c294e8399ded39892869340a48 Mon Sep 17 00:00:00 2001 From: johnnyq Date: Sat, 3 Feb 2024 18:31:26 -0500 Subject: [PATCH] Set Item Order to 998 for Late fee so they appear at the bottom of the invoice. Note: Item Order 999 is used for payment gateway fees --- cron.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cron.php b/cron.php index cef7eba6..df7dccdd 100644 --- a/cron.php +++ b/cron.php @@ -488,9 +488,9 @@ if ($config_send_invoice_reminders == 1) { mysqli_query($mysqli, "UPDATE invoices SET invoice_amount = $new_invoice_amount WHERE invoice_id = $invoice_id"); //Insert Items into New Invoice - mysqli_query($mysqli, "INSERT INTO invoice_items SET item_name = 'Late Fee', item_description = '$config_invoice_late_fee_percent% late fee applied on $todays_date', item_quantity = 1, item_price = $late_fee_amount, item_total = $late_fee_amount, item_invoice_id = $invoice_id"); + mysqli_query($mysqli, "INSERT INTO invoice_items SET item_name = 'Late Fee', item_description = '$config_invoice_late_fee_percent% late fee applied on $todays_date', item_quantity = 1, item_price = $late_fee_amount, item_total = $late_fee_amount, item_order = 998, item_invoice_id = $invoice_id"); - mysqli_query($mysqli, "INSERT INTO history SET history_status = 'Sent', history_description = 'Cron applied a late charge', history_invoice_id = $invoice_id"); + mysqli_query($mysqli, "INSERT INTO history SET history_status = 'Sent', history_description = 'Cron applied a late fee of $late_fee_amount', history_invoice_id = $invoice_id"); mysqli_query($mysqli, "INSERT INTO notifications SET notification_type = 'Invoice Late Charge', notification = 'Invoice $invoice_prefix$invoice_number for $client_name in the amount of $invoice_amount was charged a late fee of $late_fee_amount', notification_action = 'invoice.php?invoice_id=$invoice_id', notification_client_id = $client_id, notification_entity_id = $invoice_id");