예제 #1
0
 public function loadLastReportedDate($wh_id)
 {
     $reports = new Model_Reports();
     $reports->form_values = array("wh_id" => $wh_id);
     $max_date = $reports->getLastCreatedDate();
     //echo $max_date;
     if (!empty($max_date)) {
         return date("d/m/Y", strtotime($max_date));
     } else {
         return '-';
     }
 }
예제 #2
0
 public function ajaxExplorer2Action()
 {
     $this->_helper->layout->setLayout('ajax');
     $warehouse_data = new Model_WarehousesData();
     if (isset($this->_request->do) && !empty($this->_request->do)) {
         $base_url = Zend_Registry::get('baseurl');
         $this->view->headLink()->appendStylesheet($base_url . '/common/assets/global/plugins/datatables/plugins/bootstrap/dataTables.bootstrap.css');
         $this->view->headLink()->appendStylesheet($base_url . '/common/assets/global/plugins/datatables/media/css/jquery.dataTables.css');
         $this->view->inlineScript()->appendFile($base_url . '/common/theme/scripts/plugins/tables/DataTables/media/js/jquery.dataTables_1.js');
         $this->view->inlineScript()->appendFile($base_url . '/common/theme/scripts/plugins/tables/DataTables/extras/TableTools/media/js/TableTools.js');
         $this->view->inlineScript()->appendFile($base_url . '/common/theme/scripts/demo/tables.js');
         $temp = $this->_request->do;
         $warehouse_data->temp = $temp;
         $arr_temp = $warehouse_data->getExplorerReport();
         $this->view->month = $arr_temp['month'];
         $this->view->wh_id = $arr_temp['wh_id'];
         $this->view->loc_id = $arr_temp['loc_id'];
         $this->view->rpt_date = $arr_temp['rpt_date'];
         $this->view->yy = $arr_temp['yy'];
         $this->view->mm = $arr_temp['mm'];
         $this->view->dd = $arr_temp['dd'];
         $this->view->is_new_report = $arr_temp['is_new_rpt'];
         $this->view->prev_month_date = $arr_temp['prev_month_date'];
         $this->view->stakeholder_id = $arr_temp['stakeholder_id'];
         $this->view->warehouse_level = $arr_temp['warehouse_level'];
         $reports = new Model_Reports();
         $reports->form_values = array("wh_id" => $arr_temp['wh_id']);
         $max_date = $reports->getLastCreatedDate();
         $this->view->created_date = date("d/m/Y", strtotime($max_date));
     }
 }