96 lines
3.8 KiB
PHP
96 lines
3.8 KiB
PHP
<?php
|
|
if(!session_id()) {
|
|
session_start();
|
|
}
|
|
|
|
if(!empty($_POST['kode_tarif'])) {
|
|
|
|
include("../core/main.php");
|
|
include("../include/function.php");
|
|
|
|
if(empty($_POST['SHIFT'])) {
|
|
|
|
echo "<div style='border:1px solid #DF7; width:95%; padding:5px; margin:5px; color:#F30; background-color:#FFF;' align='left'>";
|
|
echo "<strong>Maaf Shift Belum dipilih</strong>p<br>";
|
|
echo "</div>";
|
|
|
|
}else {
|
|
|
|
$date=date("Y/m/d");
|
|
$noruang = $_POST['RUANG'];
|
|
|
|
$sql = "SELECT * FROM m_ruang WHERE no = '$noruang'";
|
|
$q = $db->query($sql);
|
|
$ruang = $q->fetchAll()[0];
|
|
$vSql = execute("INSERT INTO t_dpmp (IDXDAFTAR,NOMR,RUANG,TYPEMAKANAN,KETERANGAN,JENISMAKANAN,SHIFT,KETERANGANTAMBAHAN,TANGGAL,SNACK, IDXTGL) VALUES ('{$_POST['IDXDAFTAR']}','{$_POST['NOMR']}','{$_POST['RUANG']}','{$_POST['TYPEMAKANAN']}','{$_POST['KETERANGAN']}','{$_POST['JENISMAKANAN']}','{$_POST['SHIFT']}','{$_POST['KETERANGANTAMBAHAN']}', '".date('Y-m-d H:i:s')."','{$_POST['SNACK']}', '".date('Y-m-d')."')");
|
|
if($vSql) {
|
|
execute("INSERT INTO t_notification VALUES('','<strong>No RM : $nomr<br>Ruang : $ruang[nama]<br> Request :<br> $_POST[KETERANGAN]</strong>',NULL,'15')");
|
|
echo "<div class='alert alert-success' role='alert'><strong>Input Data Sukses!</strong></div>";
|
|
}else {
|
|
echo "<div class='alert alert-danger' role='alert'><strong>Input Data Gagal!</strong></div>";
|
|
}
|
|
}
|
|
}
|
|
|
|
if(!empty($_POST['IDXDAFTAR'])) {
|
|
$idx = $_POST['IDXDAFTAR'];
|
|
}else if(!empty($_POST['id_admission'])) {
|
|
$idx = $_POST['id_admission'];
|
|
}else if(!empty($_GET['id_admission'])) {
|
|
$idx = $_GET['id_admission'];
|
|
}else {
|
|
$idx = $id_admission;
|
|
}
|
|
?>
|
|
|
|
<!--
|
|
<div id="valid_akomodasi">
|
|
<div id="head_report_akomodasi" style="display:none" align="center">
|
|
<div align="center" style="clear:both; padding:20px">
|
|
<div style="letter-spacing:-1px; font-size:16px; font:bold;"><?=strtoupper($header1)?></div>
|
|
<div style="letter-spacing:-2px; font-size:24px; color:#666; font:bold;"><?=strtoupper($header2)?></div>
|
|
<div><?=$header3?><br /><?=$header4?></div>
|
|
<hr style="margin:5px;" />
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<table width="95%" style="margin:10px;" border="0" class="table table-hover table-bordered table-striped table-sm" cellspacing="1" cellspading="1">
|
|
<tr align="center" class="bg-success text-light">
|
|
<th width="5%">NOMR</th>
|
|
<th width="15%">NAMA TARIF</th>
|
|
<th width="5%">KELAS</th>
|
|
<th width="10%">RUANG</th>
|
|
<th width="5%">Jml.Hari</th>
|
|
<th width="10%">JUMLAH</th>
|
|
</tr> -->
|
|
<?php
|
|
/*
|
|
$sql = "SELECT l.LUNAS ,d.uraian_tarif AS nama_jasa, b.IDXDAFTAR, d.uraian_tarif,b.TARIFRS,b.QTY,b.NOMR,r.nama as namaruang
|
|
FROM t_billranap b
|
|
JOIN m_tarif_rs d on b.KODETARIF = d.kode_tarif
|
|
JOIN t_admission e on e.nomr=b.NOMR
|
|
JOIN t_bayarranap l On l.NOBILL=b.NOBILL
|
|
JOIN m_ruang r on e.noruang = r.no
|
|
WHERE b.idxdaftar='$idx' and kelompok_tarif = 'PERAWATAN'
|
|
GROUP BY b.IDXBILL";
|
|
$NO=0;
|
|
$rs = $db->query($sql);
|
|
$count = 0;
|
|
foreach($rs->fetchAll() as $data) {
|
|
echo '
|
|
<tr>
|
|
<td>'.$data['NOMR'].'</td>
|
|
<td align="left">'.$data['nama_jasa'].'</td>
|
|
<td>'.$data['kelas'].'</td>
|
|
<td>'.$data['namaruang'].'</td>
|
|
<td>'.$data['QTY'].'</td>
|
|
<td>'.$data['TARIFRS'].'</td>
|
|
</tr>';
|
|
}*/
|
|
?>
|
|
<!--
|
|
</table>
|
|
</div>
|
|
<input type="button" class="btn btn-success text" value="PRINT" onclick="printIt('valid_akomodasi','head_report_akomodasi')" /> -->
|