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 2447: FROM okc_k_lines_b line, oks_k_lines_b dtl

2443:
2444: Cursor l_Line_Amt_Csr(p_line_id IN NUMBER) Is
2445: SELECT (nvl(line.price_negotiated,0) + nvl(dtl.ubt_amount,0) +
2446: nvl(dtl.credit_amount,0) + nvl(dtl.suppressed_credit,0) ) line_amt
2447: FROM okc_k_lines_b line, oks_k_lines_b dtl
2448: WHERE line.id = p_line_id
2449: AND line.id = dtl.cle_id;
2450:
2451: l_cp_sll_out_tbl StrmLvl_Out_tbl;

Line 2469: UPDATE OKS_K_LINES_B SET billing_schedule_type = p_billing_type

2465: LOOP
2466: l_cp_sll_tbl(l_index).cle_id := p_subline_rec.cp_id;
2467: END LOOP;
2468:
2469: UPDATE OKS_K_LINES_B SET billing_schedule_type = p_billing_type
2470: WHERE cle_id = p_subline_rec.cp_id;
2471:
2472: -----create 'SLL'RECORDS
2473:

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

2705:
2706:
2707: ----- Bug 5047257 Start
2708: Cursor l_element_count(p_sll_id in number, last_start_date in Date) is
2709: select count(a.id) periods from oks_level_elements a, oks_k_lines_b line
2710: where a.cle_id = ( select max(parent_cle_id) from oks_level_elements b where rul_id = p_sll_id )
2711: and a.date_start <= last_start_date
2712: and Line.cle_id = a.cle_id
2713: and Line.billing_schedule_type in ('T','E');

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

2713: and Line.billing_schedule_type in ('T','E');
2714: ----- Bug 5047257 End
2715:
2716: Cursor l_element_count1(p_sll_id in number, last_start_date in Date) is
2717: select count(a.id) periods from oks_level_elements a, oks_k_lines_b line,
2718: oks_stream_levels_b sll1,
2719: oks_stream_levels_b sll2
2720: where a.cle_id = ( select max(parent_cle_id) from oks_level_elements b where rul_id = p_sll_id )
2721: and a.date_start <= last_start_date

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

2725: and Line.cle_id = a.cle_id
2726: and Line.billing_schedule_type in ('T','E');
2727:
2728: Cursor l_element_count2(p_sll_id in number, last_start_date in Date) is
2729: select count(a.id) periods from oks_level_elements a, oks_k_lines_b line
2730: where a.cle_id = ( select max(parent_cle_id) from oks_level_elements b where rul_id = p_sll_id )
2731: and a.date_start <= last_start_date
2732: and Line.cle_id = a.cle_id
2733: and Line.billing_schedule_type in ('T','E');

Line 2976: from oks_k_lines_b dtl, okc_k_lines_b line

2972:
2973: CURSOR l_total_amt_csr IS
2974: select SUM(nvl(line.price_negotiated,0) + nvl(dtl.ubt_amount,0) +
2975: nvl(dtl.credit_amount,0) + nvl(dtl.suppressed_credit,0) ) tot_amt
2976: from oks_k_lines_b dtl, okc_k_lines_b line
2977: where line.id = dtl.cle_id
2978: AND line.dnz_chr_id = p_contract_id
2979: AND lse_id IN(1,12,14,19,46);
2980:

Line 4025: FROM okc_k_lines_b line, oks_k_lines_b dtl

4021: SELECT line.chr_id chr_id, line.dnz_chr_id dnz_chr_id, line.lse_id lse_id,
4022: TRUNC(line.start_date) line_start_dt, TRUNC(line.end_date) line_end_dt,
4023: (nvl(line.price_negotiated,0) + nvl(dtl.ubt_amount,0) +
4024: nvl(dtl.credit_amount,0) + nvl(dtl.suppressed_credit,0) ) line_amt
4025: FROM okc_k_lines_b line, oks_k_lines_b dtl
4026: WHERE line.id = dtl.cle_id AND line.Id = p_line_id ;
4027:
4028: CURSOR l_Line_Sll_Csr IS
4029: SELECT sll.Id , sll.sequence_no , sll.start_date, sll.level_periods,

Line 5077: FROM okc_k_lines_b line, oks_k_lines_b dtl

5073: TRUNC(line.end_date) cp_end_dt, TRUNC(line.date_terminated) cp_term_dt,
5074: dtl.full_credit full_credit,price_uom,lse_id cp_lse_id,
5075: (nvl(line.price_negotiated,0) + nvl(dtl.ubt_amount,0) +
5076: nvl(dtl.credit_amount,0) + nvl(dtl.suppressed_credit,0) ) subline_amt
5077: FROM okc_k_lines_b line, oks_k_lines_b dtl
5078: WHERE line.id = p_cp_line_id
5079: AND line.date_cancelled is NULL
5080: AND line.id = dtl.cle_id;
5081:

Line 5090: FROM okc_k_lines_b line, oks_k_lines_b dtl

5086: line.inv_rule_id inv_id,
5087: nvl(dtl.billing_schedule_type,'T') billing_schedule_type,
5088: (nvl(line.price_negotiated,0) + nvl(dtl.ubt_amount,0) +
5089: nvl(dtl.credit_amount,0) + nvl(dtl.suppressed_credit,0) ) line_amt
5090: FROM okc_k_lines_b line, oks_k_lines_b dtl
5091: WHERE line.id = dtl.cle_id AND line.Id = p_top_line_id
5092: AND line.date_cancelled is NULL;
5093:
5094: CURSOR l_line_sll_csr IS

Line 5577: FROM okc_k_lines_b line, oks_k_lines_b dtl

5573: line.inv_rule_id inv_id,
5574: nvl(dtl.billing_schedule_type,'T') billing_schedule_type,
5575: (nvl(line.price_negotiated,0) + nvl(dtl.ubt_amount,0) +
5576: nvl(dtl.credit_amount,0) + nvl(dtl.suppressed_credit,0) ) line_amt
5577: FROM okc_k_lines_b line, oks_k_lines_b dtl
5578: WHERE line.id = dtl.cle_id AND line.Id = p_top_line_id ;
5579:
5580: -------------------------------------------------------------------------
5581: -- Begin partial period computation logic

Line 5589: FROM oks_k_lines_b

5585: -- so adding the usage period in the cursor
5586: --------------------------------------------------------------------------
5587: CURSOR l_usage_type_csr IS
5588: SELECT usage_type,usage_period
5589: FROM oks_k_lines_b
5590: WHERE cle_id = p_top_line_id;
5591:
5592: -------------------------------------------------------------------------
5593: -- Begin partial period computation logic

Line 5601: FROM OKS_K_LINES_B

5597: -- top line . This is used as the default billing period for the service lines.
5598: --------------------------------------------------------------------------
5599: CURSOR Get_price_uom IS
5600: SELECT price_uom
5601: FROM OKS_K_LINES_B
5602: WHERE cle_id = p_top_line_id;
5603:
5604:
5605:

Line 7162: FROM okc_k_lines_b line, oks_k_lines_b dtl

7158: nvl(trunc(line.date_terminated - 1),TRUNC(line.end_date)) end_dt,
7159: nvl(dtl.billing_schedule_type,'T') billing_schedule_type,
7160: (nvl(line.price_negotiated,0) + nvl(dtl.ubt_amount,0) +
7161: nvl(dtl.credit_amount,0) + nvl(dtl.suppressed_credit,0) ) line_amt
7162: FROM okc_k_lines_b line, oks_k_lines_b dtl
7163: WHERE line.id = dtl.cle_id AND line.Id = p_top_line_id ;
7164:
7165:
7166:

Line 7377: UPDATE oks_k_lines_b

7373: delete FROM OKS_STREAM_LEVELS_B
7374: WHERE cle_id = p_top_line_id;
7375:
7376: --update billing type to null for cp
7377: UPDATE oks_k_lines_b
7378: set billing_schedule_type = NULL
7379: WHERE cle_id IN (SELECT id
7380: FROM OKC_k_LINES_B cp
7381: WHERE cp.cle_id = p_top_line_id

Line 7437: FROM oks_k_lines_b

7433:
7434:
7435: CURSOR l_bill_type_csr IS
7436: SELECT nvl(billing_schedule_type,'T') billing_schedule_type
7437: FROM oks_k_lines_b
7438: WHERE cle_id = p_sub_line_id;
7439:
7440:
7441:

Line 7613: FROM okc_k_lines_b ln, oks_k_lines_b dtl

7609:
7610: CURSOR l_line_csr IS
7611: SELECT ln.id id, ln.lse_id lse_id, nvl(TRUNC(ln.date_terminated -1),ln.end_date) line_end_date,
7612: dtl.usage_type usage_type, dtl.billing_schedule_type billing_schedule_type
7613: FROM okc_k_lines_b ln, oks_k_lines_b dtl
7614: WHERE ln.id = p_top_line_id
7615: AND dtl.cle_id = ln.id;
7616:
7617:

Line 8607: FROM okc_k_lines_b line, oks_k_lines_b dtl

8603: TRUNC(line.date_terminated) line_term_dt, line.inv_rule_id inv_rule_id,
8604: nvl(dtl.billing_schedule_type,'E') billing_schedule_type,
8605: (nvl(line.price_negotiated,0) + nvl(dtl.ubt_amount,0) +
8606: nvl(dtl.credit_amount,0) + nvl(dtl.suppressed_credit,0) ) line_amt
8607: FROM okc_k_lines_b line, oks_k_lines_b dtl
8608: WHERE line.id = dtl.cle_id AND line.Id = p_top_line_id ;
8609:
8610:
8611:

Line 8959: FROM okc_k_lines_b line, oks_k_lines_b dtl

8955: line.inv_rule_id inv_rule_id, line.cle_id cle_id,
8956: dtl.billing_schedule_type billing_schedule_type,
8957: (nvl(line.price_negotiated,0) + nvl(dtl.ubt_amount,0) +
8958: nvl(dtl.credit_amount,0) + nvl(dtl.suppressed_credit,0) ) line_amt
8959: FROM okc_k_lines_b line, oks_k_lines_b dtl
8960: WHERE line.id = dtl.cle_id AND line.Id = p_top_line_id
8961: AND line.date_cancelled is null; -- 18-JAN-2006-maanand-Fixed Enhancement#4930700
8962: -- Ignore cancelled topline
8963:

Line 8974: FROM okc_k_lines_b line, oks_k_lines_b dtl

8970: dtl.billing_schedule_type billing_schedule_type,
8971: dtl.full_credit full_credit,lse_id cp_lse_id,dtl.price_uom,
8972: (nvl(line.price_negotiated,0) + nvl(dtl.ubt_amount,0) +
8973: nvl(dtl.credit_amount,0) + nvl(dtl.suppressed_credit,0) ) subline_amt
8974: FROM okc_k_lines_b line, oks_k_lines_b dtl
8975: WHERE line.cle_id = l_line_id
8976: AND line.id = dtl.cle_id
8977: AND ((l_style_id = 1 and line.lse_id in (35,7,8,9,10,11))
8978: OR (l_style_id = 12 and line.lse_id = 13)

Line 9005: FROM okc_k_lines_b line, oks_k_lines_b dtl

9001: SELECT line.id subline_id, TRUNC(line.start_date) cp_start_dt,
9002: TRUNC(line.end_date) cp_end_dt, dtl.billing_schedule_type billing_schedule_type,dtl.price_uom,
9003: (nvl(line.price_negotiated,0) + nvl(dtl.ubt_amount,0) +
9004: nvl(dtl.credit_amount,0) + nvl(dtl.suppressed_credit,0) ) subline_amt
9005: FROM okc_k_lines_b line, oks_k_lines_b dtl
9006: WHERE line.id = p_sub_line_id
9007: AND line.id = dtl.cle_id
9008: AND line.date_cancelled is null; -- 18-JAN-2006-maanand-Fixed Enhancement#4930700
9009: -- Ignore cancelled subline

Line 10785: UPDATE oks_k_lines_b

10781: WHERE cle_id = p_line_id;
10782:
10783: ----update billing type to 'P'
10784:
10785: UPDATE oks_k_lines_b
10786: SET billing_schedule_type = 'P'
10787: WHERE cle_id = p_line_id;
10788:
10789:

Line 11649: FROM OKS_K_LINES_B

11645: ORDER BY START_DATE;
11646:
11647: CURSOR l_old_bill_type_csr IS
11648: SELECT billing_schedule_type
11649: FROM OKS_K_LINES_B
11650: WHERE cle_id = p_old_cp_id;
11651:
11652: CURSOR l_new_cp_csr IS
11653: SELECT id,end_date

Line 11662: l_old_bill_type OKS_K_LINES_B.billing_schedule_type%TYPE;

11658:
11659: l_old_sll_rec l_old_sll_csr%ROWTYPE;
11660: l_new_cp_rec l_new_cp_csr%ROWTYPE;
11661:
11662: l_old_bill_type OKS_K_LINES_B.billing_schedule_type%TYPE;
11663: l_sll_index NUMBER;
11664: l_index NUMBER;
11665: l_sll_end_date DATE;
11666:

Line 11822: UPDATE oks_k_lines_b

11818: END LOOP; ---for loop for sll out tbl
11819:
11820: --update bill type of new line
11821:
11822: UPDATE oks_k_lines_b
11823: SET billing_schedule_type = l_old_bill_type
11824: WHERE cle_id = p_new_cp_id;
11825:
11826: IF fnd_log.level_event >= fnd_log.g_current_runtime_level THEN

Line 11903: FROM okc_k_lines_b line, oks_k_lines_b dtl

11899: line.cle_id parent_id,line.inv_rule_id inv_rule_id,
11900: (nvl(line.price_negotiated,0) + nvl(dtl.ubt_amount,0) +
11901: nvl(dtl.credit_amount,0) + nvl(dtl.suppressed_credit,0) ) line_amt,
11902: dtl.billing_schedule_type billing_schedule_type
11903: FROM okc_k_lines_b line, oks_k_lines_b dtl
11904: WHERE line.id= p_line_id
11905: AND line.id = dtl.cle_id;
11906:
11907: CURSOR l_line_BS_csr(p_line_id NUMBER) IS

Line 11964: l_billing_type oks_k_lines_b.billing_schedule_type%type;

11960: -- End partial period computation logic
11961: -- Date 04-MAY-2005
11962: -------------------------------------------------------------------------
11963:
11964: l_billing_type oks_k_lines_b.billing_schedule_type%type;
11965: l_inv_rule_id number;
11966: l_top_line_id NUMBER;
11967: l_bs_id NUMBER;
11968: l_index NUMBER;

Line 12367: UPDATE OKS_K_LINES_B SET billing_schedule_type = l_billing_type

12363:
12364: IF l_line_rec.billing_schedule_type IS NULL OR
12365: l_line_rec.billing_schedule_type <> l_billing_type THEN
12366:
12367: UPDATE OKS_K_LINES_B SET billing_schedule_type = l_billing_type
12368: WHERE cle_id = l_new_cp_rec.cp_id;
12369:
12370:
12371: IF fnd_log.level_event >= fnd_log.g_current_runtime_level THEN

Line 12875: FROM oks_k_lines_b

12871: -- to get the billing schedule of the sub-line on which the status changes action is taken.
12872:
12873: CURSOR l_bill_type_csr IS
12874: SELECT nvl(billing_schedule_type,'T') billing_schedule_type
12875: FROM oks_k_lines_b
12876: WHERE cle_id = p_cle_id;
12877:
12878:
12879: CURSOR is_top_line_csr (p_cle_id number) IS