belongsTo('App\Models\Shipping', 'shipping_id'); } public function setPriceAttribute($value) { $this->attributes['price'] = $value !== null ? Util::reFormatNumber($value) : null; } public function setPriceCompAttribute($value) { $this->attributes['price_comp'] = $value !== null ? Util::reFormatNumber($value) : null; } public function setFactorAttribute($value) { $this->attributes['factor'] = $value !== null ? Util::reFormatNumber($value) : null; } public function setTaxRateAttribute($value) { $this->attributes['tax_rate'] = $value !== null ? Util::reFormatNumber($value) : null; } public function setTotalFromAttribute($value) { $this->attributes['total_from'] = $value !== null ? Util::reFormatNumber($value) : null; } public function setTotalToAttribute($value) { $this->attributes['total_to'] = $value !== null ? Util::reFormatNumber($value) : null; } public function getFormattedPrice() { return isset($this->attributes['price']) ? Util::formatNumber($this->attributes['price']) : ""; } public function getFormattedPriceComp() { return isset($this->attributes['price_comp']) ? Util::formatNumber($this->attributes['price_comp']) : ""; } public function getFormattedTaxRate() { return isset($this->attributes['tax_rate']) ? Util::formatNumber($this->attributes['tax_rate']) : ""; } public function getFormattedFactor() { return isset($this->attributes['factor']) ? Util::formatNumber($this->attributes['factor']) : ""; } public function getFormatTotalFrom() { return isset($this->attributes['total_from']) ? Util::formatNumber($this->attributes['total_from']) : ""; } public function getFormattedTotalTo() { return isset($this->attributes['total_to']) ? Util::formatNumber($this->attributes['total_to']) : ""; } }