public function get_facility_stock_details($facility_code)
 {
     $facility_name = Facilities::get_facility_name($facility_code);
     $msg = "Stock levels for :" . $facility_name['facility_name'] . " as of " . date("d M, Y");
     $data['msg'] = $msg;
     $data['facility_order'] = Facility_Transaction_Table::get_all($facility_code);
     $data['content_view'] = "district/district_report/facility_stock_level_v";
     $data['quick_link'] = "actions";
     $data['banner_text'] = "Stock Level";
     $data['title'] = "Stock Level ";
     $this->load->view("template", $data);
 }
 public function stock_level($msg = Null)
 {
     $facility_c = $this->session->userdata('news');
     $checker = $this->uri->segment(3);
     $data['title'] = "Stock";
     $data['content_view'] = "facility/facility_data/stock_level_v";
     $data['banner_text'] = "Physical Stock";
     $data['link'] = "order_management";
     if (isset($msg)) {
         $data['msg'] = $msg;
         $data['update'] = 'update stock levels';
     }
     if ($msg == NULL) {
         $data['update'] = NULL;
         $data['msg'] = " ";
         $data['checker'] = "no_order";
     }
     if ($checker == "v") {
         $data['msg'] = "Verify that the system stock levels are the same as your physical stock count";
         $data['update'] = 'update stock levels';
     }
     if ($msg == 'c0N123') {
         $data['update'] = NULL;
         $data['msg'] = "Please confirm your stock details before placing your order";
     }
     $data['facility_order'] = Facility_Transaction_Table::get_all($facility_c);
     $data['max_date'] = Facility_Stock::get_max_date($facility_c)->toArray();
     $data['name_of_person'] = Facility_Issues::get_last_person_who_issues($facility_c);
     //$data['quick_link'] = "stock_level";
     $this->load->view("template", $data);
 }