mirror of
https://gitlab.com/uldvstar/exchange-2.0.git
synced 2026-08-19 04:24:16 +00:00
update debtors import
This commit is contained in:
@@ -60,7 +60,9 @@ class ExportsNullDebtors implements FromQuery, WithHeadings, WithHeadingRow, Wit
|
||||
*/
|
||||
public function query()
|
||||
{
|
||||
return Company::where('debtor', '=', null)->where('business_type', BusinessType::IMPORTER)->where('status', ApprovalStatus::APPROVED)->whereHas('transactions', function($query){
|
||||
return Company::where(function($query){
|
||||
$query->whereNull('debtor')->orWhere('debtor', '');
|
||||
})->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]);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user