DBA Data[Home] [Help]

APPS.JAI_AR_MATCH_TAX_PKG dependencies on AR_RECEIVABLE_APPLICATIONS_ALL

Line 1006: --ar_receivable_applications_all

1002:
1003: ------------------------------------------------ ---------------------------------------
1004: --=========================================================================================--
1005: --This procedure updates the MRC data for ra_cust_trx_line_gl_dist_all, ar_payment_schedules_all,
1006: --ar_receivable_applications_all
1007: --=========================================================================================--
1008:
1009: PROCEDURE maintain_mrc( p_customer_trx_id IN ra_customer_trx_all.customer_trx_id%TYPE,
1010: p_previous_cust_trx_id IN ra_customer_trx_all.customer_trx_id%TYPE DEFAULT NULL,

Line 1123: from ar_receivable_applications_all

1119: END LOOP;
1120:
1121: for rec_ar_appl in
1122: ( select receivable_application_id
1123: from ar_receivable_applications_all
1124: where customer_trx_id = p_customer_trx_id
1125: )
1126: LOOP
1127:

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

1143: p_process_status := jai_constants.unexpected_error;
1144: p_process_message := SUBSTR(SQLERRM,1,300);
1145: END maintain_mrc;
1146: --=========================================================================================--
1147: --This procedure maintains the history of ar_receivable_applications_all in jai_ar_rec_appl_audits
1148: --=========================================================================================--
1149:
1150: PROCEDURE maintain_applications(p_customer_trx_id IN ra_customer_trx_all.customer_trx_id%TYPE,
1151: p_receivable_application_id IN jai_ar_rec_appl_audits.receivable_application_id%TYPE,

Line 1223: FROM ar_receivable_applications_all

1219: ld_creation_date,
1220: ln_last_updated_by,
1221: ld_last_update_date,
1222: ln_last_update_login
1223: FROM ar_receivable_applications_all
1224: WHERE customer_trx_id = p_customer_trx_id
1225: AND receivable_application_id = p_receivable_application_id;
1226:
1227: ELSIF p_operation_type = 'UPDATE' THEN

Line 1245: FROM ar_receivable_applications_all b

1241: freight_applied,
1242: ln_last_updated_by,
1243: ld_last_update_date,
1244: ln_last_update_login
1245: FROM ar_receivable_applications_all b
1246: WHERE customer_trx_id = a.customer_trx_id
1247: AND receivable_application_id = a.receivable_application_id)
1248: WHERE customer_trx_id = p_customer_trx_id
1249: AND receivable_application_id = p_receivable_application_id

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

1975: AND sequence_num = cp_sequence_num;
1976:
1977:
1978: --Get the SUM(amount) from ra_cust_trx_line_gl_dist_all for the Credit Memo
1979: CURSOR cur_tot_amt_for_cms(cp_applied_customer_trx_id ar_receivable_applications_all.applied_customer_trx_id%TYPE,
1980: cp_account_class ra_cust_trx_line_gl_dist_all.account_class%TYPE)
1981: IS
1982: SELECT NVL(SUM(amount),0) amount
1983: FROM ra_cust_trx_line_gl_dist_all

Line 1987: FROM ar_receivable_applications_all

1983: FROM ra_cust_trx_line_gl_dist_all
1984: WHERE customer_trx_id IN
1985: (
1986: SELECT customer_trx_id
1987: FROM ar_receivable_applications_all
1988: WHERE applied_customer_trx_id = cp_applied_customer_trx_id
1989: AND application_type = 'CM'
1990: AND display = 'Y'
1991: AND status = 'APP'

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

1992: )
1993: AND account_class = cp_account_class;
1994:
1995:
1996: --Get the SUM of tax_applied and freight_applied from ar_receivable_applications_all for Cash receipts applied
1997: CURSOR cur_tot_cash_rcpt(cp_applied_customer_trx_id ar_receivable_applications_all.applied_customer_trx_id%TYPE)
1998: IS
1999: SELECT NVL(sum(tax_applied),0) tax_applied,
2000: NVL(sum(freight_applied),0) freight_applied

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

1993: AND account_class = cp_account_class;
1994:
1995:
1996: --Get the SUM of tax_applied and freight_applied from ar_receivable_applications_all for Cash receipts applied
1997: CURSOR cur_tot_cash_rcpt(cp_applied_customer_trx_id ar_receivable_applications_all.applied_customer_trx_id%TYPE)
1998: IS
1999: SELECT NVL(sum(tax_applied),0) tax_applied,
2000: NVL(sum(freight_applied),0) freight_applied
2001: FROM ar_receivable_applications_all

Line 2001: FROM ar_receivable_applications_all

1997: CURSOR cur_tot_cash_rcpt(cp_applied_customer_trx_id ar_receivable_applications_all.applied_customer_trx_id%TYPE)
1998: IS
1999: SELECT NVL(sum(tax_applied),0) tax_applied,
2000: NVL(sum(freight_applied),0) freight_applied
2001: FROM ar_receivable_applications_all
2002: WHERE applied_customer_trx_id = cp_applied_customer_trx_id
2003: AND application_type = 'CASH'
2004: AND display = 'Y'
2005: AND status = 'APP';

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

2004: AND display = 'Y'
2005: AND status = 'APP';
2006:
2007:
2008: --Get the SUM of line_applied from ar_receivable_applications_all for CM
2009: CURSOR cur_tot_recv_appl( cp_applied_customer_Trx_id ar_receivable_applications_all.applied_customer_Trx_id%TYPE,
2010: cp_applied_payment_Schedule_id ar_receivable_applications_all.applied_payment_Schedule_id%TYPE)
2011: IS
2012: SELECT NVL(sum(line_applied),0) line_applied

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

2005: AND status = 'APP';
2006:
2007:
2008: --Get the SUM of line_applied from ar_receivable_applications_all for CM
2009: CURSOR cur_tot_recv_appl( cp_applied_customer_Trx_id ar_receivable_applications_all.applied_customer_Trx_id%TYPE,
2010: cp_applied_payment_Schedule_id ar_receivable_applications_all.applied_payment_Schedule_id%TYPE)
2011: IS
2012: SELECT NVL(sum(line_applied),0) line_applied
2013: FROM ar_receivable_applications_all

Line 2010: cp_applied_payment_Schedule_id ar_receivable_applications_all.applied_payment_Schedule_id%TYPE)

2006:
2007:
2008: --Get the SUM of line_applied from ar_receivable_applications_all for CM
2009: CURSOR cur_tot_recv_appl( cp_applied_customer_Trx_id ar_receivable_applications_all.applied_customer_Trx_id%TYPE,
2010: cp_applied_payment_Schedule_id ar_receivable_applications_all.applied_payment_Schedule_id%TYPE)
2011: IS
2012: SELECT NVL(sum(line_applied),0) line_applied
2013: FROM ar_receivable_applications_all
2014: WHERE applied_customer_Trx_id = cp_applied_customer_Trx_id

Line 2013: FROM ar_receivable_applications_all

2009: CURSOR cur_tot_recv_appl( cp_applied_customer_Trx_id ar_receivable_applications_all.applied_customer_Trx_id%TYPE,
2010: cp_applied_payment_Schedule_id ar_receivable_applications_all.applied_payment_Schedule_id%TYPE)
2011: IS
2012: SELECT NVL(sum(line_applied),0) line_applied
2013: FROM ar_receivable_applications_all
2014: WHERE applied_customer_Trx_id = cp_applied_customer_Trx_id
2015: AND application_type = 'CM'
2016: AND display = 'Y'
2017: and status = 'APP'

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

2017: and status = 'APP'
2018: AND applied_payment_Schedule_id = cp_applied_payment_Schedule_id;
2019:
2020:
2021: --Get the receivable_application_id from ar_receivable_applications_all for the Invoice's payment_schedule_id
2022: CURSOR cur_recv_appl_id(cp_applied_customer_Trx_id ar_receivable_applications_all.applied_customer_Trx_id%TYPE,
2023: cp_customer_trx_id ar_receivable_applications_all.customer_trx_id%TYPE,
2024: cp_applied_payment_Schedule_id ar_receivable_applications_all.applied_payment_Schedule_id%TYPE)
2025: IS

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

2018: AND applied_payment_Schedule_id = cp_applied_payment_Schedule_id;
2019:
2020:
2021: --Get the receivable_application_id from ar_receivable_applications_all for the Invoice's payment_schedule_id
2022: CURSOR cur_recv_appl_id(cp_applied_customer_Trx_id ar_receivable_applications_all.applied_customer_Trx_id%TYPE,
2023: cp_customer_trx_id ar_receivable_applications_all.customer_trx_id%TYPE,
2024: cp_applied_payment_Schedule_id ar_receivable_applications_all.applied_payment_Schedule_id%TYPE)
2025: IS
2026: SELECT receivable_application_id

