diff --git a/trunk/app/Resources/views/default/pages/booking.html.twig b/trunk/app/Resources/views/default/pages/booking.html.twig index 6bffce6d..6f95957c 100644 --- a/trunk/app/Resources/views/default/pages/booking.html.twig +++ b/trunk/app/Resources/views/default/pages/booking.html.twig @@ -151,6 +151,27 @@ {% endif %} + + Reiseversicherung + +
+ + +
+ + {% for insuranceForm in form.insurance %} + {% include 'default/components/booking/insurance.html.twig' with { + 'form': insuranceForm, + 'insurance': form.insurance.vars.choices[insuranceForm.vars.value].data + } %} + {% endfor %} + + {{ form_errors(form.insurance) }} + + Reiseversicherung diff --git a/trunk/src/AppBundle/Controller/BookingController.php b/trunk/src/AppBundle/Controller/BookingController.php index f81715a9..1fe726ab 100644 --- a/trunk/src/AppBundle/Controller/BookingController.php +++ b/trunk/src/AppBundle/Controller/BookingController.php @@ -357,8 +357,7 @@ class BookingController extends Controller Util::formatPrice($singleFullPrice - $singleDiscountPrice) .' pro Person]' ]; } - /* - Preis für reisekostenversicherung + if ($bookingRequest->getInsurance() && $adultCount > 0) { $curAssessmentBasis = $insuranceAssessmentBasis + ($singleDiscountPrice ?? $singleFullPrice); @@ -388,7 +387,7 @@ class BookingController extends Controller 'count' => $adultCount, ]; } - }*/ + } } } diff --git a/trunk/src/AppBundle/Entity/TravelBookingRepository.php b/trunk/src/AppBundle/Entity/TravelBookingRepository.php index 3cbc2ab8..7fb5a0de 100644 --- a/trunk/src/AppBundle/Entity/TravelBookingRepository.php +++ b/trunk/src/AppBundle/Entity/TravelBookingRepository.php @@ -40,7 +40,8 @@ class TravelBookingRepository extends \Doctrine\ORM\EntityRepository $ret->setSelectedChild1(0); $ret->setSelectedChild2(0); $ret->setSelectedChild3(0); - /* + + $insurance = $bookingRequest->getInsurance(); $ret->setInsuranceName($insurance ? $insurance->getName() : '0'); // #TODO Adapted from v2 if (empty($bookingPriceInfo['insurances'])) @@ -59,7 +60,8 @@ class TravelBookingRepository extends \Doctrine\ORM\EntityRepository ]; } $ret->setInsurances($insurances); - }*/ + } + $ret->setTravelCancellation($bookingRequest->getTravelCancellation()); $ret->setParticipants($bookingRequest->getTravelers()); $ret->setParticipantsTotal($bookingRequest->getTravelerCount()); diff --git a/trunk/src/AppBundle/Form/BookingRequestType.php b/trunk/src/AppBundle/Form/BookingRequestType.php index 825c0dea..bcc46152 100644 --- a/trunk/src/AppBundle/Form/BookingRequestType.php +++ b/trunk/src/AppBundle/Form/BookingRequestType.php @@ -171,7 +171,7 @@ class BookingRequestType extends AbstractType )] ]); - /* + $insuranceChoices = []; if ($travelProgram->getInsurance1()) { @@ -193,7 +193,6 @@ class BookingRequestType extends AbstractType ] ]); } - */ //$travelDate->getPrices()[0]->getPriceType() $builder->add('travelCancellation', CheckboxType::class, ['required' => false]);