From 0096fc88d6ad7973c749b5bc8cfe0c3095ab7cd9 Mon Sep 17 00:00:00 2001 From: adametz Date: Wed, 10 Oct 2018 14:35:32 +0000 Subject: [PATCH] #1446 Ausgebucht anzeigen git-svn-id: http://78.47.251.156/svn/dev/sterntours-3@3469 f459cee4-fb09-11de-96c3-f9c5f16c3c76 --- .../default/pages/cms/travelProgram.html.twig | 42 +++++++++++-------- .../Entity/TravelPeriodRepository.php | 2 +- 2 files changed, 26 insertions(+), 18 deletions(-) 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