test

Membuat Program Transaksi Bengkel Sederhana

Sumber : BINA SARANA INFORMATIKA



Properties
Label1 : Caption = BENGKEL OKE
Label2 : Caption = Kode Oli
Label3 : Caption = Jumlah Beli
Label4 : Caption = Pembayaran
Label5 : Caption = Potongan
Label6 : Caption = PPN
Label7 : Caption = Total Bayar
Label8 : Caption = Merk
Label9 : Caption = Harga Oli
Label10 : Caption = Uang Bayar
Label11 : Caption =Uang Kembali
Label12 : Caption = Fixed Single
Label13 : Caption = Fixed Single
ComboBox1 : Name = Combo1
Textbox1 : Name = txtjumbel
Text = Tulisan Text1 Dihapus
Textbox2 : Name = txtpembayaran
Text = Tulisan Text1 Dihapus
Textbox3 : Name = txtpot
Text = Tulisan Text1 Dihapus
Textbox4 : Name = txtppn
Text = Tulisan Text1 Dihapus
Textbox5 : Name = txttolbar
Text = Tulisan Text1 Dihapus
Textbox6 : Name = txtmerk
Text = Tulisan Text1 Dihapus
Textbox7 : Name = txtharga
Text = Tulisan Text1 Dihapus
Textbox8 : Name = txtservice
Text = Tulisan Text1 Dihapus
Textbox9 : Name = txtbayar
Text = Tulisan Text1 Dihapus
Textbox10 : Name = txtkembali
Text = Tulisan Text1 Dihapus
CommandButton1 : Name = cmdhitung
Caption = Hitung
CommandButton2 : Name = cmdclear
Caption = Clear
CommandButton3 : Name = cmdexit
Caption = Exit
Frame1 : Caption = Biaya Service
OptionButton1 : Caption = Mobil
Name = opt1
OptionButton2 : Caption = Motor
Name = opt2
Timer1 : Interval = 250

Listing Program

Private Sub cmdclear_Click()
Combo1 = ""
txtbayar = ""
txtkembali = ""
txttolbar = ""
txtservice = ""
txtjumbel = ""
txtpot = ""
txtmerk = ""
txtpembayaran = ""
txtpot = ""
txtharga = ""
txtppn = ""
End Sub

Private Sub cmdexit_Click()
Unload Me
End Sub

Private Sub CMDHITUNG_Click()
txtpembayaran = Val(txtjumbel * txtharga) + txtservice
If Val(txtpembayaran) > 50000 Then
txtpot = Val(txtpembayaran * 0.1)
End If
txtppn = Val(txtpembayaran * 0.05)
txttolbar = Val(txtpembayaran - txtpot) + Val(txtppn)
End Sub

Private Sub cmdhitung_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtbayar.SetFocus
End If
End Sub

Private Sub Combo1_Click()
If Combo1.ListIndex = 0 Then
txtmerk = "Penzoil"
txtharga = "35000"
ElseIf Combo1.ListIndex = 1 Then
txtmerk = "Agip"
txtharga = "30000"
ElseIf Combo1.ListIndex = 2 Then
txtmerk = "Top One"
txtharga = "27000"
Else
txtmerk = "Mesran"
txtharga = "20000"
End If
End Sub





Private Sub Combo1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtjumbel.SetFocus
End If
End Sub

Private Sub Form_Activate()
Combo1.AddItem "PZ"
Combo1.AddItem "AG"
Combo1.AddItem "TO"
Combo1.AddItem "MS"
txtservice.Enabled = False
txtpembayaran.Enabled = False
txtppn.Enabled = False
txtkembali.Enabled = False
txtharga.Enabled = False
txtmerk.Enabled = False
txtpot.Enabled = False
End Sub

Private Sub opt1_Click()
txtservice = "5000"
End Sub

Private Sub opt2_Click()
txtservice = "3000"
End Sub



Private Sub Timer1_Timer()
Label12.Caption = Date
Label13.Caption = Time
End Sub

Private Sub txtbayar_Change()
txtkembali = Val(txtbayar) - Val(txttolbar)
End Sub

Private Sub txtjumbel_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
CMDHITUNG.SetFocus
End If
End Sub


 

posted by dHozOu on 14.01 under

0 komentar:

Posting Komentar

blog gw neh...

About Me

Foto Saya
dHozOu
Apa Adanya...
Lihat profil lengkapku

dHozOu

Link