Urgente, impresion tickets en cola!!!

Urgente, impresion tickets en cola!!!

Postby noe aburto » Fri Jul 17, 2015 4:03 pm

Saludos..

Pues aqui con un problema con impresion de tickets...
Mando la impresion de tickets a impresora Epson TM-T2II y de repente estas impresiones quedan en cola, que se imprimen al reiniciar el equipo
Auque le cambie la configuracion que queden en cola para mayor rapidez, a que mande directamente sin esperar.

Alguna sugerencia del porque hace esto?
Noé Aburto Sánchez
Tec. Prog. de Sistemas. -Morelia, Mich. México.
fwh 20.06, Harbour 3.2.0, bcc 7.4
TsBrowse 9.0, TsButton 7.0, xEdit 6.1
naburtos@gmail.com, noeaburto67@hotmail.com
User avatar
noe aburto
 
Posts: 418
Joined: Wed Nov 26, 2008 6:33 pm
Location: Morelia, Mich. Mexico.

Re: Urgente, impresion tickets en cola!!!

Postby acuellar » Fri Jul 17, 2015 4:36 pm

Noe

Cómo lo haces??

Favor poner parte del código.

Saludos,

Adhemar
Saludos,

Adhemar C.
User avatar
acuellar
 
Posts: 1593
Joined: Tue Oct 28, 2008 6:26 pm
Location: Santa Cruz-Bolivia

Re: Urgente, impresion tickets en cola!!!

Postby groiss » Fri Jul 17, 2015 4:58 pm

Noe:
He tenido alguna vez ese problema, sobre todo si uso la impresora de windows, todos esos quebraderos de cabeza me los quité imprimiendo directamente al puerto de la impresora, obliga a afinar la configuración, pero te garantiza que se hace lo que tu quieres.
Un saludo
groiss
 
Posts: 220
Joined: Tue Sep 01, 2009 7:55 am
Location: Plasencia - ESPAÑA

Re: Urgente, impresion tickets en cola!!!

Postby noe aburto » Fri Jul 17, 2015 6:01 pm

Mi codigo...

Code: Select all  Expand view

if IMPR_DOS=='S'
 inicia impresion en oPrn dos // si la impresion es en DOS, clase tDosPrn (genero un archivo y al final lo pando al puerto)
else
 inicia impresion en oPrn puerto COMX_TIQ // impresion direta al puerto, clase tPrinter, COMX_TIQ="EPSON TM-T2II Receipt"
endif
nAncho:=Int(T_ANC_PAP/CM17)
nSup:=1 ; lTit:=.t.
if !empty(OBSE_ENC) // encabezado
 aEmp:=ParteMemo(OBSE_ENC,nAncho)
 for i:=1 to len(aEmp)
  aEmp[i]:=strtran(aEmp[i],CHR(20),'')
  if IMPR_DOS=='S'
   @ nSup,1 dato PadC(aEmp[i],nAncho) letra condensada en oPrn
  elseif !Empty(aEmp[i]).and.lTit
   lTit:=.f.
   @ nSup,1 dato aEmp[i] titulo 4,nAncho letra condensada en oPrn
  else
   @ nSup,1 dato aEmp[i] titulo 0,nAncho letra condensada en oPrn
  endif
  nSup++
 next
endif
if IMPR_DOS=='N'.and.File(T_LOG_TIQ) // logotipo
 nR:=T_CMS_LOG
 nC:=T_CMI_LOG
 oPrn:Cmtr2Pix(@nR,@nC)
 oPrn:SayImage(nR,nC,T_LOG_TIQ,PosX(T_CML_LOG,oPrn),PosY(T_CMA_LOG,oPrn))
endif
@ nSup,1 dato 'Ticket: '+cNumFol+', Fecha '+FormaFecha(gdFecTra)+', Hora: '+time() letra condensada en oPrn
nSup+=2
if IMPR_DOS=='S'
 @ nSup,T_COL_CAN-5  dato 'Cant.' en oPrn
 @ nSup,T_COL_DES-0  dato Ota('Descripción') en oPrn
 @ nSup,T_COL_UNI-10 dato 'P.Unitario' en oPrn
 @ nSup,T_COL_TOT-7  dato 'Total' en oPrn
else
 @ nSup,T_COL_CAN-5  dato 'Cant.' en oPrn
 @ nSup,T_COL_DES-0  dato Ota('Descripción') en oPrn
 @ nSup,T_COL_UNI-8  dato 'P.Unitario' en oPrn
 @ nSup,T_COL_TOT-5  dato 'Total' en oPrn
endif
nSup++
// inicia detalle
select art
if lEsBarras
 OrdSetFocus(8)
else
 OrdSetFocus(3)
endif
if cTipo=='PUNTO.VENTA'
 select tmp
 goto top
 while !Eof()
  select art
  if lEsBarras
   DBSeek(tmp->cod_bar)
  else
   DBSeek(JuntaPza(tmp->(pre_inv+bas_inv+suf_inv)))
  endif
  select tmp
  if IMPR_DOS=='N'.and.nSup>66
   termina pagina
   inicia pagina
   nSup:=1
  endif
  nCant  :=tmp->can_fac
  nPrecio:=tmp->pre_nor
  @ nSup,T_COL_CAN dato nCant formato '99999' en oPrn
  @ nSup,T_COL_DES dato left(Ota(DescArti(art->JUNTA_PZA,lEsBarras)),T_LON_DES) en oPrn
  @ nSup,T_COL_UNI dato nPrecio formato '999,999.99' en oPrn
  @ nSup,T_COL_TOT dato nCant*nPrecio formato '999,999.99' en oPrn
  nSup++
  if SERIE_ENART=='S'.and.art->num_ser
   aSerie:=DameSeries(MOVI_PVC,cNumFol,art->JUNTA_PZA,tmp->(RecNo()))
   for i:=1 to Len(aSerie)
    @ nSup,T_COL_DES dato 'Serie:'+aSerie[i] en oPrn
    nSup++
   next
  endif
  nTot+=tmp->can_fac*tmp->pre_pub
  nIva+=tmp->can_fac*tmp->iva_pub
  skip
 end
endif
nSup++
if nTDes>0
 @ nSup,T_COL_TOT-20 dato 'IMPORTE' en oPrn
 @ nSup,T_COL_TOT dato nTSub formato '999,999.99' en oPrn
 nSup++
 @ nSup,T_COL_TOT-20 dato 'DESCUENTO' en oPrn
 @ nSup,T_COL_TOT dato nTDes formato '999,999.99' en oPrn
 nSup++
endif
@ nSup,T_COL_TOT-20 dato 'SUBTOTAL' en oPrn
@ nSup,T_COL_TOT dato nTTot formato '999,999.99' en oPrn
nSup++
@ nSup,T_COL_TOT-20 dato 'I.V.A. '+Str(_nTasaIva,2)+'%' en oPrn
@ nSup,T_COL_TOT dato nTIva formato '999,999.99' en oPrn
nSup++
@ nSup,T_COL_TOT-20 dato 'TOTAL' en oPrn
@ nSup,T_COL_TOT dato nTTot+nTIva formato '999,999.99' en oPrn
nSup++
cNum:='('+upper(DescNum(nTTot+nTIva))+')'
@ nSup,2 dato substr(cNum,1,nAncho-5) en oPrn
nSup++
if !Empty(substr(cNum,nAncho-5+1))
 @ nSup,2 dato substr(cNum,nAncho-5+1) en oPrn
 nSup++
endif
nSup++
@ nSup,T_COL_TOT-20 dato 'EFECTIVO' en oPrn
@ nSup,T_COL_TOT dato nTEfe formato '999,999.99' en oPrn
nSup++
@ nSup,T_COL_TOT-20 dato 'CAMBIO' en oPrn
@ nSup,T_COL_TOT dato nTEfe-(nTTot+nTIva) formato '999,999.99' en oPrn
nSup++
if !empty(OBSE_PIE) // pie de ticket
 aEmp:=ParteMemo(OBSE_PIE,nAncho)
 for i:=1 to len(aEmp)
  aEmp[i]:=strtran(aEmp[i],CHR(20),'')
  if IMPR_DOS=='S'
   @ nSup,1 dato PadC(aEmp[i],nAncho) en oPrn
  else
   @ nSup,1 dato aEmp[i] titulo 0,nAncho letra condensada en oPrn
  endif
  nSup++
 next
 if IMPR_DOS=='N'
  termina pagina
 endif
endif
if IMPR_DOS=='S'
 termina impresion puerto COMX_TIQ
else
 termina impresion
endif
return .t.
 
Noé Aburto Sánchez
Tec. Prog. de Sistemas. -Morelia, Mich. México.
fwh 20.06, Harbour 3.2.0, bcc 7.4
TsBrowse 9.0, TsButton 7.0, xEdit 6.1
naburtos@gmail.com, noeaburto67@hotmail.com
User avatar
noe aburto
 
Posts: 418
Joined: Wed Nov 26, 2008 6:33 pm
Location: Morelia, Mich. Mexico.

Re: Urgente, impresion tickets en cola!!!

Postby LuisPonce » Mon Jul 20, 2015 12:44 am

Hola Noe

Tambien pase por lo mismo, y te comento que la mejor solucion es generar el archivo como lo hace usando la TDOSPRN

oPrnCmp:=TDosPrn():New(cFilPrn) // oPrnCmp:=TDosPrn():New("luis.prn") <= genero el "luis.prn"

y luego, al terminar... envias directamente al puerto

oPrnCmp:End()

PrintFileRaw( cLptDoc, cFilPrn ) // PrintFileRaw( "\\CAJA01\TICKET", "luis.prn" ) <= i la imprimo en "\\CAJA01\TICKET" contenida en la variable cLptDoc

funciona bien, y tienes impresiones definidas y rapidas
Luis Ponce
User avatar
LuisPonce
 
Posts: 192
Joined: Tue Jul 01, 2008 6:34 pm
Location: PERU

Re: Urgente, impresion tickets en cola!!!

Postby Maggiro » Fri Sep 04, 2015 3:55 pm

Demora en Impresion ...
La solucion no se encuentra en la impresora ...
Ni en su PRG ...
La solucion se encuentra en bajar los valores LPT TIMEOUT a 1
En Windows, ubicando los LPT TIMEOUT en regedit
En otros sistemas operativos, consulte su manual respectivo.

Saludos
Julio César Gómez Cortéz
Godryc Experiencias
Lima Perú
User avatar
Maggiro
 
Posts: 84
Joined: Thu Oct 14, 2010 3:26 am
Location: LIMA - PERU

Re: Urgente, impresion tickets en cola!!!

Postby juan_arroyo_t » Fri Sep 11, 2015 9:09 pm

Noe

Yo pase por una situacion similar hace años y lo resolvi con la solucion 1
vela en siguiente link
http://www.unc.edu.ar/gestion/direcciones-generales/dgti/instructivos-procedmientos-informaticos/problemas-usuales/impresion-lenta-en-d.o.s

Ojala te sirva

Saludos
Juan Arroyo
México
FWH 7.12 VERCE 5.3 xHarbour 1.1.0
juan_arroyo_t@hotmail.com
User avatar
juan_arroyo_t
 
Posts: 196
Joined: Fri May 15, 2009 1:25 am
Location: Cuautitlán, Mexico

Re: Urgente, impresion tickets en cola!!!

Postby sysctrl2 » Fri Sep 11, 2015 10:25 pm

Pueden ser los drivers,

yo uso tprinter para este tipo de impresiones
con resultados excelentes.

saludos..
Cesar Cortes Cruz
SysCtrl Software
Mexico

' Sin +- FWH es mejor "
User avatar
sysctrl2
 
Posts: 951
Joined: Mon Feb 05, 2007 7:15 pm


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 84 guests