diff --git a/app/Classes/General/Eloquent/Filters/DateRange.php b/app/Classes/General/Eloquent/Filters/DateRange.php index d55709b4..798b2d4d 100644 --- a/app/Classes/General/Eloquent/Filters/DateRange.php +++ b/app/Classes/General/Eloquent/Filters/DateRange.php @@ -61,8 +61,13 @@ class DateRange implements Filter ApprovalStatus::SUSPENDED, ]) ->where(function ($q) use ($startDate, $endDate) { + $q->where(function ($q) { + $q->whereDoesntHave('company', function ($query) { + $query->where('debtor', 'N/A NO NEED TO IMPORT'); + }); + }) // Bookings without refunds - $q->where(function ($q1) use ($startDate, $endDate) { + ->where(function ($q1) use ($startDate, $endDate) { $q1->where('status', ApprovalStatus::COMPLETED) ->whereHas('transactions', function ($query) use ($startDate, $endDate){ $query->payments() diff --git a/app/Classes/General/Eloquent/Filters/DateRangeNoData.php b/app/Classes/General/Eloquent/Filters/DateRangeNoData.php index e0d730e5..9c2fc6eb 100644 --- a/app/Classes/General/Eloquent/Filters/DateRangeNoData.php +++ b/app/Classes/General/Eloquent/Filters/DateRangeNoData.php @@ -77,8 +77,13 @@ class DateRangeNoData implements Filter ApprovalStatus::SUSPENDED, ]) ->where(function ($q) use ($startDate, $endDate) { + $q->where(function ($q) { + $q->whereDoesntHave('company', function ($query) { + $query->where('debtor', 'N/A NO NEED TO IMPORT'); + }); + }) // Bookings without refunds - $q->where(function ($q1) use ($startDate, $endDate) { + ->where(function ($q1) use ($startDate, $endDate) { $q1->where('status', ApprovalStatus::COMPLETED) ->whereHas('transactions', function ($query) use ($startDate, $endDate){ $query->payments() diff --git a/app/Classes/General/Eloquent/Filters/DateRangeWithData.php b/app/Classes/General/Eloquent/Filters/DateRangeWithData.php index 61c5f437..fa2e5161 100644 --- a/app/Classes/General/Eloquent/Filters/DateRangeWithData.php +++ b/app/Classes/General/Eloquent/Filters/DateRangeWithData.php @@ -78,8 +78,13 @@ class DateRangeWithData implements Filter ApprovalStatus::SUSPENDED, ]) ->where(function ($q) use ($startDate, $endDate) { + $q->where(function ($q) { + $q->whereDoesntHave('company', function ($query) { + $query->where('debtor', 'N/A NO NEED TO IMPORT'); + }); + }) // Bookings without refunds - $q->where(function ($q1) use ($startDate, $endDate) { + ->where(function ($q1) use ($startDate, $endDate) { $q1->where('status', ApprovalStatus::COMPLETED) ->whereHas('transactions', function ($query) use ($startDate, $endDate){ $query->payments()