 <style type="text/css">
        *{
            padding: 0;
            margin: 0;
           
        }
        table, tr, td{
            /*border: 4px solid black;*/
            border-collapse: collapse;
        }
        td {
            padding: 2px 4px;
        }
        .container{
            margin: 5px 80px;
        }
        h1{
            text-align: center;
            font-size: 24px;
            line-height: 30px;
        }
        .garis{
        	border-top: 3px solid black;
        	border-bottom: 3px solid black;
        }
    </style>

<table>
	<tr>
		<td>
			<h2 style="text-align: center;">Slip Gaji Karyawan</h2>
			<h2 style="text-align: center;">PERIODE : <?php echo date('d M Y',strtotime($karyawan->periode_dari)); ?> s/d <?php echo date('d M Y',strtotime($karyawan->periode_sampai)); ?></h2>
		</td>
	</tr>
</table> 
<br>
<br>

<table>
	<tr> 
	    <td width="15%" style="text-align:left;"><b>No Slip Gaji</b></td>  
	    <td width="15%" style="text-align:left;"><b></b></td> 
	    <td width="15%" style="text-align:left;"><b>:</b></td>   
	    <td width="15%" style="text-align:left;"><b><?php echo $karyawan->id; ?></b></td> 
	    <td width="15%" style="text-align:left;"><b></b></td>   
	    <td width="15%" style="text-align:left;"><b></b></td> 
	    <td width="15%" style="text-align:left;"><b></b></td>
	    <td width="15%" style="text-align:left;"><b></b></td>                    
	</tr>
	<tr>
		<td width="15%" style="text-align:left;"><b>Nama</b></td> 
        <td width="15%" style="text-align:left;"><b></b></td> 
        <td width="15%" style="text-align:left;"><b>:</b></td>   
        <td width="15%" style="text-align:left;"><b><?php echo $karyawan->nama; ?></b></td> 
        <td width="15%" style="text-align:left;"><b></b></td>   
        <td width="15%" style="text-align:left;"><b></b></td> 
        <td width="15%" style="text-align:left;"><b></b></td>
        <td width="15%" style="text-align:left;"><b></b></td>
	</tr>
</table>

