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.29 2007/08/31 19:04:16 mraymond noship $*/
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 717: ar_payment_schedules rps,

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

Line 804: ar_payment_schedules ps,

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

Line 1058: SELECT * from ar_payment_schedules

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

Line 1509: FROM ar_payment_schedules

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

Line 1612: from ar_payment_schedules

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

Line 1823: l_ps_rec AR_PAYMENT_SCHEDULES%rowtype;

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

Line 1834: SELECT * from ar_payment_schedules

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

Line 2422: SELECT * from ar_payment_schedules

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

Line 2862: SELECT * from ar_payment_schedules

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

Line 3293: l_ps_rec AR_PAYMENT_SCHEDULES%rowtype;

3289: , p_event IN OUT NOCOPY WF_EVENT_T
3290: )
3291: RETURN VARCHAR2 IS
3292:
3293: l_ps_rec AR_PAYMENT_SCHEDULES%rowtype;
3294: l_trx_summary_hist AR_TRX_SUMMARY_HIST%rowtype;
3295:
3296: CURSOR get_trx_history(p_cust_trx_id IN NUMBER) IS
3297: SELECT *

Line 3306: FROM ar_payment_schedules

3302: for update;
3303:
3304: CURSOR lock_ps (cust_trx_id IN NUMBER) IS
3305: SELECT *
3306: FROM ar_payment_schedules
3307: WHERE customer_trx_id = cust_trx_id
3308: FOR UPDATE;
3309:
3310: i INTEGER;

Line 3631: l_cust_account_id ar_payment_schedules.customer_id%type;

3627: l_application_id NUMBER;
3628: l_security_gr_id NUMBER;
3629: -- bug 3979914
3630: -- don't raise the BE in case of unidentified receipts
3631: l_cust_account_id ar_payment_schedules.customer_id%type;
3632:
3633: CURSOR get_receipt_details (p_ps_id IN NUMBER ) IS
3634: SELECT cash_receipt_id, trx_date, amount_due_original,
3635: trx_number, customer_id, customer_site_use_id,

Line 3637: FROM ar_payment_schedules ps

3633: CURSOR get_receipt_details (p_ps_id IN NUMBER ) IS
3634: SELECT cash_receipt_id, trx_date, amount_due_original,
3635: trx_number, customer_id, customer_site_use_id,
3636: invoice_currency_code
3637: FROM ar_payment_schedules ps
3638: WHERE payment_schedule_id = p_ps_id;
3639:
3640: CURSOR get_receipt_status (p_cr_id IN NUMBER)IS
3641: SELECT status

Line 3880: FROM ar_payment_schedules ps,

3876: 'UNAPP', nvl(ra.amount_applied_from,ra.amount_applied),
3877: 'ACC', nvl(ra.amount_applied_from,ra.amount_applied),
3878: 'OTHER ACC',nvl(ra.amount_applied_from,ra.amount_applied),
3879: null)) unresolved_cash
3880: FROM ar_payment_schedules ps,
3881: ar_cash_receipts cr,
3882: ar_cash_receipt_history crh,
3883: ar_receivable_applications ra
3884: WHERE ps.payment_schedule_id = p_ps_id

Line 4088: FROM ar_payment_schedules ps

4084: CURSOR get_receipt_details (p_ps_id IN NUMBER ) IS
4085: SELECT cash_receipt_id, trx_date, amount_due_original,
4086: trx_number, customer_id, customer_site_use_id,
4087: invoice_currency_code
4088: FROM ar_payment_schedules ps
4089: WHERE payment_schedule_id = p_ps_id;
4090:
4091: CURSOR get_receipt_hist (p_hist_id IN NUMBER) IS
4092: select *

Line 4103: ar_payment_schedules ps

4099: select ps.cash_receipt_id, ps.trx_date, hist.amount_due_original,
4100: ps.trx_number, hist.customer_id, hist.site_use_id,
4101: ps.invoice_currency_code
4102: from ar_trx_summary_hist hist,
4103: ar_payment_schedules ps
4104: where previous_history_id = p_hist_id
4105: and ps.payment_schedule_id = hist.payment_schedule_id;
4106:
4107: l_hist_rec ar_trx_summary_hist%rowtype;

