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/report/occupancy_ranking.php +2 -2 1.8.15 → 1.8.16 View file →
@@ -634,9 +634,9 @@
634 634 $nights_booked += $booking_nights * $gbook[0]['roomsnum'];
635 635 $tot_bookings++;
636 636 // calculate net revenue and taxes
637 637 $tot_net = $gbook[0]['total'] - (float)$gbook[0]['tot_taxes'] - (float)$gbook[0]['tot_city_taxes'] - (float)$gbook[0]['tot_fees'] - (float)$gbook[0]['cmms'];
638 - $tot_net = $tot_net / $gbook[0]['days'] * $booking_nights;
638 + $tot_net = $tot_net / ($gbook[0]['days'] ?: 1) * $booking_nights;
639 639 $revenue += $tot_net;
640 640 if (!empty($gbook[0]['idorderota']) && !empty($gbook[0]['channel'])) {
641 641 $ota_revenue += $tot_net;
642 642 } else {
@@ -641,9 +641,9 @@
641 641 $ota_revenue += $tot_net;
642 642 } else {
643 643 $ibe_revenue += $tot_net;
644 644 }
645 - $tot_taxes = ((float)$gbook[0]['tot_taxes'] + (float)$gbook[0]['tot_city_taxes'] + (float)$gbook[0]['tot_fees'] + (float)$gbook[0]['cmms']) / $gbook[0]['days'] * $booking_nights;
645 + $tot_taxes = ((float)$gbook[0]['tot_taxes'] + (float)$gbook[0]['tot_city_taxes'] + (float)$gbook[0]['tot_fees'] + (float)$gbook[0]['cmms']) / ($gbook[0]['days'] ?: 1) * $booking_nights;
646 646 $taxes += $tot_taxes;
647 647 }
648 648 }
649 649 $occupancy = round(($nights_booked * 100 / $range_max_occupancy), 2);