loadAnyOptions(); // load all tax rates $taxRates = VikBooking::getAvailabilityInstance()->getTaxRates(); // load all payment methods $paymentMethods = VBOMvcModel::getInstance('payment')->getItems( // clauses [ // exclude those payment methods that automatically confirm the booking // quote solutions (bookings) must be confirmed by placing an online payment 'setconfirmed' => 0, ], // start 0, // lim 0, // cols [], // ordering [ 'published' => 'DESC', 'name' => 'ASC', ] ); // build default message template $defaultMessage = ''; $siteLogo = VBOFactory::getConfig()->get('sitelogo'); $companyName = VikBooking::getFrontTitle(); if ($siteLogo) { $logoSrc = VBO_ADMIN_URI . 'resources/' . $siteLogo; $logoAlt = htmlspecialchars($companyName); $defaultMessage .= <<$defaultMessage

HTML; } $messageBody = preg_replace('/\R/', '
', nl2br(JText::translate('VBO_QUOTE_DEF_MESS'))); $defaultMessage .= << $companyName
$messageBody

$companyName



HTML; ?>
uuid}", false, (VikBooking::findProperItemIdType(['quote'], $quote->solutions[0]->lang ?? null) ?: null) ); ?>
id); ?>
created_on, 'd M Y H:i'), $quote->created_by ?? ''); ?>
uuid; ?>
$customer['id'], 'text' => sprintf('%s %s', $customer['first_name'] ?? '', $customer['last_name'] ?? ''), ]; } elseif (!empty($quote->idcustomer)) { $selectedCustomer = [ 'id' => $quote->idcustomer, 'text' => sprintf('%s %s', $quote->first_name ?? '', $quote->last_name ?? ''), ]; } echo $vbo_app->renderSearchElementsDropDown([ 'id' => 'vbo-quote-search-customer', 'elements' => 'customers', 'placeholder' => JText::translate('VBOSEARCHEXISTCUST'), 'allow_clear' => true, 'attributes' => [ 'name' => 'quote[customer][id]', 'data-field' => 'customer-id', ], 'style_selection' => true, 'selection_class' => 'vbo-sel2-selected-search-elem-full', 'selection_event' => 'vbo-quote-customer-chosen', 'load_assets' => false, 'selected_value' => $selectedCustomer ?: null, 'width' => '300px', ]); ?>
printPhoneInputField([ 'id' => 'vbo-quote-customer-phone', 'name' => 'quote[customer][phone]', 'value' => JHtml::fetch('esc_attr', $customer['phone'] ?? $quote->phone ?? ''), 'class' => 'vbo-calendar-cfield-phone', 'data-field' => 'customer-phone', 'data-isphone' => '1', ], [ 'fullNumberOnBlur' => true, 'countryDataEvent' => 'vbo-quote-get-phone-country-data', ]); ?>
solutions ?? []) as $solIndex => $solution) { // count booking solution values $totRooms = count($solution->rooms); $totAdults = array_sum(array_column($solution->rooms, 'adults')); $totChildren = array_sum(array_column($solution->rooms, 'children')); ?>

#

id; ?> status == 'confirmed') { ?> status == 'standby') { ?> status == 'cancelled') { ?> nights; ?>
rooms as $roomSolIndex => $roomSolution) { ?>

#

name; ?>
adults; ?>
children; ?>
optionals)) { // raw string expected $optionsList = array_values(array_unique(array_map(function($optStr) use ($optionRecords) { // get the option ID $optId = explode(':', $optStr)[0]; // find the corresponding name foreach ($optionRecords as $optionRecord) { if ($optionRecord['id'] == $optId) { return $optionRecord['name']; } } // default to option ID return $optId; }, array_filter(explode(';', $roomSolution->optionals))))); ?>
extracosts)) { // array of arrays expected ?>
extracosts, 'name')); ?>

total), $currencysymb); ?>

renderVisualEditor( 'quote_message_content', ($quote ? $quote->message : $defaultMessage), [ 'id' => 'vbo-quote-message-content', 'style' => 'min-height: 50px; width: 100%;', ], [ 'modes' => [ 'visual', 'text', ], 'gen_ai' => [ 'placeholders' => 1, 'environment' => 'quote', ], ], [ '{first_name}', '{last_name}', '{checkin_date}', '{checkout_date}', '{num_nights}', '{tot_adults}', '{tot_children}', '{tot_guests}', '{quote_link}', ] ); ?>
printYesNoButtons('quote_message_preferred', JText::translate('VBYES'), JText::translate('VBNO'), (!$quote || !empty($quote->preferred) ? 1 : 0), 1, 0); ?>
format('Y-m-d H:i'); if ($quote) { if (!empty($quote->valid_until)) { $validUntilVal = JHtml::fetch('date', $quote->valid_until, 'Y-m-d H:i'); } else { $validUntilVal = ''; } } echo $vbo_app->renderDateTimePicker([ 'id' => 'vbo-quote-valid-until', 'min' => JFactory::getDate('now')->format('Y-m-d\TH:i'), 'value' => $validUntilVal, 'attributes' => [ 'data-field' => 'valid-until', ], ]); ?>
printYesNoButtons('quote_send_later', JText::translate('VBYES'), JText::translate('VBNO'), 0, 1, 0); ?>