fix transaction export

This commit is contained in:
omair saleh
2022-05-10 19:00:46 +08:00
parent 2bb93d9743
commit 0da50ebae6
@@ -25,7 +25,7 @@ class ExportsTransactions implements FromQuery, WithHeadingRow, WithMapping
*/
public function query()
{
return Transaction::whereMonth('created_at', 4)->whereIn('type', [TransactionType::PAYMENT, TransactionType::BILL]);
return Transaction::whereIn('type', [TransactionType::PAYMENT, TransactionType::BILL]);
}
/**
@@ -68,6 +68,8 @@ class ExportsTransactions implements FromQuery, WithHeadingRow, WithMapping
$company = $booking->company;
if(!$company instanceof Company) dd($transaction);
return [
$company->reference,
$booking ? $booking->marking : '',