¿Alguien sabe por qué?
- Code: Select all Expand view
*-------------------------------------------------------------------------------
Function ImprDiaEmit(cAlias,aTextos,aIva,aBases)
*-------------------------------------------------------------------------------
LOCAL oFont1, oFont2, oPen1, oPen2
Local oReport
Local nSele := SELECT()
DEFINE FONT oFont1 NAME "ARIAL" SIZE 0,-10
DEFINE FONT oFont2 NAME "ARIAL" SIZE 0,-9
DEFINE PEN oPen1 WIDTH 2 COLOR CLR_HGREEN
DEFINE PEN oPen2 WIDTH 1 COLOR CLR_HMAGENTA
dbSelectArea(cAlias)
(cAlias)->(dbGotop())
PrinterSetup()
REPORT oReport TITLE aTextos[1],"",aTextos[2],"" ;
FONT oFont1, oFont2 ;
PEN oPen1, oPen2 ;
HEADER "Fecha: "+dtoc(date()),"","Página:"+Str(oReport:nPage,3) RIGHT ;
PREVIEW
COLUMN TITLE "FACTURA" ;
DATA (cAlias)->NUMERO ;
PICTURE "999,999";
FONT 2 ;
GRID 2
COLUMN TITLE "FECHA" ;
DATA Dtoc((cAlias)->FECHA) ;
FONT 2 ;
GRID 2
COLUMN TITLE "CLIENTE" ;
DATA (cAlias)->NOMBRE ;
FONT 2 ;
GRID 2
COLUMN TITLE "CIF / NIF" ;
DATA (cAlias)->CIFNIF ;
FONT 2 ;
GRID 2
COLUMN TITLE "TIPO IVA" ;
DATA Str(aIva[(cAlias)->iva,1])+" + "+Str(aIva[(cAlias)->iva,2]) ;
FONT 2 ;
GRID 2
COLUMN TITLE "NETO " ;
DATA (cAlias)->BRUTO - ((cAlias)->IMPDTO + (cAlias)->IMPCENTR + (cAlias)->IMPRAPPEL + (cAlias)->IMPPTOPAGO);
PICTURE "999,999.99";
TOTAL;
FONT 2 ;
GRID 2
COLUMN TITLE "CUOTA IVA" ;
DATA (cAlias)->CUOTA ;
TOTAL ;
PICTURE "99,999.99";
FONT 2 ;
GRID 2
COLUMN TITLE "RECGO IVA" ;
DATA (cAlias)->RECARGO;
TOTAL ;
PICTURE "99,999.99";
FONT 2 ;
GRID 2
COLUMN TITLE "TOTAL " ;
DATA (cAlias)->total;
PICTURE "999,999.99";
TOTAL ;
FONT 2 ;
GRID 2
END REPORT
oReport:bPostEnd :={|| DatosFin( oReport, aBases ) }
ACTIVATE REPORT oReport
oFont1:End()
oFont2:End()
oPen1:End()
oPen2:End()
RETURN NIL
*-------------------------------------------------------------------------------
Function DatosFin(oReport,aBases)
*-------------------------------------------------------------------------------
oReport:lGrid := .f.
oReport:NewLine()
If oReport:NeedNewPage()
oReport:StartPage()
EndIF
oReport:lGrid := .f.
If aBases[1] <> 0
oReport:Say(5,"Base Imponible al 16 %"+" "+Transform(aBases[1],"999,999.99"))
oReport:NewLine()
EndIf
If aBases[2] <> 0
oReport:Say(5,"Base Imponible al 4 %"+" "+Transform(aBases[2],"999,999.99"))
oReport:NewLine()
EndIf
If aBases[3] <> 0
oReport:Say(5,"Base Imponible al 7 %"+" "+Transform(aBases[3],"999,999.99"))
oReport:NewLine()
EndIf
If aBases[4] <> 0
oReport:Say(5,"Base Imponible al 1 %"+" "+Transform(aBases[4],"999,999.99"))
oReport:NewLine()
EndIf
If aBases[5] <> 0
oReport:Say(5,"Base Imponible al 4 %"+" "+Transform(aBases[5],"999,999.99"))
oReport:NewLine()
EndIf
If aBases[6] <> 0
oReport:Say(5,"Base Imponible al 0,5 %"+" "+Transform(aBases[6],"999,999.99"))
oReport:NewLine()
EndIf
If aBases[7] <> 0
oReport:Say(5,"Base Imponible exenta"+" "+Transform(aBases[7],"999,999.99"))
EndIf
Return nil