Merge branch 'release/2019.12-04'
This commit is contained in:
@@ -78,10 +78,10 @@ class IcalService implements SingletonInterface
|
||||
$paxTotal = $event->getPax();
|
||||
$paxAvaiable = $event->getAvailable();
|
||||
|
||||
$percentageBooked = 100;
|
||||
|
||||
if ($paxTotal > 0) {
|
||||
$percentageBooked = 100 - round($paxAvaiable / $paxTotal * 100);
|
||||
} else {
|
||||
$percentageBooked = 100;
|
||||
}
|
||||
|
||||
if ($percentageBooked >= self::THRESHOLD) {
|
||||
@@ -90,8 +90,7 @@ class IcalService implements SingletonInterface
|
||||
}
|
||||
$dateStart = $event->getBegin();
|
||||
} elseif (null !== $dateStart) {
|
||||
$dateEnd = clone $event->getBegin();
|
||||
$dateEnd->modify('-1 day');
|
||||
$dateEnd = $event->getEnd();
|
||||
$this->addCalendarItem($vcalendar, $dateStart, $dateEnd);
|
||||
$dateStart = $dateEnd = null;
|
||||
}
|
||||
@@ -136,12 +135,6 @@ class IcalService implements SingletonInterface
|
||||
*/
|
||||
protected function createCalendarInstance(): Vcalendar
|
||||
{
|
||||
$vcalendar = Vcalendar::factory([ Vcalendar::UNIQUE_ID => 'www.ep-reisen.de' ]);
|
||||
$vcalendar->setXprop(
|
||||
Vcalendar::X_WR_TIMEZONE,
|
||||
'Europe/Berlin'
|
||||
);
|
||||
|
||||
return $vcalendar;
|
||||
return Vcalendar::factory([ Vcalendar::UNIQUE_ID => 'www.ep-reisen.de' ]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user