DBA Data[Home] [Help]

APPS.OKS_BILL_SCH dependencies on OKS_K_LINES_B

Line 412: Oks_k_lines_b kln,

408: kln.price_uom,
409: kln.toplvl_uom_code,
410: nvl(kln.ubt_amount,0) ubt_amount --bug#5359695
411: FROM okc_k_lines_b lin,
412: Oks_k_lines_b kln,
413: Okc_k_items itm
414: WHERE kln.cle_id = lin.id and
415: itm.cle_id = lin.id and
416: lin.id = p_cle_id;

Line 803: FROM OKC_K_LINES_b line, oks_k_lines_b det

799:
800: Cursor l_top_line_Csr(l_contract_id number, l_hdr_date date) Is
801: SELECT line.id id, line.inv_rule_id inv_rule_id, line.lse_id lse_id,
802: det.usage_type usage_type
803: FROM OKC_K_LINES_b line, oks_k_lines_b det
804: WHERE line.dnz_chr_id = l_contract_id
805: AND line.lse_id IN (1, 12, 14, 19, 46)
806: AND line.id = det.cle_id;
807:

Line 1065: UPDATE oks_k_lines_b

1061:
1062:
1063: END IF;
1064: /* Start Addition for bug fix 5945006 (FP Bug for 5926840) */
1065: UPDATE oks_k_lines_b
1066: SET acct_rule_id = l_acct_rule_id
1067: WHERE cle_id = l_top_line_rec.id;
1068: /* End Addition for bug fix 5945006 (FP Bug for 5926840) */
1069:

Line 1111: UPDATE oks_k_lines_b

1107: END IF;
1108: /* Start Addition for bug fix 5945006 (FP Bug for 5926840) */
1109: FOR c_subline_rec IN c_subline_csr(l_top_line_rec.id)
1110: LOOP
1111: UPDATE oks_k_lines_b
1112: SET acct_rule_id = l_acct_rule_id
1113: WHERE cle_id = c_subline_rec.id;
1114: END LOOP;
1115: /* End Addition for bug fix 5945006 (FP Bug for 5926840) */

Line 1189: FROM okc_k_lines_b line, oks_k_lines_b dtl

1185: dtl.billing_schedule_type billing_schedule_type,
1186: dtl.full_credit full_credit,
1187: (nvl(line.price_negotiated,0) + nvl(dtl.ubt_amount,0) +
1188: nvl(dtl.credit_amount,0) + nvl(dtl.suppressed_credit,0) ) subline_amt
1189: FROM okc_k_lines_b line, oks_k_lines_b dtl
1190: WHERE line.cle_id = l_line_id
1191: AND line.date_cancelled is NULL
1192: AND line.id = dtl.cle_id
1193: AND ((l_style_id = 1 and line.lse_id in (35,7,8,9,10,11))

Line 1211: FROM okc_k_lines_b line, oks_k_lines_b dtl

1207: dtl.full_credit full_credit,
1208: price_uom,
1209: (nvl(line.price_negotiated,0) + nvl(dtl.ubt_amount,0) +
1210: nvl(dtl.credit_amount,0) + nvl(dtl.suppressed_credit,0) ) line_amt
1211: FROM okc_k_lines_b line, oks_k_lines_b dtl
1212: WHERE line.id = dtl.cle_id AND line.Id = l_line_id
1213: AND line.date_cancelled is NULL;
1214:
1215: CURSOR l_line_BS_csr(p_line_id NUMBER) IS

Line 1423: UPDATE oks_k_lines_b set billing_schedule_type = p_billing_type

1419:
1420:
1421: -----create 'SLL'
1422:
1423: UPDATE oks_k_lines_b set billing_schedule_type = p_billing_type
1424: WHERE cle_id = l_line_csr_rec.id;
1425:
1426: -------------------------------------------------------------------------
1427: -- Begin partial period computation logic

Line 1785: UPDATE oks_k_lines_b

1781: ELSE ---unequal effectivity, with sll count = 0
1782:
1783: ----update billing type to 'P'
1784:
1785: UPDATE oks_k_lines_b
1786: SET billing_schedule_type = 'P'
1787: WHERE cle_id = l_subline_csr_rec.subline_id;
1788:
1789: IF fnd_log.level_event >= fnd_log.g_current_runtime_level THEN

Line 2430: FROM okc_k_lines_b line, oks_k_lines_b dtl

2426:
2427: Cursor l_Line_Amt_Csr(p_line_id IN NUMBER) Is
2428: SELECT (nvl(line.price_negotiated,0) + nvl(dtl.ubt_amount,0) +
2429: nvl(dtl.credit_amount,0) + nvl(dtl.suppressed_credit,0) ) line_amt
2430: FROM okc_k_lines_b line, oks_k_lines_b dtl
2431: WHERE line.id = p_line_id
2432: AND line.id = dtl.cle_id;
2433:
2434: l_cp_sll_out_tbl StrmLvl_Out_tbl;

Line 2452: UPDATE OKS_K_LINES_B SET billing_schedule_type = p_billing_type

2448: LOOP
2449: l_cp_sll_tbl(l_index).cle_id := p_subline_rec.cp_id;
2450: END LOOP;
2451:
2452: UPDATE OKS_K_LINES_B SET billing_schedule_type = p_billing_type
2453: WHERE cle_id = p_subline_rec.cp_id;
2454:
2455: -----create 'SLL'RECORDS
2456:

Line 2692: select count(a.id) periods from oks_level_elements a, oks_k_lines_b line

2688:
2689:
2690: ----- Bug 5047257 Start
2691: Cursor l_element_count(p_sll_id in number, last_start_date in Date) is
2692: select count(a.id) periods from oks_level_elements a, oks_k_lines_b line
2693: where a.cle_id = ( select max(parent_cle_id) from oks_level_elements b where rul_id = p_sll_id )
2694: and a.date_start <= last_start_date
2695: and Line.cle_id = a.cle_id
2696: and Line.billing_schedule_type in ('T','E');

Line 2700: select count(a.id) periods from oks_level_elements a, oks_k_lines_b line,

2696: and Line.billing_schedule_type in ('T','E');
2697: ----- Bug 5047257 End
2698:
2699: Cursor l_element_count1(p_sll_id in number, last_start_date in Date) is
2700: select count(a.id) periods from oks_level_elements a, oks_k_lines_b line,
2701: oks_stream_levels_b sll1,
2702: oks_stream_levels_b sll2
2703: where a.cle_id = ( select max(parent_cle_id) from oks_level_elements b where rul_id = p_sll_id )
2704: and a.date_start <= last_start_date

Line 2712: select count(a.id) periods from oks_level_elements a, oks_k_lines_b line

2708: and Line.cle_id = a.cle_id
2709: and Line.billing_schedule_type in ('T','E');
2710:
2711: Cursor l_element_count2(p_sll_id in number, last_start_date in Date) is
2712: select count(a.id) periods from oks_level_elements a, oks_k_lines_b line
2713: where a.cle_id = ( select max(parent_cle_id) from oks_level_elements b where rul_id = p_sll_id )
2714: and a.date_start <= last_start_date
2715: and Line.cle_id = a.cle_id
2716: and Line.billing_schedule_type in ('T','E');

Line 2959: from oks_k_lines_b dtl, okc_k_lines_b line

2955:
2956: CURSOR l_total_amt_csr IS
2957: select SUM(nvl(line.price_negotiated,0) + nvl(dtl.ubt_amount,0) +
2958: nvl(dtl.credit_amount,0) + nvl(dtl.suppressed_credit,0) ) tot_amt
2959: from oks_k_lines_b dtl, okc_k_lines_b line
2960: where line.id = dtl.cle_id
2961: AND line.dnz_chr_id = p_contract_id
2962: AND lse_id IN(1,12,14,19,46);
2963:

Line 4008: FROM okc_k_lines_b line, oks_k_lines_b dtl

4004: SELECT line.chr_id chr_id, line.dnz_chr_id dnz_chr_id, line.lse_id lse_id,
4005: TRUNC(line.start_date) line_start_dt, TRUNC(line.end_date) line_end_dt,
4006: (nvl(line.price_negotiated,0) + nvl(dtl.ubt_amount,0) +
4007: nvl(dtl.credit_amount,0) + nvl(dtl.suppressed_credit,0) ) line_amt
4008: FROM okc_k_lines_b line, oks_k_lines_b dtl
4009: WHERE line.id = dtl.cle_id AND line.Id = p_line_id ;
4010:
4011: CURSOR l_Line_Sll_Csr IS
4012: SELECT sll.Id , sll.sequence_no , sll.start_date, sll.level_periods,

Line 5060: FROM okc_k_lines_b line, oks_k_lines_b dtl

5056: TRUNC(line.end_date) cp_end_dt, TRUNC(line.date_terminated) cp_term_dt,
5057: dtl.full_credit full_credit,price_uom,lse_id cp_lse_id,
5058: (nvl(line.price_negotiated,0) + nvl(dtl.ubt_amount,0) +
5059: nvl(dtl.credit_amount,0) + nvl(dtl.suppressed_credit,0) ) subline_amt
5060: FROM okc_k_lines_b line, oks_k_lines_b dtl
5061: WHERE line.id = p_cp_line_id
5062: AND line.date_cancelled is NULL
5063: AND line.id = dtl.cle_id;
5064:

Line 5073: FROM okc_k_lines_b line, oks_k_lines_b dtl

5069: line.inv_rule_id inv_id,
5070: nvl(dtl.billing_schedule_type,'T') billing_schedule_type,
5071: (nvl(line.price_negotiated,0) + nvl(dtl.ubt_amount,0) +
5072: nvl(dtl.credit_amount,0) + nvl(dtl.suppressed_credit,0) ) line_amt
5073: FROM okc_k_lines_b line, oks_k_lines_b dtl
5074: WHERE line.id = dtl.cle_id AND line.Id = p_top_line_id
5075: AND line.date_cancelled is NULL;
5076:
5077: CURSOR l_line_sll_csr IS

Line 5560: FROM okc_k_lines_b line, oks_k_lines_b dtl

5556: line.inv_rule_id inv_id,
5557: nvl(dtl.billing_schedule_type,'T') billing_schedule_type,
5558: (nvl(line.price_negotiated,0) + nvl(dtl.ubt_amount,0) +
5559: nvl(dtl.credit_amount,0) + nvl(dtl.suppressed_credit,0) ) line_amt
5560: FROM okc_k_lines_b line, oks_k_lines_b dtl
5561: WHERE line.id = dtl.cle_id AND line.Id = p_top_line_id ;
5562:
5563: -------------------------------------------------------------------------
5564: -- Begin partial period computation logic

Line 5572: FROM oks_k_lines_b

5568: -- so adding the usage period in the cursor
5569: --------------------------------------------------------------------------
5570: CURSOR l_usage_type_csr IS
5571: SELECT usage_type,usage_period
5572: FROM oks_k_lines_b
5573: WHERE cle_id = p_top_line_id;
5574:
5575: -------------------------------------------------------------------------
5576: -- Begin partial period computation logic

Line 5584: FROM OKS_K_LINES_B

5580: -- top line . This is used as the default billing period for the service lines.
5581: --------------------------------------------------------------------------
5582: CURSOR Get_price_uom IS
5583: SELECT price_uom
5584: FROM OKS_K_LINES_B
5585: WHERE cle_id = p_top_line_id;
5586:
5587:
5588:

Line 6950: FROM okc_k_lines_b line, oks_k_lines_b dtl

6946: nvl(trunc(line.date_terminated - 1),TRUNC(line.end_date)) end_dt,
6947: nvl(dtl.billing_schedule_type,'T') billing_schedule_type,
6948: (nvl(line.price_negotiated,0) + nvl(dtl.ubt_amount,0) +
6949: nvl(dtl.credit_amount,0) + nvl(dtl.suppressed_credit,0) ) line_amt
6950: FROM okc_k_lines_b line, oks_k_lines_b dtl
6951: WHERE line.id = dtl.cle_id AND line.Id = p_top_line_id ;
6952:
6953:
6954:

Line 7165: UPDATE oks_k_lines_b

7161: delete FROM OKS_STREAM_LEVELS_B
7162: WHERE cle_id = p_top_line_id;
7163:
7164: --update billing type to null for cp
7165: UPDATE oks_k_lines_b
7166: set billing_schedule_type = NULL
7167: WHERE cle_id IN (SELECT id
7168: FROM OKC_k_LINES_B cp
7169: WHERE cp.cle_id = p_top_line_id

Line 7225: FROM oks_k_lines_b

7221:
7222:
7223: CURSOR l_bill_type_csr IS
7224: SELECT nvl(billing_schedule_type,'T') billing_schedule_type
7225: FROM oks_k_lines_b
7226: WHERE cle_id = p_sub_line_id;
7227:
7228:
7229:

Line 7400: FROM okc_k_lines_b ln, oks_k_lines_b dtl

7396:
7397: CURSOR l_line_csr IS
7398: SELECT ln.id id, ln.lse_id lse_id, nvl(TRUNC(ln.date_terminated -1),ln.end_date) line_end_date,
7399: dtl.usage_type usage_type, dtl.billing_schedule_type billing_schedule_type
7400: FROM okc_k_lines_b ln, oks_k_lines_b dtl
7401: WHERE ln.id = p_top_line_id
7402: AND dtl.cle_id = ln.id;
7403:
7404:

Line 8394: FROM okc_k_lines_b line, oks_k_lines_b dtl

8390: TRUNC(line.date_terminated) line_term_dt, line.inv_rule_id inv_rule_id,
8391: nvl(dtl.billing_schedule_type,'E') billing_schedule_type,
8392: (nvl(line.price_negotiated,0) + nvl(dtl.ubt_amount,0) +
8393: nvl(dtl.credit_amount,0) + nvl(dtl.suppressed_credit,0) ) line_amt
8394: FROM okc_k_lines_b line, oks_k_lines_b dtl
8395: WHERE line.id = dtl.cle_id AND line.Id = p_top_line_id ;
8396:
8397:
8398:

Line 8746: FROM okc_k_lines_b line, oks_k_lines_b dtl

8742: line.inv_rule_id inv_rule_id, line.cle_id cle_id,
8743: dtl.billing_schedule_type billing_schedule_type,
8744: (nvl(line.price_negotiated,0) + nvl(dtl.ubt_amount,0) +
8745: nvl(dtl.credit_amount,0) + nvl(dtl.suppressed_credit,0) ) line_amt
8746: FROM okc_k_lines_b line, oks_k_lines_b dtl
8747: WHERE line.id = dtl.cle_id AND line.Id = p_top_line_id
8748: AND line.date_cancelled is null; -- 18-JAN-2006-maanand-Fixed Enhancement#4930700
8749: -- Ignore cancelled topline
8750:

Line 8761: FROM okc_k_lines_b line, oks_k_lines_b dtl

8757: dtl.billing_schedule_type billing_schedule_type,
8758: dtl.full_credit full_credit,lse_id cp_lse_id,dtl.price_uom,
8759: (nvl(line.price_negotiated,0) + nvl(dtl.ubt_amount,0) +
8760: nvl(dtl.credit_amount,0) + nvl(dtl.suppressed_credit,0) ) subline_amt
8761: FROM okc_k_lines_b line, oks_k_lines_b dtl
8762: WHERE line.cle_id = l_line_id
8763: AND line.id = dtl.cle_id
8764: AND ((l_style_id = 1 and line.lse_id in (35,7,8,9,10,11))
8765: OR (l_style_id = 12 and line.lse_id = 13)

Line 8792: FROM okc_k_lines_b line, oks_k_lines_b dtl

8788: SELECT line.id subline_id, TRUNC(line.start_date) cp_start_dt,
8789: TRUNC(line.end_date) cp_end_dt, dtl.billing_schedule_type billing_schedule_type,dtl.price_uom,
8790: (nvl(line.price_negotiated,0) + nvl(dtl.ubt_amount,0) +
8791: nvl(dtl.credit_amount,0) + nvl(dtl.suppressed_credit,0) ) subline_amt
8792: FROM okc_k_lines_b line, oks_k_lines_b dtl
8793: WHERE line.id = p_sub_line_id
8794: AND line.id = dtl.cle_id
8795: AND line.date_cancelled is null; -- 18-JAN-2006-maanand-Fixed Enhancement#4930700
8796: -- Ignore cancelled subline

Line 10542: UPDATE oks_k_lines_b

10538: WHERE cle_id = p_line_id;
10539:
10540: ----update billing type to 'P'
10541:
10542: UPDATE oks_k_lines_b
10543: SET billing_schedule_type = 'P'
10544: WHERE cle_id = p_line_id;
10545:
10546:

Line 11406: FROM OKS_K_LINES_B

11402: ORDER BY START_DATE;
11403:
11404: CURSOR l_old_bill_type_csr IS
11405: SELECT billing_schedule_type
11406: FROM OKS_K_LINES_B
11407: WHERE cle_id = p_old_cp_id;
11408:
11409: CURSOR l_new_cp_csr IS
11410: SELECT id,end_date

Line 11419: l_old_bill_type OKS_K_LINES_B.billing_schedule_type%TYPE;

11415:
11416: l_old_sll_rec l_old_sll_csr%ROWTYPE;
11417: l_new_cp_rec l_new_cp_csr%ROWTYPE;
11418:
11419: l_old_bill_type OKS_K_LINES_B.billing_schedule_type%TYPE;
11420: l_sll_index NUMBER;
11421: l_index NUMBER;
11422: l_sll_end_date DATE;
11423:

Line 11579: UPDATE oks_k_lines_b

11575: END LOOP; ---for loop for sll out tbl
11576:
11577: --update bill type of new line
11578:
11579: UPDATE oks_k_lines_b
11580: SET billing_schedule_type = l_old_bill_type
11581: WHERE cle_id = p_new_cp_id;
11582:
11583: IF fnd_log.level_event >= fnd_log.g_current_runtime_level THEN

Line 11660: FROM okc_k_lines_b line, oks_k_lines_b dtl

11656: line.cle_id parent_id,line.inv_rule_id inv_rule_id,
11657: (nvl(line.price_negotiated,0) + nvl(dtl.ubt_amount,0) +
11658: nvl(dtl.credit_amount,0) + nvl(dtl.suppressed_credit,0) ) line_amt,
11659: dtl.billing_schedule_type billing_schedule_type
11660: FROM okc_k_lines_b line, oks_k_lines_b dtl
11661: WHERE line.id= p_line_id
11662: AND line.id = dtl.cle_id;
11663:
11664: CURSOR l_line_BS_csr(p_line_id NUMBER) IS

Line 11721: l_billing_type oks_k_lines_b.billing_schedule_type%type;

11717: -- End partial period computation logic
11718: -- Date 04-MAY-2005
11719: -------------------------------------------------------------------------
11720:
11721: l_billing_type oks_k_lines_b.billing_schedule_type%type;
11722: l_inv_rule_id number;
11723: l_top_line_id NUMBER;
11724: l_bs_id NUMBER;
11725: l_index NUMBER;

Line 12101: UPDATE OKS_K_LINES_B SET billing_schedule_type = l_billing_type

12097:
12098: IF l_line_rec.billing_schedule_type IS NULL OR
12099: l_line_rec.billing_schedule_type <> l_billing_type THEN
12100:
12101: UPDATE OKS_K_LINES_B SET billing_schedule_type = l_billing_type
12102: WHERE cle_id = l_new_cp_rec.cp_id;
12103:
12104:
12105: IF fnd_log.level_event >= fnd_log.g_current_runtime_level THEN

Line 12609: FROM oks_k_lines_b

12605: -- to get the billing schedule of the sub-line on which the status changes action is taken.
12606:
12607: CURSOR l_bill_type_csr IS
12608: SELECT nvl(billing_schedule_type,'T') billing_schedule_type
12609: FROM oks_k_lines_b
12610: WHERE cle_id = p_cle_id;
12611:
12612:
12613: CURSOR is_top_line_csr (p_cle_id number) IS