children flight Price

This commit is contained in:
Kevin Adametz 2018-08-20 16:28:05 +02:00
parent 079f0f613d
commit 0f168e4ef7
2 changed files with 5 additions and 8 deletions

View file

@ -156,11 +156,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')
<<<<<<< HEAD
->setTo("stern@stern-tours.de")
=======
->setTo("kevin.adametz@me.com") //'stern@stern-tours.de'
>>>>>>> parent of 8265045... Mail Booking Controller
->setBody(
$this->renderView('default/email/bookingServiceEmail.txt.twig', [
'base_dir' => realpath($this->getParameter('kernel.root_dir').'/..').DIRECTORY_SEPARATOR,
@ -466,7 +462,7 @@ class BookingController extends Controller
//DISCOUNT
if ($singleDiscountPrice !== null)
{
$key = intval(($singleFullPrice - $singleDiscountPrice)*100);
$key = intval(($singleFullPrice - $singleDiscountPrice)*100);//
if(!empty($tempDiscountHTML[$key])) {
$tempDiscountHTML[$key]['count'] = $tempDiscountHTML[$key]['count'] + $adultCount;
$tempDiscountHTML[$key]['value'] = $tempDiscountHTML[$key]['value'] + $discount;
@ -480,7 +476,7 @@ class BookingController extends Controller
}
if($childrenCount > 0){
$key = intval(($childPrice - $singleChildDiscountPrice)*100);
$key = intval(($childPrice - $singleChildDiscountPrice)*100);//
if(!empty($tempDiscountHTML[$key])) {
$tempDiscountHTML[$key]['count'] = $tempDiscountHTML[$key]['count'] + $childrenCount;
$tempDiscountHTML[$key]['value'] = $tempDiscountHTML[$key]['value'] + $childDiscount;
@ -495,7 +491,7 @@ class BookingController extends Controller
}
if (isset($outPriceInfo))
{
$key = intval(($singleFullPrice - $singleDiscountPrice)*100);
$key = intval(($singleFullPrice - $singleDiscountPrice)*100);//
if(!empty($outPriceInfo['discount'][$key])) {
$outPriceInfo['discount'][$key]['count'] = $outPriceInfo['discount'][$key]['count'] + $adultCount;
$outPriceInfo['discount'][$key]['value'] = $outPriceInfo['discount'][$key]['value'] + $discount;
@ -508,7 +504,7 @@ class BookingController extends Controller
);
}
if($childrenCount > 0){
$key = intval(($childPrice - $singleChildDiscountPrice)*100);
$key = intval(($childPrice - $singleChildDiscountPrice)*100);//
if(!empty($outPriceInfo['discount'][$key])) {
$outPriceInfo['discount'][$key]['count'] = $outPriceInfo['discount'][$key]['count'] + $childrenCount;
$outPriceInfo['discount'][$key]['value'] = $outPriceInfo['discount'][$key]['value'] + $childDiscount;

View file

@ -285,6 +285,7 @@ final class TravelDate
$currencyFactor = $this->travelProgram->getNettoPricesInEuro() ? 1 : $this->currencyFactor;
foreach ($this->prices as &$price)
{
//+ flight price
$price->setEffectivePrice(round(($flightPrice + $price->getPrice() * $currencyFactor) * $profitMargin));
$price->setEffectiveComfortPrice(round($price->getPriceComfort() * $currencyFactor * $profitMargin));
$price->setEffectiveChildPrice(round(($flightPrice + $price->getPriceChildren() * $currencyFactor) * $profitMargin));