DBA Data[Home] [Help]

APPS.FA_ASSET_VAL_PVT dependencies on FA_BOOKS

Line 917: from fa_books

913:
914: -- Validate that asset does not already exist in book.
915: select count(*)
916: into l_exists
917: from fa_books
918: where book_type_code = p_book_type_code
919: and asset_id = p_asset_id
920: and rownum <= 1;
921:

Line 939: from fa_books bks

935: if (fa_cache_pkg.fazcbc_record.book_class <> 'CORPORATE') then
936:
937: select count(*)
938: into l_exists
939: from fa_books bks
940: where exists
941: (
942: select 'X'
943: from fa_book_controls bc

Line 960: from fa_books

956: else
957: -- for non-addition trxs verify asset does exist in book
958: select count(*)
959: into l_exists
960: from fa_books
961: where book_type_code = p_book_type_code
962: and asset_id = p_asset_id
963: and rownum <= 1;
964:

Line 1001: from fa_books

997:
998: -- Retrieve the Date placed in service for the asset
999: select date_placed_in_service
1000: into l_dpis
1001: from fa_books
1002: where book_type_code = p_asset_hdr_rec.book_type_code
1003: and asset_id = p_asset_hdr_rec.asset_id
1004: and transaction_header_id_out is null;
1005:

Line 1275: if ((p_calling_fn in ('faxasset.fa_books_val2.dpis_val',

1271: * place this in form, etc if we wish to keep it there. --bmr
1272: */
1273:
1274: -- Fix for Bug #2621438. Only validate this from FAXASSET
1275: if ((p_calling_fn in ('faxasset.fa_books_val2.dpis_val',
1276: 'faxasset.fa_addition_books.date_placed_in_service')
1277: or (p_calling_interface = 'FAMAPT') )
1278: ) then
1279:

Line 1487: -- ytd, ltd deprn validations from fa_books_trx3.when_validate_record

1483: return FALSE;
1484: end if;
1485:
1486:
1487: -- ytd, ltd deprn validations from fa_books_trx3.when_validate_record
1488: -- in FAXASSET.
1489:
1490: -- Bug 7229863: Validation for preventing ytd/reserve change
1491: -- if the asset is not backdated

Line 2474: from fa_books bk

2470: /*Bug#10012899 - Modified both the queries to sync with validation in Asset workbench */
2471: if p_extended_flag then
2472: select count(1)
2473: into l_count
2474: from fa_books bk
2475: where bk.book_type_code= p_book
2476: and bk.asset_id= p_asset_id
2477: and (bk.rate_Adjustment_factor <> 1 OR
2478: (bk.rate_adjustment_factor = 1 and

Line 2498: from fa_books bk

2494: and th2.transaction_key = 'ES'))));
2495: else
2496: select count(*)
2497: into l_count
2498: from fa_books bk
2499: where bk.book_type_code= p_book
2500: and bk.asset_id= p_asset_id
2501: and (bk.rate_Adjustment_factor <> 1 OR
2502: (bk.rate_adjustment_factor = 1 and

Line 2554: from fa_books bk

2550:
2551: /*
2552: select count(*)
2553: into l_count
2554: from fa_books bk
2555: where bk.book_type_code = p_book
2556: and bk.asset_id = p_asset_id
2557: and (bk.rate_Adjustment_factor <> 1 OR
2558: (bk.rate_adjustment_factor = 1 and

Line 2694: FROM FA_BOOKS BK

2690: BEGIN
2691:
2692: select count(*)
2693: into l_count
2694: FROM FA_BOOKS BK
2695: WHERE BK.ASSET_ID = p_asset_id
2696: AND BK.PERIOD_COUNTER_FULLY_RETIRED IS NOT NULL
2697: AND BK.DATE_INEFFECTIVE IS NULL
2698: AND BK.BOOK_TYPE_CODE = p_book

Line 2970: from fa_books

2966: end if;
2967:
2968: select count(1)
2969: into l_count
2970: from fa_books
2971: where book_type_code = l_corp_book
2972: and asset_id = p_parent_asset_id
2973: and date_ineffective is null;
2974:

Line 3050: fa_books bk

3046: CURSOR C1 IS
3047: select currency_code
3048: from gl_sets_of_books sob,
3049: fa_book_controls bc,
3050: fa_books bk
3051: where bk.asset_id = p_asset_id
3052: and bk.date_ineffective is null
3053: and bk.book_type_code = bc.book_type_code
3054: and bc.set_of_books_id = sob.set_of_books_id;

Line 3180: -- from FA_BOOKS

3176: -- Following sql is too expensive
3177: --
3178: -- select count(*)
3179: -- into l_count
3180: -- from FA_BOOKS
3181: -- where ASSET_ID = p_group_asset_id
3182: -- and BOOK_TYPE_CODE = p_book_type_code;
3183: l_count := null;
3184: select 1

Line 3188: from FA_BOOKS

3184: select 1
3185: into l_count
3186: from dual
3187: where exists (select 'X'
3188: from FA_BOOKS
3189: where ASSET_ID = p_group_asset_id
3190: and BOOK_TYPE_CODE = p_book_type_code);
3191:
3192: if l_count is null then

Line 3266: FROM fa_books

3262: BEGIN
3263:
3264: SELECT count(1)
3265: INTO l_disabled
3266: FROM fa_books
3267: WHERE asset_id = p_group_asset_id
3268: AND book_type_code = p_book_type_code
3269: AND disabled_flag = 'Y'
3270: AND transaction_header_id_out is null;

Line 3278: FROM fa_books

3274: return true;
3275: else
3276: SELECT count(1)
3277: INTO l_has_members
3278: FROM fa_books
3279: WHERE group_asset_id = p_group_asset_id
3280: AND book_type_code = p_book_type_code
3281: AND transaction_header_id_out is null
3282: AND period_counter_fully_retired is null;

Line 3332: from fa_books

3328: -- remaining reserve handling
3329: --
3330: select count(transaction_header_id_in)
3331: into l_member_count
3332: from fa_books
3333: where group_asset_id = p_asset_hdr_rec.asset_id
3334: and book_type_code = p_asset_hdr_rec.book_type_code
3335: and transaction_header_id_out is null;
3336: else

Line 3444: ,fa_books inbk

3440: ,outbk.salvage_value outbk_salvage_value
3441: ,inbk.allowed_deprn_limit_amount inbk_allowed_deprn_limit_amt
3442: ,outbk.allowed_deprn_limit_amount outbk_allowed_deprn_limit_amt
3443: FROM fa_transaction_headers th
3444: ,fa_books inbk
3445: ,fa_books outbk
3446: WHERE inbk.asset_id = p_asset_id
3447: AND inbk.book_type_code = p_book_type_code
3448: AND outbk.asset_id (+) = p_asset_id -- inbk.asset_id

Line 3445: ,fa_books outbk

3441: ,inbk.allowed_deprn_limit_amount inbk_allowed_deprn_limit_amt
3442: ,outbk.allowed_deprn_limit_amount outbk_allowed_deprn_limit_amt
3443: FROM fa_transaction_headers th
3444: ,fa_books inbk
3445: ,fa_books outbk
3446: WHERE inbk.asset_id = p_asset_id
3447: AND inbk.book_type_code = p_book_type_code
3448: AND outbk.asset_id (+) = p_asset_id -- inbk.asset_id
3449: AND outbk.book_type_code (+) = p_book_type_code -- inbk.book_type_code

Line 3479: ,fa_books inbk

3475: ,outbk.salvage_value outbk_salvage_value
3476: ,inbk.allowed_deprn_limit_amount inbk_allowed_deprn_limit_amt
3477: ,outbk.allowed_deprn_limit_amount outbk_allowed_deprn_limit_amt
3478: FROM fa_transaction_headers th
3479: ,fa_books inbk
3480: ,fa_books outbk
3481: WHERE inbk.asset_id = p_asset_id
3482: AND inbk.book_type_code = p_book_type_code
3483: AND outbk.asset_id (+) = p_asset_id

Line 3480: ,fa_books outbk

3476: ,inbk.allowed_deprn_limit_amount inbk_allowed_deprn_limit_amt
3477: ,outbk.allowed_deprn_limit_amount outbk_allowed_deprn_limit_amt
3478: FROM fa_transaction_headers th
3479: ,fa_books inbk
3480: ,fa_books outbk
3481: WHERE inbk.asset_id = p_asset_id
3482: AND inbk.book_type_code = p_book_type_code
3483: AND outbk.asset_id (+) = p_asset_id
3484: AND outbk.book_type_code (+) = p_book_type_code

Line 4141: from fa_books

4137:
4138: CURSOR c_group_dpis (p_group_asset_id NUMBER,
4139: p_book_type_code VARCHAR2) is
4140: select date_placed_in_service
4141: from fa_books
4142: where asset_id = p_group_asset_id
4143: and book_type_code = p_book_type_code
4144: and transaction_header_id_out is null;
4145:

Line 5018: from fa_books

5014:
5015: cursor c_get_books_info(c_asset_id number,
5016: c_book_type_code varchar2) IS
5017: select over_depreciate_option
5018: from fa_books
5019: where asset_id = c_asset_id
5020: and book_type_code = c_book_type_code
5021: and transaction_header_id_out is null;
5022:

Line 5070: from fa_books

5066: p_log_level_rec IN FA_API_TYPES.log_level_rec_type default null) RETURN BOOLEAN IS
5067:
5068: CURSOR c_mem_exists IS
5069: select 1
5070: from fa_books
5071: where group_asset_id = p_asset_hdr_rec.asset_id
5072: and book_type_code = p_asset_hdr_rec.book_type_code
5073: and transaction_header_id_out is null;
5074:

Line 5175: from fa_books bk

5171: select 'POSTED'
5172: from fa_impairments
5173: where status = 'POSTED'
5174: and (asset_id = p_asset_id or cash_generating_unit_id = (select cash_generating_unit_id
5175: from fa_books bk
5176: where bk.asset_id = p_asset_id
5177: and bk.book_type_code = p_book
5178: and bk.date_ineffective is null))
5179: and book_type_code = p_book

Line 5215: from fa_books bk

5211: set status = 'NEW'
5212: where status = 'PREVIEWED'
5213: and (asset_id = p_asset_id
5214: or cash_generating_unit_id = (select cash_generating_unit_id
5215: from fa_books bk
5216: where bk.asset_id = p_asset_id
5217: and bk.book_type_code = p_book
5218: and bk.date_ineffective is null))
5219: and book_type_code = p_book

Line 5226: from fa_books bk

5222: delete from fa_mc_impairments
5223: where status = 'PREVIEWED'
5224: and (asset_id = p_asset_id
5225: or cash_generating_unit_id = (select cash_generating_unit_id
5226: from fa_books bk
5227: where bk.asset_id = p_asset_id
5228: and bk.book_type_code = p_book
5229: and bk.date_ineffective is null))
5230: and book_type_code = p_book

Line 5549: (select 'x' from fa_books

5545:
5546: CURSOR c_group_mem_no_depreciate is
5547: select count(1) from dual
5548: where exists
5549: (select 'x' from fa_books
5550: where book_type_code = p_asset_hdr_rec.book_type_code
5551: and group_asset_id = h_asset_id
5552: and transaction_header_id_out is null
5553: and depreciate_flag = 'NO');

Line 5804: from fa_books bk

5800:
5801: /* Cursor to get sum of all members adjusted cost */
5802: cursor c_mbr_adjusted_cost is
5803: select nvl(sum(bk.adjusted_cost),0) mbr_sum_adj_cost
5804: from fa_books bk
5805: where bk.book_type_code = p_asset_retire_rec.detail_info.book_type_code
5806: and bk.transaction_header_id_out is null
5807: and bk.group_asset_id = p_asset_fin_rec.group_asset_id;
5808:

Line 5812: from fa_books bk

5808:
5809: /* Cursor to get details during retirement, we have to use cursor as retire_rec will not provide salvage details*/
5810: cursor c_ret_mem_details is
5811: select bk.cost,nvl(bk.salvage_value,0)
5812: from fa_books bk
5813: where bk.book_type_code = p_asset_retire_rec.detail_info.book_type_code
5814: and bk.asset_id = p_asset_retire_rec.detail_info.asset_id
5815: and bk.transaction_header_id_out = p_asset_retire_rec.detail_info.transaction_header_id_in;
5816:

Line 5828: fa_books bk

5824: and ad.asset_id = ret.asset_id
5825: and ret.transaction_header_id_in =
5826: (select max(far.transaction_header_id_in)
5827: from fa_retirements far,
5828: fa_books bk
5829: where far.book_type_code = p_asset_retire_rec.detail_info.book_type_code
5830: and far.asset_id = bk.asset_id
5831: and bk.book_type_code = p_asset_retire_rec.detail_info.book_type_code
5832: and bk.group_asset_id = p_asset_fin_rec.group_asset_id

Line 5840: from fa_books bk

5836:
5837: /* Cursor to get group cost */
5838: cursor c_grp_cost is
5839: select bk.cost
5840: from fa_books bk
5841: where bk.book_type_code = p_asset_retire_rec.detail_info.book_type_code
5842: and bk.asset_id = p_asset_fin_rec.group_asset_id
5843: and bk.transaction_header_id_out is null;
5844:

Line 5854: l_grp_cost fa_books.cost%type;

5850: l_max_ret_adj_reverse number;
5851: l_max_ret_trx_id number;
5852: l_last_asset_id fa_additions_b.asset_id%type;
5853: l_last_asset_num fa_additions_b.asset_number%type;
5854: l_grp_cost fa_books.cost%type;
5855:
5856: val_err exception;
5857:
5858:

Line 6398: FROM FA_BOOKS FABK

6394: end if;
6395: BEGIN
6396: SELECT 'Y'
6397: INTO l_restrict_trx
6398: FROM FA_BOOKS FABK
6399: WHERE FABK.ASSET_ID = p_asset_id
6400: AND FABK.BOOK_TYPE_CODE = p_book_type_code
6401: AND NOT EXISTS (SELECT 1 FROM FA_BOOKS FABK1
6402: WHERE FABK1.ASSET_ID = p_asset_id

Line 6401: AND NOT EXISTS (SELECT 1 FROM FA_BOOKS FABK1

6397: INTO l_restrict_trx
6398: FROM FA_BOOKS FABK
6399: WHERE FABK.ASSET_ID = p_asset_id
6400: AND FABK.BOOK_TYPE_CODE = p_book_type_code
6401: AND NOT EXISTS (SELECT 1 FROM FA_BOOKS FABK1
6402: WHERE FABK1.ASSET_ID = p_asset_id
6403: AND FABK1.BOOK_TYPE_CODE = p_book_type_code
6404: AND FABK1.DEPRECIATE_FLAG = 'YES')
6405: AND NOT EXISTS (SELECT 1 FROM FA_DEPRN_SUMMARY FADS

Line 6530: from fa_methods mth, fa_books bk

6526: where mth.method_code = p_method_code;
6527:
6528: cursor group_method_details(p_group_asset_id in number) is
6529: select method_code, rate_source_rule, deprn_basis_rule
6530: from fa_methods mth, fa_books bk
6531: where mth.method_code = bk.deprn_method_code
6532: and bk.asset_id = p_group_asset_id
6533: and bk.book_type_code = p_asset_hdr_rec.book_type_code
6534: and bk.transaction_header_id_out is null;

Line 6538: from fa_methods mth, fa_books bk

6534: and bk.transaction_header_id_out is null;
6535:
6536: cursor corp_method_details is
6537: select method_code, rate_source_rule, deprn_basis_rule
6538: from fa_methods mth, fa_books bk
6539: where mth.method_code = bk.deprn_method_code
6540: and bk.asset_id = p_asset_hdr_rec.asset_id
6541: and bk.book_type_code = fa_cache_pkg.fazcbc_record.distribution_source_book
6542: and bk.transaction_header_id_out is null;

Line 6546: from fa_books bk

6542: and bk.transaction_header_id_out is null;
6543:
6544: cursor members_for_grp is
6545: select 'Y'
6546: from fa_books bk
6547: where bk.group_asset_id = p_asset_hdr_rec.asset_id
6548: and bk.book_type_code = p_asset_hdr_rec.book_type_code
6549: and bk.transaction_header_id_out is null;
6550:

Line 6554: from fa_books bk,

6550:
6551: /* Check any tax books exists with UOP method */
6552: cursor check_tax_book_method is
6553: select 'x'
6554: from fa_books bk,
6555: fa_book_controls bc,
6556: fa_methods mth
6557: where bc.distribution_source_book = p_asset_hdr_rec.book_type_code
6558: and bc.book_class = 'TAX'

Line 6808: from fa_books bk

6804: l_calling_fn varchar2(100) := 'FA_ASSET_VAL_PVT.validate_prev_period_amort';
6805:
6806: cursor c_amort_trx is
6807: select 'Y'
6808: from fa_books bk
6809: where bk.book_type_code = p_asset_hdr_rec.book_type_code
6810: and bk.asset_id= p_asset_hdr_rec.asset_id
6811: and (bk.rate_Adjustment_factor <> 1 OR
6812: (bk.rate_adjustment_factor = 1 and

Line 7028: from fa_books bk

7024: and mt.method_code = p_method_code;
7025:
7026: cursor c_grp_details(p_grp_asset_id in number) is
7027: select bk.asset_id, bk.tracking_method,bk.member_rollup_flag,bk.deprn_method_code
7028: from fa_books bk
7029: where bk.book_type_code = p_asset_hdr_rec.book_type_code
7030: and bk.asset_id = p_grp_asset_id
7031: and transaction_header_id_out is null;
7032:

Line 7051: from fa_books bk

7047: from dual
7048: where exists
7049: (
7050: select 1
7051: from fa_books bk
7052: where book_type_code = p_asset_hdr_rec.book_type_code
7053: and group_asset_id = p_asset_hdr_rec.asset_id
7054: and transaction_header_id_out is null
7055: );

Line 7063: from fa_books bk

7059: from dual
7060: where exists
7061: (
7062: select 1
7063: from fa_books bk
7064: where book_type_code = p_asset_hdr_rec.book_type_code
7065: and group_asset_id = p_group_asset_id
7066: and asset_id <> p_asset_hdr_rec.asset_id
7067: and transaction_header_id_out is null

Line 7072: from fa_books

7068: );
7069:
7070: cursor c_get_adj_cost is
7071: select adjusted_cost
7072: from fa_books
7073: where book_type_code = p_asset_hdr_rec.book_type_code
7074: and asset_id = p_asset_hdr_rec.asset_id
7075: and transaction_header_id_out is null;
7076: