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 1115: okc_k_lines_b cleb

1111: /*
1112: Select 'Y'
1113: from okl_subsidies_b sub,
1114: okc_rules_b rulb,
1115: okc_k_lines_b cleb
1116: where sub.id = p_subsidy_id
1117: and rulb.dnz_chr_id = cleb.chr_id
1118: and rulb.rule_information_category = 'LARLES'
1119: and cleb.id = p_asset_cle_id

Line 1127: okc_k_lines_b cleb

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

Line 1137: okc_k_lines_b cleb,

1133: and rulb.rule_information_category = 'LARLES');
1134: */
1135: Select 'Y'
1136: from okl_subsidies_b sub,
1137: okc_k_lines_b cleb,
1138: okl_k_lines kle_fin
1139: where sub.id = p_subsidy_id
1140: and kle_fin.id = cleb.id
1141: and cleb.id = p_asset_cle_id

Line 1154: okc_k_lines_b cleb

1150: cursor l_cle_csr (p_subsidy_id in number,
1151: p_asset_cle_id in number) is
1152: Select 'Y'
1153: from okl_subsidies_b sub,
1154: okc_k_lines_b cleb
1155: where sub.id = p_subsidy_id
1156: and cleb.id = p_asset_cle_id
1157: -- start: okl.h cklee
1158: -- and cleb.start_date between sub.effective_from_date

Line 1189: okc_k_lines_b cleb,

1185: p_asset_cle_id in number) is
1186: Select 'Y'
1187: From
1188: --inv item and org
1189: okc_k_lines_b cleb,
1190: okc_k_lines_b cle_model,
1191: okc_line_styles_b lse_model,
1192: okc_k_items cim_model,
1193: okl_subsidy_criteria suc

Line 1190: okc_k_lines_b cle_model,

1186: Select 'Y'
1187: From
1188: --inv item and org
1189: okc_k_lines_b cleb,
1190: okc_k_lines_b cle_model,
1191: okc_line_styles_b lse_model,
1192: okc_k_items cim_model,
1193: okl_subsidy_criteria suc
1194: where cim_model.cle_id = cle_model.id

Line 1226: okc_k_lines_b cleb,

1222: p_asset_cle_id in number) is
1223: select 'Y'
1224: from okc_k_headers_b chrb,
1225: hz_cust_accounts cust,
1226: okc_k_lines_b cleb,
1227: okl_subsidy_criteria suc
1228: where chrb.id = cleb.chr_id
1229: And cleb.dnz_chr_id = chrb.id
1230: And cleb.id = p_asset_cle_id

Line 1264: okc_k_lines_b cle_ib,

1260: hz_party_site_uses hzpsu,
1261: okl_txl_itm_insts iti,
1262: --csi_item_instances csii,
1263: --okc_k_items cim_ib,
1264: okc_k_lines_b cle_ib,
1265: okc_line_styles_b lse_ib,
1266: okc_k_lines_b cle_inst,
1267: okc_line_styles_b lse_inst,
1268: OKC_K_LINES_B cleb,

Line 1266: okc_k_lines_b cle_inst,

1262: --csi_item_instances csii,
1263: --okc_k_items cim_ib,
1264: okc_k_lines_b cle_ib,
1265: okc_line_styles_b lse_ib,
1266: okc_k_lines_b cle_inst,
1267: okc_line_styles_b lse_inst,
1268: OKC_K_LINES_B cleb,
1269: okl_subsidy_criteria suc
1270: Where cle_inst.cle_id = cleb.id

Line 1268: OKC_K_LINES_B cleb,

1264: okc_k_lines_b cle_ib,
1265: okc_line_styles_b lse_ib,
1266: okc_k_lines_b cle_inst,
1267: okc_line_styles_b lse_inst,
1268: OKC_K_LINES_B cleb,
1269: okl_subsidy_criteria suc
1270: Where cle_inst.cle_id = cleb.id
1271: And cle_inst.dnz_chr_id = cleb.dnz_chr_id
1272: And cle_inst.lse_id = lse_inst.id

Line 1298: OKC_K_LINES_B cleb,

1294: select 'Y'
1295: from RA_SALESREP_TERRITORIES rst,
1296: OKC_CONTACTS cro,
1297: OKC_K_PARTY_ROLES_B cplb,
1298: OKC_K_LINES_B cleb,
1299: okl_subsidy_criteria suc
1300: Where
1301: rst.salesrep_id = cro.object1_id1
1302: And cro.object1_id2 = '#'

