Bodega de refrescos entrega 6
Dim i, factura As Integer
Dim total, subtotal, impuesto As Single
Dim fecha As Date
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)
HandlesMyBase.Load
cb_codcliente.Items.Add("CL101")
cb_codcliente.Items.Add("CL102")
cb_codcliente.Items.Add("CL103")
factura = 1000
dtp_fechatransacc.Value = Today
dtp_fechatransacc.MinDate = Today.AddDays(-2)dtp_fechatransacc.MaxDate = Today.AddDays(+2)
End Sub
Private Sub btn_articulos_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btn_articulos.Click
Form2.Show()
End SubPrivate Sub btn_calcular_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btn_calcular.Click
If lvw_detalle.Items.Count = 0 Then
MsgBox("No hay articulos en la factura....")
ExitSub
End If
subtotal = 0
For Me.i = 0 To lvw_detalle.Items.Count – 1
subtotal = subtotal + CSng(lvw_detalle.Items(i).SubItems(4).Text)
Next
impuesto = CSng(subtotal * 0.17)
total = subtotal + impuestotxt_subtotal.Text = CStr(subtotal)
txt_impuesto.Text = CStr(impuesto)
txt_total.Text = CStr(total)
End Sub
Private Sub btn_eliminar_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs)Handles btn_eliminar.Click
Dim litem1 As ListViewItem
For Each litem1 In lvw_detalle.Items
If litem1.Checked = True Then
litem1.Remove()
End If
Next
subtotal = 0
For Me.i = 0 To lvw_detalle.Items.Count -1
subtotal = subtotal + CSng(lvw_detalle.Items(i).SubItems(4).Text)
Next
impuesto = CSng(subtotal * 0.17)
total = subtotal + impuesto
txt_subtotal.Text = CStr(subtotal)
txt_impuesto.Text =CStr(impuesto)
txt_total.Text = CStr(total)
End Sub
Private Sub cb_codcliente_SelectedIndexChanged(ByVal sender As Object, ByVal e As
System.EventArgs) Handles cb_codcliente.SelectedIndexChanged
Dim op AsInteger
op = cb_codcliente.SelectedIndex
Select Case op
Case 0
txt_nombcliente.Text = "Pedro Andres Fiallos"
txt_identidad.Text = "0967-1987-34561"
txt_direccion.Text = "Col. Tres Caminos"
Case 1...
Regístrate para leer el documento completo.