Alguien tendra la rutina para impresoras fiscales bematech

Alguien tendra la rutina para impresoras fiscales bematech

Postby QAZWSX2K » Sun Sep 26, 2010 2:09 am

Alguien tendra la rutina para impresoras fiscales bematech, okidata, epson o la que sea, por usb, para venezuela y que no lo considere un secreto de estado o esten dentro de los secretos del area 51, etc, etc

gracias
Software especializado para oficinas contables con grandes volumenes de Informacion
Impresion de todos los formularios del Seniat, Dian

alex_patino74@hotmail.com
whatsapp 57+3214777217
User avatar
QAZWSX2K
 
Posts: 363
Joined: Tue Oct 25, 2005 7:06 pm
Location: Bogota - Caracas

Re: Alguien tendra la rutina para impresoras fiscales bematech

Postby mag071 » Sun Sep 26, 2010 2:25 am

Saludos QAZWSX2K ;

Te cuento mi corta experiencia con las impresoras BEMATECH,
Con las que tengo experiencias son con impresoras fiscales puerto COMX
ellos suministran una libreria llamada
BEMAFI32.DLL

yo lo que hice fue lo siguiente primeramente declarar las funciones de sus .dll

DLL32 FUNCTION NumerodeSerie(NumeroSerie AS LPSTR) AS LONG PASCAL FROM "Bematech_FI_NumeroSerie" LIB hFiscalDl2
DLL32 FUNCTION NumeroCupon(NumeroCupon AS LPSTR) AS LONG PASCAL FROM "Bematech_FI_NumeroComprobanteFiscal" LIB hFiscalDl2
DLL32 FUNCTION VerificaEstadoImpresora(@ACK AS LONG,@ST1 AS LONG,@ST2 AS LONG) AS LONG PASCAL FROM "Bematech_FI_VerificaEstadoImpresora" LIB hFiscalDl2
DLL32 FUNCTION LecturaX() AS LONG PASCAL FROM "Bematech_FI_LecturaX" LIB hFiscalDl2
DLL32 FUNCTION FechaHoraImpresora(fecha AS LPSTR, hora AS LPSTR) AS LONG PASCAL FROM "Bematech_FI_FechaHoraImpresora" LIB hFiscalDl2
DLL32 FUNCTION RetornaRifsActivos(rifs AS LPSTR) AS LONG PASCAL FROM "Bematech_FI_RetornaRifsActivos" LIB hFiscalDl2
DLL32 FUNCTION BorrarRifs() AS LONG PASCAL FROM "Bematech_FI_BorraRifs" LIB hFiscalDl2
DLL32 FUNCTION AnadirRif(rif AS LPSTR) AS LONG PASCAL FROM "Bematech_FI_Anadir_Rif" LIB hFiscalDl2

//FUNCIONES DEL TICKET DE APUESTA
DLL32 FUNCTION AbreFacturaApuesta(rif AS LPSTR, comercializador AS LPSTR,direccion AS LPSTR,;
cliente1 AS LPSTR,cliente2 AS LPSTR,cliente3 AS LPSTR) AS LONG PASCAL FROM "Bematech_FI_AbreFacturaApuesta" LIB hFiscalDl2
DLL32 FUNCTION AbreSorteo(loteria AS LPSTR, nombrejuego AS LPSTR,numerosorteo AS LPSTR,;
fechasorteo AS LPSTR, horasorteo AS LPSTR, dia AS LPSTR) AS LONG PASCAL FROM "Bematech_FI_AbreSorteo" LIB hFiscalDl2
DLL32 FUNCTION SubSorteo(info AS LPSTR) AS LONG PASCAL FROM "Bematech_FI_SubSorteo" LIB hFiscalDl2
DLL32 FUNCTION VendeApuesta(apuesta AS LPSTR, valor AS LPSTR) AS LONG PASCAL FROM "Bematech_FI_VendeApuestaUnaLinea" LIB hFiscalDl2
DLL32 FUNCTION CierraSorteo() AS LONG PASCAL FROM "Bematech_FI_CierraSorteo" LIB hFiscalDl2
DLL32 FUNCTION CodigodeValidacion(codigo AS LPSTR) AS LONG PASCAL FROM "Bematech_FI_CodValidacion" LIB hFiscalDl2
DLL32 FUNCTION CierraFacApuest2() AS LONG PASCAL FROM "Bematech_FI_CierreFacApuesta" LIB hFiscalDl2
DLL32 FUNCTION IniciaCierre(d1 AS LPSTR,d2 AS LPSTR,d3 AS LPSTR) AS LONG PASCAL FROM "Bematech_FI_IniciaCierreCupon" LIB hFiscalDl2
DLL32 FUNCTION FinalizaCierre(mensaje AS LPSTR) AS LONG PASCAL FROM "Bematech_FI_FinalizarCierreCupon" LIB hFiscalDl2


