DBA Data[Home] [Help]

APPS.OKL_ASSET_SUBSIDY_PVT dependencies on OKC_K_LINES_B

Line 66: p_asset_id IN okc_k_lines_b.id%TYPE,

62:
63: PROCEDURE raise_business_event(p_api_version IN NUMBER,
64: p_init_msg_list IN VARCHAR2,
65: p_chr_id IN okc_k_headers_b.id%TYPE,
66: p_asset_id IN okc_k_lines_b.id%TYPE,
67: p_subsidy_id IN okl_subsidies_b.id%TYPE,
68: p_event_name IN VARCHAR2,
69: x_return_status OUT NOCOPY VARCHAR2,
70: x_msg_count OUT NOCOPY NUMBER,

Line 231: from okc_k_lines_b cleb

227: select cleb.start_date,
228: cleb.end_date,
229: cleb.sts_code,
230: cleb.currency_code
231: from okc_k_lines_b cleb
232: where cleb.id = p_asset_cle_id;
233:
234: l_cleb_rec l_cleb_csr%ROWTYPE;
235:

Line 449: from okc_k_lines_b cleb

445: select cleb.start_date,
446: cleb.end_date,
447: cleb.sts_code,
448: cleb.currency_code
449: from okc_k_lines_b cleb
450: where cleb.id = p_asset_cle_id;
451:
452: l_cleb_rec l_cleb_csr%ROWTYPE;
453:

Line 473: from okc_k_lines_b cleb

469:
470: --cursor to get display sequence
471: cursor l_dispseq_csr(p_asset_cle_id in number, p_lse_id in number, p_chr_id in number) is
472: select nvl(max(cleb.display_sequence),0)+5
473: from okc_k_lines_b cleb
474: where cleb.cle_id = p_asset_cle_id
475: and cleb.dnz_chr_id = p_chr_id
476: and cleb.lse_id = p_lse_id;
477:

Line 1076: okc_k_lines_b cleb

1072: p_asset_cle_id in number) is
1073: Select 'Y'
1074: from okl_subsidies_b sub,
1075: okc_k_headers_b chrb,
1076: okc_k_lines_b cleb
1077: where sub.id = p_subsidy_id
1078: and chrb.id = cleb.chr_id
1079: and chrb.id = cleb.dnz_chr_id
1080: and cleb.id = p_asset_cle_id

Line 1094: okc_k_lines_b cleb

1090: p_asset_cle_id in number) is
1091: Select 'Y'
1092: from okl_subsidies_b sub,
1093: okc_k_headers_b chrb,
1094: okc_k_lines_b cleb
1095: where sub.id = p_subsidy_id
1096: and chrb.id = cleb.chr_id
1097: and chrb.id = cleb.dnz_chr_id
1098: and cleb.id = p_asset_cle_id

Line 1110: okc_k_lines_b cleb

1106: p_asset_cle_id in number) is
1107: Select 'Y'
1108: from okl_subsidies_b sub,
1109: okc_rules_b rulb,
1110: okc_k_lines_b cleb
1111: where sub.id = p_subsidy_id
1112: and rulb.dnz_chr_id = cleb.chr_id
1113: and rulb.rule_information_category = 'LARLES'
1114: and cleb.id = p_asset_cle_id

Line 1122: okc_k_lines_b cleb

1118: union
1119: -- to take care of S and O where release yes-no flag is not applicable
1120: Select 'Y'
1121: from okl_subsidies_b sub,
1122: okc_k_lines_b cleb
1123: where sub.id = p_subsidy_id
1124: and cleb.id = p_asset_cle_id
1125: and not exists (select 1
1126: from okc_rules_b rulb

Line 1137: okc_k_lines_b cleb

1133: cursor l_cle_csr (p_subsidy_id in number,
1134: p_asset_cle_id in number) is
1135: Select 'Y'
1136: from okl_subsidies_b sub,
1137: okc_k_lines_b cleb
1138: where sub.id = p_subsidy_id
1139: and cleb.id = p_asset_cle_id
1140: -- start: okl.h cklee
1141: -- and cleb.start_date between sub.effective_from_date

Line 1172: okc_k_lines_b cleb,

1168: p_asset_cle_id in number) is
1169: Select 'Y'
1170: From
1171: --inv item and org
1172: okc_k_lines_b cleb,
1173: okc_k_lines_b cle_model,
1174: okc_line_styles_b lse_model,
1175: okc_k_items cim_model,
1176: okl_subsidy_criteria suc

