diff --git a/trunk/app/Resources/views/default/pages/cms/fewoTravelProgram.html.twig b/trunk/app/Resources/views/default/pages/cms/fewoTravelProgram.html.twig
index 91cfab50..cedff618 100644
--- a/trunk/app/Resources/views/default/pages/cms/fewoTravelProgram.html.twig
+++ b/trunk/app/Resources/views/default/pages/cms/fewoTravelProgram.html.twig
@@ -177,6 +177,7 @@
{% for price in fewo_lodging.prices %}
+ {% if price.season is not empty %}
|
@@ -204,6 +205,7 @@
{% endif %}
|
+ {% endif %}
{% endfor %}
diff --git a/trunk/src/AppBundle/Entity/FewoLodging.php b/trunk/src/AppBundle/Entity/FewoLodging.php
index a5afadfd..eb55275c 100644
--- a/trunk/src/AppBundle/Entity/FewoLodging.php
+++ b/trunk/src/AppBundle/Entity/FewoLodging.php
@@ -531,6 +531,7 @@ class FewoLodging
{
return $this->getPrices()->filter(function(FewoPrice $price) use ($dateFrom, $dateTo) {
+ if(!empty($price->getSeason()))
return ($price->getSeason()->getFromDate() >= $dateFrom && $price->getSeason()->getFromDate() <= $dateTo) ||
($price->getSeason()->getToDate() >= $dateFrom && $price->getSeason()->getToDate() <= $dateTo);
});
@@ -614,7 +615,7 @@ class FewoLodging
public function getReservationsFilter($dateFrom, $dateTo)
{
return $this->getReservations()->filter(function(FewoReservation $reservation) use ($dateFrom, $dateTo) {
- return ($reservation->getFromDate() >= $dateFrom && $reservation->getFromDate() <= $dateTo) ||
+ return ($reservation->getFromDate() >= $dateFrom && $reservation->getFromDate() <= $dateTo) ||
($reservation->getToDate() >= $dateFrom && $reservation->getToDate() <= $dateTo);
});
}
diff --git a/trunk/src/AppBundle/Service/LodgingCalendarService.php b/trunk/src/AppBundle/Service/LodgingCalendarService.php
index e8a8be51..e83f55a3 100644
--- a/trunk/src/AppBundle/Service/LodgingCalendarService.php
+++ b/trunk/src/AppBundle/Service/LodgingCalendarService.php
@@ -780,20 +780,23 @@ class LodgingCalendarService
$checkDay = $paddedCalendar[$mSdt->format("Y-n")]['data'][$key];
- if(!empty($checkDay->getPrice()->getSeason()) && $minDays != $checkDay->getPrice()->getSeason()->getMinimumStay()){
- if($minDays > $checkDay->getPrice()->getSeason()->getMinimumStay()){
- $last = $counter+$checkDay->getPrice()->getSeason()->getMinimumStay();
+ if(!empty($checkDay->getPrice())){
+ if(!empty($checkDay->getPrice()->getSeason()) && $minDays != $checkDay->getPrice()->getSeason()->getMinimumStay()){
+
+ if($minDays > $checkDay->getPrice()->getSeason()->getMinimumStay()){
+ $last = $counter+$checkDay->getPrice()->getSeason()->getMinimumStay();
- $setMinStayTo->modify('-'.($last).' days');
+ $setMinStayTo->modify('-'.($last).' days');
+ }
+ if($minDays < $checkDay->getPrice()->getSeason()->getMinimumStay()){
+ $last = $counter+$checkDay->getPrice()->getSeason()->getMinimumStay();
+ $setMinStayTo->modify('-'.($last).' days');
+
+ }
+ $minDays = $checkDay->getPrice()->getSeason()->getMinimumStay();
}
- if($minDays < $checkDay->getPrice()->getSeason()->getMinimumStay()){
- $last = $counter+$checkDay->getPrice()->getSeason()->getMinimumStay();
- $setMinStayTo->modify('-'.($last).' days');
-
- }
- $minDays = $checkDay->getPrice()->getSeason()->getMinimumStay();
}
$counter++;