public function display($tpl = null) { $task = JRequest::getWord('task'); TOOLBAR_enmasse::_SMENU(); TOOLBAR_enmasse::_PARTIAL_ORDER(); $filter = JRequest::getVar('filter', array()); // Weird that only this will caused warning... if (!isset($filter['deal_name'])) { $filter['deal_name'] = ""; } if (!isset($filter['deal_code'])) { $filter['deal_code'] = ""; } if (!isset($filter['status'])) { $filter['status'] = ""; } if (!isset($filter['year'])) { $filter['year'] = ""; } if (!isset($filter['month'])) { $filter['month'] = ""; } //filter partial order $filter['partial'] = true; JRequest::setVar('filter', $filter); $oOrderModel = JModel::getInstance('order', 'enmasseModel'); $orderList = $oOrderModel->search($filter['status'], $filter['deal_code'], $filter['deal_name'], "created_at", "DESC", true); $pagination = $oOrderModel->getPagination(); $this->statusList = EnmasseHelper::$ORDER_STATUS_LIST; $this->filter = $filter; $this->orderList = $orderList; $this->pagination = $pagination; $this->deliveryPersons = EnmasseHelper::getDeliveryPersons(); parent::display($tpl); }