Sub nonaktif()
Combo1.Enabled = False
jumlah.Enabled = False
subtot.Enabled = False
pajak.Enabled = False
bonus.Enabled = False
nama.Enabled = False
harga.Enabled = False
totbay.Enabled = False
ubay.Enabled = False
ukem.Enabled = False
End Sub
Sub aktif()
tanggal.Enabled = True
Combo1.Enabled = True
jumlah.Enabled = True
subtot.Enabled = True
pajak.Enabled = True
bonus.Enabled = True
jam.Enabled = True
nama.Enabled = True
harga.Enabled = True
totbay.Enabled = True
ubay.Enabled = True
ukem.Enabled = True
End Sub
Sub kosong()
Combo1 = ""
jumlah = ""
subtot = ""
pajak = ""
bonus = ""
nama = ""
harga = ""
totbay = ""
ubay = ""
ukem = ""
End Sub
Private Sub cmdadd_Click()
Call aktif
End Sub
Private Sub cmdbonus_Click()
If jumlah > 3 Then
bonus = "1 Voucher Es Cream"
Else
bonus = "Tidak Mendapat Bonus"
End If
End Sub
Private Sub cmdexit_Click()
pesan = MsgBox("Yakin Mau Keluar??", vbYesNo, "KONFIRMASI")
If pesan = vbYes Then
End
End If
End Sub
Private Sub dmdclean_Click()
Call kosong
End Sub
Private Sub Form_Load()
nonaktif
End Sub
Private Sub jumlah_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
subtot = jumlah * harga
pajak = 10 / 100 * subtot
totbay = Val(subtot) + Val(pajak)
End If
End Sub
Private Sub optjenispesan_Click(Index As Integer)
If Combo1 = "EKO1" Then
nama = "Paket Ekonomi"
If optjenispesan(0) = True Then
harga = 45000
Else
harga = 10000
End If
ElseIf Combo1 = "HMT2" Then
nama = "Paket Hemat"
If optjenispesan(0) = True Then
harga = 50000
Else
harga = 9000
End If
ElseIf Combo1 = "SKK3" Then
nama = "Paket Suka-Suka"
If optjenispesan(0) = True Then
harga = 55000
Else
harga = 11000
End If
End If
End Sub
Private Sub Timer1_Timer()
Dim hariini As Variant
Dim waktu As Variant
hariini = Date
waktu = Time
tanggal.Text = Format(hariini, "DDDD/DD-MMMMM-YYYY")
jam.Text = Format(waktu, "hh:mm:ss Am/Pm")
End Sub
Private Sub ubay_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
ukem = Val(ubay) - Val(totbay)
End If
End Sub