Postingan lainnya
Tolong Bantuannya Untuk Mengtahui Tanggal Jatuh Tempo
<div class="table-header"></div>
<table width="100%" height="57" class="table table-striped table-bordered table-hover" id="sample-table-2">
<thead>
<tr>
<th><strong>No.</strong></th>
<th><strong>No. Invoice</strong></th>
<th><strong>Date Invoice</strong></th>
<th><strong>Term Pay</strong></th>
<th><strong>Due Date</strong></th>
<th><strong>No. PQ</strong></th>
<th><strong>No. DO</strong></th>
<th><strong>Total</strong></th>
<th><strong>Tools</strong></th>
</tr>
</thead>
</div>
<?php
$mySql = "SELECT invoice.*,so.*FROM invoice
LEFT JOIN so on invoice.no_so=so.no_so
ORDER BY invoice.no_invoice ASC";
$myQry = mysql_query($mySql, $koneksidb) or die ("Query 1 salah : ".mysql_error());
$nomor =0;
while ($myData = mysql_fetch_array($myQry)) {
$nomor++;
$noNota = $myData['no_invoice'];
# Menghitung Total Penjualan (belanja) setiap nomor transaksi
$my2Sql = "SELECT SUM(jumlah) AS total_barang,
SUM((harga_jual - (harga_jual * diskon / 100)) * jumlah) + SUM((harga_jual - (harga_jual * diskon / 100)) * jumlah) * 0.11 AS total_harga
DATE_ADD(tgl_invoice, INTERVAL 30 DAY)
as jatuh_tempo, DATEDIFF(DATE_ADD(tgl_invoice, INTERVAL 30 DAY), CURDATE()) FROM no_invoice='$nonota')
FROM invoice left join so_item on invoice.no_so=so_item.no_so WHERE no_invoice='$noNota'";
$my2Qry = mysql_query($my2Sql, $koneksidb) or die ("Query 2 salah : ".mysql_error());
$my2Data = mysql_fetch_array($my2Qry);
$Kode = $myData['no_invoice'];
?>
<tr>
<td align="center"><?php echo $nomor; ?></td>
<td><?php echo $myData['no_invoice']; ?></td>
<td><?php echo $myData['tgl_invoice']; ?></td>
<td><?php echo $myData['pembayaran']; ?></td>
<td><?php echo $mydata['jatuh_tempo']; ?></td>
<td><?php echo $myData['no_so']; ?></td>
<td><?php echo $myData['no_do']; ?></td>
<td><?php echo format_angka($my2Data['total_harga']); ?></td>
<!--<td><?php echo $myData['no_faktur']; ?></td>-->
<!--<td><?php echo $myData['no_po']; ?></td>-->
<td><a href="cetak/invoice_cetak.php?noInvoice=<?php echo $noNota; ?>" target="_blank" title="Cetak dengan Pajak">Cetak</a> <!--<a href="cetak/invoice_cetak2.php?noInvoice=<?php echo $noNota; ?>" target="_blank" title="Cetak tanpa Pajak">Cetak 2</a>--> |
<a href="?page=Invoice-Edit&Kode=<?php echo $Kode; ?>" target="_self" alt="Edit Data" class="icon-edit bigger-120" title="Edit"></a> |
<a href="?page=Invoice-Delete&Kode=<?php echo $Kode; ?>" target="_self" alt="Delete Data" title="Delete" class="icon-trash bigger-120" onclick="return confirm('ANDA YAKIN AKAN MENGHAPUS DATA INVOICE INI ... ?')"></a></td>
</tr>
untuk tanggal jatuh tempo tidak terdapat dalam database, yang saya minta tolong apakah rumus tersebut sudah benar ? yg saya cari tanggal jatuh temponya hanya sebagai peringatan saja
0
Belum ada Jawaban. Jadi yang pertama Jawaban
Login untuk ikut Jawaban