DBA Data[Home] [Help]

APPS.ARP_PROC_RCT_UTIL dependencies on AR_MISC_CASH_DISTRIBUTIONS

Line 559: FROM ar_misc_cash_distributions mcd

555: END IF;
556:
557: SELECT ROUND(100 - sum(mcd.percent),3)
558: INTO l_rounding_diff
559: FROM ar_misc_cash_distributions mcd
560: WHERE mcd.cash_receipt_id = p_cash_receipt_id;
561:
562: IF (l_rounding_diff <> 0) THEN
563: -- rounding error must be added to first record so that percent

Line 576: UPDATE ar_misc_cash_distributions mcd

572: | distribution id for use in MRC |
573: | engine for trigger replacement |
574: +----------------------------------*/
575:
576: UPDATE ar_misc_cash_distributions mcd
577: SET mcd.percent = mcd.percent + l_rounding_diff
578: WHERE cash_receipt_id = p_cash_receipt_id
579: AND ROWNUM =1
580: RETURNING misc_cash_distribution_id

Line 592: p_table_name => 'AR_MISC_CASH_DISTRIBUTIONS',

588: /*BUG4301323
589: BEGIN
590: ar_mrc_engine.maintain_mrc_data(
591: p_event_mode => 'UPDATE',
592: p_table_name => 'AR_MISC_CASH_DISTRIBUTIONS',
593: p_mode => 'BATCH',
594: p_key_value_list => l_misc_cash_key_value_list);
595: EXCEPTION
596: WHEN OTHERS THEN

Line 666: p_created_from IN ar_misc_cash_distributions.created_from%TYPE default 'ARRERCT'

662: p_receipt_date IN ar_cash_receipts.receipt_date%TYPE,
663: p_receivables_trx_id IN ar_cash_receipts.receivables_trx_id%TYPE,
664: p_distribution_set_id IN ar_cash_receipts.distribution_set_id%TYPE default NULL,
665: p_ussgl_trx_code IN ar_cash_receipts.ussgl_transaction_code%TYPE default NULL,
666: p_created_from IN ar_misc_cash_distributions.created_from%TYPE default 'ARRERCT'
667: ) IS
668:
669: l_trx_code_combination_id ar_receivables_trx.code_combination_id%TYPE;
670: l_distribution_set_id ar_receivables_trx.default_acctg_distribution_set%TYPE;

Line 671: l_dummy ar_misc_cash_distributions.misc_cash_distribution_id%TYPE;

667: ) IS
668:
669: l_trx_code_combination_id ar_receivables_trx.code_combination_id%TYPE;
670: l_distribution_set_id ar_receivables_trx.default_acctg_distribution_set%TYPE;
671: l_dummy ar_misc_cash_distributions.misc_cash_distribution_id%TYPE;
672: l_misc_cash_dist_rec ar_misc_cash_distributions%ROWTYPE;
673: l_misc_cash_key_value_list gl_ca_utility_pkg.r_key_value_arr; /* MRC */
674: l_crh_ccid ar_cash_receipt_history.account_code_combination_id%TYPE; /*Bug fix 4025652 */
675: l_type ar_receivables_trx.type%TYPE; /*4726219 */

Line 672: l_misc_cash_dist_rec ar_misc_cash_distributions%ROWTYPE;

668:
669: l_trx_code_combination_id ar_receivables_trx.code_combination_id%TYPE;
670: l_distribution_set_id ar_receivables_trx.default_acctg_distribution_set%TYPE;
671: l_dummy ar_misc_cash_distributions.misc_cash_distribution_id%TYPE;
672: l_misc_cash_dist_rec ar_misc_cash_distributions%ROWTYPE;
673: l_misc_cash_key_value_list gl_ca_utility_pkg.r_key_value_arr; /* MRC */
674: l_crh_ccid ar_cash_receipt_history.account_code_combination_id%TYPE; /*Bug fix 4025652 */
675: l_type ar_receivables_trx.type%TYPE; /*4726219 */
676:

Line 700: DELETE ar_misc_cash_distributions

696: | distribution id for use in MRC |
697: | engine for trigger replacement |
698: +----------------------------------*/
699:
700: DELETE ar_misc_cash_distributions
701: WHERE cash_receipt_id = p_cash_receipt_id
702: RETURNING misc_cash_distribution_id
703: BULK COLLECT INTO l_misc_cash_key_value_list;
704: --