Line 1173: okc_k_lines_b cle_model,

1169: Select 'Y'
1170: From
1171: --inv item and org
1172: okc_k_lines_b cleb,
1173: okc_k_lines_b cle_model,
1174: okc_line_styles_b lse_model,
1175: okc_k_items cim_model,
1176: okl_subsidy_criteria suc
1177: where cim_model.cle_id = cle_model.id

Line 1209: okc_k_lines_b cleb,

1205: p_asset_cle_id in number) is
1206: select 'Y'
1207: from okc_k_headers_b chrb,
1208: hz_cust_accounts cust,
1209: okc_k_lines_b cleb,
1210: okl_subsidy_criteria suc
1211: where chrb.id = cleb.chr_id
1212: And cleb.dnz_chr_id = chrb.id
1213: And cleb.id = p_asset_cle_id

Line 1247: okc_k_lines_b cle_ib,

1243: hz_party_site_uses hzpsu,
1244: okl_txl_itm_insts iti,
1245: --csi_item_instances csii,
1246: --okc_k_items cim_ib,
1247: okc_k_lines_b cle_ib,
1248: okc_line_styles_b lse_ib,
1249: okc_k_lines_b cle_inst,
1250: okc_line_styles_b lse_inst,
1251: OKC_K_LINES_B cleb,

Line 1249: okc_k_lines_b cle_inst,

1245: --csi_item_instances csii,
1246: --okc_k_items cim_ib,
1247: okc_k_lines_b cle_ib,
1248: okc_line_styles_b lse_ib,
1249: okc_k_lines_b cle_inst,
1250: okc_line_styles_b lse_inst,
1251: OKC_K_LINES_B cleb,
1252: okl_subsidy_criteria suc
1253: Where cle_inst.cle_id = cleb.id

Line 1251: OKC_K_LINES_B cleb,

1247: okc_k_lines_b cle_ib,
1248: okc_line_styles_b lse_ib,
1249: okc_k_lines_b cle_inst,
1250: okc_line_styles_b lse_inst,
1251: OKC_K_LINES_B cleb,
1252: okl_subsidy_criteria suc
1253: Where cle_inst.cle_id = cleb.id
1254: And cle_inst.dnz_chr_id = cleb.dnz_chr_id
1255: And cle_inst.lse_id = lse_inst.id

Line 1281: OKC_K_LINES_B cleb,

1277: select 'Y'
1278: from RA_SALESREP_TERRITORIES rst,
1279: OKC_CONTACTS cro,
1280: OKC_K_PARTY_ROLES_B cplb,
1281: OKC_K_LINES_B cleb,
1282: okl_subsidy_criteria suc
1283: Where
1284: rst.salesrep_id = cro.object1_id1
1285: And cro.object1_id2 = '#'

Line 1314: okc_k_lines_b cleb,

1310: cursor l_pdt_csr (p_subsidy_id in number,
1311: p_asset_cle_id in number) is
1312: select 'Y'
1313: from okl_k_headers khr,
1314: okc_k_lines_b cleb,
1315: okl_subsidy_criteria suc
1316: Where khr.id = cleb.chr_id
1317: And SUC.subsidy_id = p_subsidy_id
1318: And SUC.product_id = khr.pdt_id

Line 1339: okc_k_lines_b cleb,

1335: p_asset_cle_id in number) is
1336: select 'Y'
1337: from hz_parties hp,
1338: hz_cust_accounts_all hca,
1339: okc_k_lines_b cleb,
1340: okc_k_headers_b chrb,
1341: okl_subsidy_criteria suc
1342: where hp.party_id = hca.party_id
1343: And hca.CUST_ACCOUNT_ID = chrb.cust_acct_id

