Categories, Netto Homeparty
This commit is contained in:
parent
7d1ee844eb
commit
351a8f763c
13 changed files with 144 additions and 64 deletions
|
|
@ -63,7 +63,9 @@ class HomepartyUserOrderItem extends Model
|
|||
'tax_rate' => 'float',
|
||||
'points' => 'int',
|
||||
'margin' => 'float',
|
||||
'ek-price' => 'float'
|
||||
'ek-price' => 'float',
|
||||
'ek-price_net' => 'float'
|
||||
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
|
|
@ -77,6 +79,7 @@ class HomepartyUserOrderItem extends Model
|
|||
'points',
|
||||
'margin',
|
||||
'ek-price',
|
||||
'ek-price_net',
|
||||
'slug'
|
||||
];
|
||||
|
||||
|
|
@ -125,6 +128,16 @@ class HomepartyUserOrderItem extends Model
|
|||
return formatNumber($this->attributes['ek-price'] * $this->attributes['qty']);
|
||||
}
|
||||
|
||||
public function getFormattedEKPriceNet()
|
||||
{
|
||||
return formatNumber($this->attributes['ek-price_net']);
|
||||
}
|
||||
|
||||
public function getFormattedTotalEKPriceNet()
|
||||
{
|
||||
return formatNumber($this->attributes['ek-price_net'] * $this->attributes['qty']);
|
||||
}
|
||||
|
||||
public function getFormattedIncomePrice()
|
||||
{
|
||||
return formatNumber($this->attributes['price'] - $this->attributes['ek-price']);
|
||||
|
|
@ -161,6 +174,11 @@ class HomepartyUserOrderItem extends Model
|
|||
return (float) ($this->attributes['ek-price'] * $this->attributes['qty']);
|
||||
}
|
||||
|
||||
public function geTotalEKPriceNet()
|
||||
{
|
||||
return (float) ($this->attributes['ek-price_net'] * $this->attributes['qty']);
|
||||
}
|
||||
|
||||
public function getIncomePrice()
|
||||
{
|
||||
return (float) ($this->attributes['price'] - $this->attributes['ek-price']);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue