*********** Impresion ticket
DEFINE FONT oFont NAME "COURIER NEW" SIZE -config:fon,config:fon*2.5
DEFINE FONT oFont3 NAME "COURIER NEW" SIZE -config:fon,config:fon*2.5 BOLD
PRINT oPrn TO ALLTRIM(oQryComand:name) //Imprime por comandera
PAGE
@ 0,1 PRINT TO oPrn IMAGE "logo.jpg" SIZE 3, 1.5 CM STRETCH
@ 0, .1 PRINT TO oPrn TEXT ALLTRIM(oApp:nomb_emp) ;
SIZE 5,1 CM FONT oFont ALIGN "C" LASTROW nRow
@ nRow, .1 PRINT TO oPrn TEXT ALLTRIM(oApp:dire_emp) ;
SIZE 5,.5 CM FONT oFont LASTROW nRow ALIGN "C"
@ nRow, .1 PRINT TO oPrn TEXT ALLTRIM(aiva[oApp:tipo_iva]) ;
SIZE 5,.5 CM FONT oFont LASTROW nRow ALIGN "C"
@ nRow, .1 PRINT TO oPrn TEXT "CUIT:"+oApp:cuit_emp ;
SIZE 5,.5 CM FONT oFont LASTROW nRow ALIGN "C"
@ nRow, .1 PRINT TO oPrn TEXT "Ing.br:"+ALLTRIM(oApp:ingb_emp);
SIZE 5,.5 CM FONT oFont LASTROW nRow ALIGN "C"
@ nRow, .1 PRINT TO oPrn TEXT "Inic.Act.:"+DTOC(oApp:inac_emp);
SIZE 5,.5 CM FONT oFont LASTROW nRow ALIGN "C"
@ nRow, .1 PRINT TO oPrn TEXT IF(cTipoDoc="NC","NOTA DE CREDITO ","TICKET ") + LEFT(cNumComp,1) ;
SIZE 5,.5 CM FONT oFont LASTROW nRow ALIGN "C"
@ nRow, .1 PRINT TO oPrn TEXT "Cod:" + oQryVen1:tipfor+" Nro:"+RIGHT(cNumcomp,13) ;
SIZE 5,.5 CM FONT oFont LASTROW nRow ALIGN "C"
@ nRow, .1 PRINT TO oPrn TEXT "Fecha Emision:" + +DTOC(oQryVen1:fecha);
SIZE 5,.5 CM FONT oFont LASTROW nRow ALIGN "C"
IF oQryVen1:coniva = 5
@ nRow, .1 PRINT TO oPrn TEXT "A Consumidor Final";
SIZE 5,.5 CM FONT oFont LASTROW nRow ALIGN "C"
ELSE
@ nRow, .1 PRINT TO oPrn TEXT ALLTRIM(oQryVen1:nombre);
SIZE 5,.5 CM FONT oFont LASTROW nRow ALIGN "L"
@ nRow, .1 PRINT TO oPrn TEXT oQryVen1:cuit;
SIZE 5,.5 CM FONT oFont LASTROW nRow ALIGN "L"
@ nRow, .1 PRINT TO oPrn TEXT aIva[oQryVen1:coniva];
SIZE 5,.5 CM FONT oFont LASTROW nRow ALIGN "L"
@ nRow, .1 PRINT TO oPrn TEXT ALLTRIM(oQryVen1:direccion) + " " + ;
ALLTRIM(oQryVen1:localidad);
SIZE 5,.5 CM FONT oFont LASTROW nRow ALIGN "L"
ENDIF
@ nRow, 00 PRINT TO oPrn TEXT "Descripcion";
SIZE 2.5,.5 CM FONT oFont LASTROW nRow ALIGN "L"
@ nRow, 2.7 PRINT TO oPrn TEXT "Cant";
SIZE .9,.5 CM FONT oFont LASTROW nRow ALIGN "R"
@ nRow, 3.7 PRINT TO oPrn TEXT "Total";
SIZE 1,.5 CM FONT oFont LASTROW nRow ALIGN "R"
oQryDet1:GoTop()
FOR i = 1 TO oQryDet1:nRecCount
nRow1 := nRow
@ nRow1, 00 PRINT TO oPrn TEXT ALLTRIM(oQryDet1:detart);
SIZE 2.5,.5 CM FONT oFont LASTROW nRow ALIGN "L"
@ nRow1, 2.7 PRINT TO oPrn TEXT STR(oQryDet1:cantidad,06);
SIZE 0.9,.5 CM FONT oFont LASTROW nRow ALIGN "R"
@ nRow1, 3.7 PRINT TO oPrn TEXT IF(LEFT(cNumComp,1) <> "A",;
STR((oQryDet1:neton*1.21),9,2),;
STR(oQryDet1:neton,9,2));
SIZE 1,.5 CM FONT oFont LASTROW nRow ALIGN "R"
nSuma := nSuma + oQryDet1:importe
oQryDet1:Skip()
NEXT
IF LEFT(cNumComp,1)<>"A"
@ nRow, .1 PRINT TO oPrn TEXT "Total $ " + STR(oQryVen1:importe,10,2);
SIZE 5,.5 CM FONT oFont LASTROW nRow ALIGN "L"
ELSE
@ nRow, .1 PRINT TO oPrn TEXT "Subtotal $ " + STR(oQryVen1:neto,10,2);
SIZE 5,.5 CM FONT oFont LASTROW nRow ALIGN "L"
oQryIvaDet:GoTop()
FOR i = 1 TO oQryIvaDet:nRecCount
@ nRow, .1 PRINT TO oPrn TEXT "I.V.A. "+ALLTRIM(oQryIvaDet:nomiva) + " $:" +STR(oQryIvaDet:iva,10,2) ;
SIZE 5,.5 CM FONT oFont LASTROW nRow ALIGN "L"
NEXT
@ nRow, .1 PRINT TO oPrn TEXT "Total $:"+STR(oQryVen1:importe,10,2) ;
SIZE 5,.5 CM FONT oFont LASTROW nRow ALIGN "L"
ENDIF
@ nRow, .1 PRINT TO oPrn TEXT "CAE Nro:"+oQryVen1:cae ;
SIZE 5,.5 CM FONT oFont LASTROW nRow ALIGN "L"
@ nRow, .1 PRINT TO oPrn TEXT "Fecha Vto CAE:"+DTOC(oQryVen1:fecVto);
SIZE 5,.5 CM FONT oFont LASTROW nRow ALIGN "L"
IF oQryPar:emite_pie
@ nRow, .1 PRINT TO oPrn TEXT oQryPar:texto_pie;
SIZE 5,.5 CM FONT oFont3 LASTROW nRow ALIGN "L"
ENDIF
@ nRow,.1 PRINT TO oPrn TEXT ".";
SIZE 5,.5 CM FONT oFont LASTROW nRow ALIGN "L"
@ nRow,.4 PRINT TO oPrn IMAGE "FactQR.bmp" SIZE 2.5,2.5 CM NOTRANSPARENT;
LASTROW nRow
@ nRow,.1 PRINT TO oPrn TEXT "...";
SIZE 5,.5 CM FONT oFont LASTROW nRow ALIGN "L"
@ nRow,.1 PRINT TO oPrn TEXT "...";
SIZE 5,.5 CM FONT oFont LASTROW nRow ALIGN "L"
ENDPAGE
ENDPRINT