diff --git a/trunk/src/AppBundle/Controller/BookingController.php b/trunk/src/AppBundle/Controller/BookingController.php index e1804d5b..dc4bea9d 100644 --- a/trunk/src/AppBundle/Controller/BookingController.php +++ b/trunk/src/AppBundle/Controller/BookingController.php @@ -463,7 +463,7 @@ class BookingController extends Controller //DISCOUNT if ($singleDiscountPrice !== null) { - $key = ($singleFullPrice - $singleDiscountPrice); + $key = intval(($singleFullPrice - $singleDiscountPrice)*100); if(!empty($tempDiscountHTML[$key])) { $tempDiscountHTML[$key]['count'] = $tempDiscountHTML[$key]['count'] + $adultCount; $tempDiscountHTML[$key]['value'] = $tempDiscountHTML[$key]['value'] + $discount; @@ -476,7 +476,7 @@ class BookingController extends Controller ); } if($childDiscount > 0){ - $key = ($childPrice - $singleChildDiscountPrice); + $key = intval(($childPrice - $singleChildDiscountPrice)*100); if(!empty($tempDiscountHTML[$key])) { $tempDiscountHTML[$key]['count'] = $tempDiscountHTML[$key]['count'] + $childrenCount; $tempDiscountHTML[$key]['value'] = $tempDiscountHTML[$key]['value'] + $childDiscount; @@ -491,7 +491,7 @@ class BookingController extends Controller } if (isset($outPriceInfo)) { - $key = ($singleFullPrice - $singleDiscountPrice); + $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; @@ -504,7 +504,7 @@ class BookingController extends Controller ); } if($childDiscount > 0){ - $key = ($childPrice - $singleChildDiscountPrice); + $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; diff --git a/trunk/src/AppBundle/Entity/TravelDate.php b/trunk/src/AppBundle/Entity/TravelDate.php index adeac521..627862c1 100644 --- a/trunk/src/AppBundle/Entity/TravelDate.php +++ b/trunk/src/AppBundle/Entity/TravelDate.php @@ -287,7 +287,7 @@ final class TravelDate { $price->setEffectivePrice(round(($flightPrice + $price->getPrice() * $currencyFactor) * $profitMargin)); $price->setEffectiveComfortPrice(round($price->getPriceComfort() * $currencyFactor * $profitMargin)); - $price->setEffectiveChildPrice(round($price->getPriceChildren() * $currencyFactor * $profitMargin)); + $price->setEffectiveChildPrice(round(($flightPrice + $price->getPriceChildren() * $currencyFactor) * $profitMargin)); } } return $this->prices;