Merge pull request #1757 from burakcakirel/export-documents
Fix the error when exporting documents
This commit is contained in:
commit
4cc74f040c
@ -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);
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user