DBA Data[Home] [Help]

APPS.JAI_AR_MATCH_TAX_PKG dependencies on AR_RECEIVABLE_APPLICATIONS_ALL

Line 444: --ar_receivable_applications_all

440:
441: ------------------------------------------------ ---------------------------------------
442: --=========================================================================================--
443: --This procedure updates the MRC data for ra_cust_trx_line_gl_dist_all, ar_payment_schedules_all,
444: --ar_receivable_applications_all
445: --=========================================================================================--
446:
447: PROCEDURE maintain_mrc( p_customer_trx_id IN ra_customer_trx_all.customer_trx_id%TYPE,
448: p_previous_cust_trx_id IN ra_customer_trx_all.customer_trx_id%TYPE DEFAULT NULL,

Line 561: from ar_receivable_applications_all

557: END LOOP;
558:
559: for rec_ar_appl in
560: ( select receivable_application_id
561: from ar_receivable_applications_all
562: where customer_trx_id = p_customer_trx_id
563: )
564: LOOP
565:

Line 585: --This procedure maintains the history of ar_receivable_applications_all in jai_ar_rec_appl_audits

581: p_process_status := jai_constants.unexpected_error;
582: p_process_message := SUBSTR(SQLERRM,1,300);
583: END maintain_mrc;
584: --=========================================================================================--
585: --This procedure maintains the history of ar_receivable_applications_all in jai_ar_rec_appl_audits
586: --=========================================================================================--
587:
588: PROCEDURE maintain_applications(p_customer_trx_id IN ra_customer_trx_all.customer_trx_id%TYPE,
589: p_receivable_application_id IN jai_ar_rec_appl_audits.receivable_application_id%TYPE,

Line 661: FROM ar_receivable_applications_all

657: ld_creation_date,
658: ln_last_updated_by,
659: ld_last_update_date,
660: ln_last_update_login
661: FROM ar_receivable_applications_all
662: WHERE customer_trx_id = p_customer_trx_id
663: AND receivable_application_id = p_receivable_application_id;
664:
665: ELSIF p_operation_type = 'UPDATE' THEN

Line 683: FROM ar_receivable_applications_all b

679: freight_applied,
680: ln_last_updated_by,
681: ld_last_update_date,
682: ln_last_update_login
683: FROM ar_receivable_applications_all b
684: WHERE customer_trx_id = a.customer_trx_id
685: AND receivable_application_id = a.receivable_application_id)
686: WHERE customer_trx_id = p_customer_trx_id
687: AND receivable_application_id = p_receivable_application_id

Line 1357: CURSOR cur_tot_amt_for_cms(cp_applied_customer_trx_id ar_receivable_applications_all.applied_customer_trx_id%TYPE,

1353: AND sequence_num = cp_sequence_num;
1354:
1355:
1356: --Get the SUM(amount) from ra_cust_trx_line_gl_dist_all for the Credit Memo
1357: CURSOR cur_tot_amt_for_cms(cp_applied_customer_trx_id ar_receivable_applications_all.applied_customer_trx_id%TYPE,
1358: cp_account_class ra_cust_trx_line_gl_dist_all.account_class%TYPE)
1359: IS
1360: SELECT NVL(SUM(amount),0) amount
1361: FROM ra_cust_trx_line_gl_dist_all

Line 1365: FROM ar_receivable_applications_all

1361: FROM ra_cust_trx_line_gl_dist_all
1362: WHERE customer_trx_id IN
1363: (
1364: SELECT customer_trx_id
1365: FROM ar_receivable_applications_all
1366: WHERE applied_customer_trx_id = cp_applied_customer_trx_id
1367: AND application_type = 'CM'
1368: AND display = 'Y'
1369: AND status = 'APP'

Line 1374: --Get the SUM of tax_applied and freight_applied from ar_receivable_applications_all for Cash receipts applied

1370: )
1371: AND account_class = cp_account_class;
1372:
1373:
1374: --Get the SUM of tax_applied and freight_applied from ar_receivable_applications_all for Cash receipts applied
1375: CURSOR cur_tot_cash_rcpt(cp_applied_customer_trx_id ar_receivable_applications_all.applied_customer_trx_id%TYPE)
1376: IS
1377: SELECT NVL(sum(tax_applied),0) tax_applied,
1378: NVL(sum(freight_applied),0) freight_applied

Line 1375: CURSOR cur_tot_cash_rcpt(cp_applied_customer_trx_id ar_receivable_applications_all.applied_customer_trx_id%TYPE)

1371: AND account_class = cp_account_class;
1372:
1373:
1374: --Get the SUM of tax_applied and freight_applied from ar_receivable_applications_all for Cash receipts applied
1375: CURSOR cur_tot_cash_rcpt(cp_applied_customer_trx_id ar_receivable_applications_all.applied_customer_trx_id%TYPE)
1376: IS
1377: SELECT NVL(sum(tax_applied),0) tax_applied,
1378: NVL(sum(freight_applied),0) freight_applied
1379: FROM ar_receivable_applications_all

Line 1379: FROM ar_receivable_applications_all

1375: CURSOR cur_tot_cash_rcpt(cp_applied_customer_trx_id ar_receivable_applications_all.applied_customer_trx_id%TYPE)
1376: IS
1377: SELECT NVL(sum(tax_applied),0) tax_applied,
1378: NVL(sum(freight_applied),0) freight_applied
1379: FROM ar_receivable_applications_all
1380: WHERE applied_customer_trx_id = cp_applied_customer_trx_id
1381: AND application_type = 'CASH'
1382: AND display = 'Y'
1383: AND status = 'APP';

Line 1386: --Get the SUM of line_applied from ar_receivable_applications_all for CM

1382: AND display = 'Y'
1383: AND status = 'APP';
1384:
1385:
1386: --Get the SUM of line_applied from ar_receivable_applications_all for CM
1387: CURSOR cur_tot_recv_appl( cp_applied_customer_Trx_id ar_receivable_applications_all.applied_customer_Trx_id%TYPE,
1388: cp_applied_payment_Schedule_id ar_receivable_applications_all.applied_payment_Schedule_id%TYPE)
1389: IS
1390: SELECT NVL(sum(line_applied),0) line_applied

Line 1387: CURSOR cur_tot_recv_appl( cp_applied_customer_Trx_id ar_receivable_applications_all.applied_customer_Trx_id%TYPE,

1383: AND status = 'APP';
1384:
1385:
1386: --Get the SUM of line_applied from ar_receivable_applications_all for CM
1387: CURSOR cur_tot_recv_appl( cp_applied_customer_Trx_id ar_receivable_applications_all.applied_customer_Trx_id%TYPE,
1388: cp_applied_payment_Schedule_id ar_receivable_applications_all.applied_payment_Schedule_id%TYPE)
1389: IS
1390: SELECT NVL(sum(line_applied),0) line_applied
1391: FROM ar_receivable_applications_all

Line 1388: cp_applied_payment_Schedule_id ar_receivable_applications_all.applied_payment_Schedule_id%TYPE)

1384:
1385:
1386: --Get the SUM of line_applied from ar_receivable_applications_all for CM
1387: CURSOR cur_tot_recv_appl( cp_applied_customer_Trx_id ar_receivable_applications_all.applied_customer_Trx_id%TYPE,
1388: cp_applied_payment_Schedule_id ar_receivable_applications_all.applied_payment_Schedule_id%TYPE)
1389: IS
1390: SELECT NVL(sum(line_applied),0) line_applied
1391: FROM ar_receivable_applications_all
1392: WHERE applied_customer_Trx_id = cp_applied_customer_Trx_id

Line 1391: FROM ar_receivable_applications_all

1387: CURSOR cur_tot_recv_appl( cp_applied_customer_Trx_id ar_receivable_applications_all.applied_customer_Trx_id%TYPE,
1388: cp_applied_payment_Schedule_id ar_receivable_applications_all.applied_payment_Schedule_id%TYPE)
1389: IS
1390: SELECT NVL(sum(line_applied),0) line_applied
1391: FROM ar_receivable_applications_all
1392: WHERE applied_customer_Trx_id = cp_applied_customer_Trx_id
1393: AND application_type = 'CM'
1394: AND display = 'Y'
1395: and status = 'APP'

Line 1399: --Get the receivable_application_id from ar_receivable_applications_all for the Invoice's payment_schedule_id

1395: and status = 'APP'
1396: AND applied_payment_Schedule_id = cp_applied_payment_Schedule_id;
1397:
1398:
1399: --Get the receivable_application_id from ar_receivable_applications_all for the Invoice's payment_schedule_id
1400: CURSOR cur_recv_appl_id(cp_applied_customer_Trx_id ar_receivable_applications_all.applied_customer_Trx_id%TYPE,
1401: cp_customer_trx_id ar_receivable_applications_all.customer_trx_id%TYPE,
1402: cp_applied_payment_Schedule_id ar_receivable_applications_all.applied_payment_Schedule_id%TYPE)
1403: IS

Line 1400: CURSOR cur_recv_appl_id(cp_applied_customer_Trx_id ar_receivable_applications_all.applied_customer_Trx_id%TYPE,

1396: AND applied_payment_Schedule_id = cp_applied_payment_Schedule_id;
1397:
1398:
1399: --Get the receivable_application_id from ar_receivable_applications_all for the Invoice's payment_schedule_id
1400: CURSOR cur_recv_appl_id(cp_applied_customer_Trx_id ar_receivable_applications_all.applied_customer_Trx_id%TYPE,
1401: cp_customer_trx_id ar_receivable_applications_all.customer_trx_id%TYPE,
1402: cp_applied_payment_Schedule_id ar_receivable_applications_all.applied_payment_Schedule_id%TYPE)
1403: IS
1404: SELECT receivable_application_id

Line 1401: cp_customer_trx_id ar_receivable_applications_all.customer_trx_id%TYPE,

1397:
1398:
1399: --Get the receivable_application_id from ar_receivable_applications_all for the Invoice's payment_schedule_id
1400: CURSOR cur_recv_appl_id(cp_applied_customer_Trx_id ar_receivable_applications_all.applied_customer_Trx_id%TYPE,
1401: cp_customer_trx_id ar_receivable_applications_all.customer_trx_id%TYPE,
1402: cp_applied_payment_Schedule_id ar_receivable_applications_all.applied_payment_Schedule_id%TYPE)
1403: IS
1404: SELECT receivable_application_id
1405: FROM ar_receivable_applications_all

Line 1402: cp_applied_payment_Schedule_id ar_receivable_applications_all.applied_payment_Schedule_id%TYPE)

1398:
1399: --Get the receivable_application_id from ar_receivable_applications_all for the Invoice's payment_schedule_id
1400: CURSOR cur_recv_appl_id(cp_applied_customer_Trx_id ar_receivable_applications_all.applied_customer_Trx_id%TYPE,
1401: cp_customer_trx_id ar_receivable_applications_all.customer_trx_id%TYPE,
1402: cp_applied_payment_Schedule_id ar_receivable_applications_all.applied_payment_Schedule_id%TYPE)
1403: IS
1404: SELECT receivable_application_id
1405: FROM ar_receivable_applications_all
1406: WHERE applied_customer_Trx_id = cp_applied_customer_Trx_id

Line 1405: FROM ar_receivable_applications_all

1401: cp_customer_trx_id ar_receivable_applications_all.customer_trx_id%TYPE,
1402: cp_applied_payment_Schedule_id ar_receivable_applications_all.applied_payment_Schedule_id%TYPE)
1403: IS
1404: SELECT receivable_application_id
1405: FROM ar_receivable_applications_all
1406: WHERE applied_customer_Trx_id = cp_applied_customer_Trx_id
1407: AND customer_trx_id = cp_customer_trx_id
1408: AND application_type = 'CM'
1409: AND display = 'Y'

Line 1923: --Get the SUM of tax_applied and freight_applied from ar_receivable_applications_all for Cash receipts applied

1919: lv_account_class_freight);
1920: FETCH cur_tot_amt_for_cms INTO ln_frt_amt_cms;
1921: CLOSE cur_tot_amt_for_cms;
1922:
1923: --Get the SUM of tax_applied and freight_applied from ar_receivable_applications_all for Cash receipts applied
1924: OPEN cur_tot_cash_rcpt(ln_previous_customer_trx_id);
1925: FETCH cur_tot_cash_rcpt INTO ln_tax_amt_cashrcpt,
1926: ln_frt_amt_cashrcpt;
1927: CLOSE cur_tot_cash_rcpt;

