Private Sub Form_Activate()
Dim Nama(100), NIK(100), Jam(100), Gajiperjam(100)
Dim Anak(100), potongan(100), Gaji(100), Tunjangan(100)
Dim GajiBersih(100), i, jumlah
Dim TotalTunjangan, Totalpotongan, TotalGajibersih
TotalTunjangan = 0
Totalpotongan = 0
TotalGajibersih = 0
Form1.Print "---------------------"
Form1.Print Tab(5); "NAMA";
Form1.Print Tab(15); "NIK"
Form1.Print Tab(25); "JAM";
Form1.Print Tab(40); "GAJI PERJAM";
Form1.Print Tab(65); "GAJI";
Form1.Print Tab(80); ; "ANAK";
Form1.Print Tab(90); "TUNJANGAN";
Form1.Print Tab(105); "POTONGAN";
Form1.Print Tab(120); "GAJI BERSIH";
Form1.Print "==================================="
jumlah = InputBox("jumlah karyawan")
For i = 1 To jumlah
Nama(i) = InputBox("Masukkan Nama")
NIK(i) = InputBox("masukkan NIK")
Jam(i) = InputBox("masukkan jam kerja")
Gajiperjam(i) = InputBox("masukkan gaji perjam")
Anak(i) = InputBox("masukkan jumlah anak")
potongan(i) = InputBox("masukkan potongan Gaji")
Gajil(i) = Jam(i) * Gajiperjam(i)
If Anak(i) = 0 Then
Tunjangan(i) = 500000
ElseIf Anak(i) <= 2 Then
Tunjangan(i) = 900000
End If
GajiBersih(i) = Gaji(i) + Tunjangan(i) - potongan(i)
TotalTunjangan = TotalTunjangan + Tunjangan(i)
Totalpotongan = Totalpotongan + potongan(i)
TotalGajibersih = TotalGajibersih + GajiBersih(i)
Form1.Print Tab(5); Nama(i);
Form1.Print Tab(15); NIK(i);
Form1.Print Tab(25); Format(Jam(i), " ")
Form1.Print Tab(40);
Format (Gajiperjam(i)," Rp , , ");
Form1.Print Tab(65); Format(Gaji(i), "RP , , ");
Form1.Print Tab(80); Format(Anak(i), " ");
Form1.Print Tab(90);
Format(Tunjangan(I),"Rp , , ");
Form1.Print Tab(105);
format(potongan(i),"Rp , , ");
Form1.Print Tab(120);
format(GajiBersih(i),"Rp , , ");
Next i
Form1.Print "---------------------------"
Form1.Print Tab(90);
Format(TotalTunjangn,"Rp , , ");
Form1.Print Tab(105);
Format(TotalPotongan,"Rp , , ");
Form1.Print Tab(120);
Format(TotalGajiBersih,"Rp , , ");
End Sub
Tinggal dicopi paste keprogram VIBI
Tidak ada komentar:
Posting Komentar