<html lang="en" moznomarginboxes mozdisallowselectionprint>
<head>
    <title>Faktur Penjualan Barang</title>
    <meta charset="utf-8">
    <link rel="stylesheet" href="<?php echo base_url('assets/css/laporan.css')?>"/>
</head>
<body onLoad="window.print()">
<div id="laporan">
  <table align="center" style="width:700px; border-bottom:3px double;border-top:none;border-right:none;border-left:none;margin-top:5px;margin-bottom:20px;">
  <!--<tr>
    <td><img src="<?php// echo base_url().'assets/img/kop_surat.png'?>"/></td>
</tr>-->
  </table>

<table border="0" align="center" style="width:700px; border:none;margin-top:5px;margin-bottom:0px;">
<tr>
    
</tr>
                       
</table>
<?php 
    $b=$data->row_array();
?>
<table border="0" align="center" style="width:700px;border:none;">
        <tr>
          <th colspan="4" style="text-align:left;"><p style="font-size: 24px">CV Karya Roof metal</p>
            <p>JL. Industri RT/RW 01/02 Kp. Tonggoh Desa Gunung Sari<br>
              Kab. Bogor
              Jawa Barat 
          16810 Phone<a href="tel:0218762812"> 0218762812</a></p></th>
        </tr>
        <tr>
          <th width="152" style="text-align:left;">&nbsp;</th>
         

          
          <th width="178" style="text-align:left;">&nbsp;</th>
          <th colspan="2" style="text-align:left;"><p>&nbsp;</p></th>
        </tr>
        <tr>
          <th colspan="4" style="text-align:left;"><hr></th>
        </tr>
        <tr>
            <th style="text-align:left;">No Faktur</th>
            <th style="text-align:left;">: <?php echo $b['jual_nofak'];?></th>
            <th width="131" style="text-align:left;">Nama</th>
            <th style="text-align:left;">: <?php echo $b['nama_pemilik'];?></th>
        </tr>
        <tr>
            <th style="text-align:left;">Tanggal</th>
            <th style="text-align:left;">: <?php echo $b['jual_tanggal'];?></th>
            <th style="text-align:left;">Hp</th>
            <th style="text-align:left;">: <?php echo $b['hp'];?></th>
        </tr>
        <tr>
            <th style="text-align:left;">Keterangan</th>
            <th style="text-align:left;">: <?php echo $b['jual_keterangan'];?></th>
            <th style="text-align:left;">Alamat</th>
            <th style="text-align:left;">: <?php echo $b['kilo_masuk'];?></th>
        </tr>
        <tr>
          <th style="text-align:left;">Pembayaran</th>
          <th style="text-align:left;">: <?php echo $b['pembayaran'];?></th>
          <th style="text-align:left;">&nbsp;</th>
          <th style="text-align:left;">&nbsp;</th>
        </tr>
        <tr>
          <th style="text-align:left;">&nbsp;</th>
          <th style="text-align:left;">&nbsp;</th>
          <th style="text-align:left;">&nbsp;</th>
          <th style="text-align:left;">&nbsp;</th>
        </tr>
        <tr>
          <th colspan="4" style="text-align:left;"><hr></th>
        </tr>
</table>

<table border="1" align="center" style="width:700px;margin-bottom:20px;">
<thead>

    <tr>
        <th style="width:50px;">No</th>
        <th>Nama Barang</th>
        <th>&nbsp;</th>
        <th>Harga Jual</th>
        <th>Qty</th>
        <th>Diskon</th>
        <th>SubTotal</th>
    </tr>
</thead>
<tbody>
<?php 
$no=0;
    foreach ($data->result_array() as $i) {
        $no++;
        
        $nabar=$i['d_jual_barang_nama'];
        $satuan=$i['d_jual_barang_satuan'];
        
        $harjul=$i['d_jual_barang_harjul'];
        $qty=$i['d_jual_qty'];
        $diskon=$i['d_jual_diskon'];
        $total=$i['d_jual_total'];
?>
    <tr>
        <td style="text-align:center;"><?php echo $no;?></td>
        <td style="text-align:left;"><?php echo $nabar;?></td>
        <td style="text-align:center;">&nbsp;</td>
        <td style="text-align:right;"><?php echo 'Rp '.number_format($harjul);?></td>
        <td style="text-align:center;"><?php echo $qty;?></td>
        <td style="text-align:right;"><?php echo 'Rp '.number_format($diskon);?></td>
        <td style="text-align:right;"><?php echo 'Rp '.number_format($total);?></td>
    </tr>
<?php }?>
</tbody>
<tfoot>

    <tr>
        <td colspan="6" style="text-align:center;"><b>Total</b></td>
        <td style="text-align:right;"><b><?php echo 'Rp '.number_format($b['jual_total']);?></b></td>
    </tr>
</tfoot>
</table>
<table border="0" align="center" style="width:700px;border:none;">
  <tr>
    <th colspan="4" style="text-align:left;"><hr></th>
  </tr>
  <tr>
    <th width="152" style="text-align:left;">Tanda Tangan</th>
    <th width="178" style="text-align:left;">&nbsp;</th>
    <th width="131" style="text-align:left;">Total</th>
    <th width="221" style="text-align:left;">: <?php echo 'Rp '.number_format($b['jual_total']).',-';?></th>
  </tr>
  <tr>
    <th style="text-align:left;">&nbsp;</th>
    <th style="text-align:left;">&nbsp;</th>
    <th style="text-align:left;">Tunai</th>
    <th style="text-align:left;">: <?php echo 'Rp '.number_format($b['jual_jml_uang']).',-';?></th>
  </tr>
  <tr>
    <th style="text-align:left;">&nbsp;</th>
    <th style="text-align:left;">&nbsp;</th>
    <th style="text-align:left;">Kembalian</th>
    <th style="text-align:left;">: <?php echo 'Rp '.number_format($b['jual_kembalian']).',-';?></th>
  </tr>
  <tr>
    <th style="text-align:left;">&nbsp;</th>
    <th style="text-align:left;">&nbsp;</th>
    <th style="text-align:left;">&nbsp;</th>
    <th align="right" style="text-align:right;">Kasir</th>
    </tr>
  <tr>
    <th style="text-align:left;">&nbsp;</th>
    <th style="text-align:left;">&nbsp;</th>
    <th style="text-align:left;">&nbsp;</th>
    <th valign="baseline" style="text-align:right;">( <?php echo $this->session->userdata('nama');?> )</th>
    </tr>
  <tr>
    <th colspan="4" style="text-align:left;"><hr></th>
    </tr>
</table>
<p>&nbsp;</p>
<table align="center" style="width:700px; border:none;margin-top:5px;margin-bottom:20px;">
    <tr>
        <td></td>
</table>
<table align="center" style="width:700px; border:none;margin-top:5px;margin-bottom:20px;">
    <tr>
        <td align="right">, </td>
    </tr>
    <tr>
        <td align="right"></td>
    </tr>
   
    <tr>
    <td><br/><br/><br/><br/></td>
    </tr>    
    <tr>
        <td align="right">&nbsp;</td>
    </tr>
    <tr>
        <td align="center"></td>
    </tr>
</table>
<table align="center" style="width:700px; border:none;margin-top:5px;margin-bottom:20px;">
    <tr>
        <th><br/><br/></th>
    </tr>
    <tr>
        <th align="left"></th>
    </tr>
</table>
</div>
</body>
</html>