Fix not showing bills' transactions

This commit is contained in:
Burak Çakırel 2021-01-14 00:58:16 +03:00
parent 6822763d3c
commit 273b73cf73
No known key found for this signature in database
GPG Key ID: 48FFBB7771B99C7C

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()