Line 714: p_table_name => 'AR_MISC_CASH_DISTRIBUTIONS',

710: /*BUG4301323
711: BEGIN
712: ar_mrc_engine.maintain_mrc_data(
713: p_event_mode => 'DELETE',
714: p_table_name => 'AR_MISC_CASH_DISTRIBUTIONS',
715: p_mode => 'BATCH',
716: p_key_value_list => l_misc_cash_key_value_list);
717: EXCEPTION
718: WHEN OTHERS THEN

Line 844: -- do not create ar_misc_cash_distributions if receipt amount = 0

840:
841: ELSIF (l_distribution_set_id is not null) THEN
842:
843: -- 941243: insert distributions records
844: -- do not create ar_misc_cash_distributions if receipt amount = 0
845: /* Bug fix 2272461
846: When the MISC receipt amount is changed to zero, the MISCCASH accounting
847: Record is not created in ar_distributions table. Commented out NOCOPY the condition
848: which check for the receipt amount before creating the record.

Line 881: | updates distribution in ar_misc_cash_distributions |

877: | PROCEDURE |
878: | update_misc_dist |
879: | |
880: | DESCRIPTION |
881: | updates distribution in ar_misc_cash_distributions |
882: | |
883: | SCOPE - PRIVATE |
884: | |
885: | EXTERNAL PROCEDURES/FUNCTIONS ACCESSED |

Line 923: l_dummy ar_misc_cash_distributions.misc_cash_distribution_id%TYPE;

919: ) IS
920:
921: l_trx_code_combination_id ar_receivables_trx.code_combination_id%TYPE;
922: l_old_trx_code_combination_id ar_receivables_trx.code_combination_id%TYPE;
923: l_dummy ar_misc_cash_distributions.misc_cash_distribution_id%TYPE;
924: l_misc_cash_dist_rec ar_misc_cash_distributions%ROWTYPE;
925: l_old_recs_auto_flag BOOLEAN;
926: l_new_recs_auto_flag BOOLEAN;
927: l_count NUMBER;

Line 924: l_misc_cash_dist_rec ar_misc_cash_distributions%ROWTYPE;

920:
921: l_trx_code_combination_id ar_receivables_trx.code_combination_id%TYPE;
922: l_old_trx_code_combination_id ar_receivables_trx.code_combination_id%TYPE;
923: l_dummy ar_misc_cash_distributions.misc_cash_distribution_id%TYPE;
924: l_misc_cash_dist_rec ar_misc_cash_distributions%ROWTYPE;
925: l_old_recs_auto_flag BOOLEAN;
926: l_new_recs_auto_flag BOOLEAN;
927: l_count NUMBER;
928: l_posted ar_cash_receipt_history.posting_control_id%TYPE;

Line 1031: FROM ar_misc_cash_distributions mcd

1027: END IF;
1028:
1029: SELECT count(mcd.misc_cash_distribution_id)
1030: INTO l_count
1031: FROM ar_misc_cash_distributions mcd
1032: WHERE mcd.cash_receipt_id = p_cash_receipt_id
1033: AND mcd.reversal_gl_date IS NULL --For rate adjustments picks up records with new rate
1034: AND mcd.posting_control_id = -3 --Not posted
1035: AND EXISTS (SELECT 'x'

Line 1070: /*DELETE ar_misc_cash_distributions

1066: | distribution id for use in MRC |
1067: | engine for trigger replacement |
1068: +----------------------------------*/
1069:
1070: /*DELETE ar_misc_cash_distributions
1071: WHERE cash_receipt_id = p_cash_receipt_id
1072: RETURNING misc_cash_distribution_id
1073: BULK COLLECT INTO l_misc_cash_key_value_list; */
1074:

Line 1220: UPDATE ar_misc_cash_distributions

1216: | distribution id for use in MRC |
1217: | engine for trigger replacement |
1218: +----------------------------------*/
1219: /* Bug 5980036 */
1220: UPDATE ar_misc_cash_distributions
1221: SET -- gl_date = p_gl_date,
1222: apply_date = p_receipt_date
1223: WHERE cash_receipt_id = p_cash_receipt_id
1224: RETURNING misc_cash_distribution_id

Line 1247: AR_MISC_CASH_DISTRIBUTIONS. Also Accounting engine is called to

