FUNCTION FA_GET_DEPRN(P_ASSET_ID IN NUMBER,
P_BOOK IN VARCHAR2,
P_TYPE IN VARCHAR2) RETURN NUMBER IS
V_LTD_DEPRN NUMBER;
DUMMY_NUM NUMBER;
IMPAIRMENT_RESERVE NUMBER;
YTD_IMPAIRMENT NUMBER;
DUMMY_BOOL BOOLEAN;
DUMMY_CHAR VARCHAR2(400);
REVAL_RSV NUMBER;
YTD_DEPRN NUMBER;
YTD_PRODUCTION VARCHAR2(400);
LTD_PRODUCTION VARCHAR2(400);
BEGIN
FA_QUERY_BALANCES_PKG.QUERY_BALANCES(X_ASSET_ID => P_ASSET_ID,
X_BOOK => P_BOOK,
X_PERIOD_CTR => 0,
X_DIST_ID => 0,
X_RUN_MODE => 'STANDARD',
X_COST => DUMMY_NUM,
X_DEPRN_RSV => V_LTD_DEPRN ---
,
X_REVAL_RSV => REVAL_RSV,
X_YTD_DEPRN => YTD_DEPRN,
X_YTD_REVAL_EXP => DUMMY_NUM,
X_REVAL_DEPRN_EXP => DUMMY_NUM,
X_DEPRN_EXP => DUMMY_NUM,
X_REVAL_AMO => DUMMY_NUM,
X_PROD => DUMMY_NUM,
X_YTD_PROD => YTD_PRODUCTION,
X_LTD_PROD => LTD_PRODUCTION,
X_ADJ_COST => DUMMY_NUM,
X_REVAL_AMO_BASIS => DUMMY_NUM,
X_BONUS_RATE => DUMMY_NUM,
X_DEPRN_SOURCE_CODE => DUMMY_CHAR,
X_ADJUSTED_FLAG => DUMMY_BOOL,
X_TRANSACTION_HEADER_ID => -1,
X_BONUS_DEPRN_RSV => DUMMY_NUM,
X_BONUS_YTD_DEPRN => DUMMY_NUM,
X_BONUS_DEPRN_AMOUNT => DUMMY_NUM,
X_IMPAIRMENT_RSV => IMPAIRMENT_RESERVE,
X_YTD_IMPAIRMENT => YTD_IMPAIRMENT,
X_IMPAIRMENT_AMOUNT => DUMMY_NUM,
-- RER12
X_CAPITAL_ADJUSTMENT => DUMMY_NUM,
X_GENERAL_FUND => DUMMY_NUM,
X_MRC_SOB_TYPE_CODE => 'P',
X_SET_OF_BOOKS_ID => NULL,
P_LOG_LEVEL_REC => NULL
-- End RER12
);
IF P_TYPE = 'LTD_DEPR' THEN
RETURN(V_LTD_DEPRN);
ELSIF P_TYPE = 'YTD_DEPRN' THEN
RETURN(YTD_DEPRN);
ELSE
RETURN NULL;
END IF;
END FA_GET_DEPRN;
EBS取资产折旧金额的函数
最新推荐文章于 2024-03-15 10:45:25 发布