1、功能概述功能列表11.1 使用的数据对象本报表使用到的数据对象:序号基表(视图)SELECTUPDATEINSERTDELETE是否为新建对象10YN2011.2 参数设计主要的用户参数:参数数据类型描述其它属性P1VARCHAR2系统使用P2P_BOOK_TYPE_CODE帐套P_PERIOD_NAME会计期间11.3 内容设计列 名列 描 述显示特征1资产编码2资产大类3资产小类4部门5标签号6资产序列号7资产名称8型号9使用人存放地点11资产原值12累计折旧13本月折旧14残值15年限16启用日期17本年折旧18备注11.4 屏幕设计11.5 报表逻辑(含触发器)11.6 报表SQL-
2、资产余额报表 PROCEDURE jt_asset_balance_rp(p1 IN VARCHAR2, - 系统使用 p2 IN VARCHAR2, - 系统使用 p_book_type_code IN VARCHAR2, - 资产账簿 p_period_name IN VARCHAR2) - 截止会计期间 IS -下面两个变量,为系统使用,是固定名称,不需修改。 v_sep VARCHAR2(15); -字符串之间的分隔符号,默认为逗号“,” v_line_str VARCHAR2(4000); -输出的字符串,不同的字段之间, -使用V_SEP变量表示的分隔符号进行分隔 v_dist_b
3、ook VARCHAR2(15); - distribution_source_book d_ucd DATE; - period_close_date n_upc NUMBER; - period_counter d_tod DATE; - MIN(dp_fy.period_open_date) n_tpc NUMBER; - MIN(dp_fy.period_counter) CURSOR c1(p_dist_book IN VARCHAR2, p_ucd IN DATE, p_upc IN NUMBER, p_tod IN DATE, p_tpc IN NUMBER) IS SELECT
4、 dh.asset_id asset_id, - 资产ID ad.asset_number asset_number, -资产编码 ad.description asset_desc, -资产描述 fl.meaning asset_type, -资产种类 ca.segment1 main_category, -资产大类(10.7适用) ca.segment2 sub_category, -资产小类(10.7适用) ad.tag_number, - 资产标签 ad.serial_number, - 序列号 -gcc.segment2 dept, jt_finance_rep_pkg.get_de
5、pt_name(gcc.segment2, MD_XWJ _CC) dept, -部门 ad.model_number, -型号 decode(dh.assigned_to, NULL, NULL, REPLACE(fe.NAME, , ) user_name, -使用人 flk.concatenated_segments location, - gcc.segment3 , - 会计科目 gcc.concatenated_segments,- books.original_cost original_cost, - round(books.cost * (dh.units_assigned/
6、ad.CURRENT_UNITS),4) original_cost, - decode(th.transaction_type_code, NULL, dh.units_assigned) units_assigned, -数量 -cb.asset_cost_acct account_code, - -gcc.code_combination_id, - 会计科目ID -dh.code_combination_id dh_code_combination_id, books.life_in_months / 12 life, -折旧年限 dd.cost current_cost, -资产现值
7、 books.salvage_value, -残值 dd.deprn_amount deprn_amount, - 本月折旧 to_char(books.date_placed_in_service, yyyy-mm-dd) date_placed_in_service, -启用日期 decode(sign(p_tpc - dd.period_counter), 1, 0, dd.ytd_deprn) ytd_deprn, -本年累计折旧 dd.deprn_reserve deprn_reserve -累计折旧 -cb.book_type_code, -ca.category_id, -dec
8、ode(th.transaction_type_code ,NULL,dh.units_assigned / ah.units * 100) percent FROM fa_deprn_detail dd, fa_asset_history ah, fa_transaction_headers th, fa_transaction_headers th_rt, fa_books books, fa_distribution_history dh, fa_category_books cb, fa_locations_kfv flk, fa_employees fe, fa_additions
9、ad, fa_lookups fl, - 取资产种类 fa_categories ca, - 取资产大类/小类 gl_code_combinations_kfv gcc - 部门 WHERE cb.book_type_code = p_book_type_code -XWJ.资产帐簿-:p_fa_book AND cb.category_id = ah.category_id AND ah.asset_id = dh.asset_id AND ah.date_effective = nvl(th.date_effective, p_ucd) AND ah.asset_type = CAPITA
10、LIZED - 资本化 AND dd.book_type_code = p_book_type_code - -: AND dd.distribution_id = dh.distribution_id AND dd.period_counter = (SELECT MAX(dd_sub.period_counter) FROM fa_deprn_detail dd_sub WHERE dd_sub.book_type_code = p_book_type_code - AND dd_sub.asset_id = dh.asset_id AND dd_sub.distribution_id =
11、 dh.distribution_id - AND dd_sub.period_counter = p_tpc AND books.date_effective AND th.book_type_code(+) = p_dist_book AND th.transaction_header_id(+) = dh.transaction_header_id_out AND th.date_effective(+) BETWEEN p_tod AND p_ucd AND dh.book_type_code = p_dist_book AND dh.date_effective p_tod AND ad.asset_id = dh.asset_id AND fl.lookup_type = ASSET TYPE AND fl.lookup_code = ad.asset_type AND cb.category_id = ca.category_id AND cb.asset_cost_account_ccid = gcc.code_combination_id AND flk.location_id(+) = dh.location_
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1