Komfort brechnung mit Kind Kalender im Admin formatieren

git-svn-id: http://78.47.251.156/svn/dev/sterntours-3@3454 f459cee4-fb09-11de-96c3-f9c5f16c3c76
This commit is contained in:
adametz 2018-08-27 12:51:36 +00:00
parent 0325e97509
commit 4ee51802ab
6 changed files with 210 additions and 63 deletions

View file

@ -376,20 +376,26 @@ class BookingController extends Controller
{
$insuranceAssessmentBasis += $room['price']->getEffectiveComfortPrice();
$insuranceAssessmentChildBasis += $room['price']->getEffectiveComfortPrice();
$a = $room['persons']['total'] * $room['price']->getEffectiveComfortPrice();
$ret += $a;
$adultCount = $room['persons']['adults'];
$childrenCount = $room['persons']['children'];
$a = $adultCount * $room['price']->getEffectiveComfortPrice();;
$b = $childrenCount * $room['price']->getEffectiveComfortPrice();
$ret += $a + $b;
if (isset($outHtmlSummary))
{
$key = intval($room['price']->getEffectiveComfortPrice());
if(!empty($tempComfortHTML[$key])) {
$tempComfortHTML[$key]['count'] = $tempComfortHTML[$key]['count'] + 1;
$tempComfortHTML[$key]['value'] = $tempComfortHTML[$key]['value'] + $a;
$tempComfortHTML[$key]['count'] = $tempComfortHTML[$key]['count'] + $adultCount + $childrenCount;
$tempComfortHTML[$key]['value'] = $tempComfortHTML[$key]['value'] + $a + $b;
}else{
$tempComfortHTML[$key] = array(
'value' => $a,
'value' => $a + $b,
'label_first' => 'Komfort-Kategorie',
'label_last' => Util::formatPrice($room['price']->getEffectiveComfortPrice()) . ' pro Person',
'count' => 1,
'count' => $adultCount + $childrenCount,
);
}
}
@ -613,24 +619,8 @@ class BookingController extends Controller
}
//Departure
if(count($tempDepartureHTML) > 0){
foreach ($tempDepartureHTML as $item) {
$outHtmlSummary[] =[
'value' => $item['value'],
'label' => '<strong>'.$item['count'].'</strong> x '.$item['label_first'].'<strong> ['.$item['label_last'].' ]</strong>',
];
}
}
//Comfort
if(count($tempComfortHTML) > 0){
foreach ($tempComfortHTML as $item) {
$outHtmlSummary[] =[
'value' => $item['value'],
'label' => '<strong>'.$item['count'].'</strong> x '.$item['label_first'].'<strong> ['.$item['label_last'].' ]</strong>',
];
}
}
//ROOMS
if(count($tempRoomHTML) > 0){
foreach ($tempRoomHTML as $item) {
@ -645,6 +635,27 @@ class BookingController extends Controller
];
}
}
//Comfort
if(count($tempComfortHTML) > 0){
foreach ($tempComfortHTML as $item) {
$outHtmlSummary[] =[
'value' => $item['value'],
'label' => '<strong>'.$item['count'].'</strong> x '.$item['label_first'].'<strong> ['.$item['label_last'].' ]</strong>',
];
}
}
//Departure
if(count($tempDepartureHTML) > 0){
foreach ($tempDepartureHTML as $item) {
$outHtmlSummary[] =[
'value' => $item['value'],
'label' => '<strong>'.$item['count'].'</strong> x '.$item['label_first'].'<strong> ['.$item['label_last'].' ]</strong>',
];
}
}
//DISCOUNT
if(count($tempDiscountHTML) > 0){
foreach ($tempDiscountHTML as $item) {