Rabu, 25 April 2012

Kasus 3 ( Tugas Web I )

Daftar Gaji PNS Pak Ruslan
Pak Ruslan adalah sorang PNS di sebuah instansi Pemerintah. Gaji Bulanan Pak Ruslan terdiri dari : Gaji Pokok sebesar Rp.2800000, Tunjangan Fungsional Rp. 200000, Tunjangan Jabatan Rp. 200000, Tunjangan Istri Rp.200000, Tunjangan Anak Rp.250000/anak dimana Pak Ruslan memiliki 2 anak, Tunjangan Lauk Pauk Rp.300000, serta Tunjangan Transportasi Rp.300000. Tapi, Pak Ruslan juga mempunyai potongan gaji tiap bulannya berupa : Tabungan Hari Tua Rp. 5000, Asuransi Kesehatan Rp.10000, serta pinjaman Kredit sebesar Rp.500000, dan ada juga pph sebesar 10%.

Buatlah kedalam HTML daftar gaji Pak Ruslan, serta hitung besarnya gaji yang ditermia oleh Pak Ruslan tiap bulannya!

<?php

//inisialisasi identitas Pegawai
$nama = "Muh. Ruslan";
$nip = "10200234657";
$jabatan = "Arsiparis";
$gol = "III/d";

//inisialisasi gaji perbulan
$gapok = 2800000;
$tun_fung = 200000;
$tun_jab = 200000;
$tun_ank = 250000 * 2; //per anak, karena anak pak ruslan 2 orang
$tun_is = 200000;
$tun_lp = 300000;
$tun_trans = 300000;

//potongan gaji per bulan
$pot_haritua = 5000;
$pot_kesehatan = 10000;
$pot_kredit = 500000;
$pph = 10/100;

//hitung total gaji
$total_gaji = $gapok+$tun_ank+$tun_is+$tun_lp+$tun_trans+$tun_fung+$tun_jab;

//hitung pph
$pot_pph = $total_gaji*$pph;

//hitung total potongan gaji
$pot_gaji = $pot_haritua+$pot_kesehatan+$pot_kredit+$pot+pph;

//Hitung gaji bersih
$gaber = $total_gaji-$pot_gaji;
?>

<html>
<head>
<title>Daftar Gaji PNS</title>
<style type="text/css">
<!--
.style1 {
     font-size: 24px;
     font-style: italic;
}
-->
</style>
</head>

<body>
<table width="440" height="166" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#000000">
  <tr>
    <td height="43" colspan="3" bgcolor="#7FDF00"><div align="center"><span class="style1">Daftar Gaji Pegawai Negeri Sipil </span></div></td>
  </tr>
  <tr>
    <td width="346" colspan="3"><table width="437" height="127" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td width="24"></td>
        <td width="112">NIP</td>
        <td width="10">:</td>
        <td width="291" colspan="3"><?php echo $nip ; ?></td>
        </tr>
      <tr>
        <td></td>
        <td>Nama</td>
        <td>:</td>
        <td colspan="3"><?php echo $nama; ?></td>
        </tr>
      <tr>
        <td></td>
        <td>Jabatan</td>
        <td>:</td>
        <td colspan="3"><?php echo $jabatan; ?></td>
        </tr>
      <tr>
        <td></td>
        <td>Golongan</td>
        <td>:</td>
        <td colspan="3"><?php echo $gol; ?></td>
        </tr>
      <tr>
        <td colspan="6"><hr></td>
        </tr>
      <tr>
        <td colspan="6"><table width="429" border="0" cellpadding="0" cellspacing="0">

          <tr>
            <td width="22"></td>
            <td width="156">Gaji Pokok </td>
            <td width="18">:</td>
            <td width="233"><?php echo $gapok; ?></td>
          </tr>
          <tr>
            <td></td>
            <td>Tunjangan Fungsional </td>
            <td>:</td>
            <td><?php echo $tun_fung; ?></td>
          </tr>
          <tr>
            <td></td>
            <td>Tunjangan Jabatan </td>
            <td>:</td>
            <td><?php echo $tun_jab ; ?></td>
          </tr>
          <tr>
            <td></td>
            <td>Tunjangan Istri </td>
            <td>:</td>
            <td><?php echo $tun_is; ?></td>
          </tr>
          <tr>
            <td></td>
            <td>Tunjangan Anak </td>
            <td>:</td>
            <td><?php echo $tun_ank; ?></td>
          </tr>
          <tr>
            <td></td>
            <td>Tunjangan Lauk Pauk </td>
            <td>:</td>
            <td><?php echo $tun_lp; ?></td>
          </tr>
          <tr>
            <td></td>
            <td>Tunjangan Transportasi </td>
            <td>:</td>
            <td><?php echo $tun_trans;?></td>
          </tr>
          <tr>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
          </tr>
          <tr>
            <td></td>
            <td><em>Potongan</em></td>
            <td></td>
            <td></td>
          </tr>
          <tr>
            <td></td>
            <td>Tabungan Hari Tua </td>
            <td>:</td>
            <td><?php echo $pot_haritua; ?></td>
          </tr>
          <tr>
            <td></td>
            <td>Asuransi Kesehatan </td>
            <td>:</td>
            <td><?php echo $pot_kesehatan; ?></td>
          </tr>
          <tr>
            <td></td>
            <td>Pinjaman Kredit </td>
            <td>:</td>
            <td><?php echo $pot_kredit;?></td>
          </tr>

          <tr>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
          </tr>
          <tr>
            <td></td>
            <td>Gaji Kotor </td>
            <td>:</td>
            <td><?php echo $total_gaji; ?></td>
          </tr>
          <tr>
            <td></td>
            <td>pph 10% </td>
            <td>:</td>
            <td><?php echo $pot_pph; ?></td>
          </tr>
          <tr>
            <td></td>
            <td>Gaji Bersih </td>
            <td>:</td>
            <td><?php echo $gaber; ?></td>
          </tr>
          <tr>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
          </tr>
          <tr>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
          </tr>
        </table></td>
      </tr>
    </table></td>
  </tr>
   <tr>
    <td colspan="3" bgcolor="#7FDF00"><div align="center">Copyright@Nurul Ilmah-01020015 </div></td>
  </tr>
</table>
</body>
</html>


Output dari Listing diatas yaitu :

0 komentar:

Posting Komentar

Silahkan Beri Komentar... ^^