[ Mini Kiebo ]
Server: Windows NT DESKTOP-5B8S0D4 6.2 build 9200 (Windows 8 Professional Edition) i586
Path:
D:
/
xampp182
/
htdocs
/
simkeu
/
sia
/
[
Home
]
File: rekap_pengeluaran.php
<?php require_once("configure_first.php"); // $monthName = array("","Januari","Februari","Maret","April","Mei","Juni","Juli","Agustus","September","Oktober","Nopember","Desember"); // if(isset($_GET["tgl1"])) $tgl1 = $_GET["tgl1"]; // $dt1 = explode("-",$tgl1); // $nm_bln = $monthName[round($dt1[1])]; // if(isset($_GET["tgl2"])) $tgl2 = $_GET["tgl2"]; if(isset($_GET["tahun"])) $tahun = $_GET["tahun"]; ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Cetak Pengeluaran</title> <link href="https://fonts.googleapis.com/css?family=Nunito" rel="stylesheet"> <style media="screen"> body { font-family: 'Nunito', sans-serif; } table, th, td { border: 1px solid black; } table { border-collapse: collapse; margin: 120px auto; align: center; } th, td { padding: 6px 5px; } th { padding-left: 4px; background-color: #F1F1F1; } td { padding-left: 4px; padding-right: 4px; } </style> </head> <body onload="window.print();"> <img src="univbpi.png" width="100%"></td> <center><b>LAPORAN PENGELUARAN TAHUN <?php echo $tahun;?></b><br> <?php echo "<table class=\"table table-hover\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\" style=\" margin: 0; width: 60%;\" align=center>"; echo "<tr>"; echo "<th width=2% align=center>No</th>"; echo "<th width=32% align=center>Bulan</th>"; echo "<th width=50% align=center>Nominal</th>"; echo "</tr>"; $sql = "SELECT sum(nominal) as total,substr(tgl,1,7) as bln FROM keu_pengeluaran a left join keu_jpengeluaran b on a.id_jenispengeluaran = b.id where substr(tgl,1,4) = '".$_GET["tahun"]."' group by substr(tgl,1,7) order by tgl desc"; // echo $sql; $result = mysqli_query($conn, $sql); $no = 0; $jtotal = 0; if(mysqli_num_rows($result) > 0) { while($row = mysqli_fetch_assoc($result)) { $no = ($no+1); $jtotal = ($jtotal+$row['total']); echo "<tr valign=top>"; echo "<td align=center>".$no.". </td>"; echo "<td align=center>".$monthName[intval(substr($row['bln'],5,2))]." ".substr($row['bln'],0,4)."</td>"; echo "<td align=right>Rp. ".format_currency($row["total"])." </td>"; echo "</tr>"; } } echo "<tr>"; echo "<td colspan=2>TOTAL PENGELUARAN</td>"; echo "<td align=right>Rp. ".format_currency($jtotal)."</td>"; echo "</tr>"; echo "</table>"; echo "</form>"; ?> </center> </body> </html>