Line 1958: --Get the SUM of line_applied from ar_receivable_applications_all for CM

1954: ln_apportion_factor := 1;
1955: rec_payment.payment_schedule_id := rec_inv_payment_schedule.payment_schedule_id;
1956: END IF;
1957:
1958: --Get the SUM of line_applied from ar_receivable_applications_all for CM
1959: OPEN cur_tot_recv_appl( ln_previous_customer_trx_id,
1960: rec_payment.payment_schedule_id);
1961: FETCH cur_tot_recv_appl INTO ln_line_applied;
1962: CLOSE cur_tot_recv_appl;

Line 2080: --Get the receivable_application_id from ar_receivable_applications_all for the Invoice's payment_schedule_id

2076: fnd_file.put_line(FND_FILE.LOG, 'after Call to maintain_schedules');
2077: END IF;
2078:
2079:
2080: --Get the receivable_application_id from ar_receivable_applications_all for the Invoice's payment_schedule_id
2081: OPEN cur_recv_appl_id(ln_previous_customer_trx_id,
2082: p_customer_trx_id,
2083: rec_payment.payment_schedule_id);
2084: FETCH cur_recv_appl_id INTO ln_recv_appln_id;

Line 2088: --This procedure maintains the history of ar_receivable_applications_all in jai_ar_rec_appl_audits