<table >
	<?php
		$id_karyawan = $karyawan->id_karyawan;
		$query = "
			SELECT ug.gajipokok,ug.tunj_jabatan,ug.gajiharian FROM karyawan AS k 
			LEFT JOIN usulan_gaji AS ug 
				ON ug.id_jabatan=k.id_jabatan
			WHERE k.id='$id_karyawan'
		";
		//AND ug.id_karyawan=k.id
		$query = $this->db->query($query)->row();
		$gajibulanan = $query->gajipokok;
	?>
	<?php if ($karyawan->jenis > 0) { ?>
	<tr>
		<td width="15%" style="text-align:left;">Total Hari Kerja</td>  
        <td width="15%" style="text-align:left;"><b></b></td> 
        <td width="15%" style="text-align:left;"><b>:</b></td>  
        <td width="15%" style="text-align:left;"><b><?php echo $karyawan->jam_kerja; ?></b></td>  
        <td width="15%" style="text-align:left;"><b>Bpjs</b></td>  
        <td width="15%" style="text-align:left;"><b>:</b></td> 
        <td width="15%" style="text-align:left;"><b>Rp.22.000</b></td> 
		<!-- <td class="td_awal">Total Jam Kerja</td>
		<td class="text_right"><?php //echo $karyawan->jam_kerja; ?> x Rp. </td>
		<td class="number_format">12.250</td> -->
	</tr>
	<?php } else { ?>
	<tr>
		<td width="15%" style="text-align:left;">Total Hari Kerja</td>  
        <td width="15%" style="text-align:left;"><b></b></td> 
        <td width="15%" style="text-align:left;"><b>:</b></td>  
        <td width="15%" style="text-align:left;"><b><?php echo $karyawan->hk_2minggu; ?></b></td>  
        <td width="15%" style="text-align:left;"><b></b></td>  
        <td width="15%" style="text-align:left;"><b></b></td> 
        <td width="15%" style="text-align:left;"><b></b></td> 

		<!-- <td class="td_awal">Total Hari Kerja</td>
		<td class="text_right"><?php //echo $karyawan->hk_2minggu; ?> x Rp. </td>
		<td class="number_format"><?php //echo my_number_format($gajibulanan); ?> / <?php //echo $karyawan->hk_sebulan; ?></td> -->
	</tr>
	<br>
	<br>
	 <table class="garis">
            <tr width="100%" style="border-top: 4px solid black;border-bottom: 4px solid black;">
                <td width="25%" style="text-align:center;"><strong>Penerimaan</strong></td>
                <td width="25%" style="text-align: center;">Total</td>
                 <td width="25%" style="text-align:center;"><strong></strong></td>
                <td width="25%" style="text-align: center;"></td>
                
            </tr>
        </table>
	
	<br>
	<br>
	<?php } ?>
	<?php foreach($list_gaji as $row) : ?>
	<tr style="border-top: 4px solid black;border-bottom: 4px solid black;">

		<td width="15%" style="text-align:left;"><?php echo $row->nama; ?></td>  
        <td width="15%" style="text-align:left;"><b></b></td> 
        <td width="15%" style="text-align:left;"><b>:</b></td>  
        <td width="15%" style="text-align:left;"><b>Rp.<?php echo my_number_format($row->jumlah); ?></b>
        </td>  
       
	</tr>
	<?php endforeach; ?>

	<br>
	<br>
	 <table class="garis">
            <tr width="100%" style="border-top: 4px solid black;border-bottom: 4px solid black;">
                <td width="25%" style="text-align:center;"><strong>Gaji Bersih</strong></td>
                <td width="25%" style="text-align: center;"></td>
                 <td width="25%" style="text-align:center;"><strong></strong></td>
                <td width="25%" style="text-align: center;"></td>
            </tr>
       </table>
     <table>
	<tr style="border-top: 4px solid black;border-bottom: 4px solid black;">
		<td width="15%" style="text-align:left;">Pendapatan</td>  
        <td width="15%" style="text-align:left;"><b></b></td> 
        <td width="15%" style="text-align:left;"><b>:</b></td>  
        <td width="15%" style="text-align:left;"><b>Rp.<?php echo my_number_format($karyawan->pendapatan); ?></b>
        </td> 
		<!-- <td>Pendapatan</td>
		<td>Rp. </td>
		// <td class="number_format"><?php //echo my_number_format($karyawan->pendapatan); ?></td> -->
	</tr>
	<tr>
		<td width="15%" style="text-align:left;">Potongan</td>  
        <td width="15%" style="text-align:left;"><b></b></td> 
        <td width="15%" style="text-align:left;"><b>:</b></td>  
        <td width="15%" style="text-align:left;"><b>Rp.<?php echo my_number_format($karyawan->potongan); ?></b>
        </td> 
		<!-- <td>Potongan</td>
		<td>Rp. </td>
		<td class="number_format"><?php //echo my_number_format($karyawan->potongan); ?></td> -->
	</tr>
	<tr>
		<td width="15%" style="text-align:left;">Gaji Bersih</td>  
        <td width="15%" style="text-align:left;"><b></b></td> 
        <td width="15%" style="text-align:left;"><b>:</b></td>  
        <td width="15%" style="text-align:left;"><b>Rp.<?php echo my_number_format($karyawan->gaji_bersih); ?></b>
        </td> 
		<!-- <td>Gaji Bersih</td>
		<td><b>Rp. </b></td>
		<td class="number_format"><b><?php //echo my_number_format($karyawan->gaji_bersih); ?></b></td> -->
	</tr>
</table>
<table class="total-gaji">
</table>