export based on payment date

This commit is contained in:
Omair Saleh
2024-07-01 13:46:12 +08:00
parent ffa63f611b
commit 13f13c7a0e
@@ -31,6 +31,7 @@ class ExportsPaymentTransactions implements FromQuery, WithHeadings, WithHeading
return [
'DocNo',
'DocDate',
'PaymentDate',
'DebtorCode',
'Ref',
'ShipInfo',
@@ -142,6 +143,7 @@ class ExportsPaymentTransactions implements FromQuery, WithHeadings, WithHeading
// Prepare each row based on the transaction detail
$rows[] = [
$firstItem ? '<<New>>' : '',
$transaction->created_at->format('m/d/Y H:m'),
$transaction->transactions()->where('type', TransactionType::PAYMENT)->first()->updated_at->format('m/d/Y H:m'),
$company->debtor,
$order->reference,