From 9f9e43ee1fc840509ee6a84168f3e7f819deff9b Mon Sep 17 00:00:00 2001 From: johnnyq Date: Sun, 17 Jul 2022 16:43:55 -0400 Subject: [PATCH] Fixed Force Recurring Invoice , before WHERE in query --- post.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/post.php b/post.php index 1a79ec3e..7351d878 100644 --- a/post.php +++ b/post.php @@ -7279,7 +7279,7 @@ if(isset($_GET['force_recurring'])){ $row = mysqli_fetch_array($sql_recurring_total); $new_recurring_amount = $row['recurring_total']; - mysqli_query($mysqli,"UPDATE recurring SET recurring_amount = '$new_recurring_amount', recurring_last_sent = CURDATE(), recurring_next_date = DATE_ADD(CURDATE(), INTERVAL 1 $recurring_frequency), WHERE recurring_id = $recurring_id"); + mysqli_query($mysqli,"UPDATE recurring SET recurring_amount = '$new_recurring_amount', recurring_last_sent = CURDATE(), recurring_next_date = DATE_ADD(CURDATE(), INTERVAL 1 $recurring_frequency) WHERE recurring_id = $recurring_id"); //Also update the newly created invoice with the new amounts mysqli_query($mysqli,"UPDATE invoices SET invoice_amount = '$new_recurring_amount' WHERE invoice_id = $new_invoice_id");