Update payment report export

This commit is contained in:
David Bomba 2023-04-24 13:04:52 +10:00
parent 6a38b7a14a
commit 4840207b3b

View File

@ -49,6 +49,7 @@ class PaymentExport extends BaseExport
'transaction_reference' => 'transaction_reference',
'type' => 'type_id',
'vendor' => 'vendor_id',
'invoices' => 'invoices',
];
private array $decorate_keys = [
@ -59,6 +60,7 @@ class PaymentExport extends BaseExport
'currency',
'exchange_currency',
'type',
'invoices',
];
public function __construct(Company $company, array $input)
@ -154,6 +156,8 @@ class PaymentExport extends BaseExport
$entity['gateway'] = $payment->gateway_type ? $payment->gateway_type->name : 'Unknown Type';
}
$entity['invoices'] = $payment->invoices()->exists() ? $payment->invoices->pluck('number')->implode(',') : '';
return $entity;
}
}