From 0ad5836a2f9cac8efec899fc69c7e59793f00b40 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Wed, 31 Jul 2024 07:46:23 +1000 Subject: [PATCH] Adjustments for clean proforma invoices --- app/Jobs/Subscription/CleanStaleInvoiceOrder.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Jobs/Subscription/CleanStaleInvoiceOrder.php b/app/Jobs/Subscription/CleanStaleInvoiceOrder.php index 6cc5a6440a12..ddf7ce404856 100644 --- a/app/Jobs/Subscription/CleanStaleInvoiceOrder.php +++ b/app/Jobs/Subscription/CleanStaleInvoiceOrder.php @@ -78,7 +78,7 @@ class CleanStaleInvoiceOrder implements ShouldQueue Invoice::query() ->withTrashed() ->where('is_proforma', 1) - ->whereBetween('created_at', [now()->subHours(1), now()->subMinutes(10)]) + ->where('created_at', '<', now()->subHour()) ->cursor() ->each(function ($invoice) use ($repo) { $invoice->is_proforma = false;