Booking edit v3
This commit is contained in:
parent
6706d28f51
commit
6880c7e989
20 changed files with 691 additions and 97 deletions
|
|
@ -97,6 +97,23 @@ class ServiceProviderEntry extends Model
|
|||
}
|
||||
}
|
||||
|
||||
public function setFactorAttribute($value)
|
||||
{
|
||||
$this->attributes['factor'] = floatval(preg_replace("/[^0-9.-]/", "", str_replace(',', '.', $value)));
|
||||
}
|
||||
public function getFactorAttribute()
|
||||
{
|
||||
return Util::_number_format($this->attributes['factor'], 4);
|
||||
}
|
||||
public function getFactortRaw()
|
||||
{
|
||||
return $this->attributes['factor'];
|
||||
}
|
||||
|
||||
public function setAmountAttribute($value)
|
||||
{
|
||||
$this->attributes['amount'] = Util::_clean_float($value);
|
||||
}
|
||||
public function getAmountAttribute()
|
||||
{
|
||||
return Util::_number_format($this->attributes['amount']);
|
||||
|
|
@ -105,7 +122,10 @@ class ServiceProviderEntry extends Model
|
|||
{
|
||||
return $this->attributes['amount'];
|
||||
}
|
||||
|
||||
public function setAmountEurAttribute($value)
|
||||
{
|
||||
$this->attributes['amount_eur'] = Util::_clean_float($value);
|
||||
}
|
||||
public function getAmountEurAttribute()
|
||||
{
|
||||
return Util::_number_format($this->attributes['amount_eur']);
|
||||
|
|
@ -135,4 +155,5 @@ class ServiceProviderEntry extends Model
|
|||
if(!$this->attributes['payment_date']){ return ""; }
|
||||
return Carbon::parse($this->attributes['payment_date'])->format(\Util::formatDateDB());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue