DEFINE FONT oFont NAME "Times New Roman" SIZE 0, 96 bold OF oPrn
DEFINE FONT oFont1 NAME "Times New Roman" SIZE 0, 96 OF oPrn
DEFINE FONT oFont2 NAME "Times New Roman" SIZE 0, 72 OF oPrn
DEFINE FONT oFont3 NAME "Times New Roman" SIZE 0, 48 BOLD OF oPrn
DEFINE FONT oFont4 NAME "Times New Roman" SIZE 0, 120 BOLD OF oPrn
SetPrintDefault( AllTrim( oApp:imppdf ) )
PRINTER oPrn PREVIEW
oPrn:cdocument := aElectro:cnombre
PAGE
oPrn:ImportWMF( iif( lfacturab,"facturaB.emf","facturaA.emf" ) )
oPrn:CmSay( 0.85, 12.2, cTitu,oFont4,, RGB( 11,41,90 ) )
oPrn:CmSay( 1.03, 11.08, ( "Cod. " + cCod ), oFont3,, RGB( 11,41,90 ) )
oPrn:Cmsay( 1.3, 12.2, ( "Nº " + cNrofactu ),oFont4,, RGB( 11,41,90 ) )
oPrn:Cmsay( 2.1, 12.2, ( "FECHA: " + AllTrim(Transform(dfec,"@D" ) ) ), oFont,, RGB( 11,41,90 ) )
oPrn:CmSay( 4.35, 4.2, AllTrim( aCliente:napea ), oFont,, RGB( 0,0,0 ) )
oPrn:CmSay( 4.35, 17.2, valstr( aCliente:nclia ), oFont )
oPrn:CmSay( 4.75, 4.2, aCliente:domia,oFont )
oPrn:CmSay( 4.75, 17.2, valstr( aCliente:vendedor ), oFont )
oPrn:CmSay( 5.15, 4.2, ( '(' + Str(aCliente:postal ) + ')-' + cDireccion ),oFont )
oPrn:CmSay( 5.55, 4.2, aCliente:cuita, oFont )
oPrn:Cmsay( 5.95, 4.2, aCliente:ivaa,oFont )
linea := 8.2
FOR z = 1 TO Len( aDet )
oPrn:Cmsay( linea, 1.9,Upper( aDet[ z,1 ] ), oFont1 ) //detalle
IF !Empty( aDet[ z, 2 ] )
nPrecio := aDet[ z, 2 ]
IF !lmoneda
nPrecio := div_zero( aDet[ z, 2 ], ndolares )
ENDIF
oPrn:Cmsay( linea, 19.2, Transform( nPrecio,"@e 999,999.99" ), oFont1,,,, 2 )
ENDIF
linea += .4
NEXT
if !nc //si es nota de débito
IF !Empty( aElectro:cdato )
linea += .6
nlin := MLCount( aElectro:cdato, nLongl, ntab, .T. )
FOR z = 1 TO nlin
oPrn:Cmsay( linea, 3.8, MemoLine( aElectro:cdato,nLongl,z,nlinact,, .T. ), oFont1 )
linea += .4
NEXT
ENDIF
endif
linea += .6
oPrn:Cmsay( linea, 3.8,("Afecta Factura " + aElectro:cFacasoc + " del " + aElectro:dfacasoc ),oFont1)
if oApp:lresol2226 .and. Date() <= oApp:resiva2 .and. !nc //exencion de percepciones y retenciones de IVA
impresol2226(oPrn, oFont, linea)
endif
// @ numtopixel(19.4), numtopixel(2.2) PRINT TO oPrn IMAGE ALLTRIM(oimage) SIZE 500, 500
oPrn:Cmsay( 16.8, 14.5, "Subtotal :", oFont1 )
oPrn:Cmsay( 16.8,17.2, iif(!lmoneda,"USD","$"), oFont1,,,, 2)
oPrn:Cmsay( 16.8, 19.2, Transform( (aElectro:nsubtotal ),"@e 999,999.99" ), oFont1,,,, 2 )
IF !lfacturab
oPrn:Cmsay( 17.4, 14.5, "IVA :", oFont1 )
oPrn:Cmsay( 17.4,17.2, iif(!lmoneda,"USD","$"), oFont1,,,, 2)
oPrn:Cmsay( 17.4, 19.2, Transform( (aElectro:ntiva ),"@e 999,999.99" ), oFont1,,,, 2 )
endif //si es factura B
IF !Empty( aElectro:nibrucap )
oPrn:Cmsay( 18.2, 14.5, ( "I.B. Cap." + AllTrim(Transform(nPorcap,"@e 99.99" ) ) + "%" ), oFont1 )
oPrn:Cmsay( 18.2,17.2, iif(!lmoneda,"USD","$"), oFont1,,,, 2)
oPrn:Cmsay( 18.2, 19.2, Transform( (aElectro:nibrucap ),"@e 999,999.99" ), oFont1,,,, 2 )
ENDIF
IF !Empty( aElectro:nIbru )
oPrn:Cmsay( 18.6, 14.5, ( "Per IBBA" + AllTrim(Transform(aCliente:percibe,"@e 99.99" ) ) + "%" ), oFont1 )
oPrn:Cmsay( 18.6,17.2, iif(!lmoneda,"USD","$"), oFont1,,,, 2)
oPrn:Cmsay( 18.6, 19.2, Transform( aElectro:nIbru,"@e 999,999.99" ), oFont1,,,, 2 )
ENDIF
@ 19.2, 2.2 PRINT TO oPrn IMAGE AllTrim(&oQR) SIZE 2.3, 2.3 CM
oPrn:Cmsay( 20.5, 5.4, ( "CAE " + aElectro:cCae + Space(5 ) + "Vencimiento: " + aElectro:cVto ), oFont )
// @ 20.5, 2.2 CM_INT25 AllTrim( aElectro:cCodbar ) of oPrn SIZE .8
oPrn:Cmsay( 21,17.2, iif(!lmoneda,"USD","$"), oFont1,,,, 2)
oPrn:Cmsay( 21, 19.1, Transform( aElectro:ntotal,"@e 999,999.99" ), oFont1,,,, 2 )
/* oPrn:Cmsay( 21.25, 6.2, AllTrim( aElectro:cCodbar ), oFont1,,,, 2 )
oPrn:Cmsay( 21.7, 2.2, ( "ORIGINAL CAE " + aElectro:cCae + Space(5 ) + "Vencimiento: " + aElectro:cVto ),oFont )
*/
ENDPAGE
ENDPRINT
oFont:End()
oFont1:end()
oFont2:end()
oFont3:end()
oFont4:end()
IF !lreprint
nbut[ 6 ]:disable()
nbut[ 10 ]:enable()
ENDIF
RETURN NIL