0
Coding Penjualan Helm
Sub AKTIF()
Kode.Enabled = True
Nama.Enabled = True
Jenis.Enabled = True
S.Value = True
M.Value = True
L.Value = True
Harga.Enabled = True
Jumlah.Enabled = True
JumlahBayar.Enabled = True
PPN.Enabled = True
Total.Enabled = True
UangBayar.Enabled = True
UangKembali.Enabled = True
End Sub
Sub NONAKTIF()
Kode.Enabled = False
Nama.Enabled = False
S.Value = False
M.Value = False
L.Value = False
Harga.Enabled = False
Jumlah.Enabled = False
JumlahBayar.Enabled = False
PPN.Enabled = False
Total.Enabled = False
UangBayar.Enabled = False
UangKembali.Enabled = False
End Sub
Sub BERSIH()
Kode.Text = ""
Nama.Text = ""
Jenis.Enabled = True
S.Value = False
M.Value = False
L.Value = False
Harga.Text = ""
Jumlah.Text = ""
JumlahBayar.Text = ""
PPN.Text = ""
Total.Text = ""
UangBayar.Text = ""
UangKembali.Text = ""
End Sub
Private Sub Form_Load()
Kode.AddItem "N"
Kode.AddItem "I"
End Sub
Private Sub Input_Click()
AKTIF
BERSIH
End Sub
Private Sub Jumlah_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
JumlahBayar.Text = Val(Jumlah.Text) * Val(Harga.Text)
PPN.Text = 0.1 * Val(JumlahBayar.Text)
Total.Text = Val(JumlahBayar.Text) + Val(PPN.Text)
End If
End Sub
Private Sub Keluar_Click()
p = MsgBox("Yakin Mau Keluar???", vbQuestion + vbYesNo, "INFORMASI")
If p = vbYes Then
End If
End
End Sub
Private Sub Kode_Click()
If Kode.Text = "N" Then
Nama.Text = "NHK"
Else
Nama.Text = "INK"
End If
End Sub
Private Sub L_Click()
If Nama.Text = "NHK" Then
If Jenis.Text = "FULL FACE" Then
Harga.Text = 370000
Else
Harga.Text = 270000
End If
Else
Nama.Text = "INK"
If Jenis.Text = "HALF FACE" Then
Harga.Text = 420000
Else
Harga.Text = 320000
End If
End If
End Sub
Private Sub M_Click()
If Nama.Text = "NHK" Then
If Jenis.Text = "FULL FACE" Then
Harga.Text = 360000
Else
Harga.Text = 260000
End If
Else
Nama.Text = "INK"
If Jenis.Text = "HALF FACE" Then
Harga.Text = 410000
Else
Harga.Text = 310000
End If
End If
End Sub
Private Sub S_Click()
If Nama.Text = "NHK" Then
If Jenis.Text = "FULL FACE" Then
Harga.Text = 350000
Else
Harga.Text = 250000
End If
Else
Nama.Text = "INK"
If Jenis.Text = "HALF FACE" Then
Harga.Text = 400000
Else
Harga.Text = 300000
End If
End If
End Sub
Private Sub UangBayar_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
UangKembali.Text = Val(UangBayar.Text) - Val(JumlahBayar.Text)
End If
End Sub
Oh ya guys,
jangan lupa textBox, CommanButton, ComboBox, Dan Option Button pada properties Name di ganti yaaaaa..
thanks :)