DBA Data[Home] [Help]

APPS.AR_BUS_EVENT_SUB_PVT dependencies on AR_PAYMENT_SCHEDULES

Line 4: TYPE ps_tab_type IS TABLE OF ar_payment_schedules%rowtype

1: PACKAGE BODY AR_BUS_EVENT_SUB_PVT AS
2: /* $Header: ARBESUBB.pls 120.32.12020000.9 2013/03/16 02:36:00 naneja ship $*/
3:
4: TYPE ps_tab_type IS TABLE OF ar_payment_schedules%rowtype
5: INDEX BY BINARY_INTEGER;
6: pg_cer_dso_days NUMBER;
7:
8: CURSOR get_trx_info (p_cust_acct_id NUMBER,

Line 228: ar_payment_schedules ps,

224: )
225: )
226: )) cm_cl_past_due_inv_amt
227: from ra_customer_trx trx,
228: ar_payment_schedules ps,
229: ra_customer_trx prev_trx,
230: ra_cust_trx_types ctt,
231: ra_terms rt,
232: ra_terms_lines rtl,

Line 234: ar_payment_schedules_all cm_app_ps,

230: ra_cust_trx_types ctt,
231: ra_terms rt,
232: ra_terms_lines rtl,
233: ar_receivable_applications_all ra_cm,
234: ar_payment_schedules_all cm_app_ps,
235: ar_trx_summary trx_sum
236: where trx.customer_trx_id = ps.customer_trx_id
237: and trx.request_id = p_req_id
238: and trx.previous_customer_trx_id = prev_trx.customer_trx_id(+)

Line 718: ar_payment_schedules rps,

714: rps.invoice_currency_code rcpt_currency,
715: cr.receipt_date as_of_date,
716: sum(nvl(ra.amount_applied_from,ra.amount_applied)) receipt_amount
717: from ar_receivable_applications ra,
718: ar_payment_schedules rps,
719: ar_cash_receipts cr
720: where ra.request_id = p_req_id
721: and ra.status = 'UNAPP'
722: and sign(ra.amount_applied) = 1

Line 805: ar_payment_schedules ps,

801: ps.payment_schedule_id, null)) count_of_tot_inv_inst_paid,
802: count(decode(sign(ps.due_date-ra.apply_date),-1,
803: ps.payment_schedule_id, null)) count_of_inv_inst_paid_late
804: from ar_receivable_applications ra,
805: ar_payment_schedules ps,
806: ra_terms_b rt
807: where ra.request_id = p_req_id
808: and ra.status = 'APP'
809: and ps.payment_schedule_id = ra.applied_payment_schedule_id

Line 1059: SELECT * from ar_payment_schedules

1055: and amount_due_original is not null
1056: for update;
1057:
1058: CURSOR lock_ps (cust_trx_id IN NUMBER) IS
1059: SELECT * from ar_payment_schedules
1060: WHERE customer_trx_id = cust_trx_id
1061: FOR UPDATE;
1062:
1063: i INTEGER;

Line 1511: FROM ar_payment_schedules

1507: Select trx_date,customer_trx_id,
1508: sum(amount_due_original) inv_amount,
1509: RANK() OVER (ORDER BY sum(amount_due_original) desc,
1510: customer_trx_id desc) rank_amt
1511: FROM ar_payment_schedules
1512: WHERE customer_id = :customer_id_bind
1513: and customer_site_use_id = :customer_site_use_id_bind
1514: and invoice_currency_code = :invoice_currency_code_bind
1515: and trx_date = :trx_date_bind

Line 1614: from ar_payment_schedules

1610: where previous_history_id = p_history_id;
1611:
1612: CURSOR get_ps_info (p_ps_id IN NUMBER) IS
1613: select due_date, amount_in_dispute
1614: from ar_payment_schedules
1615: where payment_schedule_id = p_ps_id;
1616:
1617: l_key VARCHAR2(240) := p_event.GetEventKey();
1618: l_payment_schedule_id NUMBER(15);

Line 1825: l_ps_rec AR_PAYMENT_SCHEDULES%rowtype;

1821: ( p_subscription_guid In RAW
1822: , p_event IN OUT NOCOPY WF_EVENT_T
1823: )
1824: RETURN VARCHAR2 IS
1825: l_ps_rec AR_PAYMENT_SCHEDULES%rowtype;
1826: l_trx_summary_hist AR_TRX_SUMMARY_HIST%rowtype;
1827: CURSOR get_trx_history(p_cust_trx_id IN NUMBER) IS
1828: SELECT *
1829: FROM AR_TRX_SUMMARY_HIST

