Rabu, 28 November 2012

Program kasir

KONSEP PROGRAM KASIR KELOMPOK 22

TUJUAN

 Memenuhi tugas praktikum teknologi informatika
 Melakukan perhitungan matematis
 Mempermudah melakukan proses jual beli

MANFAAT

 Dapat mempermudah dalam melakukan proses jual beli

USER/PENGGUNA

 Perorangan atau kelompok yang akan melakukan proses jual beli

RINCIAN PROGRAM

 Program terdiri dari satu form yang juga menjadi form induk untuk program ini
 Pengguna yang dalam hal ini adalah penjual/kasir, akan memasukkan nama kasir pas textbox pertama
 Kemudian memasukkan barang yang akan dibeli oleh pembeli pada combobox yang tersedia
 Harga barang akan otomatis muncul
 Kemudian pengguna memasukkan jumlah barang yang akan dibeli
 Pengguna juga memasukkan potongan harga yang berlaku untuk masing-masing barang kemudian menekan tombol bayar untuk mengetahui total harga
 Kemudian memasukkan berapa uang yang dibayarkan pada textbox setelahnya
 Kembalian akan otomatis muncul setelah pengguna menekan tombol kembalian
 Pengguna menekan tombol tambah item untuk memasukkan barang yang akan dibeli kedalam rekap barang
 Apabila pembeli ingn menambah barang yang akan dibeli, maka pengguna akan menekan tombol reset dan mengulangi langkah sebelumnya hingga daftar semua belanjaan masuk ke dalam rekap hasil

FLOWCHART





TUTORIAL


TUTORIAL PROGRAM  KASIR
Pertama kita buka new project pada Visual Basic 2010
Kemudian pilih windows  forms application
Kemudian pada design masukkan
Komponen
Properties
Keterangan
Form1
Name
Text
Form1
furniture
Label 1
Name
Text
Label1
TOKO FURNITURE
Label2
Name
Text
Label2
Nama
Label4
Name
Text
Label4
Nama Barang
Label5
Name
Text
Label5
Harga Satuan
Label6
Name
Text
Label6
Jumlah Barang
Label7
Name
Text
Label7
Diskon
Label8
Name
Text
Label8
Total Harga
Label9
Name
Text
Label9
Bayar
Label10
Name
Text
Label10
Kembalian
Combobox1
Name
Collection
Combobox1
Sofa
Meja
Kursi
Spring Bed
Lemari
Rak Buku
Rak TV
Textbox1
Name
Text
Text Align
Font
Textbox1

Left
Microsoft Sans Serif, 8.25pt
Textbox3
Name
Text
Text Align
Font
Textbox

Left
Microsoft Sans Serif, 8.25pt
Textbox4
Name
Text
Text Align
Font
Textbox4

Left
Microsoft Sans Serif, 8.25pt
Textbox5
Name
Text
Text Align
Font
Textbox5

Left
Microsoft Sans Serif, 8.25pt
Textbox6
Name
Text
Text Align
Font
Textbox6

Left
Microsoft Sans Serif, 8.25pt
Textbox7
Name
Text
Text Align
Font
Textbox7

Left
Microsoft Sans Serif, 8.25pt
Radiobutton1
Name
Text
Radiobutton1
25
Radiobutton2
Name
Text
Radiobutton2
50
Radiobutton3
Name
Text
Radiobutton3
75
Radiobutton4
Name
Text
Radiobutton4
0
Button1
Name
Text
Button1
Bayar
Button2
Name
Text
Button2
Selesai
Button3
Name
Text
Button1
Kembalian
Button4
Name
Text
Button1
Tambahkan Item
Button5
Name
Text
Button1
Reset

Kemudian masukkan listing berikut
Tampilan awal

