Beispiel #1
0
 public function district_order_details($delivery, $facility_code = null, $for_facility = null, $rejected_order = null, $view = null)
 {
     $data['title'] = "Order detail View";
     $data['content_view'] = isset($for_facility) ? "facility/facility_data/facility_orders/facility_update_order_v" : "district/moh_orderdetail_v";
     $data['banner_text'] = "Order detail View";
     $data['link'] = "home";
     $data['view'] = $view;
     $data['rejected_order'] = $rejected_order;
     $data['drug_name'] = Drug::get_drug_name();
     $data['quick_link'] = "moh_order_v";
     $data['order_details'] = ordertbl::get_details($delivery)->toArray();
     $data['detail_list'] = Orderdetails::get_order($delivery);
     $this->load->view("template", $data);
 }
    public function lead_time_chart_county()
    {
        $district = $this->session->userdata('district');
        $chart_raw_data[0]['t_a_t'] = 0;
        $chart_raw_data[0]['delivery_update'] = 0;
        $county_id = districts::get_county_id($district);
        $county_name = counties::get_county_name($county_id[0]['county']);
        $chart_raw_data = ordertbl::get_county_order_turn_around_time($county_name[0]['id']);
        $step_data = 0;
        $title = 'Lead Time';
        $str_xml_body = "<value>1</value>";
        $strXML = '<Chart bgColor="FFFFFF" bgAlpha="0" showBorder="0" upperLimit="15" lowerLimit="0" gaugeRoundRadius="5" chartBottomMargin="10" ticksBelowGauge="1" showGaugeLabels="1" valueAbovePointer="1" pointerOnTop="1" pointerRadius="9" >
<colorRange>';
        $strXML .= "<color minValue='{$step_data}' maxValue='" . $chart_raw_data[0]['order_approval'] . "' label='" . $chart_raw_data[0]['order_approval'] . " days'  />";
        $step_data = $step_data + $chart_raw_data[0]['order_approval'] + $chart_raw_data[0]['approval_delivery'];
        $strXML .= "<color minValue='" . $chart_raw_data[0]['order_approval'] . "' maxValue='{$step_data}' label='" . $chart_raw_data[0]['approval_delivery'] . " days'  />";
        $step_data = $step_data + $chart_raw_data[0]['delivery_update'];
        $step_data_ = $step_data - $chart_raw_data[0]['delivery_update'];
        $strXML .= "<color minValue='{$step_data_}' maxValue='{$step_data}' label='" . $chart_raw_data[0]['delivery_update'] . " days'  />";
        $strXML .= '
</colorRange>
<pointers>
   <pointer value="' . $chart_raw_data[0]['t_a_t'] . '" toolText="Total Turn Around Time" link="P-detailsWin,width=450,height=150,toolbar=no,scrollbars=no, resizable=no-provincialtatbreakdown.php?province=5%26mwaka=2012%26mwezi=07%26dcode=%26fcode=0" />
 
</pointers>


<styles>

<definition>
<style name="ValueFont" type="Font" bgColor="333333" size="10" color="FFFFFF"/>
</definition>
<application>
<apply toObject="VALUE" styles="valueFont"/>
</application>
</styles>
</Chart>';
        echo $strXML;
    }