belongsTo('App\Models\ShoppingOrder','shopping_order_id'); } public function product() { return $this->belongsTo('App\Models\Product','product_id'); } public function getFormattedPrice() { return formatNumber($this->attributes['price']); } public function getFormattedTotalPrice() { return formatNumber($this->attributes['price'] * $this->attributes['qty']); } public function getFormattedPriceNet() { return formatNumber($this->attributes['price_net']); } public function getFormattedTotalPriceNet() { return formatNumber($this->attributes['price_net'] * $this->attributes['qty']); } }