From cc9a4e6b92527fc9d110d2228a6cf7078dff89da Mon Sep 17 00:00:00 2001 From: Abhishek Kumar Date: Tue, 4 Apr 2023 20:01:54 +0530 Subject: [PATCH] Fix dashinsights comparison graphs issue --- modules/dashinsights/dashinsights.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/dashinsights/dashinsights.php b/modules/dashinsights/dashinsights.php index 78b19fef4..87b952df2 100644 --- a/modules/dashinsights/dashinsights.php +++ b/modules/dashinsights/dashinsights.php @@ -223,7 +223,7 @@ class DashInsights extends Module unset($idsHotel[$key]); } - if (count($idsHotel) > 2) { // display average series only if other hotels are available + if (count($idsHotel) > 0) { // display average series only if other hotels are available $averageRoomNightsData = AdminStatsController::getRoomNightsData($dateFrom, $dateTo, $idsHotel, true, true); $averageSeriesInfo = array( 'data' => $averageRoomNightsData, @@ -332,7 +332,7 @@ class DashInsights extends Module unset($idsHotel[$key]); } - if (count($idsHotel) > 1) { // display average series only if other hotels are available + if (count($idsHotel) > 0) { // display average series only if other hotels are available $averageDaysOfTheWeekData = AdminStatsController::getOccupiedRoomsForDaysOfTheWeek($dateFrom, $dateTo, $idsHotel, true, true); $averageSeriesInfo = array( 'data' => $averageDaysOfTheWeekData, @@ -465,7 +465,7 @@ class DashInsights extends Module unset($idsHotel[$key]); } - if (count($idsHotel) > 1) { // display average series only if other hotels are available + if (count($idsHotel) > 0) { // display average series only if other hotels are available $averageLengthOfStayData = AdminStatsController::getLengthOfStayPercentages($day, $dateFrom, $dateTo, $idsHotel, true, true); $averageSeriesInfo = array( 'data' => $averageLengthOfStayData,