File Controller, Booking Organisation, import Draft, old arrangements
This commit is contained in:
parent
4eb83def39
commit
8fd1f4d451
289 changed files with 36649 additions and 10877 deletions
|
|
@ -44,34 +44,34 @@ class TravelCompany extends Model
|
|||
protected $connection = 'mysql';
|
||||
|
||||
protected $table = 'travel_company';
|
||||
public $timestamps = false;
|
||||
public $timestamps = false;
|
||||
|
||||
protected $casts = [
|
||||
'percentage' => 'float',
|
||||
'is_allowed_edit_commission' => 'bool',
|
||||
'is_inhouse' => 'bool',
|
||||
protected $casts = [
|
||||
'percentage' => 'float',
|
||||
'is_allowed_edit_commission' => 'bool',
|
||||
'is_inhouse' => 'bool',
|
||||
'active' => 'bool',
|
||||
'contact_emails' => 'array'
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'name',
|
||||
'percentage',
|
||||
'is_allowed_edit_commission',
|
||||
'is_inhouse',
|
||||
protected $fillable = [
|
||||
'name',
|
||||
'percentage',
|
||||
'is_allowed_edit_commission',
|
||||
'is_inhouse',
|
||||
'contact_emails',
|
||||
'active'
|
||||
];
|
||||
|
||||
public function bookings()
|
||||
{
|
||||
return $this->hasMany(Booking::class);
|
||||
}
|
||||
public function bookings()
|
||||
{
|
||||
return $this->hasMany(Booking::class);
|
||||
}
|
||||
|
||||
public function booking_service_items()
|
||||
{
|
||||
return $this->hasMany(BookingServiceItem::class);
|
||||
}
|
||||
public function booking_service_items()
|
||||
{
|
||||
return $this->hasMany(BookingServiceItem::class);
|
||||
}
|
||||
public function travel_company_services()
|
||||
{
|
||||
return $this->hasMany(TravelCompanyService::class, 'travel_company_id', 'id')->orderBy('pos', 'DESC');
|
||||
|
|
@ -84,7 +84,7 @@ class TravelCompany extends Model
|
|||
|
||||
public function getPercentageAttribute()
|
||||
{
|
||||
return Util::_number_format($this->attributes['percentage']);
|
||||
return isset($this->attributes['percentage']) ? Util::_number_format($this->attributes['percentage']) : 0;
|
||||
}
|
||||
|
||||
public function getPercentageRaw()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue