From 9efbda1d2a7046c428b6da5b92b44aab2b90e811 Mon Sep 17 00:00:00 2001 From: omair saleh Date: Tue, 5 Apr 2022 16:05:58 +0800 Subject: [PATCH] update xpo for nov to feb --- .../ControllersLogic/AutoPurchaseOrderFillLogic.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/app/Classes/Modules/Bookings/ControllersLogic/AutoPurchaseOrderFillLogic.php b/app/Classes/Modules/Bookings/ControllersLogic/AutoPurchaseOrderFillLogic.php index 9068862b..dca678a1 100644 --- a/app/Classes/Modules/Bookings/ControllersLogic/AutoPurchaseOrderFillLogic.php +++ b/app/Classes/Modules/Bookings/ControllersLogic/AutoPurchaseOrderFillLogic.php @@ -65,12 +65,8 @@ class AutoPurchaseOrderFillLogic extends AbstractControllerLogic public function logic(Request $request) : JsonResponse { $bookings = Booking::where(function($query){ - return $query->whereMonth('created_at', 10)->orWhere(function ($query){ - return $query->whereMonth('created_at', 10); - }); - }) - ->whereYear('created_at', 2021) - ->whereDoesntHave('transactions', function($q){ + return $query->whereMonth('created_at', 11)->orWhereMonth('created_at', 12)->orWhereMonth('created_at', 1)->orWhereMonth('created_at', 2); + })->whereDoesntHave('transactions', function($q){ $q->where('type', TransactionType::PURCHASE_ORDER); $q->whereIn('status', [ApprovalStatus::PENDING_VERIFICATION, ApprovalStatus::APPROVED]); })->get();