Merge pull request #1756 from burakcakirel/transactions-for-bills

Fix not showing bills' transactions
This commit is contained in:
Cüneyt Şentürk 2021-01-14 01:13:28 +03:00 committed by GitHub
commit 2917286814
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -131,7 +131,8 @@ class Document extends Model
public function transactions()
{
return $this->hasMany('App\Models\Banking\Transaction', 'document_id')->where('type', 'income');
return $this->hasMany('App\Models\Banking\Transaction', 'document_id')
->where('type', config('type.' . $this->type . '.transaction_type'));
}
public function totals_sorted()