1243: --
1244: /* Bug 1792989. When only the receipt amount is changed with no change
1245: to receivable activity, then distribution accounting should not be
1246: affected and only the amounts should be updated in
1247: AR_MISC_CASH_DISTRIBUTIONS. Also Accounting engine is called to
1248: recreate accounting in AR_DISTRIBUTIONS for the new amounts.
1249: This is done by
1250: 1. Calling the Accounting engine to delete the MCD records
1251: from AR_DISTRIBUTIONS for the passed cash_receipt_id.

Line 1252: 2. Update the amount in AR_MISC_CASH_DISTRIBUTIONS by calling

1248: recreate accounting in AR_DISTRIBUTIONS for the new amounts.
1249: This is done by
1250: 1. Calling the Accounting engine to delete the MCD records
1251: from AR_DISTRIBUTIONS for the passed cash_receipt_id.
1252: 2. Update the amount in AR_MISC_CASH_DISTRIBUTIONS by calling
1253: procedure update_manual_dist.
1254: 3. Calling the Accounting engine to recreate the MCD records
1255: taking the new amount into consideration.
1256: */

Line 1271: FROM ar_misc_cash_distributions mcd

1267: arp_util.debug('update_misc_dist: ' || '=====> Case 2: updating amounts');
1268: END IF;
1269: SELECT count(mcd.misc_cash_distribution_id)
1270: INTO l_count
1271: FROM ar_misc_cash_distributions mcd
1272: WHERE mcd.cash_receipt_id = p_cash_receipt_id
1273: AND mcd.reversal_gl_date IS NULL
1274: AND mcd.posting_control_id = -3
1275: AND EXISTS (SELECT 'x'

Line 1371: DELETE ar_misc_cash_distributions

1367: IF PG_DEBUG in ('Y', 'C') THEN
1368: arp_util.debug('update_misc_dist: ' || 'Case 3: deleting old records');
1369: END IF;
1370:
1371: DELETE ar_misc_cash_distributions
1372: WHERE cash_receipt_id = p_cash_receipt_id;
1373:
1374: */
1375: IF PG_DEBUG in ('Y', 'C') THEN

Line 1405: FROM ar_misc_cash_distributions mcd

1401: END IF;
1402:
1403: SELECT count(mcd.misc_cash_distribution_id)
1404: INTO l_count
1405: FROM ar_misc_cash_distributions mcd
1406: WHERE mcd.cash_receipt_id = p_cash_receipt_id
1407: AND mcd.reversal_gl_date IS NULL --For rate adjustments picks up records with new rate
1408: AND mcd.posting_control_id = -3 --Not posted
1409: AND EXISTS (SELECT 'x'

Line 1485: | creates distribution in ar_misc_cash_distributions based on a pre- |

1481: | PROCEDURE |
1482: | create_mcd_recs |
1483: | |
1484: | DESCRIPTION |
1485: | creates distribution in ar_misc_cash_distributions based on a pre- |
1486: | defined distribution set. This function also takes care of possible |
1487: | rounding errors. |
1488: | |
1489: | SCOPE - PRIVATE |

Line 1531: l_misc_cash_dist_id ar_misc_cash_distributions.misc_cash_distribution_id%TYPE; /* added for mrc changes */

1527: l_min_unit NUMBER;
1528: l_precision NUMBER;
1529: l_acctd_rounding_diff NUMBER;
1530: l_rounding_diff NUMBER;
1531: l_misc_cash_dist_id ar_misc_cash_distributions.misc_cash_distribution_id%TYPE; /* added for mrc changes */
1532: l_misc_cash_key_value_list gl_ca_utility_pkg.r_key_value_arr;
1533:
1534: l_xla_ev_rec arp_xla_events.xla_events_type;
1535:

Line 1624: SELECT ar_misc_cash_distributions_s.nextval

1620: END IF;
1621:
1622: /* store the misc cash dist id for use in MRC call */
1623:
1624: SELECT ar_misc_cash_distributions_s.nextval
1625: INTO l_misc_cash_dist_id
1626: FROM DUAL;
1627:
1628: INSERT INTO ar_misc_cash_distributions (

Line 1628: INSERT INTO ar_misc_cash_distributions (

1624: SELECT ar_misc_cash_distributions_s.nextval
1625: INTO l_misc_cash_dist_id
1626: FROM DUAL;
1627:
1628: INSERT INTO ar_misc_cash_distributions (
1629: misc_cash_distribution_id,
1630: last_updated_by,
1631: last_update_date,
1632: created_by,

Line 1682: p_table_name => 'AR_MISC_CASH_DISTRIBUTIONS',

1678: +---------------------------------*/
1679: /*4301323
1680: ar_mrc_engine.maintain_mrc_data(
1681: p_event_mode => 'INSERT',
1682: p_table_name => 'AR_MISC_CASH_DISTRIBUTIONS',
1683: p_mode => 'SINGLE',
1684: p_key_value => l_misc_cash_dist_id );
1685: */
1686: END LOOP;

Line 1736: UPDATE ar_misc_cash_distributions

1732: | distribution id for use in MRC |
1733: | engine for trigger replacement |
1734: +----------------------------------*/
1735:
1736: UPDATE ar_misc_cash_distributions
1737: SET amount = amount + l_rounding_diff,
1738: acctd_amount = acctd_amount + l_acctd_rounding_diff,
1739: percent = ROUND (
1740: (amount + l_rounding_diff)*100/p_amount,

Line 1754: p_table_name => 'AR_MISC_CASH_DISTRIBUTIONS',

1750: +---------------------------------*/
1751: /*BUG4301323
1752: ar_mrc_engine.maintain_mrc_data(
1753: p_event_mode => 'UPDATE',
1754: p_table_name => 'AR_MISC_CASH_DISTRIBUTIONS',
1755: p_mode => 'BATCH',
1756: p_key_value_list => l_misc_cash_key_value_list);
1757: */
1758:

Line 1775: | creates distribution in ar_misc_cash_distributions based on a pre- |

1771: | PROCEDURE |
1772: | update_manual_dist |
1773: | |
1774: | DESCRIPTION |
1775: | creates distribution in ar_misc_cash_distributions based on a pre- |
1776: | defined distribution set. This function also takes care of possible |
1777: | rounding errors. |
1778: | |
1779: | SCOPE - PRIVATE |

Line 1828: UPDATE ar_misc_cash_distributions

1824: | distribution id for use in MRC |
1825: | engine for trigger replacement |
1826: +----------------------------------*/
1827:
1828: UPDATE ar_misc_cash_distributions
1829: SET gl_date = p_gl_date,
1830: apply_date = p_receipt_date,
1831: amount = decode
1832: (

Line 1860: p_table_name => 'AR_MISC_CASH_DISTRIBUTIONS',

1856: +---------------------------------*/
1857: /*BUG4301323
1858: ar_mrc_engine.maintain_mrc_data(
1859: p_event_mode => 'UPDATE',
1860: p_table_name => 'AR_MISC_CASH_DISTRIBUTIONS',
1861: p_mode => 'BATCH',
1862: p_key_value_list => l_misc_cash_key_value_list);
1863: */
1864: -- determine if there is a rounding error

Line 1897: FROM ar_misc_cash_distributions

1893: ),0)
1894:
1895: INTO l_rounding_diff,
1896: l_acctd_rounding_diff
1897: FROM ar_misc_cash_distributions
1898: WHERE cash_receipt_id = p_cash_receipt_id;
1899:
1900: arp_util.debug('Rounding error = ' || to_char(l_rounding_diff));
1901: arp_util.debug('Rounding error (acctd) = ' || to_char(l_acctd_rounding_diff));

Line 1911: UPDATE ar_misc_cash_distributions

1907: | Added bulk collect of misc cash |
1908: | distribution id for use in MRC |
1909: | engine for trigger replacement |
1910: +----------------------------------*/
1911: UPDATE ar_misc_cash_distributions
1912: SET amount = amount + l_rounding_diff,
1913: acctd_amount = acctd_amount + l_acctd_rounding_diff,
1914: percent = ROUND (
1915: (amount + l_rounding_diff)*100/p_amount,

Line 1929: p_table_name => 'AR_MISC_CASH_DISTRIBUTIONS',

1925: +---------------------------------*/
1926: /*BUG4301323
1927: ar_mrc_engine.maintain_mrc_data(
1928: p_event_mode => 'UPDATE',
1929: p_table_name => 'AR_MISC_CASH_DISTRIBUTIONS',
1930: p_mode => 'BATCH',
1931: p_key_value_list => l_misc_cash_key_value_list);
1932: */
1933: