コード例 #1
0
 public function reportedWastageAction()
 {
     $item = new Model_ItemPackSizes();
     $this->view->items = $item->getAllItems();
     $level = $this->_request->getParam("level");
     $province = $this->_request->getParam("province");
     $district = $this->_request->getParam("district");
     $period = $this->_request->getParam("period");
     $date = $this->_request->getParam("date");
     $item = $this->_request->getParam("item");
     $wh_data = new Model_HfDataMaster();
     $params["date"] = $date;
     $params["item"] = $item;
     $params["level"] = $level;
     $wh_data->form_values = $params;
     if ($level == 2) {
         $xmlstore1 = $wh_data->getWastagesByDistricts($province);
         $this->view->xmlstore1 = $xmlstore1;
     }
     if ($level == 6) {
         $wh_data->form_values['prov_id'] = $province;
         $wh_data->form_values['dist_id'] = $district;
         $xmlstore61 = $wh_data->wastagesRate();
         $xmlstore62 = $wh_data->reportingRate();
         $this->view->xmlstore61 = $xmlstore61;
         $this->view->xmlstore62 = $xmlstore62;
     }
     $this->view->level = $level;
 }