小说网站 搜小说 无限网 烟雨红尘 小说爱好者 免费小说 免费小说网站

固定资产

SELECT fa.asset_id 资产id,
       fa.asset_number ebs资产标签号,
       nvl(fa.tag_number, fa.asset_number) 资产编号,
       fa.serial_number 序列号,
       fa.description 资产名称,
       (SELECT fcb.concatenated_segments
          FROM fa_categories_b_kfv fcb
         WHERE fcb.category_id = fa.asset_category_id) 资产类别组合说明,
       (SELECT fak.concatenated_segments
          FROM fa_asset_keywords_kfv fak
         WHERE fak.code_combination_id = fa.asset_key_ccid) 资产关键字组合说明,
       fa.current_units 资产数量,
       fa.model_number 型号,
       (SELECT ffv.flex_value
          FROM fa_book_controls fbc, fa_books_v fbv, fnd_flex_values ffv
         WHERE ffv.flex_value_set_id IN
               (SELECT flex_value_set_id
                  FROM fnd_flex_value_sets
                 WHERE flex_value_set_name = 'BZ_COMPANY')
           AND ffv.value_category = 'BZ_COMPANY'
           AND ffv.attribute3 = fbv.book_type_code
           AND fbv.book_type_code = fbc.book_type_code
           AND fbv.asset_id = fa.asset_id) 公司代码,
       fbv.cost 资产成本金额,
       fbv.salvage_value 残值,
       fbv.depreciate_flag 是否折旧,
       cux_fa_public_pkg.get_ltd_deprn(p_asset_id          => fa.asset_id,
                                       p_book_type_code    => fbv.book_type_code,
                                       p_rate_source_rule  => NULL,
                                       p_dist_id           => 0,
                                       p_period_ctr        => 0,
                                       p_mrc_sob_type_code => 'N',
                                       p_set_of_books_id   => fbc.set_of_books_id) 累计折旧,
       fbv.date_placed_in_service 资产启用日期,
       to_date(fa.attribute5, 'YYYY-MM-DD') 期初日期
  FROM fa_additions_v fa, fa_books_v fbv, fa_book_controls fbc
 WHERE fa.asset_id = fbv.asset_id
   AND fbv.book_type_code = fbc.book_type_code;

posted on 2014-02-22 21:02  王小航  阅读(245)  评论(0编辑  收藏  举报

导航