DBA Data[Home] [Help]

APPS.OKC_CONTRACT_PVT dependencies on OKC_K_LINES_B

Line 722: UPDATE okc_k_lines_b

718: -- Update Currency change
719: If (x_return_status = OKC_API.G_RET_STS_SUCCESS) Then
720: -- If currency code changed, update all lines
721: If (x_chrv_rec.currency_code <> l_currency_code) Then
722: UPDATE okc_k_lines_b
723: SET currency_code = x_chrv_rec.currency_code
724: WHERE dnz_chr_id = x_chrv_rec.id;
725: End If;
726: /*commented and written above for bug6688656

Line 944: UPDATE okc_k_lines_b

940: -- Update Currency change
941: If (x_return_status = OKC_API.G_RET_STS_SUCCESS) Then
942: -- If currency code changed, update all lines
943: If (x_chrv_rec.currency_code <> l_currency_code) Then
944: UPDATE okc_k_lines_b
945: SET currency_code = x_chrv_rec.currency_code
946: WHERE dnz_chr_id = x_chrv_rec.id;
947: End If;
948: /*commented and written above for the bug6688656

Line 985: from OKC_K_LINES_B

981: l_major_version FND_ATTACHED_DOCUMENTS.PK2_VALUE%TYPE;
982:
983: Cursor l_clev_csr Is
984: select count(*)
985: from OKC_K_LINES_B
986: where chr_id = p_chrv_rec.id;
987:
988: Cursor l_crjv_csr Is
989: SELECT id, object_version_number

Line 1374: FROM OKC_K_LINES_B

1370: x_chr_id OUT NOCOPY NUMBER,
1371: x_return_status OUT NOCOPY VARCHAR2) Is
1372: Cursor l_clev_csr Is
1373: SELECT dnz_chr_id
1374: FROM OKC_K_LINES_B
1375: WHERE id = p_clev_rec.id;
1376: BEGIN
1377: -- initialize return status
1378: x_return_status := OKC_API.G_RET_STS_SUCCESS;

Line 1763: from OKC_K_LINES_B

1759: l_major_version FND_ATTACHED_DOCUMENTS.PK2_VALUE%TYPE;
1760:
1761: Cursor l_clev_csr Is
1762: select count(*)
1763: from OKC_K_LINES_B
1764: where cle_id = p_clev_rec.id;
1765:
1766: Cursor l_cimv_csr Is
1767: select count(*)

Line 2002: l_entity_name => 'OKC_K_LINES_B',

1998:
1999: -- Delete any attachments assiciated with this line
2000: If (x_return_status = OKC_API.G_RET_STS_SUCCESS) Then
2001: If (fnd_attachment_util_pkg.get_atchmt_exists (
2002: l_entity_name => 'OKC_K_LINES_B',
2003: l_pkey1 => p_clev_rec.id,
2004: l_pkey2 => l_major_version) = 'Y')
2005:
2006: -- The following line to be added to the code once

Line 2013: x_entity_name => 'OKC_K_LINES_B',

2009: -- also below remove the comments
2010: -- in fnd_attached_documents2_pkg.delete_attachments call
2011: Then
2012: fnd_attached_documents2_pkg.delete_attachments(
2013: x_entity_name => 'OKC_K_LINES_B',
2014: x_pk1_value => p_clev_rec.id,
2015: x_pk2_value => l_major_version
2016: );
2017: End If;

Line 2083: FROM okc_k_lines_b

2079: v_Index Binary_Integer;
2080:
2081: CURSOR DNZ_Cur(p_id NUMBER) IS
2082: SELECT dnz_chr_id
2083: FROM okc_k_lines_b
2084: WHERE id = p_id;
2085: CURSOR Child_Cur1(P_Parent_Id IN NUMBER)
2086: IS SELECT ID
2087: FROM Okc_K_Lines_b

Line 2087: FROM Okc_K_Lines_b

2083: FROM okc_k_lines_b
2084: WHERE id = p_id;
2085: CURSOR Child_Cur1(P_Parent_Id IN NUMBER)
2086: IS SELECT ID
2087: FROM Okc_K_Lines_b
2088: WHERE cle_Id=P_Parent_Id;
2089: CURSOR Child_Cur2(P_Parent_Id IN NUMBER)
2090: IS SELECT ID
2091: FROM Okc_K_Lines_b

Line 2091: FROM Okc_K_Lines_b

2087: FROM Okc_K_Lines_b
2088: WHERE cle_Id=P_Parent_Id;
2089: CURSOR Child_Cur2(P_Parent_Id IN NUMBER)
2090: IS SELECT ID
2091: FROM Okc_K_Lines_b
2092: WHERE cle_Id=P_Parent_Id;
2093: CURSOR Child_Cur3(P_Parent_Id IN NUMBER)
2094: IS SELECT ID
2095: FROM Okc_K_Lines_b

Line 2095: FROM Okc_K_Lines_b

2091: FROM Okc_K_Lines_b
2092: WHERE cle_Id=P_Parent_Id;
2093: CURSOR Child_Cur3(P_Parent_Id IN NUMBER)
2094: IS SELECT ID
2095: FROM Okc_K_Lines_b
2096: WHERE cle_Id=P_Parent_Id;
2097: CURSOR Child_Cur4(P_Parent_Id IN NUMBER)
2098: IS SELECT ID
2099: FROM Okc_K_Lines_b

Line 2099: FROM Okc_K_Lines_b

2095: FROM Okc_K_Lines_b
2096: WHERE cle_Id=P_Parent_Id;
2097: CURSOR Child_Cur4(P_Parent_Id IN NUMBER)
2098: IS SELECT ID
2099: FROM Okc_K_Lines_b
2100: WHERE cle_Id=P_Parent_Id;
2101: CURSOR Child_Cur5(P_Parent_Id IN NUMBER)
2102: IS SELECT ID
2103: FROM Okc_K_Lines_b

Line 2103: FROM Okc_K_Lines_b

2099: FROM Okc_K_Lines_b
2100: WHERE cle_Id=P_Parent_Id;
2101: CURSOR Child_Cur5(P_Parent_Id IN NUMBER)
2102: IS SELECT ID
2103: FROM Okc_K_Lines_b
2104: WHERE cle_Id=P_Parent_Id;
2105:
2106: CURSOR Item_Cur(P_Line_Id IN NUMBER)
2107: IS SELECT ID

Line 2184: SELECT COUNT(*) FROM OKC_K_LINES_B

2180: x_return_status OUT NOCOPY VARCHAR2) IS
2181: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
2182: l_Count NUMBER;
2183: CURSOR Cur_Line(P_Line_Id IN NUMBER) IS
2184: SELECT COUNT(*) FROM OKC_K_LINES_B
2185: WHERE id=P_Line_Id;
2186: BEGIN
2187: IF P_Line_id = OKC_API.G_MISS_NUM OR
2188: P_Line_Id IS NULL

Line 2538: FROM okc_k_lines_b

2534: v_Index Binary_Integer;
2535:
2536: CURSOR DNZ_Cur(p_id NUMBER) IS
2537: SELECT dnz_chr_id
2538: FROM okc_k_lines_b
2539: WHERE id = p_id;
2540: CURSOR Child_Cur1(P_Parent_Id IN NUMBER)
2541: IS SELECT ID
2542: FROM Okc_K_Lines_b

Line 2542: FROM Okc_K_Lines_b

2538: FROM okc_k_lines_b
2539: WHERE id = p_id;
2540: CURSOR Child_Cur1(P_Parent_Id IN NUMBER)
2541: IS SELECT ID
2542: FROM Okc_K_Lines_b
2543: WHERE cle_Id=P_Parent_Id;
2544: CURSOR Child_Cur2(P_Parent_Id IN NUMBER)
2545: IS SELECT ID
2546: FROM Okc_K_Lines_b

Line 2546: FROM Okc_K_Lines_b

2542: FROM Okc_K_Lines_b
2543: WHERE cle_Id=P_Parent_Id;
2544: CURSOR Child_Cur2(P_Parent_Id IN NUMBER)
2545: IS SELECT ID
2546: FROM Okc_K_Lines_b
2547: WHERE cle_Id=P_Parent_Id;
2548: CURSOR Child_Cur3(P_Parent_Id IN NUMBER)
2549: IS SELECT ID
2550: FROM Okc_K_Lines_b

Line 2550: FROM Okc_K_Lines_b

2546: FROM Okc_K_Lines_b
2547: WHERE cle_Id=P_Parent_Id;
2548: CURSOR Child_Cur3(P_Parent_Id IN NUMBER)
2549: IS SELECT ID
2550: FROM Okc_K_Lines_b
2551: WHERE cle_Id=P_Parent_Id;
2552: CURSOR Child_Cur4(P_Parent_Id IN NUMBER)
2553: IS SELECT ID
2554: FROM Okc_K_Lines_b

Line 2554: FROM Okc_K_Lines_b

2550: FROM Okc_K_Lines_b
2551: WHERE cle_Id=P_Parent_Id;
2552: CURSOR Child_Cur4(P_Parent_Id IN NUMBER)
2553: IS SELECT ID
2554: FROM Okc_K_Lines_b
2555: WHERE cle_Id=P_Parent_Id;
2556: CURSOR Child_Cur5(P_Parent_Id IN NUMBER)
2557: IS SELECT ID
2558: FROM Okc_K_Lines_b

Line 2558: FROM Okc_K_Lines_b

2554: FROM Okc_K_Lines_b
2555: WHERE cle_Id=P_Parent_Id;
2556: CURSOR Child_Cur5(P_Parent_Id IN NUMBER)
2557: IS SELECT ID
2558: FROM Okc_K_Lines_b
2559: WHERE cle_Id=P_Parent_Id;
2560:
2561: CURSOR Item_Cur(P_Line_Id IN NUMBER)
2562: IS SELECT ID

Line 2635: SELECT COUNT(*) FROM OKC_K_LINES_B

2631: x_return_status OUT NOCOPY VARCHAR2) IS
2632: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
2633: l_Count NUMBER;
2634: CURSOR Cur_Line(P_Line_Id IN NUMBER) IS
2635: SELECT COUNT(*) FROM OKC_K_LINES_B
2636: WHERE id=P_Line_Id;
2637: BEGIN
2638:
2639: IF (l_debug = 'Y') THEN

Line 4345: FROM okc_k_lines_b

4341: AND SUBJECT_CLE_ID is not null;
4342:
4343: Cursor cle_csr(p_subject_chr_id NUMBER, p_object_chr_id NUMBER) Is
4344: SELECT count(*)
4345: FROM okc_k_lines_b
4346: WHERE id IN (SELECT OBJECT_CLE_ID
4347: FROM okc_operation_lines
4348: WHERE SUBJECT_CHR_ID = p_subject_chr_id
4349: AND OBJECT_CHR_ID = p_object_chr_id)

Line 4439: UPDATE OKC_K_LINES_B

4435: --
4436: -- clear date_renewed in source contact(s) lines
4437: -- only for those lines in target contract
4438: --
4439: UPDATE OKC_K_LINES_B
4440: SET date_renewed = decode(l_active_yn,'Y',sysdate,null),
4441: object_version_number = object_version_number + 1,
4442: last_updated_by = FND_GLOBAL.USER_ID,
4443: last_update_date = sysdate,

Line 4567: OKC_K_LINES_B

4563: l_return_status VARCHAR2(1) := OKC_API.G_RET_STS_SUCCESS;
4564:
4565: CURSOR l_line_csr IS
4566: SELECT display_sequence from
4567: OKC_K_LINES_B
4568: connect by prior cle_id = id
4569: start with id = p_cle_id;
4570:
4571: CURSOR l_k_code_csr IS

Line 4574: (select dnz_chr_id from okc_k_lines_b where id =p_cle_id));

4570:
4571: CURSOR l_k_code_csr IS
4572: SELECT cls_code from
4573: OKC_SUBCLASSES_B WHERE code=(SELECT scs_code from OKC_K_HEADERS_B where id in
4574: (select dnz_chr_id from okc_k_lines_b where id =p_cle_id));
4575:
4576: CURSOR l_chk_cle_csr IS
4577: SELECT clev.cle_id,RTRIM(clev.line_number) line_number,clev.lse_id
4578: FROM OKC_K_LINES_V clev

Line 4583: FROM OKC_K_LINES_B

4579: WHERE clev.id = p_cle_id;
4580:
4581: CURSOR l_get_top_line_number_csr (p_line_id NUMBER) IS
4582: SELECT line_number
4583: FROM OKC_K_LINES_B
4584: WHERE id = p_line_id;
4585:
4586: CURSOR l_line_name_csr IS
4587: SELECT line_number "LINE_NAME"

Line 4720: from okc_k_lines_b

4716: --Cursor to get topline id for a particular subline; For a topline this will return NULL
4717:
4718: Cursor get_line_lvl_csr is
4719: Select cle_id
4720: from okc_k_lines_b
4721: where id = p_cle_id
4722: and dnz_chr_id = p_id;
4723:
4724: --Cursor to fetch amount for a particular subline

Line 4728: from okc_k_lines_b cle

4724: --Cursor to fetch amount for a particular subline
4725:
4726: Cursor get_subline_amt_csr (p_cle_id NUMBER) IS
4727: Select cle.price_negotiated
4728: from okc_k_lines_b cle
4729: where cle.id = p_cle_id
4730: and cle.dnz_chr_id = p_id;
4731:
4732: --Cursor to add price_negotiated and cancelled_amount of all the toplines

Line 4736: from okc_k_lines_b cle

4732: --Cursor to add price_negotiated and cancelled_amount of all the toplines
4733:
4734: Cursor get_hdr_amts_csr IS
4735: select nvl(sum(nvl(price_negotiated,0)),0), nvl(sum(nvl(cancelled_amount,0)),0)
4736: from okc_k_lines_b cle
4737: where cle.dnz_chr_id = p_id
4738: and cle.lse_id in (1, 12, 14, 19, 46)
4739: and cle.cle_id is null;
4740:

Line 4745: from okc_k_lines_b

4741: --Cursor to fectch lse_id of topline
4742:
4743: Cursor get_lse_id_csr (p_cle_id NUMBER) IS
4744: select lse_id
4745: from okc_k_lines_b
4746: where id=p_cle_id;
4747:
4748:
4749: --Cursor to add price_negotiated for all the sublines of a topline which are not in cancelled status

Line 4753: from okc_k_lines_b

4749: --Cursor to add price_negotiated for all the sublines of a topline which are not in cancelled status
4750:
4751: Cursor get_uncancelled_amt_csr(p_cle_id number, p_id number) IS
4752: select nvl(sum(nvl(price_negotiated,0)),0)
4753: from okc_k_lines_b
4754: where cle_id = p_cle_id
4755: and dnz_chr_id = p_id
4756: and date_cancelled is null;
4757:

Line 4766: FROM okc_k_lines_b

4762: -- i.e. term_cancel_source is not ('IBTRANSFER', 'IBRETURN', 'IBTERMINATE', 'IBREPLACE')
4763:
4764: CURSOR get_topline_id_csr IS
4765: SELECT id,lse_id,cancelled_amount
4766: FROM okc_k_lines_b
4767: WHERE dnz_chr_id = p_id
4768: and cle_id is null
4769: and term_cancel_source is null;
4770:

Line 4774: from okc_k_lines_b cle

4770:
4771: /*Added for bug:8775250*/
4772: Cursor get_subline_canamt_csr(p_cle_id NUMBER) IS
4773: select cle.cancelled_amount
4774: from okc_k_lines_b cle
4775: where cle.id = p_cle_id
4776: and cle.dnz_chr_id = p_id
4777: and cle.lse_id in (7, 8, 9, 10, 11, 13, 18, 25, 35) ;
4778:

Line 4781: from okc_k_lines_b cle,

4777: and cle.lse_id in (7, 8, 9, 10, 11, 13, 18, 25, 35) ;
4778:
4779: Cursor get_subline_price_csr(p_cle_id NUMBER) IS
4780: select okslb.id,okslb.price_negotiated
4781: from okc_k_lines_b cle,
4782: okc_k_lines_b okslb
4783: where cle.id = p_cle_id
4784: and okslb.lse_id in (7, 8, 9, 10, 11, 13, 18, 25, 35)
4785: and okslb.cle_id =cle.id

Line 4782: okc_k_lines_b okslb

4778:
4779: Cursor get_subline_price_csr(p_cle_id NUMBER) IS
4780: select okslb.id,okslb.price_negotiated
4781: from okc_k_lines_b cle,
4782: okc_k_lines_b okslb
4783: where cle.id = p_cle_id
4784: and okslb.lse_id in (7, 8, 9, 10, 11, 13, 18, 25, 35)
4785: and okslb.cle_id =cle.id
4786: and okslb.term_cancel_source IN ('MANUAL','CUSTOMER') ----Modified condition for bug 12956286

Line 4791: from okc_k_lines_b cle,

4787: and okslb.date_cancelled is not null;
4788:
4789: Cursor get_subline_cancel_csr(p_cle_id NUMBER) IS
4790: select okslb.id,okslb.cancelled_amount
4791: from okc_k_lines_b cle,
4792: okc_k_lines_b okslb
4793: where cle.id = p_cle_id
4794: and okslb.lse_id in (7, 8, 9, 10, 11, 13, 18, 25, 35)
4795: and okslb.cle_id =cle.id

