Jump to content
Fivewin Brasil

impressora termica epson tm-t20


edutraini

Recommended Posts

Vaja se ajuda:



print oprint title "Impresion de Ticket " to "MINI EPSON" // from user preview
if Empty( oPrInT:hDC )
return nil
endif

// DEFINE FONT aFon1 NAME "COURIER NEW" SIZE 0,12 BOLD OF OPRINT
DEFINE FONT aFon2 NAME "COURIER NEW" SIZE 0,14 BOLD OF oPRINT



page
PAG:=1
Oprint:Cmsay(1.0,.2,"FERROPUERTO DE SONORA, ",AFON2)
Oprint:Cmsay(1.5,.2," SA DE C.V.",AFON2)
Oprint:Cmsay(3.0,.2,"Boleto No. ",AFON2)
Oprint:Cmsay(4.0,.2,"Camion "+zcamion+" Grano "+Ctipo,AFON2)
oprint:Cmsay(5.0,.2,"Peso Entrada "+str(zpesoe,7),AFON2)
Oprint:Cmsay(6.0,.2,zhorae+" "+dtoc(zfechae),AFON2)
if zpesoe>zpesos
cbruto:=zpesoe
ctara :=zpesos
cneto :=zpesoe-zpesos
else
cbruto:=zpesos
ctara :=zpesoe
cneto :=zpesos-zpesos
Endif
cneto:=cbruto-ctara

If !zlAppend // si no es verdadero quiere decir que es salida e imprmir la salida we
Oprint:Cmsay(7.0,.2,"Peso Salida "+Str(zpesos,7),AFON2)

Oprint:Cmsay(8.0,.2," Bruto "+Str(cbruto,7),AFON2)
Oprint:Cmsay(9.0,.2," Tara "+Str(ctara,7),AFON2)
Oprint:Cmsay(10.0,.2," Neto "+Str(cneto,7),AFON2)
Oprint:Cmsay(11.0,.2,zhoras+" "+dtoc(zfechas),AFON2)

Endif
Oprint:Cmsay(12.0,.2,"Chofer "+zchofer,AFON2)
Oprint:Cmsay(12.6,.2," H._______",AFON2)
Oprint:Cmsay(13.2,.2," I._______",AFON2)
Oprint:Cmsay(13.8,.2,"Pxh._______",AFON2)
Oprint:Cmsay(14.4,.2," GQ._______",Afon2)
Oprint:Cmsay(15.0,.2," GD._______",Afon2)
Oprint:Cmsay(15.6,.2,"Primario _______",Afon2)
Oprint:Cmsay(16.2,.2,"Secundario _______",Afon2)




EndPage
endprint
? "termina impresion we para mañana lo continuamos"
return nil


Link to comment
Share on other sites



if alltrim(configu->puerto)='USB'
vRuta:=alltrim(configu->rutatic) && PrnGetPort()
NETCANCEL("LPT1")
vPath:=NETREDIR( "LPT1",vRuta)
IF vPath=.T.
WINEXEC('NET USE LPT1: &vRuta',0)
oPrn:=TDosPrn():New('LPT1')
else
MSGINFO("NO PUEDO IMPRIMIR CON LA IMPRESORA DE TICKETS") ; return
ENDIF
else
oPrn:=TDosPrn():New(alltrim(configu->puerto))
endif
if configu->lprilingra=.t.
oPrn:Say(y,20-(LEN(ALLTRIM(configu->cabtic1))/2),&(configu->chr_alg)+rtrim(configu->cabtic1)+&(configu->chr_dlg)) ; y++
else
oPrn:say(y,20-(LEN(ALLTRIM(configu->cabtic1))/2),configu->cabtic1) ; y++
endif
oPrn:Say(y,00,"Ticket Nº: "+alltrim(str(ventas->numticket))) ; y++
oprn:say(y,00,replicate('-',40));y++
oprn:say(y,00,'Udes Descripción Total'); y++
oprn:say(y,00,replicate('-',40));y++
select 21 ; tttick:=0
do while .not. eof()
oprn:say(y,00,str(udes,3))
oprn:say(y,05,des_ticket)
iif(udes>1,oprn:say(y,27,str(pventa,6,2)),)
oprn:say(y,34,str(udes*pventa,6,2)) ; y++
tttick+=udes*pventa
skip
enddo
skip-1
oprn:say(y,00,replicate('-',40));y++
oPrn:Say(y,00,&(configu->chr_alg)+'TOTAL: '+TRAN(tttick,'@E99,999.99')+' euros'+&(configu->chr_dlg)) ; y++
y++
if configu->corte=.t.
OPRN:SAY(Y,00,CHR(27)+CHR(105)) // corte de papel
endif
oprn:END()


Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...