public function ordersAction() { $from = AF::get($this->params, 'from', false); $clearArray = array(); $this->filter($clearArray); if (!isset($this->params['r_dates'])) { $today = date("d.m.Y"); $this->params['r_dates'] = $today . '-' . $today; } $pagination = new Pagination(array('action' => $this->action, 'controller' => $this->controller, 'params' => $this->params, 'ajax' => true)); $models = AFActiveDataProvider::models('Attempt', $this->params, $pagination); $dataProvider = $models->getDeclineOrdersReport(); $filterFields = Attempt::$FilterFields = $models->getoutFilterFields($clearArray, array('r_dates')); $fields = array('order_formatted', 'type_formatted', 'status_note', 'created_formatted'); $gateways = $models->getDSearchGateways(); $reasons = $models->getDSearchReasons(); // set ajax table if (AF::isAjaxRequestModels()) { $this->view->includeFile('_orders_table', array('application', 'views', 'declinedreports'), array('access' => $this->access, 'controller' => $this->controller, 'dataProvider' => $dataProvider, 'pagination' => $pagination, 'filterFields' => $filterFields, 'fields' => $fields, 'gateways' => $gateways, 'reasons' => $reasons)); die; } Assets::css('jquery-ui'); Assets::js('//code.jquery.com/ui/1.10.3/jquery-ui.js'); Assets::js('dateRange/jquery.daterange'); Assets::js('ajax_table'); $this->render('orders', array('dataProvider' => $dataProvider, 'pagination' => $pagination, 'filterFields' => $filterFields, 'fields' => $fields, 'gateways' => $gateways, 'reasons' => $reasons, 'from' => $from)); }