Custom Price / Land / User Order Homeparty

This commit is contained in:
Kevin Adametz 2021-08-20 18:22:21 +02:00
parent d46824a4ac
commit 51d81d8ec6
55 changed files with 1951 additions and 681 deletions

View file

@ -58,32 +58,32 @@ class ShippingPrice extends Model
public function setPriceAttribute($value)
{
$this->attributes['price'] = $value ? Util::reFormatNumber($value) : null;
$this->attributes['price'] = $value !== null ? Util::reFormatNumber($value) : null;
}
public function setPriceCompAttribute($value)
{
$this->attributes['price_comp'] = $value ? Util::reFormatNumber($value) : null;
$this->attributes['price_comp'] = $value !== null ? Util::reFormatNumber($value) : null;
}
public function setFactorAttribute($value)
{
$this->attributes['factor'] = $value ? Util::reFormatNumber($value) : null;
$this->attributes['factor'] = $value !== null ? Util::reFormatNumber($value) : null;
}
public function setTaxRateAttribute($value)
{
$this->attributes['tax_rate'] = $value ? Util::reFormatNumber($value) : null;
$this->attributes['tax_rate'] = $value !== null ? Util::reFormatNumber($value) : null;
}
public function setTotalFromAttribute($value)
{
$this->attributes['total_from'] = $value ? Util::reFormatNumber($value) : null;
$this->attributes['total_from'] = $value !== null ? Util::reFormatNumber($value) : null;
}
public function setTotalToAttribute($value)
{
$this->attributes['total_to'] = $value ? Util::reFormatNumber($value) : null;
$this->attributes['total_to'] = $value !== null ? Util::reFormatNumber($value) : null;
}
public function getFormattedPrice()