IGI Inflation Accounting : Revaluation Reserve Summary - draft

Description
Categories: BI Publisher, Financials
Application: Public Sector Financials International
Source: Inflation Accounting : Revaluation Reserve Summary Report (XML) - Not Supported: Reserved For Future Use
Short Name: IGIIARRV_XML
DB package: IGI_IGIIARRV_XMLP_PKG
SELECT 
	BAL.COMPANY	COMP_CODE,	
	BAL.ACCOUNT	ACCOUNT,
	BAL.COST_CENTER	COST_CTR,
	BAL.DATA_SOURCE       BALANCE_TYPE,
	BAL.DISPLAY_ORDER    DISPLAY_ORDER,
	NVL(SUM (DECODE (BAL.Source_Type_Code, 
		'BEGIN', NVL(BAL.Amount,0), NULL)), 0)		BEGINNING,
	SUM(DECODE(BAL.Source_Type_Code,  
		'ADDITION', NVL(BAL.Amount,0), NULL)) 		ADDITION,
	SUM(DECODE(BAL.Source_Type_Code,  
		'DEPRECIATION', NVL(BAL.Amount,0), NULL)) 	DEPRECIATION,
	SUM(DECODE(BAL.Source_Type_Code, 
		'ADJUSTMENT',NVL(BAL.Amount,0), NULL)) 	ADJUSTMENT,
	SUM(DECODE(BAL.Source_Type_Code, 
		'RECLASS', NVL(BAL.Amount,0), NULL)) 		RECLASS,
	SUM(DECODE(BAL.Source_Type_Code, 
		'RETIREMENT',-NVL(BAL.Amount,0), NULL)) 	RETIREMENT,
	SUM(DECODE(BAL.Source_Type_Code, 
		'REVALUATION',NVL(BAL.Amount,0),
                                     'DEPRECIATION',NVL(BAL.Amount,0), NULL)) 	REVALUATION,
	SUM(DECODE(BAL.Source_Type_Code, 
		'TRANSFER', NVL(BAL.Amount,0), NULL)) 		TRANSFER,
	NVL(SUM (DECODE (BAL.Source_Type_Code, 
		'END', NVL(BAL.Amount,0), NULL)), 0)		ENDING, 
	IGI_IGIIARRV_XMLP_PKG.cost_beginningformula(BAL.DATA_SOURCE, NVL ( SUM ( DECODE ( BAL.Source_Type_Code , 'BEGIN' , NVL ( BAL.Amount , 0 ) , NULL ) ) , 0 )) COST_BEGINNING, 
	IGI_IGIIARRV_XMLP_PKG.cost_additionformula(BAL.DATA_SOURCE, SUM ( DECODE ( BAL.Source_Type_Code , 'ADDITION' , NVL ( BAL.Amount , 0 ) , NULL ) )) COST_ADDITION, 
	IGI_IGIIARRV_XMLP_PKG.cost_depreciationformula(BAL.DATA_SOURCE, SUM ( DECODE ( BAL.Source_Type_Code , 'DEPRECIATION' , NVL ( BAL.Amount , 0 ) , NULL ) )) COST_DEPRECIATION, 
	IGI_IGIIARRV_XMLP_PKG.cost_adjustmentformula(BAL.DATA_SOURCE, SUM ( DECODE ( BAL.Source_Type_Code , 'ADJUSTMENT' , NVL ( BAL.Amount , 0 ) , NULL ) )) COST_ADJUSTMENT, 
	IGI_IGIIARRV_XMLP_PKG.cost_retirementformula(BAL.DATA_SOURCE, SUM ( DECODE ( BAL.Source_Type_Code , 'RETIREMENT' , - NVL ( BAL.Amount , 0 ) , NULL ) )) COST_RETIREMENT, 
	IGI_IGIIARRV_XMLP_PKG.cost_revaluationformula(BAL.DATA_SOURCE, SUM ( DECODE ( BAL.Source_Type_Code , 'REVALUATION' , NVL ( BAL.Amount , 0 ) , 'DEPRECIATION' , NVL ( BAL.Amount , 0 ) , NULL ) )) COST_REVALUATION, 
	IGI_IGIIARRV_XMLP_PKG.cost_reclassformula(BAL.DATA_SOURCE, SUM ( DECODE ( BAL.Source_Type_Code , 'RECLASS' , NVL ( BAL.Amount , 0 ) , NULL ) )) COST_RECLASS, 
	IGI_IGIIARRV_XMLP_PKG.cost_transferformula(BAL.DATA_SOURCE, SUM ( DECODE ( BAL.Source_Type_Code , 'TRANSFER' , NVL ( BAL.Amount , 0 ) , NULL ) )) COST_TRANSFER, 
	IGI_IGIIARRV_XMLP_PKG.cost_endingformula(BAL.DATA_SOURCE, NVL ( SUM ( DECODE ( BAL.Source_Type_Code , 'END' , NVL ( BAL.Amount , 0 ) , NULL ) ) , 0 )) COST_ENDING, 
	IGI_IGIIARRV_XMLP_PKG.gfund_beginningformula(BAL.DATA_SOURCE, NVL ( SUM ( DECODE ( BAL.Source_Type_Code , 'BEGIN' , NVL ( BAL.Amount , 0 ) , NULL ) ) , 0 )) GFUND_BEGINNING, 
	IGI_IGIIARRV_XMLP_PKG.gfund_additionformula(BAL.DATA_SOURCE, SUM ( DECODE ( BAL.Source_Type_Code , 'ADDITION' , NVL ( BAL.Amount , 0 ) , NULL ) )) GFUND_ADDITION, 
	IGI_IGIIARRV_XMLP_PKG.gfund_depreciationformula(BAL.DATA_SOURCE, SUM ( DECODE ( BAL.Source_Type_Code , 'DEPRECIATION' , NVL ( BAL.Amount , 0 ) , NULL ) )) GFUND_DEPRECIATION, 
	IGI_IGIIARRV_XMLP_PKG.gfund_adjustmentformula(BAL.DATA_SOURCE, SUM ( DECODE ( BAL.Source_Type_Code , 'ADJUSTMENT' , NVL ( BAL.Amount , 0 ) , NULL ) )) GFUND_ADJUSTMENT, 
	IGI_IGIIARRV_XMLP_PKG.gfund_retirementformula(BAL.DATA_SOURCE, SUM ( DECODE ( BAL.Source_Type_Code , 'RETIREMENT' , - NVL ( BAL.Amount , 0 ) , NULL ) )) GFUND_RETIREMENT, 
	IGI_IGIIARRV_XMLP_PKG.gfund_revaluationformula(BAL.DATA_SOURCE, SUM ( DECODE ( BAL.Source_Type_Code , 'REVALUATION' , NVL ( BAL.Amount , 0 ) , 'DEPRECIATION' , NVL ( BAL.Amount , 0 ) , NULL ) )) GFUND_REVALUATION, 
	IGI_IGIIARRV_XMLP_PKG.gfund_reclassformula(BAL.DATA_SOURCE, SUM ( DECODE ( BAL.Source_Type_Code , 'RECLASS' , NVL ( BAL.Amount , 0 ) , NULL ) )) GFUND_RECLASS, 
	IGI_IGIIARRV_XMLP_PKG.gfund_transferformula(BAL.DATA_SOURCE, SUM ( DECODE ( BAL.Source_Type_Code , 'TRANSFER' , NVL ( BAL.Amount , 0 ) , NULL ) )) GFUND_TRANSFER, 
	IGI_IGIIARRV_XMLP_PKG.gfund_endingformula(BAL.DATA_SOURCE, NVL ( SUM ( DECODE ( BAL.Source_Type_Code , 'END' , NVL ( BAL.Amount , 0 ) , NULL ) ) , 0 )) GFUND_ENDING, 
	IGI_IGIIARRV_XMLP_PKG.blog_beginningformula(BAL.DATA_SOURCE, NVL ( SUM ( DECODE ( BAL.Source_Type_Code , 'BEGIN' , NVL ( BAL.Amount , 0 ) , NULL ) ) , 0 )) BLOG_BEGINNING, 
	IGI_IGIIARRV_XMLP_PKG.blog_additionformula(BAL.DATA_SOURCE, SUM ( DECODE ( BAL.Source_Type_Code , 'ADDITION' , NVL ( BAL.Amount , 0 ) , NULL ) )) BLOG_ADDITION, 
	IGI_IGIIARRV_XMLP_PKG.blog_depreciationformula(BAL.DATA_SOURCE, SUM ( DECODE ( BAL.Source_Type_Code , 'DEPRECIATION' , NVL ( BAL.Amount , 0 ) , NULL ) )) BLOG_DEPRECIATION, 
	IGI_IGIIARRV_XMLP_PKG.blog_adjustmentformula(BAL.DATA_SOURCE, SUM ( DECODE ( BAL.Source_Type_Code , 'ADJUSTMENT' , NVL ( BAL.Amount , 0 ) , NULL ) )) BLOG_ADJUSTMENT, 
	IGI_IGIIARRV_XMLP_PKG.blog_retirementformula(BAL.DATA_SOURCE, SUM ( DECODE ( BAL.Source_Type_Code , 'RETIREMENT' , - NVL ( BAL.Amount , 0 ) , NULL ) )) BLOG_RETIREMENT, 
	IGI_IGIIARRV_XMLP_PKG.blog_revaluationformula(BAL.DATA_SOURCE, SUM ( DECODE ( BAL.Source_Type_Code , 'REVALUATION' , NVL ( BAL.Amount , 0 ) , 'DEPRECIATION' , NVL ( BAL.Amount , 0 ) , NULL ) )) BLOG_REVALUATION, 
	IGI_IGIIARRV_XMLP_PKG.blog_reclassformula(BAL.DATA_SOURCE, SUM ( DECODE ( BAL.Source_Type_Code , 'RECLASS' , NVL ( BAL.Amount , 0 ) , NULL ) )) BLOG_RECLASS, 
	IGI_IGIIARRV_XMLP_PKG.blog_transferformula(BAL.DATA_SOURCE, SUM ( DECODE ( BAL.Source_Type_Code , 'TRANSFER' , NVL ( BAL.Amount , 0 ) , NULL ) )) BLOG_TRANSFER, 
	IGI_IGIIARRV_XMLP_PKG.blog_endingformula(BAL.DATA_SOURCE, NVL ( SUM ( DECODE ( BAL.Source_Type_Code , 'END' , NVL ( BAL.Amount , 0 ) , NULL ) ) , 0 )) BLOG_ENDING, 
	IGI_IGIIARRV_XMLP_PKG.net_beginningformula(BAL.DATA_SOURCE, NVL ( SUM ( DECODE ( BAL.Source_Type_Code , 'BEGIN' , NVL ( BAL.Amount , 0 ) , NULL ) ) , 0 )) NET_BEGINNING, 
	IGI_IGIIARRV_XMLP_PKG.net_additionformula(BAL.DATA_SOURCE, SUM ( DECODE ( BAL.Source_Type_Code , 'ADDITION' , NVL ( BAL.Amount , 0 ) , NULL ) )) NET_ADDITION, 
	IGI_IGIIARRV_XMLP_PKG.net_depreciationformula(BAL.DATA_SOURCE, SUM ( DECODE ( BAL.Source_Type_Code , 'DEPRECIATION' , NVL ( BAL.Amount , 0 ) , NULL ) )) NET_DEPRECIATION, 
	IGI_IGIIARRV_XMLP_PKG.net_adjustmentformula(BAL.DATA_SOURCE, SUM ( DECODE ( BAL.Source_Type_Code , 'ADJUSTMENT' , NVL ( BAL.Amount , 0 ) , NULL ) )) NET_ADJUSTMENT, 
	IGI_IGIIARRV_XMLP_PKG.net_retirementformula(BAL.DATA_SOURCE, SUM ( DECODE ( BAL.Source_Type_Code , 'RETIREMENT' , - NVL ( BAL.Amount , 0 ) , NULL ) )) NET_RETIREMENT, 
	IGI_IGIIARRV_XMLP_PKG.net_revaluationformula(BAL.DATA_SOURCE, SUM ( DECODE ( BAL.Source_Type_Code , 'REVALUATION' , NVL ( BAL.Amount , 0 ) , 'DEPRECIATION' , NVL ( BAL.Amount , 0 ) , NULL ) )) NET_REVALUATION, 
	IGI_IGIIARRV_XMLP_PKG.net_reclassformula(BAL.DATA_SOURCE, SUM ( DECODE ( BAL.Source_Type_Code , 'RECLASS' , NVL ( BAL.Amount , 0 ) , NULL ) )) NET_RECLASS, 
	IGI_IGIIARRV_XMLP_PKG.net_transferformula(BAL.DATA_SOURCE, SUM ( DECODE ( BAL.Source_Type_Code , 'TRANSFER' , NVL ( BAL.Amount , 0 ) , NULL ) )) NET_TRANSFER, 
	IGI_IGIIARRV_XMLP_PKG.net_endingformula(BAL.DATA_SOURCE, NVL ( SUM ( DECODE ( BAL.Source_Type_Code , 'END' , NVL ( BAL.Amount , 0 ) , NULL ) ) , 0 )) NET_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 Name SQL text Validation
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