Line 1368: okc_k_lines_b cleb,

1364: -- cursor to check if it is a rebook contract
1365: cursor l_chr_rebook (p_asset_cle_id in number) is
1366: Select 'Y'
1367: from okc_k_headers_b chrb,
1368: okc_k_lines_b cleb,
1369: okl_trx_contracts ktrx
1370: where chrb.id = cleb.chr_id
1371: and chrb.id = cleb.dnz_chr_id
1372: and chrb.orig_system_source_code = 'OKL_REBOOK'

Line 1388: okc_k_lines_b cleb,

1384: --cursor to check if it is a mass rebook
1385: cursor l_chr_mass_rebook (p_asset_cle_id in number) is
1386: Select 'Y'
1387: from okc_k_headers_b chrb,
1388: okc_k_lines_b cleb,
1389: okl_trx_contracts ktrx
1390: where chrb.id = cleb.chr_id
1391: and chrb.id = cleb.dnz_chr_id
1392: and cleb.id = p_asset_cle_id

Line 1412: OKC_K_LINES_B KLE_FIN,

1408: CURSOR get_split_trn_csr (p_asset_cle_id IN NUMBER) IS
1409: SELECT 'Y'
1410: FROM OKL_TXL_ASSETS_B TXL,
1411: OKL_TRX_ASSETS TRX,
1412: OKC_K_LINES_B KLE_FIN,
1413: OKC_K_LINES_B KLE_FIX,
1414: OKC_LINE_STYLES_B LTY_FIN,
1415: OKC_LINE_STYLES_B LTY_FIX
1416: WHERE TXL.TAL_TYPE = 'ALI' -- identifies split transaction

Line 1413: OKC_K_LINES_B KLE_FIX,

1409: SELECT 'Y'
1410: FROM OKL_TXL_ASSETS_B TXL,
1411: OKL_TRX_ASSETS TRX,
1412: OKC_K_LINES_B KLE_FIN,
1413: OKC_K_LINES_B KLE_FIX,
1414: OKC_LINE_STYLES_B LTY_FIN,
1415: OKC_LINE_STYLES_B LTY_FIX
1416: WHERE TXL.TAL_TYPE = 'ALI' -- identifies split transaction
1417: AND TRX.TSU_CODE = 'ENTERED' -- split transaction in progress

Line 1427: FROM OKC_K_LINES_B CLE_TMP

1423: AND LTY_FIX.LTY_CODE = 'FIXED_ASSET'
1424: AND TXL.KLE_ID = KLE_FIX.ID
1425: AND ( KLE_FIN.ID = p_asset_cle_id -- original asset during split
1426: OR KLE_FIN.ID = (SELECT ORIG_SYSTEM_ID1
1427: FROM OKC_K_LINES_B CLE_TMP
1428: WHERE CLE_TMP.ID = p_asset_cle_id) -- new asset generated during split
1429: );
1430:
1431: l_cle_split varchar2(1);

Line 2749: p_asset_cle_id IN okc_k_lines_b.id%TYPE,

2745: -- 3. the subsidy pool is logically active as on the start date of the asset
2746: -- 4. there exists a valid currency conversion basis between the pool and the asset/contract
2747: -- 5. the pool balance is valid before addition of the subsidy amount
2748: FUNCTION validate_subsidy_pool_applic(p_subsidy_id IN okl_subsidies_b.id%TYPE,
2749: p_asset_cle_id IN okc_k_lines_b.id%TYPE,
2750: p_ast_date_sq IN okc_k_lines_b.start_date%TYPE,
2751: p_trx_curr_code_sq IN okc_k_lines_b.currency_code%TYPE,
2752: --START: 09-Dec-2005 cklee - Fixed bug#4874385 |
2753: p_tot_subsidy_amount IN NUMBER,

Line 2750: p_ast_date_sq IN okc_k_lines_b.start_date%TYPE,

2746: -- 4. there exists a valid currency conversion basis between the pool and the asset/contract
2747: -- 5. the pool balance is valid before addition of the subsidy amount
2748: FUNCTION validate_subsidy_pool_applic(p_subsidy_id IN okl_subsidies_b.id%TYPE,
2749: p_asset_cle_id IN okc_k_lines_b.id%TYPE,
2750: p_ast_date_sq IN okc_k_lines_b.start_date%TYPE,
2751: p_trx_curr_code_sq IN okc_k_lines_b.currency_code%TYPE,
2752: --START: 09-Dec-2005 cklee - Fixed bug#4874385 |
2753: p_tot_subsidy_amount IN NUMBER,
2754: p_subsidy_amount IN NUMBER,

Line 2751: p_trx_curr_code_sq IN okc_k_lines_b.currency_code%TYPE,

2747: -- 5. the pool balance is valid before addition of the subsidy amount
2748: FUNCTION validate_subsidy_pool_applic(p_subsidy_id IN okl_subsidies_b.id%TYPE,
2749: p_asset_cle_id IN okc_k_lines_b.id%TYPE,
2750: p_ast_date_sq IN okc_k_lines_b.start_date%TYPE,
2751: p_trx_curr_code_sq IN okc_k_lines_b.currency_code%TYPE,
2752: --START: 09-Dec-2005 cklee - Fixed bug#4874385 |
2753: p_tot_subsidy_amount IN NUMBER,
2754: p_subsidy_amount IN NUMBER,
2755: p_filter_flag IN VARCHAR2,

Line 2763: okc_k_lines_b line

2759:
2760: CURSOR c_get_asset_dtls_csr IS
2761: SELECT line.start_date, hdr.currency_code
2762: FROM okc_k_headers_b hdr,
2763: okc_k_lines_b line
2764: WHERE line.id = p_asset_cle_id
2765: AND line.dnz_chr_id = hdr.id;
2766:
2767: --START: 09/29/2005 bug#4634871

Line 2793: lv_asset_curr_code okc_k_lines_b.currency_code%TYPE;

2789: lx_sub_pool_curr_code okl_subsidy_pools_b.currency_code%TYPE;
2790: lx_sub_pool_balance NUMBER;
2791: -- local variables for sales quote usage. when called from LA, the p_asset_cle_id is passed and
2792: -- p_ast_date_sq is p_trx_curr_code are null, for SQ, the case is converse
2793: lv_asset_curr_code okc_k_lines_b.currency_code%TYPE;
2794: lv_start_date okc_k_lines_b.start_date%TYPE;
2795: --START: 09/29/2005 bug#4634871
2796: lv_asset_number okc_k_lines_v.name%TYPE;
2797: lv_subsidy_name okl_subsidies_b.name%TYPE;

Line 2794: lv_start_date okc_k_lines_b.start_date%TYPE;

2790: lx_sub_pool_balance NUMBER;
2791: -- local variables for sales quote usage. when called from LA, the p_asset_cle_id is passed and
2792: -- p_ast_date_sq is p_trx_curr_code are null, for SQ, the case is converse
2793: lv_asset_curr_code okc_k_lines_b.currency_code%TYPE;
2794: lv_start_date okc_k_lines_b.start_date%TYPE;
2795: --START: 09/29/2005 bug#4634871
2796: lv_asset_number okc_k_lines_v.name%TYPE;
2797: lv_subsidy_name okl_subsidies_b.name%TYPE;
2798: lv_subsidy_pool_name okl_subsidy_pools_v.subsidy_pool_name%TYPE;

Line 3075: ,p_asset_date IN okc_k_lines_b.start_date%TYPE

3071: return lv_return_status;
3072: END is_sub_pool_active;
3073:
3074: FUNCTION is_sub_pool_active_by_date(p_subsidy_pool_id IN okl_subsidy_pools_b.id%TYPE
3075: ,p_asset_date IN okc_k_lines_b.start_date%TYPE
3076: ) RETURN VARCHAR2 IS
3077: CURSOR c_sub_pool_csr IS
3078: SELECT effective_from_date
3079: ,effective_to_date

Line 3098: ,p_asset_date IN okc_k_lines_b.start_date%TYPE

3094: return lv_return_status;
3095: END is_sub_pool_active_by_date;
3096:
3097: FUNCTION is_sub_pool_conv_rate_valid(p_subsidy_pool_id IN okl_subsidy_pools_b.id%TYPE
3098: ,p_asset_date IN okc_k_lines_b.start_date%TYPE
3099: ,p_trx_currency_code IN okc_k_headers_b.currency_code%TYPE
3100: ,x_conversion_rate OUT NOCOPY NUMBER) RETURN VARCHAR2 IS
3101: CURSOR c_sub_pool_csr IS
3102: SELECT currency_code

Line 3155: p_asset_id okc_k_lines_b.id%TYPE,

3151: return lv_return_status;
3152: END is_balance_valid_before_add;
3153:
3154: PROCEDURE is_balance_valid_after_add (p_subsidy_id okl_subsidies_b.id%TYPE,
3155: p_asset_id okc_k_lines_b.id%TYPE,
3156: p_subsidy_amount NUMBER,
3157: p_subsidy_name okl_subsidies_b.name%TYPE
3158: ,x_return_status OUT NOCOPY VARCHAR2
3159: ,x_msg_count OUT NOCOPY NUMBER

Line 3170: from okc_k_lines_b cleb_sub,

3166: CURSOR c_get_tot_sub_amt_csr(p_asset_id number, p_subsidy_pool_id number) IS
3167: select SUM(decode(kle_sub.SUBSIDY_OVERRIDE_AMOUNT,
3168: null, nvl(kle_sub.AMOUNT,0),
3169: kle_sub.SUBSIDY_OVERRIDE_AMOUNT))
3170: from okc_k_lines_b cleb_sub,
3171: okc_line_styles_b lseb_sub,
3172: okl_k_lines kle_sub,
3173: okl_subsidies_b sub
3174: where kle_sub.id = cleb_sub.id And

Line 3181: from okc_k_lines_b cleb_sub1

3177: sub.subsidy_pool_id = p_subsidy_pool_id And
3178: lseb_sub.lty_code = 'SUBSIDY' And
3179: cleb_sub.sts_code <> 'ABANDONED' And
3180: cleb_sub.dnz_chr_id = (select dnz_chr_id
3181: from okc_k_lines_b cleb_sub1
3182: where cleb_sub1.id = p_asset_id);
3183: -- END: cklee 09/27/2005: 4634792
3184:
3185: CURSOR c_get_asset_csr IS

Line 3187: FROM okc_k_lines_b

3183: -- END: cklee 09/27/2005: 4634792
3184:
3185: CURSOR c_get_asset_csr IS
3186: SELECT start_date, currency_code
3187: FROM okc_k_lines_b
3188: WHERE id = p_asset_id;
3189: cv_get_asset c_get_asset_csr%ROWTYPE;
3190:
3191: CURSOR c_get_pool_amount_csr (p_subsidy_pool_id okl_subsidy_pools_b.id%TYPE)IS

Line 3610: from okc_k_lines_b cleb,

3606: x_return_status OUT NOCOPY VARCHAR2,
3607: p_subsidy_cle_id IN NUMBER) IS
3608: cursor l_subcle_csr (p_subsidy_cle_id in number) is
3609: select 'Y'
3610: from okc_k_lines_b cleb,
3611: okc_line_styles_b lseb
3612: where cleb.id = p_subsidy_cle_id
3613: and lseb.id = cleb.lse_id
3614: and lseb.lty_code = 'SUBSIDY'

Line 3708: from okc_k_lines_b cleb

3704: p_asset_cle_id IN NUMBER) IS
3705:
3706: cursor l_cle_csr (p_asset_cle_id in number) is
3707: select 'Y'
3708: from okc_k_lines_b cleb
3709: where cleb.id = p_asset_cle_id;
3710: --as per clarification by srawlings
3711: --and cleb.sts_code in ('NEW','COMPLETE','PASSED','INCOMPLETE','TERMINATED','APPROVED');
3712:

Line 3809: from okc_k_lines_b cleb

3805: cursor l_chrcle_csr (p_chr_id in number,
3806: p_asset_cle_id in number
3807: ) is
3808: select 'Y'
3809: from okc_k_lines_b cleb
3810: where cleb.id = p_asset_cle_id
3811: and cleb.dnz_chr_id = p_chr_id;
3812:
3813: /* cklee check from validate_record_after()

Line 3819: from okc_k_lines_b cleb

3815: cursor l_subcle_csr (p_subsidy_cle_id in number,
3816: p_asset_cle_id in number
3817: ) is
3818: select 'Y'
3819: from okc_k_lines_b cleb
3820: where cleb.id = p_subsidy_cle_id
3821: and cleb.cle_id = p_asset_cle_id;
3822:
3823: --tro check cpl_id is valid for subsidy line

Line 3856: okc_k_lines_b cleb,

3852: clet.name subsidy_name,
3853: clet_asst.name asset_number
3854: from okl_k_lines kle,
3855: okc_k_lines_tl clet,
3856: okc_k_lines_b cleb,
3857: okc_line_styles_b lseb,
3858: okc_k_lines_tl clet_asst
3859: where kle.id = cleb.id
3860: and kle.subsidy_id = p_subsidy_id

Line 3882: from okc_k_lines_b sub_cleb,

3878: from okl_subsidies_b subb
3879: where subb.id = p_subsidy_id
3880: and nvl(subb.exclusive_yn,'N') = 'Y'
3881: and exists (select '1'
3882: from okc_k_lines_b sub_cleb,
3883: okc_line_styles_b sub_lseb
3884: where sub_cleb.cle_id = p_asset_cle_id
3885: and sub_cleb.sts_code <> 'ABANDONED'
3886: and sub_cleb.id <> nvl(p_subsidy_cle_id,-999)

Line 4019: from okc_k_lines_b cleb

4015: cursor l_subcle_csr (p_subsidy_cle_id in number,
4016: p_asset_cle_id in number
4017: ) is
4018: select 'Y'
4019: from okc_k_lines_b cleb
4020: where cleb.id = p_subsidy_cle_id
4021: and cleb.cle_id = p_asset_cle_id;
4022:
4023: --to check cpl_id is valid for subsidy line

Line 4042: okc_k_lines_b cleb,

4038: clet.name subsidy_name,
4039: clet_asst.name asset_number
4040: from okl_k_lines kle,
4041: okc_k_lines_tl clet,
4042: okc_k_lines_b cleb,
4043: okc_line_styles_b lseb,
4044: okc_k_lines_tl clet_asst
4045: where kle.id = cleb.id
4046: and kle.subsidy_id = p_subsidy_id

Line 4073: from okc_k_lines_b sub_cleb,

4069: from okl_subsidies_b subb
4070: where subb.id = p_subsidy_id
4071: and nvl(subb.exclusive_yn,'N') = 'Y'
4072: and exists (select '1'
4073: from okc_k_lines_b sub_cleb,
4074: okc_line_styles_b sub_lseb
4075: where sub_cleb.cle_id = p_asset_cle_id
4076: and sub_cleb.sts_code <> 'ABANDONED'
4077: and sub_cleb.id <> nvl(p_subsidy_cle_id,-999)

Line 4087: okc_k_lines_b sub_cleb,

4083: cursor l_exclusive_csr(p_asset_cle_id in number) is
4084: Select 'Y',
4085: subb.name
4086: from okl_subsidies_b subb,
4087: okc_k_lines_b sub_cleb,
4088: okc_line_styles_b sub_lseb,
4089: okl_k_lines sub_kleb
4090: where sub_cleb.cle_id = p_asset_cle_id
4091: and sub_cleb.sts_code <> 'ABANDONED'

Line 4103: okc_k_lines_b sub_cleb,

4099: -- a p_asset_cle_id ('FREE_FORM1')
4100: cursor l_exclusive_csr2(p_asset_cle_id in number) is
4101: select count(1)
4102: from okl_subsidies_b subb,
4103: okc_k_lines_b sub_cleb,
4104: okc_line_styles_b sub_lseb,
4105: okl_k_lines sub_kleb
4106: where sub_cleb.cle_id = p_asset_cle_id
4107: and sub_cleb.sts_code <> 'ABANDONED'