FA Property Tax - draft

Description
Categories: BI Publisher
Application: Assets
Source: Property Tax Report (XML) - Not Supported: Reserved For Future Use
Short Name: FAS460_XML
DB package: FA_FAS460_XMLP_PKG
SELECT  null LOCATION, 
 null COMPANY,
 cb.asset_cost_acct       account,
 to_char(bk.date_placed_in_service, 'YYYY')  year,
 ad.asset_number asset,
 ad.description  descr,
 lpad(to_char(sum(di.units_assigned)),6)  units,
 bk.date_placed_in_service       date_installed,
 round(sum(bk.cost * 
 (di.units_assigned/ah.units)),:precision) orig_cost, 
	fnd_flex_xml_publisher_apis.process_kff_combination_1('company_dsp', 'SQLGL', 'GL#', COMCC.CHART_OF_ACCOUNTS_ID, NULL, COMCC.CODE_COMBINATION_ID, 'GL_BALANCING', 'Y', 'VALUE') COMPANY_DSP, 
	fnd_flex_xml_publisher_apis.process_kff_combination_1('d_location', 'OFA', 'LOC#', 101, NULL, LO.LOCATION_ID, 'ALL', 'Y', 'VALUE') D_LOCATION
FROM fa_system_controls sc,
     fa_locations lo,   
     fa_books     bk,
     fa_asset_history ah,
     fa_additions ad,
     fa_distribution_history  di,
     gl_Code_combinations   comcc,
     fa_category_books        cb,
     fa_book_controls         bc
WHERE
 &LOC_FLEX_WHERE                    AND
 :P_END_DATE_ACQ between bk.date_effective and nvl(bk.date_ineffective,sysdate) AND
 bk.book_type_code = :P_BOOK AND
 bk.asset_id = ad.asset_id
and nvl(bk.period_counter_fully_retired,:P_Per_Ctr+1) >= :P_Per_Ctr
and AD.OWNED_LEASED = 'OWNED'
AND
 :P_END_DATE_ACQ between ah.date_effective and nvl(ah.date_ineffective,sysdate) AND
 ah.asset_id = ad.asset_id AND
 ah.category_id = cb.category_id