From 273b73cf73db3cd49b2930d4265a875a46494389 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Burak=20=C3=87ak=C4=B1rel?= Date: Thu, 14 Jan 2021 00:58:16 +0300 Subject: [PATCH] Fix not showing bills' transactions --- app/Models/Document/Document.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Models/Document/Document.php b/app/Models/Document/Document.php index e56806cad..e2378487b 100644 --- a/app/Models/Document/Document.php +++ b/app/Models/Document/Document.php @@ -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()