DBA Data[Home] [Help]

APPS.AR_REVENUE_MANAGEMENT_PVT dependencies on AR_LINE_CONTS

Line 71: INSERT INTO ar_line_conts_all

67: /* This is either invoice API or autoinvoice */
68: IF (g_source = 'AR_INVOICE_API')
69: THEN
70:
71: INSERT INTO ar_line_conts_all
72: (
73: customer_trx_line_id,
74: contingency_id,
75: contingency_code,

Line 134: FROM ar_line_conts_all alc

130: AND teg.trx_line_id = tlg.trx_line_id
131: AND tlg.customer_trx_line_id = ctl.customer_trx_line_id)
132: AND NOT EXISTS
133: (SELECT 'prevent duplicate contingency'
134: FROM ar_line_conts_all alc
135: WHERE alc.customer_trx_line_id = ctl.customer_trx_line_id
136: AND alc.contingency_id = 5)
137: GROUP BY ctl.customer_trx_line_id, tl.term_id
138: HAVING max(due_days) > arp_standard.sysparm.payment_threshold;

Line 141: INSERT INTO ar_line_conts_all

137: GROUP BY ctl.customer_trx_line_id, tl.term_id
138: HAVING max(due_days) > arp_standard.sysparm.payment_threshold;
139:
140: ELSE /* Autoinvoice */
141: INSERT INTO ar_line_conts_all
142: (
143: customer_trx_line_id,
144: contingency_id,
145: contingency_code,

Line 201: FROM ar_line_conts_all alc

197: FROM ra_interface_errors_all ie
198: WHERE ie.interface_line_id = ctl.customer_trx_line_id)
199: AND NOT EXISTS
200: (SELECT 'prevent duplicate contingency'
201: FROM ar_line_conts_all alc
202: WHERE alc.customer_trx_line_id = ctl.customer_trx_line_id
203: AND alc.contingency_id = 5)
204: GROUP BY ctl.customer_trx_line_id, tl.term_id
205: HAVING max(due_days) > arp_standard.sysparm.payment_threshold;

Line 208: INSERT INTO ar_line_conts_all

204: GROUP BY ctl.customer_trx_line_id, tl.term_id
205: HAVING max(due_days) > arp_standard.sysparm.payment_threshold;
206: END IF;
207: ELSE /* Manual transaction */
208: INSERT INTO ar_line_conts_all
209: (
210: customer_trx_line_id,
211: contingency_id,
212: contingency_code,

Line 264: FROM ar_line_conts_all alc

260: AND ct.term_id = tl.term_id
261: AND NVL(ctl.deferral_exclusion_flag, 'N') = 'N'
262: AND NOT EXISTS
263: (SELECT 'prevent duplicate contingency'
264: FROM ar_line_conts_all alc
265: WHERE alc.customer_trx_line_id = ctl.customer_trx_line_id
266: AND alc.contingency_id = 5)
267: GROUP BY ctl.customer_trx_line_id, ctl.org_id,tl.term_id
268: HAVING max(tl.due_days) > arp_standard.sysparm.payment_threshold;

Line 307: INSERT INTO ar_line_conts_all

303: /* This is either invoice API or autoinvoice */
304: IF (g_source = 'AR_INVOICE_API')
305: THEN
306:
307: INSERT INTO ar_line_conts_all
308: (
309: customer_trx_line_id,
310: contingency_id,
311: contingency_code,

Line 370: FROM ar_line_conts_all alc

366: AND teg.trx_line_id = tlg.trx_line_id
367: AND tlg.customer_trx_line_id = ctl.customer_trx_line_id)
368: AND NOT EXISTS
369: (SELECT 'prevent duplicate contingency'
370: FROM ar_line_conts_all alc
371: WHERE alc.customer_trx_line_id = ctl.customer_trx_line_id
372: AND alc.contingency_id = 3);
373:
374: ELSE /* Autoinvoice */

Line 375: INSERT INTO ar_line_conts_all

371: WHERE alc.customer_trx_line_id = ctl.customer_trx_line_id
372: AND alc.contingency_id = 3);
373:
374: ELSE /* Autoinvoice */
375: INSERT INTO ar_line_conts_all
376: (
377: customer_trx_line_id,
378: contingency_id,
379: contingency_code,

Line 435: FROM ar_line_conts_all alc

431: FROM ra_interface_errors_all ie
432: WHERE ie.interface_line_id = ctl.customer_trx_line_id)
433: AND NOT EXISTS
434: (SELECT 'prevent duplicate contingency'
435: FROM ar_line_conts_all alc
436: WHERE alc.customer_trx_line_id = ctl.customer_trx_line_id
437: AND alc.contingency_id = 3);
438: END IF;
439: ELSE /* Manual transaction */

