Imprimir en impresora de punto de venta
Publicado por Marlon Espinal (8 intervenciones) el 06/08/2009 23:21:56
Estoy haciendo una facutra y quiero que se valla a imprimir en una impresora punto de venta..
ya mande a imprimir directo a la impresora. este es el codigo
Dim f As Integer
f = FreeFile()
Open "LPT1" For Output As #f
DescripcionNeg = StrConv(DescripcionNeg, vbUpperCase)
Print #f, Tab(12); DescripcionNeg
Print #f, Tab(12); "RTN:"; Spc(1); RTNNeg
Print #f, Tab(0); DireccionNeg
Print #f, Tab(17); TelefonoNeg
Print #f, Tab(13); "FACTURA DE VENTAS"
Print #f, Tab(0); "Factura #:"; Tab(14); Trim(txtDatos(0))
Print #f, Tab(0); "Cliente:"; Tab(10); Trim(txtDatos(1))
Print #f, Tab(0); "Cajero(a):"; Tab(14); gNombreUsuario
Print #f,
Print #f, Tab(0); "Cant"; Tab(6); "Descripcion"; Tab(28); "Desc"; Tab(36); "Valor"
Print #f, Tab(0); "======================="; Tab(27); "=============="
If GrillaAgregar.Rows > 1 Then
With GrillaAgregar
For i = 1 To .Rows - 1
Print #f, Tab(0); CCur(.TextMatrix(i, 4)); Tab(6); Trim(.TextMatrix(i, 2)); Tab(28); .TextMatrix(i, 5); Tab(41 - Len(Format(.TextMatrix(i, 8), "###,##0.00"))); Format(.TextMatrix(i, 8), "###,##0.00")
Next i
End With
End If
Print #f, Tab(32); "========="
Print #f, Tab(2); "Impuesto incluido"; Tab(41 - Len(FormatCurrency(txtDatos(6)))); FormatCurrency(txtDatos(6))
Print #f,
Print #f, Tab(10); " Detalle Imp. y Desc"
Print #f, Tab(12); " Desc:"; Tab(32 - Len(FormatCurrency(txtDatos(4)))); FormatCurrency(txtDatos(4))
Print #f, Tab(12); "Impuesto:"; Tab(32 - Len(FormatCurrency(txtDatos(5)))); FormatCurrency(txtDatos(5))
Print #f,
Print #f, Tab(4); "Efectivo Recibido"; Tab(35 - Len(FormatCurrency(txtRecibido))); FormatCurrency(txtRecibido)
Print #f, Tab(4); "Cambio Efectivo"; Tab(35 - Len(FormatCurrency(txtVuelto))); FormatCurrency(txtVuelto)
Print #f,
Print #f, Tab(8); "**Gracias por su compra**"
Print #f, Tab(0); "La factura es beneficio de todos Exijala"
Close #f
lo que quiero es que la impresora de punto de venta, me corte automaticamente, lo que pasa es que cuando mando a imprimir, no detecta el final de la impresion, creo yo..
saludos
ya mande a imprimir directo a la impresora. este es el codigo
Dim f As Integer
f = FreeFile()
Open "LPT1" For Output As #f
DescripcionNeg = StrConv(DescripcionNeg, vbUpperCase)
Print #f, Tab(12); DescripcionNeg
Print #f, Tab(12); "RTN:"; Spc(1); RTNNeg
Print #f, Tab(0); DireccionNeg
Print #f, Tab(17); TelefonoNeg
Print #f, Tab(13); "FACTURA DE VENTAS"
Print #f, Tab(0); "Factura #:"; Tab(14); Trim(txtDatos(0))
Print #f, Tab(0); "Cliente:"; Tab(10); Trim(txtDatos(1))
Print #f, Tab(0); "Cajero(a):"; Tab(14); gNombreUsuario
Print #f,
Print #f, Tab(0); "Cant"; Tab(6); "Descripcion"; Tab(28); "Desc"; Tab(36); "Valor"
Print #f, Tab(0); "======================="; Tab(27); "=============="
If GrillaAgregar.Rows > 1 Then
With GrillaAgregar
For i = 1 To .Rows - 1
Print #f, Tab(0); CCur(.TextMatrix(i, 4)); Tab(6); Trim(.TextMatrix(i, 2)); Tab(28); .TextMatrix(i, 5); Tab(41 - Len(Format(.TextMatrix(i, 8), "###,##0.00"))); Format(.TextMatrix(i, 8), "###,##0.00")
Next i
End With
End If
Print #f, Tab(32); "========="
Print #f, Tab(2); "Impuesto incluido"; Tab(41 - Len(FormatCurrency(txtDatos(6)))); FormatCurrency(txtDatos(6))
Print #f,
Print #f, Tab(10); " Detalle Imp. y Desc"
Print #f, Tab(12); " Desc:"; Tab(32 - Len(FormatCurrency(txtDatos(4)))); FormatCurrency(txtDatos(4))
Print #f, Tab(12); "Impuesto:"; Tab(32 - Len(FormatCurrency(txtDatos(5)))); FormatCurrency(txtDatos(5))
Print #f,
Print #f, Tab(4); "Efectivo Recibido"; Tab(35 - Len(FormatCurrency(txtRecibido))); FormatCurrency(txtRecibido)
Print #f, Tab(4); "Cambio Efectivo"; Tab(35 - Len(FormatCurrency(txtVuelto))); FormatCurrency(txtVuelto)
Print #f,
Print #f, Tab(8); "**Gracias por su compra**"
Print #f, Tab(0); "La factura es beneficio de todos Exijala"
Close #f
lo que quiero es que la impresora de punto de venta, me corte automaticamente, lo que pasa es que cuando mando a imprimir, no detecta el final de la impresion, creo yo..
saludos
Valora esta pregunta
0