0% found this document useful (0 votes)
28 views2 pages

Nama: Reza Rio Avrilian Kelas: Reg B Pagi

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views2 pages

Nama: Reza Rio Avrilian Kelas: Reg B Pagi

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Nama : Reza Rio Avrilian

Kelas : Reg B pagi


Coding
Public Class Form1
Dim pajak = 0.1
Dim total_bayar, diskon1, besar_pajak, diskon_potong As Single

Private Sub sub_total_TextChanged(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles sub_total.Validating
total_bayar = Val(jumah.Text) * Val(harga_satuan.Text)
sub_total.Text = FormatNumber(total_bayar, 0)
End Sub

Private Sub pajak_restoran_TextChanged(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles pajak_restoran.Validated
besar_pajak = total_bayar * pajak
pajak_restoran.Text = FormatNumber(besar_pajak, 0)
End Sub

Private Sub ttl_bayar_TextChanged(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles ttl_bayar.Validating
Dim cek1 = (besar_pajak + total_bayar)
Dim cek2 = (Val(diskon.Text) * cek1)
total_bayar = cek1 - cek2
ttl_bayar.Text = FormatNumber(total_bayar, 0)
End Sub

Private Sub uang_kembali_TextChanged(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles uang_kembali.Validating
Dim cek1 = Val(jumlah_pembayaran.Text)
Dim cek2 = cek1 - total_bayar
uang_kembali.Text = FormatNumber(cek2, 0)
End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button2.Click
Me.Close()
End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button1.Click
nama_menu.Clear()
jumah.Clear()
harga_satuan.Clear()
sub_total.Clear()
pajak_restoran.Clear()
diskon.Clear()
ttl_bayar.Clear()
jumlah_pembayaran.Clear()
uang_kembali.Clear()

End Sub
End Class

You might also like