.CREATE GAJIH
Fild Name
|
Type
|
Width
|
Dec
|
NIK
|
C
|
4
|
|
NAMA
|
C
|
15
|
|
STATUS
|
C
|
7
|
|
PEND
|
C
|
3
|
|
JMLJAM
|
N
|
5
|
2
|
GAJI
|
N
|
7
|
0
|
TUNJ
|
N
|
6
|
0
|
TTLGAJI
|
N
|
7
|
0
|
CTRL+W (SAVE)
ENTER
.USE GAJIH
.CREA REPORT LAP
--buat tampilan laporan
.MODI COMM INPUT
SET BELL OFF
SET TALK OFF
SET DATE ITALIAN
CLEAR
USE GAJIH INDE
GAJIH
REINDEX
SET INDE TO GAJIH
JWB="Y"
DO WHILE
JWB="Y"
CLEAR
CNIK=SPACE(4)
CNAMA=SPACE(15)
CSTATUS=SPACE(7)
CPEND=SPACE(3)
NJMLJAM=0
NGAJI=0
NTUNJ=0
NTTLGAJI=0
@05,10 SAY
"PROGRAM INPUT DATA GAJI KARYAWAN"
@09,25 TO 11,65
DOUBLE
@10,30 SAY
"INPUT NO INDUK KARYAWAN :"GET CNIK PICT "@!"
@17,05 TO 19,55
@18,10 SAY
"KOSONGKAN NIK JIKA INGIN KELUAR"
READ
IF CNIK=SPACE(1)
EXIT
ENDIF
SEEK CNIK
IF FOUND()
@22,25 SAY "NO INDUK KARYAWAN :"
+CNIK+ " SUDAH ADA"
@23,25 SAY "TEKAN ENTER UNTUK
MENGULANG"
WAIT" "
LOOP
ENDIF
CLEAR
@02,32 SAY
"PROSES INPUT DATA"
@03,30 SAY
"---------------------"
@06,18 TO 16,70
DOUBLE
@07,22 SAY
"NIK :"
+CNIK PICT "@!"
@08,22 SAY
"NAMA :" GET
CNAMA PICT "@!"
@09,22 SAY
"STATUS[TETAP/HONOR1-3] :" GET
CSTATUS PICT "@!"
@10,22 SAY
"PENDIDIKAN :" GET
CPEND PICT "@!"
READ
IF
CSTATUS="TETAP"
NJMLJAM=0
ELSE
IF
CSTATUS="HONOR1"
NJMLJAM=5.00
ELSE
IF
CSTATUS="HONOR2"
NJMLJAM=6.00
ELSE
IF
CSTATUS="HONOR3"
NJMLJAM=7.00
ENDIF
ENDIF
ENDIF
ENDIF
@11,22 SAY
"JUMLAH JAM KERJA :"
+STR(NJMLJAM,5,2)
IF
CPEND="SMA" OR NJMLJAM=5.00
NGAJI=500000
ELSE
IF
CPEND="S1" OR NJMLJAM=6.00
NGAJI=1000000
ELSE
IF
CPEND="S2" OR NJMLJAM=7.00
NGAJI=1300000
ENDIF
ENDIF
ENDIF
@12,22 SAY
"GAJI KARYAWAN
:"+STR(NGAJI,7,0)
NTUNJ=0.1*NGAJI
@13,22 SAY
"TUNJANGAN
:"+STR(NTUNJ,6,0)
NTTLGAJI=NGAJI+NTUNJ
@14,22 SAY
"TOTAL GAJI KARYAWAN :"
+TRAN(NTTLGAJI,"Rp ###,###,###")
READ
SIMPAN=SPACE(1)
@18,20 SAY
"[S]IMPAN OR [B]ATAL :"GET SIMPAN PICT "@!"
READ
IF
SIMPAN="S"
APPEND BLANK
REPLACE NIK WITH CNIK
REPLACE NAMA WITH CNAMA
REPLACE STATUS WITH CSTATUS
REPLACE PEND WITH CPEND
REPLACE JMLJAM WITH NJMLJAM
REPLACE GAJI WITH NGAJI
REPLACE TUNJ WITH NTUNJ
REPLACE TTLGAJI WITH NTTLGAJI
ENDIF
@21,30 SAY
"INPUT DATA LAGI {Y/T}:" GET JWB PICT "@!"
READ
IF
JWB="T"
RETURN
ENDIF
ENDDO
CLOSE ALL
CTRL+W
.MODI COMM EDIT
SET BELL OFF
SET TALK OFF
SET DATE ITALIAN
CLEAR
USE GAJIH INDE
GAJIH
REINDEX
SET INDE TO GAJIH
JWB="Y"
DO WHILE
JWB="Y"
CLEAR
CNIK=SPACE(4)
@05,10 SAY
"PROGRAM EDIT DATA "
@09,25 TO 11,57
DOUBLE
@10,30 SAY
"INPUT KODE BUKU:"GET CNIK PICT "@!"
@17,05 TO 19,55
@18,10 SAY
"KOSONGKAN NIK JIKA INGIN KELUAR"
READ
IF CNIK=SPACE(1)
EXIT
ENDIF
SEEK CNIK
IF .NOT. FOUND()
@22,25 SAY "NO INDUK KARYAWAN :"
+CNIK+ " BELUM ADA"
@23,25 SAY "TEKAN ENTER UNTUK
MENGULANG"
WAIT" "
LOOP
ENDIF
CNIK=NIK
CNAMA=NAMA
CSTATUS=STATUS
CPEND=PEND
NJMLJAM=JMLJAM
NGAJI=GAJI
NTUNJ=TUNJ
NTTLGAJI=TTLGAJI
CLEAR
@02,32 SAY
"PROSES EDIT DATA"
@03,30 SAY
"--------------------"
@06,18 TO 16,70
DOUBLE
@07,22 SAY
"NIK :"
+CNIK PICT "@!"
@08,22 SAY
"NAMA :" GET
CNAMA PICT "@!"
@09,22 SAY
"STATUS[TETAP/HONOR1-3] :" GET
CSTATUS PICT "@!"
@10,22 SAY
"PENDIDIKAN :" GET
CPEND PICT "@!"
READ
IF
CSTATUS="TETAP"
NJMLJAM=0
ELSE
IF
CSTATUS="HONOR1"
NJMLJAM=5.00
ELSE
IF
CSTATUS="HONOR2"
NJMLJAM=6.00
ELSE
IF
CSTATUS="HONOR3"
NJMLJAM=7.00
ENDIF
ENDIF
ENDIF
ENDIF
@11,22 SAY
"JUMLAH JAM KERJA :"
+STR(NJMLJAM,5,2)
IF
CPEND="SMA" OR NJMLJAM=5.00
NGAJI=500000
ELSE
IF
CPEND="S1" OR NJMLJAM=6.00
NGAJI=1000000
ELSE
IF
CPEND="S2" OR NJMLJAM=7.00
NGAJI=1300000
ENDIF
ENDIF
ENDIF
@12,22 SAY
"GAJI KARYAWAN
:"+STR(NGAJI,7,0)
NTUNJ=0.1*NGAJI
@13,22 SAY
"TUNJANGAN
:"+STR(NTUNJ,6,0)
NTTLGAJI=NGAJI+NTUNJ
@14,22 SAY
"TOTAL GAJI KARYAWAN :"
+TRAN(NTTLGAJI,"Rp ###,###,###")
READ
SIMPAN=SPACE(1)
@18,20 SAY
"[S]IMPAN OR [B]ATAL :"GET SIMPAN PICT "@!"
READ
IF
SIMPAN="S"
REPLACE NIK WITH CNIK
REPLACE NAMA WITH CNAMA
REPLACE STATUS WITH CSTATUS
REPLACE PEND WITH CPEND
REPLACE JMLJAM WITH NJMLJAM
REPLACE GAJI WITH NGAJI
REPLACE TUNJ WITH NTUNJ
REPLACE TTLGAJI WITH NTTLGAJI
ENDIF
@20,30 SAY
"EDIT DATA LAGI {Y/T}:" GET JWB PICT "@!"
READ
IF
JWB="T"
RETURN
ENDIF
ENDDO
CLOSE ALL
CTRL+W
.MODI COMM LIHAT
SET BELL OFF
SET TALK OFF
SET DATE ITALIAN
CLEAR
USE GAJIH INDE
GAJIH
REINDEX
SET INDE TO GAJIH
JWB="Y"
DO WHILE
JWB="Y"
CLEAR
CNIK=SPACE(4)
@05,10 SAY
"PROGRAM LIHAT DATA KARYAWAN"
@09,25 TO 11,60
DOUBLE
@10,30 SAY
"INPUT KODE BUKU:"GET CNIK PICT "@!"
@17,05 TO 19,55
@18,10 SAY
"KOSONGKAN NIK JIKA INGIN KELUAR"
READ
IF CNIK=SPACE(1)
EXIT
ENDIF
SEEK CNIK
IF .NOT. FOUND()
@22,25 SAY "NO INDUK KARYAWAN :"
+CNIK+ " BELUM ADA"
@23,25 SAY "TEKAN ENTER UNTUK
MENGULANG"
WAIT" "
LOOP
ENDIF
CLEAR
@02,32 SAY
"PROSES LIHAT DATA "
@03,30 SAY
"---------------------"
@06,18 TO 16,70
DOUBLE
@07,22 SAY
"NIK :"
+CNIK PICT "@!"
@08,22 SAY
"NAMA :"
+NAMA PICT "@!"
@09,22 SAY
"STATUS[TETAP/HONOR1-3] :"
+STATUS PICT "@!"
@10,22 SAY
"PENDIDIKAN :"
+PEND PICT "@!"
@11,22 SAY
"JUMLAH JAM KERJA :"
+STR(JMLJAM,5,2)
@12,22 SAY
"GAJI KARYAWAN :"
+STR(GAJI,7,0)
@13,22 SAY
"TUNJANGAN :"
+STR(TUNJ,6,0)
@14,22 SAY
"TOTAL GAJI KARYAWAN :"
+TRAN(TTLGAJI,"Rp ###,###,###")
@20,30 SAY
"LIHAT DATA LAGI {Y/T}:" GET JWB PICT "@!"
READ
IF
JWB="T"
RETURN
ENDIF
ENDDO
CLOSE ALL
CTRL+W
.MODI COMM HAPUS
SET BELL OFF
SET TALK OFF
SET DATE ITALIAN
CLEAR
USE GAJIH INDE
GAJIH
REINDEX
SET INDE TO GAJIH
JWB="Y"
DO WHILE
JWB="Y"
CLEAR
CNIK=SPACE(4)
@05,10 SAY
"PROGRAM HAPUS DATA KARYAWAN"
@09,25 TO 11,57
DOUBLE
@10,30 SAY
"INPUT KODE BUKU:"GET CNIK PICT "@!"
@17,05 TO 19,55
@18,10 SAY
"KOSONGKAN NIK JIKA INGIN KELUAR"
READ
IF CNIK=SPACE(1)
EXIT
ENDIF
SEEK CNIK
IF .NOT. FOUND()
@22,25 SAY "NO INDUK KARYAWAN :"
+CNIK+ " BELUM ADA"
@23,25 SAY "TEKAN ENTER UNTUK
MENGULANG"
WAIT" "
LOOP
ENDIF
CLEAR
@02,32 SAY
"PROSES HAPUS DATA"
@03,30 SAY
"---------------------"
@06,18 TO 16,70
DOUBLE
@07,22 SAY
"NIK :" +CNIK PICT "@!"
@08,22 SAY
"NAMA :"
+NAMA PICT "@!"
@09,22 SAY
"STATUS[TETAP/HONOR1-3] :"
+STATUS PICT "@!"
@10,22 SAY
"PENDIDIKAN :"
+PEND PICT "@!"
@11,22 SAY
"JUMLAH JAM KERJA :"
+STR(JMLJAM,5,2)
@12,22 SAY
"GAJI KARYAWAN :"
+STR(GAJI,7,0)
@13,22 SAY
"TUNJANGAN :"
+STR(TUNJ,6,0)
@14,22 SAY
"TOTAL GAJI KARYAWAN :"
+TRAN(TTLGAJI,"Rp ###,###,###")
PILIH=SPACE(1)
@20,30 SAY
"HAPUS DATA INI (Y/T):" GET PILIH PICT "@!"
READ
IF PILIH="Y"
DELE
PACK
ENDIF
@20,27 SAY
"MASIH MAU HAPUS DATA {Y/T}:" GET JWB PICT "@!"
READ
IF
JWB="T"
RETURN
ENDIF
ENDDO
CLOSE ALL
CTRL+W
.MODI COMM LAPOR
SET BELL OFF
SET TALK OFF
SET DATE ITALIAN
CLEAR
USE GAJIH INDE
GAJIH
REINDEX
SET INDE TO GAJIH
JWB="Y"
DO WHILE
JWB="Y"
CLEAR
CNIK=SPACE(4)
@05,10 SAY
"PROGRAM HAPUS DATA KARYAWAN"
@09,25 TO 11,57
DOUBLE
@10,30 SAY
"INPUT KODE BUKU:"GET CNIK PICT "@!"
@17,05 TO 19,55
@18,10 SAY
"KOSONGKAN NIK JIKA INGIN KELUAR"
READ
IF CNIK=SPACE(1)
EXIT
ENDIF
SEEK CNIK
IF .NOT. FOUND()
@22,25 SAY "NO INDUK KARYAWAN :"
+CNIK+ " BELUM ADA"
@23,25 SAY "TEKAN ENTER UNTUK
MENGULANG"
WAIT" "
LOOP
ENDIF
CLEAR
@02,32 SAY
"PROSES HAPUS DATA"
@03,30 SAY
"---------------------"
@06,18 TO 16,70
DOUBLE
@07,22 SAY
"NIK :"
+CNIK PICT "@!"
@08,22 SAY
"NAMA :"
+NAMA PICT "@!"
@09,22 SAY
"STATUS[TETAP/HONOR1-3] :"
+STATUS PICT "@!"
@10,22 SAY
"PENDIDIKAN :"
+PEND PICT "@!"
@11,22 SAY
"JUMLAH JAM KERJA :"
+STR(JMLJAM,5,2)
@12,22 SAY
"GAJI KARYAWAN :"
+STR(GAJI,7,0)
@13,22 SAY
"TUNJANGAN :"
+STR(TUNJ,6,0)
@14,22 SAY
"TOTAL GAJI KARYAWAN :"
+TRAN(TTLGAJI,"Rp ###,###,###")
PILIH=SPACE(1)
@20,30 SAY
"HAPUS DATA INI (Y/T):" GET PILIH PICT "@!"
READ
IF
PILIH="Y"
DELE
PACK
ENDIF
@20,27 SAY
"MASIH MAU HAPUS DATA {Y/T}:" GET JWB PICT "@!"
READ
IF
JWB="T"
RETURN
ENDIF
ENDDO
CLOSE ALL
CTRL+W
.MODI COMM CETAK
Set Bell Off
Set Talk Off
Set Date Italian
SET STAT OFF
SET SCOR OFF
Clear
USE GAJIH
SET INDE TO GAJIH
REINDEX
*TAMPILKAN REPORT
YANG SUDAH DIBUAT
SET DEVICE TO
PRINT
REPO FORM LAP
EJECT
SET DEVICE TO
SCREEN
WAIT ""
CTRL+W
[MASUKKAN PROGRAM
KEDALAM COVER]
.MODI COMM KARYAWAN
*Dibuat oleh : AYJ
*NIM : 1101 1881
*Kelas : 4
SET TALK OFF
SET STAT OFF
SET SCORE OFF
DO WHILE .T.
*MEMBUAT LATAR
BELAKANG
SET COLO TO
RB/W,W++/R,GR
CLEAR
@0,0 TO 24,79
DOUB
HIT=1
X1=10
Y1=37
X2=12
Y2=43
DO WHILE HIT<7
SET COLO TO W+/B
TUNGGU=1
DO WHILE
TUNGGU<10
TUNGGU=TUNGGU+1
ENDDO
@X1,Y1 CLEA TO
X2,Y2
X1=X1-1
Y1=Y1-3
X2=X2+1
Y2=Y2+3
HIT=HIT+1
ENDDO HIT<=7
*MEMBUAT KOTAK
SET COLO TO N
@01,16 CLEAR TO
20,60
SET COLO TO W+/W
@02,19 CLEAR TO
23,66
SET COLO TO N/W
@02,18 TO 23,64
DOUB
*TAMPIL JUDUL
SET COLO TO R/W+
@03,20 TO 06,62
DOUB
SET COLO TO RB/W
@04,25 SAY
"S T M I K - B A N J A R B A R U "
@05,25 SAY "
JL.A.YANI KM 33,3 LOKTABAT BJR "
*TAMPIL HIASAN
SET COLO TO R/RB+
@03,04 TO 05,06
DOUB
@03,12 TO 05,14
DOUB
@07,08 TO 09,10
DOUB
@11,04 TO 13,06
DOUB
@11,12 TO 13,14
DOUB
@15,08 TO 17,10
DOUB
@19,04 TO 21,06
DOUB
@19,12 TO 21,14
DOUB
@03,66 TO 05,68
DOUB
@03,74 TO 05,76
DOUB
@07,70 TO 09,72
DOUB
@11,66 TO 13,68
DOUB
@11,74 TO 13,76
DOUB
@15,70 TO 17,72
DOUB
@19,66 TO 21,68
DOUB
@19,74 TO 21,76
DOUB
*TAMPIL MENU
SET COLO TO R/W+
@07,22 TO 09,60
SET COLO TO N/W
@08,23 SAY "
MENU UTAMA - DATA BUKU PERPUSTAKAAN"
@10,28 SAY "
1. INPUT DATA KARYAWAN "
@12,28 SAY "
2. EDIT DATA KARYAWAN "
@14,28 SAY "
3. LIHAT DATA KARYAWAN "
@16,28 SAY "
4. HAPUS DATA KARYAWAN "
@18,28 SAY "
5. LAPORAN DATA KARYAWAN "
@20,28 SAY "
6. CETAK "
@22,28 SAY "
7. SELESAI - KELUAR "
*HARGA AWAL
PILIH=1
PILIHAN=1
DO WHILE .T.
HITMENU=1
CHOICE=PILIHAN
DO WHILE
HITMENU<7
DO CASE
CASE CHOICE=1
@10,28 SAY "
1. INPUT DATA KARYAWAN "
CASE CHOICE=2
@12,28 SAY "
2. EDIT DATA KARYAWAN "
CASE CHOICE=3
@14,28 SAY "
3. LIHAT DATA KARYAWAN "
CASE CHOICE=4
@16,28 SAY "
4. HAPUS DATA KARYAWAN "
CASE CHOICE=5
@18,28 SAY "
5. LAPORAN DATA KARYAWAN"
CASE CHOICE=6
@20,28 SAY "
6. CETAK "
CASE CHOICE=7
@22,28 SAY "
7. SELESAI - KELUAR "
ENDCASE
SET COLO TO W+/RB
HITMENU=HITMENU+1
CHOICE=PILIH
ENDDO
SET COLO TO N/W
PILIHAN=PILIH
I=0
DO WHILE I=0
I=INKEY()
DO CASE
CASE I=24
&& PANAH BAWAH
PILIH=PILIH+1
CASE I=5
&& PANAH ATAS
PILIH=PILIH-1
CASE I<>13
I=0
ENDCASE
ENDDO
IF PILIH>7
PILIH=1
ENDIF
IF PILIH<1
PILIH=7
ENDIF
IF I=13
EXIT
ENDIF
ENDDO
SET COLO TO
DO CASE
CASE PILIH=1
DO INPUT
CASE PILIH=2
DO EDIT
CASE PILIH=3
DO LIHAT
CASE PILIH=4
DO HAPUS
CASE PILIH=5
DO LAPOR
CASE PILIH=6
DO CETAK
CASE PILIH=7
CLEAR
SET COLO TO
EXIT
OTHERWISE
SET COLO TO
RETURN
ENDCASE
ENDDO
SET COLO TO
*SELESAI