fix trigger bug 2

This commit is contained in:
2026-07-22 14:15:22 +03:30
parent 7d02639917
commit 8165fc37b8
6 changed files with 52 additions and 7 deletions
+3 -1
View File
@@ -205,10 +205,12 @@ class ConditionalOrderService
public function expirePendingPastDue(): int
{
$now = now()->timezone(config('app.timezone'))->format('Y-m-d H:i:s');
return ConditionalOrder::query()
->where('status', ConditionalOrder::STATUS_PENDING)
->whereNotNull('expires_at')
->where('expires_at', '<', now())
->where('expires_at', '<', $now)
->update([
'status' => ConditionalOrder::STATUS_EXPIRED,
'is_active' => false,