IGI Inflation Accounting : Cost Summary - draft

Description
Categories: BI Publisher, Financials
Application: Public Sector Financials International
Source: Inflation Accounting : Cost Summary Report (XML) - Not Supported: Reserved For Future Use
Short Name: IGIIACST_XML
DB package: IGI_IGIIACST_XMLP_PKG
SELECT BAL.COMPANY	COMP_CODE,	
              BAL.ACCOUNT	ACCOUNT,
              BAL.COST_CENTER	COST_CTR,
              DECODE(BAL.DATA_SOURCE, 'FA', 'Historic','IAC')       BALANCE_TYPE,
              BAL.DISPLAY_ORDER,
              NVL(SUM (DECODE (BAL.Source_Type_Code, 
	 	'BEGIN', NVL(BAL.Amount,0), NULL)), 0)                 BEGINNING,
              NVL(SUM(DECODE(BAL.Source_Type_Code,  
                         'ADDITION', NVL(BAL.Amount,0), NULL)), 0)                       ADDITION,
              NVL(SUM(DECODE(BAL.Source_Type_Code, 
                         'ADJUSTMENT',NVL(BAL.Amount,0), NULL)), 0)                 ADJUSTMENT,
              NVL(SUM(DECODE(BAL.Source_Type_Code, 
	           'RECLASS', NVL(BAL.Amount,0), NULL)), 0)                    RECLASS,
             NVL(SUM(DECODE(BAL.Source_Type_Code, 
                         'RETIREMENT',-NVL(BAL.Amount,0), NULL)), 0)                 RETIREMENT,	    
            NVL( SUM(DECODE(BAL.Source_Type_Code, 
	       'REVALUATION',NVL(BAL.Amount,0),NULL)), 0)                 REVALUATION,
             NVL(SUM(DECODE(BAL.Source_Type_Code, 
	           'TRANSFER', NVL(BAL.Amount,0), NULL)), 0)                 TRANSFER,
             NVL(SUM (DECODE (BAL.Source_Type_Code, 
	 	'END', NVL(BAL.Amount,0), NULL)), 0)	           ENDING, 
	--&D_COMP_CODE d_comp_code, 
	--&D_ACCOUNT d_account, 
	--&D_COST_CTR d_cost_ctr, 
	IGI_IGIIACST_XMLP_PKG.fa_beginningformula(DECODE ( BAL.DATA_SOURCE , 'FA' , 'Historic' , 'IAC' ), NVL ( SUM ( DECODE ( BAL.Source_Type_Code , 'BEGIN' , NVL ( BAL.Amount , 0 ) , NULL ) ) , 0 )) FA_BEGINNING, 
	IGI_IGIIACST_XMLP_PKG.fa_additionformula(DECODE ( BAL.DATA_SOURCE , 'FA' , 'Historic' , 'IAC' ), NVL ( SUM ( DECODE ( BAL.Source_Type_Code , 'ADDITION' , NVL ( BAL.Amount , 0 ) , NULL ) ) , 0 )) FA_ADDITION, 
	IGI_IGIIACST_XMLP_PKG.fa_adjustmentformula(DECODE ( BAL.DATA_SOURCE , 'FA' , 'Historic' , 'IAC' ), NVL ( SUM ( DECODE ( BAL.Source_Type_Code , 'ADJUSTMENT' , NVL ( BAL.Amount , 0 ) , NULL ) ) , 0 )) FA_ADJUSTMENT, 
	IGI_IGIIACST_XMLP_PKG.fa_reclassformula(DECODE ( BAL.DATA_SOURCE , 'FA' , 'Historic' , 'IAC' ), NVL ( SUM ( DECODE ( BAL.Source_Type_Code , 'RECLASS' , NVL ( BAL.Amount , 0 ) , NULL ) ) , 0 )) FA_RECLASS, 
	IGI_IGIIACST_XMLP_PKG.fa_retirementformula(DECODE ( BAL.DATA_SOURCE , 'FA' , 'Historic' , 'IAC' ), NVL ( SUM ( DECODE ( BAL.Source_Type_Code , 'RETIREMENT' , - NVL ( BAL.Amount , 0 ) , NULL ) ) , 0 )) FA_RETIREMENT, 
	IGI_IGIIACST_XMLP_PKG.fa_revaluationformula(DECODE ( BAL.DATA_SOURCE , 'FA' , 'Historic' , 'IAC' ), NVL ( SUM ( DECODE ( BAL.Source_Type_Code , 'REVALUATION' , NVL ( BAL.Amount , 0 ) , NULL ) ) , 0 )) FA_REVALUATION, 
	IGI_IGIIACST_XMLP_PKG.fa_transferformula(DECODE ( BAL.DATA_SOURCE , 'FA' , 'Historic' , 'IAC' ), NVL ( SUM ( DECODE ( BAL.Source_Type_Code , 'TRANSFER' , NVL ( BAL.Amount , 0 ) , NULL ) ) , 0 )) FA_TRANSFER, 
	IGI_IGIIACST_XMLP_PKG.fa_endingformula(DECODE ( BAL.DATA_SOURCE , 'FA' , 'Historic' , 'IAC' ), NVL ( SUM ( DECODE ( BAL.Source_Type_Code , 'END' , NVL ( BAL.Amount , 0 ) , NULL ) ) , 0 )) FA_ENDING, 
	IGI_IGIIACST_XMLP_PKG.iac_beginningformula(DECODE ( BAL.DATA_SOURCE , 'FA' , 'Historic' , 'IAC' ), NVL ( SUM ( DECODE ( BAL.Source_Type_Code , 'BEGIN' , NVL ( BAL.Amount , 0 ) , NULL ) ) , 0 )) IAC_BEGINNING, 
	IGI_IGIIACST_XMLP_PKG.iac_additionformula(DECODE ( BAL.DATA_SOURCE , 'FA' , 'Historic' , 'IAC' ), NVL ( SUM ( DECODE ( BAL.Source_Type_Code , 'ADDITION' , NVL ( BAL.Amount , 0 ) , NULL ) ) , 0 )) IAC_ADDITION, 
	IGI_IGIIACST_XMLP_PKG.iac_adjustmentformula(DECODE ( BAL.DATA_SOURCE , 'FA' , 'Historic' , 'IAC' ), NVL ( SUM ( DECODE ( BAL.Source_Type_Code , 'ADJUSTMENT' , NVL ( BAL.Amount , 0 ) , NULL ) ) , 0 )) IAC_ADJUSTMENT, 
	IGI_IGIIACST_XMLP_PKG.iac_reclassformula(DECODE ( BAL.DATA_SOURCE , 'FA' , 'Historic' , 'IAC' ), NVL ( SUM ( DECODE ( BAL.Source_Type_Code , 'RECLASS' , NVL ( BAL.Amount , 0 ) , NULL ) ) , 0 )) IAC_RECLASS, 
	IGI_IGIIACST_XMLP_PKG.iac_retirementformula(DECODE ( BAL.DATA_SOURCE , 'FA' , 'Historic' , 'IAC' ), NVL ( SUM ( DECODE ( BAL.Source_Type_Code , 'RETIREMENT' , - NVL ( BAL.Amount , 0 ) , NULL ) ) , 0 )) IAC_RETIREMENT, 
	IGI_IGIIACST_XMLP_PKG.iac_revaluationformula(DECODE ( BAL.DATA_SOURCE , 'FA' , 'Historic' , 'IAC' ), NVL ( SUM ( DECODE ( BAL.Source_Type_Code , 'REVALUATION' , NVL ( BAL.Amount , 0 ) , NULL ) ) , 0 )) IAC_REVALUATION, 
	IGI_IGIIACST_XMLP_PKG.iac_transferformula(DECODE ( BAL.DATA_SOURCE , 'FA' , 'Historic' , 'IAC' ), NVL ( SUM ( DECODE ( BAL.Source_Type_Code , 'TRANSFER' , NVL ( BAL.Amount , 0 ) , NULL ) ) , 0 )) IAC_TRANSFER, 
	IGI_IGIIACST_XMLP_PKG.iac_endingformula(DECODE ( BAL.DATA_SOURCE , 'FA' , 'Historic' , 'IAC' ), NVL ( SUM ( DECODE ( BAL.Source_Type_Code , 'END' , NVL ( BAL.Amount , 0 ) , NULL ) ) , 0 )) IAC_ENDING
FROM    IGI_IAC_BALANCES_REPORT BAL
WHERE   :DO_INSERT = 1
AND    BAL.COMPANY BETWEEN 
            NVL(:P_COMPANY1,  BAL.COMPANY)  AND
            NVL(:P_COMPANY2,  BAL.COMPANY) 
AND     BAL.COST_CENTER BETWEEN 
             NVL(:P_COST_CENTER1,  BAL.COST_CENTER)  AND
             NVL(:P_COST_CENTER2,  BAL.COST_CENTER)
AND     BAL.ACCOUNT BETWEEN 
             NVL(:P_ACCOUNT1,  BAL.ACCOUNT)  AND
             NVL(:P_ACCOUNT2,  BAL.ACCOUNT)
GROUP BY
	BAL.COMPANY,
	BAL.ACCOUNT,
                   BAL.COST_CENTER,
	BAL.DATA_SOURCE,
                   BAL.DISPLAY_ORDER
ORDER BY 1, 2, 3, 5
Parameter NameSQL textValidation
Acct Flex Structure
 
Number
Report Type
 
Account To
 
Account From
 
Cost Center To
 
Cost Center From
 
Company To
 
Company From
 
Period To
 
LOV Oracle
Period From
 
LOV Oracle
Book
 
LOV Oracle