Fa Register

You might also like

Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

select fa.ASSET_NUMBER ,fb.DATE_PLACED_IN_SERVICE ,fa.DESCRIPTION ,fa.SERIAL_NUMBER ,fb.ORIGINAL_COST ,fb.DEPRN_METHOD_CODE ,papf.FULL_NAME ,fa.TAG_NUMBER ,fl.SEGMENT1||'-'||fl.SEGMENT2 location ,fa.asset_id ,fb.

ADJUSTED_COST ,(select nvl(sum(nvl(DEPRN_AMOUNT,0)),0) from FA_DEPRN_DETAIL where asset_id=fa.ASSET_ID and period_counter<24145 --and trunc(DEPRN_RUN_DATE)<to_date(substr(:P_FROM_DATE,1,instr(:P_FROM_ DATE,' ')),'yyyy/mm/dd') ) dep_beg_per ,(select nvl(sum(nvl(DEPRN_AMOUNT,0)),0) from FA_DEPRN_DETAIL where asset_id=fa.ASSET_ID and period_counter between 24145 and 24148 --and trunc(DEPRN_RUN_DATE) between to_date(substr(:P_FROM_DATE,1,instr( :P_FROM_DATE,' ')),'yyyy/mm/dd') and to_date(substr(:P_TO_DATE,1,instr(:P_TO_DAT E,' ')),'yyyy/mm/dd') ) dep_dur_per ,(select nvl(sum(nvl(DEPRN_AMOUNT,0)),0) from FA_DEPRN_DETAIL where asset_id=fa.ASSET_ID and period_counter<=24148 --and trunc(DEPRN_RUN_DATE)<to_date(substr(:P_TO_DATE,1,instr(:P_TO_DATE ,' ')),'yyyy/mm/dd') ) dep_end_per from fa_additions fa ,fa_books fb ,fa_distribution_history fdh ,fa_locations fl ,per_all_people_f papf where fa.ASSET_ID=fb.ASSET_ID and fb.ASSET_ID=fdh.ASSET_ID and fdh.ASSIGNED_TO=papf.PERSON_ID(+) and fl.LOCATION_ID=fdh.LOCATION_ID and fb.DATE_INEFFECTIVE is null and fdh.DATE_INEFFECTIVE is null and trunc(sysdate) between nvl(papf.EFFECTIVE_START_DATE,trunc(sysdate)) and n vl(papf.EFFECTIVE_END_DATE,trunc(sysdate)) and fb.BOOK_TYPE_CODE='HHO ASSET BOOK'--:p_asset_book and fb.DATE_PLACED_IN_SERVICE between '01-APR-2011' AND '31-JUL-2011'--to_date (substr(:P_FROM_DATE,1,instr(:P_FROM_DATE,' ')),'yyyy/mm/dd') and to_date(substr (:P_TO_DATE,1,instr(:P_TO_DATE,' ')),'yyyy/mm/dd') and fa.ASSET_NUMBER between nvl(:p_from_asset,fa.ASSET_NUMBER) and nvl(:p_to_a sset,fa.ASSET_NUMBER)

You might also like