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
|
|
@ -79,6 +79,7 @@ class BookingController extends Controller
|
|||
$bookingPriceInfo = [];
|
||||
$totalPrice = $this->calculatePrice($travelDate, $bookingRequest, $htmlSummary, $bookingPriceInfo);
|
||||
|
||||
|
||||
if ($action == '/buchen')
|
||||
{
|
||||
$breadcrumbEntries = Util::createBreadcrumb($travelProgramPage);
|
||||
|
|
@ -92,7 +93,9 @@ class BookingController extends Controller
|
|||
$em->persist($booking);
|
||||
$em->flush();
|
||||
|
||||
|
||||
$crmBookingUrl = $this->get('app.booking_exporter')->process($bookingRequest, $travelDate, $bookingPriceInfo);
|
||||
|
||||
if (!$crmBookingUrl)
|
||||
{
|
||||
$crmBookingUrl = '[CRM-EXPORT FEHLGESCHLAGEN]';
|
||||
|
|
@ -102,6 +105,7 @@ class BookingController extends Controller
|
|||
$crmBookingUrl = preg_replace('/\\/api/', '', $crmBookingUrl).'/edit';
|
||||
}
|
||||
|
||||
|
||||
$this->get('mailer')->send(\Swift_Message::newInstance()
|
||||
->setSubject('Ihr Buchungsauftrag bei STERN TOURS')
|
||||
->setFrom('stern@stern-tours.de', 'STERN TOURS')
|
||||
|
|
@ -118,6 +122,7 @@ class BookingController extends Controller
|
|||
)
|
||||
);
|
||||
|
||||
|
||||
$this->get('mailer')->send(\Swift_Message::newInstance()
|
||||
->setSubject('BUCHUNG: '. $travelProgram->getTitle() .'('. $travelDate->getName() .')')
|
||||
->setFrom('stern@stern-tours.de', 'STERN TOURS')
|
||||
|
|
@ -277,6 +282,9 @@ class BookingController extends Controller
|
|||
|
||||
$possibleRooms = $this->getRooms($travelDate->getPrices(), $persons);
|
||||
|
||||
if($bookingRequest->getTravelCancellation()){
|
||||
|
||||
}
|
||||
if ($bookingRequest->getComfort())
|
||||
{
|
||||
foreach ($possibleRooms as $room)
|
||||
|
|
@ -349,6 +357,8 @@ class BookingController extends Controller
|
|||
Util::formatPrice($singleFullPrice - $singleDiscountPrice) .' pro Person]</strong>'
|
||||
];
|
||||
}
|
||||
/*
|
||||
Preis für reisekostenversicherung
|
||||
if ($bookingRequest->getInsurance() && $adultCount > 0)
|
||||
{
|
||||
$curAssessmentBasis = $insuranceAssessmentBasis + ($singleDiscountPrice ?? $singleFullPrice);
|
||||
|
|
@ -378,7 +388,7 @@ class BookingController extends Controller
|
|||
'count' => $adultCount,
|
||||
];
|
||||
}
|
||||
}
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -39,6 +39,8 @@ class BookingRequest
|
|||
*/
|
||||
private $insurance;
|
||||
|
||||
private $travelCancellation;
|
||||
|
||||
private $comfort = false;
|
||||
|
||||
private $travelOptions = [];
|
||||
|
|
@ -257,6 +259,24 @@ class BookingRequest
|
|||
$this->insurance = $insurance;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public function getTravelCancellation()
|
||||
{
|
||||
return $this->travelCancellation;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed $comfort
|
||||
*/
|
||||
public function setTravelCancellation($travelCancellation)
|
||||
{
|
||||
$this->travelCancellation = $travelCancellation;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -229,6 +229,13 @@ class TravelBooking
|
|||
*/
|
||||
private $insurances;
|
||||
|
||||
/**
|
||||
* @var integer
|
||||
*
|
||||
* @ORM\Column(name="travel_cancellation", type="integer", nullable=true)
|
||||
*/
|
||||
private $travelCancellation;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*
|
||||
|
|
@ -1054,6 +1061,31 @@ class TravelBooking
|
|||
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
|
||||
*
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ 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']))
|
||||
|
|
@ -58,8 +59,8 @@ class TravelBookingRepository extends \Doctrine\ORM\EntityRepository
|
|||
];
|
||||
}
|
||||
$ret->setInsurances($insurances);
|
||||
}
|
||||
|
||||
}*/
|
||||
$ret->setTravelCancellation($bookingRequest->getTravelCancellation());
|
||||
$ret->setParticipants($bookingRequest->getTravelers());
|
||||
$ret->setParticipantsTotal($bookingRequest->getTravelerCount());
|
||||
$ret->setRooms($bookingPriceInfo['rooms']);
|
||||
|
|
|
|||
|
|
@ -171,7 +171,8 @@ class BookingRequestType extends AbstractType
|
|||
)]
|
||||
]);
|
||||
|
||||
$insuranceChoices = [];
|
||||
/*
|
||||
$insuranceChoices = [];
|
||||
if ($travelProgram->getInsurance1())
|
||||
{
|
||||
$insuranceChoices[$travelProgram->getInsurance1()->getName()] = $travelProgram->getInsurance1();
|
||||
|
|
@ -192,14 +193,17 @@ class BookingRequestType extends AbstractType
|
|||
]
|
||||
]);
|
||||
}
|
||||
*/
|
||||
|
||||
//$travelDate->getPrices()[0]->getPriceType()
|
||||
$builder->add('travelCancellation', CheckboxType::class, ['required' => false]);
|
||||
|
||||
if ($travelDate->hasComfortCategory())
|
||||
{
|
||||
$builder->add('comfort', CheckboxType::class, ['required' => false]);
|
||||
}
|
||||
|
||||
|
||||
$travelOptions = $travelProgram->getOptions();
|
||||
if ($travelOptions instanceof Collection)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue