viernes, 4 de diciembre de 2009

La tiendita


Private Sub Cmdeliminar_Click()
Dim eliminar As Integer
a = MsgBox("eliminar el registro", vbYesNo, "ventas")
If a = 6 Then
eliminar = Right(List1, 14)
Txtotal = Str(Val(Txtotal) - Val(eliminar))
Txtotal = Format(Txtotal, "###.00")
Else
Exit Sub
End If
List1.RemoveItem List1.ListIndex
End Sub
Private Sub cmdpagar_Click()
Dim cambio As Integer
cambio = InputBox("capture el pago", "ventas", 0)
cambio = cambio - Val(Txtotal)
MsgBox cambio
MsgBox Format(cambio, "###.00"), vbinformatio
End Sub
Private Sub Command1_Click()
If Comproducto = "pastel 3 leches" Then
Txtunitario.Text = Str(50)
Txtunitario = Format(Txtunitario, "###.00")
List1.AddItem (Comproducto) + Space(15) + (Txtunitario)
End If
If Comproducto = "gelatina italiana" Then
Txtunitario.Text = Str(120)
Txtunitario = Format(Txtunitario, "###.00")
List1.AddItem (Comproducto) + Space(15) + (Txtunitario)
End If
If Comproducto = "flan" Then
Txtunitario.Text = Str(350)
Txtunitario = Format(Txtunitario, "###.00")
List1.AddItem (Comproducto) + Space(15) + (Txtunitario)
End If
If Comproducto = "pay de fresa" Then
Txtunitario.Text = Str(50)
Txtunitario = Format(Txtunitario, "###.00")
List1.AddItem (Comproducto) + Space(15) + (Txtunitario)
End If
If Comproducto = "guayaveras" Then
Txtunitario.Text = Str(650)
Txtunitario = Format(Txtunitario, "###.00")
List1.AddItem (Comproducto) + Space(15) + (Txtunitario)
End If
Txtotal = Str(Val(Txtotal)) + Val(Txtunitario)
End Sub
Private Sub Form_Load()
Comproducto.AddItem "pastel 3 leches"
Comproducto.AddItem "gelatina italiana"
Comproducto.AddItem "flan"
Comproducto.AddItem "pay de fresa"
Comproducto.AddItem "guayaveras"
End Sub

No hay comentarios:

Publicar un comentario