DBA Data[Home] [Help]

APPS.OKS_BILL_REC_PUB dependencies on OKS_BILL_CONT_LINES

Line 271: oks_bill_cont_lines bcl,

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

Line 287: (select 1 from oks_bill_cont_lines bclsub

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

Line 336: FROM oks_bill_cont_lines

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

Line 863: UPDATE oks_bill_cont_lines

859: */
860:
861:
862: ---commented the above since the rounded value is stored in bsl amount
863: UPDATE oks_bill_cont_lines
864: SET amount = nvl(amount,0) + l_bslv_tbl_in(1).AMOUNT
865: WHERE id = l_temp_bcl_id_tr;
866:
867: l_temp_bcl_id_ri := bcl_rec.bcl_bcl_id;

Line 1116: FROM oks_bill_cont_lines bcl,

1112: bsl.date_billed_from,
1113: bsl.date_billed_to,
1114: bsl.amount,
1115: bsd.result
1116: FROM oks_bill_cont_lines bcl,
1117: oks_bill_sub_lines bsl,
1118: oks_bill_sub_line_dtls bsd
1119: WHERE bcl.id = bsl.bcl_id
1120: AND bsl.cle_id = p_cle_id

Line 1301: FROM oks_bill_cont_lines bcl,

1297:
1298: Cursor line_billed_cur (p_id IN NUMBER) is
1299: SELECT bcl.id ,rline.termn_method,
1300: rline.usage_type, rline.usage_period
1301: FROM oks_bill_cont_lines bcl,
1302: oks_k_lines_b rline
1303: WHERE bcl.cle_id = p_id
1304: AND rline.cle_id = bcl.cle_id
1305: AND bcl.bill_action = 'RI';

Line 1309: FROM oks_bill_cont_lines

1305: AND bcl.bill_action = 'RI';
1306:
1307: Cursor subscr_line_bill_cur (p_cle_id IN NUMBER) is
1308: SELECT nvl(sum(nvl(amount,0)),0),max(date_billed_To)
1309: FROM oks_bill_cont_lines
1310: WHERE cle_id = p_cle_id
1311: AND bill_action = 'RI';
1312:
1313: Cursor subscr_line_ship_cur (p_id IN NUMBER) is

Line 1323: oks_bill_cont_lines bcl,

1319: Cursor sub_line_billed_cur (p_id IN NUMBER) is
1320: SELECT bsl.id ,rline.TERMN_METHOD ,bcl.cle_id,
1321: rline.usage_type, rline.usage_period
1322: FROM oks_bill_sub_lines bsl,
1323: oks_bill_cont_lines bcl,
1324: oks_k_lines_b rline
1325: WHERE bsl.cle_id = p_id
1326: AND bsl.bcl_id = bcl.id
1327: AND rline.cle_id = bcl.cle_id

Line 1339: FROM oks_bill_cont_lines

1335:
1336:
1337: Cursor tot_line_billed( p_cle_id IN NUMBER) is
1338: SELECT sum(amount)
1339: FROM oks_bill_cont_lines
1340: WHERE cle_id = p_cle_id;
1341:
1342:
1343: cursor l_calc_bill_amount_csr (p_line_id number ) is

Line 1345: oks_bill_cont_lines

1341:
1342:
1343: cursor l_calc_bill_amount_csr (p_line_id number ) is
1344: SELECT sum(amount) FROM
1345: oks_bill_cont_lines
1346: WHERE cle_id = p_line_id ;
1347:
1348: l_billed_amount NUMBER ;
1349: final_amount NUMBER;

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

1870: X_return_status OUT NOCOPY VARCHAR2
1871: )
1872: IS
1873: Cursor bill_amount_cur(p_line_id in number,p_term_date in DATE) is
1874: SELECT nvl(sum(amount),0) FROM oks_bill_cont_lines
1875: WHERE cle_id = p_line_id
1876: AND bill_action = 'RI';
1877:
1878: Cursor ship_amount_cur(p_line_id in number,p_term_date in DATE) is

Line 1939: oks_bill_cont_lines bcl,

1935: SELECT nvl(sum(bsl.amount),0) amount
1936: FROM
1937: okc_k_lines_b okl2,
1938: oks_bill_sub_lines bsl,
1939: oks_bill_cont_lines bcl,
1940: okc_k_lines_b okl1
1941: WHERE okl1.id = p_line_id
1942: AND bcl.cle_id = okl1.id
1943: AND bsl.bcl_id = bcl.id

Line 1984: oks_bill_cont_lines bcl,

1980: okl1.id id
1981: FROM
1982: okc_k_lines_b okl2,
1983: oks_bill_sub_lines bsl,
1984: oks_bill_cont_lines bcl,
1985: okc_k_lines_b okl1
1986: WHERE okl1.id = p_line_id
1987: AND bcl.cle_id = okl1.id
1988: AND bsl.bcl_id = bcl.id

Line 2387: FROM OKS_BILL_CONT_LINES_V

2383: ,ATTRIBUTE12
2384: ,ATTRIBUTE13
2385: ,ATTRIBUTE14
2386: ,ATTRIBUTE15
2387: FROM OKS_BILL_CONT_LINES_V
2388: WHERE ID = p_bcl_id_new;
2389:
2390: Cursor cur_billinstance_sum (p_bcl_id IN NUMBER) is
2391: SELECT bill_instance_number ,bsl_id

Line 2618: UPDATE oks_bill_cont_lines

2614: x_return_status := l_return_status;
2615: Raise G_EXCEPTION_HALT_VALIDATION;
2616: END IF;
2617:
2618: UPDATE oks_bill_cont_lines
2619: SET amount = bcl_rec.amount - nvl(l_round_amt,0)
2620: WHERE id = bcl_rec.id;
2621:
2622:

Line 3310: FROM oks_bill_cont_lines

3306:
3307:
3308: SELECT nvl(sum(nvl(amount,0)),0)
3309: INTO l_billed_amount
3310: FROM oks_bill_cont_lines
3311: WHERE cle_id = p_k_line_id
3312: GROUP by cle_id;
3313:
3314: FOR kline_rec IN kline_cur

Line 3468: SELECT * from oks_bill_cont_lines

3464: and start_date >= p_termination_date;
3465:
3466: CURSOR billed_cur (p_id in number,l_termination_date in DATE,
3467: l_next_ship_date in DATE) is
3468: SELECT * from oks_bill_cont_lines
3469: WHERE cle_id = p_id
3470: AND bill_action = 'RI'
3471: --AND date_billed_to >= l_termination_date
3472: ORDER BY DATE_BILLED_FROM DESC;

Line 3477: SELECT * from oks_bill_cont_lines

3473:
3474: /*************************************************************
3475: CURSOR billed_cur (p_id in number,l_termination_date in DATE,
3476: l_next_ship_date in DATE) is
3477: SELECT * from oks_bill_cont_lines
3478: WHERE cle_id = p_id
3479: AND bill_action = 'RI'
3480: AND (( date_billed_from >= l_termination_date
3481: AND date_billed_to >= nvl(l_next_ship_date,date_billed_to))

Line 3502: from oks_bill_cont_lines

3498: Cursor check_bcl(p_id in Number,
3499: p_date_billed_from IN Date,
3500: p_date_billed_to In Date) is
3501: Select id
3502: from oks_bill_cont_lines
3503: where cle_id = p_id
3504: and bill_Action = 'TR'
3505: and trunc(date_billed_from) = trunc(p_date_billed_from)
3506: and trunc(date_billed_to ) = trunc(p_date_billed_to);

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

3511: Where dnz_cle_id = p_id
3512: and start_date <= p_termination_date;
3513:
3514: Cursor bill_amount_cur(p_line_id in number,p_term_date in DATE) is
3515: Select nvl(sum(amount),0) from oks_bill_cont_lines
3516: Where cle_id = p_line_id
3517: and bill_action = 'RI'
3518: and trunc(date_billed_From) <= trunc(p_term_date);
3519:

Line 3527: from oks_bill_cont_lines

3523: --and trunc(start_date) < trunc(p_term_date);
3524:
3525: Cursor l_get_bcl_count(l_termination_date in date, l_next_ship_date in date, l_line_id in NUMBER ) is
3526: select count(*)
3527: from oks_bill_cont_lines
3528: where cle_id = l_line_id
3529: and trunc(date_billed_to) >= trunc(l_next_ship_date)
3530: and trunc(date_billed_to) >= trunc(l_termination_date);
3531:

Line 3553: from oks_bill_cont_lines

3549: -- Bug Fix 5062595 maanand --
3550:
3551: Cursor l_get_bcl_count_intang(l_termination_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_termination_date);
3556:
3557: -- End Bug Fix 5062595 --

Line 3958: UPDATE oks_bill_cont_lines

3954:
3955: --l_bclv_tbl_in(1).AMOUNT := -1 * nvl(l_round_amount,0);
3956: l_bclv_tbl_in(1).AMOUNT := l_amount ;
3957:
3958: UPDATE oks_bill_cont_lines
3959: SET amount = l_bclv_tbl_in(1).AMOUNT
3960: WHERE id = l_bclv_tbl_in(1).id;
3961:
3962:

Line 4102: from oks_bill_cont_lines bcl

4098:
4099:
4100: Cursor billed_subscr_amount(p_id IN NUMBER) is
4101: Select nvl(sum(nvl(bcl.amount,0)),0)
4102: from oks_bill_cont_lines bcl
4103: where bcl.cle_id = p_id
4104: and bcl.bill_action = 'RI';
4105:
4106: Cursor unbilled_subscr_date (p_id in NUMBER) is

Line 4114: Select id from oks_bill_cont_lines

4110: and order_header_id is null;
4111:
4112:
4113: Cursor line_billed_cur (p_id IN NUMBER) is
4114: Select id from oks_bill_cont_lines
4115: where cle_id = p_id
4116: and bill_action = 'RI';
4117:
4118: Cursor sub_line_billed_cur (p_id IN NUMBER) is

Line 4120: oks_bill_cont_lines bcl

4116: and bill_action = 'RI';
4117:
4118: Cursor sub_line_billed_cur (p_id IN NUMBER) is
4119: Select bsl.id from oks_bill_sub_lines bsl,
4120: oks_bill_cont_lines bcl
4121: where bsl.cle_id = p_id
4122: and bsl.bcl_id = bcl.id
4123: and bcl.bill_action = 'RI';
4124:

Line 4131: from oks_bill_cont_lines

4127: where cle_id = p_id;
4128:
4129: Cursor bcl_amount(p_bcl_id in number) is
4130: Select nvl(amount,0),cle_id ,btn_id,bill_action
4131: from oks_bill_cont_lines
4132: where id = p_bcl_id;
4133:
4134: Cursor bsl_amount (p_bsl_id in number) is
4135: Select nvl(amount,0),cle_id

Line 4146: FROM oks_bill_cont_lines bcl

4142: where cle_id = p_sub_line_id;
4143:
4144: CURSOR l_line_max_bill_date( p_line_id in NUMBER ) is
4145: SELECT max(bsl.date_billed_to) max_bill_date
4146: FROM oks_bill_cont_lines bcl
4147: , oks_bill_sub_lines bsl
4148: WHERE bcl.cle_id = p_line_id
4149: AND bcl.bill_action = 'RI'
4150: AND bcl.id = bsl.bcl_id ;

Line 4217: from oks_bill_cont_lines bcl,

4213: --END Bug 4354983
4214:
4215: Cursor avg_bcl_amount_partial (p_cle_id in number) is
4216: Select sum(bsl.amount)
4217: from oks_bill_cont_lines bcl,
4218: oks_bill_sub_lines bsl
4219: where bcl.cle_id = p_cle_id
4220: and bsl.bcl_id = bcl.id
4221: and bcl.bill_action <> 'TR'

Line 4226: from oks_bill_cont_lines bcl,

4222: and trunc(bcl.date_billed_from) >= trunc(p_termination_date);
4223:
4224: Cursor avg_bcl_amount_full (p_cle_id in number) is
4225: Select sum(bsl.amount)
4226: from oks_bill_cont_lines bcl,
4227: oks_bill_sub_lines bsl
4228: where bcl.cle_id = p_cle_id
4229: and bsl.bcl_id = bcl.id
4230: and bcl.bill_action <> 'TR';

Line 4238: from oks_bill_cont_lines bcl,

4234: Select nvl(sum(decode(sign(trunc(bsl.date_billed_from) - trunc(p_termination_date)) ,-1,
4235: ((trunc(bsl.date_billed_to) - trunc(p_termination_date) + 1) * bsl.amount) /
4236: (trunc(bsl.date_billed_to) - trunc(bsl.date_billed_from) + 1) ,bsl.amount )),0)
4237: -- nvl(sum(bsl.amount),0)
4238: from oks_bill_cont_lines bcl,
4239: oks_bill_sub_lines bsl
4240: where bcl.cle_id = p_cle_id
4241: and bsl.bcl_id = bcl.id
4242: and bcl.bill_action <> 'TR'

Line 4250: from oks_bill_cont_lines bcl,

4246: Cursor pos_bcl_amount_line (p_cle_id in number) is
4247: Select nvl(sum(decode(sign(trunc(bsl.date_billed_from) - trunc(p_termination_date)) ,-1,
4248: ((trunc(bsl.date_billed_to) - trunc(p_termination_date) + 1) * bsl.amount) /
4249: (trunc(bsl.date_billed_to) - trunc(bsl.date_billed_from) + 1) ,bsl.amount )),0)
4250: from oks_bill_cont_lines bcl,
4251: oks_bill_sub_lines bsl
4252: where bcl.cle_id = p_cle_id
4253: and bsl.bcl_id = bcl.id
4254: and bcl.bill_action <> 'TR'

Line 4259: Select 1 from oks_bill_cont_lines

4255: and trunc(bsl.date_billed_from) >= trunc(p_termination_date)
4256: and bsl.amount > 0;
4257:
4258: Cursor check_avg_csr(p_cle_id in number) is
4259: Select 1 from oks_bill_cont_lines
4260: where cle_id = p_cle_id
4261: and bill_action = 'AV';
4262:
4263: Cursor neg_bcl_amount_hdr (p_hdr_id in number) is

Line 4267: from oks_bill_cont_lines bcl,

4263: Cursor neg_bcl_amount_hdr (p_hdr_id in number) is
4264: Select nvl(sum(decode(sign(trunc(bsl.date_billed_from) - trunc(p_termination_date)) ,-1,
4265: ((trunc(bsl.date_billed_to) - trunc(p_termination_date) + 1) * bsl.amount) /
4266: (trunc(bsl.date_billed_to) - trunc(bsl.date_billed_from) + 1) ,bsl.amount )),0)
4267: from oks_bill_cont_lines bcl,
4268: oks_bill_sub_lines bsl,
4269: okc_k_lines_b line
4270: where bsl.bcl_id = bcl.id
4271: and line.id = bcl.cle_id

Line 4283: from oks_bill_cont_lines bcl,

4279: Cursor pos_bcl_amount_hdr (p_hdr_id in number) is
4280: Select nvl(sum(decode(sign(trunc(bsl.date_billed_from) - trunc(p_termination_date)) ,-1,
4281: ((trunc(bsl.date_billed_to) - trunc(p_termination_date) + 1) * bsl.amount) /
4282: (trunc(bsl.date_billed_to) - trunc(bsl.date_billed_from) + 1) ,bsl.amount )),0)
4283: from oks_bill_cont_lines bcl,
4284: oks_bill_sub_lines bsl,
4285: okc_k_lines_b line
4286: where bsl.bcl_id = bcl.id
4287: and line.id = bcl.cle_id

Line 4583: UPDATE oks_bill_cont_lines

4579: l_bcl_credit_amount := l_bcl_credit_amount +
4580: ((-1)*(l_termination_amount - g_credit_amount)) ;
4581: l_bcl_update_id := g_bcl_id;
4582:
4583: UPDATE oks_bill_cont_lines
4584: SET amount = l_bcl_credit_amount
4585: WHERE id = l_bcl_update_id ;
4586:
4587: Elsif g_credit_amount > l_termination_amount then

Line 4599: UPDATE oks_bill_cont_lines

4595:
4596: l_bcl_credit_amount := l_bcl_credit_amount + (g_credit_amount - l_termination_amount) ;
4597: l_bcl_update_id := g_bcl_id;
4598:
4599: UPDATE oks_bill_cont_lines
4600: SET amount = l_bcl_credit_amount
4601: WHERE id = l_bcl_update_id;
4602:
4603: End If;

Line 4670: UPDATE oks_bill_cont_lines

4666: l_bcl_credit_amount := l_bcl_credit_amount +
4667: ((-1)*(l_termination_amount - g_credit_amount));
4668: l_bcl_update_id := g_bcl_id;
4669:
4670: UPDATE oks_bill_cont_lines
4671: SET amount = l_bcl_credit_amount
4672: WHERE id = l_bcl_update_id ;
4673:
4674: ELSIF (g_credit_amount > l_termination_amount) THEN

Line 4688: UPDATE oks_bill_cont_lines

4684: l_bcl_credit_amount := l_bcl_credit_amount +
4685: (g_credit_amount - l_termination_amount) ;
4686: l_bcl_update_id := g_bcl_id;
4687:
4688: UPDATE oks_bill_cont_lines
4689: SET amount = l_bcl_credit_amount
4690: WHERE id = l_bcl_update_id;
4691:
4692: END IF;

Line 4726: UPDATE oks_bill_cont_lines

4722: l_bcl_credit_amount := l_bcl_credit_amount +
4723: ((-1)*(l_termination_amount - g_credit_amount)) ;
4724: l_bcl_update_id := g_bcl_id;
4725:
4726: UPDATE oks_bill_cont_lines
4727: SET amount = l_bcl_credit_amount
4728: WHERE id = l_bcl_update_id ;
4729:
4730: Elsif g_credit_amount > l_termination_amount then

Line 4742: UPDATE oks_bill_cont_lines

4738:
4739: l_bcl_credit_amount := l_bcl_credit_amount + (g_credit_amount - l_termination_amount) ;
4740: l_bcl_update_id := g_bcl_id;
4741:
4742: UPDATE oks_bill_cont_lines
4743: SET amount = l_bcl_credit_amount
4744: WHERE id = l_bcl_update_id;
4745:
4746: End If;

Line 5116: UPDATE oks_bill_cont_lines

5112: l_bcl_credit_amount := l_bcl_credit_amount +
5113: ((-1)*(l_termination_amount - g_credit_amount)) ;
5114: l_bcl_update_id := g_bcl_id;
5115:
5116: UPDATE oks_bill_cont_lines
5117: SET amount = l_bcl_credit_amount
5118: WHERE id = l_bcl_update_id ;
5119: If l_bcl_btn_id = -44 and l_bcl_bill_action = 'TR' then
5120: update oks_k_lines_b

Line 5191: UPDATE oks_bill_cont_lines

5187:
5188: l_bcl_credit_amount := l_bcl_credit_amount + (g_credit_amount - l_termination_amount) ;
5189: l_bcl_update_id := g_bcl_id;
5190:
5191: UPDATE oks_bill_cont_lines
5192: SET amount = l_bcl_credit_amount
5193: WHERE id = l_bcl_update_id ;
5194: If l_bcl_btn_id = -44 and l_bcl_bill_action = 'TR' then
5195: update oks_k_lines_b

Line 5593: FROM oks_bill_cont_lines bcl ,

5589:
5590: Cursor l_date_csr Is
5591: SELECT Min(bsl.DATE_BILLED_FROM)
5592: ,Max(bsl.DATE_BILLED_TO)
5593: FROM oks_bill_cont_lines bcl ,
5594: oks_bill_sub_lines bsl
5595: WHERE bsl.cle_id = p_cle_id
5596: AND bsl.bcl_id = bcl.id
5597: AND bcl.bill_action = 'RI';

Line 5601: FROM oks_bill_cont_lines bcl,

5597: AND bcl.bill_action = 'RI';
5598:
5599: Cursor l_tot_csr Is
5600: SELECT NVL(Sum(NVL(bsd.Result,0)),0)
5601: FROM oks_bill_cont_lines bcl,
5602: oks_bill_sub_lines bsl,
5603: oks_bill_sub_line_dtls bsd
5604: WHERE bsl.cle_id = p_cle_id
5605: AND bsl.bcl_id = bcl.id

Line 6979: UPDATE oks_bill_cont_lines

6975:
6976:
6977: IF (P_PRV = 1 ) THEN
6978:
6979: UPDATE oks_bill_cont_lines
6980: SET amount = nvl(amount,0) + round_amount,
6981: currency_code = l_cur_holder
6982: WHERE id = p_bcl_id;
6983:

Line 7065: UPDATE oks_bill_cont_lines

7061: IF (p_sent_yn IS not Null) THEN
7062: l_bclv_tbl_in(1).sent_yn := p_sent_yn;
7063: END If;
7064:
7065: UPDATE oks_bill_cont_lines
7066: SET amount = nvl(p_amount,0) + nvl(amount,0),
7067: bill_Action = nvl(p_bill_action,bill_action) ,
7068: currency_code = p_currency_code,
7069: sent_yn = nvl(p_sent_yn , sent_yn)

Line 7139: From Oks_bill_cont_lines

7135:
7136: --- -55 check for OKL issue raise on bug # 4634345
7137: Cursor l_bcl_csr(p_cle_id_in Number,p_date_billed_from_in date,p_date_billed_to_in date) Is
7138: Select Id
7139: From Oks_bill_cont_lines
7140: Where Cle_id = p_cle_id_in
7141: And trunc(date_billed_from) = trunc(p_date_billed_from_in)
7142: And trunc(date_billed_to) = trunc(p_date_billed_to_in)
7143: And bill_action = p_bill_action

Line 7291: From Oks_bill_cont_lines

7287: l_msg_data Varchar2(2000);
7288:
7289: Cursor l_bcl_csr(p_cle_id_in Number,p_date_billed_from_in date,p_date_billed_to_in date) Is
7290: Select Id,amount
7291: From Oks_bill_cont_lines
7292: Where Cle_id = p_cle_id_in
7293: And trunc(date_billed_from) = trunc(p_date_billed_from_in)
7294: And trunc(date_billed_to) = trunc(p_date_billed_to_in)
7295: And bill_Action = p_bill_action

Line 7788: From oks_bill_cont_lines

7784:
7785: CURSOR l_billed_csr (p_cle_id IN NUMBER)
7786: IS
7787: Select *
7788: From oks_bill_cont_lines
7789: where cle_id = p_cle_id
7790: and bill_action in ('RI', 'AD')
7791: order by cle_id, date_billed_from;
7792:

Line 7838: From OKS_BILL_CONT_LINES

7834:
7835: Cursor get_bcl_id_cur(p_bcl_rec_cle_id IN NUMBER, p_bcl_rec_date_billed_to IN DATE)
7836: IS
7837: Select id
7838: From OKS_BILL_CONT_LINES
7839: Where cle_id = p_bcl_rec_cle_id
7840: And date_billed_to = p_bcl_rec_date_billed_to
7841: And bill_action = 'AD';
7842:

Line 7934: From OKS_BILL_CONT_LINES

7930: Close qty_uom_csr;
7931:
7932:
7933: Select count(*) into l_ad_cnt
7934: From OKS_BILL_CONT_LINES
7935: Where cle_id = l_billed_cle_id
7936: And Bill_Action = 'AD';
7937:
7938:

Line 8123: FROM oks_bill_cont_lines bcl,

8119:
8120: Cursor check_term_cur(p_cle_id NUMBER) is
8121: SELECT bsl.id,
8122: bcl.cle_id top_line_id
8123: FROM oks_bill_cont_lines bcl,
8124: oks_bill_sub_lines bsl
8125: WHERE bsl.bcl_id = bcl.id
8126: AND bcl.bill_action = 'TR'
8127: AND bsl.cle_id = p_cle_id;

Line 8155: oks_bill_cont_lines bcl

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

Line 8161: Select amount from oks_bill_cont_lines

8157: AND bsl.bcl_id = bcl.id
8158: AND bcl.bill_action = 'RI';
8159:
8160: Cursor bcl_amount (p_bcl_id in number) is
8161: Select amount from oks_bill_cont_lines
8162: where id = p_bcl_id;
8163:
8164: Cursor bsl_amount (p_bsl_id in number) is
8165: Select amount from oks_bill_sub_lines

Line 8182: from oks_bill_cont_lines bcl,

8178: Select nvl(sum(decode(sign(trunc(bsl.date_billed_from) - trunc(p_termination_date)) ,-1,
8179: ((trunc(bsl.date_billed_to) - trunc(p_termination_date) + 1) * bsl.amount) /
8180: (trunc(bsl.date_billed_to) - trunc(bsl.date_billed_from) + 1) ,bsl.amount )),0)
8181: -- nvl(sum(bsl.amount),0)
8182: from oks_bill_cont_lines bcl,
8183: oks_bill_sub_lines bsl
8184: where bcl.cle_id = p_cle_id
8185: and bsl.bcl_id = bcl.id
8186: and bcl.bill_action <> 'TR'

Line 8195: from oks_bill_cont_lines bcl,

8191: Cursor pos_bcl_amount_line (p_cle_id in number) is
8192: Select nvl(sum(decode(sign(trunc(bsl.date_billed_from) - trunc(p_termination_date)) ,-1,
8193: ((trunc(bsl.date_billed_to) - trunc(p_termination_date) + 1) * bsl.amount) /
8194: (trunc(bsl.date_billed_to) - trunc(bsl.date_billed_from) + 1) ,bsl.amount )),0)
8195: from oks_bill_cont_lines bcl,
8196: oks_bill_sub_lines bsl
8197: where bcl.cle_id = p_cle_id
8198: and bsl.bcl_id = bcl.id
8199: and bcl.bill_action <> 'TR'

Line 8208: Select 1 from oks_bill_cont_lines

8204: --End bug#5276678
8205:
8206:
8207: Cursor check_avg_csr(p_cle_id in number) is
8208: Select 1 from oks_bill_cont_lines
8209: where cle_id = p_cle_id
8210: and bill_action = 'AV';
8211:
8212: l_bcl_credit_amount NUMBER;

Line 8336: UPDATE oks_bill_cont_lines

8332:
8333: l_bcl_credit_amount := l_bcl_credit_amount + ((-1)*(p_override_amount - g_credit_amount)) ;
8334: l_bcl_id := g_bcl_id;
8335:
8336: UPDATE oks_bill_cont_lines
8337: SET amount = l_bcl_credit_amount
8338: WHERE id = l_bcl_id ;
8339: g_credit_amount := 0;
8340: Elsif g_credit_amount > p_override_amount then

Line 8352: UPDATE oks_bill_cont_lines

8348:
8349: l_bcl_credit_amount := l_bcl_credit_amount + (g_credit_amount - p_override_amount) ;
8350: l_bcl_id := g_bcl_id;
8351:
8352: UPDATE oks_bill_cont_lines
8353: SET amount = l_bcl_credit_amount
8354: WHERE id = l_bcl_id ;
8355: g_credit_amount := 0;
8356: End If;

Line 8612: Select amount from oks_bill_cont_lines

8608: -- End BUG#3312595 mchoudha
8609:
8610:
8611: Cursor bcl_amount (p_bcl_id in number) is
8612: Select amount from oks_bill_cont_lines
8613: where id = p_bcl_id;
8614:
8615: Cursor bsl_amount (p_bsl_id in number) is
8616: Select amount from oks_bill_sub_lines

Line 8945: UPDATE oks_bill_cont_lines

8941:
8942: l_bcl_credit_amount := l_bcl_credit_amount + ((-1)*(p_override_amount - g_credit_amount)) ;
8943: l_bcl_id := g_bcl_id;
8944:
8945: UPDATE oks_bill_cont_lines
8946: SET amount = l_bcl_credit_amount
8947: WHERE id = l_bcl_id ;
8948: g_credit_amount := 0;
8949: Elsif g_credit_amount > p_override_amount then

Line 8961: UPDATE oks_bill_cont_lines

8957:
8958: l_bcl_credit_amount := l_bcl_credit_amount + (g_credit_amount - p_override_amount) ;
8959: l_bcl_id := g_bcl_id;
8960:
8961: UPDATE oks_bill_cont_lines
8962: SET amount = l_bcl_credit_amount
8963: WHERE id = l_bcl_id ;
8964: g_credit_amount := 0;
8965: End If;

Line 9028: ,OKS_BILL_CONT_LINES BCL

9024: --added NOT Exists clause and lse_id 13
9025: CURSOR L_HDR_BILLED_CSR IS
9026: SELECT nvl(SUM(BSL.amount),0) billed
9027: FROM OKC_K_LINES_B OKCL
9028: ,OKS_BILL_CONT_LINES BCL
9029: ,OKS_BILL_SUB_LINES BSL
9030: WHERE OKCL.dnz_chr_id = p_id
9031: AND OKCL.lse_id in ( 7,8,9,10,11,13,25,35,46)
9032: AND OKCL.id = BSL.cle_id

Line 9068: ,OKS_BILL_CONT_LINES BCL

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

Line 9094: FROM OKS_BILL_CONT_LINES BCL

9090: WHERE OKSL.cle_id = p_id;
9091:
9092: CURSOR l_SUB_LINE_BILLED_CSR IS
9093: SELECT nvl(SUM(BSL.amount),0) billed
9094: FROM OKS_BILL_CONT_LINES BCL
9095: ,OKS_BILL_SUB_LINES BSL
9096: WHERE BSL.cle_id = p_id
9097: AND BSL.bcl_id = BCL.id
9098: AND BCL.bill_action = 'RI';

Line 9178: oks_bill_cont_lines bcl

9174:
9175: CURSOR l_credit_csr(p_sub_line_id in NUMBER ) is
9176: SELECT sum(bsl.amount) suppressed_credit
9177: FROM oks_bill_sub_lines bsl,
9178: oks_bill_cont_lines bcl
9179: WHERE bsl.cle_id = p_sub_line_id
9180: AND bcl.id = bsl.bcl_id
9181: AND btn_id is null
9182: AND bcl.bill_action = 'TR';

Line 9187: oks_bill_cont_lines bcl

9183:
9184: CURSOR l_suppressed_credit_csr(p_sub_line_id in NUMBER ) is
9185: SELECT sum(bsl.amount) suppressed_credit
9186: FROM oks_bill_sub_lines bsl,
9187: oks_bill_cont_lines bcl
9188: WHERE bsl.cle_id = p_sub_line_id
9189: AND bcl.id = bsl.bcl_id
9190: AND btn_id = -44
9191: AND bcl.bill_action = 'TR';

Line 9916: FROM oks_bill_cont_lines bcl,

9912: bsl.date_billed_from,
9913: bsl.date_billed_to,
9914: bsl.amount,
9915: bsd.result
9916: FROM oks_bill_cont_lines bcl,
9917: oks_bill_sub_lines bsl,
9918: oks_bill_sub_line_dtls bsd
9919: WHERE bcl.id = bsl.bcl_id
9920: AND bsl.cle_id = p_cle_id