From d9e9c5029aab87c45b602e74efec46f088b703cd Mon Sep 17 00:00:00 2001 From: omair saleh Date: Mon, 3 Jan 2022 18:14:16 +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 d542f7ff..109c6c17 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)->whereIn('status', [\App\Classes\ValueObjects\Constants\ApprovalStatus::APPROVED, \App\Classes\ValueObjects\Constants\ApprovalStatus::COMPLETED])->whereMonth('created_at', 11)->sum('amount'); + $sum += $booking->transactions()->whereMonth('created_at', 11)->where('type', 1)->whereIn('status', [\App\Classes\ValueObjects\Constants\ApprovalStatus::APPROVED, \App\Classes\ValueObjects\Constants\ApprovalStatus::COMPLETED])->sum('amount'); }