From 22b4cf2f14202bbda8da37c0b16faf44b2ca74b1 Mon Sep 17 00:00:00 2001 From: omair saleh Date: Mon, 3 Jan 2022 14:39:41 +0800 Subject: [PATCH] 1688 data --- routes/web.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routes/web.php b/routes/web.php index 0fca35d1..e412f1c0 100644 --- a/routes/web.php +++ b/routes/web.php @@ -97,7 +97,7 @@ Route::get('/1688', function (Request $request) { $sum = 0; foreach ($bookings as $booking){ - $sum += $booking->transactions()->where('type', 1)->sum('amount'); + $sum += $booking->transactions()->where('type', 1)->whereIn('status', [\App\Classes\ValueObjects\Constants\ApprovalStatus::APPROVED, \App\Classes\ValueObjects\Constants\ApprovalStatus::COMPLETED])->sum('amount'); } dd($sum);