Line 4984: FROM ar_payment_schedules trx_ps,

4980: rcpt_ps.customer_site_use_id,
4981: rcpt_ps.invoice_currency_code,
4982: nvl(ra.amount_applied_from,ra.amount_applied),
4983: ra.apply_date
4984: FROM ar_payment_schedules trx_ps,
4985: ar_receivable_applications ra,
4986: ar_payment_schedules rcpt_ps
4987: WHERE ra.receivable_application_id = p_ra_id
4988: and ra.status in ('APP')

Line 4986: ar_payment_schedules rcpt_ps

4982: nvl(ra.amount_applied_from,ra.amount_applied),
4983: ra.apply_date
4984: FROM ar_payment_schedules trx_ps,
4985: ar_receivable_applications ra,
4986: ar_payment_schedules rcpt_ps
4987: WHERE ra.receivable_application_id = p_ra_id
4988: and ra.status in ('APP')
4989: and ra.payment_schedule_id = rcpt_ps.payment_schedule_id
4990: and ra.applied_payment_schedule_id = trx_ps.payment_schedule_id

Line 5190: FROM ar_payment_schedules trx_ps,

5186: rcpt_ps.customer_site_use_id,
5187: rcpt_ps.invoice_currency_code,
5188: nvl(ra.amount_applied_from,ra.amount_applied),
5189: ra.apply_date
5190: FROM ar_payment_schedules trx_ps,
5191: ar_receivable_applications ra,
5192: ar_payment_schedules rcpt_ps
5193: WHERE ra.receivable_application_id = p_ra_id
5194: and ra.status in ('APP')

Line 5192: ar_payment_schedules rcpt_ps

5188: nvl(ra.amount_applied_from,ra.amount_applied),
5189: ra.apply_date
5190: FROM ar_payment_schedules trx_ps,
5191: ar_receivable_applications ra,
5192: ar_payment_schedules rcpt_ps
5193: WHERE ra.receivable_application_id = p_ra_id
5194: and ra.status in ('APP')
5195: and ra.payment_schedule_id = rcpt_ps.payment_schedule_id
5196: and ra.applied_payment_schedule_id = trx_ps.payment_schedule_id

Line 5408: FROM ar_payment_schedules trx_ps,

5404: ra.earned_discount_taken,
5405: ra.unearned_discount_taken,
5406: decode(sign(nvl(ra.earned_discount_taken,0)),-1,-1,0,0,1) count_of_edisc,
5407: decode(sign(nvl(ra.unearned_discount_taken,0)),-1,-1,0,0,1) count_of_uedisc
5408: FROM ar_payment_schedules trx_ps,
5409: ar_receivable_applications ra,
5410: ar_payment_schedules rcpt_ps,
5411: ra_terms_b rt
5412: WHERE ra.receivable_application_id = ra_id

Line 5410: ar_payment_schedules rcpt_ps,

5406: decode(sign(nvl(ra.earned_discount_taken,0)),-1,-1,0,0,1) count_of_edisc,
5407: decode(sign(nvl(ra.unearned_discount_taken,0)),-1,-1,0,0,1) count_of_uedisc
5408: FROM ar_payment_schedules trx_ps,
5409: ar_receivable_applications ra,
5410: ar_payment_schedules rcpt_ps,
5411: ra_terms_b rt
5412: WHERE ra.receivable_application_id = ra_id
5413: and ra.status in ('APP','ACTIVITY')
5414: and ra.payment_schedule_id = rcpt_ps.payment_schedule_id

Line 5685: FROM ar_payment_schedules trx_ps,

5681: ra.earned_discount_taken,
5682: ra.unearned_discount_taken,
5683: decode(sign(nvl(ra.earned_discount_taken,0)),-1,-1,0,0,1) count_of_edisc,
5684: decode(sign(nvl(ra.unearned_discount_taken,0)),-1,-1,0,0,1) count_of_uedisc
5685: FROM ar_payment_schedules trx_ps,
5686: ar_receivable_applications ra,
5687: ar_payment_schedules rcpt_ps,
5688: ra_terms_b rt
5689: WHERE ra.receivable_application_id = ra_id

Line 5687: ar_payment_schedules rcpt_ps,

5683: decode(sign(nvl(ra.earned_discount_taken,0)),-1,-1,0,0,1) count_of_edisc,
5684: decode(sign(nvl(ra.unearned_discount_taken,0)),-1,-1,0,0,1) count_of_uedisc
5685: FROM ar_payment_schedules trx_ps,
5686: ar_receivable_applications ra,
5687: ar_payment_schedules rcpt_ps,
5688: ra_terms_b rt
5689: WHERE ra.receivable_application_id = ra_id
5690: and ra.status in ('APP','ACTIVITY')
5691: and ra.payment_schedule_id = rcpt_ps.payment_schedule_id

Line 6106: ar_payment_schedules ps,

6102: )
6103: )
6104: )) cm_cl_past_due_inv_amt
6105: from ra_customer_trx trx,
6106: ar_payment_schedules ps,
6107: ra_customer_trx prev_trx,
6108: ra_cust_trx_types ctt,
6109: ra_terms rt,
6110: ra_terms_lines rtl,

Line 6112: ar_payment_schedules_all cm_app_ps,

6108: ra_cust_trx_types ctt,
6109: ra_terms rt,
6110: ra_terms_lines rtl,
6111: ar_receivable_applications_all ra_cm,
6112: ar_payment_schedules_all cm_app_ps,
6113: ar_trx_summary trx_sum
6114: where trx.customer_trx_id = ps.customer_trx_id
6115: and trx.request_id = p_req_id
6116: and trx.previous_customer_trx_id = prev_trx.customer_trx_id(+)

Line 6298: ar_payment_schedules ps

6294: ps.customer_id, ps.customer_site_use_id,
6295: ps.invoice_currency_code, adj.apply_date,
6296: ps.class, ps.due_date, adj.status
6297: FROM ar_adjustments adj,
6298: ar_payment_schedules ps
6299: WHERE adj.request_id = p_req_id
6300: and adj.payment_schedule_id = ps.payment_schedule_id
6301: group by ps.customer_id,
6302: ps.customer_site_use_id,

Line 6522: ar_payment_schedules ps

6518: SELECT adj.amount, adj.apply_date, adj.receivables_trx_id,
6519: ps.customer_id, ps.customer_site_use_id, ps.invoice_currency_code,
6520: ps.class, ps.due_date
6521: FROM ar_adjustments adj,
6522: ar_payment_schedules ps
6523: WHERE adj.payment_schedule_id = ps.payment_schedule_id
6524: and adj.adjustment_id = p_adj_id ;
6525: l_past_due_inv_inst_count NUMBER;
6526: l_past_due_inv_value NUMBER;

Line 6679: ar_payment_schedules ps

6675: SELECT adj.amount, adj.apply_date, adj.receivables_trx_id,
6676: ps.customer_id, ps.customer_site_use_id, ps.invoice_currency_code,
6677: ps.class, ps.due_date
6678: FROM ar_adjustments adj,
6679: ar_payment_schedules ps
6680: WHERE adj.payment_schedule_id = ps.payment_schedule_id
6681: and adj.adjustment_id = p_adj_id ;
6682:
6683: BEGIN

Line 7136: from ar_payment_schedules_all trx_ps

7132: sum(decode(trx_ps.class,'DEP',trx_ps.amount_due_remaining,0)),
7133: /* OP chargebacks */
7134: count(decode(trx_ps.class,'CB',trx_ps.payment_schedule_id, null)),
7135: sum(decode(trx_ps.class,'CB',trx_ps.amount_due_remaining,0))
7136: from ar_payment_schedules_all trx_ps
7137: where trx_ps.status = 'OP'
7138: and trx_ps.customer_id = main_sum.cust_account_id
7139: and trx_ps.customer_site_use_id = decode(main_sum.site_use_id,-99,
7140: trx_ps.customer_site_use_id,