add User, Mail verify, rights, Change Mail, fewo invoice PDF
This commit is contained in:
parent
26ecb09cdc
commit
7abfe3f700
44 changed files with 3041 additions and 1125 deletions
|
|
@ -326,4 +326,53 @@ class TravelUserBookingFewo extends Model
|
|||
return isset($this->attributes['price_total']) ? $this->attributes['price_total'] : 0;
|
||||
}
|
||||
|
||||
public function getBookingDateYear(){
|
||||
return Carbon::parse($this->booking_date)->format('Y');
|
||||
}
|
||||
|
||||
public function getPriceTotalFirstPay(){
|
||||
if($this->attributes['price_total'] == 0){
|
||||
return 0;
|
||||
}
|
||||
$first_pay = $this->attributes['price_total']/2;
|
||||
return number_format(($first_pay), 2, ',', '.');
|
||||
}
|
||||
public function getPriceTotalSecondPay(){
|
||||
if($this->attributes['price_total'] == 0){
|
||||
return 0;
|
||||
}
|
||||
$first_pay = $this->attributes['price_total']/2;
|
||||
return number_format(($this->attributes['price_total'] - $first_pay), 2, ',', '.');
|
||||
}
|
||||
public function getPriceTravelFirstPay(){
|
||||
if($this->attributes['price_travel'] == 0){
|
||||
return 0;
|
||||
}
|
||||
$first_pay = $this->attributes['price_travel']/2;
|
||||
return number_format(($first_pay), 2, ',', '.');
|
||||
}
|
||||
public function getPriceTravelSecondPay(){
|
||||
if($this->attributes['price_travel'] == 0){
|
||||
return 0;
|
||||
}
|
||||
$first_pay = $this->attributes['price_travel']/2;
|
||||
return number_format(($this->attributes['price_travel'] - $first_pay + $this->attributes['price_deposit']), 2, ',', '.');
|
||||
}
|
||||
public function getBookingUserAddress(){
|
||||
if($this->travel_user){
|
||||
$company = $this->travel_user->company ? $this->travel_user->company ."\n" : "";
|
||||
$title = $this->travel_user->title ? $this->travel_user->title."\n" : "";
|
||||
$nationality = $this->travel_user->travel_nationality_id ? "\n".$this->travel_user->travel_nationality->name : "";
|
||||
return $company.$title.$this->travel_user->first_name." ".$this->travel_user->last_name."\n".$this->travel_user->street."\n".$this->travel_user->zip_code." ".$this->travel_user->city.$nationality;
|
||||
}
|
||||
return "";
|
||||
}
|
||||
public function getNameAddressLocation(){
|
||||
if($this->fewo_lodging){
|
||||
return $this->fewo_lodging->name."\n".$this->fewo_lodging->adress1." ".$this->fewo_lodging->adress2.", ".$this->fewo_lodging->zip_code." ".$this->fewo_lodging->city;
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ class UserUpdateEmail extends Model
|
|||
{
|
||||
protected $connection = 'mysql';
|
||||
|
||||
protected $table = 'users_update_email';
|
||||
protected $table = 'user_update_emails';
|
||||
|
||||
protected $fillable = [
|
||||
'user_id', 'email', 'token',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue