diff --git a/trunk/app/Resources/views/default/pages/cms/travelProgram.html.twig b/trunk/app/Resources/views/default/pages/cms/travelProgram.html.twig index 288ecfc4..aec631d6 100644 --- a/trunk/app/Resources/views/default/pages/cms/travelProgram.html.twig +++ b/trunk/app/Resources/views/default/pages/cms/travelProgram.html.twig @@ -238,7 +238,7 @@ {% set last_name = "" %} - {% for travel_date in travel_program.travelDates if travel_date.status > 0 %} + {% for travel_date in travel_program.travelDates if travel_date.status >= 0 %} {% if last_name != travel_date.name %} {% set last_name = travel_date.name %} @@ -325,12 +325,19 @@ 'id': loop.index0 } %} - -
- - {% if travel_date.effectiveStatus == 0 %} - NICHT VERFÜGBAR - {% endif %} + + {% if travel_date.effectiveStatus == 0 %} + +
+ + AUSGEBUCHT +
+ + + {% else %} + +
+ {% if travel_date.effectiveStatus == 1 %} BUCHBAR {% endif %} @@ -340,17 +347,18 @@ {% if travel_date.effectiveStatus == 3 %} GARANTIERT {% endif %} -
+
- - - - ANFRAGEN - - + + + + ANFRAGEN + + + {% endif %} {% endif %} diff --git a/trunk/src/AppBundle/Entity/TravelPeriodRepository.php b/trunk/src/AppBundle/Entity/TravelPeriodRepository.php index 8b5ea75f..502d6e9d 100644 --- a/trunk/src/AppBundle/Entity/TravelPeriodRepository.php +++ b/trunk/src/AppBundle/Entity/TravelPeriodRepository.php @@ -57,7 +57,7 @@ class TravelPeriodRepository extends \Doctrine\ORM\EntityRepository $qb->addSelect('d'); $qb->where("((p.isSeason = 0 AND d.startDate >= '$startDateStr' AND d.endDate <= '$endDateStr') OR". " (p.isSeason = 1 AND d.endDate >= '$startDateStr' AND". - " DATE_ADD(d.startDate, tp.programDuration, 'DAY') <= '$endDateStr' AND p.status > 0))"); + " DATE_ADD(d.startDate, tp.programDuration, 'DAY') <= '$endDateStr' AND p.status >= 0))"); // Prices // Instead of a single join to prices we add one join per price type. This reduces the execution time by