Line 2023: cp_customer_trx_id ar_receivable_applications_all.customer_trx_id%TYPE,

2019:
2020:
2021: --Get the receivable_application_id from ar_receivable_applications_all for the Invoice's payment_schedule_id
2022: CURSOR cur_recv_appl_id(cp_applied_customer_Trx_id ar_receivable_applications_all.applied_customer_Trx_id%TYPE,
2023: cp_customer_trx_id ar_receivable_applications_all.customer_trx_id%TYPE,
2024: cp_applied_payment_Schedule_id ar_receivable_applications_all.applied_payment_Schedule_id%TYPE)
2025: IS
2026: SELECT receivable_application_id
2027: FROM ar_receivable_applications_all

Line 2024: cp_applied_payment_Schedule_id ar_receivable_applications_all.applied_payment_Schedule_id%TYPE)

2020:
2021: --Get the receivable_application_id from ar_receivable_applications_all for the Invoice's payment_schedule_id
2022: CURSOR cur_recv_appl_id(cp_applied_customer_Trx_id ar_receivable_applications_all.applied_customer_Trx_id%TYPE,
2023: cp_customer_trx_id ar_receivable_applications_all.customer_trx_id%TYPE,
2024: cp_applied_payment_Schedule_id ar_receivable_applications_all.applied_payment_Schedule_id%TYPE)
2025: IS
2026: SELECT receivable_application_id
2027: FROM ar_receivable_applications_all
2028: WHERE applied_customer_Trx_id = cp_applied_customer_Trx_id

Line 2027: FROM ar_receivable_applications_all

2023: cp_customer_trx_id ar_receivable_applications_all.customer_trx_id%TYPE,
2024: cp_applied_payment_Schedule_id ar_receivable_applications_all.applied_payment_Schedule_id%TYPE)
2025: IS
2026: SELECT receivable_application_id
2027: FROM ar_receivable_applications_all
2028: WHERE applied_customer_Trx_id = cp_applied_customer_Trx_id
2029: AND customer_trx_id = cp_customer_trx_id
2030: AND application_type = 'CM'
2031: AND display = 'Y'

Line 2092: FROM ar_receivable_applications_all