Line 440: INSERT INTO ar_line_conts_all

436: WHERE alc.customer_trx_line_id = ctl.customer_trx_line_id
437: AND alc.contingency_id = 3);
438: END IF;
439: ELSE /* Manual transaction */
440: INSERT INTO ar_line_conts_all
441: (
442: customer_trx_line_id,
443: contingency_id,
444: contingency_code,

Line 496: FROM ar_line_conts_all alc

492: AND ar_revenue_management_pvt.creditworthy
493: (ct.bill_to_customer_id, ct.bill_to_site_use_id)= 0
494: AND NOT EXISTS
495: (SELECT 'prevent duplicate contingency'
496: FROM ar_line_conts_all alc
497: WHERE alc.customer_trx_line_id = ctl.customer_trx_line_id
498: AND alc.contingency_id = 3);
499: END IF;
500:

Line 554: ar_line_conts lc,

550: 'PARENT',
551: max(interface_line_attribute6),
552: l_request_id
553: FROM ar_deferred_lines dl,
554: ar_line_conts lc,
555: ar_deferral_reasons dr,
556: ra_customer_trx_lines ctl
557: WHERE dl.customer_trx_line_id = lc.customer_trx_line_id
558: AND lc.contingency_id = dr.contingency_id

Line 602: ar_line_conts lc,

598: 'PARENT',
599: max(interface_line_attribute6),
600: l_request_id
601: FROM ar_deferred_lines dl,
602: ar_line_conts lc,
603: ar_deferral_reasons dr,
604: ra_customer_trx_lines ctl
605: WHERE dl.customer_trx_line_id = lc.customer_trx_line_id
606: AND lc.contingency_id = dr.contingency_id

Line 792: ar_line_conts lc,

788: FROM ar_reviewed_lines_gt parent,
789: ra_customer_trx_lines parent_line,
790: ar_deferred_lines child,
791: ra_customer_trx_lines child_line,
792: ar_line_conts lc,
793: ar_deferral_reasons dr
794: WHERE parent.customer_trx_id = parent_line.customer_trx_id
795: AND parent.customer_trx_line_id = parent_line.customer_trx_line_id
796: AND parent_line.interface_line_context = g_om_context

Line 878: ar_line_conts lc,

874: 'OTHERS',
875: l_request_id,
876: max(lc.expiration_date)
877: FROM ar_deferred_lines dl,
878: ar_line_conts lc,
879: ar_deferral_reasons dr
880: WHERE dl.customer_trx_line_id = lc.customer_trx_line_id
881: AND lc.contingency_id = dr.contingency_id
882: AND lc.completed_flag = 'N'

Line 926: ar_line_conts lc,

922: max(acctd_amount_pending),
923: 'UPDATE',
924: l_request_id
925: FROM ar_deferred_lines dl,
926: ar_line_conts lc,
927: ar_deferral_reasons dr
928: WHERE dl.customer_trx_line_id = lc.customer_trx_line_id
929: AND lc.contingency_id = dr.contingency_id
930: AND line_collectible_flag = 'N' -- not collectilbe

Line 1121: from ar_line_conts lc,

1117: /* debug cursor */
1118: CURSOR alc (p_req_id NUMBER, p_line_id NUMBER) IS
1119: select lc.customer_trx_line_id, lc.contingency_id,
1120: dr.policy_attached
1121: from ar_line_conts lc,
1122: ar_deferral_reasons dr
1123: where lc.contingency_id = dr.contingency_id
1124: and ((p_req_id IS NULL and p_line_id IS NOT NULL AND
1125: lc.customer_trx_line_id = p_line_id) OR

Line 1155: FROM ar_line_conts lrc

1151: THEN
1152: /* batch process, based on request_id */
1153:
1154: DELETE
1155: FROM ar_line_conts lrc
1156: WHERE customer_trx_line_id IN
1157: (SELECT customer_trx_line_id
1158: FROM ra_customer_trx_lines ctl
1159: WHERE ctl.request_id = p_request_id)

Line 1176: FROM ar_line_conts lc

1172: -- duration against the refund policy in the revenue policy
1173: -- tabs in the system options form.
1174:
1175: DELETE
1176: FROM ar_line_conts lc
1177: WHERE lc.customer_trx_line_id IN
1178: (SELECT customer_trx_line_id
1179: FROM ra_customer_trx_lines ctl,
1180: ra_customer_trx ct

Line 1202: FROM ar_line_conts lc

1198: -- duration against the refund policy in the revenue policy
1199: -- tabs in the system options form.
1200:
1201: DELETE
1202: FROM ar_line_conts lc
1203: WHERE lc.customer_trx_line_id IN
1204: (SELECT customer_trx_line_id
1205: FROM ra_customer_trx_lines ctl,
1206: ra_customer_trx ct,

Line 1233: DELETE from ar_line_conts

1229: -- simpler by deleting the rows.
1230:
1231: /* 5452544 - breaking sql into separate sections for interactive
1232: and batch processing */
1233: DELETE from ar_line_conts
1234: WHERE customer_trx_line_id IN
1235: (SELECT customer_trx_line_id
1236: FROM ra_customer_trx_lines ctl,
1237: ra_rules r

Line 1251: FROM ar_line_conts lrc

1247: END IF;
1248: ELSE
1249: /* manual process, based on customer_trx_line_id */
1250: DELETE
1251: FROM ar_line_conts lrc
1252: WHERE trunc(expiration_date) - trunc(sysdate) <
1253: NVL(arp_standard.sysparm.standard_refund,0)
1254: AND lrc.customer_trx_line_id = p_customer_trx_line_id
1255: AND EXISTS

Line 1269: FROM ar_line_conts lc

1265: -- duration against the refund policy in the revenue policy
1266: -- tabs in the system options form.
1267:
1268: DELETE
1269: FROM ar_line_conts lc
1270: WHERE lc.customer_trx_line_id = p_customer_trx_line_id
1271: AND EXISTS
1272: (SELECT 'its a credit_classification contingency'
1273: FROM ar_deferral_reasons dr

Line 1296: FROM ar_line_conts lc

1292: -- duration against the refund policy in the revenue policy
1293: -- tabs in the system options form.
1294:
1295: DELETE
1296: FROM ar_line_conts lc
1297: WHERE lc.customer_trx_line_id = p_customer_trx_line_id
1298: AND EXISTS
1299: (SELECT 'it is a term contingency'
1300: FROM ar_deferral_reasons dr

Line 1328: DELETE FROM AR_LINE_CONTS A

1324: -- simpler by deleting the rows.
1325:
1326: /* 5452544 - breaking sql into separate sections for interactive
1327: and batch processing */
1328: DELETE FROM AR_LINE_CONTS A
1329: WHERE A.customer_trx_line_id = p_customer_trx_line_id
1330: AND EXISTS (SELECT 'DEFERRED RULE'
1331: FROM ra_customer_trx_lines ctl,
1332: ra_rules r

Line 1350: FROM ar_line_conts

1346: the imported lines are rejected by validations */
1347: IF (g_source = 'AR_INVOICE_API') THEN
1348:
1349: DELETE
1350: FROM ar_line_conts
1351: WHERE customer_trx_line_id IN
1352: (SELECT customer_trx_line_id
1353: FROM ar_trx_errors_gt teg,
1354: ar_trx_lines_gt tlg

Line 1362: FROM ar_line_conts

1358:
1359: ELSIF p_request_id IS NOT NULL THEN
1360:
1361: DELETE
1362: FROM ar_line_conts
1363: WHERE customer_trx_line_id IN
1364: (SELECT ie.interface_line_id
1365: FROM ra_interface_errors ie
1366: WHERE request_id = p_request_id);

Line 1474: INSERT INTO ar_line_conts

1470: and il.parent_line_id is not null);
1471:
1472: IF l_exists <> 0
1473: THEN
1474: INSERT INTO ar_line_conts
1475: (
1476: customer_trx_line_id,
1477: contingency_id,
1478: contingency_code,

Line 1514: ar_line_conts plc

1510: FROM ra_customer_trx ct,
1511: ra_customer_trx_lines ctl,
1512: ra_cust_trx_types ctt,
1513: ra_interface_lines il,
1514: ar_line_conts plc
1515: WHERE ct.request_id = p_request_id
1516: AND ct.cust_trx_type_id = ctt.cust_trx_type_id
1517: AND nvl(ct.invoicing_rule_id, 0) <> -3 /* 11711172 */
1518: AND ctt.type = 'INV'

Line 1526: FROM ar_line_conts clc

1522: AND il.parent_line_id IS NOT NULL
1523: AND plc.customer_trx_line_id = get_line_id(il.parent_line_id)
1524: AND NOT EXISTS (
1525: SELECT 'contingency already applied'
1526: FROM ar_line_conts clc
1527: WHERE clc.customer_trx_line_id = ctl.customer_trx_line_id
1528: AND clc.contingency_code = plc.contingency_id);
1529:
1530: debug('rows copied ar_line_conts: ' || SQL%ROWCOUNT);

Line 1530: debug('rows copied ar_line_conts: ' || SQL%ROWCOUNT);

1526: FROM ar_line_conts clc
1527: WHERE clc.customer_trx_line_id = ctl.customer_trx_line_id
1528: AND clc.contingency_code = plc.contingency_id);
1529:
1530: debug('rows copied ar_line_conts: ' || SQL%ROWCOUNT);
1531:
1532: END IF; -- end of l_exists condition
1533:
1534: debug('copy_parent_contingencies()-');

Line 1726: INSERT INTO ar_line_conts

1722:
1723: IF p_request_id IS NOT NULL
1724: THEN
1725: /* Modified logic for autoinvoice */
1726: INSERT INTO ar_line_conts
1727: (
1728: customer_trx_line_id,
1729: contingency_code,
1730: contingency_id,

Line 1795: FROM ar_line_conts lc

1791: AND NOT (NVL(ctl.interface_line_context,'##NOT_MATCH##') = g_om_context AND
1792: dr.revrec_event_code in ('INVOICING','CUSTOMER_ACCEPTANCE'))
1793: AND NOT EXISTS
1794: ( SELECT 'contingency exists'
1795: FROM ar_line_conts lc
1796: WHERE lc.customer_trx_line_id = rbr.id
1797: AND lc.contingency_id = rbr.result_value
1798: )
1799: GROUP BY rbr.id, dr.contingency_id, dr.expiration_event_code,

Line 1804: INSERT INTO ar_line_conts

1800: dr.expiration_days, ct.org_id, ct.trx_date, ct.ship_date_actual;
1801:
1802: ELSE
1803: /* original logic */
1804: INSERT INTO ar_line_conts
1805: (
1806: customer_trx_line_id,
1807: contingency_code,
1808: contingency_id,

Line 1871: FROM ar_line_conts lc

1867: AND NOT (NVL(ctl.interface_line_context,'##NOT_MATCH##') = g_om_context AND
1868: dr.revrec_event_code in ('INVOICING','CUSTOMER_ACCEPTANCE'))
1869: AND NOT EXISTS
1870: ( SELECT 'contingency exists'
1871: FROM ar_line_conts lc
1872: WHERE lc.customer_trx_line_id = rbr.id
1873: AND lc.contingency_id = rbr.result_value
1874: )
1875: AND

Line 1883: debug('rows inserted ar_line_conts: ' || SQL%ROWCOUNT);

1879: dr.expiration_days, ct.org_id, ct.trx_date, ct.ship_date_actual;
1880:
1881: END IF; -- end p_request_id
1882:
1883: debug('rows inserted ar_line_conts: ' || SQL%ROWCOUNT);
1884: debug('default_contingencies()-');
1885:
1886: EXCEPTION
1887: WHEN NO_DATA_FOUND THEN

Line 1918: INSERT INTO ar_line_conts

1914: identifier along with customer_trx_line_id, but remains part of the key
1915: so to avoid a case change we populate contingency_code with contingency_id
1916: */
1917:
1918: INSERT INTO ar_line_conts
1919: (
1920: customer_trx_line_id,
1921: contingency_id,
1922: contingency_code,

Line 2028: INSERT INTO ar_line_conts

2024: identifier along with customer_trx_line_id, but remains part of the key
2025: so to avoid a case change we populate contingency_code with contingency_id
2026: */
2027:
2028: INSERT INTO ar_line_conts
2029: (
2030: customer_trx_line_id,
2031: contingency_id,
2032: contingency_code,

Line 2131: -- please note we are joining with ar_line_conts

2127: debug('p_customer_trx_line_id : ' || p_customer_trx_line_id);
2128:
2129: l_user_id := fnd_global.user_id;
2130:
2131: -- please note we are joining with ar_line_conts
2132: -- becuase we want to insert rows in the parent table only if
2133: -- there exists a row in the child table.
2134:
2135: IF (g_source = 'AR_INVOICE_API') THEN

Line 2216: ar_line_conts lrc

2212: thg.org_id
2213: FROM ar_trx_header_gt thg,
2214: ar_trx_lines_gt tlg,
2215: ar_trx_contingencies_gt tcg,
2216: ar_line_conts lrc
2217: WHERE tlg.request_id = p_request_id
2218: AND tlg.customer_trx_id = thg.customer_trx_id
2219: AND tlg.customer_trx_line_id = lrc.customer_trx_line_id
2220: AND tlg.trx_header_id = tcg.trx_header_id

Line 2275: ar_line_conts lrc

2271: sysdate,
2272: thg.org_id
2273: FROM ar_trx_header_gt thg,
2274: ar_trx_lines_gt tlg,
2275: ar_line_conts lrc
2276: WHERE tlg.request_id = p_request_id
2277: AND tlg.customer_trx_id = thg.customer_trx_id
2278: AND tlg.customer_trx_line_id = lrc.customer_trx_line_id
2279: AND NOT EXISTS

Line 2365: ar_line_conts lrc,

2361: ct.org_id,
2362: MAX(il.parent_line_id)
2363: FROM ra_customer_trx ct,
2364: ra_customer_trx_lines ctl,
2365: ar_line_conts lrc,
2366: ar_interface_conts ic,
2367: ra_interface_lines il
2368: WHERE ctl.request_id = p_request_id
2369: AND ctl.customer_trx_id = ct.customer_trx_id

Line 2432: ar_line_conts lrc,

2428: ct.org_id,
2429: MAX(il.parent_line_id)
2430: FROM ra_customer_trx ct,
2431: ra_customer_trx_lines ctl,
2432: ar_line_conts lrc,
2433: ra_interface_lines il
2434: WHERE ((p_request_id IS NULL AND p_customer_trx_line_id IS NOT NULL AND
2435: ctl.customer_trx_line_id = p_customer_trx_line_id) OR
2436: (p_request_id IS NOT NULL AND ctl.request_id = p_request_id))

Line 2462: FROM ar_line_conts_all lc

2458: SET line_collectible_flag = 'Y'
2459: WHERE dl.request_id = p_request_id
2460: AND NOT EXISTS
2461: (SELECT 'incomplete contingency'
2462: FROM ar_line_conts_all lc
2463: WHERE request_id = p_request_id
2464: AND lc.customer_trx_line_id = dl.customer_trx_line_id
2465: AND lc.completed_flag = 'N');
2466:

Line 2474: ar_line_conts_all lrc,

2470: WHERE dl.request_id = p_request_id
2471: and dl.customer_trx_id in
2472: (SELECT ctl.customer_trx_id /* its a pre-billing contingency */
2473: FROM ra_customer_trx_lines_all ctl,
2474: ar_line_conts_all lrc,
2475: ar_deferral_reasons dr
2476: WHERE ctl.customer_trx_line_id = dl.customer_trx_line_id
2477: and ctl.customer_trx_line_id=lrc.customer_trx_line_id
2478: and trunc(nvl(lrc.expiration_date,sysdate)) - trunc(sysdate) <= 0

Line 2489: FROM ar_line_conts_all lc

2485: SET line_collectible_flag = 'Y'
2486: WHERE dl.customer_trx_line_id = p_customer_trx_line_id
2487: AND NOT EXISTS
2488: (SELECT 'incomplete contingency'
2489: FROM ar_line_conts_all lc
2490: WHERE customer_trx_line_id = p_customer_trx_line_id
2491: AND lc.customer_trx_line_id = dl.customer_trx_line_id
2492: AND lc.completed_flag = 'N');
2493:

Line 2501: ar_line_conts_all lrc,

2497: WHERE dl.customer_trx_line_id = p_customer_trx_line_id
2498: and dl.customer_trx_id in
2499: (SELECT ctl.customer_trx_id /* its a pre-billing contingency */
2500: FROM ra_customer_trx_lines_all ctl,
2501: ar_line_conts_all lrc,
2502: ar_deferral_reasons dr
2503: WHERE ctl.customer_trx_line_id = dl.customer_trx_line_id
2504: and ctl.customer_trx_line_id=lrc.customer_trx_line_id
2505: and trunc(nvl(lrc.expiration_date,sysdate)) - trunc(sysdate) <= 0

Line 3174: FROM ar_line_conts lc,

3170: -- select the contingencies for this line which
3171: -- was waiting for this event.
3172: CURSOR conts IS
3173: SELECT dr.contingency_id, revrec_event_code, expiration_event_code
3174: FROM ar_line_conts lc,
3175: ar_deferral_reasons dr
3176: WHERE lc.contingency_id = dr.contingency_id
3177: AND lc.customer_trx_line_id = p_cust_trx_line_id
3178: AND (dr.revrec_event_code = p_event_code OR

Line 3223: UPDATE ar_line_conts

3219: will insure that the expiration_event_date is always
3220:
3221: */
3222:
3223: UPDATE ar_line_conts
3224: SET expiration_date =
3225: DECODE(cont_rec.expiration_event_code, p_event_code,
3226: NVL(p_event_date + expiration_days,expiration_date),
3227: expiration_date),

Line 4241: FROM ar_line_conts lc,

4237: CURSOR contingencies IS
4238: SELECT lc.customer_trx_line_id,
4239: lc.contingency_id,
4240: lc.expiration_date
4241: FROM ar_line_conts lc,
4242: ar_deferral_reasons dr
4243: WHERE lc.customer_trx_line_id = p_customer_trx_line_id
4244: AND lc.contingency_id = dr.contingency_id
4245: AND lc.completed_flag = 'N'

Line 4275: UPDATE ar_line_conts

4271:
4272: END LOOP;
4273:
4274: FORALL i in 1..l_index-1
4275: UPDATE ar_line_conts
4276: SET completed_flag = 'Y',
4277: reason_removal_date = sysdate,
4278: last_updated_by = l_last_updated_by,
4279: last_update_date = sysdate,

Line 4299: FROM ar_line_conts lc,

4295: l_exists_contingency_based BOOLEAN;
4296:
4297: CURSOR cash_based IS
4298: SELECT 1
4299: FROM ar_line_conts lc,
4300: ar_deferral_reasons dr
4301: WHERE lc.contingency_id = dr.contingency_id
4302: AND lc.customer_trx_line_id = p_cust_trx_line_id
4303: AND lc.completed_flag = 'N'

Line 4309: FROM ar_line_conts lc,

4305:
4306:
4307: CURSOR contingency_based IS
4308: SELECT 1
4309: FROM ar_line_conts lc,
4310: ar_deferral_reasons dr
4311: WHERE lc.contingency_id = dr.contingency_id
4312: AND lc.customer_trx_line_id = p_cust_trx_line_id
4313: AND lc.completed_flag = 'N'

Line 4436: UPDATE ar_line_conts

4432: l_sysdate := trunc(sysdate);
4433: l_last_updated_by := arp_global.user_id;
4434: l_last_update_login := arp_global.last_update_login;
4435:
4436: UPDATE ar_line_conts
4437: SET expiration_date = nvl(p_expiration_date, expiration_date),
4438: expiration_event_date = nvl(p_expiration_event_date, expiration_event_date),
4439: expiration_days = nvl(p_expiration_days, expiration_days),
4440: completed_flag = nvl(p_completed_flag, completed_flag),

Line 4516: FROM ar_line_conts

4512: p_contingency_id);
4513: END IF;
4514:
4515: DELETE
4516: FROM ar_line_conts
4517: WHERE customer_trx_line_id = p_customer_trx_line_id
4518: AND contingency_id = p_contingency_id;
4519:
4520: IF pg_debug IN ('Y', 'C') THEN

Line 4748: ar_line_conts_all lrc,

4744: /* Bug 12813416 */
4745: CURSOR c1 IS
4746: SELECT 'its a pre-billing contingency'
4747: FROM ra_customer_trx_lines_all ctl,
4748: ar_line_conts_all lrc,
4749: ar_deferral_reasons dr
4750: WHERE ctl.customer_trx_id = p_customer_trx_id
4751: and ctl.customer_trx_line_id=lrc.customer_trx_line_id
4752: and trunc(nvl(lrc.expiration_date,sysdate)) - trunc(sysdate) <= 0

Line 4851: DELETE FROM ar_line_conts

4847:
4848: DELETE FROM ar_deferred_lines
4849: WHERE request_id = p_request_id;
4850:
4851: DELETE FROM ar_line_conts
4852: WHERE request_id = p_request_id;
4853:
4854: IF pg_debug IN ('Y', 'C') THEN
4855: debug('ar_revenue_management_pvt.delete_failed_rows()-');

Line 4925: FROM ar_line_conts

4921:
4922: -- First delete from the child rows
4923:
4924: DELETE
4925: FROM ar_line_conts
4926: WHERE customer_trx_line_id IN
4927: (
4928: SELECT customer_trx_line_id
4929: FROM ar_deferred_lines

Line 5014: ar_line_conts lc,

5010:
5011: CURSOR contingencies IS
5012: SELECT 1
5013: FROM ar_deferred_lines dl,
5014: ar_line_conts lc,
5015: ar_deferral_reasons dl
5016: WHERE dl.customer_trx_line_id = lc.customer_trx_line_id
5017: AND lc.contingency_id = dl.contingency_id
5018: AND lc.completed_flag = 'N'

Line 5127: ar_line_conts lc,

5123:
5124: CURSOR contingencies IS
5125: SELECT 1
5126: FROM ar_deferred_lines dl,
5127: ar_line_conts lc,
5128: ar_deferral_reasons dr
5129: WHERE dl.customer_trx_line_id = lc.customer_trx_line_id
5130: AND lc.contingency_id = dr.contingency_id
5131: AND lc.completed_flag = 'N'

Line 7463: -- the following would insert a row in the ar_line_conts table

7459: x_error_count := validate_contingencies( p_request_id => p_request_id);
7460:
7461: debug('validation done');
7462:
7463: -- the following would insert a row in the ar_line_conts table
7464: -- for each contingency passed in the ra_interface_contingencies_all table.
7465:
7466: IF (g_source = 'AR_INVOICE_API') THEN
7467: insert_contingencies_from_gt(p_request_id => p_request_id);