50 lines
1.7 KiB
PHP
50 lines
1.7 KiB
PHP
<?php
|
|
class Reconfirmrujukan extends CI_Controller
|
|
{
|
|
function __construct() {
|
|
parent::__construct();
|
|
$this->db = $this->load->database("onedev", true);
|
|
}
|
|
function index() {
|
|
echo "Re-send rujukan";
|
|
}
|
|
function check($date) {
|
|
$sql = "select
|
|
M_BranchCode, incomingRefT_RefDeliveryOrderNumber,
|
|
incomingRefDetailT_OrderHeaderLabNumber,
|
|
incomingRefDetailT_TestName, incomingRefDetailT_BarcodeLabBarcode
|
|
from incoming_ref
|
|
join incoming_ref_detail on incomingRefID = incomingRefDetailIncomingRefID
|
|
and incomingRefT_RefDeliveryOrderDate = ?
|
|
join m_branch on incomingRefM_BranchID = M_BranchID
|
|
and M_BranchIsActive = 'Y'
|
|
where
|
|
incomingRefDetailStatus = 'N'
|
|
order by M_BranchCode, incomingRefT_RefDeliveryOrderNumber
|
|
";
|
|
$qry = $this->db->query($sql, array($date));
|
|
if ($qry) {
|
|
$rows = $qry->result_array();
|
|
foreach($rows as $r) {
|
|
$code = $r["M_BranchCode"];
|
|
$number = $r["incomingRefT_RefDeliveryOrderNumber"];
|
|
$test = $r["incomingRefDetailT_TestName"];
|
|
$barcode = $r["incomingRefDetailT_BarcodeLabBarcode"];
|
|
$regno = $r["incomingRefDetailT_OrderHeaderLabNumber"];
|
|
echo "$code\t$number\t$regno\t$test\t$barcode\n";
|
|
}
|
|
if ( count($rows) == 0 ) {
|
|
echo "NO Pending Data\n";
|
|
}
|
|
}
|
|
}
|
|
function fix($regno) {
|
|
$sql = "select
|
|
T_OrderHeaderID, T_OrderHeaderLabNumber
|
|
from t_orderheader
|
|
join incoming_ref_detail on incomingRefDetailT_Orde
|
|
where M_BranchIsActive = 'Y' and M_BranchCode = ?";
|
|
$branchID = 0;
|
|
}
|
|
}
|