Line 4792: okc_k_lines_b okslb

4788:
4789: Cursor get_subline_cancel_csr(p_cle_id NUMBER) IS
4790: select okslb.id,okslb.cancelled_amount
4791: from okc_k_lines_b cle,
4792: okc_k_lines_b okslb
4793: where cle.id = p_cle_id
4794: and okslb.lse_id in (7, 8, 9, 10, 11, 13, 18, 25, 35)
4795: and okslb.cle_id =cle.id
4796: and okslb.date_cancelled is null;

Line 4800: from okc_k_lines_b oklb,

4796: and okslb.date_cancelled is null;
4797:
4798: Cursor get_lines_id(p_id number) IS
4799: select oklb.id,oklb.price_negotiated
4800: from okc_k_lines_b oklb,
4801: okc_k_headers_all_b okhb
4802: where oklb.chr_id = okhb.id
4803: and okhb.id = p_id
4804: and oklb.lse_id in (1,12,14,19,46);

Line 4854: Update okc_k_lines_b

4850: IF (l_debug = 'Y') THEN
4851: okc_debug.log('2320: ENTERED -> CANCELLED; Updating price_negotiated and cancelled_amount for the topline of the subline');
4852: END IF;
4853:
4854: Update okc_k_lines_b
4855: set price_negotiated = nvl(price_negotiated,0) - nvl(l_sub_line_amt,0),
4856: cancelled_amount = nvl(cancelled_amount,0) + nvl(l_sub_line_amt,0)
4857: Where id = l_cle_id -- top line id
4858: and dnz_chr_id = p_id;

Line 4861: Update okc_k_lines_b

4857: Where id = l_cle_id -- top line id
4858: and dnz_chr_id = p_id;
4859:
4860: /*Bug:6765336 Updating the subline when it is cancelled*/
4861: Update okc_k_lines_b
4862: set price_negotiated = nvl(price_negotiated,0) - nvl(l_sub_line_amt,0),
4863: cancelled_amount = nvl(cancelled_amount,0) + nvl(l_sub_line_amt,0)
4864: Where cle_id = l_cle_id
4865: and id= p_cle_id

Line 4878: Update okc_k_lines_b

4874: Open get_subline_canamt_csr(p_cle_id);
4875: Fetch get_subline_canamt_csr into l_can_line_amt;
4876: Close get_subline_canamt_csr;
4877:
4878: Update okc_k_lines_b
4879: set price_negotiated = nvl(price_negotiated,0) + nvl(l_can_line_amt,0),
4880: cancelled_amount = nvl(cancelled_amount,0) - nvl(l_can_line_amt,0)
4881: Where cle_id = l_cle_id
4882: and id= p_cle_id

Line 4885: Update okc_k_lines_b

4881: Where cle_id = l_cle_id
4882: and id= p_cle_id
4883: and dnz_chr_id = p_id;
4884:
4885: Update okc_k_lines_b
4886: set price_negotiated = nvl(price_negotiated,0) + nvl(l_can_line_amt,0), /*Changed for bug:8775250*/
4887: cancelled_amount = nvl(cancelled_amount,0) - nvl(l_can_line_amt,0)
4888: Where id = l_cle_id -- top line id
4889: And dnz_chr_id = p_id;

Line 4906: Update okc_k_lines_b

4902: IF (l_debug = 'Y') THEN
4903: okc_debug.log ('2410: ENTERED -> CANCELLED; Updating price_negotiated and cancelled_amount for topline');
4904: END IF;
4905:
4906: Update okc_k_lines_b
4907: set cancelled_amount = nvl(cancelled_amount, 0) + nvl(price_negotiated, 0),
4908: price_negotiated = 0
4909: Where id = p_cle_id
4910: and dnz_chr_id = p_id;

Line 4914: Update okc_k_lines_b

4910: and dnz_chr_id = p_id;
4911: /*Added for bug:8775250*/
4912: FOR get_subline_price_csr_rec IN get_subline_price_csr(p_cle_id)
4913: LOOP
4914: Update okc_k_lines_b
4915: set price_negotiated = nvl(price_negotiated,0) - nvl(get_subline_price_csr_rec.price_negotiated,0),
4916: cancelled_amount = nvl(cancelled_amount,0) + nvl(get_subline_price_csr_rec.price_negotiated,0)
4917: Where cle_id = p_cle_id
4918: and id= get_subline_price_csr_rec.id

Line 4938: Update okc_k_lines_b

4934: END IF;
4935:
4936: --updating the topline price_negotiated and cancelled_amount for SUBSCRIPTION line type
4937:
4938: Update okc_k_lines_b
4939: set price_negotiated = nvl(cancelled_amount,0),
4940: cancelled_amount = 0
4941: Where id = p_cle_id
4942: and dnz_chr_id = p_id;

