From 409fdff0625d93ce6cc956f2a12fb2ebc4a8c558 Mon Sep 17 00:00:00 2001 From: omair saleh Date: Fri, 24 Sep 2021 12:41:01 +0800 Subject: [PATCH] dubug completed bookings with unapproved po's --- routes/web.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/routes/web.php b/routes/web.php index b22abd21..563156b6 100644 --- a/routes/web.php +++ b/routes/web.php @@ -78,11 +78,7 @@ Route::get('/test', function () { $query->where('type', '=', \App\Classes\ValueObjects\Constants\TransactionType::PURCHASE_ORDER)->where('status', '!=', \App\Classes\ValueObjects\Constants\ApprovalStatus::APPROVED); })->get(); - foreach ($bookings as $booking){ - $modal = $booking->transactions()->where('type', '=', \App\Classes\ValueObjects\Constants\TransactionType::PURCHASE_ORDER)->where('status', '!=', \App\Classes\ValueObjects\Constants\ApprovalStatus::APPROVED)->first(); - $modal->status = \App\Classes\ValueObjects\Constants\ApprovalStatus::APPROVED; - $modal->save(); - } +dd($bookings); });