In order for this site to work correctly we need to store a small file (called a cookie) on your computer. Most every site in the world does this, however since the 25th of May 2011, by law we have to get your permission first. Please abandon the forum if you disagree.

Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.

Para Christian

Foro de Xailer profesional en español
Responder
PEDRO DE LEON RODAS[1]
Mensajes: 136
Registrado: Jue Jul 05, 2007 4:52 am

Para Christian

Mensaje por PEDRO DE LEON RODAS[1] »

Christian, te agradezco tu ayuda.
¿ No seria mucho pedirte si me proporcionas un ejemplo. ?
Gracias.
Christian
Mensajes: 290
Registrado: Mié Abr 23, 2008 10:18 pm

Para Christian

Mensaje por Christian »

Aqui esta, esto esta hecho para una epson lx300, enviando los datos
directamente al LPT1
if lMatricial
nHandle:=fopen('LPT1',2)
/// INIT ///
cLinea:=chr(27)+chr(116)+chr(1) + ;
chr(27)+chr(82) +chr(7)
/// DRAFT ///
cLinea+=chr(27)+chr(33) +chr(0) + ;
chr(27)+chr(120)+chr(0) + ;
chr(27)+chr(84)
/// CONDENSADA ///
cLinea+=chr(27)+chr(33)+chr(4)
/// LONGITUD ///
cLinea+=chr(27)+chr(67)+chr(18)
/// 12CPI-CONDENSADA ///
/// chr(27)+chr(33)+chr(4)
for i:=1 to nDesfY+5
cLinea+=pSALTOLIN
next
cLinea+=space(nDesfX+3)
cLinea+=padr(::cAsiento+' '+::cOrigen,56)
cLinea+=padr(::cAsiento+' '+::cOrigen,51)
cLinea+=padr(::cAsiento+' '+::cOrigen,23)
cLinea:=chr(27)+chr(33)+chr(4)+cLinea
fwrite(nHandle,cLinea)
cLinea:=pSALTOLIN+space(nDesfX+3)
cLinea+=padr('--> '+left(::cDestino,18)+if(valtype(::nImporte)=='C' ,
;
' '+::nImporte , ;
' $ '+transf(::nImporte,[email='@E]'@E[/email]
9999.99') ;
),56)
cLinea+=padr('--> '+left(::cDestino,18)+if(valtype(::nImporte)=='C' ,
;
' '+::nImporte , ;
' $ '+transf(::nImporte,[email='@E]'@E[/email]
9999.99') ;
),48)
cLinea+=padr('->' +left(::cDestino,15)+if(valtype(::nImporte)=='C' ,
;
' '+::nImporte , ;
' $'+transf(::nImporte,[email='@E]'@E[/email]
999.99') ;
),26)
cLinea:=chr(27)+chr(33)+chr(4)+cLinea
fwrite(nHandle,cLinea)
cLinea:=pSALTOLIN+pSALTOLIN+pSALTOLIN+space(nDesfX+3)
if empty(::cHora)
/// CONDENSADA-UNDERLINE-DOUBLE STRIKE ///
cLinea+=chr(27)+chr(33)+chr(148)
cLinea+=padr('Abierto - CONFIRMAR',56)
cLinea+=padr('Abierto - CONFIRMAR',51)
cLinea+=padr('Abierto - CONFIRMAR',23)
cLinea+=chr(27)+chr(33) +chr(0) + ;
chr(27)+chr(120)+chr(0) + ;
chr(27)+chr(84)
cLinea+=chr(27)+chr(33) +chr(4)
else
cLinea+=padr(::cHora +' - '+dtoc(::dFechaViaje),56)
cLinea+=padr(::cHora +' - '+dtoc(::dFechaViaje),51)
cLinea+=padr(::cHora +' - '+dtoc(::dFechaViaje),23)
cLinea:=chr(27)+chr(33)+chr(4)+cLinea
endif
fwrite(nHandle,cLinea)
cLinea:=pSALTOLIN+pSALTOLIN+space(nDesfX+3)
cLinea+=padr(::cPasaje+' - '+dtoc(::dFechaCaja),56)
cLinea+=padr(::cPasaje+' - '+dtoc(::dFechaCaja),48)
cLinea+=padr(::cPasaje+' - '+dtoc(::dFechaCaja),26)
cLinea:=chr(27)+chr(33)+chr(4)+cLinea
fwrite(nHandle,cLinea)
cLinea:=pSALTOLIN+space(nDesfX)
cLinea+=padr(::cRazonSoc,56)
cLinea+=padr(::cRazonSoc,51)
cLinea+=padr(::cRazonSoc,26)
cLinea:=chr(27)+chr(33)+chr(4)+cLinea
fwrite(nHandle,cLinea)
cLinea:=pSALTOLIN+space(nDesfX)
cLinea+=padr('Doc. '+::cDocumento,56)
cLinea+=padr('Doc. '+::cDocumento,51)
cLinea+=padr('Doc. '+::cDocumento,26)
cLinea+=chr(12) + chr(27)+chr(67)+chr(72)
fwrite(nHandle,cLinea)
fclose(nHandle)
return(.T.)
endif
"PEDRO DE LEON RODAS" <deleonpe@terra.com.mx> escribió en el mensaje
news:[email=472b683f@ozsrv2.ozlan.local...]472b683f@ozsrv2.ozlan.local...[/email]
> Christian, te agradezco tu ayuda.
>
> ¿ No seria mucho pedirte si me proporcionas un ejemplo. ?
>
> Gracias.
>
>
>
>
Responder