DBA Data[Home] [Help]

APPS.ARP_CONSINV dependencies on AR_CONS_INV_TRX

Line 231: ar_cons_inv_trx IT,

227: printing_count - 1)
228: WHERE customer_trx_id IN
229: (SELECT PS.customer_trx_id
230: FROM ar_payment_schedules PS,
231: ar_cons_inv_trx IT,
232: ar_cons_inv CI
233: WHERE IT.transaction_type IN ('INVOICE','CREDIT_MEMO')
234: AND CI.cons_inv_id = IT.cons_inv_id
235: AND CI.cons_inv_id = nvl(P_consinv_id,CI.cons_inv_id)

Line 247: ar_cons_inv_trx IT

243: SET cons_inv_id = NULL
244: WHERE payment_schedule_id IN
245: (SELECT IT.adj_ps_id
246: FROM ar_cons_inv CI,
247: ar_cons_inv_trx IT
248: WHERE IT.transaction_type IN ('INVOICE','CREDIT_MEMO',
249: 'RECEIPT')
250: AND CI.cons_inv_id = IT.cons_inv_id
251: AND CI.cons_inv_id = nvl(P_consinv_id, CI.cons_inv_id)

Line 262: ar_cons_inv_trx IT

258: SET cons_inv_id_rev = NULL
259: WHERE payment_schedule_id IN
260: (SELECT IT.adj_ps_id
261: FROM ar_cons_inv CI,
262: ar_cons_inv_trx IT
263: WHERE IT.transaction_type = 'RECEIPT REV'
264: AND CI.cons_inv_id = IT.cons_inv_id
265: AND CI.cons_inv_id = nvl(P_consinv_id, CI.cons_inv_id)
266: AND CI.concurrent_request_id = DECODE(P_consinv_id,

Line 278: ar_cons_inv_trx IT

274: SET cons_inv_id = NULL
275: WHERE receivable_application_id IN
276: (SELECT IT.adj_ps_id
277: FROM ar_cons_inv CI,
278: ar_cons_inv_trx IT
279: WHERE IT.transaction_type IN ('XSITE RECREV', 'XSITE_CMREV',
280: 'XCURR RECREV', 'XSITE XCURR RECREV',
281: 'EXCLUDE RECREV', 'EXCLUDE_CMREV')
282: AND CI.cons_inv_id = IT.cons_inv_id

Line 295: ar_cons_inv_trx IT

291: SET cons_inv_id_to = NULL
292: WHERE receivable_application_id IN
293: (SELECT IT.adj_ps_id
294: FROM ar_cons_inv CI,
295: ar_cons_inv_trx IT
296: WHERE IT.transaction_type IN ('XSITE RECAPP','XSITE_CMAPP',
297: 'XCURR RECAPP', 'XSITE XCURR RECAPP' ,
298: 'EXCLUDE RECAPP', 'EXCLUDE_CMAPP')
299: AND CI.cons_inv_id = IT.cons_inv_id

Line 311: ar_cons_inv_trx IT

307: SET cons_inv_id = NULL
308: WHERE adjustment_id IN
309: (SELECT IT.adj_ps_id
310: FROM ar_cons_inv CI,
311: ar_cons_inv_trx IT
312: WHERE IT.transaction_type = 'ADJUSTMENT'
313: AND CI.cons_inv_id = IT.cons_inv_id
314: AND CI.cons_inv_id = nvl(P_consinv_id, CI.cons_inv_id)
315: AND CI.concurrent_request_id = DECODE (P_consinv_id,

Line 341: DELETE FROM ar_cons_inv_trx_lines

337: AND currency_code = l_currency_code(i)
338: AND cut_off_date <= l_cut_off_date(i) ;
339: -- bug2778646 end
340:
341: DELETE FROM ar_cons_inv_trx_lines
342: WHERE cons_inv_id IN
343: (SELECT CI.cons_inv_id
344: FROM ar_cons_inv CI
345: WHERE CI.cons_inv_id = nvl(P_consinv_id, CI.cons_inv_id)

Line 351: DELETE FROM ar_cons_inv_trx

347: NULL, P_request_id,
348: CI.concurrent_request_id)
349: AND CI.status = 'DRAFT');
350:
351: DELETE FROM ar_cons_inv_trx
352: WHERE cons_inv_id IN
353: (SELECT CI.cons_inv_id
354: FROM ar_cons_inv CI
355: WHERE CI.cons_inv_id = nvl(P_consinv_id, CI.cons_inv_id)

Line 408: | insert into ar_cons_inv_trx for type |

404: | NOTES |
405: | |
406: | MODIFICATION HISTORY |
407: | 05-AUG-97 Jack Martinez bug 499781: |
408: | insert into ar_cons_inv_trx for type |
409: | 'XSITE RECAPP' should not negate amount|
410: | 06-AUG-97 Jack Martinez bug 522890: |
411: | ignore guarantees when collecting |
412: | adjustments. When an invoice is |

Line 963: INSERT INTO ar_cons_inv_trx (cons_inv_id,

959: dbms_output.put_line('trx_id :'||TO_CHAR(l_inv_trx.trx_id));
960: dbms_output.put_line('trx_date :'||TO_CHAR(l_inv_trx.trx_date));
961: dbms_output.put_line('trx_number :'||l_inv_trx.trx_number);
962: */
963: INSERT INTO ar_cons_inv_trx (cons_inv_id,
964: transaction_type,
965: trx_number,
966: transaction_date,
967: amount_original,

Line 992: INSERT INTO ar_cons_inv_trx_lines (cons_inv_id,

988:
989: /* Bug 586099: For credit memo, quantity is stored in
990: quantity_credited rather than quantity_invoiced. */
991: IF (L_inv_trx.class = 'CM') THEN
992: INSERT INTO ar_cons_inv_trx_lines (cons_inv_id,
993: cons_inv_line_number,
994: customer_trx_id,
995: customer_trx_line_id,
996: line_number,

Line 1026: INSERT INTO ar_cons_inv_trx_lines (cons_inv_id,

1022: customer_trx_id = L_inv_trx.trx_id
1023: AND line_type NOT IN ('TAX', 'FREIGHT');
1024:
1025: ELSE
1026: INSERT INTO ar_cons_inv_trx_lines (cons_inv_id,
1027: cons_inv_line_number,
1028: customer_trx_id,
1029: customer_trx_line_id,
1030: line_number,

Line 1062: UPDATE ar_cons_inv_trx_lines TL

1058: END IF;
1059:
1060: /** now update lines with associated tax line **/
1061: /* bug3039537 : Removed
1062: UPDATE ar_cons_inv_trx_lines TL
1063: set TL.tax_amount =
1064: (SELECT sum(nvl(CTL.extended_amount,0))
1065: FROM ra_customer_trx_lines CTL
1066: WHERE CTL.link_to_cust_trx_line_id =

Line 1083: UPDATE ar_cons_inv_trx_lines

1079:
1080: -- 1. Update tax_amount
1081: -- 2. Exclude inclusive tax amount total from extended_amount
1082: FORALL i IN 1..l_line_id.count
1083: UPDATE ar_cons_inv_trx_lines
1084: SET tax_amount = l_tax_sum(i),
1085: extended_amount = extended_amount - l_include_tax_sum(i)
1086: WHERE customer_trx_id = L_inv_trx.trx_id /*4413567*/
1087: AND

Line 1095: INSERT INTO ar_cons_inv_trx_lines (cons_inv_id,

1091: END LOOP;
1092: CLOSE c_tax;
1093:
1094: /** now create 1 summary row for freight **/
1095: INSERT INTO ar_cons_inv_trx_lines (cons_inv_id,
1096: cons_inv_line_number,
1097: customer_trx_id,
1098: customer_trx_line_id,
1099: line_number,

Line 1151: INSERT INTO ar_cons_inv_trx (cons_inv_id,

1147:
1148: /* bug2882196 : Added exclude_from_cons_bill_flag condition not to get legacy
1149: transactions. */
1150: /* bug2922922 : Added hint */
1151: INSERT INTO ar_cons_inv_trx (cons_inv_id,
1152: transaction_type,
1153: trx_number,
1154: transaction_date,
1155: amount_original,

Line 1188: INSERT INTO ar_cons_inv_trx (cons_inv_id,

1184:
1185: /** For Site: cash receipts. **/
1186: /* bug2882196 : Added exclude_from_cons_bill_flag condition not to get legacy
1187: receipts. */
1188: INSERT INTO ar_cons_inv_trx (cons_inv_id,
1189: transaction_type,
1190: trx_number,
1191: transaction_date,
1192: amount_original,

Line 1223: INSERT INTO ar_cons_inv_trx (cons_inv_id,

1219:
1220: /** For Site: cash receipts reversals. **/
1221: /* bug2882196 : Added exclude_from_cons_bill_flag condition not to get legacy
1222: receipts. */
1223: INSERT INTO ar_cons_inv_trx (cons_inv_id,
1224: transaction_type,
1225: trx_number,
1226: transaction_date,
1227: amount_original,

Line 1261: INSERT INTO ar_cons_inv_trx (cons_inv_id,

1257: /** 531330 - changed '(-1)*RA.amount_applied' to 'RA.amount_applied **/
1258: /** Cross Currency functionality implemented. **/
1259: /* bug2882196 : Added 'EXCLUDE RECREV' for when applied to legacy invoices */
1260:
1261: INSERT INTO ar_cons_inv_trx (cons_inv_id,
1262: transaction_type,
1263: trx_number,
1264: transaction_date,
1265: amount_original,

Line 1308: INSERT INTO ar_cons_inv_trx (cons_inv_id,

1304: /*Bug2677085- Added a select statement to pick up those applications which were considered as XSITE RECAPP but now have the same bill to site as that of the
1305: invoice being processed by the CBI. A XSITE RECREV (or XSITE XCURR RECREV) is
1306: created to negate the application from receipt amount. */
1307:
1308: INSERT INTO ar_cons_inv_trx (cons_inv_id,
1309: transaction_type,
1310: trx_number,
1311: transaction_date,
1312: amount_original,

Line 1329: ar_cons_inv_trx inv_trx,

1325: RA.receivable_application_id,
1326: NULL,
1327: ps_cash.org_id
1328: FROM
1329: ar_cons_inv_trx inv_trx,
1330: ar_receivable_applications ra,
1331: ar_payment_schedules ps_cash,
1332: ar_payment_schedules ps_inv
1333: WHERE ra.cons_inv_id_to is not null

Line 1359: INSERT INTO ar_cons_inv_trx (cons_inv_id,

1355: /** Cross Currency functionality has been added. **/
1356: /* bug2882196 : Added 'EXCLUDE RECAPP' for when legacy receipt applied to
1357: non-legacy invoices. */
1358:
1359: INSERT INTO ar_cons_inv_trx (cons_inv_id,
1360: transaction_type,
1361: trx_number,
1362: transaction_date,
1363: amount_original,

Line 1406: INSERT INTO ar_cons_inv_trx (cons_inv_id,

1402: /* Bug2778646- Added a select statement to pick up those applications which were
1403: considered as XSITE RECREV but now have the same bill to site as that of the
1404: invoice being processed by the CBI. A XSITE RECAPP (or XSITE XCURR RECAPP) is
1405: created to negate the application from receipt amount. */
1406: INSERT INTO ar_cons_inv_trx (cons_inv_id,
1407: transaction_type,
1408: trx_number,
1409: transaction_date,
1410: amount_original,

Line 1427: ar_cons_inv_trx inv_trx,

1423: RA.receivable_application_id,
1424: NULL,
1425: ps_cash.org_id
1426: FROM
1427: ar_cons_inv_trx inv_trx,
1428: ar_receivable_applications ra,
1429: ar_payment_schedules ps_cash,
1430: ar_payment_schedules ps_inv
1431: WHERE ra.cons_inv_id_to is null

Line 1449: INSERT INTO ar_cons_inv_trx (cons_inv_id,

1445: /** Will need to add a reversal line because Credit Memo was used **/
1446: /** for a bill-to that is different from the current bill-to. **/
1447: /* bug2882196 : Added 'EXCLUDE_CMREV' for when credit memo applied to
1448: legacy invoices */
1449: INSERT INTO ar_cons_inv_trx (cons_inv_id,
1450: transaction_type,
1451: trx_number,
1452: transaction_date,
1453: amount_original,

Line 1497: INSERT INTO ar_cons_inv_trx (cons_inv_id,

1493: /** For Site: get on-account credit memos assigned to different bill-to but **/
1494: /** applied against invoice for current bill-to. **/
1495: /* bug2882196 : Added 'EXCLUDE_CMAPP' for when legacy credit memo applied to
1496: non-legacy invoice. */
1497: INSERT INTO ar_cons_inv_trx (cons_inv_id,
1498: transaction_type,
1499: trx_number,
1500: transaction_date,
1501: amount_original,

Line 1545: FROM ar_cons_inv_trx

1541: /** For Site: update header for totals. **/
1542: /* bug2882196 Added EXCLUDE_CMREV/APP transaction_type */
1543: SELECT nvl(sum(amount_original),0)
1544: INTO l_new_billed
1545: FROM ar_cons_inv_trx
1546: WHERE cons_inv_id = l_consinv_id
1547: AND transaction_type IN ('INVOICE','CREDIT_MEMO','ADJUSTMENT',
1548: 'XSITE_CMREV','XSITE_CMAPP',
1549: 'EXCLUDE_CMREV', 'EXCLUDE_CMAPP');

Line 1555: FROM ar_cons_inv_trx

1551: /* bug2786667 Added XCURR transaction_type */
1552: /* bug2882196 Added EXCLUDE RECREV/APP transaction_type */
1553: SELECT nvl(sum(amount_original),0)
1554: INTO l_period_receipts
1555: FROM ar_cons_inv_trx
1556: WHERE cons_inv_id = l_consinv_id
1557: AND transaction_type IN ('RECEIPT','RECEIPT REV','XSITE RECREV',
1558: 'XSITE RECAPP',
1559: 'XSITE XCURR RECAPP','XSITE XCURR RECREV',

Line 1575: FROM ar_cons_inv_trx IT

1571: UPDATE ar_payment_schedules PS
1572: SET PS.cons_inv_id = l_consinv_id
1573: WHERE PS.payment_schedule_id IN
1574: (SELECT IT.adj_ps_id
1575: FROM ar_cons_inv_trx IT
1576: WHERE IT.cons_inv_id = l_consinv_id
1577: AND IT.transaction_type IN ('INVOICE','CREDIT_MEMO',
1578: 'RECEIPT'));
1579:

Line 1584: FROM ar_cons_inv_trx IT

1580: UPDATE ar_payment_schedules PS
1581: SET PS.cons_inv_id_rev = l_consinv_id
1582: WHERE PS.payment_schedule_id IN
1583: (SELECT IT.adj_ps_id
1584: FROM ar_cons_inv_trx IT
1585: WHERE IT.cons_inv_id = l_consinv_id
1586: AND IT.transaction_type = 'RECEIPT REV');
1587:
1588: /* bug2882196 Added 'EXCLUDE RECREV' and 'EXCLUDE_CMREV' */

Line 1593: FROM ar_cons_inv_trx IT

1589: UPDATE ar_receivable_applications RA
1590: SET RA.cons_inv_id = l_consinv_id
1591: WHERE RA.receivable_application_id IN
1592: (SELECT IT.adj_ps_id
1593: FROM ar_cons_inv_trx IT
1594: WHERE IT.cons_inv_id = l_consinv_id
1595: AND IT.transaction_type IN ('XSITE RECREV',
1596: 'XSITE_CMREV',
1597: 'XCURR RECREV',

Line 1609: FROM ar_cons_inv_trx IT

1605: UPDATE ar_receivable_applications RA
1606: SET RA.cons_inv_id_to = l_consinv_id
1607: WHERE RA.receivable_application_id IN
1608: (SELECT IT.adj_ps_id
1609: FROM ar_cons_inv_trx IT
1610: WHERE IT.cons_inv_id = l_consinv_id
1611: AND IT.transaction_type IN ('XSITE RECAPP',
1612: 'XSITE_CMAPP',
1613: 'XCURR RECAPP',

Line 1622: (SELECT /*+ index (IT AR_CONS_INV_TRX_N1) */

1618: /* bug2922922 : Added hint */
1619: UPDATE ar_adjustments RA
1620: SET RA.cons_inv_id = l_consinv_id
1621: WHERE RA.adjustment_id IN
1622: (SELECT /*+ index (IT AR_CONS_INV_TRX_N1) */
1623: IT.adj_ps_id
1624: FROM ar_cons_inv_trx IT
1625: WHERE IT.cons_inv_id = l_consinv_id
1626: AND IT.transaction_type = 'ADJUSTMENT');

Line 1624: FROM ar_cons_inv_trx IT

1620: SET RA.cons_inv_id = l_consinv_id
1621: WHERE RA.adjustment_id IN
1622: (SELECT /*+ index (IT AR_CONS_INV_TRX_N1) */
1623: IT.adj_ps_id
1624: FROM ar_cons_inv_trx IT
1625: WHERE IT.cons_inv_id = l_consinv_id
1626: AND IT.transaction_type = 'ADJUSTMENT');
1627:
1628: -- bug2778646 Changed status of selected merged cbi.

Line 1717: ar_cons_inv_trx IT,

1713:
1714: CURSOR c_pending_trx IS
1715: SELECT PS.customer_trx_id
1716: FROM ar_payment_schedules PS,
1717: ar_cons_inv_trx IT,
1718: ar_cons_inv CI
1719: WHERE
1720: CI.print_status = 'PENDING'
1721: AND IT.cons_inv_id = CI.cons_inv_id

Line 1742: ar_cons_inv_trx IT,

1738: 1)
1739: WHERE CT.customer_trx_id IN
1740: (SELECT PS.customer_trx_id
1741: FROM ar_payment_schedules PS,
1742: ar_cons_inv_trx IT,
1743: ar_cons_inv CI
1744: WHERE (
1745: (P_print_option = 'REPRINT'
1746: AND CI.cons_inv_id=nvl(P_consinv_id,CI.cons_inv_id)