Line 4953: Update okc_k_lines_b

4949: END IF;
4950: /*Added for bug:8775250*/
4951: FOR get_subline_cancel_csr_rec IN get_subline_cancel_csr(p_cle_id)
4952: LOOP
4953: Update okc_k_lines_b
4954: set price_negotiated = nvl(price_negotiated,0) + nvl(get_subline_cancel_csr_rec.cancelled_amount,0),
4955: cancelled_amount = nvl(cancelled_amount,0) - nvl(get_subline_cancel_csr_rec.cancelled_amount,0)
4956: Where cle_id = p_cle_id
4957: and id= get_subline_cancel_csr_rec.id

Line 4966: Update okc_k_lines_b

4962: Close get_uncancelled_amt_csr;
4963:
4964: -- updating price_negotiated and cancelled_amount for top line which are not of type SUBSCRIPTION
4965:
4966: Update okc_k_lines_b
4967: set price_negotiated = nvl(price_negotiated, 0) + nvl(l_uncancelled_amt,0),
4968: cancelled_amount = nvl(cancelled_amount,0) - nvl(l_uncancelled_amt,0)
4969: Where id = p_cle_id
4970: and dnz_chr_id = p_id;

Line 4994: update okc_k_lines_b

4990: END IF;
4991:
4992: -- updating price_negotiated and cancelled_amount for all the top lines of the contract
4993:
4994: update okc_k_lines_b
4995: set cancelled_amount = nvl(cancelled_amount, 0) + nvl(price_negotiated, 0),
4996: price_negotiated = 0
4997: where dnz_chr_id = p_id
4998: and cle_id is NULL

Line 5005: Update okc_k_lines_b

5001: FOR get_lines_id_rec IN get_lines_id(p_id)
5002: LOOP
5003: FOR get_subline_price_csr_rec IN get_subline_price_csr(get_lines_id_rec.ID)
5004: LOOP
5005: Update okc_k_lines_b
5006: set price_negotiated = nvl(price_negotiated,0) - nvl(get_subline_price_csr_rec.price_negotiated,0),
5007: cancelled_amount = nvl(cancelled_amount,0) + nvl(get_subline_price_csr_rec.price_negotiated,0)
5008: Where cle_id = get_lines_id_rec.id
5009: and id= get_subline_price_csr_rec.id

Line 5025: Update okc_k_lines_b

5021: FOR get_lines_id_rec IN get_lines_id(p_id)
5022: LOOP
5023: FOR get_subline_cancel_csr_rec IN get_subline_cancel_csr(get_lines_id_rec.ID)
5024: LOOP
5025: Update okc_k_lines_b
5026: set price_negotiated = nvl(price_negotiated,0) + nvl(get_subline_cancel_csr_rec.cancelled_amount,0),
5027: cancelled_amount = nvl(cancelled_amount,0) - nvl(get_subline_cancel_csr_rec.cancelled_amount,0)
5028: Where cle_id = get_lines_id_rec.id
5029: and id= get_subline_cancel_csr_rec.id

Line 5038: Update okc_k_lines_b

