diff --git a/controllers/admin/AdminOrdersController.php b/controllers/admin/AdminOrdersController.php index b852574d71..4923cd4158 100644 --- a/controllers/admin/AdminOrdersController.php +++ b/controllers/admin/AdminOrdersController.php @@ -2585,11 +2585,11 @@ public function renderKpis() $helper->id = 'box-today-stay-over'; $helper->icon = 'icon-user'; $helper->color = 'color4'; - $helper->title = $this->l('Stay Overs', null, null, false); + $helper->title = $this->l('Occupied Rooms', null, null, false); $helper->subtitle = $this->l('Today', null, null, false); $helper->href = $this->context->link->getAdminLink('AdminOrders').'&submitResetorder&submitFilterorder=1&orderFilter_hbd!is_refunded=0&orderFilter_hbd!id_status='.HotelBookingDetail::STATUS_CHECKED_IN.'&orderFilter_hbd!date_to[]='.pSQL(date('Y-m-d', strtotime('+ 1 days'))).'&orderFilter_hbd!date_to[]='; - $helper->source = $this->context->link->getAdminLink('AdminStats').'&ajax=1&action=getKpi&kpi=today_stay_over'; - $helper->tooltip = $this->l('Total number of stay overs for today.', null, null, false); + $helper->source = $this->context->link->getAdminLink('AdminStats').'&ajax=1&action=getKpi&kpi=occupied_rooms'; + $helper->tooltip = $this->l('The count of rooms that are currently occupied by guests.', null, null, false); $this->kpis[] = $helper; $helper = new HelperKpi(); diff --git a/modules/dashguestcycle/dashguestcycle.php b/modules/dashguestcycle/dashguestcycle.php index 601e117042..ade5cd28ef 100644 --- a/modules/dashguestcycle/dashguestcycle.php +++ b/modules/dashguestcycle/dashguestcycle.php @@ -79,7 +79,7 @@ public function hookDashboardData($params) $dataValue['dgc_total_departures'] = sprintf('%02d', rand(100, 1000)); $dataValue['dgc_departed'] = sprintf('%02d', rand(0, $dataValue['dgc_total_departures'])); $dataValue['dgc_new_bookings'] = sprintf('%02d', rand(10, 500)); - $dataValue['dgc_stay_overs'] = sprintf('%02d', rand(10, 500)); + $dataValue['dgc_occupied'] = sprintf('%02d', rand(10, 500)); $dataValue['dgc_new_messages'] = sprintf('%02d', rand(0, 20)); $dataValue['dgc_cancelled_bookings'] = sprintf('%02d', rand(0, 20)); $dataValue['dgc_guests_adults'] = sprintf('%02d', rand(100, 1000)); @@ -94,7 +94,12 @@ public function hookDashboardData($params) $dataValue['dgc_departed'] = sprintf('%02d', $departuresData['departed']); $dataValue['dgc_total_departures'] = sprintf('%02d', $departuresData['total_departures']); $dataValue['dgc_new_bookings'] = sprintf('%02d', count(AdminStatsController::getNewBookingsInfoByDate($dateToday, $params['id_hotel']))); - $dataValue['dgc_stay_overs'] = sprintf('%02d', AdminStatsController::getStayOversByDate($dateToday, $params['id_hotel'])); + $dataValue['dgc_occupied'] = sprintf('%02d', AdminStatsController::getDistinctRoomBookingsCount( + date('Y-m-d', strtotime('-1 day')), + $dateToday, + $params['id_hotel'], + HotelBookingDetail::STATUS_CHECKED_IN + )); $dataValue['dgc_new_messages'] = sprintf('%02d', CustomerMessage::getMessagesByDate($dateToday)); $dataValue['dgc_cancelled_bookings'] = sprintf('%02d', AdminStatsController::getCancelledBookingsByDate($dateToday, $params['id_hotel'])); $dataValue['dgc_guests_adults'] = sprintf('%02d', $guestsData['adults']); diff --git a/modules/dashguestcycle/views/templates/hook/dashboard-top.tpl b/modules/dashguestcycle/views/templates/hook/dashboard-top.tpl index be28fd58c2..8df983b065 100644 --- a/modules/dashguestcycle/views/templates/hook/dashboard-top.tpl +++ b/modules/dashguestcycle/views/templates/hook/dashboard-top.tpl @@ -68,15 +68,15 @@
-
+
-

{l s="Stay Overs" mod='dashguestcycle'}

+

{l s='Occupied Rooms' mod='dashguestcycle'}

- +