EBS取资产折旧金额的函数

 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;
 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值