DBA Data[Home] [Help]

APPS.ARP_CORRECT_CC_ERRORS dependencies on AR_CASH_RECEIPTS

Line 38: PROCEDURE reverse_receipt(p_cash_receipt_id IN ar_cash_receipts.cash_receipt_id%TYPE,

34: FUNCTION default_reversal_gl_date(p_cash_receipt_id IN NUMBER) RETURN DATE;
35:
36: FUNCTION default_reversal_date(p_cash_receipt_id IN NUMBER) RETURN DATE;
37:
38: PROCEDURE reverse_receipt(p_cash_receipt_id IN ar_cash_receipts.cash_receipt_id%TYPE,
39: x_reversal_comments IN VARCHAR2 DEFAULT NULL);
40:
41: PROCEDURE Raise_Collection_Event(
42: p_cc_trx_id IN NUMBER,

Line 735: FROM ar_cash_receipts

731: WHERE cash_receipt_id = p_cash_receipt_id;
732:
733: SELECT set_of_books_id
734: INTO l_sob_id
735: FROM ar_cash_receipts
736: WHERE cash_receipt_id = p_cash_receipt_id;
737:
738: IF (arp_util.validate_and_default_gl_date(
739: l_gl_date,

Line 807: FROM ar_cash_receipts

803: arp_standard.debug( 'ARP_CORRECT_CC_ERRORS.default_reversal_date()+' );
804: END IF;
805: SELECT receipt_date
806: INTO l_receipt_date
807: FROM ar_cash_receipts
808: WHERE cash_receipt_id = p_cash_receipt_id;
809:
810: IF trunc(l_receipt_date) < trunc(sysdate) THEN
811: RETURN trunc(sysdate);

Line 844: PROCEDURE reverse_receipt(p_cash_receipt_id IN ar_cash_receipts.cash_receipt_id%TYPE,

840: |
841: | MODIFICATION HISTORY - Created by Srinivasa Kini - 25-Aug-2004
842: |
843: +===========================================================================*/
844: PROCEDURE reverse_receipt(p_cash_receipt_id IN ar_cash_receipts.cash_receipt_id%TYPE,
845: x_reversal_comments IN VARCHAR2 DEFAULT NULL) IS
846: l_reversal_gl_date DATE;
847: l_reversal_date DATE;
848: l_called_from VARCHAR2(30) DEFAULT NULL;

Line 1567: | p_table_name - RA_CUSTOMER_TRX/AR_CASH_RECEIPTS/CASH/MISC

1563: |
1564: | ARGUMENTS : IN:
1565: | p_key - primary key of the record to be locked
1566: | p_object_version_number - Applicable for receipts only
1567: | p_table_name - RA_CUSTOMER_TRX/AR_CASH_RECEIPTS/CASH/MISC
1568: | p_trx_number - receipt no./trx no.(USed to show in messages)
1569: | OUT:
1570: |
1571: | RETURNS : NONE

Line 1587: IF p_table_name in ('AR_CASH_RECEIPTS','CASH','MISC') THEN

1583: BEGIN
1584: IF PG_DEBUG in ('Y', 'C') THEN
1585: arp_util.debug('ARP_CORRECT_CC_ERRORS.lock_table_nowait()+');
1586: END IF;
1587: IF p_table_name in ('AR_CASH_RECEIPTS','CASH','MISC') THEN
1588: arp_cash_receipts_pkg.nowaitlock_version_p(p_key,p_object_version_number);
1589: ELSE
1590: -- Here we need to consider calling some procedure
1591: -- which does locking

Line 1599: IF p_table_name in ('AR_CASH_RECEIPTS','CASH','MISC') THEN

1595: arp_util.debug('ARP_CORRECT_CC_ERRORS.lock_table_nowait()-');
1596: END IF;
1597: EXCEPTION
1598: WHEN NO_DATA_FOUND THEN
1599: IF p_table_name in ('AR_CASH_RECEIPTS','CASH','MISC') THEN
1600: FND_MESSAGE.SET_NAME('AR','AR_RECEIPT_RECORD_CHANGED');
1601: FND_MESSAGE.SET_TOKEN('PARAMETER',p_trx_number);
1602: FND_MSG_PUB.Add;
1603: ELSE

Line 1613: IF p_table_name in ('AR_CASH_RECEIPTS','CASH','MISC') THEN

1609: arp_util.debug('EXCEPTION: ARP_CORRECT_CC_ERRORS.lock_table_nowait()');
1610: END IF;
1611: app_exception.raise_exception;
1612: WHEN APP_EXCEPTIONS.RECORD_LOCK_EXCEPTION THEN
1613: IF p_table_name in ('AR_CASH_RECEIPTS','CASH','MISC') THEN
1614: FND_MESSAGE.SET_NAME('AR','AR_RECEIPT_RECORD_LOCKED');
1615: FND_MESSAGE.SET_TOKEN('PARAMETER',p_trx_number);
1616: FND_MSG_PUB.Add;
1617: ELSE

Line 1667: FROM ar_cash_receipts

1663: SELECT 'Y'
1664: INTO l_return_status
1665: FROM dual
1666: WHERE EXISTS (SELECT 1
1667: FROM ar_cash_receipts
1668: WHERE request_id = p_request_id
1669: AND cc_error_flag = 'Y');
1670: EXCEPTION
1671: WHEN NO_DATA_FOUND THEN

Line 1743: FROM ar_cash_receipts

1739: customer_bank_account_id,
1740: cc_error_code,
1741: cc_error_text,
1742: payment_server_order_num
1743: FROM ar_cash_receipts
1744: WHERE request_id = p_request_id
1745: AND cc_error_flag = 'Y'
1746: AND cc_error_code IS NOT NULL;
1747: BEGIN

Line 1980: UPDATE ar_cash_receipts

1976: ELSE
1977: l_error_notes := p_error_notes;
1978: END IF;
1979: IF p_cc_trx_category IN ('CASH','MISC') THEN
1980: UPDATE ar_cash_receipts
1981: SET cc_error_flag = NULL,
1982: cc_error_code = NULL,
1983: cc_error_text = NULL,
1984: customer_bank_account_id = p_customer_bank_account_id,

Line 2053: UPDATE ar_cash_receipts

2049: END IF;
2050: -- Ideally this check is not necessary
2051: -- as there won't be reauthorization failure for invoice
2052: IF p_cc_trx_category = 'CASH' THEN
2053: UPDATE ar_cash_receipts
2054: SET payment_server_order_num = null,
2055: approval_code = NULL,
2056: cc_error_flag = NULL,
2057: cc_error_code = NULL,

Line 2107: ar_cash_receipts cr,

2103: trx_types.type,
2104: cr.receipt_number
2105: FROM ra_customer_trx trx,
2106: ar_receivable_applications ra,
2107: ar_cash_receipts cr,
2108: ra_cust_trx_types trx_types
2109: WHERE trx.customer_trx_id = ra.applied_customer_trx_id
2110: AND ra.cash_receipt_id = cr.cash_receipt_id
2111: AND cr.customer_bank_account_id = trx.customer_bank_account_id

Line 2117: l_cash_receipt_id ar_cash_receipts.cash_receipt_id%TYPE;

2113: AND ra.display = 'Y'
2114: AND trx_types.cust_trx_type_id = trx.cust_trx_type_id
2115: AND cr.cash_receipt_id = p_cc_trx_id;
2116:
2117: l_cash_receipt_id ar_cash_receipts.cash_receipt_id%TYPE;
2118: l_rec_number ar_cash_receipts.receipt_number%TYPE;
2119: l_error_notes VARCHAR2(240);
2120: l_dummy_number NUMBER;
2121: l_receivable_application_id ar_receivable_applications.receivable_application_id%TYPE;

Line 2118: l_rec_number ar_cash_receipts.receipt_number%TYPE;

2114: AND trx_types.cust_trx_type_id = trx.cust_trx_type_id
2115: AND cr.cash_receipt_id = p_cc_trx_id;
2116:
2117: l_cash_receipt_id ar_cash_receipts.cash_receipt_id%TYPE;
2118: l_rec_number ar_cash_receipts.receipt_number%TYPE;
2119: l_error_notes VARCHAR2(240);
2120: l_dummy_number NUMBER;
2121: l_receivable_application_id ar_receivable_applications.receivable_application_id%TYPE;
2122: l_customer_trx_id ra_customer_trx.customer_trx_id%TYPE;

Line 2124: l_object_version_number ar_cash_receipts.rec_version_number%TYPE;

2120: l_dummy_number NUMBER;
2121: l_receivable_application_id ar_receivable_applications.receivable_application_id%TYPE;
2122: l_customer_trx_id ra_customer_trx.customer_trx_id%TYPE;
2123: l_trx_number ra_customer_trx.trx_number%TYPE;
2124: l_object_version_number ar_cash_receipts.rec_version_number%TYPE;
2125: l_cc_error_code ar_cash_receipts.cc_error_code%TYPE;
2126: l_cc_error_desc ar_cash_receipts.cc_error_text%TYPE;
2127: l_cc_trx_category_dsp VARCHAR2(240);
2128: l_cc_trx_number ar_cash_receipts.receipt_number%TYPE;

Line 2125: l_cc_error_code ar_cash_receipts.cc_error_code%TYPE;

2121: l_receivable_application_id ar_receivable_applications.receivable_application_id%TYPE;
2122: l_customer_trx_id ra_customer_trx.customer_trx_id%TYPE;
2123: l_trx_number ra_customer_trx.trx_number%TYPE;
2124: l_object_version_number ar_cash_receipts.rec_version_number%TYPE;
2125: l_cc_error_code ar_cash_receipts.cc_error_code%TYPE;
2126: l_cc_error_desc ar_cash_receipts.cc_error_text%TYPE;
2127: l_cc_trx_category_dsp VARCHAR2(240);
2128: l_cc_trx_number ar_cash_receipts.receipt_number%TYPE;
2129: l_cc_trx_currency ar_cash_receipts.currency_code%TYPE;

Line 2126: l_cc_error_desc ar_cash_receipts.cc_error_text%TYPE;

2122: l_customer_trx_id ra_customer_trx.customer_trx_id%TYPE;
2123: l_trx_number ra_customer_trx.trx_number%TYPE;
2124: l_object_version_number ar_cash_receipts.rec_version_number%TYPE;
2125: l_cc_error_code ar_cash_receipts.cc_error_code%TYPE;
2126: l_cc_error_desc ar_cash_receipts.cc_error_text%TYPE;
2127: l_cc_trx_category_dsp VARCHAR2(240);
2128: l_cc_trx_number ar_cash_receipts.receipt_number%TYPE;
2129: l_cc_trx_currency ar_cash_receipts.currency_code%TYPE;
2130: l_cc_trx_amount NUMBER;

Line 2128: l_cc_trx_number ar_cash_receipts.receipt_number%TYPE;

2124: l_object_version_number ar_cash_receipts.rec_version_number%TYPE;
2125: l_cc_error_code ar_cash_receipts.cc_error_code%TYPE;
2126: l_cc_error_desc ar_cash_receipts.cc_error_text%TYPE;
2127: l_cc_trx_category_dsp VARCHAR2(240);
2128: l_cc_trx_number ar_cash_receipts.receipt_number%TYPE;
2129: l_cc_trx_currency ar_cash_receipts.currency_code%TYPE;
2130: l_cc_trx_amount NUMBER;
2131: l_cc_trx_date DATE;
2132: l_customer_name hz_parties.party_name%TYPE;

Line 2129: l_cc_trx_currency ar_cash_receipts.currency_code%TYPE;

2125: l_cc_error_code ar_cash_receipts.cc_error_code%TYPE;
2126: l_cc_error_desc ar_cash_receipts.cc_error_text%TYPE;
2127: l_cc_trx_category_dsp VARCHAR2(240);
2128: l_cc_trx_number ar_cash_receipts.receipt_number%TYPE;
2129: l_cc_trx_currency ar_cash_receipts.currency_code%TYPE;
2130: l_cc_trx_amount NUMBER;
2131: l_cc_trx_date DATE;
2132: l_customer_name hz_parties.party_name%TYPE;
2133: l_customer_number hz_cust_accounts.account_number%TYPE;

Line 2137: l_payment_server_id ar_cash_receipts.payment_server_order_num%TYPE;

2133: l_customer_number hz_cust_accounts.account_number%TYPE;
2134: l_customer_location hz_cust_site_uses.location%TYPE;
2135: l_cc_number IBY_FNDCPT_PAYER_ASSGN_INSTR_V.CARD_NUMBER%TYPE;
2136: l_expiration_date IBY_FNDCPT_PAYER_ASSGN_INSTR_V.CARD_EXPIRYDATE%TYPE;
2137: l_payment_server_id ar_cash_receipts.payment_server_order_num%TYPE;
2138: l_approval_code ra_customer_trx.approval_code%TYPE;
2139: l_collector ar_collectors.name%TYPE;
2140: l_payment_method_name ar_receipt_methods.name%TYPE;
2141: PAY_exception EXCEPTION;

Line 2240: FROM ar_cash_receipts cr,

2236: l_payment_server_id,
2237: l_approval_code,
2238: l_collector,
2239: l_payment_method_name
2240: FROM ar_cash_receipts cr,
2241: ar_receipt_methods rm,
2242: hz_parties party,
2243: hz_cust_accounts cust,
2244: hz_cust_site_uses site_uses,

Line 2257: UPDATE ar_cash_receipts

2253: AND cr.cash_receipt_id = p_cc_trx_id;
2254: -- reverse the receipt
2255: reverse_receipt(p_cc_trx_id,l_error_notes);
2256: -- Attach comment to the invoice
2257: UPDATE ar_cash_receipts
2258: SET comments = DECODE(p_error_notes,NULL,comments,substrb('<'||l_error_notes||'>'||comments,1,2000))
2259: WHERE cash_receipt_id = p_cc_trx_id;
2260:
2261: IF p_cc_trx_category = 'CASH' THEN

Line 2286: FROM ar_cash_receipts cr

2282: SELECT cr.cash_receipt_id,
2283: cr.receipt_number
2284: INTO l_cash_receipt_id,
2285: l_rec_number
2286: FROM ar_cash_receipts cr
2287: WHERE cash_receipt_id in (SELECT ra.cash_receipt_id
2288: FROM ar_receivable_applications ra
2289: WHERE ra.application_ref_id = p_cc_trx_id
2290: AND ra.applied_payment_schedule_id = -6);

Line 2379: FROM ar_cash_receipts

2375: p_request_id IN NUMBER,
2376: p_mode IN VARCHAR2) IS
2377: CURSOR lock_cr IS
2378: SELECT 'lock'
2379: FROM ar_cash_receipts
2380: WHERE request_id = p_request_id
2381: AND cc_error_flag = 'Y'
2382: AND cc_error_code IS NOT NULL
2383: FOR UPDATE OF cash_receipt_id;

Line 2401: arp_util.debug('Locking ar_cash_receipts records for processing..');

2397: arp_util.debug('Called from : '||p_mode);
2398: END IF;
2399: IF (p_mode = 'REMITTANCE') THEN
2400: IF PG_DEBUG in ('Y', 'C') THEN
2401: arp_util.debug('Locking ar_cash_receipts records for processing..');
2402: END IF;
2403: OPEN lock_cr;
2404: CLOSE lock_cr;
2405: correct_remittance_errors(p_request_id);

Line 2486: UPDATE ar_cash_receipts

2482:
2483: IF p_corrective_action = 'Retry' THEN
2484:
2485: IF p_cc_trx_category IN ('CASH','MISC') THEN
2486: UPDATE ar_cash_receipts
2487: SET cc_error_flag = NULL,
2488: cc_error_code = NULL,
2489: cc_error_text = NULL,
2490: comments = DECODE(p_error_notes,NULL,comments,substrb('<'||l_error_notes||'>'||comments,1,2000)),

Line 2506: UPDATE ar_cash_receipts

2502: END IF; /* end Retry */
2503:
2504: IF p_corrective_action = 'Change Instrument' THEN
2505: IF p_cc_trx_category IN ('CASH','MISC') THEN
2506: UPDATE ar_cash_receipts
2507: SET cc_error_flag = NULL,
2508: cc_error_code = NULL,
2509: cc_error_text = NULL,
2510: comments = DECODE(p_error_notes,NULL,comments,substrb('<'||l_error_notes||'>'||comments,1,2000)),

Line 2537: UPDATE ar_cash_receipts_all

2533:
2534: IF p_corrective_action = 'Clear Payment Information' THEN
2535: IF p_cc_trx_category IN ('CASH','MISC') THEN
2536: /* i) update receipt_method and payment info of RECEIPT to null */
2537: UPDATE ar_cash_receipts_all
2538: SET payment_trxn_extension_id = NULL,
2539: receipt_method_id = NULL,
2540: cc_error_flag = NULL,
2541: last_update_date = sysdate,