");
print("
Rekap Transaksi Bon
");
print("
");
print("
");
print("");
while(mysqli_stmt_fetch($stmt2)){
print("| $tgl | $nota | $kdplg | $kdbrg | $nmbrg | $kdlama | $no | $jml | $disc | ".number_format($hj,0,',','.')." | $hp | $kdpram |
");
}
print("
");
print("
");
}else{
echo "data tdk ada!";
echo "
";
}
}
/*----------------------------------------Rekap Bawa */
$query3 = "SELECT m.tgl_nota,d.no_nota,m.kd_customer,d.kd_barang,b.nama_barang,d.status_barang,s.nama_supplier,d.no_barang,d.jumlah,d.harga_satuan,n.harga_pokok,d.kode_pram
FROM d_nota_bawa d,barang b, no_barang n, m_nota_bawa m, supplier s
WHERE (d.kd_barang = b.kode_barang and d.no_barang = n.nomor)
and b.id_gabungan = n.id_gabungan
and d.no_nota = m.no_nota
and b.kode_supplier = s.kd_supplier
and date(m.tgl_nota) BETWEEN '$startDate' AND '$endDate'
order by m.tgl_nota";
//and status_barang is null
if($stmt3 = mysqli_prepare($conn,$query3)){
mysqli_stmt_execute($stmt3);
mysqli_stmt_store_result($stmt3);
$cek = mysqli_stmt_num_rows($stmt3);
if($cek > 0){
mysqli_stmt_bind_result($stmt3,$tgl,$nota,$kd_customer,$kdbrg,$nmbrg,$status,$kdlama,$no,$jml,$hj,$hp,$kdpram);
print("
");
print("
Rekap Transaksi Bawa
");
print("
");
print("
");
print("");
while(mysqli_stmt_fetch($stmt3)){
print("| $tgl | $nota | $kd_customer | $kdbrg | $nmbrg | $status | $kdlama | $no | $jml | ".number_format($hj,0,',','.')." | $hp | $kdpram |
");
}
print("
");
print("
");
}else{
echo "data tdk ada!";
echo "
";
}
}
/*----------------------------------------Rekap retur */
$query4 = "SELECT m.tgl_nota,d.no_nota,d.kd_barang,b.nama_barang,s.nama_supplier,d.no_barang,d.jumlah,d.diskon,d.harga_jual,d.harga_pokok,d.kode_pram
FROM d_nota_retur d,barang b,m_nota_retur m, supplier s
WHERE d.kd_barang = b.kode_barang
and d.no_nota = m.no_nota
and b.kode_supplier = s.kd_supplier
and (m.status_nota = 'T' or m.status_nota = 'K' or m.status_nota = 'D')
and date(m.tgl_nota) BETWEEN '$startDate' AND '$endDate'
order by m.tgl_nota";
if($stmt4 = mysqli_prepare($conn,$query4)){
mysqli_stmt_execute($stmt4);
mysqli_stmt_store_result($stmt4);
$cek = mysqli_stmt_num_rows($stmt4);
if($cek > 0){
mysqli_stmt_bind_result($stmt4,$tgl,$nota,$kdbrg,$nmbrg,$kdlama,$no,$jml,$disc,$hj,$hp,$kdpram);
print("
");
print("
Rekap Transaksi Retur
");
print("
");
print("
");
print("");
while(mysqli_stmt_fetch($stmt4)){
print("| $tgl | $nota | $kdbrg | $nmbrg | $kdlama | $no | $jml | $disc | ".number_format($hj,0,',','.')." | $hp | $kdpram |
");
}
print("
");
print("
");
}else{
echo "data tdk ada!";
echo "
";
}
}
print("
");
}
?>