2088: CURSOR cur_get_apply_date (ln_cash_receipt_id IN NUMBER,
2089: ln_customer_trx_id IN NUMBER)
2090: IS
2091: SELECT max(apply_date)
2092: FROM ar_receivable_applications_all
2093: WHERE cash_receipt_id = ln_cash_receipt_id
2094: AND applied_customer_trx_id = ln_customer_trx_id;
2095:
2096: CURSOR cur_get_gl_date (ln_cash_receipt_id IN NUMBER,

Line 2101: FROM ar_receivable_applications_all

2097: ln_customer_trx_id IN NUMBER,
2098: ld_apply_date IN DATE)
2099: IS
2100: SELECT gl_date
2101: FROM ar_receivable_applications_all
2102: WHERE cash_receipt_id = ln_cash_receipt_id
2103: AND applied_customer_trx_id = ln_customer_trx_id
2104: AND receivable_application_id = (Select max(receivable_application_id)
2105: from ar_receivable_applications_all

Line 2105: from ar_receivable_applications_all

2101: FROM ar_receivable_applications_all
2102: WHERE cash_receipt_id = ln_cash_receipt_id
2103: AND applied_customer_trx_id = ln_customer_trx_id
2104: AND receivable_application_id = (Select max(receivable_application_id)
2105: from ar_receivable_applications_all
2106: where cash_receipt_id = ln_cash_receipt_id
2107: and applied_customer_trx_id = ln_customer_trx_id
2108: and apply_date = ld_apply_date);
2109: --bug#9230409, end

Line 2558: from ar_receivable_applications_all

2554: -- Added for bug#9230409, start
2555: /*unapplication of the receipt logic****/
2556: ln_row_count := 1;
2557: FOR rec_get_receipt_id IN ( select distinct cash_receipt_id, set_of_books_id /*Added set_of_books_id by mmurtuza for bug 13557242*/
2558: from ar_receivable_applications_all
2559: where status = 'APP'
2560: and application_type = 'CASH'
2561: and applied_customer_trx_id = ln_previous_customer_trx_id
2562: group by cash_receipt_id, set_of_books_id /*Added set_of_books_id by mmurtuza for bug 13557242*/

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

2727: lv_account_class_freight);
2728: FETCH cur_tot_amt_for_cms INTO ln_frt_amt_cms;
2729: CLOSE cur_tot_amt_for_cms;
2730:
2731: --Get the SUM of tax_applied and freight_applied from ar_receivable_applications_all for Cash receipts applied
2732: OPEN cur_tot_cash_rcpt(ln_previous_customer_trx_id);
2733: FETCH cur_tot_cash_rcpt INTO ln_tax_amt_cashrcpt,
2734: ln_frt_amt_cashrcpt;
2735: CLOSE cur_tot_cash_rcpt;

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

2762: ln_apportion_factor := 1;
2763: rec_payment.payment_schedule_id := rec_inv_payment_schedule.payment_schedule_id;
2764: END IF;
2765:
2766: --Get the SUM of line_applied from ar_receivable_applications_all for CM
2767: OPEN cur_tot_recv_appl( ln_previous_customer_trx_id,
2768: rec_payment.payment_schedule_id);
2769: FETCH cur_tot_recv_appl INTO ln_line_applied;
2770: CLOSE cur_tot_recv_appl;

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

2884: fnd_file.put_line(FND_FILE.LOG, 'after Call to maintain_schedules');
2885: END IF;
2886:
2887:
2888: --Get the receivable_application_id from ar_receivable_applications_all for the Invoice's payment_schedule_id
2889: OPEN cur_recv_appl_id(ln_previous_customer_trx_id,
2890: p_customer_trx_id,
2891: rec_payment.payment_schedule_id);
2892: FETCH cur_recv_appl_id INTO ln_recv_appln_id;

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

2892: FETCH cur_recv_appl_id INTO ln_recv_appln_id;
2893: CLOSE cur_recv_appl_id;
2894:
2895:
2896: --This procedure maintains the history of ar_receivable_applications_all in jai_ar_rec_appl_audits
2897: maintain_applications(p_customer_trx_id => p_customer_trx_id,
2898: p_receivable_application_id => ln_recv_appln_id,
2899: p_concurrent_req_num => NULL,
2900: p_request_id => NULL,

Line 2917: UPDATE ar_receivable_applications_all

2913: fnd_file.put_line(FND_FILE.LOG, 'after Call to maintain_applications');
2914: END IF;
2915:
2916:
2917: UPDATE ar_receivable_applications_all
2918: SET amount_applied = ROUND( NVL(line_applied,0)
2919: + ( (-1) * NVL(ln_total_tax_amt_for_inv,0) * ln_apportion_factor)
2920: + ( (-1) * NVL(ln_total_frt_amt_for_inv,0) * ln_apportion_factor)
2921: ,ln_precision),

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

2938: || Modified by Ramananda for bug#5495711, Ends
2939: */
2940:
2941: IF p_debug = 'Y' THEN
2942: fnd_file.put_line(FND_FILE.LOG, 'after update of ar_receivable_applications_all');
2943: END IF;
2944:
2945: maintain_applications(p_customer_trx_id => p_customer_trx_id,
2946: p_receivable_application_id => ln_recv_appln_id,

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

3155: END LOOP; --End cursor rec_payment
3156: END IF;
3157:
3158:
3159: --This procedure updates the MRC data for ra_cust_trx_line_gl_dist_all, ar_payment_schedules_all, ar_receivable_applications_all
3160: maintain_mrc( p_customer_trx_id => p_customer_trx_id,
3161: p_previous_cust_trx_id => ln_previous_customer_trx_id,
3162: p_called_from => 7/13/2007,
3163: p_process_status => lv_process_status,

Line 4293: Update Ar_Receivable_Applications_All

4289:
4290: --In the below statement only the freight amount is getting updated to all the columns,because the tax amount is
4291: --automatcally updated by the base apps product
4292:
4293: Update Ar_Receivable_Applications_All
4294: Set Amount_Applied = NVL(Amount_Applied,0) - (NVL(v_freight_amount1,0)),
4295: --Tax_Applied = NVL(Tax_Applied,0) - NVL(v_tax_amount1,0),
4296: Freight_Applied = NVL(Freight_Applied,0) - NVL(v_freight_amount1,0),
4297: Acctd_Amount_Applied_From = NVL(Acctd_Amount_Applied_From,0) - ( NVL(v_freight_amount1,0) ),