当前位置: 首页>>代码示例>>PHP>>正文


PHP Facilities::get_facility_district_county_level方法代码示例

本文整理汇总了PHP中Facilities::get_facility_district_county_level方法的典型用法代码示例。如果您正苦于以下问题:PHP Facilities::get_facility_district_county_level方法的具体用法?PHP Facilities::get_facility_district_county_level怎么用?PHP Facilities::get_facility_district_county_level使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Facilities的用法示例。


在下文中一共展示了Facilities::get_facility_district_county_level方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: pdfreport

    public function pdfreport($report_type, $facility_code)
    {
        $facility_information = $report_data = $heading = $report_title = $data = '';
        $facility_name = Facilities::get_facility_name2($facility_code);
        $facility_obj = Facilities::get_facility_district_county_level($facility_code);
        $facility_information = '<table class = "data-table"><thead><tr><th>Facility Code</th><th>Facility Name</th><th>County</th><th>District</th><th>Type</th></tr></thead>
		<tbody><tr><td>' . $facility_code . '</td><td>' . $facility_name . '</td><td>' . $facility_obj['county'] . '</td><td>' . $facility_obj['district'] . '</td><td>' . $facility_obj['type'] . '</td></tr></tbody>';
        $facility_information .= '</table>';
        switch ($report_type) {
            case 'malaria':
                $heading = '<th>Drug Name</th>';
                $report_title = 'Malaria Program Report For: ' . $facility_name;
                $file_name = $facility_name . ' Malaria Report';
                $data = $this->createmalariareport($facility_code);
                break;
            case 'rh':
                $heading = '<th>Contraceptive</th>';
                $report_title = 'Reproductive Health Program Report For: ' . $facility_name;
                $file_name = $facility_name . ' RH Report';
                $data = $this->createrhreport($facility_code);
                break;
            default:
                break;
        }
        $report_table = '<table class = "data-table">
	<thead>
		<tr>' . $heading . '
			<th>Unit Size</th>
			<th>Unit Cost (Ksh)</th>
			<th>Opening Balance (Units)</th>
			<th>Total Receipts (Units)</th>
		    <th>Total issues (Units)</th>
		    <th>Adjustments(-ve) (Units)</th>
		    <th>Adjustments(+ve) (Units)</th>
		    <th>Losses (Units)</th>
		    <th>No days out of stock</th>
		    <th>Closing Stock(Units)</th>					    
		</tr>
	</thead>';
        if (!$data) {
            $data = '<tr><td colspan = "11"><center>There is no report for this facility</center></td></tr>';
        }
        $report_table .= $data;
        $report_table .= '</table>';
        $pdf_data['pdf_title'] = $report_title;
        $pdf_data['file_name'] = $file_name;
        $pdf_data['pdf_html_body'] = $facility_information . $report_table;
        $this->hcmp_functions->create_pdf($pdf_data);
    }
开发者ID:karsanrichard,项目名称:hcmp_test,代码行数:49,代码来源:divisional_reports.php


注:本文中的Facilities::get_facility_district_county_level方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。