Theotokos Posted May 31, 2021 Report Share Posted May 31, 2021 Boa Tarde!!! Cliente pediu para que meu sistema interaja com gaveta bematech, porem meu sistema não é fiscal mas imprimo em uma impressora da Bematech não fiscal... tem como fazer isso? como poderia fazer? e outra coisa, eu não tenho a gaveta para testar, teria como testar virtual? Desde ja muito obrigado!!! Quote Link to comment Share on other sites More sharing options...
Marca Posted May 31, 2021 Report Share Posted May 31, 2021 Eu utilizo a tDosPrn pra isso No meu caso aqui o conteúdo do arquivo Gaveta.txt -> CHR(27) + "i" mas existem outros modelos p. exemplo -> CHR(27) + "p" ai tem q. ver o modelo da sua cFile := oPub:wPorta oPrn := MaTDosPrn():New( cFile ) oPrn:StartPage() cComandoGaveta := AllTrim(MemoRead("C:\MARCA\GAVETA.TXT")) oPrn:Say(00,00, &(cComandoGaveta) ) oPrn:END(1) Theotokos 1 Quote Link to comment Share on other sites More sharing options...
Theotokos Posted May 31, 2021 Author Report Share Posted May 31, 2021 Utilizando a DLL da bematech será que funciona? pois tem uma função lá para abrir gaveta... Quote Link to comment Share on other sites More sharing options...
marcioe Posted June 1, 2021 Report Share Posted June 1, 2021 Olá. voce poderá colocar a hbcomm.lib nos seu projetos para compilar Dai não precisa de DLL, basta enviar o comando para a porta vou postar como faço Armazero assim no banco de dados a porta e comando de abertura de gaveta (T_PORTA_GAVETA='COM2' ETC) T_COMANDO_GAVETA := CHR(27)+'I'+CHR(ETC).. T_PORTA_GAVETA := parametros->PORTA_GAVETA T_COMANDO_GAVETA := parametros->COMANDO_GAVETA *------------------------------------------------------------------------------- * Abertura de Gaveta de Dinheiro Pela Tecla F2 *------------------------------------------------------------------------------- STATIC FUNCTION ABREGAV() IF EMPTY(T_PORTA_GAVETA) MsgStop('Porta para Abertura de Gaveta Não Informado !',SISTEMA) RETURN .F. ENDIF IF EMPTY(T_COMANDO_GAVETA) MsgStop('Comando para Abertura de Gaveta Não Informado !',SISTEMA) RETURN .F. ENDIF s_comando = fcreate( ALLTRIM(T_PORTA_GAVETA),0 ) fwrite( s_comando, &(ALLTRIM(T_COMANDO_GAVETA)) ) fclose( s_comando ) RETURN( Nil ) Veja a imagem Espero ter ajudado Quote Link to comment Share on other sites More sharing options...
kapiaba Posted June 1, 2021 Report Share Posted June 1, 2021 abrir gaventa impr. nao fiscal: bematech oPrn:Command( "27, 118, 140" ) abrir gaventa impr. fiscal: bematech xDll := LoadLibrary("bemafi32.dll") DLL32 FUNCTION BmAbreGav ( ) AS LONG PASCAL ; FROM "Bematech_FI_AcionaGaveta" LIB xDll Theotokos 1 Quote Link to comment Share on other sites More sharing options...
Theotokos Posted June 4, 2021 Author Report Share Posted June 4, 2021 Isso Esta Certo ? FUNCTION AbrirGavetaRLI(lTpGaveta) If lTpGaveta // Abre Gaveta Impressora Fiscal IF B_ACIONAGA() <> 1 MsgStop("Erro ao Abrir a Gaveta","GAVETA") Else MsgWait("Gaveta Aberta com Sucesso","GAVETA",2) EndIf Else // Abre Gaveta Impressora Não Fiscal oPrn:= TDosPrn():New() oPrn:command("27, 118, 140") oPrn:End() EndIf Return nil Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.