fixed table name

This commit is contained in:
Denis Duliçi 2022-06-10 21:03:51 +03:00
parent 69a1c309f0
commit 8f4654b205

View File

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