From 43afe9ae8ce235f6d151c063693bbd63c8dfb637 Mon Sep 17 00:00:00 2001 From: John Mizerek Date: Tue, 17 Feb 2026 09:41:58 -0800 Subject: [PATCH] Prevent duplicate cash tasks for same order Check for existing active (uncompleted) cash task before creating a new one. Prevents duplicate "Pay With Cash" tasks if order status changes are triggered multiple times. Co-Authored-By: Claude Opus 4.5 --- api/orders/updateStatus.cfm | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/api/orders/updateStatus.cfm b/api/orders/updateStatus.cfm index b33aab4..f0fc933 100644 --- a/api/orders/updateStatus.cfm +++ b/api/orders/updateStatus.cfm @@ -192,19 +192,28 @@ ", [ { value = OrderID, cfsqltype = "cf_sql_integer" } ], { datasource = "payfrit" })> - - + + - - - - - + + + - + + + + + + - + +