public function storeIssuanceReportOldAction()
 {
     $this->_helper->layout->setLayout('reports');
     $this->view->report_id = 'STOREISSUANCEREPORT';
     $this->view->report_title = 'Store Issuance Report';
     $this->view->actionpage = 'store-issuance-report';
     $this->view->parameters = 'TS01IP';
     $this->view->parameter_width = '95%';
     $item_pack_sizes = new Model_ItemPackSizes();
     $location = new Model_Locations();
     $warehouses_data = new Model_WarehousesData();
     if ($this->_request->prov_sel) {
         $province = $this->_request->prov_sel;
     }
     if (!empty($this->_request->year_sel)) {
         $year = $this->_request->year_sel;
     } else {
         $year = 2015;
     }
     $this->view->year_sel = $year;
     if (!empty($this->_request->prod_sel)) {
         $this->view->sel_prod = $this->_request->prod_sel;
         $this->view->sel_item = $this->_request->prod_sel;
     } else {
         $this->view->sel_prod = 3;
     }
     if (!empty($this->_request->prov_sel)) {
         $this->view->prov_sel = $prov_sel = $this->_request->prov_sel;
     }
     $item_pack_sizes = new Model_ItemPackSizes();
     if ($this->_request->prod_sel) {
         $item_pack_sizes->form_values['pk_id'] = $this->_request->prod_sel;
         $this->view->item_name = $item_pack_sizes->getProductName();
     } else {
         $item_pack_sizes->form_values['pk_id'] = '28';
         $this->view->item_name = $item_pack_sizes->getProductName();
     }
     if (isset($this->_request->dist_id) && !empty($this->_request->dist_id)) {
         $locations = new Model_Locations();
         $locations->form_values['geo_level_id'] = 4;
         $locations->form_values['province_id'] = $this->_request->prov_sel;
         $district = $locations->getLocationsByLevelByProvince();
         $this->view->district = $district;
         $this->view->sel_dist = $this->_request->dist_id;
         $location->form_values['province_id'] = $province;
         $location->form_values['district_id'] = $this->_request->dist_id;
         $location_name = $location->ucLocations();
         $provinces = $location->nationalReport();
         $item = $item_pack_sizes->productsReport();
         $this->view->item_id = $item;
         $this->view->location_id = $location_name;
         $this->view->location = $provinces;
     } else {
         $locations = new Model_Locations();
         $location_name = $location->nationalReport();
         $item = $item_pack_sizes->productsReport();
         $this->view->item_id = $item;
         $this->view->location_id = $location_name;
         $this->view->location = $location_name;
         $this->view->district = array();
     }
     /* $locations = new Model_Locations();
        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";
        } */
     $end_date1 = $year . '-12-01';
     $end_date = date('Y-m-d', strtotime("-1 days", strtotime("+1 month", strtotime($end_date1))));
     $start_date = date('Y-m-d', strtotime("-364 days", strtotime($end_date)));
     // Start date and End date
     $begin = new DateTime($start_date);
     $end = new DateTime($end_date);
     $diff = $begin->diff($end);
     $interval = DateInterval::createFromDateString('1 month');
     $period = new DatePeriod($begin, $interval, $end);
     $this->view->period = $period;
     //$stakeholder = new Model_Stakeholders();
     //$stk = $stakeholder->nationReport();
     //$this->view->stk = $stk;
     //$locations = new Model_Locations();
     //$lct = $locations->devisionalReport();
     //$this->view->location = $lct;
     //$locations->form_values['province_id'] = '1';
     //$locations->form_values['district_id'] = '';
     //$lct2 = $locations->tehsilLocations();
     //$this->view->loc = $lct2;
 }