FeWo Mail, Booking Services

This commit is contained in:
Kevin Adametz 2020-07-09 12:36:15 +02:00
parent 730832c8e1
commit e6cc042aee
62 changed files with 1766 additions and 284 deletions

View file

@ -29,6 +29,8 @@ use Illuminate\Database\Eloquent\Model;
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BookingCountryService whereTravelCountryServiceId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BookingCountryService whereUpdatedAt($value)
* @mixin \Eloquent
* @property int|null $status
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BookingCountryService whereStatus($value)
*/
class BookingCountryService extends Model
{
@ -64,11 +66,11 @@ class BookingCountryService extends Model
}
public static function getStatus($travel_country_service_id, $booking_id){
$booking_country_service = BookingCountryService::where('travel_country_service_id', '=', $travel_country_service_id)
$service = BookingCountryService::where('travel_country_service_id', '=', $travel_country_service_id)
->where('booking_id', '=', $booking_id)->first();
if($booking_country_service){
return $booking_country_service->status;
if($service){
return $service->status;
}
return 0;
}