Anda di halaman 1dari 3

Sub CargarCombo()

Combo1.AddItem "Consumidor Final"


Combo1.AddItem "Resp Inscripto "
Combo1.AddItem "Resp No Inscripto"
Combo1.AddItem "Resp Monotributo"
Combo1.AddItem "Exento"
Combo1.AddItem "No Responsable"
Combo1.ListIndex = 0
End Sub
Sub DescargarControles()
'descargo los controles de cantidad, importe,etc
Dim Micontrol
Micontrol = 2
For Micontrol = 2 To TextCant.Count
Unload TextCant(Micontrol)
Unload TextDescr(Micontrol)
Unload TextPreUnit(Micontrol)
Unload TextImpor(Micontrol)
Unload elitem(Micontrol)
Next
'limpio el que queda
'cant
TextCant(1).Text = 0
TextCant(1).SetFocus
TextCant(1).SelStart = 0
TextCant(1).SelLength = 1
'descripcion
TextDescr(1).Text = ""
'precio
TextPreUnit(1).Text = 0
'importe
TextImpor(1).Text = 0
'corro el label de total
sumatot = 0
LabelTotal.Top = 3360 'valor inicial
LabelTotal.Caption = "Total a pagar: " & Format(sumatot, "##,##0.00")
'limpio los text de cliente
Micontrol = 1
For Micontrol = 1 To 5
texto(Micontrol).Text = ""
Next
'actualizo el numero de boleta
'en el archivo esta el numero anterior, de modo que si
'abandona el programa y no imprime, la proxima vez que
'corra tendra siempre un numero nuevo, incrementado en 1
'con respecto a lo que figura en el archivo
NumSig = NumSig + 1
NumFactura.Caption = "0001-0000" & NumSig
ImprimirFactura.Enabled = False
'coloco el cursor en el primer text
texto(1).SetFocus
End Sub
Sub ObtenerNumFactura(Accion As Integer)

Dim t, nomfichero As String, L As Long


Dim boleta As String
Dim mensa As String
Dim LogFile
On Error GoTo Abrerror
mensa = "No se encuentra el archivo fecha.dat"
'el numero de factura lo puedo ir guardando en el registro
'de WIN o bien en un archivo como en este caso
'Accion 1 = leer
'Accion 2 = grabar
If Accion = 1 Then
nomfichero = App.Path & "\fecha.dat"
Open nomfichero For Input As #1
L = FileLen(nomfichero)
boleta = Input(L, #1)
NumSig = Val(boleta) + 1
Close #1
GoTo finAbrir
Else
LogFile = FreeFile
nomfichero = App.Path & "\fecha.dat"
Open nomfichero For Output As #LogFile
Print #LogFile, Trim(NumSig) 'escribo el numero de ultima factura
Close #LogFile
End If
Begin VB.Label Label4
Caption
=
BeginProperty Font
Name
Size
Charset
Weight
Underline
Italic
Strikethrough
EndProperty
Height
=
Left
=
TabIndex
=
Top
=
Width
=
End
Begin VB.Label Label2
Caption
=
BeginProperty Font
Name
Size
Charset
Weight
Underline
Italic
Strikethrough
EndProperty
Height
=
Left
=
TabIndex
=
Top
=
Width
=

"Cant:"
=
=
=
=
=
=
=

"MS Sans Serif"


8.25
0
700
-1 'True
0 'False
0 'False
255
120
5
2400
495

"Factura del cliente"


=
=
=
=
=
=
=

"Kabel Bk BT"
12
0
700
0 'False
0 'False
0 'False
375
600
2
0
2775

End
Begin VB.Label Label1
Caption
=
BeginProperty Font
Name
Size
Charset
Weight
Underline
Italic
Strikethrough
EndProperty
Height
=
Left
=
TabIndex
=
Top
=
Width
=
End
End

"Cliente:"
=
=
=
=
=
=
=

"MS Sans Serif"


8.25
0
700
0 'False
0 'False
0 'False
255
120
0
840
735

Anda mungkin juga menyukai