public function indexAction()
 {
     $requi_model = new Default_Model_Requisition();
     $appr_model = new Default_Model_Approvedrequisitions();
     $call = $this->_getParam('call');
     if ($call == 'ajaxcall') {
         $this->_helper->layout->disableLayout();
     }
     $dashboardcall = $this->_getParam('dashboardcall');
     $statusidstring = $this->_request->getParam('status');
     $unitId = '';
     if (!isset($statusidstring) || $statusidstring == '') {
         $unitId = $this->_request->getParam('unitId');
         $statusidstring = $unitId;
     }
     $formgrid = 'true';
     if (isset($unitId) && $unitId != '') {
         $formgrid = 'true';
     }
     $statusid = sapp_Global::_decrypt($statusidstring);
     $queryflag = 'Approved';
     $refresh = $this->_getParam('refresh');
     $data = array();
     $searchQuery = '';
     $searchArray = array();
     $tablecontent = '';
     if ($refresh == 'refresh') {
         if ($dashboardcall == 'Yes') {
             $perPage = DASHBOARD_PERPAGE;
         } else {
             $perPage = PERPAGE;
         }
         $sort = 'DESC';
         $by = 'r.modifiedon';
         $pageNo = 1;
         $searchData = '';
         $searchQuery = '';
         $searchQuery = '';
         $searchArray = '';
         $searchArray = array();
     } else {
         $sort = $this->_getParam('sort') != '' ? $this->_getParam('sort') : 'DESC';
         $by = $this->_getParam('by') != '' ? $this->_getParam('by') : 'r.modifiedon';
         if ($dashboardcall == 'Yes') {
             $perPage = $this->_getParam('per_page', DASHBOARD_PERPAGE);
         } else {
             $perPage = $this->_getParam('per_page', PERPAGE);
         }
         $pageNo = $this->_getParam('page', 1);
         /** search from grid - START **/
         $searchData = $this->_getParam('searchData');
         /** search from grid - END **/
     }
     $dataTmp = $appr_model->getGrid($sort, $by, $perPage, $pageNo, $searchData, $call, $dashboardcall, $statusid, $a1 = '', $a2 = '', $a3 = '');
     array_push($data, $dataTmp);
     $this->view->dataArray = $dataTmp;
     $this->view->call = $call;
     $this->view->statusidstring = $statusidstring;
     $this->view->messages = $this->_helper->flashMessenger->getMessages();
 }
 /**
  * 
  */
 public function myRequisitions()
 {
     $appr_model = new Default_Model_Approvedrequisitions();
     $call = $this->_getParam('call');
     $dashboardcall = $this->_getParam('dashboardcall');
     $formgrid = 'true';
     $data = array();
     $searchQuery = '';
     $searchArray = array();
     $tablecontent = '';
     $statusid = '';
     $searchData = '';
     $sort = 'DESC';
     $by = 'r.createdon';
     $perPage = $this->_getParam('per_page', PERPAGE);
     $pageNo = 1;
     $dataTmp = $appr_model->getMyGrid($sort, $by, $perPage, $pageNo, $searchData, $call, $dashboardcall, $statusid, $a1 = '', $a2 = '', $a3 = '');
     array_push($data, $dataTmp);
     return $dataTmp;
 }