public function ucWise3Action()
 {
     $this->_helper->layout->setLayout('reports');
     $this->view->report_id = 'UCWISE3';
     $this->view->actionpage = 'uc-wise3';
     $this->view->parameters = 'TS01IP';
     $this->view->parameter_width = '100%';
     $item_pack_sizes = new Model_ItemPackSizes();
     $warehouses_data = new Model_WarehousesData();
     $item = $item_pack_sizes->productsReport();
     $locations = new Model_Locations();
     $this->view->item_id = $item;
     if (!empty($this->_request->month_sel) && !empty($this->_request->month_sel)) {
         $this->view->year_sel = $year = $this->_request->year_sel;
         $this->view->month_sel = $month = $this->_request->month_sel;
     } else {
         $year = date("Y");
         if (date('d') > 10) {
             $month = date("m", strtotime("-1"));
         } else {
             $month = date("m", strtotime("-2"));
         }
         $this->view->year_sel = $year;
         $this->view->month_sel = $month;
     }
     if (!empty($this->_request->prov_sel)) {
         $prov_sel = $this->_request->prov_sel;
         $locations->form_values['geo_level_id'] = '4';
         $locations->form_values['province_id'] = $prov_sel;
         $district = $locations->getLocationsByLevelByProvinceConsumption();
         $this->view->district = $district;
     } else {
         $prov_sel = 2;
         $locations->form_values['geo_level_id'] = '4';
         $locations->form_values['province_id'] = $prov_sel;
         $district = $locations->getLocationsByLevelByProvinceConsumption();
         $this->view->district = $district;
     }
     $this->view->prov_sel = $prov_sel;
     if (isset($this->_request->stk_sel) && !empty($this->_request->stk_sel)) {
         $this->view->stk_sel = $sel_stk = $this->_request->stk_sel;
     } else {
         $this->view->stk_sel = $sel_stk = 1;
     }
     if ($this->_request->prov_sel) {
         $locations->form_values['pk_id'] = $this->_request->prov_sel;
         $this->view->location_name = $locations->getLocationName();
     } else {
         $this->view->location_name = "Punjab";
     }
     if ($this->_request->dist_id) {
         $this->view->in_dist = $this->_request->dist_id;
         $this->view->sel_dist = $this->_request->dist_id;
         $locations->form_values['dist_id'] = $this->_request->dist_id;
         $res = $locations->getLocationsForConsumptionReport();
         $distrctName = $locations->getLocationForReport();
         // App_Controller_Functions::pr($res);
     } else {
         $this->view->in_dist = '';
         $this->view->sel_dist = '';
     }
     $items = $item_pack_sizes->monthlyConsumtion2Vaccines();
     $items_non_vaccines = $item_pack_sizes->monthlyConsumtion2_non_vaccinces();
     $items_tt = $item_pack_sizes->monthlyConsumtion2_tt();
     $reportingDate = $this->_request->year_sel . '-' . $this->_request->month_sel . '-01';
     $fileName = 'UCWise3_' . $distrctName . '_for_' . date('M-Y', strtotime($reportingDate));
     $this->view->file_name = $fileName;
     $this->view->sel_item = $this->_request->prod_sel;
     $stakeholder = new Model_Stakeholders();
     $stk = $stakeholder->nationReport();
     $this->view->stk = $stk;
     $locations = new Model_Locations();
     $lct = $locations->conusmptionReportLocations();
     $this->view->location = $lct;
     $this->view->result = $res;
     $this->view->items = $items;
     $this->view->items_non_vaccinces = $items_non_vaccines;
     $this->view->items_tt = $items_tt;
 }