[Stoq-devel] Logs Stoq (Problema fechamento de caixa ECF Bematech MP4000)
Murillo Paiva
murillo at grupomarquesjunior.com.br
Sun Mar 11 21:46:15 BRT 2012
Ronaldo, encontrei este COD no forum do projeto ACBr, acredito que com isto
poderá implementar a função para todas os modelos de
impressoras/gavetas..... esta bem comentada...
procedure AbreGaveta ;
>> var Print : textfile ;
>> begin
>> AssignFile(Print , PortaDaImpressora);
>> Rewrite(Print );
>> if COMANDOABERTURAGAVETA = '1' then
>> Writeln(Print ,chr($1B)+'p'+chr($0)+chr($25)+chr($250)); // Impressora
>> EPSON
>> if COMANDOABERTURAGAVETA = '2' then
>> Writeln(Print ,#027+'v'+#140); // Bematech
>> if COMANDOABERTURAGAVETA = '3' then
>> begin
>> Writeln(Print ,#27 + '&' + '0' + #12 + #48); // MECAF / DIEBOLD / Abre a
>> gaveta
>> Writeln(Print ,#10 + #17); // MECAF / DIEBOLD / Corte de papel
>> end ;
>> if COMANDOABERTURAGAVETA = '4' then
>> begin
>> Writeln(Print ,#27 + 'p'); // Daruma Abre a gaveta
>> Writeln(Print ,#27 + 'm'); // Daruma Corte de papel
>> end ;
>> closefile(Print) ;
>> end ;
>>
>> // ...COMANDOABERTURAGAVETA = variavel publica do tipo String para setar
>> qual parte do código eu quero executar , ou seja qual tipo de gaveta eu
>> quero abrir .
>>
>
Cordialmente,
Murillo Paiva
Gerente de TI - Grupo Marques Júnior
<murillo at grupomarquesjunior.com.br>
Em 11 de março de 2012 21:20, Murillo Paiva <
murillo at grupomarquesjunior.com.br> escreveu:
> Ronaldo tudo bem, segue função para permitir abertura da gaveta de
> dinheiro nas impressoras bematech.... assim que inserir a função me fale
> para que eu possa testá-la. Algo que se pode fazer é inserir na
> administração do Stoq um campo para ativar ou desativar esta função....
> grande abraço.
>
> def _open_tray_cash(self):
>> command = chr(27) + chr(118) + chr(140)
>> return = commandTX(command, len(command)
>>
>
>
> Cordialmente,
>
> Murillo Paiva
> Gerente de TI - Grupo Marques Júnior
> <murillo at grupomarquesjunior.com.br>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.async.com.br/pipermail/stoq-devel/attachments/20120311/9dfca2ed/attachment.html>
More information about the Stoq-devel
mailing list