Public Class Furniture
    Dim diskon As Integer = 0


    Private Sub RadioButton2_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton2.CheckedChanged

    End Sub

    Private Sub RadioButton3_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton3.CheckedChanged

    End Sub

    Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
        If ComboBox1.Text = ("Sofa") Then TextBox3.Text = ("2000000")
        If ComboBox1.Text = ("Meja") Then TextBox3.Text = ("750000")
        If ComboBox1.Text = ("Lemari") Then TextBox3.Text = ("800000")
        If ComboBox1.Text = ("Kursi") Then TextBox3.Text = ("500000")
        If ComboBox1.Text = ("Rak TV") Then TextBox3.Text = ("400000")
        If ComboBox1.Text = ("Spring Bed") Then TextBox3.Text = ("3000000")
        If ComboBox1.Text = ("Rak Buku") Then TextBox3.Text = ("500000")

    End Sub
Berfungsi untuk menentukan barang yang akan dibeli pada combobox


   Peringatan apabila tidak mengisi dengan lengkap



Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim potongan As Double
        Dim total As Double
        Dim harga As Integer
        Dim jumlah As Integer
        harga = Val(TextBox3.Text)
        jumlah = Val(TextBox4.Text)
        potongan = (harga * jumlah * diskon) / 100
        If TextBox1.Text = "" Or TextBox3.Text = "" Or TextBox4.Text = "" Then
            TextBox5.Text = " "
            MsgBox("Mohon Periksa Kembali Input Anda")
        Else
            total = ((harga * jumlah) - potongan)
            TextBox5.Text = total
        End If
    End Sub
Berfungsi untuk menghitung jumlah total

Pemberitahuan saat keluar program


Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        MsgBox("Terima Kasih Atas Kunjungan Anda")
        Close()
    End Sub
Berfungsi untuk keluar dari program


    Private Sub RadioButton1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton1.CheckedChanged, RadioButton2.CheckedChanged, RadioButton3.CheckedChanged, RadioButton4.CheckedChanged
        diskon = sender.text
    End Sub
Berfungsi untuk memilih diskon yang menggunakan radio button


 Peringatan apabila pembayaran kurang


Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
        TextBox5.Text = Val(TextBox5.Text)
        TextBox6.Text = Val(TextBox6.Text)
        TextBox7.Text = Val(TextBox7.Text)
        If TextBox6.Text < TextBox5.Text Then
            TextBox7.Text = ""
            MsgBox("Uang Pembayaran Anda Kurang")
        Else
            TextBox7.Text = Val(TextBox6.Text) - Val(TextBox5.Text)
        End If
    End Sub
Berfungsi untuk menghitung uang pembayaran yang dimasukkan

    Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click

        With DataGridView1
            If RadioButton1.Checked = True Then
                DataGridView1.Rows.Insert(0, ComboBox1.SelectedItem, TextBox3.Text, TextBox4.Text, 25, TextBox5.Text)
            End If
            If RadioButton2.Checked = True Then
                DataGridView1.Rows.Insert(0, ComboBox1.SelectedItem, TextBox3.Text, TextBox4.Text, 50, TextBox5.Text)
            End If
            If RadioButton3.Checked = True Then
                DataGridView1.Rows.Insert(0, ComboBox1.SelectedItem, TextBox3.Text, TextBox4.Text, 75, TextBox5.Text)
            End If
            If RadioButton4.Checked = True Then
                DataGridView1.Rows.Insert(0, ComboBox1.SelectedItem, TextBox3.Text, TextBox4.Text, 0, TextBox5.Text)
            End If
        End With
    End Sub
Berfungsi untuk memasukkan data pada data grid view

    Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
        TextBox1.Text = ""
        ComboBox1.Enabled = True
        ComboBox1.Text = ""
        TextBox3.Text = ""
        TextBox4.Text = ""
        RadioButton1.Checked = False
        RadioButton2.Checked = False
        RadioButton3.Checked = False
        RadioButton4.Checked = False
        TextBox5.Text = ""
        TextBox6.Text = ""
        TextBox7.Text = ""
    End Sub
Berfungsi untuk menghilangkan semua data yang dimasukkan setelah tombol reset ditekan

End Class

0 komentar:

Posting Komentar