diff --git a/app/Models/Purchase/BillItemTax.php b/app/Models/Purchase/BillItemTax.php index 06818f97c..3e6d62073 100644 --- a/app/Models/Purchase/BillItemTax.php +++ b/app/Models/Purchase/BillItemTax.php @@ -26,12 +26,12 @@ class BillItemTax extends Model public function item() { - return $this->belongsToThrough('App\Models\Common\Item', 'App\Models\Purchase\BillItem', 'bill_item_id'); + return $this->belongsToThrough('App\Models\Common\Item', 'App\Models\Purchase\BillItem', 'bill_item_id')->withDefault(['name' => trans('general.na')]); } public function tax() { - return $this->belongsTo('App\Models\Setting\Tax')->withDefault(['name' => trans('general.na')]); + return $this->belongsTo('App\Models\Setting\Tax')->withDefault(['name' => trans('general.na'), 'rate' => 0]); } /** diff --git a/app/Models/Sale/InvoiceItemTax.php b/app/Models/Sale/InvoiceItemTax.php index b11af4539..5a78040d2 100644 --- a/app/Models/Sale/InvoiceItemTax.php +++ b/app/Models/Sale/InvoiceItemTax.php @@ -31,7 +31,7 @@ class InvoiceItemTax extends Model public function tax() { - return $this->belongsTo('App\Models\Setting\Tax')->withDefault(['name' => trans('general.na')]); + return $this->belongsTo('App\Models\Setting\Tax')->withDefault(['name' => trans('general.na'), 'rate' => 0]); } /**