Rabu, 11 Juli 2012

Progam penjualan kayu

Form penjualan Kayu
Public Class FrmPENJUALANKAYU
    Dim isilist As ListViewItem
    Dim baris, Nourut, HARGA, p, l, t, QTY, TOTHARGA As Integer
    Dim KODE, JKYU As String
    Dim total, alltotal, diskon, jid, tbkd, TBSD, KEMBALI, DIBAYAR, vol, totvol As Double
    Sub tampilan()
        Select Case KODE
            Case Is = "K001"
                JKYU = "JATI"
                harga = 5000000
            Case Is = "K002"
                JKYU = "MERANTI'"
                harga = 1500000
            Case Is = "K003"
                JKYU = "KEMPER"
                harga = 2500000
            Case Is = "K004"
                JKYU = "KRUING"
                harga = 3000000

                TxtJENISKAYU.Text = JKYU
                txtHARGA.Text = Format(harga, "0,#")
        End Select
    End Sub
    Sub kosong()
        lblTOTAL.Text = FormatCurrency(alltotal)
        cmbKODE.Text = ""
        cmbKODE.Focus()
        TxtJENISKAYU.Text = ""
        txtHARGA.Text = ""
        txtP.Text = ""
        txtL.Text = ""
        txtT.Text = ""
        txtVOL.Text = ""
        txtTOTbyar.Text = ""

        txtQTY.Text = ""
        txtHARGAAWAL.Text = ""
    End Sub
    Private Sub btnTransaksiBaru_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnTransaksiBaru.Click

        baris = 0
        Nourut = 1
        jid = 0
        QTY = 0
        P = 0
        L = 0
        T = 0
        harga = 0
        cmbKODE.Text = ""
        TOTHARGA = 0

        total = 0
        alltotal = 0
        KEMBALI = 0
        DIBAYAR = 0
        diskon = 0
        TBSD = 0
        vol = 0
        totvol = 0

        ListView1.Items.Clear()
        kosong()

        txtProsenDiskn.Text = ""
        txtDiskon.Text = ""
        txtSubTotl.Text = ""
        txtTOTbyar.Text = ""

        txtDibyar.Text = ""
        txtKembli.Text = ""

        lblTOTAL.Text = 0
        txtJmlItemDbli.Text = ""
        txtBtangKayuDbli.Text = ""
        txtVolKayuDbli.Text = ""
    End Sub
    Sub uang()
        DIBAYAR = Val(txtDibyar.Text)

        If DIBAYAR >= TBSD Then
            KEMBALI = DIBAYAR - TBSD
            txtKembli.Text = KEMBALI
            LblSTATUS.Text = "KEMBALIAN :"
            lblTOTAL.Text = FormatCurrency(KEMBALI)

            If MsgBox("transaksi baru lagi ?", vbYesNo + MsgBoxStyle.Question, "konfirmasi") = vbYes Then
                btnTransaksiBaru


                cmbKODE.Focus()
            Else
                Close()


            End If

        Else
            kembalian = TBSD - PEMbayarAN
            MsgBox("    UANG KURANG =    " & FormatCurrency(kembalian), MsgBoxStyle.Information, "PERINGATAN")
            Txtdibayar.Text = ""
            Txtdibayar.Focus()


        End If
    End Sub

    Sub HITUNG()
        DISKON = Val(((Txtprosentasediskon.Text) / 100)) * ALLTOTAL
        TBSD = ALLTOTAL - DISKON

        TXTDISKON.Text = Format(DISKON, "0,#")
        TXTtotalbayar.Text = Format(TBSD, "0,#")
        LBLTAMPILAN.Text = FormatCurrency(TBSD)
        Txtdibayar.Focus()
    End Sub
End Class

0 komentar:

Posting Komentar

newer post older post Home