From 8f4654b205a7b4a253b1594feebebb06f1135df7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Denis=20Duli=C3=A7i?= Date: Fri, 10 Jun 2022 21:03:51 +0300 Subject: [PATCH] fixed table name --- app/Models/Setting/Tax.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Models/Setting/Tax.php b/app/Models/Setting/Tax.php index f20299ad3..c30920015 100644 --- a/app/Models/Setting/Tax.php +++ b/app/Models/Setting/Tax.php @@ -55,12 +55,12 @@ class Tax extends Model public function bill_items() { - return $this->document_items()->where('documents.type', Document::BILL_TYPE); + return $this->document_items()->where('document_item_taxes.type', Document::BILL_TYPE); } public function invoice_items() { - return $this->document_items()->where('documents.type', Document::INVOICE_TYPE); + return $this->document_items()->where('document_item_taxes.type', Document::INVOICE_TYPE); } public function scopeName($query, $name)