FeWo Mail, Booking Services
This commit is contained in:
parent
730832c8e1
commit
e6cc042aee
62 changed files with 1766 additions and 284 deletions
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
namespace App\Models;
|
||||
|
||||
use App\Services\Util;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
|
|
@ -96,19 +97,38 @@ class ServiceProviderEntry extends Model
|
|||
}
|
||||
}
|
||||
|
||||
public function getAmountAttribute()
|
||||
{
|
||||
return Util::_number_format($this->attributes['amount']);
|
||||
}
|
||||
public function getAmountRaw()
|
||||
{
|
||||
return $this->attributes['amount'];
|
||||
}
|
||||
|
||||
public function getAmountEurAttribute()
|
||||
{
|
||||
return Util::_number_format($this->attributes['amount_eur']);
|
||||
}
|
||||
public function getAmountEurRaw()
|
||||
{
|
||||
return $this->attributes['amount_eur'];
|
||||
}
|
||||
|
||||
|
||||
public function getAmountFinalEur(){
|
||||
$ret = $this->amount;
|
||||
if($this->amount_eur && $this->amount_eur > 0){
|
||||
$ret = $this->amount_eur;
|
||||
$ret = $this->attributes['amount'];
|
||||
if($this->attributes['amount_eur'] && $this->attributes['amount_eur'] > 0){
|
||||
$ret = $this->attributes['amount_eur'];
|
||||
}
|
||||
return number_format($ret, 2, ',', '.');
|
||||
}
|
||||
|
||||
public function getAmountFinalEurRaw(){
|
||||
if($this->amount_eur && $this->amount_eur > 0){
|
||||
return $this->amount_eur;
|
||||
if($this->attributes['amount_eur'] && $this->attributes['amount_eur'] > 0){
|
||||
return $this->attributes['amount_eur'];
|
||||
}
|
||||
return $this->amount;
|
||||
return $this->attributes['amount'];
|
||||
}
|
||||
|
||||
public function getPaymentDateFormat(){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue