Buchung Reisekostenversicherung raus, dafür Info Checkbox rein
+ DB travel_booking + travel_cancellation int 1 git-svn-id: http://78.47.251.156/svn/dev/sterntours-3@3370 f459cee4-fb09-11de-96c3-f9c5f16c3c76
This commit is contained in:
parent
db05f3aa17
commit
dbb34b1af1
7 changed files with 91 additions and 20 deletions
|
|
@ -42,6 +42,14 @@ Nicht eingeschlossene, zubuchbare Leistungen:
|
||||||
[o] {{ travel_program_service|raw }}
|
[o] {{ travel_program_service|raw }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
|
=====================================================================================
|
||||||
|
Reise-Rücktrittskosten-Versicherung:
|
||||||
|
=====================================================================================
|
||||||
|
{% if(booking_request.travelCancellation == 1) %}
|
||||||
|
[x] Informationen angefordert
|
||||||
|
{% else %}
|
||||||
|
[o] Keine Informationen gewünscht
|
||||||
|
{% endif %}
|
||||||
=====================================================================================
|
=====================================================================================
|
||||||
Reiseanmelder{% if booking_request.salutation == 2 %}in{% endif %}
|
Reiseanmelder{% if booking_request.salutation == 2 %}in{% endif %}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -110,27 +110,23 @@
|
||||||
{{ form_errors(form.tripleRoomCount) }}
|
{{ form_errors(form.tripleRoomCount) }}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
|
||||||
|
|
||||||
|
<tr>
|
||||||
<td>Reiseversicherung</td>
|
<td>Reiseversicherung</td>
|
||||||
<td>
|
<td>
|
||||||
<div class="radio">
|
{% if form.travelCancellation is defined %}
|
||||||
<input id="st-no-insurance-opt" type="radio" value=""
|
<div class="checkbox">
|
||||||
name="{{ form.insurance.vars.full_name }}"
|
{{ form_widget(form.travelCancellation) }}
|
||||||
{% if form.insurance.vars.value == '' %}checked{% endif %}
|
<label for="{{ form.travelCancellation.vars.id }}">
|
||||||
>
|
STERN TOURS GmbH empfiehlt generell den Abschluss einer Reise-Rücktrittskosten-Versicherung und einer Auslands-Reisekrankenversicherung mit Rücktransport. Wenn Sie eine Versicherung wünschen, dann teilen Sie uns das bitte hier ("JA" auswählen) mit und wir senden Ihnen alle Informationen per Email zu.
|
||||||
<label for="st-no-insurance-opt">keine Reiseversicherung</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
{% 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) }}
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>Zubuchbare Leistungen</td>
|
<td>Zubuchbare Leistungen</td>
|
||||||
<td>
|
<td>
|
||||||
|
|
|
||||||
|
|
@ -79,6 +79,7 @@ class BookingController extends Controller
|
||||||
$bookingPriceInfo = [];
|
$bookingPriceInfo = [];
|
||||||
$totalPrice = $this->calculatePrice($travelDate, $bookingRequest, $htmlSummary, $bookingPriceInfo);
|
$totalPrice = $this->calculatePrice($travelDate, $bookingRequest, $htmlSummary, $bookingPriceInfo);
|
||||||
|
|
||||||
|
|
||||||
if ($action == '/buchen')
|
if ($action == '/buchen')
|
||||||
{
|
{
|
||||||
$breadcrumbEntries = Util::createBreadcrumb($travelProgramPage);
|
$breadcrumbEntries = Util::createBreadcrumb($travelProgramPage);
|
||||||
|
|
@ -92,7 +93,9 @@ class BookingController extends Controller
|
||||||
$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);
|
||||||
|
|
||||||
if (!$crmBookingUrl)
|
if (!$crmBookingUrl)
|
||||||
{
|
{
|
||||||
$crmBookingUrl = '[CRM-EXPORT FEHLGESCHLAGEN]';
|
$crmBookingUrl = '[CRM-EXPORT FEHLGESCHLAGEN]';
|
||||||
|
|
@ -102,6 +105,7 @@ class BookingController extends Controller
|
||||||
$crmBookingUrl = preg_replace('/\\/api/', '', $crmBookingUrl).'/edit';
|
$crmBookingUrl = preg_replace('/\\/api/', '', $crmBookingUrl).'/edit';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$this->get('mailer')->send(\Swift_Message::newInstance()
|
$this->get('mailer')->send(\Swift_Message::newInstance()
|
||||||
->setSubject('Ihr Buchungsauftrag bei STERN TOURS')
|
->setSubject('Ihr Buchungsauftrag bei STERN TOURS')
|
||||||
->setFrom('stern@stern-tours.de', 'STERN TOURS')
|
->setFrom('stern@stern-tours.de', 'STERN TOURS')
|
||||||
|
|
@ -118,6 +122,7 @@ class BookingController extends Controller
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
$this->get('mailer')->send(\Swift_Message::newInstance()
|
$this->get('mailer')->send(\Swift_Message::newInstance()
|
||||||
->setSubject('BUCHUNG: '. $travelProgram->getTitle() .'('. $travelDate->getName() .')')
|
->setSubject('BUCHUNG: '. $travelProgram->getTitle() .'('. $travelDate->getName() .')')
|
||||||
->setFrom('stern@stern-tours.de', 'STERN TOURS')
|
->setFrom('stern@stern-tours.de', 'STERN TOURS')
|
||||||
|
|
@ -277,6 +282,9 @@ class BookingController extends Controller
|
||||||
|
|
||||||
$possibleRooms = $this->getRooms($travelDate->getPrices(), $persons);
|
$possibleRooms = $this->getRooms($travelDate->getPrices(), $persons);
|
||||||
|
|
||||||
|
if($bookingRequest->getTravelCancellation()){
|
||||||
|
|
||||||
|
}
|
||||||
if ($bookingRequest->getComfort())
|
if ($bookingRequest->getComfort())
|
||||||
{
|
{
|
||||||
foreach ($possibleRooms as $room)
|
foreach ($possibleRooms as $room)
|
||||||
|
|
@ -349,6 +357,8 @@ class BookingController extends Controller
|
||||||
Util::formatPrice($singleFullPrice - $singleDiscountPrice) .' pro Person]</strong>'
|
Util::formatPrice($singleFullPrice - $singleDiscountPrice) .' pro Person]</strong>'
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
|
Preis für reisekostenversicherung
|
||||||
if ($bookingRequest->getInsurance() && $adultCount > 0)
|
if ($bookingRequest->getInsurance() && $adultCount > 0)
|
||||||
{
|
{
|
||||||
$curAssessmentBasis = $insuranceAssessmentBasis + ($singleDiscountPrice ?? $singleFullPrice);
|
$curAssessmentBasis = $insuranceAssessmentBasis + ($singleDiscountPrice ?? $singleFullPrice);
|
||||||
|
|
@ -378,7 +388,7 @@ class BookingController extends Controller
|
||||||
'count' => $adultCount,
|
'count' => $adultCount,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -39,6 +39,8 @@ class BookingRequest
|
||||||
*/
|
*/
|
||||||
private $insurance;
|
private $insurance;
|
||||||
|
|
||||||
|
private $travelCancellation;
|
||||||
|
|
||||||
private $comfort = false;
|
private $comfort = false;
|
||||||
|
|
||||||
private $travelOptions = [];
|
private $travelOptions = [];
|
||||||
|
|
@ -257,6 +259,24 @@ class BookingRequest
|
||||||
$this->insurance = $insurance;
|
$this->insurance = $insurance;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function getTravelCancellation()
|
||||||
|
{
|
||||||
|
return $this->travelCancellation;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param mixed $comfort
|
||||||
|
*/
|
||||||
|
public function setTravelCancellation($travelCancellation)
|
||||||
|
{
|
||||||
|
$this->travelCancellation = $travelCancellation;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -229,6 +229,13 @@ class TravelBooking
|
||||||
*/
|
*/
|
||||||
private $insurances;
|
private $insurances;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var integer
|
||||||
|
*
|
||||||
|
* @ORM\Column(name="travel_cancellation", type="integer", nullable=true)
|
||||||
|
*/
|
||||||
|
private $travelCancellation;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
*
|
*
|
||||||
|
|
@ -1054,6 +1061,31 @@ class TravelBooking
|
||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set travelCancellation
|
||||||
|
*
|
||||||
|
* @param string $travelCancellation
|
||||||
|
*
|
||||||
|
* @return TravelBooking
|
||||||
|
*/
|
||||||
|
public function setTravelCancellation($travelCancellation)
|
||||||
|
{
|
||||||
|
$this->travelCancellation = $travelCancellation;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get travelCancellation
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getTravelCancellation()
|
||||||
|
{
|
||||||
|
return $this->travelCancellation;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set options
|
* Set options
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,7 @@ class TravelBookingRepository extends \Doctrine\ORM\EntityRepository
|
||||||
$ret->setSelectedChild1(0);
|
$ret->setSelectedChild1(0);
|
||||||
$ret->setSelectedChild2(0);
|
$ret->setSelectedChild2(0);
|
||||||
$ret->setSelectedChild3(0);
|
$ret->setSelectedChild3(0);
|
||||||
|
/*
|
||||||
$insurance = $bookingRequest->getInsurance();
|
$insurance = $bookingRequest->getInsurance();
|
||||||
$ret->setInsuranceName($insurance ? $insurance->getName() : '0'); // #TODO Adapted from v2
|
$ret->setInsuranceName($insurance ? $insurance->getName() : '0'); // #TODO Adapted from v2
|
||||||
if (empty($bookingPriceInfo['insurances']))
|
if (empty($bookingPriceInfo['insurances']))
|
||||||
|
|
@ -58,8 +59,8 @@ class TravelBookingRepository extends \Doctrine\ORM\EntityRepository
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
$ret->setInsurances($insurances);
|
$ret->setInsurances($insurances);
|
||||||
}
|
}*/
|
||||||
|
$ret->setTravelCancellation($bookingRequest->getTravelCancellation());
|
||||||
$ret->setParticipants($bookingRequest->getTravelers());
|
$ret->setParticipants($bookingRequest->getTravelers());
|
||||||
$ret->setParticipantsTotal($bookingRequest->getTravelerCount());
|
$ret->setParticipantsTotal($bookingRequest->getTravelerCount());
|
||||||
$ret->setRooms($bookingPriceInfo['rooms']);
|
$ret->setRooms($bookingPriceInfo['rooms']);
|
||||||
|
|
|
||||||
|
|
@ -171,7 +171,8 @@ class BookingRequestType extends AbstractType
|
||||||
)]
|
)]
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$insuranceChoices = [];
|
/*
|
||||||
|
$insuranceChoices = [];
|
||||||
if ($travelProgram->getInsurance1())
|
if ($travelProgram->getInsurance1())
|
||||||
{
|
{
|
||||||
$insuranceChoices[$travelProgram->getInsurance1()->getName()] = $travelProgram->getInsurance1();
|
$insuranceChoices[$travelProgram->getInsurance1()->getName()] = $travelProgram->getInsurance1();
|
||||||
|
|
@ -192,14 +193,17 @@ class BookingRequestType extends AbstractType
|
||||||
]
|
]
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
//$travelDate->getPrices()[0]->getPriceType()
|
//$travelDate->getPrices()[0]->getPriceType()
|
||||||
|
$builder->add('travelCancellation', CheckboxType::class, ['required' => false]);
|
||||||
|
|
||||||
if ($travelDate->hasComfortCategory())
|
if ($travelDate->hasComfortCategory())
|
||||||
{
|
{
|
||||||
$builder->add('comfort', CheckboxType::class, ['required' => false]);
|
$builder->add('comfort', CheckboxType::class, ['required' => false]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$travelOptions = $travelProgram->getOptions();
|
$travelOptions = $travelProgram->getOptions();
|
||||||
if ($travelOptions instanceof Collection)
|
if ($travelOptions instanceof Collection)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue