DBA Data[Home] [Help]

APPS.OKS_BILL_REC_PUB dependencies on OKS_BILL_CONT_LINES

Line 274: oks_bill_cont_lines bcl,

270: ,line.end_date cov_end_date
271: ,line.price_negotiated cov_price_negotiated
272: FROM
273: okc_k_lines_b line,
274: oks_bill_cont_lines bcl,
275: oks_bill_sub_lines bsl
276: WHERE bcl.Cle_id = p_top_line_id
277: AND bsl.cle_id = nvl(p_cov_line_id,bsl.cle_id)
278: AND bcl.id = bsl.bcl_id

Line 290: (select 1 from oks_bill_cont_lines bclsub

286: AND line.id = bsl.cle_id
287: AND line.date_Terminated is NULL
288: /*
289: and not exists
290: (select 1 from oks_bill_cont_lines bclsub
291: where bclsub.cle_id = bcl.cle_id
292: and trunc(bclsub.date_billed_from) = trunc(bcl.date_billed_from)
293: and bclsub.bill_action = 'AV')
294: */

Line 339: FROM oks_bill_cont_lines

335: ,p_bill_action IN VARCHAR2)
336: IS
337: SELECT id
338: ,amount
339: FROM oks_bill_cont_lines
340: WHERE cle_id = p_top_line_id
341: AND bill_Action = p_bill_Action
342: AND trunc(date_billed_from) = trunc(p_date_billed_from)
343: AND trunc(date_billed_to ) = trunc(p_date_billed_to)

Line 882: UPDATE oks_bill_cont_lines

878: */
879:
880:
881: ---commented the above since the rounded value is stored in bsl amount
882: UPDATE oks_bill_cont_lines
883: SET amount = nvl(amount,0) + l_bslv_tbl_in(1).AMOUNT
884: WHERE id = l_temp_bcl_id_tr;
885:
886: l_temp_bcl_id_ri := bcl_rec.bcl_bcl_id;

Line 1135: FROM oks_bill_cont_lines bcl,

1131: bsl.date_billed_from,
1132: bsl.date_billed_to,
1133: bsl.amount,
1134: bsd.result
1135: FROM oks_bill_cont_lines bcl,
1136: oks_bill_sub_lines bsl,
1137: oks_bill_sub_line_dtls bsd
1138: WHERE bcl.id = bsl.bcl_id
1139: AND bsl.cle_id = p_cle_id

Line 1321: FROM oks_bill_cont_lines bcl,

1317:
1318: Cursor line_billed_cur (p_id IN NUMBER) is
1319: SELECT bcl.id ,rline.termn_method,
1320: rline.usage_type, rline.usage_period
1321: FROM oks_bill_cont_lines bcl,
1322: oks_k_lines_b rline
1323: WHERE bcl.cle_id = p_id
1324: AND rline.cle_id = bcl.cle_id
1325: AND bcl.bill_action = 'RI';

Line 1329: FROM oks_bill_cont_lines

1325: AND bcl.bill_action = 'RI';
1326:
1327: Cursor subscr_line_bill_cur (p_cle_id IN NUMBER) is
1328: SELECT nvl(sum(nvl(amount,0)),0),max(date_billed_To)
1329: FROM oks_bill_cont_lines
1330: WHERE cle_id = p_cle_id
1331: AND bill_action = 'RI';
1332:
1333: Cursor subscr_line_ship_cur (p_id IN NUMBER) is

Line 1343: oks_bill_cont_lines bcl,

1339: Cursor sub_line_billed_cur (p_id IN NUMBER) is
1340: SELECT bsl.id ,rline.TERMN_METHOD ,bcl.cle_id,
1341: rline.usage_type, rline.usage_period
1342: FROM oks_bill_sub_lines bsl,
1343: oks_bill_cont_lines bcl,
1344: oks_k_lines_b rline
1345: WHERE bsl.cle_id = p_id
1346: AND bsl.bcl_id = bcl.id
1347: AND rline.cle_id = bcl.cle_id

Line 1359: FROM oks_bill_cont_lines

1355:
1356:
1357: Cursor tot_line_billed( p_cle_id IN NUMBER) is
1358: SELECT sum(amount)
1359: FROM oks_bill_cont_lines
1360: WHERE cle_id = p_cle_id;
1361:
1362:
1363: cursor l_calc_bill_amount_csr (p_line_id number ) is

