From 458c4392ceaf6ae8324ec74e45527004a6b735ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Burak=20=C3=87ak=C4=B1rel?= Date: Thu, 14 Jan 2021 01:15:26 +0300 Subject: [PATCH] Fix the error when exporting documents --- app/Exports/Purchases/Sheets/BillTransactions.php | 2 +- app/Exports/Sales/Sheets/InvoiceTransactions.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Exports/Purchases/Sheets/BillTransactions.php b/app/Exports/Purchases/Sheets/BillTransactions.php index 54be9dbe3..d295a1e10 100644 --- a/app/Exports/Purchases/Sheets/BillTransactions.php +++ b/app/Exports/Purchases/Sheets/BillTransactions.php @@ -11,7 +11,7 @@ class BillTransactions extends Export implements WithColumnFormatting { public function collection() { - $model = Model::with('account', 'category', 'contact', 'document')->bill()->isDocument()->usingSearchString(request('search')); + $model = Model::with('account', 'category', 'contact', 'document')->expense()->isDocument()->usingSearchString(request('search')); if (!empty($this->ids)) { $model->whereIn('document_id', (array) $this->ids); diff --git a/app/Exports/Sales/Sheets/InvoiceTransactions.php b/app/Exports/Sales/Sheets/InvoiceTransactions.php index dff86c8be..b5aceb1d4 100644 --- a/app/Exports/Sales/Sheets/InvoiceTransactions.php +++ b/app/Exports/Sales/Sheets/InvoiceTransactions.php @@ -13,7 +13,7 @@ class InvoiceTransactions extends Export implements WithColumnFormatting { public function collection() { - $model = Model::with('account', 'category', 'contact', 'document')->invoice()->isDocument()->usingSearchString(request('search')); + $model = Model::with('account', 'category', 'contact', 'document')->income()->isDocument()->usingSearchString(request('search')); if (!empty($this->ids)) { $model->whereIn('document_id', (array) $this->ids);