DLL32 FUNCTION ResetaImpresora() AS LONG PASCAL FROM "Bematech_FI_ResetaImpresora" LIB hFiscalDl2
DLL32 FUNCTION AnulaCupon() AS LONG PASCAL FROM "Bematech_FI_AnulaCupon" LIB hFiscalDl2
DLL32 FUNCTION ReporteZ(fecha AS LPSTR,hora AS LPSTR) AS LONG PASCAL FROM "Bematech_FI_ReduccionZ" LIB hFiscalDl2
DLL32 FUNCTION RegistraRetencion(rif AS LPSTR,premios AS LPSTR, alicuota AS LPSTR, restante AS LPSTR) AS LONG PASCAL FROM "Bematech_FI_RegistraRetencion" LIB hFiscalDl2
DLL32 FUNCTION AbreComprobanteRetencion(rif AS LPSTR,nombre AS LPSTR, direccion AS LPSTR) AS LONG PASCAL FROM "Bematech_FI_AbreComprobanteRetencion" LIB hFiscalDl2
DLL32 FUNCTION PremioCompRetencion(factura AS LPSTR,premio AS LPSTR, alicuota AS LPSTR) AS LONG PASCAL FROM "Bematech_FI_PremioCompRetencion" LIB hFiscalDl2
DLL32 FUNCTION AnulaCompRetencion() AS LONG PASCAL FROM "Bematech_FI_AnulaCompRetencion" LIB hFiscalDl2
DLL32 FUNCTION CierraInformeGerencial() AS LONG PASCAL FROM "Bematech_FI_CierraInformeGerencial" LIB hFiscalDl2
DLL32 FUNCTION InformeGerencial(ctexto AS LPSTR) AS LONG PASCAL FROM "Bematech_FI_InformeGerencial" LIB hFiscalDl2

primero declare todas las funciones de esta forma usando una variable estatica hFiscalDl2 porque si usaba directamente el nombre de la libreria
cuando corre la funcion cierra la libreria.
al principio del programa llamo a esta funcion

Static Function AbroDllPrinte2()
LOCAL lRet:=.F.
LOCAL cDllName:="BEMAFI32.DLL"

hFiscalDl2:=LoadLib32(cDllName)
if Abs( hFiscalDL2 ) <= 32
MsgAlert( "Error code: " + LTrim( Str( hFiscalDL2 ) ) + " loading " + cDllName )
lRet:=.F.
ELSE
lRet:=.T.
endif

Return lRet

y luego para correr la funcion a usar simplemente la llamo
nRet := ReporteZ("","") //Ejemplo

los parámetros y el orden de llamar las funciones te la suministran ellos

las funciones para por ejemplo hacer una factura
es abrircupon() ->
añadirproductos()
subtotal()
cerrar()

Espero te sirva esta información
quedando a la orden.
Mario Antonio González Osal
Venezuela
m a g 0 7 1 @ g m a i l. c o m
User avatar
mag071
 
Posts: 140
Joined: Thu Feb 02, 2006 12:09 pm
Location: Venezuela

Re: Alguien tendra la rutina para impresoras fiscales bematech

Postby QAZWSX2K » Sat Oct 02, 2010 12:40 am

AH GRACIAS MAG, la gripe hacia que tenia dias que no entrada, ya lo pruebo y te comento
Software especializado para oficinas contables con grandes volumenes de Informacion
Impresion de todos los formularios del Seniat, Dian

alex_patino74@hotmail.com
whatsapp 57+3214777217
User avatar
QAZWSX2K
 
Posts: 363
Joined: Tue Oct 25, 2005 7:06 pm
Location: Bogota - Caracas


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 87 guests