mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 04:23:55 +00:00
fix transaction export
This commit is contained in:
@@ -61,15 +61,24 @@ class ExportsTransactions implements FromQuery, WithHeadingRow, WithMapping
|
||||
];
|
||||
|
||||
|
||||
$booking = $transaction->owner->owner;
|
||||
if(!($transaction->owner instanceof Booking)){
|
||||
if(!($transaction->owner->owner instanceof Booking)){
|
||||
dump($transaction->owner);
|
||||
$booking = $transaction->owner;
|
||||
$company = $booking->owner;
|
||||
|
||||
if(!($booking instanceof Booking)){
|
||||
$booking = $transaction->owner->owner;
|
||||
|
||||
|
||||
if($booking instanceof Company){
|
||||
$company = $booking;
|
||||
$booking = null;
|
||||
} else {
|
||||
$company = $booking->owner;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return [
|
||||
$booking ? $booking->company->reference : '',
|
||||
$company->reference,
|
||||
$booking ? $booking->marking : '',
|
||||
$transaction->bill_no,
|
||||
$transaction->owner_id,
|
||||
|
||||
Reference in New Issue
Block a user