Line 1365: oks_bill_cont_lines

1361:
1362:
1363: cursor l_calc_bill_amount_csr (p_line_id number ) is
1364: SELECT sum(amount) FROM
1365: oks_bill_cont_lines
1366: WHERE cle_id = p_line_id ;
1367:
1368: l_billed_amount NUMBER ;
1369: final_amount NUMBER;

Line 1888: SELECT nvl(sum(amount),0) FROM oks_bill_cont_lines

1884: X_return_status OUT NOCOPY VARCHAR2
1885: )
1886: IS
1887: Cursor bill_amount_cur(p_line_id in number,p_term_date in DATE) is
1888: SELECT nvl(sum(amount),0) FROM oks_bill_cont_lines
1889: WHERE cle_id = p_line_id
1890: AND bill_action = 'RI';
1891:
1892: Cursor ship_amount_cur(p_line_id in number,p_term_date in DATE) is

Line 1953: oks_bill_cont_lines bcl,

1949: SELECT nvl(sum(bsl.amount),0) amount
1950: FROM
1951: okc_k_lines_b okl2,
1952: oks_bill_sub_lines bsl,
1953: oks_bill_cont_lines bcl,
1954: okc_k_lines_b okl1
1955: WHERE okl1.id = p_line_id
1956: AND bcl.cle_id = okl1.id
1957: AND bsl.bcl_id = bcl.id

Line 1998: oks_bill_cont_lines bcl,

1994: okl1.id id
1995: FROM
1996: okc_k_lines_b okl2,
1997: oks_bill_sub_lines bsl,
1998: oks_bill_cont_lines bcl,
1999: okc_k_lines_b okl1
2000: WHERE okl1.id = p_line_id
2001: AND bcl.cle_id = okl1.id
2002: AND bsl.bcl_id = bcl.id

Line 2401: FROM OKS_BILL_CONT_LINES_V

2397: ,ATTRIBUTE12
2398: ,ATTRIBUTE13
2399: ,ATTRIBUTE14
2400: ,ATTRIBUTE15
2401: FROM OKS_BILL_CONT_LINES_V
2402: WHERE ID = p_bcl_id_new;
2403:
2404: Cursor cur_billinstance_sum (p_bcl_id IN NUMBER) is
2405: SELECT bill_instance_number ,bsl_id

Line 2632: UPDATE oks_bill_cont_lines

2628: x_return_status := l_return_status;
2629: Raise G_EXCEPTION_HALT_VALIDATION;
2630: END IF;
2631:
2632: UPDATE oks_bill_cont_lines
2633: SET amount = bcl_rec.amount - nvl(l_round_amt,0)
2634: WHERE id = bcl_rec.id;
2635:
2636:

Line 3334: FROM oks_bill_cont_lines

3330:
3331:
3332: SELECT nvl(sum(nvl(amount,0)),0)
3333: INTO l_billed_amount
3334: FROM oks_bill_cont_lines
3335: WHERE cle_id = p_k_line_id
3336: GROUP by cle_id;
3337:
3338: FOR kline_rec IN kline_cur

Line 3494: SELECT * from oks_bill_cont_lines

3490: and start_date >= p_termination_date;
3491:
3492: CURSOR billed_cur (p_id in number,l_termination_date in DATE,
3493: l_next_ship_date in DATE) is
3494: SELECT * from oks_bill_cont_lines
3495: WHERE cle_id = p_id
3496: AND bill_action = 'RI'
3497: --AND date_billed_to >= l_termination_date
3498: ORDER BY DATE_BILLED_FROM DESC;

Line 3503: SELECT * from oks_bill_cont_lines

3499:
3500: /*************************************************************
3501: CURSOR billed_cur (p_id in number,l_termination_date in DATE,
3502: l_next_ship_date in DATE) is
3503: SELECT * from oks_bill_cont_lines
3504: WHERE cle_id = p_id
3505: AND bill_action = 'RI'
3506: AND (( date_billed_from >= l_termination_date
3507: AND date_billed_to >= nvl(l_next_ship_date,date_billed_to))

Line 3528: from oks_bill_cont_lines

3524: Cursor check_bcl(p_id in Number,
3525: p_date_billed_from IN Date,
3526: p_date_billed_to In Date) is
3527: Select id
3528: from oks_bill_cont_lines
3529: where cle_id = p_id
3530: and bill_Action = 'TR'
3531: and trunc(date_billed_from) = trunc(p_date_billed_from)
3532: and trunc(date_billed_to ) = trunc(p_date_billed_to);

Line 3541: Select nvl(sum(amount),0) from oks_bill_cont_lines

3537: Where dnz_cle_id = p_id
3538: and start_date <= p_termination_date;
3539:
3540: Cursor bill_amount_cur(p_line_id in number,p_term_date in DATE) is
3541: Select nvl(sum(amount),0) from oks_bill_cont_lines
3542: Where cle_id = p_line_id
3543: and bill_action = 'RI'
3544: and trunc(date_billed_From) <= trunc(p_term_date);
3545:

Line 3553: from oks_bill_cont_lines

3549: --and trunc(start_date) < trunc(p_term_date);
3550:
3551: Cursor l_get_bcl_count(l_termination_date in date, l_next_ship_date in date, l_line_id in NUMBER ) is
3552: select count(*)
3553: from oks_bill_cont_lines
3554: where cle_id = l_line_id
3555: and trunc(date_billed_to) >= trunc(l_next_ship_date)
3556: and trunc(date_billed_to) >= trunc(l_termination_date);
3557:

Line 3579: from oks_bill_cont_lines

3575: -- Bug Fix 5062595 maanand --
3576:
3577: Cursor l_get_bcl_count_intang(l_termination_date in date, l_line_id in NUMBER ) is
3578: select count(*)
3579: from oks_bill_cont_lines
3580: where cle_id = l_line_id
3581: and trunc(date_billed_to) >= trunc(l_termination_date);
3582:
3583: -- End Bug Fix 5062595 --

Line 3984: UPDATE oks_bill_cont_lines

3980:
3981: --l_bclv_tbl_in(1).AMOUNT := -1 * nvl(l_round_amount,0);
3982: l_bclv_tbl_in(1).AMOUNT := l_amount ;
3983:
3984: UPDATE oks_bill_cont_lines
3985: SET amount = l_bclv_tbl_in(1).AMOUNT
3986: WHERE id = l_bclv_tbl_in(1).id;
3987:
3988:

Line 4128: from oks_bill_cont_lines bcl

4124:
4125:
4126: Cursor billed_subscr_amount(p_id IN NUMBER) is
4127: Select nvl(sum(nvl(bcl.amount,0)),0)
4128: from oks_bill_cont_lines bcl
4129: where bcl.cle_id = p_id
4130: and bcl.bill_action = 'RI';
4131:
4132: Cursor unbilled_subscr_date (p_id in NUMBER) is

Line 4140: Select id from oks_bill_cont_lines

4136: and order_header_id is null;
4137:
4138:
4139: Cursor line_billed_cur (p_id IN NUMBER) is
4140: Select id from oks_bill_cont_lines
4141: where cle_id = p_id
4142: and bill_action = 'RI';
4143:
4144: Cursor sub_line_billed_cur (p_id IN NUMBER) is

Line 4146: oks_bill_cont_lines bcl

4142: and bill_action = 'RI';
4143:
4144: Cursor sub_line_billed_cur (p_id IN NUMBER) is
4145: Select bsl.id from oks_bill_sub_lines bsl,
4146: oks_bill_cont_lines bcl
4147: where bsl.cle_id = p_id
4148: and bsl.bcl_id = bcl.id
4149: and bcl.bill_action = 'RI';
4150:

Line 4157: from oks_bill_cont_lines

4153: where cle_id = p_id;
4154:
4155: Cursor bcl_amount(p_bcl_id in number) is
4156: Select nvl(amount,0),cle_id ,btn_id,bill_action
4157: from oks_bill_cont_lines
4158: where id = p_bcl_id;
4159:
4160: Cursor bsl_amount (p_bsl_id in number) is
4161: Select nvl(amount,0),cle_id

Line 4172: FROM oks_bill_cont_lines bcl

4168: where cle_id = p_sub_line_id;
4169:
4170: CURSOR l_line_max_bill_date( p_line_id in NUMBER ) is
4171: SELECT max(bsl.date_billed_to) max_bill_date
4172: FROM oks_bill_cont_lines bcl
4173: , oks_bill_sub_lines bsl
4174: WHERE bcl.cle_id = p_line_id
4175: AND bcl.bill_action = 'RI'
4176: AND bcl.id = bsl.bcl_id ;

Line 4243: from oks_bill_cont_lines bcl,

4239: --END Bug 4354983
4240:
4241: Cursor avg_bcl_amount_partial (p_cle_id in number) is
4242: Select sum(bsl.amount)
4243: from oks_bill_cont_lines bcl,
4244: oks_bill_sub_lines bsl
4245: where bcl.cle_id = p_cle_id
4246: and bsl.bcl_id = bcl.id
4247: and bcl.bill_action <> 'TR'

Line 4252: from oks_bill_cont_lines bcl,

4248: and trunc(bcl.date_billed_from) >= trunc(p_termination_date);
4249:
4250: Cursor avg_bcl_amount_full (p_cle_id in number) is
4251: Select sum(bsl.amount)
4252: from oks_bill_cont_lines bcl,
4253: oks_bill_sub_lines bsl
4254: where bcl.cle_id = p_cle_id
4255: and bsl.bcl_id = bcl.id
4256: and bcl.bill_action <> 'TR';

Line 4264: from oks_bill_cont_lines bcl,

4260: Select nvl(sum(decode(sign(trunc(bsl.date_billed_from) - trunc(p_termination_date)) ,-1,
4261: ((trunc(bsl.date_billed_to) - trunc(p_termination_date) + 1) * bsl.amount) /
4262: (trunc(bsl.date_billed_to) - trunc(bsl.date_billed_from) + 1) ,bsl.amount )),0)
4263: -- nvl(sum(bsl.amount),0)
4264: from oks_bill_cont_lines bcl,
4265: oks_bill_sub_lines bsl
4266: where bcl.cle_id = p_cle_id
4267: and bsl.bcl_id = bcl.id
4268: and bcl.bill_action <> 'TR'

Line 4276: from oks_bill_cont_lines bcl,

4272: Cursor pos_bcl_amount_line (p_cle_id in number) is
4273: Select nvl(sum(decode(sign(trunc(bsl.date_billed_from) - trunc(p_termination_date)) ,-1,
4274: ((trunc(bsl.date_billed_to) - trunc(p_termination_date) + 1) * bsl.amount) /
4275: (trunc(bsl.date_billed_to) - trunc(bsl.date_billed_from) + 1) ,bsl.amount )),0)
4276: from oks_bill_cont_lines bcl,
4277: oks_bill_sub_lines bsl
4278: where bcl.cle_id = p_cle_id
4279: and bsl.bcl_id = bcl.id
4280: and bcl.bill_action <> 'TR'

Line 4285: Select 1 from oks_bill_cont_lines

4281: and trunc(bsl.date_billed_from) >= trunc(p_termination_date)
4282: and bsl.amount > 0;
4283:
4284: Cursor check_avg_csr(p_cle_id in number) is
4285: Select 1 from oks_bill_cont_lines
4286: where cle_id = p_cle_id
4287: and bill_action = 'AV';
4288:
4289: Cursor neg_bcl_amount_hdr (p_hdr_id in number) is

Line 4293: from oks_bill_cont_lines bcl,

4289: Cursor neg_bcl_amount_hdr (p_hdr_id in number) is
4290: Select nvl(sum(decode(sign(trunc(bsl.date_billed_from) - trunc(p_termination_date)) ,-1,
4291: ((trunc(bsl.date_billed_to) - trunc(p_termination_date) + 1) * bsl.amount) /
4292: (trunc(bsl.date_billed_to) - trunc(bsl.date_billed_from) + 1) ,bsl.amount )),0)
4293: from oks_bill_cont_lines bcl,
4294: oks_bill_sub_lines bsl,
4295: okc_k_lines_b line
4296: where bsl.bcl_id = bcl.id
4297: and line.id = bcl.cle_id

Line 4309: from oks_bill_cont_lines bcl,

4305: Cursor pos_bcl_amount_hdr (p_hdr_id in number) is
4306: Select nvl(sum(decode(sign(trunc(bsl.date_billed_from) - trunc(p_termination_date)) ,-1,
4307: ((trunc(bsl.date_billed_to) - trunc(p_termination_date) + 1) * bsl.amount) /
4308: (trunc(bsl.date_billed_to) - trunc(bsl.date_billed_from) + 1) ,bsl.amount )),0)
4309: from oks_bill_cont_lines bcl,
4310: oks_bill_sub_lines bsl,
4311: okc_k_lines_b line
4312: where bsl.bcl_id = bcl.id
4313: and line.id = bcl.cle_id

Line 4609: UPDATE oks_bill_cont_lines

4605: l_bcl_credit_amount := l_bcl_credit_amount +
4606: ((-1)*(l_termination_amount - g_credit_amount)) ;
4607: l_bcl_update_id := g_bcl_id;
4608:
4609: UPDATE oks_bill_cont_lines
4610: SET amount = l_bcl_credit_amount
4611: WHERE id = l_bcl_update_id ;
4612:
4613: Elsif g_credit_amount > l_termination_amount then

Line 4625: UPDATE oks_bill_cont_lines

4621:
4622: l_bcl_credit_amount := l_bcl_credit_amount + (g_credit_amount - l_termination_amount) ;
4623: l_bcl_update_id := g_bcl_id;
4624:
4625: UPDATE oks_bill_cont_lines
4626: SET amount = l_bcl_credit_amount
4627: WHERE id = l_bcl_update_id;
4628:
4629: End If;

Line 4696: UPDATE oks_bill_cont_lines

4692: l_bcl_credit_amount := l_bcl_credit_amount +
4693: ((-1)*(l_termination_amount - g_credit_amount));
4694: l_bcl_update_id := g_bcl_id;
4695:
4696: UPDATE oks_bill_cont_lines
4697: SET amount = l_bcl_credit_amount
4698: WHERE id = l_bcl_update_id ;
4699:
4700: ELSIF (g_credit_amount > l_termination_amount) THEN

Line 4714: UPDATE oks_bill_cont_lines

4710: l_bcl_credit_amount := l_bcl_credit_amount +
4711: (g_credit_amount - l_termination_amount) ;
4712: l_bcl_update_id := g_bcl_id;
4713:
4714: UPDATE oks_bill_cont_lines
4715: SET amount = l_bcl_credit_amount
4716: WHERE id = l_bcl_update_id;
4717:
4718: END IF;

Line 4752: UPDATE oks_bill_cont_lines

4748: l_bcl_credit_amount := l_bcl_credit_amount +
4749: ((-1)*(l_termination_amount - g_credit_amount)) ;
4750: l_bcl_update_id := g_bcl_id;
4751:
4752: UPDATE oks_bill_cont_lines
4753: SET amount = l_bcl_credit_amount
4754: WHERE id = l_bcl_update_id ;
4755:
4756: Elsif g_credit_amount > l_termination_amount then

Line 4768: UPDATE oks_bill_cont_lines

4764:
4765: l_bcl_credit_amount := l_bcl_credit_amount + (g_credit_amount - l_termination_amount) ;
4766: l_bcl_update_id := g_bcl_id;
4767:
4768: UPDATE oks_bill_cont_lines
4769: SET amount = l_bcl_credit_amount
4770: WHERE id = l_bcl_update_id;
4771:
4772: End If;

Line 5142: UPDATE oks_bill_cont_lines

5138: l_bcl_credit_amount := l_bcl_credit_amount +
5139: ((-1)*(l_termination_amount - g_credit_amount)) ;
5140: l_bcl_update_id := g_bcl_id;
5141:
5142: UPDATE oks_bill_cont_lines
5143: SET amount = l_bcl_credit_amount
5144: WHERE id = l_bcl_update_id ;
5145: If l_bcl_btn_id = -44 and l_bcl_bill_action = 'TR' then
5146: update oks_k_lines_b

Line 5217: UPDATE oks_bill_cont_lines

5213:
5214: l_bcl_credit_amount := l_bcl_credit_amount + (g_credit_amount - l_termination_amount) ;
5215: l_bcl_update_id := g_bcl_id;
5216:
5217: UPDATE oks_bill_cont_lines
5218: SET amount = l_bcl_credit_amount
5219: WHERE id = l_bcl_update_id ;
5220: If l_bcl_btn_id = -44 and l_bcl_bill_action = 'TR' then
5221: update oks_k_lines_b

Line 5619: FROM oks_bill_cont_lines bcl ,

5615:
5616: Cursor l_date_csr Is
5617: SELECT Min(bsl.DATE_BILLED_FROM)
5618: ,Max(bsl.DATE_BILLED_TO)
5619: FROM oks_bill_cont_lines bcl ,
5620: oks_bill_sub_lines bsl
5621: WHERE bsl.cle_id = p_cle_id
5622: AND bsl.bcl_id = bcl.id
5623: AND bcl.bill_action = 'RI';

Line 5627: FROM oks_bill_cont_lines bcl,

5623: AND bcl.bill_action = 'RI';
5624:
5625: Cursor l_tot_csr Is
5626: SELECT NVL(Sum(NVL(bsd.Result,0)),0)
5627: FROM oks_bill_cont_lines bcl,
5628: oks_bill_sub_lines bsl,
5629: oks_bill_sub_line_dtls bsd
5630: WHERE bsl.cle_id = p_cle_id
5631: AND bsl.bcl_id = bcl.id

Line 7011: UPDATE oks_bill_cont_lines

7007:
7008:
7009: IF (P_PRV = 1 ) THEN
7010:
7011: UPDATE oks_bill_cont_lines
7012: SET amount = nvl(amount,0) + round_amount,
7013: currency_code = l_cur_holder
7014: WHERE id = p_bcl_id;
7015:

Line 7097: UPDATE oks_bill_cont_lines

7093: IF (p_sent_yn IS not Null) THEN
7094: l_bclv_tbl_in(1).sent_yn := p_sent_yn;
7095: END If;
7096:
7097: UPDATE oks_bill_cont_lines
7098: SET amount = nvl(p_amount,0) + nvl(amount,0),
7099: bill_Action = nvl(p_bill_action,bill_action) ,
7100: currency_code = p_currency_code,
7101: sent_yn = nvl(p_sent_yn , sent_yn)

Line 7171: From Oks_bill_cont_lines

7167:
7168: --- -55 check for OKL issue raise on bug # 4634345
7169: Cursor l_bcl_csr(p_cle_id_in Number,p_date_billed_from_in date,p_date_billed_to_in date) Is
7170: Select Id
7171: From Oks_bill_cont_lines
7172: Where Cle_id = p_cle_id_in
7173: And trunc(date_billed_from) = trunc(p_date_billed_from_in)
7174: And trunc(date_billed_to) = trunc(p_date_billed_to_in)
7175: And bill_action = p_bill_action

Line 7323: From Oks_bill_cont_lines

7319: l_msg_data Varchar2(2000);
7320:
7321: Cursor l_bcl_csr(p_cle_id_in Number,p_date_billed_from_in date,p_date_billed_to_in date) Is
7322: Select Id,amount
7323: From Oks_bill_cont_lines
7324: Where Cle_id = p_cle_id_in
7325: And trunc(date_billed_from) = trunc(p_date_billed_from_in)
7326: And trunc(date_billed_to) = trunc(p_date_billed_to_in)
7327: And bill_Action = p_bill_action

Line 7820: From oks_bill_cont_lines

7816:
7817: CURSOR l_billed_csr (p_cle_id IN NUMBER)
7818: IS
7819: Select *
7820: From oks_bill_cont_lines
7821: where cle_id = p_cle_id
7822: and bill_action in ('RI', 'AD')
7823: order by cle_id, date_billed_from;
7824:

Line 7870: From OKS_BILL_CONT_LINES

7866:
7867: Cursor get_bcl_id_cur(p_bcl_rec_cle_id IN NUMBER, p_bcl_rec_date_billed_to IN DATE)
7868: IS
7869: Select id
7870: From OKS_BILL_CONT_LINES
7871: Where cle_id = p_bcl_rec_cle_id
7872: And date_billed_to = p_bcl_rec_date_billed_to
7873: And bill_action = 'AD';
7874:

Line 7966: From OKS_BILL_CONT_LINES

7962: Close qty_uom_csr;
7963:
7964:
7965: Select count(*) into l_ad_cnt
7966: From OKS_BILL_CONT_LINES
7967: Where cle_id = l_billed_cle_id
7968: And Bill_Action = 'AD';
7969:
7970:

Line 8155: FROM oks_bill_cont_lines bcl,

8151:
8152: Cursor check_term_cur(p_cle_id NUMBER) is
8153: SELECT bsl.id,
8154: bcl.cle_id top_line_id
8155: FROM oks_bill_cont_lines bcl,
8156: oks_bill_sub_lines bsl
8157: WHERE bsl.bcl_id = bcl.id
8158: AND bcl.bill_action = 'TR'
8159: AND bsl.cle_id = p_cle_id;

Line 8187: oks_bill_cont_lines bcl

8183:
8184:
8185: Cursor sub_line_billed_cur (p_id IN NUMBER) is
8186: SELECT bsl.id FROM oks_bill_sub_lines bsl,
8187: oks_bill_cont_lines bcl
8188: WHERE bsl.cle_id = p_id
8189: AND bsl.bcl_id = bcl.id
8190: AND bcl.bill_action = 'RI';
8191:

Line 8193: Select amount from oks_bill_cont_lines

8189: AND bsl.bcl_id = bcl.id
8190: AND bcl.bill_action = 'RI';
8191:
8192: Cursor bcl_amount (p_bcl_id in number) is
8193: Select amount from oks_bill_cont_lines
8194: where id = p_bcl_id;
8195:
8196: Cursor bsl_amount (p_bsl_id in number) is
8197: Select amount from oks_bill_sub_lines

Line 8214: from oks_bill_cont_lines bcl,

8210: Select nvl(sum(decode(sign(trunc(bsl.date_billed_from) - trunc(p_termination_date)) ,-1,
8211: ((trunc(bsl.date_billed_to) - trunc(p_termination_date) + 1) * bsl.amount) /
8212: (trunc(bsl.date_billed_to) - trunc(bsl.date_billed_from) + 1) ,bsl.amount )),0)
8213: -- nvl(sum(bsl.amount),0)
8214: from oks_bill_cont_lines bcl,
8215: oks_bill_sub_lines bsl
8216: where bcl.cle_id = p_cle_id
8217: and bsl.bcl_id = bcl.id
8218: and bcl.bill_action <> 'TR'

Line 8227: from oks_bill_cont_lines bcl,

8223: Cursor pos_bcl_amount_line (p_cle_id in number) is
8224: Select nvl(sum(decode(sign(trunc(bsl.date_billed_from) - trunc(p_termination_date)) ,-1,
8225: ((trunc(bsl.date_billed_to) - trunc(p_termination_date) + 1) * bsl.amount) /
8226: (trunc(bsl.date_billed_to) - trunc(bsl.date_billed_from) + 1) ,bsl.amount )),0)
8227: from oks_bill_cont_lines bcl,
8228: oks_bill_sub_lines bsl
8229: where bcl.cle_id = p_cle_id
8230: and bsl.bcl_id = bcl.id
8231: and bcl.bill_action <> 'TR'

Line 8240: Select 1 from oks_bill_cont_lines

8236: --End bug#5276678
8237:
8238:
8239: Cursor check_avg_csr(p_cle_id in number) is
8240: Select 1 from oks_bill_cont_lines
8241: where cle_id = p_cle_id
8242: and bill_action = 'AV';
8243:
8244: l_bcl_credit_amount NUMBER;

Line 8373: UPDATE oks_bill_cont_lines

8369:
8370: l_bcl_credit_amount := l_bcl_credit_amount + ((-1)*(p_override_amount - g_credit_amount)) ;
8371: l_bcl_id := g_bcl_id;
8372:
8373: UPDATE oks_bill_cont_lines
8374: SET amount = l_bcl_credit_amount
8375: WHERE id = l_bcl_id ;
8376: g_credit_amount := 0;
8377: Elsif g_credit_amount > p_override_amount then

Line 8389: UPDATE oks_bill_cont_lines

8385:
8386: l_bcl_credit_amount := l_bcl_credit_amount + (g_credit_amount - p_override_amount) ;
8387: l_bcl_id := g_bcl_id;
8388:
8389: UPDATE oks_bill_cont_lines
8390: SET amount = l_bcl_credit_amount
8391: WHERE id = l_bcl_id ;
8392: g_credit_amount := 0;
8393: End If;

Line 8652: Select amount from oks_bill_cont_lines

8648: -- End BUG#3312595 mchoudha
8649:
8650:
8651: Cursor bcl_amount (p_bcl_id in number) is
8652: Select amount from oks_bill_cont_lines
8653: where id = p_bcl_id;
8654:
8655: Cursor bsl_amount (p_bsl_id in number) is
8656: Select amount from oks_bill_sub_lines

Line 8987: UPDATE oks_bill_cont_lines

8983:
8984: l_bcl_credit_amount := l_bcl_credit_amount + ((-1)*(p_override_amount - g_credit_amount)) ;
8985: l_bcl_id := g_bcl_id;
8986:
8987: UPDATE oks_bill_cont_lines
8988: SET amount = l_bcl_credit_amount
8989: WHERE id = l_bcl_id ;
8990: g_credit_amount := 0;
8991: Elsif g_credit_amount > p_override_amount then

Line 9003: UPDATE oks_bill_cont_lines

8999:
9000: l_bcl_credit_amount := l_bcl_credit_amount + (g_credit_amount - p_override_amount) ;
9001: l_bcl_id := g_bcl_id;
9002:
9003: UPDATE oks_bill_cont_lines
9004: SET amount = l_bcl_credit_amount
9005: WHERE id = l_bcl_id ;
9006: g_credit_amount := 0;
9007: End If;

Line 9070: ,OKS_BILL_CONT_LINES BCL

9066: --added NOT Exists clause and lse_id 13
9067: CURSOR L_HDR_BILLED_CSR IS
9068: SELECT nvl(SUM(BSL.amount),0) billed
9069: FROM OKC_K_LINES_B OKCL
9070: ,OKS_BILL_CONT_LINES BCL
9071: ,OKS_BILL_SUB_LINES BSL
9072: WHERE OKCL.dnz_chr_id = p_id
9073: AND OKCL.lse_id in ( 7,8,9,10,11,13,25,35,46)
9074: AND OKCL.id = BSL.cle_id

Line 9110: ,OKS_BILL_CONT_LINES BCL

9106: --added NOT Exists clause and lse_id 13
9107: CURSOR l_TOP_LINE_BILLED_CSR IS
9108: SELECT nvl(SUM(BSL.amount),0) billed
9109: FROM OKC_K_LINES_B OKCL
9110: ,OKS_BILL_CONT_LINES BCL
9111: ,OKS_BILL_SUB_LINES BSL
9112: WHERE ( OKCL.cle_id = p_id
9113: OR ( OKCL.ID = p_id and OKCL.lse_id = 46))
9114: AND OKCL.lse_id in ( 7,8,9,10,11,13,25,35,46)

Line 9136: FROM OKS_BILL_CONT_LINES BCL

9132: WHERE OKSL.cle_id = p_id;
9133:
9134: CURSOR l_SUB_LINE_BILLED_CSR IS
9135: SELECT nvl(SUM(BSL.amount),0) billed
9136: FROM OKS_BILL_CONT_LINES BCL
9137: ,OKS_BILL_SUB_LINES BSL
9138: WHERE BSL.cle_id = p_id
9139: AND BSL.bcl_id = BCL.id
9140: AND BCL.bill_action = 'RI';

Line 9220: oks_bill_cont_lines bcl

9216:
9217: CURSOR l_credit_csr(p_sub_line_id in NUMBER ) is
9218: SELECT sum(bsl.amount) suppressed_credit
9219: FROM oks_bill_sub_lines bsl,
9220: oks_bill_cont_lines bcl
9221: WHERE bsl.cle_id = p_sub_line_id
9222: AND bcl.id = bsl.bcl_id
9223: AND btn_id is null
9224: AND bcl.bill_action = 'TR';

Line 9229: oks_bill_cont_lines bcl

9225:
9226: CURSOR l_suppressed_credit_csr(p_sub_line_id in NUMBER ) is
9227: SELECT sum(bsl.amount) suppressed_credit
9228: FROM oks_bill_sub_lines bsl,
9229: oks_bill_cont_lines bcl
9230: WHERE bsl.cle_id = p_sub_line_id
9231: AND bcl.id = bsl.bcl_id
9232: AND btn_id = -44
9233: AND bcl.bill_action = 'TR';

Line 10006: FROM oks_bill_cont_lines bcl,

10002: bsl.date_billed_from,
10003: bsl.date_billed_to,
10004: bsl.amount,
10005: bsd.result
10006: FROM oks_bill_cont_lines bcl,
10007: oks_bill_sub_lines bsl,
10008: oks_bill_sub_line_dtls bsd
10009: WHERE bcl.id = bsl.bcl_id
10010: AND bsl.cle_id = p_cle_id