row; $rooms = $this->rooms; $busy = $this->busy; $customer = $this->customer; $payments = $this->payments; $history_obj = VikBooking::getBookingHistoryInstance($row['id']); // availability helper $av_helper = VikBooking::getAvailabilityInstance(); // load datepicker for all CMS compatibility JHtml::fetch('stylesheet', VBO_SITE_URI.'resources/jquery-ui.min.css'); JHtml::fetch('jquery.framework', true, true); JHtml::fetch('script', VBO_SITE_URI.'resources/jquery-ui.min.js'); // js lang def JText::script('VBO_CONV_RES_OTA_CURRENCY_APPLY'); JText::script('VBDELCONFIRM'); JText::script('VBSENDCANCORDEMAIL'); JText::script('VBO_SET_STANDBY'); JText::script('VBO_CONF_RM_OVERBOOKING_FLAG'); JText::script('VBO_NEW_PAYSCHEDULE'); JText::script('VBANNULLA'); JText::script('VBOCLOSE'); JText::script('VBSAVE'); JText::script('VBELIMINA'); JText::script('VBO_REG_NEW_PAYMENT'); JText::script('VBO_UPDATE_PAYMENT'); JText::script('VBSENDSMSACTION'); JText::script('VBSENDEMAILACTION'); JText::script('VBO_AI_AUTO_GUEST_REV_EXCLUDE'); JText::script('VBO_AI_AUTO_GUEST_REV_INCLUDE'); $dbo = JFactory::getDbo(); $vbo_app = VikBooking::getVboApplication(); $vbo_app->loadVisualEditorAssets(); $vbo_app->prepareJavaScriptCurrency(); // preload chat assets VBOFactory::getChatMediator()->useAssets(); /** * This View can render within a modal the "bookingcheckin" View, and with WP * this is loaded via AJAX. In order to not interfere or reset the contextual menu, * we load the assets from the parent View. Context menu may also be used in this View. * * @since 1.16.0 (J) - 1.6.0 (WP) */ $vbo_app->loadContextMenuAssets(); if (VBOPlatformDetection::isWordPress()) { JText::script('VBRENTALORD'); JText::script('VBPVIEWORDERSPEOPLE'); } $canDo = JFactory::getUser(); $vbo_auth_bookings = $canDo->authorise('core.vbo.bookings', 'com_vikbooking'); // check if automatic payment collection is enabled for all bookings $automatic_payment_collection = VBOFactory::getConfig()->getBool('auto_payment_collection', false); $booking_has_damage_dep = 0; $current_ts = time(); $ota_type_data = !empty($row['ota_type_data']) ? ((array) json_decode($row['ota_type_data'], true)) : []; $currencyname = VikBooking::getCurrencyName(); $currencysymb = VikBooking::getCurrencySymb(); $after_tax = VikBooking::ivaInclusa(); $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); $vbo_modals_html = array(); $payment = VikBooking::getPayment($row['idpayment']); $pactive_tab = VikRequest::getString('vbo_active_tab', 'vbo-tab-details', 'request'); $printreceipt = VikRequest::getInt('print', 0, 'request'); $printreceipt = ($printreceipt > 0); if ($printreceipt) { //we set a different page title when printing the receipt for the "PDF Printer" to give the file a good name. JFactory::getDocument()->setTitle(VikBooking::getFrontTitle()." - ".JText::translate('VBOFISCRECEIPT')." #".$row['id']); } $gotouri = 'index.php?option=com_vikbooking&task=editorder&cid[]='.$row['id']; if ($row['status'] == "confirmed") { $use_js_bid = $row['id']; JFactory::getDocument()->addScriptDeclaration( << $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']; $arrpeople[$num]['pets'] = $or['pets']; 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); $tar = $dbo->loadAssocList(); $tar = VikBooking::applySeasonsRoom($tar, $row['checkin'], $row['checkout']); // apply OBP rules $tar = VBORoomHelper::getInstance()->applyOBPRules($tar, $or, $or['adults']); $tars[$num] = $tar; } $pcheckin = $row['checkin']; $pcheckout = $row['checkout']; $secdiff = $pcheckout - $pcheckin; $daysdiff = $secdiff / 86400; if (is_int($daysdiff)) { if ($daysdiff < 1) { $daysdiff = 1; } } else { if ($daysdiff < 1) { $daysdiff = 1; } else { $sum = floor($daysdiff) * 86400; $newdiff = $secdiff - $sum; $maxhmore = VikBooking::getHoursMoreRb() * 3600; if ($maxhmore >= $newdiff) { $daysdiff = floor($daysdiff); } else { $daysdiff = ceil($daysdiff); } } } $otachannel = ''; $otachannel_name = ''; $otachannel_bid = ''; $otacurrency = ''; if (!empty($row['channel'])) { $channelparts = explode('_', $row['channel']); $otachannel = array_key_exists(1, $channelparts) && strlen($channelparts[1]) > 0 ? $channelparts[1] : ucwords($channelparts[0]); $otachannel_name = $otachannel; $otachannel_bid = $otachannel.(!empty($row['idorderota']) ? ' - Booking ID: '.$row['idorderota'] : ''); if (strstr($otachannel, '.') !== false) { $otaccparts = explode('.', $otachannel); $otachannel = $otaccparts[0]; } $otacurrency = strlen((string) $row['chcurrency']) > 0 ? $row['chcurrency'] : ''; } /** * Tell whether the current reservation has or may have a CC/VCC available. */ $may_have_cc_details = false; if (!empty($row['paymentlog']) && stripos($row['paymentlog'], 'card number') !== false && strpos($row['paymentlog'], '****') !== false) { // turn flag on for partial card details available $may_have_cc_details = true; } elseif (!empty($row['channel']) && !strcasecmp($otachannel_name, 'Booking.com')) { // the CM may be able to retrieve the CC details via API $may_have_cc_details = true; } $status_type = ''; if (!empty($row['type'])) { $status_type = JText::translate('VBO_BTYPE_' . strtoupper($row['type'])); if (!strcasecmp($row['type'], 'overbooking')) { $status_type = '' . $status_type . ''; } $status_type .= ' / '; } $extra_status = $row['refund'] > 0 ? ' / ' . JText::translate('VBO_STATUS_REFUNDED') : ''; if ($row['status'] == "confirmed") { $saystaus = '' . $status_type . JText::translate('VBCONFIRMED') . $extra_status . ''; } elseif ($row['status'] == "standby") { $saystaus = '' . $status_type . JText::translate('VBSTANDBY') . $extra_status . ''; } else { $saystaus = '' . $status_type . JText::translate('VBCANCELLED') . $extra_status . ''; } // extend booking details main panel $bookingPanelForms = $this->onDisplayView(); // extend booking details sidebar $bookingSidebarForms = $this->onDisplayView('Sidebar'); // extend administration main panel $adminFormsSetup = new stdClass; $adminFormsSetup->icons = []; $adminPanelForms = $this->onDisplayView('Administration', $adminFormsSetup); // extend administration sidebar $adminSidebarForms = $this->onDisplayView('AdministrationSidebar'); /** * Check if messaging accounts have been configured through the E4jConnect Channel Manager. * If some messaging API accounts have been configured, SMS fallback will no longer be displayed. * * @since 1.18.8 (J) - 1.8.8 (WP) */ $messagingAccountConfigurations = []; if (class_exists('VCMMessagingAccountsModel')) { $registry = VBOBookingRegistry::getInstance($this->row, $this->rooms); $messagingAccountConfigurations = VCMMessagingAccountsModel::getInstance()->getConfigurationsData( new VCMMessagingTemplateDecoratorBooking($registry), [ 'listings' => $registry->getBookedListingIds(), ] ); } //Prepare modal (used for the Registration and for reconstructing the credit card details through the channel manager) echo $vbo_app->getJmodalScript(); //end Prepare modal ?>
ID
authorise('core.edit', 'com_vikbooking') && $canDo->authorise('core.vbo.management', 'com_vikbooking')): ?>
getJmodalHtml('vbo-checkin-booking', JText::translate('VBOMANAGECHECKSINOUT'))); //end Prepare modal } /** * Check whether the booking can be refunded or charged through an off-session capturing. * * @since 1.14 (J) - 1.4.0 (WP) * @since 1.18.0 (J) - 1.8.0 (WP) added support to off-session capturing. */ // refundable/capturable up to 7 days after check-out day $max_refund_ts = mktime(23, 59, 59, $checkout_info['mon'], ($checkout_info['mday'] + 7), $checkout_info['year']); // current payment driver must be set $tn_driver = is_array($payment) ? $payment['file'] : null; // transaction data validation callback $tn_data_callback = function($data) use ($tn_driver) { return (is_object($data) && isset($data->driver) && basename($data->driver, '.php') == basename($tn_driver, '.php')); }; $prev_tn_data = $history_obj->getEventsWithData(array('P0', 'PN'), $tn_data_callback); // whether it's refundable/capturable $refundable = ($row['status'] != 'standby' && !empty($row['totpaid']) && $max_refund_ts >= $current_ts && is_array($prev_tn_data) && $prev_tn_data); $off_session_capturing = ($row['status'] != 'standby' && $max_refund_ts >= $current_ts && is_array($prev_tn_data) && array_filter($prev_tn_data, function($data) { return is_object($data) && ($data->future_usage ?? null); })); if ($off_session_capturing) { ?>
getJmodalHtml('vbo-refund-tn', JText::translate('VBO_ISSUE_REFUND'))); echo $vbo_app->getJmodalScript('Refund', 'vboDetectRefundChanges();'); // count the number of refunds made $refunds = $history_obj->getEventsWithData('RF', null, false); $refunds = !is_array($refunds) ? array() : $refunds; ?>
'; } ?>
getChannelsAssignable(); if ($assignable_channels) { JText::script('VBO_ASSIGN_BOOKING_TO_OTA_CONFIRM'); JFactory::getDocument()->addScriptDeclaration( <<
vcm_pre_approval)) { ?>
vcm_pre_approval[1]; ?>
vcm_pre_approval[2]) || !empty($this->vcm_pre_approval[3])) { // no pre-approvals before, or withdrawn before ?>
= $current_ts) { /** * Guest misconduct reporting API for Booking.com. * Only after reservation check-in date and no later than 7 days after check-out date. * * @since 1.13.5 - VCM 1.7.2 */ $misconduct_reported = $history_obj->hasEvent('GM'); ?>

×

vcm_host_to_guest_review) { ?>
getJmodalHtml('vbo-vcm-host-to-guest-review', JText::translate('VBO_REVIEW_YOUR_GUEST'))); // check if a notification was clicked if (VikRequest::getString('notif_action', '', 'request') == 'airbnb_host_guest_review') { JFactory::getDocument()->addScriptDeclaration( << { jQuery('.vcm-btn-channel-airbnbapi').trigger('click'); }, 500); }); JS ); } } } ?>
allows_conversion !== false) { ?>
conv_from_currency, $this->conv_to_currency); ?> conv_from_currency . ' ' . VikBooking::numberFormat($row['total'])), ($this->conv_to_currency . ' ' . VikBooking::numberFormat($this->allows_conversion))); ?>
av_type)); }; $prev_ir_data = $history_obj->getEventsWithData('IR', $ir_data_callback, true); if (is_array($prev_ir_data) && $prev_ir_data) { // display a message about the availability type at the time of creation of the inquiry reservation // parse original stay dates into DateTime objects $orig_checkin_dt_obj = new JDate($prev_ir_data[0]->checkin_date); $orig_checkout_dt_obj = new JDate($prev_ir_data[0]->checkout_date); ?>
av_type === 1) { echo JText::translate('VBO_WEB_INQUIRY_AVTYPE_1'); } elseif ($prev_ir_data[0]->av_type === 2) { echo JText::translate('VBO_WEB_INQUIRY_AVTYPE_2'); } elseif ($prev_ir_data[0]->av_type === 3) { echo JText::translate('VBO_WEB_INQUIRY_AVTYPE_3'); } else { echo JText::translate('VBO_WEB_INQUIRY_AVTYPE_4'); } ?> format('D, d M Y', true); ?> format('D, d M Y', true); ?> adults; ?> children)) { ?> children; ?>
[ 'id' => $customer['id'] ?? null, 'first_name' => $customer['first_name'] ?? null, 'last_name' => $customer['last_name'] ?? null, 'email' => $customer['email'] ?? null, 'phone' => $customer['phone'] ?? null, 'country' => $customer['country'] ?? null, ], 'inquiry' => [ 'checkin' => date('Y-m-d', $row['checkin']), 'checkout' => date('Y-m-d', $row['checkout']), 'parties' => array_map(function($or) { return [ 'adults' => $or['adults'] ?? 1, 'children' => $or['children'] ?? 0, ]; }, $rooms), 'rooms' => array_map(function($or) { return [ 'id' => $or['idroom'] ?? 0, ]; }, $rooms), ], ]); ?>
best('booking'); if (!$itemid) { VikError::raiseWarning('', 'No Shortcodes found, or no Shortcodes being used in Pages/Posts.'); } } ?>
vcm_special_offer)) { if (empty($this->vcm_special_offer[3]) || !empty($this->vcm_special_offer[4])) { // no special offer sent before, or withdrawn ?>
getJmodalHtml('vbo-vcm-special-offer', JText::sprintf('VBO_VCM_SPECIAL_OFFER', $this->vcm_special_offer[2]))); // end prepare modal } else { // special offer sent before, link to withdraw it ?> = $current_ts)) { ?>
0 || $this->vcm_cancel_active_res) { if ($this->vcm_decline_actions) { // this booking requires some decline actions before being removed ?>
getJmodalHtml('vbo-vcm-decline-booking', JText::translate('VBMAINEBUSYDEL'))); // end prepare modal } elseif ($this->vcm_cancel_active_res) { // the active OTA booking can be cancelled ?>
getJmodalHtml('vbo-vcm-cancel-reservation', JText::translate('VBMAINEBUSYDEL'))); // end prepare modal } else { // regular remove button with confirmation ?>
filterItems(['id_order' => $row['id']]); ?>
getTitle(); ?> getAreaName($task->getAreaID()); ?>
get('hasUnreadMessages', false); if ($taskUnreadMessages) { ?>
statusTypeExists($task->getStatus())) { $taskStatus = $taskManager->getStatusTypeInstance($task->getStatus()); ?>
getName(); ?>
2 && strpos($custdata_parts[0], ':') !== false && strpos($custdata_parts[1], ':') !== false) { //attempt to format labels and values foreach ($custdata_parts as $custdet) { if (strlen($custdet) < 1) { continue; } $custdet_parts = explode(':', $custdet); $custd_lbl = ''; $custd_val = ''; if (count($custdet_parts) < 2) { $custd_val = $custdet; } else { $custd_lbl = $custdet_parts[0]; if ($custd_lbl == 'http' || $custd_lbl == 'https') { // shift values $custdet_parts[2] = $custdet_parts[1]; $custdet_parts[1] = $custdet_parts[0]; $custd_lbl = ''; } unset($custdet_parts[0]); if ((!strcasecmp(trim($custdet_parts[1]), 'http') || !strcasecmp(trim($custdet_parts[1]), 'https')) && !empty($custdet_parts[2]) && strpos($custdet_parts[2], '//') !== false) { // this is a URI $custd_val = ''; } else { $custd_val = htmlspecialchars(trim(implode(':', $custdet_parts))); } } ?>
0) { ?>
 
name) ? $orig_user->name : ''; ?>
implode(DIRECTORY_SEPARATOR, [VBO_SITE_PATH, 'helpers', 'invoices', 'generated', "{$row['id']}_{$inv_sid}.pdf"]), 'uri' => VBO_SITE_URI . 'helpers/invoices/generated/' . "{$row['id']}_{$inv_sid}.pdf", 'label' => JText::translate('VBOCOLORTAGRULEINVONE'), 'btn' => JText::translate('VBOINVDOWNLOAD'), ] ]; /** * Merge the additional invoices generated by the e-invoicing drivers for this booking. * * @since 1.16.7 (J) - 1.6.7 (WP) */ $invoice_details = array_merge($invoice_details, VBOEinvoicingFactory::getInstance()->getBookingExtraInvoices($row['id'])); /** * Trigger event to allow third-party plugins to define additional invoices or paths/urls. * * @since 1.16.7 (J) - 1.6.7 (WP) */ VBOFactory::getPlatform()->getDispatcher()->trigger('onBeforeListInvoices', [$row, &$invoice_details]); // check if an invoice exists $invoiced = false; foreach ((array) $invoice_details as $invoice_detail) { $invoiced = $invoiced || is_file($invoice_detail['path']); } // extra booking details if (!$printreceipt && ((!empty($row['channel']) && !empty($row['idorderota'])) || strlen((string)$row['confirmnumber']) || $invoiced)) { ?>
getTinyLogoURL(); } $displayOtaBid = !strcasecmp((string) $row['type'], 'Inquiry') && $row['status'] == 'standby' ? '' : $row['idorderota']; ?>
isGuestReviewAutoResponderEnabled()) { // host-to-guest review will be supported and AI auto-guest-review is enabled $ai_auto_guest_review_opt = (array) VBOFactory::getConfig()->getArray('ai_auto_guest_review_opt_' . $row['id'], []); ?>

vcm_review) { ?> getUri()->admin('index.php?option=com_vikchannelmanager&task=reviews&revid=' . $this->vcm_review['id'], false); $vcm_review_id = $this->vcm_review['id']; JFactory::getDocument()->addScriptDeclaration( << { // document.location.href = '$vcm_review_link'; VBOCore.handleDisplayWidgetNotification({widget_id: 'guest_reviews'}, {review_id: '$vcm_review_id'}); }, 200); }); JS ); } } ?>
printPhoneInputField(array('name' => 'custphone', 'id' => 'custphone', 'value' => $this->escape($row['phone'])), array('nationalMode' => false, 'fullNumberOnBlur' => true)); ?>
$form) { if (in_array($legend, ['userdetails', 'invoice', 'email', 'phone'])) { // skip default forms continue; } ?>

loadSplitStayBusyRecords($row['id']); } else { $room_stay_dates = VBOFactory::getConfig()->getArray('split_stay_' . $row['id'], []); } } elseif (!$row['split_stay'] && $row['roomsnum'] > 1 && $row['days'] > 1 && $row['status'] == 'confirmed') { // load the occupied stay dates for each room in case they were modified $room_stay_records = $av_helper->loadSplitStayBusyRecords($row['id']); } // parse all rooms booked foreach ($rooms as $ind => $or) { $num = $ind + 1; $room_icon = $row['split_stay'] && $ind > 0 ? 'random' : 'bed'; $room_stay_nights = $row['days']; ?> $oo) { if (empty($oo)) { continue; } $stept = explode(":", $oo); $q = "SELECT * FROM `#__vikbooking_optionals` WHERE `id`=".(int)$stept[0].";"; $dbo->setQuery($q); $actopt = $dbo->loadAssocList(); if (!$actopt) { continue; } // option params $opt_params = !empty($actopt[0]['oparams']) ? json_decode($actopt[0]['oparams'], true) : []; $opt_params = is_array($opt_params) ? $opt_params : []; if ($opt_params['damagedep'] ?? 0) { // turn flag on $booking_has_damage_dep = 1; } $counter++; $chvar = ''; if (!empty($actopt[0]['ageintervals']) && $or['children'] > 0 && strstr($stept[1], '-') != false) { $optagenames = VikBooking::getOptionIntervalsAges($actopt[0]['ageintervals']); $optagepcent = VikBooking::getOptionIntervalsPercentage($actopt[0]['ageintervals']); $optageovrct = VikBooking::getOptionIntervalChildOverrides($actopt[0], $or['adults'], $or['children']); $child_num = VikBooking::getRoomOptionChildNumber($or['optionals'], $actopt[0]['id'], $roptkey, $or['children']); $optagecosts = VikBooking::getOptionIntervalsCosts(isset($optageovrct['ageintervals_child' . ($child_num + 1)]) ? $optageovrct['ageintervals_child' . ($child_num + 1)] : $actopt[0]['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']; $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']); $optagecosts[($chvar - 1)] = $display_rate * $optagecosts[($chvar - 1)] / 100; } } if (!isset($optagenames[($chvar - 1)])) { $optagenames[($chvar - 1)] = ''; } if (!isset($optagecosts[($chvar - 1)])) { $optagecosts[($chvar - 1)] = 0; } $actopt[0]['chageintv'] = $chvar; $actopt[0]['name'] .= ' ('.$optagenames[($chvar - 1)].')'; $realcost = (intval($actopt[0]['perday']) == 1 ? (floatval($optagecosts[($chvar - 1)]) * $room_stay_nights * $stept[1]) : (floatval($optagecosts[($chvar - 1)]) * $stept[1])); } elseif (is_numeric($stept[1])) { // 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 { $use_def_tar = isset($tars[$num]) && isset($tars[$num][0]) ? $tars[$num][0]['cost'] : 0; $deftar_basecosts = !empty($or['room_cost']) ? $or['room_cost'] : $use_def_tar; } $actopt[0]['cost'] = (int)$actopt[0]['pcentroom'] ? ($deftar_basecosts * $actopt[0]['cost'] / 100) : $actopt[0]['cost']; // $realcost = (intval($actopt[0]['perday']) == 1 ? ($actopt[0]['cost'] * $room_stay_nights * $stept[1]) : ($actopt[0]['cost'] * $stept[1])); } else { $realcost = 0; } if ($actopt[0]['maxprice'] > 0 && $realcost > $actopt[0]['maxprice']) { $realcost = $actopt[0]['maxprice']; if (intval($actopt[0]['hmany']) == 1 && intval($stept[1]) > 1) { $realcost = $actopt[0]['maxprice'] * $stept[1]; } } $realcost = $actopt[0]['perperson'] == 1 ? ($realcost * $arrpeople[$num]['adults']) : $realcost; /** * Trigger event to allow third party plugins to apply a custom calculation for the option/extra fee or tax. * * @since 1.17.7 (J) - 1.7.7 (WP) */ $custom_calculation = VBOFactory::getPlatform()->getDispatcher()->filter('onCalculateBookingOptionFeeCost', [$realcost, &$actopt[0], $row, $or]); if ($custom_calculation) { $realcost = (float) $custom_calculation[0]; } $tmpopr = VikBooking::sayOptionalsPlusIva($realcost, $actopt[0]['idiva']); ?> $ecv) { $counter++; $ecv['idtax'] = isset($ecv['idtax']) ? $ecv['idtax'] : 0; ?> 0) { $expcoupon = explode(";", $row['coupon']); ?> 0) { ?> 0) { //only last type of price assuming that the tax breakdown is equivalent in case of different rates $q = "SELECT `p`.`id`,`p`.`name`,`p`.`idiva`,`t`.`aliq`,`t`.`breakdown` FROM `#__vikbooking_prices` AS `p` LEFT JOIN `#__vikbooking_iva` `t` ON `p`.`idiva`=`t`.`id` WHERE `p`.`id`=".intval(array_pop($all_id_prices))." LIMIT 1;"; $dbo->setQuery($q); $breakdown_info = $dbo->loadAssoc(); if ($breakdown_info) { if (!empty($breakdown_info['breakdown']) && !empty($breakdown_info['aliq'])) { $tax_breakdown = json_decode($breakdown_info['breakdown'], true); $tax_breakdown = is_array($tax_breakdown) && $tax_breakdown ? $tax_breakdown : array(); $base_aliq = $breakdown_info['aliq']; } } } // if ($printreceipt && $row['tot_taxes'] > 0) { // only when printing the receipt we display an additional row for the total amount of tax ?> 0 && !$row['closure']) { $has_paid = ($row['totpaid'] > 0); $diff_to_pay = $has_paid ? ($row['total'] - $row['totpaid']) : 0; if ($diff_to_pay && !empty($row['idorderota']) && !empty($row['channel']) && round($row['cmms'], 2) == round($diff_to_pay, 2)) { // the outstanding balance is equal to the OTA commissions amount $diff_to_pay = 0; } if ($has_paid || $row['status'] != 'standby') { ?> 1 && $row['status'] != 'cancelled') { ?> strtotime('-10 days')) { /** * The amount payable can be modified by the admin. * * @since 1.14 (J) - 1.4.0 (WP) */ ?> 0) { ?>
$rfeatures) { if (in_array($rind, $unavailable_indexes) || (isset($used_indexes_map[$or['idroom']]) && in_array($rind, $used_indexes_map[$or['idroom']]))) { continue; } foreach ($rfeatures as $fname => $fval) { if (strlen($fval)) { $arr_features[$rind] = '#'.$rind.' - '.JText::translate($fname).': '.$fval; break; } } } } if ($arr_features) { // $or['id'] equals to the ID of each matching record in _ordersrooms ?>
getNiceSelect($arr_features, $or['roomindex'], 'roomindex['.$or['id'].']', JText::translate('VBOFEATASSIGNUNIT'), JText::translate('VBOFEATASSIGNUNITEMPTY'), '', 'document.adminForm.submit();', $or['id']) : (!empty($or['roomindex']) && isset($arr_features[$or['roomindex']]) ? $arr_features[$or['roomindex']] : ''); ?>
:
0) { $age_str = ''; if (!empty($arrpeople[$num]['children_age'])) { $json_child = json_decode($arrpeople[$num]['children_age'], true); if (is_array($json_child) && isset($json_child['age']) && is_array($json_child['age']) && $json_child['age']) { $age_str = ' '.JText::sprintf('VBORDERCHILDAGES', implode(', ', $json_child['age'])); } } ?>
:
0) { ?>
:
0.00)) { if (!empty($or['pkg_name'])) { //package echo $or['pkg_name']; } else { //custom cost can have an OTA Rate Plan name if (!empty($or['otarplan'])) { echo ucwords($or['otarplan']); } else { echo JText::translate('VBOROOMCUSTRATEPLAN'); } } } elseif (!empty($tars[$num]) && !empty($tars[$num][0]['idprice'])) { $active_rplan_id = $tars[$num][0]['idprice']; $all_id_prices[] = $tars[$num][0]['idprice']; echo VikBooking::getPriceName($tars[$num][0]['idprice']); if (!empty($tars[$num][0]['attrdata'])) { ?>
roomRateIncludedMeals($or); } else { // fetch default included meals in the selected rate plan $included_meals = $active_rplan_id ? VBOMealplanManager::getInstance()->ratePlanIncludedMeals($active_rplan_id) : []; } if (!$included_meals && empty($or['meals']) && !empty($row['idorderota']) && !empty($row['channel']) && !empty($row['custdata'])) { // attempt to fetch the included meal plans from the raw customer data or OTA reservation and room $included_meals = VBOMealplanManager::getInstance()->otaDataIncludedMeals($row, $or); } if ($included_meals) { ?>
countNightsOfStay($room_stay_checkin, $room_stay_checkout); ?>
1 ? JText::translate('VBDAYS') : JText::translate('VBDAY')); ?>
countNightsOfStay($room_stay_checkin, $room_stay_checkout); if ($room_stay_checkin != $row['checkin'] || $room_stay_checkout != $row['checkout']) { ?>
1 ? JText::translate('VBDAYS') : JText::translate('VBDAY')); ?>
0.00)) { echo $currencyname.' '.VikBooking::numberFormat($or['cust_cost']); } elseif (!empty($tars[$num]) && !empty($tars[$num][0]['idprice'])) { $display_rate = !empty($or['room_cost']) ? $or['room_cost'] : $tars[$num][0]['cost']; echo $currencyname.' '.VikBooking::numberFormat(($after_tax ? VikBooking::sayCostPlusIva($display_rate, $tars[$num][0]['idprice']) : $display_rate)); } ?>
1 ? $stept[1]." " : "").$actopt[0]['name']; ?>
-
= $current_ts && !empty($ota_type_data['expected_payout'])) { ?>
 
 
0) && VikBooking::multiplePayments() && is_array($payment) && !empty($payment['id'])) { ?>
  0 ? JText::translate('VBO_AMOUNT_PAYABLE') : JText::translate('VBO_AMOUNT_PAYABLE_RQ'); ?>
0) { ?>
 
$form) { if (in_array($legend, ['buttons'])) { // skip default forms continue; } ?>

'; } $pgoto = VikRequest::getString('goto', '', 'request'); if (in_array($pgoto, ['overv', 'ratesoverv'])) { echo ''; } ?>