add simak to git repo
This commit is contained in:
82
app/kendali/modal_cari_ba.php
Normal file
82
app/kendali/modal_cari_ba.php
Normal file
@@ -0,0 +1,82 @@
|
||||
<?php
|
||||
include('../koneksi.php');
|
||||
$pekerjaan_id=$_POST['pekerjaan_id'];
|
||||
$vr_pelunasan_id=$_POST['vr_pelunasan_id'];
|
||||
?>
|
||||
|
||||
<input type="hidden" id="pekerjaan_idx_cari" value="<?php echo $pekerjaan_id; ?>">
|
||||
<input type="hidden" id="vr_pelunasan_idx_cari" value="<?php echo $vr_pelunasan_id; ?>">
|
||||
<script type="text/javascript">
|
||||
$("#tabel_data_databa_cari").DataTable({"stateSave": true,"paging": false,"lengthChange": false,"searching": true,"ordering": false,"info": false,"autoWidth": false});
|
||||
</script>
|
||||
<br>
|
||||
<input type="hidden" id="temp_data" style="width:600px" value="<?php echo $tempdata; ?>">
|
||||
<table id="tabel_data_databa_cari" class="table table-striped table-condensed table-bordered" cellpadding="1" style="font-family:Inter;font-size:13px">
|
||||
<thead style="font-family:InterSB">
|
||||
<tr align="center">
|
||||
<td>#</td>
|
||||
<td>Berita Acara</td>
|
||||
<td width="180px;">Nomor BA</td>
|
||||
<td width="120px;">Nilai BA</td>
|
||||
<td width="120px;">Tgl BA</td>
|
||||
<td width="120px;" align="center">Status</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$n=0;
|
||||
$data=pg_query("SELECT b.nama,r.nomor_ba,r.tanggal_ba,r.created_at,r.id,r.nilai_ba,r.vr_pelunasan_id,
|
||||
r.st_termin,r.termin_ke
|
||||
FROM riwayat_ba r
|
||||
INNER JOIN berita_acara b ON (b.id=r.berita_acara_id)
|
||||
WHERE r.pekerjaan_id='$pekerjaan_id'
|
||||
ORDER BY r.id DESC
|
||||
");
|
||||
while($r=pg_fetch_array($data)) {
|
||||
?>
|
||||
<tr style="color:#BBBBBB">
|
||||
<td align="center" class="kiri">
|
||||
<input type="checkbox" id='checkDelete' name='checkDelete[]' class="checkbox cb_data" value="<?php echo $r['id']; ?>"
|
||||
aria-label="Single checkbox Two">
|
||||
</td>
|
||||
<td><?php echo $r[0]; ?></td>
|
||||
<td align="center"><?php echo $r[1]; ?></td>
|
||||
<td align="right"><?php echo number_format($r['nilai_ba'],0,',','.'); ?></td>
|
||||
<td align="center"><?php echo date('d-m-Y',strtotime($r['tanggal_ba'])); ?></td>
|
||||
<td class="kanan" align="center"><?php
|
||||
if ($r['st_termin']=='termin') {echo strtoupper($r['st_termin']).' '.$r['termin_ke'];} else {
|
||||
if ($r['st_termin']=='uang muka') {echo strtoupper($r['st_termin']);} else {}
|
||||
}
|
||||
?></td>
|
||||
</tr>
|
||||
<?php
|
||||
$n=$n+$r[6];
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<script>
|
||||
|
||||
$('#simpan_databa_cari').prop("disabled", true);
|
||||
|
||||
function getSelectedVal(){
|
||||
var ID={};
|
||||
ID.values=[];
|
||||
$("input#checkDelete").each(function(){
|
||||
var $this = $(this);
|
||||
if($this.is(":checked")){
|
||||
ID.values.push($this.attr("value"));
|
||||
$(this).closest('tr').find('td').css('color', 'black');
|
||||
} else {$(this).closest('tr').find('td').css('color', '#BBBBBB')}
|
||||
$("#temp_data").val(ID.values);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
$("input[type='checkbox']").change(function() {
|
||||
getSelectedVal();
|
||||
var indah = $("#temp_data").val();
|
||||
if (!indah) {$('#simpan_databa_cari').prop("disabled", true);} else {$('#simpan_databa_cari').prop("disabled", false);}
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user