Line 1836: SELECT * from ar_payment_schedules

1832: and amount_due_original is not null
1833: for update;
1834:
1835: CURSOR lock_ps (cust_trx_id IN NUMBER) IS
1836: SELECT * from ar_payment_schedules
1837: WHERE customer_trx_id = cust_trx_id
1838: FOR UPDATE;
1839:
1840: CURSOR get_prev_ctx_id (ctx_id IN NUMBER) IS

Line 2424: SELECT * from ar_payment_schedules

2420: and amount_due_original is not null
2421: for update;
2422:
2423: CURSOR lock_ps (cust_trx_id IN NUMBER) IS
2424: SELECT * from ar_payment_schedules
2425: WHERE customer_trx_id = cust_trx_id
2426: FOR UPDATE;
2427:
2428: i INTEGER;

Line 2865: SELECT * from ar_payment_schedules

2861: and amount_due_original is not null
2862: for update;
2863:
2864: CURSOR lock_ps (cust_trx_id IN NUMBER) IS
2865: SELECT * from ar_payment_schedules
2866: WHERE customer_trx_id = cust_trx_id
2867: FOR UPDATE;
2868:
2869: i INTEGER;

Line 3297: l_ps_rec AR_PAYMENT_SCHEDULES%rowtype;

3293: , p_event IN OUT NOCOPY WF_EVENT_T
3294: )
3295: RETURN VARCHAR2 IS
3296:
3297: l_ps_rec AR_PAYMENT_SCHEDULES%rowtype;
3298: l_trx_summary_hist AR_TRX_SUMMARY_HIST%rowtype;
3299:
3300: CURSOR get_trx_history(p_cust_trx_id IN NUMBER) IS
3301: SELECT *

Line 3310: FROM ar_payment_schedules

3306: for update;
3307:
3308: CURSOR lock_ps (cust_trx_id IN NUMBER) IS
3309: SELECT *
3310: FROM ar_payment_schedules
3311: WHERE customer_trx_id = cust_trx_id
3312: FOR UPDATE;
3313:
3314: i INTEGER;

Line 3636: l_cust_account_id ar_payment_schedules.customer_id%type;

3632: l_application_id NUMBER;
3633: l_security_gr_id NUMBER;
3634: -- bug 3979914
3635: -- don't raise the BE in case of unidentified receipts
3636: l_cust_account_id ar_payment_schedules.customer_id%type;
3637:
3638: /* 9363502 - define tables used by refresh_at_risk_value */
3639: l_customer_id_tab generic_id_type;
3640: l_site_use_id_tab generic_id_type;

Line 3649: FROM ar_payment_schedules ps

3645: CURSOR get_receipt_details (p_ps_id IN NUMBER ) IS
3646: SELECT cash_receipt_id, trx_date, amount_due_original * -1,
3647: trx_number, customer_id, customer_site_use_id,
3648: invoice_currency_code
3649: FROM ar_payment_schedules ps
3650: WHERE payment_schedule_id = p_ps_id;
3651:
3652: l_receipt_exists BOOLEAN := FALSE;
3653: BEGIN

Line 3891: FROM ar_payment_schedules ps,

3887: 'UNAPP', nvl(ra.amount_applied_from,ra.amount_applied),
3888: 'ACC', nvl(ra.amount_applied_from,ra.amount_applied),
3889: 'OTHER ACC',nvl(ra.amount_applied_from,ra.amount_applied),
3890: null)) unresolved_cash
3891: FROM ar_payment_schedules ps,
3892: ar_cash_receipts cr,
3893: ar_cash_receipt_history crh,
3894: ar_receivable_applications ra
3895: WHERE ps.payment_schedule_id = p_ps_id

Line 4099: FROM ar_payment_schedules ps

4095: CURSOR get_receipt_details (p_ps_id IN NUMBER ) IS
4096: SELECT cash_receipt_id, trx_date, amount_due_original * -1,
4097: trx_number, customer_id, customer_site_use_id,
4098: invoice_currency_code
4099: FROM ar_payment_schedules ps
4100: WHERE payment_schedule_id = p_ps_id;
4101:
4102: CURSOR get_receipt_hist (p_hist_id IN NUMBER) IS
4103: select *

