query('SELECT * FROM m_shift order by idshift ASC');
$arr_shift = array(''=>'Pilih Shift');
foreach($ss->fetchAll() as $ds){
$arr_shift[$ds['idshift']] = $ds['nama_shift'];
}
array_push($form_plugin['ui_plugins_js'],$floatthead_js);
array_push($form_plugin['ui_plugins_js'],$sweetalert_js);
array_push($form_plugin['ui_plugins_js'],$jspm_js);
?>
0) {
$("#btn_simpan_restitusi").prop("disabled",false);
}
else {
$("#btn_simpan_restitusi").prop("disabled",true);
}
});
function cari() {
$("#nomr,#nama,#alamat,#no_telepon").val("");
$.post("'._BASE_.'keuangan/restitusi.php?page=cari",$("#frm_identitas").serialize(),function(data)
{
if(data.type != undefined) {
Toast.fire({title:data.message,type:data.type});
}
else {
$("#nomr").val(data.data_pasien.nomr).prop("readonly",true);
$("#nama").val(data.data_pasien.nama).prop("readonly",true);
$("#alamat").val(data.data_pasien.alamat).prop("readonly",true);
$("#no_telepon").val(data.data_pasien.notelp).prop("readonly",true);
$("#tempat_layanan").val(data.data_pasien.tempat_layanan).prop("readonly",true);
$("#kode_tarif").trigger("focus");
$("#st_rajal").val(data.data_pasien.st_rajal);
$("#idxdaftar").val(data.data_pasien.idxdaftar);
$("#tempat").val(data.data_pasien.kode_tempat);
$("#table_tarif tbody").html(data.list_tarif);
}
},"json");
}
function simpan() {
nama = $("#nama").val();
alamat = $("#alamat").val();
no_telepon = $("#no_telepon").val();
if(nama == "" || alamat == "" || no_telepon == "") {
Toast.fire({title:"Identitas belum terisi dengan lengkap",type:"error"});
}
else {
form_identitas = $("#frm_identitas").serialize();
form_billing = $("#form_billing").serialize();
$.post("'._BASE_.'keuangan/restitusi.php?page=billing",form_identitas+"&"+form_billing,function(data){
if(data.type == "error") {
Toast.fire({title:data.message,type:data.type});
}
else {
Toast.fire({title:data.message,type:data.type,onClose : function() {
print_tindakan(data.nonota);
reset_form();
}});
}
},"json");
}
}
function reset_form() {
$("#frm_identitas").trigger("reset");
$("#table_tarif tbody").html("");
}
';
?>