Initial import
This commit is contained in:
149
one-api/application/controllers/tools/marketing/R_insentive.php
Normal file
149
one-api/application/controllers/tools/marketing/R_insentive.php
Normal file
@@ -0,0 +1,149 @@
|
||||
<?php
|
||||
class R_insentive extends MY_Controller
|
||||
{
|
||||
function __construct() {
|
||||
parent::__construct();
|
||||
$this->db = $this->load->database("regional", true);
|
||||
}
|
||||
function rekap() {
|
||||
$md5 = $this->sys_input["md5"];
|
||||
$jdata = $this->sys_input["data"];
|
||||
$l_md5 = md5($jdata);
|
||||
if ($md5 != $l_md5) {
|
||||
echo json_encode( array( "status" => "ERR",
|
||||
"message" => "$md5 <> local $l_md5"));
|
||||
exit;
|
||||
}
|
||||
$rows = json_decode($jdata,true);
|
||||
if (count($rows) == 0 ) {
|
||||
echo json_encode( array("status" => "OK", "message" => "No Data uploaded." ));
|
||||
exit;
|
||||
}
|
||||
$d_where = "";
|
||||
foreach($rows as $r) {
|
||||
$branchCode = $r["SsrMrInsentiveRkM_BranchCode"];
|
||||
$month= $r["SsrMrInsentiveRkMonth"];
|
||||
$year= $r["SsrMrInsentiveRkYear"];
|
||||
$staffNIK= $r["SsrMrInsentiveRkStaffNIK"];
|
||||
if ($d_where != "" ) $d_where .= " or ";
|
||||
$d_where .= " ( SsrMrInsentiveRkM_BranchCode = '$branchCode' and SsrMrInsentiveRkMonth = $month
|
||||
and SsrMrInsentiveRkYear = $year and ( SsrMrInsentiveRkStaffNIK = '$staffNIK' or SsrMrInsentiveRkStaffNIK is null) ) ";
|
||||
}
|
||||
if ($d_where != "" ) {
|
||||
$sql = "delete from ssr_mr_insentive_rk where $d_where";
|
||||
$qry = $this->db->query($sql);
|
||||
if (! $qry ) {
|
||||
echo json_encode( array("status" => "ERR", "message" => print_r($this->db->error(),true)));
|
||||
exit;
|
||||
}
|
||||
}
|
||||
$qry = $this->db->insert_batch("ssr_mr_insentive_rk", $rows);
|
||||
if (! $qry ) {
|
||||
echo json_encode( array("status" => "ERR", "message" => print_r($this->db->error(),true)));
|
||||
exit;
|
||||
}
|
||||
echo json_encode( array("status" => "OK", "message" => ""));
|
||||
}
|
||||
function cur() {
|
||||
$md5 = $this->sys_input["md5"];
|
||||
$jdata = $this->sys_input["data"];
|
||||
$l_md5 = md5($jdata);
|
||||
if ($md5 != $l_md5) {
|
||||
echo json_encode( array( "status" => "ERR",
|
||||
"message" => "$md5 <> local $l_md5"));
|
||||
exit;
|
||||
}
|
||||
$rows = json_decode($jdata,true);
|
||||
if (count($rows) == 0 ) {
|
||||
echo json_encode( array("status" => "OK", "message" => "No Data uploaded." ));
|
||||
exit;
|
||||
}
|
||||
$d_where = "";
|
||||
foreach($rows as $r) {
|
||||
$branchCode = $r["SsrMrInsentiveM_BranchCode"];
|
||||
$month= $r["SsrMrInsentiveMonth"];
|
||||
$year= $r["SsrMrInsentiveYear"];
|
||||
$staffNIK= $r["SsrMrInsentiveStaffNIK"];
|
||||
if ($d_where != "" ) $d_where .= " or ";
|
||||
$d_where .= " ( SsrMrInsentiveM_BranchCode = '$branchCode' and SsrMrInsentiveMonth = $month
|
||||
and SsrMrInsentiveYear = $year and ( SsrMrInsentiveStaffNIK = '$staffNIK' or SsrMrInsentiveStaffNIK is null) ) ";
|
||||
}
|
||||
if ($d_where != "" ) {
|
||||
$sql = "delete from ssr_mr_insentive where $d_where";
|
||||
$qry = $this->db->query($sql);
|
||||
if (! $qry ) {
|
||||
echo json_encode( array("status" => "ERR", "message" => print_r($this->db->error(),true)));
|
||||
exit;
|
||||
}
|
||||
}
|
||||
$qry = $this->db->insert_batch("ssr_mr_insentive", $rows);
|
||||
if (! $qry ) {
|
||||
echo json_encode( array("status" => "ERR", "message" => print_r($this->db->error(),true)));
|
||||
exit;
|
||||
}
|
||||
echo json_encode( array("status" => "OK", "message" => ""));
|
||||
}
|
||||
function index() {
|
||||
$md5 = $this->sys_input["md5"];
|
||||
$jdata = $this->sys_input["data"];
|
||||
$l_md5 = md5($jdata);
|
||||
if ($md5 != $l_md5) {
|
||||
echo json_encode( array( "status" => "ERR",
|
||||
"message" => "$md5 <> local $l_md5"));
|
||||
exit;
|
||||
}
|
||||
$data = json_decode($jdata,true);
|
||||
$status = array();
|
||||
$d_sql = "delete from ssr_mr01 where SsrMr01M_BranchCode = ? and
|
||||
SsrMr01T_OrderHeaderID = ? and SsrMr01T_TestID = ?";
|
||||
|
||||
$sql = "insert into ssr_mr01(SsrMr01M_BranchCode, SsrMr01M_PatientName, SsrMr01T_OrderHeaderDate, SsrMr01T_OrderHeaderLabNumberExt,
|
||||
SsrMr01T_OrderHeaderID , SsrMr01M_DoctorOldCode , SsrMr01T_TestID , SsrMr01Total,
|
||||
SsrMr01Nat_JPADetailDiscount, SsrMr01JpaGroupName,
|
||||
SsrMr01Jpa, SsrMr01Nat_JpaGroupMaxJpaDisc, SsrMr01Bruto,
|
||||
SsrMr01M_CompanyID, SsrMr01M_DoctorAddressOldCode, SsrMr01M_DoctorID, SsrMr01M_DoctorAddressID)
|
||||
values(?,?,?,?, ?,?,?,?, ?,?, ?,?,?, ?,?, ?,?)";
|
||||
|
||||
foreach($data as $d) {
|
||||
$SsrMr01M_BranchCode = $d["SsrMr01M_BranchCode"];
|
||||
$SsrMr01M_PatientName =$d["SsrMr01M_PatientName"];
|
||||
$SsrMr01T_OrderHeaderID = $d["SsrMr01T_OrderHeaderID"];
|
||||
$SsrMr01T_OrderHeaderDate =$d["SsrMr01T_OrderHeaderDate"];
|
||||
$SsrMr01T_OrderHeaderLabNumberExt =$d["SsrMr01T_OrderHeaderLabNumberExt"];
|
||||
$SsrMr01M_DoctorOldCode =$d["SsrMr01M_DoctorOldCode"];
|
||||
$SsrMr01T_TestID = $d["SsrMr01T_TestID"];
|
||||
$SsrMr01Total = $d["SsrMr01Total"];
|
||||
$SsrMr01Nat_JPADetailDiscount = $d["SsrMr01Nat_JPADetailDiscount"];
|
||||
$SsrMr01JpaGroupName = $d["SsrMr01JpaGroupName"];
|
||||
$SsrMr01Jpa = $d["SsrMr01Jpa"];
|
||||
$SsrMr01Nat_JpaGroupMaxJpaDisc = $d["SsrMr01Nat_JpaGroupMaxJpaDisc"];
|
||||
$SsrMr01Bruto = $d["SsrMr01Bruto"];
|
||||
$SsrMr01M_CompanyID =$d["SsrMr01M_CompanyID"];
|
||||
$SsrMr01M_DoctorAddressOldCode =$d["SsrMr01M_DoctorAddressOldCode"];
|
||||
$SsrMr01M_DoctorID =$d["SsrMr01M_DoctorID"];
|
||||
$SsrMr01M_DoctorAddressID =$d["SsrMr01M_DoctorAddressID"];
|
||||
|
||||
try{
|
||||
$qry = $this->db->query($d_sql, array($SsrMr01M_BranchCode, $SsrMr01T_OrderHeaderID,$SsrMr01T_TestID));
|
||||
if ($qry) {
|
||||
$qry = $this->db->query($sql,array( $SsrMr01M_BranchCode, $SsrMr01M_PatientName,
|
||||
$SsrMr01T_OrderHeaderDate, $SsrMr01T_OrderHeaderLabNumberExt,
|
||||
$SsrMr01T_OrderHeaderID , $SsrMr01M_DoctorOldCode , $SsrMr01T_TestID , $SsrMr01Total,
|
||||
$SsrMr01Nat_JPADetailDiscount, $SsrMr01JpaGroupName,
|
||||
$SsrMr01Jpa, $SsrMr01Nat_JpaGroupMaxJpaDisc, $SsrMr01Bruto,
|
||||
$SsrMr01M_CompanyID,$SsrMr01M_DoctorAddressOldCode, $SsrMr01M_DoctorID, $SsrMr01M_DoctorAddressID));
|
||||
if($qry) {
|
||||
$status[] = $d["SsrMr01ID"];
|
||||
}else {
|
||||
print_r($this->db->error());
|
||||
}
|
||||
} else {
|
||||
print_r($this->db->error());
|
||||
}
|
||||
} catch(Exception $e) {
|
||||
print_r($this->db->error());
|
||||
}
|
||||
}
|
||||
echo json_encode( array("status" => "OK" , "SsrMr01ID" => $status));
|
||||
}
|
||||
}
|
||||
71
one-api/application/controllers/tools/marketing/R_mr01.php
Normal file
71
one-api/application/controllers/tools/marketing/R_mr01.php
Normal file
@@ -0,0 +1,71 @@
|
||||
<?php
|
||||
class R_mr01 extends MY_Controller
|
||||
{
|
||||
function __construct() {
|
||||
parent::__construct();
|
||||
$this->db = $this->load->database("regional", true);
|
||||
}
|
||||
function index() {
|
||||
$md5 = $this->sys_input["md5"];
|
||||
$jdata = $this->sys_input["data"];
|
||||
$l_md5 = md5($jdata);
|
||||
if ($md5 != $l_md5) {
|
||||
echo json_encode( array( "status" => "ERR",
|
||||
"message" => "$md5 <> local $l_md5"));
|
||||
exit;
|
||||
}
|
||||
$data = json_decode($jdata,true);
|
||||
$status = array();
|
||||
$d_sql = "delete from ssr_mr01 where SsrMr01M_BranchCode = ? and
|
||||
SsrMr01T_OrderHeaderID = ? and SsrMr01T_TestID = ?";
|
||||
|
||||
$sql = "insert into ssr_mr01(SsrMr01M_BranchCode, SsrMr01M_PatientName, SsrMr01T_OrderHeaderDate, SsrMr01T_OrderHeaderLabNumberExt,
|
||||
SsrMr01T_OrderHeaderID , SsrMr01M_DoctorOldCode , SsrMr01T_TestID , SsrMr01Total,
|
||||
SsrMr01Nat_JPADetailDiscount, SsrMr01JpaGroupName,
|
||||
SsrMr01Jpa, SsrMr01Nat_JpaGroupMaxJpaDisc, SsrMr01Bruto,
|
||||
SsrMr01M_CompanyID, SsrMr01M_DoctorAddressOldCode, SsrMr01M_DoctorID, SsrMr01M_DoctorAddressID)
|
||||
values(?,?,?,?, ?,?,?,?, ?,?, ?,?,?, ?,?, ?,?)";
|
||||
|
||||
foreach($data as $d) {
|
||||
$SsrMr01M_BranchCode = $d["SsrMr01M_BranchCode"];
|
||||
$SsrMr01M_PatientName =$d["SsrMr01M_PatientName"];
|
||||
$SsrMr01T_OrderHeaderID = $d["SsrMr01T_OrderHeaderID"];
|
||||
$SsrMr01T_OrderHeaderDate =$d["SsrMr01T_OrderHeaderDate"];
|
||||
$SsrMr01T_OrderHeaderLabNumberExt =$d["SsrMr01T_OrderHeaderLabNumberExt"];
|
||||
$SsrMr01M_DoctorOldCode =$d["SsrMr01M_DoctorOldCode"];
|
||||
$SsrMr01T_TestID = $d["SsrMr01T_TestID"];
|
||||
$SsrMr01Total = $d["SsrMr01Total"];
|
||||
$SsrMr01Nat_JPADetailDiscount = $d["SsrMr01Nat_JPADetailDiscount"];
|
||||
$SsrMr01JpaGroupName = $d["SsrMr01JpaGroupName"];
|
||||
$SsrMr01Jpa = $d["SsrMr01Jpa"];
|
||||
$SsrMr01Nat_JpaGroupMaxJpaDisc = $d["SsrMr01Nat_JpaGroupMaxJpaDisc"];
|
||||
$SsrMr01Bruto = $d["SsrMr01Bruto"];
|
||||
$SsrMr01M_CompanyID =$d["SsrMr01M_CompanyID"];
|
||||
$SsrMr01M_DoctorAddressOldCode =$d["SsrMr01M_DoctorAddressOldCode"];
|
||||
$SsrMr01M_DoctorID =$d["SsrMr01M_DoctorID"];
|
||||
$SsrMr01M_DoctorAddressID =$d["SsrMr01M_DoctorAddressID"];
|
||||
|
||||
try{
|
||||
$qry = $this->db->query($d_sql, array($SsrMr01M_BranchCode, $SsrMr01T_OrderHeaderID,$SsrMr01T_TestID));
|
||||
if ($qry) {
|
||||
$qry = $this->db->query($sql,array( $SsrMr01M_BranchCode, $SsrMr01M_PatientName,
|
||||
$SsrMr01T_OrderHeaderDate, $SsrMr01T_OrderHeaderLabNumberExt,
|
||||
$SsrMr01T_OrderHeaderID , $SsrMr01M_DoctorOldCode , $SsrMr01T_TestID , $SsrMr01Total,
|
||||
$SsrMr01Nat_JPADetailDiscount, $SsrMr01JpaGroupName,
|
||||
$SsrMr01Jpa, $SsrMr01Nat_JpaGroupMaxJpaDisc, $SsrMr01Bruto,
|
||||
$SsrMr01M_CompanyID,$SsrMr01M_DoctorAddressOldCode, $SsrMr01M_DoctorID, $SsrMr01M_DoctorAddressID));
|
||||
if($qry) {
|
||||
$status[] = $d["SsrMr01ID"];
|
||||
}else {
|
||||
print_r($this->db->error());
|
||||
}
|
||||
} else {
|
||||
print_r($this->db->error());
|
||||
}
|
||||
} catch(Exception $e) {
|
||||
print_r($this->db->error());
|
||||
}
|
||||
}
|
||||
echo json_encode( array("status" => "OK" , "SsrMr01ID" => $status));
|
||||
}
|
||||
}
|
||||
66
one-api/application/controllers/tools/marketing/R_mr03.php
Normal file
66
one-api/application/controllers/tools/marketing/R_mr03.php
Normal file
@@ -0,0 +1,66 @@
|
||||
<?php
|
||||
class R_mr03 extends MY_Controller
|
||||
{
|
||||
function __construct() {
|
||||
parent::__construct();
|
||||
$this->db = $this->load->database("regional", true);
|
||||
}
|
||||
function index() {
|
||||
$md5 = $this->sys_input["md5"];
|
||||
$jdata = $this->sys_input["data"];
|
||||
$l_md5 = md5($jdata);
|
||||
if ($md5 != $l_md5) {
|
||||
echo json_encode( array( "status" => "ERR",
|
||||
"message" => "$md5 <> local $l_md5"));
|
||||
exit;
|
||||
}
|
||||
$data = json_decode($jdata,true);
|
||||
$status = array();
|
||||
$d_sql = "delete from ssr_mr03 where SsrMr03M_BranchCode = ? and
|
||||
SsrMr03T_OrderHeaderID = ?";
|
||||
|
||||
$sql = "insert into ssr_mr03(SsrMr03T_OrderHeaderID, SsrMr03M_BranchCode,SsrMr03M_StaffNIK,
|
||||
SsrMr03M_PatientName,SsrMr03M_CompanyID,SsrMr03M_DoctorOldCode,
|
||||
SsrMr03T_OrderHeaderDate,SsrMr03T_OrderHeaderLabNumberExt, SsrMr03Total,
|
||||
SsrMr03Reward,SsrMr03RoundReward,SsrMr03Nat_JpaGroupMaxJpaDisc,
|
||||
SsrMr03M_No_FormRev, SsrMr03M_DoctorAddressOldCode, SsrMr03M_DoctorID, SsrMr03M_DoctorAddressID)
|
||||
values(?,?,?, ?,?,?, ?,?,?, ?,?,?, ?,?, ?,?)";
|
||||
foreach($data as $d) {
|
||||
$SsrMr03T_OrderHeaderID = $d["SsrMr03T_OrderHeaderID"];
|
||||
$SsrMr03M_BranchCode = $d["SsrMr03M_BranchCode"];
|
||||
$SsrMr03M_StaffNIK = $d["SsrMr03M_StaffNIK"];
|
||||
$SsrMr03M_PatientName =$d["SsrMr03M_PatientName"];
|
||||
$SsrMr03M_CompanyID =$d["SsrMr03M_CompanyID"];
|
||||
$SsrMr03M_DoctorOldCode =$d["SsrMr03M_DoctorOldCode"];
|
||||
$SsrMr03T_OrderHeaderDate =$d["SsrMr03T_OrderHeaderDate"];
|
||||
$SsrMr03T_OrderHeaderLabNumberExt =$d["SsrMr03T_OrderHeaderLabNumberExt"];
|
||||
$SsrMr03Total = $d["SsrMr03Total"];
|
||||
$SsrMr03Reward = $d["SsrMr03Reward"];
|
||||
$SsrMr03RoundReward = $d["SsrMr03RoundReward"];
|
||||
$SsrMr03Nat_JpaGroupMaxJpaDisc = $d["SsrMr03Nat_JpaGroupMaxJpaDisc"];
|
||||
$SsrMr03M_No_FormRev = $d["SsrMr03M_No_FormRev"];
|
||||
$SsrMr03M_DoctorAddressOldCode = $d["SsrMr03M_DoctorAddressOldCode"];
|
||||
$SsrMr03M_DoctorID = $d["SsrMr03M_DoctorID"];
|
||||
$SsrMr03M_DoctorAddressID = $d["SsrMr03M_DoctorAddressID"];
|
||||
try{
|
||||
$qry = $this->db->query($d_sql, array($SsrMr03M_BranchCode, $SsrMr03T_OrderHeaderID));
|
||||
if ($qry) {
|
||||
$qry = $this->db->query($sql,array($SsrMr03T_OrderHeaderID, $SsrMr03M_BranchCode,$SsrMr03M_StaffNIK,
|
||||
$SsrMr03M_PatientName,$SsrMr03M_CompanyID,$SsrMr03M_DoctorOldCode,
|
||||
$SsrMr03T_OrderHeaderDate,$SsrMr03T_OrderHeaderLabNumberExt,$SsrMr03Total,
|
||||
$SsrMr03Reward,$SsrMr03RoundReward,$SsrMr03Nat_JpaGroupMaxJpaDisc, $SsrMr03M_No_FormRev, $SsrMr03M_DoctorAddressOldCode,
|
||||
$SsrMr03M_DoctorID, $SsrMr03M_DoctorAddressID));
|
||||
if($qry) {
|
||||
$status[] = $d["SsrMr03ID"];
|
||||
}else {
|
||||
print_r($this->db->error());
|
||||
}
|
||||
} else {
|
||||
print_r($this->db->error());
|
||||
}
|
||||
} catch(Exception $e) {
|
||||
}
|
||||
}
|
||||
echo json_encode( array("status" => "OK" , "SsrMr03ID" => $status));
|
||||
}
|
||||
}
|
||||
67
one-api/application/controllers/tools/marketing/R_mr04.php
Normal file
67
one-api/application/controllers/tools/marketing/R_mr04.php
Normal file
@@ -0,0 +1,67 @@
|
||||
<?php
|
||||
class R_mr04 extends MY_Controller
|
||||
{
|
||||
function __construct() {
|
||||
parent::__construct();
|
||||
$this->db = $this->load->database("regional", true);
|
||||
}
|
||||
function index() {
|
||||
$md5 = $this->sys_input["md5"];
|
||||
$jdata = $this->sys_input["data"];
|
||||
$l_md5 = md5($jdata);
|
||||
if ($md5 != $l_md5) {
|
||||
echo json_encode( array( "status" => "ERR",
|
||||
"message" => "$md5 <> local $l_md5"));
|
||||
exit;
|
||||
}
|
||||
$data = json_decode($jdata,true);
|
||||
$status = array();
|
||||
$d_sql = "delete from ssr_mr04 where SsrMr04M_BranchCode = ? and
|
||||
SsrMr04Date=?";
|
||||
|
||||
$sql = "insert into ssr_mr04(SsrMr04M_BranchCode, SsrMr04Date, SsrMr04PasienAps, SsrMr04Aps ,
|
||||
SsrMr04PasienDokter , SsrMr04Dokter , SsrMr04PasienPerusahaan , SsrMr04Perusahaan ,
|
||||
SsrMr04PasienRujukan , SsrMr04Rujukan , SsrMr04PasienAnakPerusahaan , SsrMr04AnakPerusahaan ,
|
||||
SsrMr04PasienPenelitian , SsrMr04Penelitian , SsrMr04PasienRAP , SsrMr04RAP ,
|
||||
SsrMr04TotalPasien , SsrMr04TotalOmzet) values(?,?,?,?, ?,?,?,?, ?,?,?,?, ?,?,?,? ,?,?)";
|
||||
foreach($data as $d) {
|
||||
$SsrMr04M_BranchCode = $d["SsrMr04M_BranchCode"];
|
||||
$SsrMr04Date = $d["SsrMr04Date"];
|
||||
$SsrMr04PasienAps =$d["SsrMr04PasienAps"];
|
||||
$SsrMr04Aps =$d["SsrMr04Aps"];
|
||||
$SsrMr04PasienDokter =$d["SsrMr04PasienDokter"];
|
||||
$SsrMr04Dokter =$d["SsrMr04Dokter"];
|
||||
$SsrMr04PasienPerusahaan =$d["SsrMr04PasienPerusahaan"];
|
||||
$SsrMr04Perusahaan =$d["SsrMr04Perusahaan"];
|
||||
$SsrMr04PasienRujukan =$d["SsrMr04PasienRujukan"];
|
||||
$SsrMr04Rujukan =$d["SsrMr04Rujukan"];
|
||||
$SsrMr04PasienAnakPerusahaan =$d["SsrMr04PasienAnakPerusahaan"];
|
||||
$SsrMr04AnakPerusahaan =$d["SsrMr04AnakPerusahaan"];
|
||||
$SsrMr04PasienPenelitian =$d["SsrMr04PasienPenelitian"];
|
||||
$SsrMr04Penelitian =$d["SsrMr04Penelitian"];
|
||||
$SsrMr04PasienRAP =$d["SsrMr04PasienRAP"];
|
||||
$SsrMr04RAP =$d["SsrMr04RAP"];
|
||||
$SsrMr04TotalPasien = $d["SsrMr04TotalPasien"];
|
||||
$SsrMr04TotalOmzet = $d["SsrMr04TotalOmzet"];
|
||||
try{
|
||||
$qry = $this->db->query($d_sql, array($SsrMr04M_BranchCode, $SsrMr04Date));
|
||||
if ($qry) {
|
||||
$qry = $this->db->query($sql,array($SsrMr04M_BranchCode, $SsrMr04Date, $SsrMr04PasienAps, $SsrMr04Aps ,
|
||||
$SsrMr04PasienDokter , $SsrMr04Dokter , $SsrMr04PasienPerusahaan , $SsrMr04Perusahaan ,
|
||||
$SsrMr04PasienRujukan , $SsrMr04Rujukan , $SsrMr04PasienAnakPerusahaan , $SsrMr04AnakPerusahaan ,
|
||||
$SsrMr04PasienPenelitian , $SsrMr04Penelitian , $SsrMr04PasienRAP , $SsrMr04RAP ,
|
||||
$SsrMr04TotalPasien , $SsrMr04TotalOmzet));
|
||||
if($qry) {
|
||||
$status[] = $d["SsrMr04ID"];
|
||||
}else {
|
||||
print_r($this->db->error());
|
||||
}
|
||||
} else {
|
||||
print_r($this->db->error());
|
||||
}
|
||||
} catch(Exception $e) {
|
||||
}
|
||||
}
|
||||
echo json_encode( array("status" => "OK" , "SsrMr04ID" => $status));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
class R_mr05 extends MY_Controller
|
||||
{
|
||||
function __construct() {
|
||||
parent::__construct();
|
||||
$this->db = $this->load->database("regional", true);
|
||||
}
|
||||
function index() {
|
||||
$md5 = $this->sys_input["md5"];
|
||||
$jdata = $this->sys_input["data"];
|
||||
$l_md5 = md5($jdata);
|
||||
if ($md5 != $l_md5) {
|
||||
echo json_encode( array( "status" => "ERR",
|
||||
"message" => "$md5 <> local $l_md5"));
|
||||
exit;
|
||||
}
|
||||
$data = json_decode($jdata,true);
|
||||
$status = array();
|
||||
$d_sql = "delete from ssr_mr05 where SsrMr05M_BranchCode = ? and
|
||||
SsrMr05T_OrderHeaderID = ?";
|
||||
|
||||
$sql = "insert into ssr_mr05(SsrMr05M_BranchCode, SsrMr05M_StaffNIK,
|
||||
SsrMr05T_OrderHeaderDate, SsrMr05T_OrderHeaderID, SsrMr05M_CompanyID, SsrMr05M_MouID, SsrMr05M_MouName,
|
||||
SsrMr05M_OmzetTypeName, SsrMr05M_OmzetTypeID, SsrMr05Total, SsrMr05Payment, SsrMr05TotalPasien)
|
||||
values(?,?, ?,?,?,?,?, ?,?,?,?,?)";
|
||||
foreach($data as $d) {
|
||||
$SsrMr05T_OrderHeaderID = $d["SsrMr05T_OrderHeaderID"];
|
||||
$SsrMr05T_OrderHeaderDate = $d["SsrMr05T_OrderHeaderDate"];
|
||||
$SsrMr05M_BranchCode = $d["SsrMr05M_BranchCode"];
|
||||
$SsrMr05M_StaffNIK = $d["SsrMr05M_StaffNIK"];
|
||||
$SsrMr05M_CompanyID =$d["SsrMr05M_CompanyID"];
|
||||
$SsrMr05M_MouID =$d["SsrMr05M_MouID"];
|
||||
$SsrMr05M_MouName=$d["SsrMr05M_MouName"];
|
||||
$SsrMr05M_OmzetTypeName=$d["SsrMr05M_OmzetTypeName"];
|
||||
$SsrMr05M_OmzetTypeID=$d["SsrMr05M_OmzetTypeID"];
|
||||
$SsrMr05Total = $d["SsrMr05Total"];
|
||||
$SsrMr05Payment = $d["SsrMr05Payment"];
|
||||
$SsrMr05TotalPasien = $d["SsrMr05TotalPasien"];
|
||||
try{
|
||||
$qry = $this->db->query($d_sql, array($SsrMr05M_BranchCode, $SsrMr05T_OrderHeaderID));
|
||||
if ($qry) {
|
||||
$qry = $this->db->query($sql,array($SsrMr05M_BranchCode,$SsrMr05M_StaffNIK,
|
||||
$SsrMr05T_OrderHeaderDate,$SsrMr05T_OrderHeaderID,$SsrMr05M_CompanyID,$SsrMr05M_MouID,$SsrMr05M_MouName,
|
||||
$SsrMr05M_OmzetTypeName, $SsrMr05M_OmzetTypeID,$SsrMr05Total,$SsrMr05Payment, $SsrMr05TotalPasien));
|
||||
if($qry) {
|
||||
$status[] = $d["SsrMr05ID"];
|
||||
}else {
|
||||
print_r($this->db->error());
|
||||
}
|
||||
} else {
|
||||
print_r($this->db->error());
|
||||
}
|
||||
} catch(Exception $e) {
|
||||
}
|
||||
}
|
||||
echo json_encode( array("status" => "OK" , "SsrMr05ID" => $status));
|
||||
}
|
||||
}
|
||||
104
one-api/application/controllers/tools/marketing/R_mr05-dev.php
Normal file
104
one-api/application/controllers/tools/marketing/R_mr05-dev.php
Normal file
@@ -0,0 +1,104 @@
|
||||
<?php
|
||||
class R_mr05 extends MY_Controller
|
||||
{
|
||||
function __construct() {
|
||||
parent::__construct();
|
||||
$this->db = $this->load->database("regional", true);
|
||||
}
|
||||
function index() {
|
||||
$md5 = $this->sys_input["md5"];
|
||||
$jdata = $this->sys_input["data"];
|
||||
$l_md5 = md5($jdata);
|
||||
if ($md5 != $l_md5) {
|
||||
echo json_encode( array( "status" => "ERR",
|
||||
"message" => "$md5 <> local $l_md5"));
|
||||
exit;
|
||||
}
|
||||
$data = json_decode($jdata,true);
|
||||
$status = array();
|
||||
$d_sql = "delete from ssr_mr05 where SsrMr05M_BranchCode = ? and
|
||||
SsrMr05T_OrderHeaderID = ?";
|
||||
|
||||
$sql = "insert into ssr_mr05(SsrMr05M_BranchCode, SsrMr05Date, SsrMr05M_StaffNIK,
|
||||
SsrMr05T_OrderHeaderDate, SsrMr05T_OrderHeaderID, SsrMr05M_CompanyID, SsrMr05M_MouID, SsrMr05M_MouName,
|
||||
SsrMr05M_OmzetTypeName, SsrMr05M_OmzetTypeID, SsrMr05Total, SsrMr05Payment, SsrMr05TotalPasien)
|
||||
values(?,?,?, ?,?,?,?,?, ?,?,?,?,?)";
|
||||
foreach($data as $d) {
|
||||
$SsrMr05T_OrderHeaderID = $d["SsrMr05T_OrderHeaderID"];
|
||||
$SsrMr05Date = $d["SsrMr05Date"];
|
||||
$SsrMr05T_OrderHeaderDate = $d["SsrMr05T_OrderHeaderDate"];
|
||||
$SsrMr05M_BranchCode = $d["SsrMr05M_BranchCode"];
|
||||
$SsrMr05M_StaffNIK = $d["SsrMr05M_StaffNIK"];
|
||||
$SsrMr05M_CompanyID =$d["SsrMr05M_CompanyID"];
|
||||
$SsrMr05M_MouID =$d["SsrMr05M_MouID"];
|
||||
$SsrMr05M_MouName=$d["SsrMr05M_MouName"];
|
||||
$SsrMr05M_OmzetTypeName=$d["SsrMr05M_OmzetTypeName"];
|
||||
$SsrMr05M_OmzetTypeID=$d["SsrMr05M_OmzetTypeID"];
|
||||
$SsrMr05Total = $d["SsrMr05Total"];
|
||||
$SsrMr05Payment = $d["SsrMr05Payment"];
|
||||
$SsrMr05TotalPasien = $d["SsrMr05TotalPasien"];
|
||||
try{
|
||||
$qry = $this->db->query($d_sql, array($SsrMr05M_BranchCode, $SsrMr05T_OrderHeaderID));
|
||||
if ($qry) {
|
||||
$qry = $this->db->query($sql,array($SsrMr05M_BranchCode, $SsrMr05Date, $SsrMr05M_StaffNIK,
|
||||
$SsrMr05T_OrderHeaderDate,$SsrMr05T_OrderHeaderID,$SsrMr05M_CompanyID,$SsrMr05M_MouID,$SsrMr05M_MouName,
|
||||
$SsrMr05M_OmzetTypeName, $SsrMr05M_OmzetTypeID,$SsrMr05Total,$SsrMr05Payment, $SsrMr05TotalPasien));
|
||||
if($qry) {
|
||||
$status[] = $d["SsrMr05ID"];
|
||||
}else {
|
||||
print_r($this->db->error());
|
||||
}
|
||||
} else {
|
||||
print_r($this->db->error());
|
||||
}
|
||||
} catch(Exception $e) {
|
||||
}
|
||||
}
|
||||
echo json_encode( array("status" => "OK" , "SsrMr05ID" => $status));
|
||||
}
|
||||
function piutang() {
|
||||
$md5 = $this->sys_input["md5"];
|
||||
$jdata = $this->sys_input["data"];
|
||||
$l_md5 = md5($jdata);
|
||||
if ($md5 != $l_md5) {
|
||||
echo json_encode( array( "status" => "ERR",
|
||||
"message" => "$md5 <> local $l_md5"));
|
||||
exit;
|
||||
}
|
||||
$data = json_decode($jdata,true);
|
||||
$status = array();
|
||||
$d_sql = "delete from ssr_mr05_piutang where
|
||||
SsrMr05PiutangDate = ? and SsrMr05PiutangM_BranchCode = ? and SsrMr05PiutangM_CompanyID=?
|
||||
and SsrMr05PiutangM_MouID = ? ";
|
||||
|
||||
$sql = "insert into ssr_mr05_piutang(SsrMr05PiutangDate, SsrMr05PiutangM_BranchCode, SsrMr05PiutangM_CompanyID,
|
||||
SsrMr05PiutangM_MouID, SsrMr05PiutangSales, SsrMr05PiutangPayment )
|
||||
values(?,?,?, ?,?,?)";
|
||||
foreach($data as $d) {
|
||||
$SsrMr05PiutangDate = $d["SsrMr05PiutangDate"];
|
||||
$SsrMr05PiutangM_BranchCode = $d["SsrMr05PiutangM_BranchCode"];
|
||||
$SsrMr05PiutangM_CompanyID =$d["SsrMr05PiutangM_CompanyID"];
|
||||
$SsrMr05PiutangM_MouID =$d["SsrMr05PiutangM_MouID"];
|
||||
$SsrMr05PiutangSales=$d["SsrMr05PiutangSales"];
|
||||
$SsrMr05PiutangPayment=$d["SsrMr05PiutangPayment"];
|
||||
try{
|
||||
$qry = $this->db->query($d_sql, array($SsrMr05PiutangDate, $SsrMr05PiutangM_BranchCode,
|
||||
$SsrMr05PiutangM_CompanyID, $SsrMr05PiutangM_MouID));
|
||||
if ($qry) {
|
||||
$qry = $this->db->query($sql,array($SsrMr05PiutangDate,
|
||||
$SsrMr05PiutangM_BranchCode, $SsrMr05PiutangM_CompanyID,
|
||||
$SsrMr05PiutangM_MouID, $SsrMr05PiutangSales, $SsrMr05PiutangPayment));
|
||||
if($qry) {
|
||||
$status[] = $d["SsrMr05PiutangID"];
|
||||
}else {
|
||||
print_r($this->db->error());
|
||||
}
|
||||
} else {
|
||||
print_r($this->db->error());
|
||||
}
|
||||
} catch(Exception $e) {
|
||||
}
|
||||
}
|
||||
echo json_encode( array("status" => "OK" , "SsrMr05PiutangID" => $status));
|
||||
}
|
||||
}
|
||||
104
one-api/application/controllers/tools/marketing/R_mr05.php
Normal file
104
one-api/application/controllers/tools/marketing/R_mr05.php
Normal file
@@ -0,0 +1,104 @@
|
||||
<?php
|
||||
class R_mr05 extends MY_Controller
|
||||
{
|
||||
function __construct() {
|
||||
parent::__construct();
|
||||
$this->db = $this->load->database("regional", true);
|
||||
}
|
||||
function index() {
|
||||
$md5 = $this->sys_input["md5"];
|
||||
$jdata = $this->sys_input["data"];
|
||||
$l_md5 = md5($jdata);
|
||||
if ($md5 != $l_md5) {
|
||||
echo json_encode( array( "status" => "ERR",
|
||||
"message" => "$md5 <> local $l_md5"));
|
||||
exit;
|
||||
}
|
||||
$data = json_decode($jdata,true);
|
||||
$status = array();
|
||||
$d_sql = "delete from ssr_mr05 where SsrMr05M_BranchCode = ? and
|
||||
SsrMr05T_OrderHeaderID = ?";
|
||||
|
||||
$sql = "insert into ssr_mr05(SsrMr05M_BranchCode, SsrMr05Date, SsrMr05M_StaffNIK,
|
||||
SsrMr05T_OrderHeaderDate, SsrMr05T_OrderHeaderID, SsrMr05M_CompanyID, SsrMr05M_MouID, SsrMr05M_MouName,
|
||||
SsrMr05M_OmzetTypeName, SsrMr05M_OmzetTypeID, SsrMr05Total, SsrMr05Payment, SsrMr05TotalPasien)
|
||||
values(?,?,?, ?,?,?,?,?, ?,?,?,?,?)";
|
||||
foreach($data as $d) {
|
||||
$SsrMr05T_OrderHeaderID = $d["SsrMr05T_OrderHeaderID"];
|
||||
$SsrMr05Date = $d["SsrMr05Date"];
|
||||
$SsrMr05T_OrderHeaderDate = $d["SsrMr05T_OrderHeaderDate"];
|
||||
$SsrMr05M_BranchCode = $d["SsrMr05M_BranchCode"];
|
||||
$SsrMr05M_StaffNIK = $d["SsrMr05M_StaffNIK"];
|
||||
$SsrMr05M_CompanyID =$d["SsrMr05M_CompanyID"];
|
||||
$SsrMr05M_MouID =$d["SsrMr05M_MouID"];
|
||||
$SsrMr05M_MouName=$d["SsrMr05M_MouName"];
|
||||
$SsrMr05M_OmzetTypeName=$d["SsrMr05M_OmzetTypeName"];
|
||||
$SsrMr05M_OmzetTypeID=$d["SsrMr05M_OmzetTypeID"];
|
||||
$SsrMr05Total = $d["SsrMr05Total"];
|
||||
$SsrMr05Payment = $d["SsrMr05Payment"];
|
||||
$SsrMr05TotalPasien = $d["SsrMr05TotalPasien"];
|
||||
try{
|
||||
$qry = $this->db->query($d_sql, array($SsrMr05M_BranchCode, $SsrMr05T_OrderHeaderID));
|
||||
if ($qry) {
|
||||
$qry = $this->db->query($sql,array($SsrMr05M_BranchCode, $SsrMr05Date, $SsrMr05M_StaffNIK,
|
||||
$SsrMr05T_OrderHeaderDate,$SsrMr05T_OrderHeaderID,$SsrMr05M_CompanyID,$SsrMr05M_MouID,$SsrMr05M_MouName,
|
||||
$SsrMr05M_OmzetTypeName, $SsrMr05M_OmzetTypeID,$SsrMr05Total,$SsrMr05Payment, $SsrMr05TotalPasien));
|
||||
if($qry) {
|
||||
$status[] = $d["SsrMr05ID"];
|
||||
}else {
|
||||
print_r($this->db->error());
|
||||
}
|
||||
} else {
|
||||
print_r($this->db->error());
|
||||
}
|
||||
} catch(Exception $e) {
|
||||
}
|
||||
}
|
||||
echo json_encode( array("status" => "OK" , "SsrMr05ID" => $status));
|
||||
}
|
||||
function piutang() {
|
||||
$md5 = $this->sys_input["md5"];
|
||||
$jdata = $this->sys_input["data"];
|
||||
$l_md5 = md5($jdata);
|
||||
if ($md5 != $l_md5) {
|
||||
echo json_encode( array( "status" => "ERR",
|
||||
"message" => "$md5 <> local $l_md5"));
|
||||
exit;
|
||||
}
|
||||
$data = json_decode($jdata,true);
|
||||
$status = array();
|
||||
$d_sql = "delete from ssr_mr05_piutang where
|
||||
SsrMr05PiutangDate = ? and SsrMr05PiutangM_BranchCode = ? and SsrMr05PiutangM_CompanyID=?
|
||||
and SsrMr05PiutangM_MouID = ? ";
|
||||
|
||||
$sql = "insert into ssr_mr05_piutang(SsrMr05PiutangDate, SsrMr05PiutangM_BranchCode, SsrMr05PiutangM_CompanyID,
|
||||
SsrMr05PiutangM_MouID, SsrMr05PiutangSales, SsrMr05PiutangPayment )
|
||||
values(?,?,?, ?,?,?)";
|
||||
foreach($data as $d) {
|
||||
$SsrMr05PiutangDate = $d["SsrMr05PiutangDate"];
|
||||
$SsrMr05PiutangM_BranchCode = $d["SsrMr05PiutangM_BranchCode"];
|
||||
$SsrMr05PiutangM_CompanyID =$d["SsrMr05PiutangM_CompanyID"];
|
||||
$SsrMr05PiutangM_MouID =$d["SsrMr05PiutangM_MouID"];
|
||||
$SsrMr05PiutangSales=$d["SsrMr05PiutangSales"];
|
||||
$SsrMr05PiutangPayment=$d["SsrMr05PiutangPayment"];
|
||||
try{
|
||||
$qry = $this->db->query($d_sql, array($SsrMr05PiutangDate, $SsrMr05PiutangM_BranchCode,
|
||||
$SsrMr05PiutangM_CompanyID, $SsrMr05PiutangM_MouID));
|
||||
if ($qry) {
|
||||
$qry = $this->db->query($sql,array($SsrMr05PiutangDate,
|
||||
$SsrMr05PiutangM_BranchCode, $SsrMr05PiutangM_CompanyID,
|
||||
$SsrMr05PiutangM_MouID, $SsrMr05PiutangSales, $SsrMr05PiutangPayment));
|
||||
if($qry) {
|
||||
$status[] = $d["SsrMr05PiutangID"];
|
||||
}else {
|
||||
print_r($this->db->error());
|
||||
}
|
||||
} else {
|
||||
print_r($this->db->error());
|
||||
}
|
||||
} catch(Exception $e) {
|
||||
}
|
||||
}
|
||||
echo json_encode( array("status" => "OK" , "SsrMr05PiutangID" => $status));
|
||||
}
|
||||
}
|
||||
69
one-api/application/controllers/tools/marketing/R_mr07.php
Normal file
69
one-api/application/controllers/tools/marketing/R_mr07.php
Normal file
@@ -0,0 +1,69 @@
|
||||
<?php
|
||||
class R_mr07 extends MY_Controller
|
||||
{
|
||||
function __construct() {
|
||||
parent::__construct();
|
||||
$this->db = $this->load->database("regional", true);
|
||||
}
|
||||
function index() {
|
||||
$md5 = $this->sys_input["md5"];
|
||||
$jdata = $this->sys_input["data"];
|
||||
$l_md5 = md5($jdata);
|
||||
if ($md5 != $l_md5) {
|
||||
echo json_encode( array( "status" => "ERR",
|
||||
"message" => "$md5 <> local $l_md5"));
|
||||
exit;
|
||||
}
|
||||
$data = json_decode($jdata,true);
|
||||
$status = array();
|
||||
$d_sql = "delete from ssr_mr07 where SsrMr07M_BranchCode = ? and
|
||||
SsrMr07T_OrderHeaderID = ? and SsrMr07JpaName = ?";
|
||||
|
||||
$sql = "insert into ssr_mr07(SsrMr07M_BranchCode, SsrMr07M_PatientName,
|
||||
SsrMr07T_OrderHeaderID, SsrMr07T_OrderHeaderDate, SsrMr07T_OrderHeaderLabNumberExt,
|
||||
SsrMr07M_CompanyID,SsrMr07M_MouID,SsrMr07M_OmzetTypeID,
|
||||
SsrMr07Bruto, SsrMr07Netto,SsrMr07M_MouJpaIsNetto,
|
||||
SsrMr07Price,SsrMr07M_StaffNIK, SsrMr07JpaName, SsrMr07JpaPercent,
|
||||
SsrMr07Jpa, SsrMr07M_No_FormRev) values(?,?, ?,?,?, ?,?,?, ?,?,?, ?,?,?,?, ?,?)";
|
||||
|
||||
foreach($data as $d) {
|
||||
$SsrMr07M_BranchCode = $d["SsrMr07M_BranchCode"];
|
||||
$SsrMr07M_PatientName =$d["SsrMr07M_PatientName"];
|
||||
$SsrMr07T_OrderHeaderID = $d["SsrMr07T_OrderHeaderID"];
|
||||
$SsrMr07T_OrderHeaderDate =$d["SsrMr07T_OrderHeaderDate"];
|
||||
$SsrMr07T_OrderHeaderLabNumberExt =$d["SsrMr07T_OrderHeaderLabNumberExt"];
|
||||
$SsrMr07M_CompanyID =$d["SsrMr07M_CompanyID"];
|
||||
$SsrMr07M_MouID =$d["SsrMr07M_MouID"];
|
||||
$SsrMr07M_OmzetTypeID =$d["SsrMr07M_OmzetTypeID"];
|
||||
$SsrMr07Bruto = $d["SsrMr07Bruto"];
|
||||
$SsrMr07Netto = $d["SsrMr07Netto"];
|
||||
$SsrMr07M_MouJpaIsNetto =$d["SsrMr07M_MouJpaIsNetto"];
|
||||
$SsrMr07Price =$d["SsrMr07Price"];
|
||||
$SsrMr07M_StaffNIK = $d["SsrMr07M_StaffNIK"];
|
||||
$SsrMr07JpaName = $d["SsrMr07JpaName"];
|
||||
$SsrMr07JpaPercent = $d["SsrMr07JpaPercent"];
|
||||
$SsrMr07Jpa = $d["SsrMr07Jpa"];
|
||||
$SsrMr07M_No_FormRev = $d["SsrMr07M_No_FormRev"];
|
||||
try{
|
||||
$qry = $this->db->query($d_sql, array($SsrMr07M_BranchCode, $SsrMr07T_OrderHeaderID,$SsrMr07JpaName));
|
||||
if ($qry) {
|
||||
$qry = $this->db->query($sql,array($SsrMr07M_BranchCode,$SsrMr07M_PatientName,
|
||||
$SsrMr07T_OrderHeaderID, $SsrMr07T_OrderHeaderDate, $SsrMr07T_OrderHeaderLabNumberExt,
|
||||
$SsrMr07M_CompanyID, $SsrMr07M_MouID, $SsrMr07M_OmzetTypeID,
|
||||
$SsrMr07Bruto, $SsrMr07Netto, $SsrMr07M_MouJpaIsNetto,
|
||||
$SsrMr07Price, $SsrMr07M_StaffNIK, $SsrMr07JpaName, $SsrMr07JpaPercent,
|
||||
$SsrMr07Jpa, $SsrMr07M_No_FormRev));
|
||||
if($qry) {
|
||||
$status[] = $d["SsrMr07ID"];
|
||||
}else {
|
||||
print_r($this->db->error());
|
||||
}
|
||||
} else {
|
||||
print_r($this->db->error());
|
||||
}
|
||||
} catch(Exception $e) {
|
||||
}
|
||||
}
|
||||
echo json_encode( array("status" => "OK" , "SsrMr07ID" => $status));
|
||||
}
|
||||
}
|
||||
77
one-api/application/controllers/tools/marketing/R_mr09.php
Normal file
77
one-api/application/controllers/tools/marketing/R_mr09.php
Normal file
@@ -0,0 +1,77 @@
|
||||
<?php
|
||||
class R_mr09 extends MY_Controller
|
||||
{
|
||||
function __construct() {
|
||||
parent::__construct();
|
||||
$this->db = $this->load->database("regional", true);
|
||||
}
|
||||
function index() {
|
||||
$md5 = $this->sys_input["md5"];
|
||||
$jdata = $this->sys_input["data"];
|
||||
$l_md5 = md5($jdata);
|
||||
if ($md5 != $l_md5) {
|
||||
echo json_encode( array( "status" => "ERR",
|
||||
"message" => "$md5 <> local $l_md5"));
|
||||
exit;
|
||||
}
|
||||
$data = json_decode($jdata,true);
|
||||
$status = array();
|
||||
$d_sql = "delete from ssr_mr09 where SsrMr09M_BranchCode = ? and
|
||||
SsrMr09Date= ? and SsrMr09M_PatientNoreg= ? and SsrMr09M_MouID=?";
|
||||
|
||||
$sql = "insert into ssr_mr09(SsrMr09M_BranchCode, SsrMr09Date, SsrMr09M_PatientNoreg, SsrMr09M_PatientName,
|
||||
SsrMr09M_PatientDOB, SsrMr09M_PatientAge, SsrMr09M_PatientNIK, SsrMr09M_PatientJabatan,
|
||||
SsrMr09M_PatientKedudukan, SsrMr09M_PatientPJ, SsrMr09M_PatientLocation, SsrMr09M_PatientJob,
|
||||
SsrMr09Kedatangan, SsrMr09T_Test, SsrMr09JumlahTest, SsrMr09Bruto,
|
||||
SsrMr09Total, SsrMr09Discount, SsrMr09Payment, SsrMr09M_CompanyID,
|
||||
SsrMr09M_MouID, SsrMr09M_OmzetTypeID)
|
||||
values(?,?,?,?, ?,?,?,?, ?,?,?,?, ?,?,?,?, ?,?,?,?, ?,?)";
|
||||
|
||||
foreach($data as $d) {
|
||||
$SsrMr09M_BranchCode = $d["SsrMr09M_BranchCode"];
|
||||
$SsrMr09Date =$d["SsrMr09Date"];
|
||||
$SsrMr09M_PatientNoreg =$d["SsrMr09M_PatientNoreg"];
|
||||
$SsrMr09M_PatientName =$d["SsrMr09M_PatientName"];
|
||||
$SsrMr09M_PatientDOB =$d["SsrMr09M_PatientDOB"];
|
||||
$SsrMr09M_PatientAge =$d["SsrMr09M_PatientAge"];
|
||||
$SsrMr09M_PatientNIK =$d["SsrMr09M_PatientNIK"];
|
||||
$SsrMr09M_PatientJabatan =$d["SsrMr09M_PatientJabatan"];
|
||||
$SsrMr09M_PatientKedudukan =$d["SsrMr09M_PatientKedudukan"];
|
||||
$SsrMr09M_PatientPJ =$d["SsrMr09M_PatientPJ"];
|
||||
$SsrMr09M_PatientLocation =$d["SsrMr09M_PatientLocation"];
|
||||
$SsrMr09M_PatientJob =$d["SsrMr09M_PatientJob"];
|
||||
$SsrMr09Kedatangan =$d["SsrMr09Kedatangan"];
|
||||
$SsrMr09T_Test =$d["SsrMr09T_Test"];
|
||||
$SsrMr09JumlahTest =$d["SsrMr09JumlahTest"];
|
||||
$SsrMr09Bruto =$d["SsrMr09Bruto"];
|
||||
$SsrMr09Total =$d["SsrMr09Total"];
|
||||
$SsrMr09Discount =$d["SsrMr09Discount"];
|
||||
$SsrMr09Payment =$d["SsrMr09Payment"];
|
||||
$SsrMr09M_CompanyID =$d["SsrMr09M_CompanyID"];
|
||||
$SsrMr09M_MouID =$d["SsrMr09M_MouID"];
|
||||
$SsrMr09M_OmzetTypeID =$d["SsrMr09M_OmzetTypeID"];
|
||||
try{
|
||||
$qry = $this->db->query($d_sql, array($SsrMr09M_BranchCode, $SsrMr09Date, $SsrMr09M_PatientNoreg,
|
||||
$SsrMr09M_MouID));
|
||||
if ($qry) {
|
||||
$qry = $this->db->query($sql,array($SsrMr09M_BranchCode, $SsrMr09Date, $SsrMr09M_PatientNoreg, $SsrMr09M_PatientName,
|
||||
$SsrMr09M_PatientDOB, $SsrMr09M_PatientAge, $SsrMr09M_PatientNIK, $SsrMr09M_PatientJabatan,
|
||||
$SsrMr09M_PatientKedudukan, $SsrMr09M_PatientPJ, $SsrMr09M_PatientLocation, $SsrMr09M_PatientJob,
|
||||
$SsrMr09Kedatangan, $SsrMr09T_Test, $SsrMr09JumlahTest, $SsrMr09Bruto,
|
||||
$SsrMr09Total, $SsrMr09Discount, $SsrMr09Payment, $SsrMr09M_CompanyID,
|
||||
$SsrMr09M_MouID, $SsrMr09M_OmzetTypeID ));
|
||||
if($qry) {
|
||||
$status[] = $d["SsrMr09ID"];
|
||||
}else {
|
||||
print_r($this->db->error());
|
||||
}
|
||||
} else {
|
||||
print_r($this->db->error());
|
||||
}
|
||||
} catch(Exception $e) {
|
||||
print_r($this->db->error());
|
||||
}
|
||||
}
|
||||
echo json_encode( array("status" => "OK" , "SsrMr09ID" => $status));
|
||||
}
|
||||
}
|
||||
71
one-api/application/controllers/tools/marketing/R_mr11.php
Normal file
71
one-api/application/controllers/tools/marketing/R_mr11.php
Normal file
@@ -0,0 +1,71 @@
|
||||
<?php
|
||||
class R_mr11 extends MY_Controller
|
||||
{
|
||||
function __construct() {
|
||||
parent::__construct();
|
||||
$this->db = $this->load->database("regional", true);
|
||||
}
|
||||
function index() {
|
||||
$md5 = $this->sys_input["md5"];
|
||||
$jdata = $this->sys_input["data"];
|
||||
$l_md5 = md5($jdata);
|
||||
if ($md5 != $l_md5) {
|
||||
echo json_encode( array( "status" => "ERR",
|
||||
"message" => "$md5 <> local $l_md5"));
|
||||
exit;
|
||||
}
|
||||
$data = json_decode($jdata,true);
|
||||
$status = array();
|
||||
$d_sql = "delete from ssr_mr11 where SsrMr11M_BranchCode = ? and SsrMr11M_CompanyID = ? and
|
||||
SsrMr11Date = ?";
|
||||
|
||||
$sql = "insert into ssr_mr11(
|
||||
ssrMr11M_CompanyID, ssrMr11M_CompanyNumber, ssrMr11M_BranchCode,ssrMr11M_CompanyOldID,
|
||||
ssrMr11M_CompanyName, ssrMr11M_MouTypeName, ssrMr11M_MouTypeID, ssrMr11KerjasamaLokal, ssrMr11KerjasamaNasional,
|
||||
ssrMr11TagihanLokal, ssrMr11TagihanNasional, ssrMr11Date, ssrMr11Year, ssrMr11Month,
|
||||
ssrMr11Total, ssrMr11TotalPasien)
|
||||
values(?,?,?,?, ?,?,?,?,?, ?,?,?,?,?, ?,?)";
|
||||
foreach($data as $d) {
|
||||
$ssrMr11ID= $d["ssrMr11ID"];
|
||||
$ssrMr11M_BranchCode = $d["ssrMr11M_BranchCode"];
|
||||
$ssrMr11M_CompanyOldID= $d["ssrMr11M_CompanyOldID"];
|
||||
$ssrMr11M_CompanyID = $d["ssrMr11M_CompanyID"];
|
||||
$ssrMr11M_CompanyNumber = $d["ssrMr11M_CompanyNumber"];
|
||||
$ssrMr11M_CompanyName = $d["ssrMr11M_CompanyName"];
|
||||
$ssrMr11M_MouTypeName = $d["ssrMr11M_MouTypeName"];
|
||||
$ssrMr11M_MouTypeID = $d["ssrMr11M_MouTypeID"];
|
||||
$ssrMr11KerjasamaLokal = $d["ssrMr11KerjasamaLokal"];
|
||||
$ssrMr11KerjasamaNasional = $d["ssrMr11KerjasamaNasional"];
|
||||
$ssrMr11TagihanLokal = $d["ssrMr11TagihanLokal"];
|
||||
$ssrMr11TagihanNasional = $d["ssrMr11TagihanNasional"];
|
||||
$ssrMr11Date = $d["ssrMr11Date"];
|
||||
$ssrMr11Year = $d["ssrMr11Year"];
|
||||
$ssrMr11Month = $d["ssrMr11Month"];
|
||||
$ssrMr11Total = $d["ssrMr11Total"];
|
||||
$ssrMr11TotalPasien = $d["ssrMr11TotalPasien"];
|
||||
|
||||
try{
|
||||
$qry = $this->db->query($d_sql, array($ssrMr11M_BranchCode, $ssrMr11M_CompanyID,
|
||||
$ssrMr11Date));
|
||||
if ($qry) {
|
||||
$qry = $this->db->query($sql,array(
|
||||
$ssrMr11M_CompanyID, $ssrMr11M_CompanyNumber, $ssrMr11M_BranchCode,$ssrMr11M_CompanyOldID,
|
||||
$ssrMr11M_CompanyName, $ssrMr11M_MouTypeName, $ssrMr11M_MouTypeID, $ssrMr11KerjasamaLokal, $ssrMr11KerjasamaNasional,
|
||||
$ssrMr11TagihanLokal, $ssrMr11TagihanNasional, $ssrMr11Date, $ssrMr11Year, $ssrMr11Month,
|
||||
$ssrMr11Total, $ssrMr11TotalPasien
|
||||
));
|
||||
if($qry) {
|
||||
$status[] = $ssrMr11ID;
|
||||
}else {
|
||||
print_r($this->db->error());
|
||||
}
|
||||
} else {
|
||||
print_r($this->db->error());
|
||||
}
|
||||
} catch(Exception $e) {
|
||||
print_r($this->db->error());
|
||||
}
|
||||
}
|
||||
echo json_encode( array("status" => "OK" , "SsrMr11ID" => $status));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user