Update Framework, Invoices
This commit is contained in:
parent
cc5c147c27
commit
9b0b5feb7e
174 changed files with 28356 additions and 8093 deletions
|
|
@ -22,7 +22,7 @@ use Illuminate\Database\Eloquent\Model;
|
|||
* @property float $tax_rate
|
||||
* @property int $points
|
||||
* @property float $margin
|
||||
* @property float $ek-price
|
||||
* @property float $ek_price
|
||||
* @property string $slug
|
||||
* @property Carbon $created_at
|
||||
* @property Carbon $updated_at
|
||||
|
|
@ -48,6 +48,8 @@ use Illuminate\Database\Eloquent\Model;
|
|||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\HomepartyUserOrderItem whereTaxRate($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\HomepartyUserOrderItem whereUpdatedAt($value)
|
||||
* @mixin \Eloquent
|
||||
* @property float|null $ek_price_net
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|HomepartyUserOrderItem whereEkPriceNet($value)
|
||||
*/
|
||||
class HomepartyUserOrderItem extends Model
|
||||
{
|
||||
|
|
@ -63,8 +65,8 @@ class HomepartyUserOrderItem extends Model
|
|||
'tax_rate' => 'float',
|
||||
'points' => 'int',
|
||||
'margin' => 'float',
|
||||
'ek-price' => 'float',
|
||||
'ek-price_net' => 'float'
|
||||
'ek_price' => 'float',
|
||||
'ek_price_net' => 'float'
|
||||
|
||||
];
|
||||
|
||||
|
|
@ -78,8 +80,8 @@ class HomepartyUserOrderItem extends Model
|
|||
'tax_rate',
|
||||
'points',
|
||||
'margin',
|
||||
'ek-price',
|
||||
'ek-price_net',
|
||||
'ek_price',
|
||||
'ek_price_net',
|
||||
'slug'
|
||||
];
|
||||
|
||||
|
|
@ -120,32 +122,32 @@ class HomepartyUserOrderItem extends Model
|
|||
|
||||
public function getFormattedEKPrice()
|
||||
{
|
||||
return formatNumber($this->attributes['ek-price']);
|
||||
return formatNumber($this->attributes['ek_price']);
|
||||
}
|
||||
|
||||
public function getFormattedTotalEKPrice()
|
||||
{
|
||||
return formatNumber($this->attributes['ek-price'] * $this->attributes['qty']);
|
||||
return formatNumber($this->attributes['ek_price'] * $this->attributes['qty']);
|
||||
}
|
||||
|
||||
public function getFormattedEKPriceNet()
|
||||
{
|
||||
return formatNumber($this->attributes['ek-price_net']);
|
||||
return formatNumber($this->attributes['ek_price_net']);
|
||||
}
|
||||
|
||||
public function getFormattedTotalEKPriceNet()
|
||||
{
|
||||
return formatNumber($this->attributes['ek-price_net'] * $this->attributes['qty']);
|
||||
return formatNumber($this->attributes['ek_price_net'] * $this->attributes['qty']);
|
||||
}
|
||||
|
||||
public function getFormattedIncomePrice()
|
||||
{
|
||||
return formatNumber($this->attributes['price'] - $this->attributes['ek-price']);
|
||||
return formatNumber($this->attributes['price'] - $this->attributes['ek_price']);
|
||||
}
|
||||
|
||||
public function getFormattedTotalIncomePrice()
|
||||
{
|
||||
return formatNumber(($this->attributes['price'] - $this->attributes['ek-price']) * $this->attributes['qty']);
|
||||
return formatNumber(($this->attributes['price'] - $this->attributes['ek_price']) * $this->attributes['qty']);
|
||||
}
|
||||
|
||||
public function getFormattedTotalPoints()
|
||||
|
|
@ -171,22 +173,22 @@ class HomepartyUserOrderItem extends Model
|
|||
|
||||
public function geTotalEKPrice()
|
||||
{
|
||||
return (float) ($this->attributes['ek-price'] * $this->attributes['qty']);
|
||||
return (float) ($this->attributes['ek_price'] * $this->attributes['qty']);
|
||||
}
|
||||
|
||||
public function geTotalEKPriceNet()
|
||||
{
|
||||
return (float) ($this->attributes['ek-price_net'] * $this->attributes['qty']);
|
||||
return (float) ($this->attributes['ek_price_net'] * $this->attributes['qty']);
|
||||
}
|
||||
|
||||
public function getIncomePrice()
|
||||
{
|
||||
return (float) ($this->attributes['price'] - $this->attributes['ek-price']);
|
||||
return (float) ($this->attributes['price'] - $this->attributes['ek-ek_price']);
|
||||
}
|
||||
|
||||
public function geTotalIncomePrice()
|
||||
{
|
||||
return (float) (($this->attributes['price'] - $this->attributes['ek-price']) * $this->attributes['qty']);
|
||||
return (float) (($this->attributes['price'] - $this->attributes['ek_price']) * $this->attributes['qty']);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue