AYUDA PARA IMPRIMIR EN UNA LX300 FISCAL
Publicado por javier (1 intervención) el 16/03/2011 20:19:03
Hola mi nombre es javier soy medio nuevo en la programacion y desarrolle una aplicacion en Visual Basic 5, dicha aplicacion es de contro de clientes, ctas ctes, stock y facturacion, dichas facturas eran impresas en una impresora laser por duplicado hasta ahi venia todo bien resulta que ahora al comercion le implementaron una impresora mastriz de punto pero fiscal un EPSON LX 300 fiscal y no se como cambiar mi aplicacion para que imprima en dicha impresora ya que no es lo mismo que una impresora comun, aca dejo un modulo de como hacia para imprimir anterior mente en la impresora laser comun, si alguien me puede ayudar a como debo cambiar el codigo para imprimir en la lx300 fiscal, ya que el comercio esta sin poder facturar y yo no le puedo dar una solucion rapida, gracias.
Sub IMPRIMEFACTURAA()
Printer.ScaleMode = 0
Printer.ScaleMode = 4
Printer.FontSize = 12
Printer.Font = "Draft 12cpi"
Printer.FontSize = 8
Printer.FontItalic = True
Printer.FontBold = True
Printer.PrintQuality = -1
ss = Printer.PaperSize
Printer.Width = 15000
Printer.Height = 8650
contador = 0
' imprime el encabezado del comprobante
ng20 = ng20
ng10 = ng10
iv20 = iv20
iv10 = iv10
Do While contador < TXTcopia.Text '2
Printer.ScaleMode = 4
Printer.Font = "Draft 12cpi"
Printer.FontSize = 8
Printer.FontItalic = True
Printer.FontBold = True
Printer.CurrentX = 5
Printer.Print RG5!razon; " Nº: "; tipo & "0001 - " & Format(num, "00000000")
Printer.CurrentX = 5
Printer.Print "de "; RG5!DUEÑO; " FACTURA A"
Printer.CurrentX = 5
Printer.Print RG5!direccion; " FECHA: "; CDate(Mask.Text)
Printer.CurrentX = 5
Printer.Print RG5!localidad; " CUIT: "; RG5!CUIT
Printer.CurrentX = 5
Printer.Print "TE: "; RG5!TELEFONO; " ING. BRUTO: "; RG5!BRUTO
Printer.CurrentX = 5
Printer.Print "RESP. INSCRIPTO "; ""
Printer.Print "___________________________________________________________________________________________________________________________________________________________"
Printer.FontItalic = False
Printer.FontBold = False
anterior = Printer.CurrentY
Printer.CurrentX = 65
'Printer.Print
'Printer.Print
'Printer.Print
'Printer.Print
anterior = Printer.CurrentY
Printer.CurrentX = 8
Printer.Print rg!NUMCLI & " - " & rg!NOMCLI
RG7.Seek "=", Val(rg!codcli)
Printer.CurrentX = 8
Printer.Print rg!TELE
If RG7.NoMatch Then
localidad = ""
provincia = ""
codigoposta = ""
Else
localidad = RG7!locpos
provincia = RG7!propos
codigoposta = RG7!CODPOS
End If
Printer.CurrentY = anterior
Printer.CurrentX = 61
Printer.Print rg!domcli & " " & rg!do1cli&
anterior = Printer.CurrentY
Printer.CurrentX = 61
Printer.Print codigoposta & " " & localidad
anterior = Printer.CurrentY
Printer.CurrentX = 61
Printer.Print rg!cuicli
Printer.CurrentY = anterior
Printer.CurrentX = 14
Printer.Print ""
Printer.CurrentY = anterior
Printer.Print
Printer.CurrentX = 15
Select Case rg!IVACLI
Case 1
Printer.Print " X"
Case 2
Printer.Print ""
Case 3
Printer.Print ""
Case 4
Printer.Print ""
Case 5
Printer.Print ""
End Select
' FALTA LA CONDICION DE VENTA
'Printer.Print
Printer.Print "___________________________________________________________________________________________________________________________________________________________"
Printer.CurrentX = 25
Printer.CurrentY = Printer.CurrentY + 0.6
anterior = Printer.CurrentY
Printer.CurrentX = 0 '50
Printer.CurrentY = anterior
'Printer.Print
Printer.Print "CANTIDAD CODIGO PRODUCTO"
Printer.CurrentY = anterior
Printer.CurrentX = 70
Printer.Print "P.UNITARIO TOTAL"
Printer.Print "___________________________________________________________________________________________________________________________________________________________"
' IMPRIME DETALLE
grilla.Row = 1
grilla.Col = 0
contador1 = 0
Do While Not grilla.Text = ""
grilla.Col = 2
Printer.CurrentX = 0 ' -14
anterior = Printer.CurrentY
NRO = ALINEAR(grilla.Text)
'NRO = Format(NRO, "0000")
Printer.Print NRO
'DESDE ACA EMPIEZO CON CODIGO
grilla.Col = 2
Printer.CurrentX = 5 '-3 '-5
Printer.CurrentY = anterior
NRO = ALINEAR(grilla.Text)
Printer.Print NRO
'HASTA ACA VIENE EL CODIGO
Printer.CurrentY = anterior
Printer.CurrentX = 21 '15 ' 21
grilla.Col = 1
Printer.Print grilla.Text
Printer.CurrentY = anterior
Printer.CurrentX = 66 '63
grilla.Col = 3
NRO = ALINEAR(grilla.Text)
Printer.Print NRO
grilla.Col = 5
Printer.CurrentY = anterior
Printer.CurrentX = 75
grilla.Text = grilla.Text / 1.21
NRO = ALINEAR(grilla.Text)
Printer.Print NRO
grilla.Text = grilla.Text * 1.21
grilla.Row = grilla.Row + 1
contador1 = contador1 + 1
Loop
Do While contador1 < 15
Printer.Print
contador1 = contador1 + 1
Loop
' imprime pie de comprobante
'Printer.Print
'Printer.Print
'Printer.Print
Printer.Print "___________________________________________________________________________________________________________________________________________________________"
Printer.CurrentY = Printer.CurrentY + 0.5
Printer.CurrentX = 5
'Printer.Print " NETO GRAVADO"
Printer.CurrentY = Printer.CurrentY + 0.5
Printer.CurrentX = 5
Printer.Print "NETO GRAVADO 21,00% 10,50% *T O T A L*"
Printer.Print
anterior = Printer.CurrentY
Printer.CurrentX = 2
NRO = ALINEAR(ng20)
Printer.Print NRO
Printer.CurrentY = anterior
Printer.CurrentX = 14
NRO = ALINEAR(ng10)
NRO = Format(NRO, "###,###")
Printer.Print NRO
Printer.CurrentY = anterior
Printer.CurrentX = 45
NRO = ALINEAR(iv20)
Printer.Print NRO
Printer.CurrentY = anterior
Printer.CurrentX = 60
NRO = ALINEAR(iv10)
Printer.Print NRO
Printer.CurrentY = anterior
Total = ng20 + ng10 + iv20 + iv10
Printer.CurrentX = 75
NRO = ALINEAR(Total)
Printer.Print NRO
contador = contador + 1
Printer.Print
Printer.Print
Printer.CurrentX = 58
Printer.Print
Printer.Print
Printer.Print
Printer.Print
Printer.Print
Printer.Print
Printer.Print
Printer.Print
Printer.FontItalic = True
Printer.FontBold = True
Loop
Printer.EndDoc
End Sub
Sub IMPRIMEFACTURAA()
Printer.ScaleMode = 0
Printer.ScaleMode = 4
Printer.FontSize = 12
Printer.Font = "Draft 12cpi"
Printer.FontSize = 8
Printer.FontItalic = True
Printer.FontBold = True
Printer.PrintQuality = -1
ss = Printer.PaperSize
Printer.Width = 15000
Printer.Height = 8650
contador = 0
' imprime el encabezado del comprobante
ng20 = ng20
ng10 = ng10
iv20 = iv20
iv10 = iv10
Do While contador < TXTcopia.Text '2
Printer.ScaleMode = 4
Printer.Font = "Draft 12cpi"
Printer.FontSize = 8
Printer.FontItalic = True
Printer.FontBold = True
Printer.CurrentX = 5
Printer.Print RG5!razon; " Nº: "; tipo & "0001 - " & Format(num, "00000000")
Printer.CurrentX = 5
Printer.Print "de "; RG5!DUEÑO; " FACTURA A"
Printer.CurrentX = 5
Printer.Print RG5!direccion; " FECHA: "; CDate(Mask.Text)
Printer.CurrentX = 5
Printer.Print RG5!localidad; " CUIT: "; RG5!CUIT
Printer.CurrentX = 5
Printer.Print "TE: "; RG5!TELEFONO; " ING. BRUTO: "; RG5!BRUTO
Printer.CurrentX = 5
Printer.Print "RESP. INSCRIPTO "; ""
Printer.Print "___________________________________________________________________________________________________________________________________________________________"
Printer.FontItalic = False
Printer.FontBold = False
anterior = Printer.CurrentY
Printer.CurrentX = 65
'Printer.Print
'Printer.Print
'Printer.Print
'Printer.Print
anterior = Printer.CurrentY
Printer.CurrentX = 8
Printer.Print rg!NUMCLI & " - " & rg!NOMCLI
RG7.Seek "=", Val(rg!codcli)
Printer.CurrentX = 8
Printer.Print rg!TELE
If RG7.NoMatch Then
localidad = ""
provincia = ""
codigoposta = ""
Else
localidad = RG7!locpos
provincia = RG7!propos
codigoposta = RG7!CODPOS
End If
Printer.CurrentY = anterior
Printer.CurrentX = 61
Printer.Print rg!domcli & " " & rg!do1cli&
anterior = Printer.CurrentY
Printer.CurrentX = 61
Printer.Print codigoposta & " " & localidad
anterior = Printer.CurrentY
Printer.CurrentX = 61
Printer.Print rg!cuicli
Printer.CurrentY = anterior
Printer.CurrentX = 14
Printer.Print ""
Printer.CurrentY = anterior
Printer.Print
Printer.CurrentX = 15
Select Case rg!IVACLI
Case 1
Printer.Print " X"
Case 2
Printer.Print ""
Case 3
Printer.Print ""
Case 4
Printer.Print ""
Case 5
Printer.Print ""
End Select
' FALTA LA CONDICION DE VENTA
'Printer.Print
Printer.Print "___________________________________________________________________________________________________________________________________________________________"
Printer.CurrentX = 25
Printer.CurrentY = Printer.CurrentY + 0.6
anterior = Printer.CurrentY
Printer.CurrentX = 0 '50
Printer.CurrentY = anterior
'Printer.Print
Printer.Print "CANTIDAD CODIGO PRODUCTO"
Printer.CurrentY = anterior
Printer.CurrentX = 70
Printer.Print "P.UNITARIO TOTAL"
Printer.Print "___________________________________________________________________________________________________________________________________________________________"
' IMPRIME DETALLE
grilla.Row = 1
grilla.Col = 0
contador1 = 0
Do While Not grilla.Text = ""
grilla.Col = 2
Printer.CurrentX = 0 ' -14
anterior = Printer.CurrentY
NRO = ALINEAR(grilla.Text)
'NRO = Format(NRO, "0000")
Printer.Print NRO
'DESDE ACA EMPIEZO CON CODIGO
grilla.Col = 2
Printer.CurrentX = 5 '-3 '-5
Printer.CurrentY = anterior
NRO = ALINEAR(grilla.Text)
Printer.Print NRO
'HASTA ACA VIENE EL CODIGO
Printer.CurrentY = anterior
Printer.CurrentX = 21 '15 ' 21
grilla.Col = 1
Printer.Print grilla.Text
Printer.CurrentY = anterior
Printer.CurrentX = 66 '63
grilla.Col = 3
NRO = ALINEAR(grilla.Text)
Printer.Print NRO
grilla.Col = 5
Printer.CurrentY = anterior
Printer.CurrentX = 75
grilla.Text = grilla.Text / 1.21
NRO = ALINEAR(grilla.Text)
Printer.Print NRO
grilla.Text = grilla.Text * 1.21
grilla.Row = grilla.Row + 1
contador1 = contador1 + 1
Loop
Do While contador1 < 15
Printer.Print
contador1 = contador1 + 1
Loop
' imprime pie de comprobante
'Printer.Print
'Printer.Print
'Printer.Print
Printer.Print "___________________________________________________________________________________________________________________________________________________________"
Printer.CurrentY = Printer.CurrentY + 0.5
Printer.CurrentX = 5
'Printer.Print " NETO GRAVADO"
Printer.CurrentY = Printer.CurrentY + 0.5
Printer.CurrentX = 5
Printer.Print "NETO GRAVADO 21,00% 10,50% *T O T A L*"
Printer.Print
anterior = Printer.CurrentY
Printer.CurrentX = 2
NRO = ALINEAR(ng20)
Printer.Print NRO
Printer.CurrentY = anterior
Printer.CurrentX = 14
NRO = ALINEAR(ng10)
NRO = Format(NRO, "###,###")
Printer.Print NRO
Printer.CurrentY = anterior
Printer.CurrentX = 45
NRO = ALINEAR(iv20)
Printer.Print NRO
Printer.CurrentY = anterior
Printer.CurrentX = 60
NRO = ALINEAR(iv10)
Printer.Print NRO
Printer.CurrentY = anterior
Total = ng20 + ng10 + iv20 + iv10
Printer.CurrentX = 75
NRO = ALINEAR(Total)
Printer.Print NRO
contador = contador + 1
Printer.Print
Printer.Print
Printer.CurrentX = 58
Printer.Print
Printer.Print
Printer.Print
Printer.Print
Printer.Print
Printer.Print
Printer.Print
Printer.Print
Printer.FontItalic = True
Printer.FontBold = True
Loop
Printer.EndDoc
End Sub
Valora esta pregunta


0