2084: FETCH cur_recv_appl_id INTO ln_recv_appln_id;
2085: CLOSE cur_recv_appl_id;
2086:
2087:
2088: --This procedure maintains the history of ar_receivable_applications_all in jai_ar_rec_appl_audits
2089: maintain_applications(p_customer_trx_id => p_customer_trx_id,
2090: p_receivable_application_id => ln_recv_appln_id,
2091: p_concurrent_req_num => NULL,
2092: p_request_id => NULL,

Line 2109: UPDATE ar_receivable_applications_all

2105: fnd_file.put_line(FND_FILE.LOG, 'after Call to maintain_applications');
2106: END IF;
2107:
2108:
2109: UPDATE ar_receivable_applications_all
2110: SET amount_applied = ROUND( NVL(line_applied,0)
2111: + ( (-1) * NVL(ln_total_tax_amt_for_inv,0) * ln_apportion_factor)
2112: + ( (-1) * NVL(ln_total_frt_amt_for_inv,0) * ln_apportion_factor)
2113: ,ln_precision),

Line 2134: fnd_file.put_line(FND_FILE.LOG, 'after update of ar_receivable_applications_all');

2130: || Modified by Ramananda for bug#5495711, Ends
2131: */
2132:
2133: IF p_debug = 'Y' THEN
2134: fnd_file.put_line(FND_FILE.LOG, 'after update of ar_receivable_applications_all');
2135: END IF;
2136:
2137: maintain_applications(p_customer_trx_id => p_customer_trx_id,
2138: p_receivable_application_id => ln_recv_appln_id,

Line 2292: --This procedure updates the MRC data for ra_cust_trx_line_gl_dist_all, ar_payment_schedules_all, ar_receivable_applications_all

2288: END LOOP; --End cursor rec_payment
2289: END IF;
2290:
2291:
2292: --This procedure updates the MRC data for ra_cust_trx_line_gl_dist_all, ar_payment_schedules_all, ar_receivable_applications_all
2293: maintain_mrc( p_customer_trx_id => p_customer_trx_id,
2294: p_previous_cust_trx_id => ln_previous_customer_trx_id,
2295: p_called_from => 7/13/2007,
2296: p_process_status => lv_process_status,

Line 3217: Update Ar_Receivable_Applications_All

3213:
3214: --In the below statement only the freight amount is getting updated to all the columns,because the tax amount is
3215: --automatcally updated by the base apps product
3216:
3217: Update Ar_Receivable_Applications_All
3218: Set Amount_Applied = NVL(Amount_Applied,0) - (NVL(v_freight_amount1,0)),
3219: --Tax_Applied = NVL(Tax_Applied,0) - NVL(v_tax_amount1,0),
3220: Freight_Applied = NVL(Freight_Applied,0) - NVL(v_freight_amount1,0),
3221: Acctd_Amount_Applied_From = NVL(Acctd_Amount_Applied_From,0) - ( NVL(v_freight_amount1,0) ),