public function priorityVaccinesDistributionDetailPrintAction()
 {
     $this->_helper->layout->setLayout('print');
     $ips = new Model_ItemPackSizes();
     $this->view->products = $ips->getAllItemsNonDil();
     $this->view->username = $this->_identity->getUserName();
     $this->view->warehousename = $this->_identity->getWarehouseName();
     $this->view->headTitle("Priority Vaccines Distribution");
 }
 public function simpleGraphsAction()
 {
     if ($this->_request->isPost()) {
         $post = $this->_request->getPost();
         $graphs = new Model_Graphs();
         $graphs->form_values = $post;
         $optvals = $post['optvals'];
         if (in_array($optvals, array(9, 10, 11))) {
             $xmlstore = $graphs->simpleGraphOptionYearNational();
         }
         $this->view->xmlstore = $xmlstore;
         //print_r($post);
         $this->view->chart_type = $post['ctype'];
         $this->view->sel_indicator = $post['indicators'];
         $this->view->sel_product = $post['products'];
         $this->view->sel_optvals = $post['optvals'];
         $this->view->sel_period = $post['period'];
         $this->view->sel_year = $post['yearcomp'];
         $this->view->sel_province = $post['all_provinces'];
         $this->view->sel_district = $post['all_districts'];
         if (in_array($optvals, array(10, 11))) {
             $locations = new Model_Locations();
             $locations->form_values = array('parent_id' => 10, 'geo_level_id' => 2);
             $this->view->combo_provinces = $locations->getLocationsByLevel();
         }
         if ($optvals == 11) {
             $location = new Model_Locations();
             $location->form_values = array('province_id' => $post['all_provinces'], 'geo_level_id' => 4);
             $this->view->combo_districts = $location->getLocationsByLevelByProvince();
         }
     } else {
         $this->view->sel_optvals = 9;
     }
     $reports = new Model_Reports();
     $indicators = $reports->getIndicators();
     $this->view->indicators = $indicators;
     $products = new Model_ItemPackSizes();
     $product = $products->getAllItemsNonDil();
     $this->view->product = $product;
     $compare_option = array("Geographical" => array("9" => "National", "10" => "Provincial", "11" => "District"));
     $this->view->compare_option = $compare_option;
     $period = new Model_Period();
     $time_intervals = $period->getTimeIntervals();
     $this->view->time_intervals = $time_intervals;
     $this->view->quarter = Model_Period::QUARTER;
     $this->view->halfyear = Model_Period::HALFYEAR;
     $this->view->annual = Model_Period::ANNUAL;
     $years = array();
     for ($i = 2013; $i <= date("Y"); $i++) {
         $years[] = $i;
     }
     $this->view->years = $years;
     $chart_type = array('Line' => "Line", 'Column3D' => "Bar");
     $this->view->chart_types = $chart_type;
     $this->view->main_heading = "Simple Graphs";
 }