Child in Booking Form, calculate, show, validate, mail, success

git-svn-id: http://78.47.251.156/svn/dev/sterntours-3@3447 f459cee4-fb09-11de-96c3-f9c5f16c3c76
This commit is contained in:
adametz 2018-08-20 11:40:10 +00:00
parent 48131f72e2
commit 22af43b07a
18 changed files with 1147 additions and 209 deletions

View file

@ -8,25 +8,33 @@ Reisezeitraum: {{ travel_date.start|date }} - {{ travel_date.end|date }
Abfahrts-/Abflugort: {{ booking_request.departure.name }} {{ booking_request.departure.extraCharge|number_format(2) }} € p.P.
{% for room in booking_price_info['rooms'] %}
1x {{ room['name'] }} [Personen: {{ room.adults }} x {{ room['price']|number_format(2) }}]
1x {{ room['name'] }} [Personen: {{ room.adults }} x {{ room['price']|number_format(2) }} {% if room['children'] > 0 %} + Kind: {{ room['price_children']|number_format(2) }}{% endif %}]
{% endfor %}
{{ booking_request.departure.extraCharge < 0 ? 'Aufschlag' : 'Abzug' }} Abfahrts-/Abflugort {{ booking_request.departure.name }}{#
#} {{ booking_request.travelerCount }} x {{ booking_request.departure.extraCharge|number_format(2) }} €: {{
#} {{ (booking_request.travelerCount + booking_request.childrenCount) }} x {{ booking_request.departure.extraCharge|number_format(2) }} €: {{
(booking_request.travelerCount * booking_request.departure.extraCharge)|number_format(2) }} €
{% for insuranceInfo in booking_price_info['insurances'] %}
{{ insuranceInfo['count'] }}x RV {{ insuranceInfo['insurance'].name }} ({{ insuranceInfo['insurancePrice'].code -}}
) {{ insuranceInfo['insurancePriceValue']|number_format(2) }} €: {{ (insuranceInfo['count'] *
insuranceInfo['insurancePriceValue'])|number_format(2) }} €
{% for insuranceInfo in booking_price_info['insurancesOut'] %}
{{ insuranceInfo['count'] }}x {{ insuranceInfo['label_first'] }} [ {{ insuranceInfo['label_last'] }} ] {{ insuranceInfo['value']|number_format(2) }}
{% endfor %}
{% for option in booking_request.travelOptions %}
{{ booking_request.travelerCount }}x zugebuchte Leistung (Erwachsener): {{ option.name }} {{ option.price|number_format(2) -}}
€: {{ (booking_request.travelerCount * option.price)|number_format(2) }}
{{ (booking_request.travelerCount + booking_request.childrenCount) }}x zugebuchte Leistung: {{ option.name }} [Erwachsener: {{ option.price|number_format(2) -}}€ ]
{% if option.priceChildren > 0 %}[Kind: {{ option.priceChildren|number_format(2) -}} €] {% endif %}
{{ ((booking_request.travelerCount * option.price) + (booking_request.childrenCount * option.priceChildren))|number_format(2) }}
{% endfor %}
{% for classOption in booking_price_info['classOptions'] %}
{{ classOption['count'] }}x {{ classOption['name'] }} {{ classOption['price']|number_format(2) }} €: {{
(classOption['count'] * classOption['price'])|number_format(2) }} €
{% endfor %}
{% for discount in booking_price_info['discount'] %}
{{ discount['count'] }}x {{ discount['label_first'] }} [ {{ discount['label_last'] }} ] {{ discount['value']|number_format(2) }}
{% endfor %}
Gesamtpreis: {{ booking_price_info['total']|number_format(2) }}
Anzahlung: {{ booking_price_info.deposit_total|number_format(2) }} € (ist sofort fällig)
@ -65,20 +73,32 @@ Reiseteilnehmer:
Zimmernummer, Zimmertyp, Geschlecht, Vorname, Nachname, Geburtsdatum
=====================================================================================
{% set travelerIndex = 0 %}
{% set travelerCollection = booking_request.travelers|slice(0, booking_request.travelerCount) %}
{% set travelerCollection = booking_request.travelers|slice(0, (booking_request.travelerCount + booking_request.childrenCount)) %}
{% for room in booking_request.occupiedRooms %}
{% if(room.type == 1) %}
{{ loop.index }}. Einzelzimmer, {{ travelerCollection[travelerIndex].sex == 1 ? 'männlich' : 'weiblich' }}, {{ travelerCollection[travelerIndex].firstName }}, {{ travelerCollection[travelerIndex].lastName -}}, {{ travelerCollection[travelerIndex].birthDate }}, {{ travelerCollection[travelerIndex].nationalityName }}
{{ loop.index }}. Einzelzimmer Erwachsener, {{ travelerCollection[travelerIndex].sex == 1 ? 'männlich' : 'weiblich' }}, {{ travelerCollection[travelerIndex].firstName }}, {{ travelerCollection[travelerIndex].lastName -}}, {{ travelerCollection[travelerIndex].birthDate }}, {{ travelerCollection[travelerIndex].nationalityName }}
{% set travelerIndex = travelerIndex + 1 %}
{% if(room.child == 1) %}
{{ loop.index }}. Einzelzimmer Kind, {{ travelerCollection[travelerIndex].sex == 1 ? 'männlich' : 'weiblich' }}, {{ travelerCollection[travelerIndex].firstName }}, {{ travelerCollection[travelerIndex].lastName -}}, {{ travelerCollection[travelerIndex].birthDate }}, {{ travelerCollection[travelerIndex].nationalityName }}
{% set travelerIndex = travelerIndex + 1 %}
{% endif %}
{% elseif (room.type == 2) %}
{{ loop.index }}. Doppelzimmer, {{ travelerCollection[travelerIndex].sex == 1 ? 'männlich' : 'weiblich' }}, {{ travelerCollection[travelerIndex].firstName }}, {{ travelerCollection[travelerIndex].lastName -}}, {{ travelerCollection[travelerIndex].birthDate }}, {{ travelerCollection[travelerIndex].nationalityName }}
{{ loop.index }}. Doppelzimmer, {{ travelerCollection[travelerIndex+1].sex == 1 ? 'männlich' : 'weiblich' }}, {{ travelerCollection[travelerIndex+1].firstName }}, {{ travelerCollection[travelerIndex+1].lastName -}}, {{ travelerCollection[travelerIndex+1].birthDate }}, {{ travelerCollection[travelerIndex].nationalityName }}
{{ loop.index }}. Doppelzimmer Erwachsener, {{ travelerCollection[travelerIndex].sex == 1 ? 'männlich' : 'weiblich' }}, {{ travelerCollection[travelerIndex].firstName }}, {{ travelerCollection[travelerIndex].lastName -}}, {{ travelerCollection[travelerIndex].birthDate }}, {{ travelerCollection[travelerIndex].nationalityName }}
{{ loop.index }}. Doppelzimmer Erwachsener, {{ travelerCollection[travelerIndex+1].sex == 1 ? 'männlich' : 'weiblich' }}, {{ travelerCollection[travelerIndex+1].firstName }}, {{ travelerCollection[travelerIndex+1].lastName -}}, {{ travelerCollection[travelerIndex+1].birthDate }}, {{ travelerCollection[travelerIndex].nationalityName }}
{% set travelerIndex = travelerIndex + 2 %}
{% if(room.child == 1) %}
{{ loop.index }}. Doppelzimmer Kind, {{ travelerCollection[travelerIndex].sex == 1 ? 'männlich' : 'weiblich' }}, {{ travelerCollection[travelerIndex].firstName }}, {{ travelerCollection[travelerIndex].lastName -}}, {{ travelerCollection[travelerIndex].birthDate }}, {{ travelerCollection[travelerIndex].nationalityName }}
{% set travelerIndex = travelerIndex + 1 %}
{% endif %}
{% elseif (room.type == 3) %}
{{ loop.index }}. Dreibettzimmer, {{ travelerCollection[travelerIndex].sex == 1 ? 'männlich' : 'weiblich' }}, {{ travelerCollection[travelerIndex].firstName }}, {{ travelerCollection[travelerIndex].lastName -}}, {{ travelerCollection[travelerIndex].birthDate }}, {{ travelerCollection[travelerIndex].nationalityName }}
{{ loop.index }}. Dreibettzimmer, {{ travelerCollection[travelerIndex+1].sex == 1 ? 'männlich' : 'weiblich' }}, {{ travelerCollection[travelerIndex+1].firstName }}, {{ travelerCollection[travelerIndex+1].lastName -}}, {{ travelerCollection[travelerIndex+1].birthDate }}, {{ travelerCollection[travelerIndex].nationalityName }}
{{ loop.index }}. Dreibettzimmer, {{ travelerCollection[travelerIndex+2].sex == 1 ? 'männlich' : 'weiblich' }}, {{ travelerCollection[travelerIndex+2].firstName }}, {{ travelerCollection[travelerIndex+2].lastName -}}, {{ travelerCollection[travelerIndex+2].birthDate }}, {{ travelerCollection[travelerIndex].nationalityName }}
{{ loop.index }}. Dreibettzimmer Erwachsener, {{ travelerCollection[travelerIndex].sex == 1 ? 'männlich' : 'weiblich' }}, {{ travelerCollection[travelerIndex].firstName }}, {{ travelerCollection[travelerIndex].lastName -}}, {{ travelerCollection[travelerIndex].birthDate }}, {{ travelerCollection[travelerIndex].nationalityName }}
{{ loop.index }}. Dreibettzimmer Erwachsener, {{ travelerCollection[travelerIndex+1].sex == 1 ? 'männlich' : 'weiblich' }}, {{ travelerCollection[travelerIndex+1].firstName }}, {{ travelerCollection[travelerIndex+1].lastName -}}, {{ travelerCollection[travelerIndex+1].birthDate }}, {{ travelerCollection[travelerIndex].nationalityName }}
{{ loop.index }}. Dreibettzimmer Erwachsener, {{ travelerCollection[travelerIndex+2].sex == 1 ? 'männlich' : 'weiblich' }}, {{ travelerCollection[travelerIndex+2].firstName }}, {{ travelerCollection[travelerIndex+2].lastName -}}, {{ travelerCollection[travelerIndex+2].birthDate }}, {{ travelerCollection[travelerIndex].nationalityName }}
{% set travelerIndex = travelerIndex + 3 %}
{% if(room.child == 1) %}
{{ loop.index }}. Dreibettzimmer Kind, {{ travelerCollection[travelerIndex].sex == 1 ? 'männlich' : 'weiblich' }}, {{ travelerCollection[travelerIndex].firstName }}, {{ travelerCollection[travelerIndex].lastName -}}, {{ travelerCollection[travelerIndex].birthDate }}, {{ travelerCollection[travelerIndex].nationalityName }}
{% set travelerIndex = travelerIndex + 1 %}
{% endif %}
{% endif %}
{% endfor %}