function display($tpl = null)
 {
     $this->state = $this->get('State');
     $this->countries = $this->get('Countries');
     $this->guestTypes = JHotelReservationHelper::getGuestTypes();
     $this->userData = UserDataService::getUserData();
     $this->hotel = HotelService::getHotel($this->userData->hotelId);
     $this->appSettings = JHotelUtil::getInstance()->getApplicationSettings();
     if ($this->appSettings->save_all_guests_data) {
         UserDataService::prepareGuestDetails();
     }
     $hotelId = JRequest::getVar("hotel_id");
     $reservedItems = JRequest::getVar("reservedItems");
     if (!empty($reservedItems)) {
         UserDataService::updateRooms($hotelId, $reservedItems);
     }
     $this->reservationDetails = $this->get("ReservationDetails");
     $this->showDiscounts = true;
     parent::display($tpl);
 }