Line 4114: ar_payment_schedules ps

4110: select ps.cash_receipt_id, ps.trx_date, hist.amount_due_original * -1,
4111: ps.trx_number, hist.customer_id, hist.site_use_id,
4112: ps.invoice_currency_code
4113: from ar_trx_summary_hist hist,
4114: ar_payment_schedules ps
4115: where previous_history_id = p_hist_id
4116: and ps.payment_schedule_id = hist.payment_schedule_id;
4117:
4118: l_hist_rec ar_trx_summary_hist%rowtype;

Line 4995: FROM ar_payment_schedules trx_ps,

4991: rcpt_ps.customer_site_use_id,
4992: rcpt_ps.invoice_currency_code,
4993: nvl(ra.amount_applied_from,ra.amount_applied),
4994: ra.apply_date
4995: FROM ar_payment_schedules trx_ps,
4996: ar_receivable_applications ra,
4997: ar_payment_schedules rcpt_ps
4998: WHERE ra.receivable_application_id = p_ra_id
4999: and ra.status in ('APP')

Line 4997: ar_payment_schedules rcpt_ps

4993: nvl(ra.amount_applied_from,ra.amount_applied),
4994: ra.apply_date
4995: FROM ar_payment_schedules trx_ps,
4996: ar_receivable_applications ra,
4997: ar_payment_schedules rcpt_ps
4998: WHERE ra.receivable_application_id = p_ra_id
4999: and ra.status in ('APP')
5000: and ra.payment_schedule_id = rcpt_ps.payment_schedule_id
5001: and ra.applied_payment_schedule_id = trx_ps.payment_schedule_id

Line 5205: FROM ar_payment_schedules trx_ps,

5201: rcpt_ps.customer_site_use_id,
5202: rcpt_ps.invoice_currency_code,
5203: nvl(ra.amount_applied_from,ra.amount_applied),
5204: ra.apply_date
5205: FROM ar_payment_schedules trx_ps,
5206: ar_receivable_applications ra,
5207: ar_payment_schedules rcpt_ps
5208: WHERE ra.receivable_application_id = p_ra_id
5209: and ra.status in ('APP')

Line 5207: ar_payment_schedules rcpt_ps

5203: nvl(ra.amount_applied_from,ra.amount_applied),
5204: ra.apply_date
5205: FROM ar_payment_schedules trx_ps,
5206: ar_receivable_applications ra,
5207: ar_payment_schedules rcpt_ps
5208: WHERE ra.receivable_application_id = p_ra_id
5209: and ra.status in ('APP')
5210: and ra.payment_schedule_id = rcpt_ps.payment_schedule_id
5211: and ra.applied_payment_schedule_id = trx_ps.payment_schedule_id

Line 5426: FROM ar_payment_schedules trx_ps,

5422: ra.earned_discount_taken,
5423: ra.unearned_discount_taken,
5424: decode(sign(nvl(ra.earned_discount_taken,0)),-1,-1,0,0,1) count_of_edisc,
5425: decode(sign(nvl(ra.unearned_discount_taken,0)),-1,-1,0,0,1) count_of_uedisc
5426: FROM ar_payment_schedules trx_ps,
5427: ar_receivable_applications ra,
5428: ar_payment_schedules rcpt_ps,
5429: ra_terms_b rt
5430: WHERE ra.receivable_application_id = ra_id

Line 5428: ar_payment_schedules rcpt_ps,

5424: decode(sign(nvl(ra.earned_discount_taken,0)),-1,-1,0,0,1) count_of_edisc,
5425: decode(sign(nvl(ra.unearned_discount_taken,0)),-1,-1,0,0,1) count_of_uedisc
5426: FROM ar_payment_schedules trx_ps,
5427: ar_receivable_applications ra,
5428: ar_payment_schedules rcpt_ps,
5429: ra_terms_b rt
5430: WHERE ra.receivable_application_id = ra_id
5431: and ra.status in ('APP','ACTIVITY')
5432: and ra.payment_schedule_id = rcpt_ps.payment_schedule_id

Line 5708: FROM ar_payment_schedules trx_ps,

