Homparty v1.0

This commit is contained in:
Kevin Adametz 2020-12-17 23:02:22 +01:00
parent ac0d5b781e
commit c73299e52e
40 changed files with 1234 additions and 908 deletions

View file

@ -57,6 +57,7 @@ class ShoppingOrderItem extends Model
'shopping_order_id',
'row_id',
'product_id',
'homeparty_id',
'comp',
'qty',
'price',
@ -76,6 +77,11 @@ class ShoppingOrderItem extends Model
return $this->belongsTo('App\Models\Product','product_id');
}
public function homeparty()
{
return $this->belongsTo('App\Models\Homeparty','homeparty_id');
}
public function getFormattedPrice()
{
return formatNumber($this->attributes['price']);