From bf6fd30dc26b01d30d42ecca705523afeced71c4 Mon Sep 17 00:00:00 2001 From: omair saleh Date: Mon, 31 Oct 2022 16:22:46 +0800 Subject: [PATCH] delete 1688 purchase order for special customers --- routes/web.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/routes/web.php b/routes/web.php index 4302685f..20d8ecc0 100644 --- a/routes/web.php +++ b/routes/web.php @@ -410,12 +410,11 @@ Route::get('/1688/fix/{reference}', function($reference){ Route::get('/po/manual/fix', function(){ - $purchaseOrders = Transaction::where('type', TransactionType::PURCHASE_ORDER)->whereHas('owner', function($query){ - return $query->whereIn('company_id', [199, 510])->whereHas('documents', function($query){ - return $query->where('document_type', DocumentType::ECOMMERCE_PURCHASE_ORDER); - }); - })->first(); - dd($purchaseOrders); + $bookings = Booking::whereIn('company_id', [199, 510])->whereHas('documents', function($query){ + return $query->where('document_type', DocumentType::ECOMMERCE_PURCHASE_ORDER); + }); + + dd($bookings); foreach ($purchaseOrders as $purchaseOrder){ $purchaseOrder->status = ApprovalStatus::PENDING_SUBMISSION; $purchaseOrder->save();