"; echo "table.tbl {width:750px;border-width:1px 1px 1px 1px;border-spacing:0;border-collapse:collapse;font-size:9pt;text-align:center;}"; echo "table.tbl td {margin:0;padding:2px;border-width:1px 1px 0 0;}"; echo "body {font-size:9pt;}"; echo "div.luar{text-align:left;margin-left:150px;}"; echo ".header{font-weight:bold;text-align:center;}"; echo ".isi{text-align:left;}"; echo ""; $nonota = $_GET['nota']; if(substr($_GET['nota'],0,2) == 'B-'): $nonotabon = $nonota; bon($nonotabon); elseif(substr($_GET['nota'],0,2) == 'W-'): $nonotabawa = $nonota; bawa($nonotabawa); elseif(substr($_GET['nota'],0,2) == 'R-'): $nonotaretur = $nonota; retur($nonotaretur); else: $nonotatunai = $nonota; tunai($nonotatunai); endif; function bon($nonotabon) { if(bukaKoneksi()){ global $conn; /*----------------------------------------Rekap Bon*/ $query = "SELECT d.`kd_brg`, d.`nomor`, b.nama_barang,d.`jumlah`, d.`diskon`, d.`hrg_satuan`,(d.`hrg_satuan`*d.`jumlah`) subtotal,d.`kd_pram` FROM d_bon d,barang b where d.`kd_brg`=b.kode_barang and d.no_bon = '$nonotabon'"; $query2 = "select m.no_bon,m.tgl_bon,m.kode_plg, m.jumlah_total,m.diskon, m.bank,m.no_kartu,m.kasir from m_bon m where m.no_bon = '$nonotabon'"; if($stmt = mysqli_prepare($conn,$query)){ mysqli_stmt_execute($stmt); mysqli_stmt_store_result($stmt); $cek = mysqli_stmt_num_rows($stmt); if($cek > 0){ mysqli_stmt_bind_result($stmt,$kdbrg,$nomor,$nmbrg,$jum,$diskon,$hj,$subtotal,$kdpram); print("
| Kode Brg. | Nomor | Nama | Juml | Disc | HJ | Sub Total | Kd Pram |
| $kdbrg | $nomor | $nmbrg | $jum | ".$diskon." | ".number_format($hj,0,',','.')." | ".number_format($subtotal,0,',','.')." | $kdpram |
| Kode Brg. | Nomor | Nama | Juml | HJ | Sub Total | Kd Pram |
| $kdbrg | $nomor | $nmbrg | $jum | ".number_format($hj,0,',','.')." | ".number_format($subtotal,0,',','.')." | $kdpram |
| Kode Brg. | Nomor | Nama | Juml | Disc | HJ | Sub Total | Nota tunai | Kd Pram |
| $kdbrg | $nomor | $nmbrg | $jum | ".$diskon." | ".number_format($hj,0,',','.')." | ".number_format($subtotal,0,',','.')." | $notatunai | $kdpram |
| Kode Brg. | Nomor | Nama | Juml | Disc | HJ | Sub Total | Kd Pram |
| $kdbrg | $nomor | $nmbrg | $jum | ".$diskon." | ".number_format($hj,0,',','.')." | ".number_format($subtotal,0,',','.')." | $kdpram |