<!-- https://www.malasngoding.com/membuat-cetak-print-laporan-dengan-php/ -->
<!DOCTYPE html>
<html>

	<head>
		<!-- https://stackoverflow-com.translate.goog/questions/1960939/disabling-browser-print-options-headers-footers-margins-from-page?_x_tr_sl=en&_x_tr_tl=id&_x_tr_hl=id&_x_tr_pto=tc 
		
		https://stackoverflow-com.translate.goog/questions/585254/how-to-remove-the-url-from-the-printing-page?_x_tr_sl=en&_x_tr_tl=id&_x_tr_hl=id&_x_tr_pto=tc
		-->
    <title>Print Test</title>
    <style type="text/css" media="print">
    @page 
    {
        size:  auto;   /* auto is the initial value */
        margin: 0mm;  /* this affects the margin in the printer settings */
    }

    html
    {
        background-color: #FFFFFF; 
        margin: 0px;  /* this affects the margin on the html before sending to printer */
    }

    body
    {
        /*border: solid 1px blue ;*/
        margin: 10mm 15mm 10mm 15mm; /* margin you want for the content */
    }
    </style>
</head>
<body>
 
	<?php 
  if(isset($_GET['rekening'])) {
    
}
$rekening = $_GET['rekening']; 
	include '../koneksi.php'; 
                       
         $print = mysqli_query($koneksi,"SELECT no_bukti,pokok,margin,keterangan FROM angsuran WHERE rekening ='".$rekening."' AND no_bukti LIKE '%AG%'  ORDER BY no DESC LIMIT 1");
          $data = mysqli_fetch_array($print);
          extract($data);
          /*echo $id['0'];*/
      ?>
      
      <div id="printableArea"> 
        <table border="0">
          <tr>
            <td><?php echo $no_bukti; ?>|</td>
            <td><?php echo number_format($pokok)."\n\n"; ?>|</td>
            <td><?php echo number_format($margin)."\n\n"; ?>|</td>
            <td><?php echo $keterangan; ?>|</td>
          </tr>
                   
       </div>
       </table>
       
 
	<script>
		window.print();
	</script>
  <div id="Success" class="Content" onload="winClose()">
  <script language="JavaScript" type="text/javascript">
 
  window.setTimeout("window.close();",1500)
</script>

	
</body>
</html>