Line 1331: okc_k_lines_b cleb,

1327: cursor l_pdt_csr (p_subsidy_id in number,
1328: p_asset_cle_id in number) is
1329: select 'Y'
1330: from okl_k_headers khr,
1331: okc_k_lines_b cleb,
1332: okl_subsidy_criteria suc
1333: Where khr.id = cleb.chr_id
1334: And SUC.subsidy_id = p_subsidy_id
1335: And SUC.product_id = khr.pdt_id

Line 1356: okc_k_lines_b cleb,

1352: p_asset_cle_id in number) is
1353: select 'Y'
1354: from hz_parties hp,
1355: hz_cust_accounts_all hca,
1356: okc_k_lines_b cleb,
1357: okc_k_headers_b chrb,
1358: okl_subsidy_criteria suc
1359: where hp.party_id = hca.party_id
1360: And hca.CUST_ACCOUNT_ID = chrb.cust_acct_id

Line 1385: okc_k_lines_b cleb,

1381: -- cursor to check if it is a rebook contract
1382: cursor l_chr_rebook (p_asset_cle_id in number) is
1383: Select 'Y'
1384: from okc_k_headers_b chrb,
1385: okc_k_lines_b cleb,
1386: okl_trx_contracts ktrx
1387: where chrb.id = cleb.chr_id
1388: and chrb.id = cleb.dnz_chr_id
1389: and chrb.orig_system_source_code = 'OKL_REBOOK'

Line 1405: okc_k_lines_b cleb,

1401: --cursor to check if it is a mass rebook
1402: cursor l_chr_mass_rebook (p_asset_cle_id in number) is
1403: Select 'Y'
1404: from okc_k_headers_b chrb,
1405: okc_k_lines_b cleb,
1406: okl_trx_contracts ktrx
1407: where chrb.id = cleb.chr_id
1408: and chrb.id = cleb.dnz_chr_id
1409: and cleb.id = p_asset_cle_id

Line 1429: OKC_K_LINES_B KLE_FIN,

1425: CURSOR get_split_trn_csr (p_asset_cle_id IN NUMBER) IS
1426: SELECT 'Y'
1427: FROM OKL_TXL_ASSETS_B TXL,
1428: OKL_TRX_ASSETS TRX,
1429: OKC_K_LINES_B KLE_FIN,
1430: OKC_K_LINES_B KLE_FIX,
1431: OKC_LINE_STYLES_B LTY_FIN,
1432: OKC_LINE_STYLES_B LTY_FIX
1433: WHERE TXL.TAL_TYPE = 'ALI' -- identifies split transaction

Line 1430: OKC_K_LINES_B KLE_FIX,

1426: SELECT 'Y'
1427: FROM OKL_TXL_ASSETS_B TXL,
1428: OKL_TRX_ASSETS TRX,
1429: OKC_K_LINES_B KLE_FIN,
1430: OKC_K_LINES_B KLE_FIX,
1431: OKC_LINE_STYLES_B LTY_FIN,
1432: OKC_LINE_STYLES_B LTY_FIX
1433: WHERE TXL.TAL_TYPE = 'ALI' -- identifies split transaction
1434: AND TRX.TSU_CODE = 'ENTERED' -- split transaction in progress

Line 1444: FROM OKC_K_LINES_B CLE_TMP

1440: AND LTY_FIX.LTY_CODE = 'FIXED_ASSET'
1441: AND TXL.KLE_ID = KLE_FIX.ID
1442: AND ( KLE_FIN.ID = p_asset_cle_id -- original asset during split
1443: OR KLE_FIN.ID = (SELECT ORIG_SYSTEM_ID1
1444: FROM OKC_K_LINES_B CLE_TMP
1445: WHERE CLE_TMP.ID = p_asset_cle_id) -- new asset generated during split
1446: );
1447:
1448: l_cle_split varchar2(1);

Line 2770: p_asset_cle_id IN okc_k_lines_b.id%TYPE,

