Diverse ticketlose Änderungen
- E-Mail-Link im Header - Raumnummer und -typ sowie Aufteilung der Reisenden für die Bestätigungsmail - Es werden nur noch die Raumtypen zur Auswahl angeboten, die für die gewählte Reise verfügbar sind - PDF-Herunterladen an entsprechenden Stellen angefügt - Vorauswahl von Räumen und Abflugort entfernt - Geburtstage werden nicht mehr validiert git-svn-id: http://78.47.251.156/svn/dev/sterntours-3@3344 f459cee4-fb09-11de-96c3-f9c5f16c3c76
This commit is contained in:
parent
dc0a69413f
commit
0246f5b2ff
15 changed files with 207 additions and 94 deletions
|
|
@ -101,7 +101,7 @@
|
||||||
|
|
||||||
<div id="navbar-collapse" class="navbar-right">
|
<div id="navbar-collapse" class="navbar-right">
|
||||||
<div class="navbar-times hidden-xs">
|
<div class="navbar-times hidden-xs">
|
||||||
<span style="float:left; margin-top: 30pt; margin-right: 5pt">E-Mail: <a href="mailto:stern@sterntours.de">stern@sterntours.de</a></span>
|
<span style="float:left; margin-top: 30pt; margin-right: 5pt; color: #e5aa30; font-size: 15px">E-Mail: <a href="mailto:stern@sterntours.de" style="font-size: 15px; color: #777777" >stern@sterntours.de</a></span>
|
||||||
<i class="fa fa-phone "></i>
|
<i class="fa fa-phone "></i>
|
||||||
<span>Mo-Fr: 09:00 - 23:00 Uhr<br>Sa: 10:00 - 23:00 Uhr<br>So: 11:00 - 23:00 Uhr</span>
|
<span>Mo-Fr: 09:00 - 23:00 Uhr<br>Sa: 10:00 - 23:00 Uhr<br>So: 11:00 - 23:00 Uhr</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -57,11 +57,24 @@ E-Mail: {{ booking_request.email ?? 'keine Angabe' }}
|
||||||
|
|
||||||
=====================================================================================
|
=====================================================================================
|
||||||
Reiseteilnehmer:
|
Reiseteilnehmer:
|
||||||
#) Geschlecht, Vorname, Nachname, Geburtsdatum
|
Zimmernummer, Zimmertyp, Geschlecht, Vorname, Nachname, Geburtsdatum
|
||||||
=====================================================================================
|
=====================================================================================
|
||||||
{% for traveler in booking_request.travelers|slice(0, booking_request.travelerCount) %}
|
{% set travelerIndex = 0 %}
|
||||||
{{ loop.index }}) {{ traveler.sex == 1 ? 'männlich' : 'weiblich' }}, {{ traveler.firstName }}, {{ traveler.lastName -}}
|
{% set travelerCollection = booking_request.travelers|slice(0, booking_request.travelerCount) %}
|
||||||
, {{ traveler.birthDate|date }}
|
{% 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 }}
|
||||||
|
{% set travelerIndex = travelerIndex + 1 %}
|
||||||
|
{% elseif (room.type == 2) %}
|
||||||
|
{{ loop.index }}. Doppelzimmer, {{ travelerCollection[travelerIndex].sex == 1 ? 'männlich' : 'weiblich' }}, {{ travelerCollection[travelerIndex].firstName }}, {{ travelerCollection[travelerIndex].lastName -}}, {{ travelerCollection[travelerIndex].birthDate }}
|
||||||
|
{{ loop.index }}. Doppelzimmer, {{ travelerCollection[travelerIndex+1].sex == 1 ? 'männlich' : 'weiblich' }}, {{ travelerCollection[travelerIndex+1].firstName }}, {{ travelerCollection[travelerIndex+1].lastName -}}, {{ travelerCollection[travelerIndex+1].birthDate }}
|
||||||
|
{% set travelerIndex = travelerIndex + 2 %}
|
||||||
|
{% elseif (room.type == 3) %}
|
||||||
|
{{ loop.index }}. Dreibettzimmer, {{ travelerCollection[travelerIndex].sex == 1 ? 'männlich' : 'weiblich' }}, {{ travelerCollection[travelerIndex].firstName }}, {{ travelerCollection[travelerIndex].lastName -}}, {{ travelerCollection[travelerIndex].birthDate }}
|
||||||
|
{{ loop.index }}. Dreibettzimmer, {{ travelerCollection[travelerIndex+1].sex == 1 ? 'männlich' : 'weiblich' }}, {{ travelerCollection[travelerIndex+1].firstName }}, {{ travelerCollection[travelerIndex+1].lastName -}}, {{ travelerCollection[travelerIndex+1].birthDate }}
|
||||||
|
{{ loop.index }}. Dreibettzimmer, {{ travelerCollection[travelerIndex+2].sex == 1 ? 'männlich' : 'weiblich' }}, {{ travelerCollection[travelerIndex+2].firstName }}, {{ travelerCollection[travelerIndex+2].lastName -}}, {{ travelerCollection[travelerIndex+2].birthDate }}
|
||||||
|
{% set travelerIndex = travelerIndex + 3 %}
|
||||||
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
=====================================================================================
|
=====================================================================================
|
||||||
|
|
|
||||||
|
|
@ -70,22 +70,40 @@
|
||||||
{{ form_errors(form.departure) }}
|
{{ form_errors(form.departure) }}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
{# TODO folgendes evtl noch weiter verallgemeinern #}
|
||||||
|
{% set priceTypeIds = [] %}
|
||||||
|
{% for price in travel_date.prices %}
|
||||||
|
{% set priceTypeIds = priceTypeIds|merge([price.priceTypeId]) %}
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
{% if "1" in priceTypeIds %}
|
||||||
<tr>
|
<tr>
|
||||||
|
{% else %}
|
||||||
|
<tr style="display:none">
|
||||||
|
{% endif %}
|
||||||
<td>{{ form_label(form.singleRoomCount, 'Einzelzimmer') }}</td>
|
<td>{{ form_label(form.singleRoomCount, 'Einzelzimmer') }}</td>
|
||||||
<td>
|
<td>
|
||||||
{{ form_widget(form.singleRoomCount) }}
|
{{ form_widget(form.singleRoomCount) }}
|
||||||
{{ form_errors(form.singleRoomCount) }}
|
{{ form_errors(form.singleRoomCount) }}
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
{% if "3" in priceTypeIds %}
|
||||||
<tr>
|
<tr>
|
||||||
|
{% else %}
|
||||||
|
<tr style="display:none">
|
||||||
|
{% endif %}
|
||||||
<td>{{ form_label(form.doubleRoomCount, 'Doppelzimmer') }}</td>
|
<td>{{ form_label(form.doubleRoomCount, 'Doppelzimmer') }}</td>
|
||||||
<td>
|
<td>
|
||||||
{{ form_widget(form.doubleRoomCount) }}
|
{{ form_widget(form.doubleRoomCount) }}
|
||||||
{{ form_errors(form.doubleRoomCount) }}
|
{{ form_errors(form.doubleRoomCount) }}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
{% if "5" in priceTypeIds %}
|
||||||
<tr>
|
<tr>
|
||||||
|
{% else %}
|
||||||
|
<tr style="display:none">
|
||||||
|
{% endif %}
|
||||||
<td>{{ form_label(form.tripleRoomCount, 'Dreibettzimmer') }}</td>
|
<td>{{ form_label(form.tripleRoomCount, 'Dreibettzimmer') }}</td>
|
||||||
<td>
|
<td>
|
||||||
{{ form_widget(form.tripleRoomCount) }}
|
{{ form_widget(form.tripleRoomCount) }}
|
||||||
|
|
@ -274,11 +292,11 @@
|
||||||
<table class="table">
|
<table class="table">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Raum-Nr.</th>
|
<th>Zimmertyp</th>
|
||||||
<th>Geschlecht</th>
|
<th>Geschlecht</th>
|
||||||
<th>Vorname</th>
|
<th>Vorname</th>
|
||||||
<th>Nachname</th>
|
<th>Nachname</th>
|
||||||
<th>Geburtsdatum (TT.MM.JJJJ)</th>
|
<th>Geburtsdatum</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody class="st-travelers">
|
<tbody class="st-travelers">
|
||||||
|
|
@ -297,7 +315,17 @@
|
||||||
<button class="btn btn-primary btn-sm border-radius st-traveller-index"
|
<button class="btn btn-primary btn-sm border-radius st-traveller-index"
|
||||||
type="button"
|
type="button"
|
||||||
>
|
>
|
||||||
{{ loop.parent.loop.index ?? '' }} <!-- TODO -->
|
{% set roomType = " " %}
|
||||||
|
{% if loop.parent.loop.index is not null %}
|
||||||
|
{% if room.vars.value.type == "1" %}
|
||||||
|
{% set roomType = "Einzelzimmer" %}
|
||||||
|
{% elseif room.vars.value.type == "2" %}
|
||||||
|
{% set roomType = "Doppelzimmer" %}
|
||||||
|
{% elseif room.vars.value.type == "3" %}
|
||||||
|
{% set roomType = "Dreibettzimmer" %}
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
{{ roomType }}
|
||||||
</button>
|
</button>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
|
|
|
||||||
|
|
@ -121,7 +121,13 @@
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Anrede</td>
|
<td>Anrede</td>
|
||||||
<td>{{ booking.salutation }}</td>
|
<td>
|
||||||
|
{% if booking.salutation == 1 %}
|
||||||
|
Herr
|
||||||
|
{% elseif booking.salutation == 2 %}
|
||||||
|
Frau
|
||||||
|
{% endif %}
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Vorname</td>
|
<td>Vorname</td>
|
||||||
|
|
@ -203,7 +209,11 @@
|
||||||
</button>
|
</button>
|
||||||
</td>
|
</td>
|
||||||
<td style="text-align: left;">
|
<td style="text-align: left;">
|
||||||
{{ participant.sex }}
|
{% if participant.sex == 1 %}
|
||||||
|
männlich
|
||||||
|
{% elseif participant.sex == 2 %}
|
||||||
|
weiblich
|
||||||
|
{% endif %}
|
||||||
</td>
|
</td>
|
||||||
<td style="text-align: left;">
|
<td style="text-align: left;">
|
||||||
{{ participant.firstName }}
|
{{ participant.firstName }}
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<div class="pull-right btn-over-slider">
|
<div class="pull-right btn-over-slider">
|
||||||
<button type="button"
|
<button type="button"
|
||||||
class="btn btn-primary btn-lg border-radius st-slider-booking-btn"
|
class="btn btn-primary btn-lg border-radius st-slider-booking-btn"
|
||||||
onclick=
|
onclick=
|
||||||
|
|
@ -33,6 +33,12 @@
|
||||||
Jetzt Buchen
|
Jetzt Buchen
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="pull-right btn-over-slider btn-over-slider-bottom">
|
||||||
|
<a href="{{ page.slug }}/pdf" title="Reisebeschreibung als PDF herunterladen" class="btn btn-primary btn-lg border-radius st-slider-booking-btn st-slider-booking-btn-bottom" >
|
||||||
|
PDF herunterladen
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
<section class="section fullscreen background padding-0 margin-bottom-20">
|
<section class="section fullscreen background padding-0 margin-bottom-20">
|
||||||
<div id="myCarousel" class="carousel slide">
|
<div id="myCarousel" class="carousel slide">
|
||||||
<!-- Indicators -->
|
<!-- Indicators -->
|
||||||
|
|
@ -121,11 +127,6 @@
|
||||||
#}
|
#}
|
||||||
|
|
||||||
<div role="tabpanel" class="tab-pane active" id="travel-description-content-tab">
|
<div role="tabpanel" class="tab-pane active" id="travel-description-content-tab">
|
||||||
|
|
||||||
<a href="{{ page.slug }}/pdf" title="Reisebeschreibung als PDF herunterladen" style="position: relative; float: right; z-index: 1;">
|
|
||||||
<span>PDF herunterladen</span>
|
|
||||||
</a>
|
|
||||||
|
|
||||||
{{ travel_program.htmlDescription|raw|keywords }}
|
{{ travel_program.htmlDescription|raw|keywords }}
|
||||||
|
|
||||||
{% if travel_program.advices is not empty %}
|
{% if travel_program.advices is not empty %}
|
||||||
|
|
|
||||||
|
|
@ -64,9 +64,7 @@ class BookingController extends Controller
|
||||||
$bookingRequest = new BookingRequest();
|
$bookingRequest = new BookingRequest();
|
||||||
if ($request->getMethod() != 'POST')
|
if ($request->getMethod() != 'POST')
|
||||||
{
|
{
|
||||||
$bookingRequest->setDoubleRoomCount(1);
|
$bookingRequest->setRoomCount(0);
|
||||||
$bookingRequest->setRoomCount(2);
|
|
||||||
$bookingRequest->setDeparture($travelDate->getDepartures()[0]);
|
|
||||||
}
|
}
|
||||||
$form = $this->createForm(BookingRequestType::class, $bookingRequest, [
|
$form = $this->createForm(BookingRequestType::class, $bookingRequest, [
|
||||||
'travel_date' => $travelDate,
|
'travel_date' => $travelDate,
|
||||||
|
|
@ -86,8 +84,6 @@ class BookingController extends Controller
|
||||||
$breadcrumbEntries = Util::createBreadcrumb($travelProgramPage);
|
$breadcrumbEntries = Util::createBreadcrumb($travelProgramPage);
|
||||||
$breadcrumbEntries[] = new BreadcrumbEntry('Buchen');
|
$breadcrumbEntries[] = new BreadcrumbEntry('Buchen');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if ($request->getMethod() == 'POST' && $form->isValid())
|
if ($request->getMethod() == 'POST' && $form->isValid())
|
||||||
{
|
{
|
||||||
$booking = $this->getDoctrine()->getRepository('AppBundle:TravelBooking')->createFromBookingRequest(
|
$booking = $this->getDoctrine()->getRepository('AppBundle:TravelBooking')->createFromBookingRequest(
|
||||||
|
|
@ -95,7 +91,6 @@ class BookingController extends Controller
|
||||||
$em = $this->getDoctrine()->getManager();
|
$em = $this->getDoctrine()->getManager();
|
||||||
$em->persist($booking);
|
$em->persist($booking);
|
||||||
$em->flush();
|
$em->flush();
|
||||||
|
|
||||||
|
|
||||||
$crmBookingUrl = $this->get('app.booking_exporter')->process($bookingRequest, $travelDate, $bookingPriceInfo);
|
$crmBookingUrl = $this->get('app.booking_exporter')->process($bookingRequest, $travelDate, $bookingPriceInfo);
|
||||||
$crmBookingUrl = preg_replace('/\\/api/', '', $crmBookingUrl) .'/edit';
|
$crmBookingUrl = preg_replace('/\\/api/', '', $crmBookingUrl) .'/edit';
|
||||||
|
|
@ -133,7 +128,6 @@ class BookingController extends Controller
|
||||||
'text/plain', 'utf-8'
|
'text/plain', 'utf-8'
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
// #TODO This will lead to multiple bookings due to multiple form submission. Redirect instead!
|
// #TODO This will lead to multiple bookings due to multiple form submission. Redirect instead!
|
||||||
return $this->render('default/pages/bookingConfirmation.html.twig', [
|
return $this->render('default/pages/bookingConfirmation.html.twig', [
|
||||||
|
|
@ -185,6 +179,15 @@ class BookingController extends Controller
|
||||||
throw new \Exception('Unknow BookingController action: '. $action);
|
throw new \Exception('Unknow BookingController action: '. $action);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private function calcNumTravelerLabel($number)
|
||||||
|
{
|
||||||
|
$ret = 0;
|
||||||
|
if($number > 0)
|
||||||
|
$ret = 1;
|
||||||
|
|
||||||
|
return $ret;
|
||||||
|
}
|
||||||
|
|
||||||
public function calculatePrice(TravelDate $travelDate, BookingRequest $bookingRequest, &$outHtmlSummary = null,
|
public function calculatePrice(TravelDate $travelDate, BookingRequest $bookingRequest, &$outHtmlSummary = null,
|
||||||
&$outPriceInfo = null)
|
&$outPriceInfo = null)
|
||||||
{
|
{
|
||||||
|
|
@ -207,29 +210,33 @@ class BookingController extends Controller
|
||||||
$outPriceInfo['classOptions'] = [];
|
$outPriceInfo['classOptions'] = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
$departure = Util\DepartureUtil::limitIndividualArrivalPrice($bookingRequest->getDeparture(),
|
if($bookingRequest->getDeparture() != null)
|
||||||
$travelDate->getFlightPrice());
|
|
||||||
if (isset($outPriceInfo))
|
|
||||||
{
|
{
|
||||||
$outPriceInfo['departure'] = $departure;
|
$departure = Util\DepartureUtil::limitIndividualArrivalPrice($bookingRequest->getDeparture(),
|
||||||
}
|
$travelDate->getFlightPrice());
|
||||||
|
if (isset($outPriceInfo))
|
||||||
if ($departure->getExtraCharge() != 0)
|
|
||||||
{
|
|
||||||
$insuranceAssessmentBasis += $departure->getExtraCharge();
|
|
||||||
$a = $travelerCount * $departure->getExtraCharge();
|
|
||||||
$ret += $a;
|
|
||||||
if (isset($outHtmlSummary))
|
|
||||||
{
|
{
|
||||||
$outHtmlSummary[] = [
|
$outPriceInfo['departure'] = $departure;
|
||||||
'value' => $a,
|
}
|
||||||
'label' => ($departure->getExtraCharge() > 0 ? 'Aufschlag' : 'Abzug') .
|
|
||||||
' für Abfahrts-/Abflugort "'. $departure->getName() .'" <strong>['. $travelerCount .' x '.
|
if ($departure->getExtraCharge() != 0)
|
||||||
Util::formatPrice($departure->getExtraCharge()) .' pro Person]</strong>'
|
{
|
||||||
];
|
$insuranceAssessmentBasis += $departure->getExtraCharge();
|
||||||
|
$a = $travelerCount * $departure->getExtraCharge();
|
||||||
|
$ret += $a;
|
||||||
|
if (isset($outHtmlSummary))
|
||||||
|
{
|
||||||
|
$outHtmlSummary[] = [
|
||||||
|
'value' => $a,
|
||||||
|
'label' => ($departure->getExtraCharge() > 0 ? 'Aufschlag' : 'Abzug') .
|
||||||
|
' für Abfahrts-/Abflugort "'. $departure->getName() .'" <strong>['. $this->calcNumTravelerLabel($travelerCount) .' x '.
|
||||||
|
Util::formatPrice($departure->getExtraCharge()) .' pro Person]</strong>'
|
||||||
|
];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
foreach ($bookingRequest->getTravelOptions() as $travelOption)
|
foreach ($bookingRequest->getTravelOptions() as $travelOption)
|
||||||
{
|
{
|
||||||
$insuranceAssessmentBasis += $travelOption->getPrice();
|
$insuranceAssessmentBasis += $travelOption->getPrice();
|
||||||
|
|
@ -239,7 +246,7 @@ class BookingController extends Controller
|
||||||
{
|
{
|
||||||
$outHtmlSummary[] = [
|
$outHtmlSummary[] = [
|
||||||
'value' => $a,
|
'value' => $a,
|
||||||
'label' => $travelOption->getName() .' <strong>['. $travelerCount .' x '.
|
'label' => $travelOption->getName() .' <strong>['. $this->calcNumTravelerLabel($travelerCount) .' x '.
|
||||||
Util::formatPrice($travelOption->getPrice()) .' pro Person]</strong>'
|
Util::formatPrice($travelOption->getPrice()) .' pro Person]</strong>'
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
@ -274,7 +281,7 @@ class BookingController extends Controller
|
||||||
{
|
{
|
||||||
$outHtmlSummary[] = [
|
$outHtmlSummary[] = [
|
||||||
'value' => $a,
|
'value' => $a,
|
||||||
'label' => 'Komfort-Kategorie <strong>['. $travelerCount .' x '.
|
'label' => 'Komfort-Kategorie <strong>['. $this->calcNumTravelerLabel($travelerCount) .' x '.
|
||||||
Util::formatPrice($room['price']->getEffectiveComfortPrice()) .' pro Person]</strong>'
|
Util::formatPrice($room['price']->getEffectiveComfortPrice()) .' pro Person]</strong>'
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
@ -315,14 +322,14 @@ class BookingController extends Controller
|
||||||
|
|
||||||
if (isset($outHtmlSummary))
|
if (isset($outHtmlSummary))
|
||||||
{
|
{
|
||||||
$label = $room['priceType']->getName() .' <strong>['. $adultCount .' x '.
|
$label = $room['priceType']->getName() .' <strong>['. $this->calcNumTravelerLabel($adultCount) .' x '.
|
||||||
Util::formatPrice($singleFullPrice) .' pro Person]</strong>';
|
Util::formatPrice($singleFullPrice) .' pro Person]</strong>';
|
||||||
if ($room['persons']['children'] != 0)
|
if ($room['persons']['children'] != 0)
|
||||||
{
|
{
|
||||||
$label .= ', Kinder: '. $room['persons']['children'] .' x <strong>'.
|
$label .= ', Kinder: '. $this->calcNumTravelerLabel($room['persons']['children']) .' x <strong>'.
|
||||||
Util::formatPrice($room['price']->getEffectiveChildPrice()) .'</strong>';
|
Util::formatPrice($room['price']->getEffectiveChildPrice()) .'</strong>';
|
||||||
|
$label .= ']';
|
||||||
}
|
}
|
||||||
$label .= ']';
|
|
||||||
$outHtmlSummary[] = [
|
$outHtmlSummary[] = [
|
||||||
'value' => $roomPrice,
|
'value' => $roomPrice,
|
||||||
'label' => $label
|
'label' => $label
|
||||||
|
|
@ -331,7 +338,7 @@ class BookingController extends Controller
|
||||||
{
|
{
|
||||||
$outHtmlSummary[] = [
|
$outHtmlSummary[] = [
|
||||||
'value' => $discount,
|
'value' => $discount,
|
||||||
'label' => 'Rabatt <strong>['. $adultCount .'x '.
|
'label' => 'Rabatt <strong>['. $this->calcNumTravelerLabel($adultCount) .'x '.
|
||||||
Util::formatPrice($singleFullPrice - $singleDiscountPrice) .' pro Person]</strong>'
|
Util::formatPrice($singleFullPrice - $singleDiscountPrice) .' pro Person]</strong>'
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
@ -351,7 +358,7 @@ class BookingController extends Controller
|
||||||
$insuranceHtmlSummary[] = [
|
$insuranceHtmlSummary[] = [
|
||||||
'value' => $a,
|
'value' => $a,
|
||||||
'label' => 'RV '. $bookingRequest->getInsurance()->getName() .' ('.
|
'label' => 'RV '. $bookingRequest->getInsurance()->getName() .' ('.
|
||||||
$insurancePrice->getCode() .') <strong>['. $adultCount .' x '.
|
$insurancePrice->getCode() .') <strong>['. $this->calcNumTravelerLabel($adultCount) .' x '.
|
||||||
Util::formatPrice($insurancePriceValue) . ' pro Person]</strong>'
|
Util::formatPrice($insurancePriceValue) . ' pro Person]</strong>'
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
@ -398,47 +405,56 @@ class BookingController extends Controller
|
||||||
|
|
||||||
if($priceTypeId == 1 && $persons['singleRoomPersons'] > 0)
|
if($priceTypeId == 1 && $persons['singleRoomPersons'] > 0)
|
||||||
{
|
{
|
||||||
$currentPersons = [
|
for($i = 0; $i < $persons['singleRoomPersons']; $i++)
|
||||||
'total' => $persons['singleRoomPersons'],
|
{
|
||||||
'adults' => $persons['singleRoomPersons'],
|
$currentPersons = [
|
||||||
'children' => 0 //TODO
|
'total' => 1,
|
||||||
];
|
'adults' => 1,
|
||||||
|
'children' => 0 //TODO
|
||||||
|
];
|
||||||
|
|
||||||
$ret[] = [
|
$ret[] = [
|
||||||
'priceType' => $priceType,
|
'priceType' => $priceType,
|
||||||
'persons' => $currentPersons,
|
'persons' => $currentPersons,
|
||||||
'price' => $price
|
'price' => $price
|
||||||
];
|
];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if($priceTypeId == 3 && $persons['doubleRoomPersons'] > 0)
|
if($priceTypeId == 3 && $persons['doubleRoomPersons'] > 0)
|
||||||
{
|
{
|
||||||
$currentPersons = [
|
for($j = 0; $j < ($persons['doubleRoomPersons'] / 2); $j++)
|
||||||
'total' => $persons['doubleRoomPersons'],
|
{
|
||||||
'adults' => $persons['doubleRoomPersons'],
|
$currentPersons = [
|
||||||
'children' => 0
|
'total' => 2,
|
||||||
];
|
'adults' => 2,
|
||||||
|
'children' => 0
|
||||||
|
];
|
||||||
|
|
||||||
$ret[] = [
|
$ret[] = [
|
||||||
'priceType' => $priceType,
|
'priceType' => $priceType,
|
||||||
'persons' => $currentPersons,
|
'persons' => $currentPersons,
|
||||||
'price' => $price
|
'price' => $price
|
||||||
];
|
];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if($priceTypeId == 5 && $persons['tripleRoomPersons'] > 0)
|
if($priceTypeId == 5 && $persons['tripleRoomPersons'] > 0)
|
||||||
{
|
{
|
||||||
$currentPersons = [
|
for($k = 0; $k < ($persons['tripleRoomPersons'] / 3); $k++)
|
||||||
'total' => $persons['tripleRoomPersons'],
|
{
|
||||||
'adults' => $persons['tripleRoomPersons'],
|
$currentPersons = [
|
||||||
'children' => 0
|
'total' => 3,
|
||||||
];
|
'adults' => 3,
|
||||||
|
'children' => 0
|
||||||
|
];
|
||||||
|
|
||||||
$ret[] = [
|
$ret[] = [
|
||||||
'priceType' => $priceType,
|
'priceType' => $priceType,
|
||||||
'persons' => $currentPersons,
|
'persons' => $currentPersons,
|
||||||
'price' => $price
|
'price' => $price
|
||||||
];
|
];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -555,6 +555,27 @@ class BookingRequest
|
||||||
// falls man es braucht, nachziehen und oder umstrukturieren (booking.html.twig)
|
// falls man es braucht, nachziehen und oder umstrukturieren (booking.html.twig)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getOccupiedRooms()
|
||||||
|
{
|
||||||
|
$allRooms = [];
|
||||||
|
for($i = 0; $i < $this->singleRoomCount; $i++)
|
||||||
|
{
|
||||||
|
$allRooms[] = $this->singleRooms[$i];
|
||||||
|
//$allRooms = array_push($allRooms, $this->singleRooms[$i]);
|
||||||
|
}
|
||||||
|
for($i = 0; $i < $this->doubleRoomCount; $i++)
|
||||||
|
{
|
||||||
|
$allRooms[] = $this->doubleRooms[$i];
|
||||||
|
//$allRooms = array_push($allRooms, $this->doubleRooms[$i]);
|
||||||
|
}
|
||||||
|
for($i = 0; $i < $this->tripleRoomCount; $i++)
|
||||||
|
{
|
||||||
|
$allRooms[] = $this->tripleRooms[$i];
|
||||||
|
//$allRooms = array_push($allRooms, $this->tripleRooms[$i]);
|
||||||
|
}
|
||||||
|
return $allRooms;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
public function addTraveler(Traveler $traveler)
|
public function addTraveler(Traveler $traveler)
|
||||||
|
|
|
||||||
|
|
@ -895,7 +895,7 @@ class TravelBooking
|
||||||
'gender' => $traveler->getSex(),
|
'gender' => $traveler->getSex(),
|
||||||
'first_name' => $traveler->getFirstName(),
|
'first_name' => $traveler->getFirstName(),
|
||||||
'last_name' => $traveler->getLastName(),
|
'last_name' => $traveler->getLastName(),
|
||||||
'birthday' => $traveler->getBirthDate()->format('d.m.Y')
|
'birthday' => $traveler->getBirthDate()
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,6 @@ class Traveler
|
||||||
private $lastName;
|
private $lastName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var \DateTime $birthDate
|
|
||||||
* @Assert\NotBlank()
|
* @Assert\NotBlank()
|
||||||
*/
|
*/
|
||||||
private $birthDate;
|
private $birthDate;
|
||||||
|
|
@ -85,7 +84,7 @@ class Traveler
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return \DateTime
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getBirthDate()
|
public function getBirthDate()
|
||||||
{
|
{
|
||||||
|
|
@ -93,7 +92,7 @@ class Traveler
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param \DateTime $birthDate
|
* @param string $birthDate
|
||||||
*/
|
*/
|
||||||
public function setBirthDate($birthDate)
|
public function setBirthDate($birthDate)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -266,7 +266,7 @@ class BookingSternToursCrmExporter extends SternToursCrmExporter
|
||||||
'participant_salutation_id' => $bookingRequest->getTravelers()[0]->getSex(),
|
'participant_salutation_id' => $bookingRequest->getTravelers()[0]->getSex(),
|
||||||
'participant_name' => $bookingRequest->getTravelers()[0]->getLastName(),
|
'participant_name' => $bookingRequest->getTravelers()[0]->getLastName(),
|
||||||
'participant_firstname' => $bookingRequest->getTravelers()[0]->getFirstName(),
|
'participant_firstname' => $bookingRequest->getTravelers()[0]->getFirstName(),
|
||||||
'participant_birthdate' => $bookingRequest->getTravelers()[0]->getBirthDate()->format('Y-m-d'),
|
'participant_birthdate' => $bookingRequest->getTravelers()[0]->getBirthDate(),
|
||||||
]]);
|
]]);
|
||||||
|
|
||||||
if (!$resp['success'])
|
if (!$resp['success'])
|
||||||
|
|
@ -282,7 +282,7 @@ class BookingSternToursCrmExporter extends SternToursCrmExporter
|
||||||
'participant_salutation_id' => $traveler->getSex(),
|
'participant_salutation_id' => $traveler->getSex(),
|
||||||
'participant_name' => $traveler->getLastName(),
|
'participant_name' => $traveler->getLastName(),
|
||||||
'participant_firstname' => $traveler->getFirstName(),
|
'participant_firstname' => $traveler->getFirstName(),
|
||||||
'participant_birthdate' => $traveler->getBirthDate()->format('Y-m-d'),
|
'participant_birthdate' => $traveler->getBirthDate(),
|
||||||
]], true);
|
]], true);
|
||||||
return $resp['success'];
|
return $resp['success'];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -50,11 +50,7 @@ class TravelerType extends AbstractType
|
||||||
])
|
])
|
||||||
->add('firstName')
|
->add('firstName')
|
||||||
->add('lastName')
|
->add('lastName')
|
||||||
->add('birthDate', StPlainDateType::class, [
|
->add('birthDate')
|
||||||
'widget' => 'single_text',
|
|
||||||
'format' => 'dd.MM.yyyy',
|
|
||||||
'required' => true,
|
|
||||||
])
|
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -235,6 +235,13 @@
|
||||||
.btn-over-slider {
|
.btn-over-slider {
|
||||||
top:110px;
|
top:110px;
|
||||||
}
|
}
|
||||||
|
.btn-over-slider-bottom {
|
||||||
|
top:320px;
|
||||||
|
}
|
||||||
|
.st-slider-booking-btn-bottom{
|
||||||
|
background-color: #777777 !important;
|
||||||
|
}
|
||||||
|
|
||||||
.price-over-slider {
|
.price-over-slider {
|
||||||
top: 115px;
|
top: 115px;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -58,6 +58,13 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.btn-over-slider-bottom {
|
||||||
|
top: 280px !important;
|
||||||
|
}
|
||||||
|
.st-slider-booking-btn-bottom{
|
||||||
|
background-color: #777777 !important;
|
||||||
|
}
|
||||||
|
|
||||||
.price-over-slider {
|
.price-over-slider {
|
||||||
position: absolute; left: 15px; top:75px; z-index: 1000;
|
position: absolute; left: 15px; top:75px; z-index: 1000;
|
||||||
.cprice{
|
.cprice{
|
||||||
|
|
|
||||||
|
|
@ -1121,6 +1121,12 @@ a[id^="video_"]:before,
|
||||||
-moz-box-shadow: 0px 0px 8px 5px rgba(255, 255, 255, 0.4);
|
-moz-box-shadow: 0px 0px 8px 5px rgba(255, 255, 255, 0.4);
|
||||||
box-shadow: 0px 0px 8px 5px rgba(255, 255, 255, 0.4);
|
box-shadow: 0px 0px 8px 5px rgba(255, 255, 255, 0.4);
|
||||||
}
|
}
|
||||||
|
.btn-over-slider-bottom {
|
||||||
|
top: 280px !important;
|
||||||
|
}
|
||||||
|
.st-slider-booking-btn-bottom {
|
||||||
|
background-color: #777777 !important;
|
||||||
|
}
|
||||||
.price-over-slider {
|
.price-over-slider {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 15px;
|
left: 15px;
|
||||||
|
|
@ -1964,7 +1970,7 @@ body.modal-open {
|
||||||
background-color: #f6f6f6;
|
background-color: #f6f6f6;
|
||||||
}
|
}
|
||||||
#page-header {
|
#page-header {
|
||||||
background: url(images/page-header.jpg) no-repeat scroll center center / cover rgba(0, 0, 0, 0);
|
background: url('images/page-header.jpg') no-repeat scroll center center / cover rgba(0, 0, 0, 0);
|
||||||
display: block;
|
display: block;
|
||||||
padding: 70px 0;
|
padding: 70px 0;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
@ -3717,6 +3723,12 @@ a,
|
||||||
.btn-over-slider {
|
.btn-over-slider {
|
||||||
top: 110px;
|
top: 110px;
|
||||||
}
|
}
|
||||||
|
.btn-over-slider-bottom {
|
||||||
|
top: 320px;
|
||||||
|
}
|
||||||
|
.st-slider-booking-btn-bottom {
|
||||||
|
background-color: #777777 !important;
|
||||||
|
}
|
||||||
.price-over-slider {
|
.price-over-slider {
|
||||||
top: 115px;
|
top: 115px;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,8 @@ $(document).ready(function() {
|
||||||
var roomIndexSelector = travelerSelector+' .st-traveller-index';
|
var roomIndexSelector = travelerSelector+' .st-traveller-index';
|
||||||
var currentRoomIndex = $(travelerSelector).attr("data-room-index");
|
var currentRoomIndex = $(travelerSelector).attr("data-room-index");
|
||||||
$(travelerSelector).show().find('input,select').prop('required', true);
|
$(travelerSelector).show().find('input,select').prop('required', true);
|
||||||
$(roomIndexSelector).text(currentRoomIndex);
|
//$(roomIndexSelector).text(currentRoomIndex);
|
||||||
|
$(roomIndexSelector).text("Einzelzimmer");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -68,7 +69,8 @@ $(document).ready(function() {
|
||||||
var roomIndexSelector = travelerSelector+' .st-traveller-index';
|
var roomIndexSelector = travelerSelector+' .st-traveller-index';
|
||||||
var currentRoomIndex = $(travelerSelector).attr("data-room-index");
|
var currentRoomIndex = $(travelerSelector).attr("data-room-index");
|
||||||
$(travelerSelector).show().find('input,select').prop('required', true);
|
$(travelerSelector).show().find('input,select').prop('required', true);
|
||||||
$(roomIndexSelector).text(currentRoomIndex - offset);
|
//$(roomIndexSelector).text(currentRoomIndex - offset);
|
||||||
|
$(roomIndexSelector).text("Doppelzimmer");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -81,7 +83,8 @@ $(document).ready(function() {
|
||||||
var roomIndexSelector = travelerSelector+' .st-traveller-index';
|
var roomIndexSelector = travelerSelector+' .st-traveller-index';
|
||||||
var currentRoomIndex = $(travelerSelector).attr("data-room-index");
|
var currentRoomIndex = $(travelerSelector).attr("data-room-index");
|
||||||
$(travelerSelector).show().find('input,select').prop('required', true);
|
$(travelerSelector).show().find('input,select').prop('required', true);
|
||||||
$(roomIndexSelector).text(currentRoomIndex - offset);
|
//$(roomIndexSelector).text(currentRoomIndex - offset);
|
||||||
|
$(roomIndexSelector).text("Dreibettzimmer");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue