row; $rooms = $this->rooms; $customer = $this->customer; $dbo = JFactory::getDbo(); $vbo_app = VikBooking::getVboApplication(); /** * This view is usually rendered within a modal window, and with WordPress * the modal window is loaded through AJAX by the "editorder" View. For this * reason, with WP we should not load the JS assets for the contextual menu, * or we would reset the default setup of the library. We load the assets in * the parent View "editorder" to avoid issues of any kind. * * @since 1.16.0 (J) - 1.6.0 (WP) */ if ((VBOPlatformDetection::isJoomla()) || (VBOPlatformDetection::isWordPress() && !wp_doing_ajax())) { $vbo_app->loadContextMenuAssets(); JText::script('VBRENTALORD'); JText::script('VBPVIEWORDERSPEOPLE'); } $currencysymb = VikBooking::getCurrencySymb(); $nowdf = VikBooking::getDateFormat(true); if ($nowdf == "%d/%m/%Y") { $df = 'd/m/Y'; } elseif ($nowdf == "%m/%d/%Y") { $df = 'm/d/Y'; } else { $df = 'Y/m/d'; } $datesep = VikBooking::getDateSeparator(true); $pchanged = VikRequest::getInt('changed', '', 'request'); $tmpl = VikRequest::getVar('tmpl'); $set_parent_status = ''; $now_info = getdate(); $today_midnight = mktime(0, 0, 0, $now_info['mon'], $now_info['mday'], $now_info['year']); $colortags = VikBooking::loadBookingsColorTags(); $otachannel = ''; $otachannel_name = ''; $otachannel_bid = ''; $otacurrency = ''; if (!empty($order['channel'])) { $channelparts = explode('_', $order['channel']); $otachannel = array_key_exists(1, $channelparts) && strlen($channelparts[1]) > 0 ? $channelparts[1] : ucwords($channelparts[0]); $otachannel_name = $otachannel; $otachannel_bid = $order['idorderota']; if (strstr($otachannel, '.') !== false) { $otaccparts = explode('.', $otachannel); $otachannel = $otaccparts[0]; } $otacurrency = strlen($order['chcurrency']) > 0 ? $order['chcurrency'] : ''; } $sensible_k = array('first_name', 'last_name', 'country', 'gender', 'bdate', 'pbirth'); $missing_customer_det = false; foreach ($customer as $ck => $cv) { if ((!isset($customer[$ck]) || empty($customer[$ck])) && in_array($ck, $sensible_k)) { $missing_customer_det = true; } } /** * Back-end guests registration now relies on dynamic drivers within Vik Booking. * * @since 1.15.0 (J) - 1.5.0 (WP) */ // get the list of back-end pax fields according to settings list($pax_fields, $pax_fields_attributes) = VikBooking::getPaxFields(); // grab also the fields for front-end pre check-in list($pre_pax_fields, $pre_pax_fields_attributes) = VikBooking::getPaxFields(true); // once the pax fields have been prepared, get the active driver instance $pax_fields_obj = VBOCheckinPax::getInstance(); // load any previous checkin information from this customer $previous_checkins = VBOCheckinPax::getCustomerAllPaxData($order['id']); ?>

ID
ID
createPopover(array('title' => JText::translate('VBCUSTOMERMISSIMPDET'), 'content' => JText::translate('VBCUSTOMERMISSIMPDETHELP'), 'icon_class' => VikBookingIcons::i('exclamation-triangle'), 'placement' => 'bottom')); } elseif (!empty($customer['notes'])) { ?>
'.ltrim($customer['first_name'].' '.$customer['last_name']).''; ?>
'.JText::translate('VBOCHECKEDSTATUSNOS').''; $set_parent_status = $pchanged > 0 ? ''.strtoupper(JText::translate('VBOCHECKEDSTATUSNOS')).'' : $set_parent_status; } elseif ($order['checked'] == 1) { //checked in $checked_status = ''.JText::translate('VBOCHECKEDSTATUSIN').''; $set_parent_status = $pchanged > 0 ? ''.strtoupper(JText::translate('VBOCHECKEDSTATUSIN')).'' : $set_parent_status; } elseif ($order['checked'] == 2) { //checked out $checked_status = ''.JText::translate('VBOCHECKEDSTATUSOUT').''; $set_parent_status = $pchanged > 0 ? ''.strtoupper(JText::translate('VBOCHECKEDSTATUSOUT')).'' : $set_parent_status; } else { //none (0) $checked_status = ''.JText::translate('VBOCHECKEDSTATUSZERO').''; $set_parent_status = $pchanged > 0 ? ''.strtoupper(JText::translate('VBCONFIRMED')).'' : $set_parent_status; } ?>
$prev_checkin) { $previous_checkins[$k]['checkin_dt'] = date(str_replace("/", $datesep, $df), $prev_checkin['checkin']); $previous_checkins[$k]['checkout_dt'] = date(str_replace("/", $datesep, $df), $prev_checkin['checkout']); $previous_checkins[$k]['ts_dt'] = date(str_replace("/", $datesep, $df), $prev_checkin['ts']); $book_tot_guests = 0; $prev_checkin['pax_data'] = empty($prev_checkin['pax_data']) || !is_array($prev_checkin['pax_data']) ? [] : $prev_checkin['pax_data']; foreach ($prev_checkin['pax_data'] as $rnum => $room_pax) { foreach ($room_pax as $guest_num => $guest_data) { $book_tot_guests++; } } $previous_checkins[$k]['tot_guests'] = $book_tot_guests; } ?>
$or) { $num = $ind + 1; $arrpeople[$num]['adults'] = $or['adults']; $arrpeople[$num]['children'] = $or['children']; $arrpeople[$num]['children_age'] = $or['childrenage']; $arrpeople[$num]['t_first_name'] = $or['t_first_name']; $arrpeople[$num]['t_last_name'] = $or['t_last_name']; if ($is_package === true || (!empty($or['cust_cost']) && $or['cust_cost'] > 0.00)) { //package or custom cost set from the back-end $is_cust_cost = true; continue; } $q = "SELECT * FROM `#__vikbooking_dispcost` WHERE `id`=".(int)$or['idtar'].";"; $dbo->setQuery($q); $dbo->execute(); $tar = $dbo->loadAssocList(); $tars[$num] = $tar; } //compose the calculation for pax_data $pax_data = array(); $count_pax_data = 0; if (count($customer) > 0) { $count_pax_data = 1; if (!empty($customer['pax_data'])) { $pax_data = json_decode($customer['pax_data'], true); $pax_data = !is_array($pax_data) ? array() : $pax_data; } } $all_countries = VikBooking::getCountriesArray(); // foreach ($rooms as $ind => $or) { $num = $ind + 1; //total guests details available $count_pax_data = $num < 2 ? $count_pax_data : 0; if (isset($pax_data[$ind])) { $count_pax_data = count($pax_data[$ind]); } //Room Specific Unit $spec_unit = ''; if (!empty($or['params'])) { $room_params = json_decode($or['params'], true); $arr_features = array(); if (is_array($room_params) && array_key_exists('features', $room_params) && @count($room_params['features']) > 0) { foreach ($room_params['features'] as $rind => $rfeatures) { foreach ($rfeatures as $fname => $fval) { if (strlen($fval)) { $arr_features[$rind] = '#'.$rind.' - '.JText::translate($fname).': '.$fval; break; } } } } if (isset($arr_features[$or['roomindex']])) { $spec_unit = $arr_features[$or['roomindex']]; } } // calculate the number of guests to register depending on settings $guests_to_register = $pax_fields_obj->registerChildren() ? ($arrpeople[$num]['adults'] + $arrpeople[$num]['children']) : $arrpeople[$num]['adults']; ?>
(/)
0) { if (!empty($arrpeople[$num]['children_age'])) { $json_child = json_decode($arrpeople[$num]['children_age'], true); if (is_array($json_child['age']) && count($json_child['age']) > 0) { $age_str = ' '.JText::sprintf('VBORDERCHILDAGES', implode(', ', $json_child['age'])); } } } ?>
0.00)) { ?> row['closure'] < 1) { ?> -----
$oo) { if (empty($oo)) { continue; } $hide_price = false; $stept = explode(":", $oo); $actopt = VikBooking::getSingleOption($stept[0]); if (!$actopt) { continue; } $chvar = ''; if (!empty($actopt['ageintervals']) && $or['children'] > 0 && strstr($stept[1], '-') != false) { $optagenames = VikBooking::getOptionIntervalsAges($actopt['ageintervals']); $optagepcent = VikBooking::getOptionIntervalsPercentage($actopt['ageintervals']); $optageovrct = VikBooking::getOptionIntervalChildOverrides($actopt, $or['adults'], $or['children']); $child_num = VikBooking::getRoomOptionChildNumber($or['optionals'], $actopt['id'], $roptkey, $or['children']); $optagecosts = VikBooking::getOptionIntervalsCosts(isset($optageovrct['ageintervals_child' . ($child_num + 1)]) ? $optageovrct['ageintervals_child' . ($child_num + 1)] : $actopt['ageintervals']); $agestept = explode('-', $stept[1]); $stept[1] = $agestept[0]; $chvar = $agestept[1]; if (array_key_exists(($chvar - 1), $optagepcent) && $optagepcent[($chvar - 1)] == 1) { //percentage value of the adults tariff if ($is_package === true || (!empty($or['cust_cost']) && $or['cust_cost'] > 0.00)) { $optagecosts[($chvar - 1)] = $or['cust_cost'] * $optagecosts[($chvar - 1)] / 100; } else { $display_rate = !empty($or['room_cost']) ? $or['room_cost'] : $tars[$num][0]['cost']; $hide_price = empty($or['room_cost']) ? true : $hide_price; $optagecosts[($chvar - 1)] = $display_rate * $optagecosts[($chvar - 1)] / 100; } } elseif (array_key_exists(($chvar - 1), $optagepcent) && $optagepcent[($chvar - 1)] == 2) { //VBO 1.10 - percentage value of room base cost if ($is_package === true || (!empty($or['cust_cost']) && $or['cust_cost'] > 0.00)) { $optagecosts[($chvar - 1)] = $or['cust_cost'] * $optagecosts[($chvar - 1)] / 100; } else { $display_rate = isset($tars[$num][0]['room_base_cost']) ? $tars[$num][0]['room_base_cost'] : (!empty($or['room_cost']) ? $or['room_cost'] : $tars[$num][0]['cost']); $hide_price = empty($or['room_cost']) ? true : $hide_price; $optagecosts[($chvar - 1)] = $display_rate * $optagecosts[($chvar - 1)] / 100; } } $actopt['chageintv'] = $chvar; $actopt['name'] .= ' ('.$optagenames[($chvar - 1)].')'; $realcost = (intval($actopt['perday']) == 1 ? (floatval($optagecosts[($chvar - 1)]) * $order['days'] * $stept[1]) : (floatval($optagecosts[($chvar - 1)]) * $stept[1])); } else { // VBO 1.11 - options percentage cost of the room total fee if ($is_package === true || (!empty($or['cust_cost']) && $or['cust_cost'] > 0.00)) { $deftar_basecosts = $or['cust_cost']; } else { $deftar_basecosts = !empty($or['room_cost']) ? $or['room_cost'] : $tars[$num][0]['cost']; } $actopt['cost'] = (int)$actopt['pcentroom'] ? ($deftar_basecosts * $actopt['cost'] / 100) : $actopt['cost']; // $realcost = (intval($actopt['perday']) == 1 ? ($actopt['cost'] * $order['days'] * $stept[1]) : ($actopt['cost'] * $stept[1])); } if ($actopt['maxprice'] > 0 && $realcost > $actopt['maxprice']) { $realcost = $actopt['maxprice']; if (intval($actopt['hmany']) == 1 && intval($stept[1]) > 1) { $realcost = $actopt['maxprice'] * $stept[1]; } } $realcost = $actopt['perperson'] == 1 ? ($realcost * $arrpeople[$num]['adults']) : $realcost; $tmpopr = VikBooking::sayOptionalsPlusIva($realcost, $actopt['idiva']); ?>
1 ? $stept[1]." " : "").$actopt['name'].(!$hide_price ? " ".$currencysymb." ".VikBooking::numberFormat($tmpopr) : ''); ?>
$ecv) { ?>
0) { ?>
$paxv) { // get an instance of the VBOCheckinPaxfield object $pax_field_obj = $pax_fields_obj->getField($paxk); // detect the current type of guest $guest_type = $g > $arrpeople[$num]['adults'] ? 'child' : 'adult'; // set object data $pax_field_obj->setGuestType($guest_type) ->setFieldNumber($pax_field_ind) ->setGuestNumber($g) ->setGuestData($current_guest) ->setRoomIndex($ind) ->setRoomGuests($arrpeople[$num]['adults'], $arrpeople[$num]['children']) ->setTotalRooms(count($arrpeople)); // render input field $pax_field_html = $pax_fields_obj->render($pax_field_obj); if (empty($pax_field_html)) { // nothing to display, increase the counter and continue $pax_field_ind++; continue; } // access the implementor object $implementor = $pax_fields_obj->getFieldTypeImplementor($pax_field_obj); // check if a particular CSS class has been defined $field_container_class = $implementor->getContainerClassAttr(); $field_container_class = !empty($field_container_class) ? " $field_container_class" : ''; ?>
$extrav) { if (isset($pax_fields[$extrak]) || (is_scalar($extrav) && !strlen($extrav))) { // this is a default pax field, we skip it continue; } $precheckin_field_lbl = isset($pre_pax_fields[$extrak]) ? $pre_pax_fields[$extrak] : $extrak; $precheckin_field_typ = isset($pre_pax_fields_attributes[$extrak]) && $pre_pax_fields_attributes[$extrak] == 'file' ? 'file' : 'text'; ?>
$guest_file) { if (empty($guest_file) || strpos($guest_file, 'http') !== 0) { continue; } $furl_segments = explode('/', $guest_file); $guest_fname = $furl_segments[(count($furl_segments) - 1)]; $read_fname = substr($guest_fname, (strpos($guest_fname, '_') + 1)); ?>
0) { $bcolortag['name'] = JText::translate($bcolortag['name']); $usectag = ' '; } ?> 0 ? '('.$otacurrency.') '.$currencysymb : $currencysymb); ?>
0) { $diff_to_pay = $order['total'] - $order['totpaid']; ?>
0) { ?>
0 && (count($customer) && !empty($customer['checkindoc']))) { //download check-in doc button only for checked-in||out and check-in doc $allowed_btns[] = 12; //add also the possibility of re-creating the document $allowed_btns[] = 11; } if ($order['checked'] == 1 && $today_midnight > $order['checkin']) { //check-out button only for checked-in and after the check-in day $allowed_btns[] = 2; } if ($order['checked'] != 0) { //cancel button only if not no-status $allowed_btns[] = 0; } //print buttons foreach ($allowed_btns as $chstatus) { switch ($chstatus) { case -1: ?>
= 1.8.24 */ ?>