2766: -- 3. the subsidy pool is logically active as on the start date of the asset
2767: -- 4. there exists a valid currency conversion basis between the pool and the asset/contract
2768: -- 5. the pool balance is valid before addition of the subsidy amount
2769: FUNCTION validate_subsidy_pool_applic(p_subsidy_id IN okl_subsidies_b.id%TYPE,
2770: p_asset_cle_id IN okc_k_lines_b.id%TYPE,
2771: p_ast_date_sq IN okc_k_lines_b.start_date%TYPE,
2772: p_trx_curr_code_sq IN okc_k_lines_b.currency_code%TYPE,
2773: --START: 09-Dec-2005 cklee - Fixed bug#4874385 |
2774: p_tot_subsidy_amount IN NUMBER,

Line 2771: p_ast_date_sq IN okc_k_lines_b.start_date%TYPE,

2767: -- 4. there exists a valid currency conversion basis between the pool and the asset/contract
2768: -- 5. the pool balance is valid before addition of the subsidy amount
2769: FUNCTION validate_subsidy_pool_applic(p_subsidy_id IN okl_subsidies_b.id%TYPE,
2770: p_asset_cle_id IN okc_k_lines_b.id%TYPE,
2771: p_ast_date_sq IN okc_k_lines_b.start_date%TYPE,
2772: p_trx_curr_code_sq IN okc_k_lines_b.currency_code%TYPE,
2773: --START: 09-Dec-2005 cklee - Fixed bug#4874385 |
2774: p_tot_subsidy_amount IN NUMBER,
2775: p_subsidy_amount IN NUMBER,

Line 2772: p_trx_curr_code_sq IN okc_k_lines_b.currency_code%TYPE,

2768: -- 5. the pool balance is valid before addition of the subsidy amount
2769: FUNCTION validate_subsidy_pool_applic(p_subsidy_id IN okl_subsidies_b.id%TYPE,
2770: p_asset_cle_id IN okc_k_lines_b.id%TYPE,
2771: p_ast_date_sq IN okc_k_lines_b.start_date%TYPE,
2772: p_trx_curr_code_sq IN okc_k_lines_b.currency_code%TYPE,
2773: --START: 09-Dec-2005 cklee - Fixed bug#4874385 |
2774: p_tot_subsidy_amount IN NUMBER,
2775: p_subsidy_amount IN NUMBER,
2776: p_filter_flag IN VARCHAR2,

Line 2784: okc_k_lines_b line

2780:
2781: CURSOR c_get_asset_dtls_csr IS
2782: SELECT line.start_date, hdr.currency_code
2783: FROM okc_k_headers_b hdr,
2784: okc_k_lines_b line
2785: WHERE line.id = p_asset_cle_id
2786: AND line.dnz_chr_id = hdr.id;
2787:
2788: --START: 09/29/2005 bug#4634871

Line 2814: lv_asset_curr_code okc_k_lines_b.currency_code%TYPE;

2810: lx_sub_pool_curr_code okl_subsidy_pools_b.currency_code%TYPE;
2811: lx_sub_pool_balance NUMBER;
2812: -- local variables for sales quote usage. when called from LA, the p_asset_cle_id is passed and
2813: -- p_ast_date_sq is p_trx_curr_code are null, for SQ, the case is converse
2814: lv_asset_curr_code okc_k_lines_b.currency_code%TYPE;
2815: lv_start_date okc_k_lines_b.start_date%TYPE;
2816: --START: 09/29/2005 bug#4634871
2817: lv_asset_number okc_k_lines_v.name%TYPE;
2818: lv_subsidy_name okl_subsidies_b.name%TYPE;

Line 2815: lv_start_date okc_k_lines_b.start_date%TYPE;

2811: lx_sub_pool_balance NUMBER;
2812: -- local variables for sales quote usage. when called from LA, the p_asset_cle_id is passed and
2813: -- p_ast_date_sq is p_trx_curr_code are null, for SQ, the case is converse
2814: lv_asset_curr_code okc_k_lines_b.currency_code%TYPE;
2815: lv_start_date okc_k_lines_b.start_date%TYPE;
2816: --START: 09/29/2005 bug#4634871
2817: lv_asset_number okc_k_lines_v.name%TYPE;
2818: lv_subsidy_name okl_subsidies_b.name%TYPE;
2819: lv_subsidy_pool_name okl_subsidy_pools_v.subsidy_pool_name%TYPE;

Line 3096: ,p_asset_date IN okc_k_lines_b.start_date%TYPE

3092: return lv_return_status;
3093: END is_sub_pool_active;
3094:
3095: FUNCTION is_sub_pool_active_by_date(p_subsidy_pool_id IN okl_subsidy_pools_b.id%TYPE
3096: ,p_asset_date IN okc_k_lines_b.start_date%TYPE
3097: ) RETURN VARCHAR2 IS
3098: CURSOR c_sub_pool_csr IS
3099: SELECT effective_from_date
3100: ,effective_to_date

Line 3119: ,p_asset_date IN okc_k_lines_b.start_date%TYPE

3115: return lv_return_status;
3116: END is_sub_pool_active_by_date;
3117:
3118: FUNCTION is_sub_pool_conv_rate_valid(p_subsidy_pool_id IN okl_subsidy_pools_b.id%TYPE
3119: ,p_asset_date IN okc_k_lines_b.start_date%TYPE
3120: ,p_trx_currency_code IN okc_k_headers_b.currency_code%TYPE
3121: ,x_conversion_rate OUT NOCOPY NUMBER) RETURN VARCHAR2 IS
3122: CURSOR c_sub_pool_csr IS
3123: SELECT currency_code

Line 3176: p_asset_id okc_k_lines_b.id%TYPE,

3172: return lv_return_status;
3173: END is_balance_valid_before_add;
3174:
3175: PROCEDURE is_balance_valid_after_add (p_subsidy_id okl_subsidies_b.id%TYPE,
3176: p_asset_id okc_k_lines_b.id%TYPE,
3177: p_subsidy_amount NUMBER,
3178: p_subsidy_name okl_subsidies_b.name%TYPE
3179: ,x_return_status OUT NOCOPY VARCHAR2
3180: ,x_msg_count OUT NOCOPY NUMBER

Line 3191: from okc_k_lines_b cleb_sub,

3187: CURSOR c_get_tot_sub_amt_csr(p_asset_id number, p_subsidy_pool_id number) IS
3188: select SUM(decode(kle_sub.SUBSIDY_OVERRIDE_AMOUNT,
3189: null, nvl(kle_sub.AMOUNT,0),
3190: kle_sub.SUBSIDY_OVERRIDE_AMOUNT))
3191: from okc_k_lines_b cleb_sub,
3192: okc_line_styles_b lseb_sub,
3193: okl_k_lines kle_sub,
3194: okl_subsidies_b sub
3195: where kle_sub.id = cleb_sub.id And

Line 3202: from okc_k_lines_b cleb_sub1

3198: sub.subsidy_pool_id = p_subsidy_pool_id And
3199: lseb_sub.lty_code = 'SUBSIDY' And
3200: cleb_sub.sts_code <> 'ABANDONED' And
3201: cleb_sub.dnz_chr_id = (select dnz_chr_id
3202: from okc_k_lines_b cleb_sub1
3203: where cleb_sub1.id = p_asset_id);
3204: -- END: cklee 09/27/2005: 4634792
3205:
3206: CURSOR c_get_asset_csr IS

Line 3208: FROM okc_k_lines_b

3204: -- END: cklee 09/27/2005: 4634792
3205:
3206: CURSOR c_get_asset_csr IS
3207: SELECT start_date, currency_code
3208: FROM okc_k_lines_b
3209: WHERE id = p_asset_id;
3210: cv_get_asset c_get_asset_csr%ROWTYPE;
3211:
3212: CURSOR c_get_pool_amount_csr (p_subsidy_pool_id okl_subsidy_pools_b.id%TYPE)IS

Line 3631: from okc_k_lines_b cleb,

3627: x_return_status OUT NOCOPY VARCHAR2,
3628: p_subsidy_cle_id IN NUMBER) IS
3629: cursor l_subcle_csr (p_subsidy_cle_id in number) is
3630: select 'Y'
3631: from okc_k_lines_b cleb,
3632: okc_line_styles_b lseb
3633: where cleb.id = p_subsidy_cle_id
3634: and lseb.id = cleb.lse_id
3635: and lseb.lty_code = 'SUBSIDY'

Line 3729: from okc_k_lines_b cleb

3725: p_asset_cle_id IN NUMBER) IS
3726:
3727: cursor l_cle_csr (p_asset_cle_id in number) is
3728: select 'Y'
3729: from okc_k_lines_b cleb
3730: where cleb.id = p_asset_cle_id;
3731: --as per clarification by srawlings
3732: --and cleb.sts_code in ('NEW','COMPLETE','PASSED','INCOMPLETE','TERMINATED','APPROVED');
3733:

Line 3830: from okc_k_lines_b cleb

3826: cursor l_chrcle_csr (p_chr_id in number,
3827: p_asset_cle_id in number
3828: ) is
3829: select 'Y'
3830: from okc_k_lines_b cleb
3831: where cleb.id = p_asset_cle_id
3832: and cleb.dnz_chr_id = p_chr_id;
3833:
3834: /* cklee check from validate_record_after()

Line 3840: from okc_k_lines_b cleb

3836: cursor l_subcle_csr (p_subsidy_cle_id in number,
3837: p_asset_cle_id in number
3838: ) is
3839: select 'Y'
3840: from okc_k_lines_b cleb
3841: where cleb.id = p_subsidy_cle_id
3842: and cleb.cle_id = p_asset_cle_id;
3843:
3844: --tro check cpl_id is valid for subsidy line

Line 3877: okc_k_lines_b cleb,

3873: clet.name subsidy_name,
3874: clet_asst.name asset_number
3875: from okl_k_lines kle,
3876: okc_k_lines_tl clet,
3877: okc_k_lines_b cleb,
3878: okc_line_styles_b lseb,
3879: okc_k_lines_tl clet_asst
3880: where kle.id = cleb.id
3881: and kle.subsidy_id = p_subsidy_id

Line 3903: from okc_k_lines_b sub_cleb,

3899: from okl_subsidies_b subb
3900: where subb.id = p_subsidy_id
3901: and nvl(subb.exclusive_yn,'N') = 'Y'
3902: and exists (select '1'
3903: from okc_k_lines_b sub_cleb,
3904: okc_line_styles_b sub_lseb
3905: where sub_cleb.cle_id = p_asset_cle_id
3906: and sub_cleb.sts_code <> 'ABANDONED'
3907: and sub_cleb.id <> nvl(p_subsidy_cle_id,-999)

Line 4040: from okc_k_lines_b cleb

4036: cursor l_subcle_csr (p_subsidy_cle_id in number,
4037: p_asset_cle_id in number
4038: ) is
4039: select 'Y'
4040: from okc_k_lines_b cleb
4041: where cleb.id = p_subsidy_cle_id
4042: and cleb.cle_id = p_asset_cle_id;
4043:
4044: --to check cpl_id is valid for subsidy line

Line 4063: okc_k_lines_b cleb,

4059: clet.name subsidy_name,
4060: clet_asst.name asset_number
4061: from okl_k_lines kle,
4062: okc_k_lines_tl clet,
4063: okc_k_lines_b cleb,
4064: okc_line_styles_b lseb,
4065: okc_k_lines_tl clet_asst
4066: where kle.id = cleb.id
4067: and kle.subsidy_id = p_subsidy_id

Line 4094: from okc_k_lines_b sub_cleb,

4090: from okl_subsidies_b subb
4091: where subb.id = p_subsidy_id
4092: and nvl(subb.exclusive_yn,'N') = 'Y'
4093: and exists (select '1'
4094: from okc_k_lines_b sub_cleb,
4095: okc_line_styles_b sub_lseb
4096: where sub_cleb.cle_id = p_asset_cle_id
4097: and sub_cleb.sts_code <> 'ABANDONED'
4098: and sub_cleb.id <> nvl(p_subsidy_cle_id,-999)

Line 4108: okc_k_lines_b sub_cleb,

4104: cursor l_exclusive_csr(p_asset_cle_id in number) is
4105: Select 'Y',
4106: subb.name
4107: from okl_subsidies_b subb,
4108: okc_k_lines_b sub_cleb,
4109: okc_line_styles_b sub_lseb,
4110: okl_k_lines sub_kleb
4111: where sub_cleb.cle_id = p_asset_cle_id
4112: and sub_cleb.sts_code <> 'ABANDONED'

Line 4124: okc_k_lines_b sub_cleb,

4120: -- a p_asset_cle_id ('FREE_FORM1')
4121: cursor l_exclusive_csr2(p_asset_cle_id in number) is
4122: select count(1)
4123: from okl_subsidies_b subb,
4124: okc_k_lines_b sub_cleb,
4125: okc_line_styles_b sub_lseb,
4126: okl_k_lines sub_kleb
4127: where sub_cleb.cle_id = p_asset_cle_id
4128: and sub_cleb.sts_code <> 'ABANDONED'