diff --git a/app/Classes/Modules/Exports/Services/ExportsTransactions.php b/app/Classes/Modules/Exports/Services/ExportsTransactions.php index f9bbecaf..5d9f06aa 100644 --- a/app/Classes/Modules/Exports/Services/ExportsTransactions.php +++ b/app/Classes/Modules/Exports/Services/ExportsTransactions.php @@ -58,12 +58,17 @@ class ExportsTransactions implements FromQuery, WithHeadingRow, WithMapping 6 => 'EXPIRED' ]; + $booking = $transaction->type === 1 ? $transaction->owner : $transaction->owner->owner; + + return [ + $booking ? $booking->company->reference : '', + $booking ? $booking->marking : '', $transaction->bill_no, $transaction->owner_id, $transaction->owner_type, $transactionTypes[$transaction->type], - $transaction->issuer, + $transaction->issuerCompany->name, $transaction->reciver, $transaction->currency_id === 1 ? 'MYR' : 'RMB', $transaction->amount,