From ac0b6b9e876ace728405286d1238405b15d97873 Mon Sep 17 00:00:00 2001 From: omair saleh Date: Wed, 6 Apr 2022 11:55:31 +0800 Subject: [PATCH] fix debtors import --- app/Classes/Modules/Exports/Services/ExportsNullDebtors.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Classes/Modules/Exports/Services/ExportsNullDebtors.php b/app/Classes/Modules/Exports/Services/ExportsNullDebtors.php index 103797ed..223023ef 100644 --- a/app/Classes/Modules/Exports/Services/ExportsNullDebtors.php +++ b/app/Classes/Modules/Exports/Services/ExportsNullDebtors.php @@ -62,7 +62,7 @@ class ExportsNullDebtors implements FromQuery, WithHeadings, WithHeadingRow, Wit { return Company::where(function($query){ $query->whereNull('debtor')->orWhere('debtor', ''); - })->where('business_type', BusinessType::IMPORTER)->where('status', ApprovalStatus::APPROVED)->whereHas('transactions', function($query){ + })->whereNotIn('id', [2207, 2248, 2029])->where('business_type', BusinessType::IMPORTER)->where('status', ApprovalStatus::APPROVED)->whereHas('transactions', function($query){ return $query->whereIn('type', [TransactionType::PAYMENT, TransactionType::TOP_UP])->whereIn('transactions.status', [ApprovalStatus::APPROVED, ApprovalStatus::COMPLETED, ApprovalStatus::PENDING_VERIFICATION]); }); }