public function hotel_revenue_list_filtered() { $hotels = new HotelColl(); if ($this->session->has_userdata('revFilter')) { $dateFilter = $this->session->userdata('revFilter'); if (array_key_exists("start-date", $dateFilter)) { $startDate = new DateFilter(); $startDate->setFilter(array('type' => 'start', 'value' => $dateFilter['start-date'][0])); $this->_viewData['dateStart'] = $dateFilter['start-date'][0]; } if (array_key_exists("end-date", $dateFilter)) { $endDate = new DateFilter(); $endDate->setFilter(array('type' => 'end', 'value' => $dateFilter['end-date'][0])); $this->_viewData['dateEnd'] = $dateFilter['end-date'][0]; } $hotels->addRevenueFilter($startDate); $hotels->addRevenueFilter($endDate); } if ($this->session->has_userdata('filter')) { $hotels = $this->_filterHotels($hotels); } if ($this->session->has_userdata('aggregate')) { $hotels->setAggregation($this->session->userdata('aggregate')); } $hotels->setAll(); if ($hotels->count() > 0) { $this->_viewData['hotels'] = $hotels; } $financeAccts = new FinanceAccts(); $financeAccts->setAll(); $this->_viewData['financeAccts'] = $financeAccts; $this->_setFilterCtrls(); $this->load->view('revenue_list_all', $this->_viewData); }