first commit
This commit is contained in:
32
load_tmp_cartbayar.php
Normal file
32
load_tmp_cartbayar.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
if(!session_id())
|
||||
{
|
||||
session_start();
|
||||
include 'core/main.php';
|
||||
}
|
||||
|
||||
$query_load = 'SELECT a.kodetarif, a.qty, a.idxbayar, a.id, a.poly, b.uraian_tarif, a.tarif as harga from tmp_cartbayar a join m_tarif_rs b on b.kode_tarif = a.KODETARIF where a.IP = \''.getRealIpAddr().'\'';
|
||||
$tmp_query = $db->query( $query_load);
|
||||
|
||||
if($tmp_query){
|
||||
if($tmp_query->numRows() > 0){
|
||||
$i = 1;
|
||||
$total = 0;
|
||||
echo '<table width="100%" class="table table-bordered table-striped table-sm" id="tmp_cartbayar">';
|
||||
echo '<tr class="text-center"><th>No</th><th>Nama Tindakan</th><th>Harga</th><th>Qty</th><th>Aksi</th></tr>';
|
||||
echo '<tbody>';
|
||||
foreach($tmp_query->fetchAll() as $data){
|
||||
echo '<tr><td>'.$i.'</td><td>'.$data['uraian_tarif'].'</td><td style="text-align:right;">'.format_uang($data['harga']).'</td><td style="text-align:center;">'.$data['qty'].'</td><td><button type="button" class="batal btn btn-outline-danger btn-sm" id="'.$data['idxbayar'].'" onclick="batal_tindakan(this)">Batal</button></td></tr>';
|
||||
$i++;
|
||||
$total += ($data['harga'] * $data['qty']);
|
||||
}
|
||||
echo '<tr class="footer"><td colspan="2">Total</td><td style="text-align:right;">'.format_uang($total).'</td><td> </td><td> </td></tr>';
|
||||
echo '</tbody>';
|
||||
echo '<tr><td colspan="5" class="text-right">
|
||||
<!-- <button type="button" class="print_nota btn btn-outline-primary btn-sm" id="print_nota">CETAK</button> -->
|
||||
<button type="button" class="simpan btn btn-outline-primary btn-sm" id="simpan_tmp_cartbayar" onclick="save_tindakan()">SIMPAN</button>
|
||||
</td></tr>';
|
||||
echo '</table>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user