5704: ra.earned_discount_taken,
5705: ra.unearned_discount_taken,
5706: decode(sign(nvl(ra.earned_discount_taken,0)),-1,-1,0,0,1) count_of_edisc,
5707: decode(sign(nvl(ra.unearned_discount_taken,0)),-1,-1,0,0,1) count_of_uedisc
5708: FROM ar_payment_schedules trx_ps,
5709: ar_receivable_applications ra,
5710: ar_payment_schedules rcpt_ps,
5711: ra_terms_b rt
5712: WHERE ra.receivable_application_id = ra_id

Line 5710: ar_payment_schedules rcpt_ps,

5706: decode(sign(nvl(ra.earned_discount_taken,0)),-1,-1,0,0,1) count_of_edisc,
5707: decode(sign(nvl(ra.unearned_discount_taken,0)),-1,-1,0,0,1) count_of_uedisc
5708: FROM ar_payment_schedules trx_ps,
5709: ar_receivable_applications ra,
5710: ar_payment_schedules rcpt_ps,
5711: ra_terms_b rt
5712: WHERE ra.receivable_application_id = ra_id
5713: and ra.status in ('APP','ACTIVITY')
5714: and ra.payment_schedule_id = rcpt_ps.payment_schedule_id

Line 6134: ar_payment_schedules ps,

6130: )
6131: )
6132: )) cm_cl_past_due_inv_amt
6133: from ra_customer_trx trx,
6134: ar_payment_schedules ps,
6135: ra_customer_trx prev_trx,
6136: ra_cust_trx_types ctt,
6137: ra_terms rt,
6138: ra_terms_lines rtl,

Line 6140: ar_payment_schedules_all cm_app_ps,

6136: ra_cust_trx_types ctt,
6137: ra_terms rt,
6138: ra_terms_lines rtl,
6139: ar_receivable_applications_all ra_cm,
6140: ar_payment_schedules_all cm_app_ps,
6141: ar_trx_summary trx_sum
6142: where trx.customer_trx_id = ps.customer_trx_id
6143: and trx.request_id = p_req_id
6144: and trx.previous_customer_trx_id = prev_trx.customer_trx_id(+)

Line 6326: ar_payment_schedules ps

6322: ps.customer_id, ps.customer_site_use_id,
6323: ps.invoice_currency_code, adj.apply_date,
6324: ps.class, ps.due_date, adj.status
6325: FROM ar_adjustments adj,
6326: ar_payment_schedules ps
6327: WHERE adj.request_id = p_req_id
6328: and adj.payment_schedule_id = ps.payment_schedule_id
6329: group by ps.customer_id,
6330: ps.customer_site_use_id,

Line 6550: ar_payment_schedules ps

6546: SELECT adj.amount, adj.apply_date, adj.receivables_trx_id,
6547: ps.customer_id, ps.customer_site_use_id, ps.invoice_currency_code,
6548: ps.class, ps.due_date
6549: FROM ar_adjustments adj,
6550: ar_payment_schedules ps
6551: WHERE adj.payment_schedule_id = ps.payment_schedule_id
6552: and adj.adjustment_id = p_adj_id ;
6553: l_past_due_inv_inst_count NUMBER;
6554: l_past_due_inv_value NUMBER;

Line 6719: ar_payment_schedules ps

6715: SELECT adj.amount, adj.apply_date, adj.receivables_trx_id,
6716: ps.customer_id, ps.customer_site_use_id, ps.invoice_currency_code,
6717: ps.class, ps.due_date
6718: FROM ar_adjustments adj,
6719: ar_payment_schedules ps
6720: WHERE adj.payment_schedule_id = ps.payment_schedule_id
6721: and adj.adjustment_id = p_adj_id ;
6722:
6723: BEGIN

Line 7181: from ar_payment_schedules_all trx_ps

7177: sum(decode(trx_ps.class,'DEP',trx_ps.amount_due_remaining,0)),
7178: /* OP chargebacks */
7179: count(decode(trx_ps.class,'CB',trx_ps.payment_schedule_id, null)),
7180: sum(decode(trx_ps.class,'CB',trx_ps.amount_due_remaining,0))
7181: from ar_payment_schedules_all trx_ps
7182: where trx_ps.status = 'OP'
7183: and trx_ps.customer_id = main_sum.cust_account_id
7184: and trx_ps.customer_site_use_id = decode(main_sum.site_use_id,-99,
7185: trx_ps.customer_site_use_id,