PluginProbe
VikBooking Hotel Booking Engine & PMS / 1.8.16
VikBooking Hotel Booking Engine & PMS v1.8.16
1.8.16 1.8.15 1.8.14 1.8.13 1.8.12 1.8.11 1.8.10 1.8.9 1.8.6 1.8.7 1.8.8 trunk 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 1.6.5 1.6.6 1.6.7 1.6.8 1.6.9 1.7.0 1.7.1 1.7.2 All 37 releases
← All changes | admin/helpers/widgets/check_availability.php +7 -4 1.6.5 → 1.8.16 View file →
@@ -164,9 +164,11 @@
164 164 $av_helper->setRoomIds($room_ids);
165 165 }
166 166
167 167 // load available room rates (all records, before pagination that will be applied later)
168 - $room_rates = $av_helper->getRates();
168 + $room_rates = $av_helper->getRates([
169 + 'wtax' => 1,
170 + ]);
169 171
170 172 // load rooms and rate plans
171 173 $all_rooms = $av_helper->loadRooms();
172 174 $all_rplans = $av_helper->loadRatePlans();
@@ -251,9 +253,10 @@
251 253 </div>
252 254 <div class="vbo-widget-checkav-result-rates-list">
253 255 <?php
254 256 foreach ($rates as $rplan) {
255 - $net_price = $rplan['cost'] - $rplan['taxes'];
257 + $rplan_taxes = isset($rplan['taxes']) ? $rplan['taxes'] : 0;
258 + $net_price = $rplan['cost'] - $rplan_taxes;
256 259 $js_book_args = "'$wrapper', '{$rid}', '{$checkin_date}', '{$checkout_date}', '{$num_adults}', '{$num_children}', '{$rplan['idprice']}'";
257 260 ?>
258 261 <div class="vbo-widget-checkav-result-room-rate">
259 262 <div class="vbo-widget-checkav-result-rate-name">
@@ -269,9 +272,9 @@
269 272 <?php echo $currency . ' ' . VikBooking::numberFormat($net_price); ?>
270 273 </span>
271 274 <span class="vbo-widget-checkav-result-rate-price vbo-widget-checkav-result-rate-tax">
272 275 <span><?php echo JText::translate('VBCALCRATESTAX'); ?></span>
273 - <?php echo $currency . ' ' . VikBooking::numberFormat($rplan['taxes']); ?>
276 + <?php echo $currency . ' ' . VikBooking::numberFormat($rplan_taxes); ?>
274 277 </span>
275 278 <?php
276 279 }
277 280 ?>
@@ -573,9 +576,9 @@
573 576 // load assets
574 577 $this->vbo_app->loadDatePicker();
575 578 }
576 579
577 - public function render(VBOMultitaskData $data = null)
580 + public function render(?VBOMultitaskData $data = null)
578 581 {
579 582 // increase widget's instance counter
580 583 static::$instance_counter++;
581 584