changed export document transaction model scope

This commit is contained in:
Cüneyt Şentürk 2020-12-24 11:31:41 +03:00
parent f07aa0b467
commit 625ee4bf65

View File

@ -13,7 +13,7 @@ class DocumentTransactions extends Export implements WithColumnFormatting
{
public function collection()
{
$model = Model::with('account', 'category', 'contact', 'document')->income()->isDocument()->usingSearchString(request('search'));
$model = Model::with('account', 'category', 'contact', 'document')->{$this->type}()->isDocument()->usingSearchString(request('search'));
if (!empty($this->ids)) {
$model->whereIn('document_id', (array) $this->ids);