5034: For topline In get_topline_id_csr
5035: Loop
5036: /*Bug:8775250 Included to populate the line amount for the Subscription line */
5037: IF (topline.lse_id = 46 ) THEN
5038: Update okc_k_lines_b
5039: set price_negotiated = nvl(price_negotiated,0) + nvl(topline.cancelled_amount,0),
5040: cancelled_amount = nvl(cancelled_amount,0) - nvl(topline.cancelled_amount,0)
5041: Where id = topline.id
5042: and dnz_chr_id = p_id;

Line 5051: Update okc_k_lines_b

5047: Close get_uncancelled_amt_csr;
5048:
5049: -- updating price_negotiated and cancelled_amount for selected top line
5050:
5051: Update okc_k_lines_b
5052: set price_negotiated = nvl(price_negotiated, 0) + nvl(l_uncancelled_amt,0),
5053: cancelled_amount = nvl(cancelled_amount,0) - nvl(l_uncancelled_amt,0)
5054: Where id = topline.id
5055: and dnz_chr_id = p_id;

Line 5063: update okc_k_lines_b

5059:
5060: /**
5061: -- updating price_negotiated and cancelled_amount for all the top lines of the contract
5062:
5063: update okc_k_lines_b
5064: set price_negotiated = nvl(price_negotiated, 0) + nvl(cancelled_amount, 0),
5065: cancelled_amount = 0
5066: where dnz_chr_id = p_id
5067: and cle_id is NULL

Line 5174: FROM okc_k_lines_b

5170:
5171:
5172: Cursor get_top_line_cancelled_amt IS
5173: SELECT nvl(cancelled_amount, 0)
5174: FROM okc_k_lines_b
5175: WHERE id = p_cle_id
5176: and dnz_chr_id = p_id;
5177:
5178: Cursor get_sub_line_cancelled_amt IS

Line 5180: FROM okc_k_lines_b

5176: and dnz_chr_id = p_id;
5177:
5178: Cursor get_sub_line_cancelled_amt IS
5179: SELECT nvl(price_negotiated, 0)
5180: FROM okc_k_lines_b
5181: WHERE id = p_cle_id
5182: and dnz_chr_id = p_id
5183: and date_cancelled is not null;
5184:

Line 5187: FROM okc_k_lines_b

5183: and date_cancelled is not null;
5184:
5185: Cursor get_line_lvl_csr IS
5186: SELECT cle_id
5187: FROM okc_k_lines_b
5188: WHERE id = p_cle_id
5189: and dnz_chr_id = p_id;
5190:
5191:

Line 5245: from okc_k_lines_b olb, okc_operation_lines opl

5241: --Fix Bug#4927824 18-JAN-2006 maanand
5242:
5243: cursor trn_source_code (p_target_line_id NUMBER) IS
5244: Select term_cancel_source, object_cle_id
5245: from okc_k_lines_b olb, okc_operation_lines opl
5246: where olb.id= p_target_line_id
5247: and ( ( opl.object_cle_id = olb.id )
5248:
5249: OR

Line 5285: from okc_k_lines_b kle1

5281: last_update_date = sysdate,
5282: last_update_login = FND_GLOBAL.LOGIN_ID
5283:
5284: where subject_cle_id in ( select id
5285: from okc_k_lines_b kle1
5286: start with kle1.id = p_target_line_id
5287: connect by prior kle1.id = kle1.cle_id
5288: and kle1.dnz_chr_id = p_target_chr_id)
5289:

Line 5295: UPDATE OKC_K_LINES_B

5291:
5292:
5293: -- clear date_renewed only for those lines in target top lines
5294:
5295: UPDATE OKC_K_LINES_B
5296: SET date_renewed = decode(l_active_yn,'Y',sysdate,null),
5297: object_version_number = object_version_number + 1,
5298: last_updated_by = FND_GLOBAL.USER_ID,
5299: last_update_date = sysdate,

Line 5309: UPDATE OKC_K_LINES_B

5305:
5306:
5307: -- clear date_renewed only for those lines in target sub lines
5308:
5309: UPDATE OKC_K_LINES_B
5310: SET date_renewed = decode(l_active_yn,'Y',sysdate,null),
5311: object_version_number = object_version_number + 1,
5312: last_updated_by = FND_GLOBAL.USER_ID,
5313: last_update_date = sysdate,