DBA Data[Home] [Help]

APPS.AR_PURGE dependencies on AR_RECEIVABLE_APPLICATIONS

Line 1067: ar_receivable_applications ra,

1063: hz_cust_site_uses su,
1064: hz_cust_accounts cust,
1065: hz_parties cust_party,
1066: iby_trxn_extensions_v iby,
1067: ar_receivable_applications ra,
1068: ar_receivable_applications ra1, --bug1199027
1069: ar_cash_receipt_history crh,
1070: ar_cash_receipt_history crh_batch,
1071: ar_cash_receipt_history crh_remit,

Line 1068: ar_receivable_applications ra1, --bug1199027

1064: hz_cust_accounts cust,
1065: hz_parties cust_party,
1066: iby_trxn_extensions_v iby,
1067: ar_receivable_applications ra,
1068: ar_receivable_applications ra1, --bug1199027
1069: ar_cash_receipt_history crh,
1070: ar_cash_receipt_history crh_batch,
1071: ar_cash_receipt_history crh_remit,
1072: ar_cash_receipts cr

Line 2158: ar_receivable_applications ra

2154: FROM
2155: ar_vat_tax vt,
2156: ar_cash_receipt_history crh,
2157: ar_cash_receipts cr ,
2158: ar_receivable_applications ra
2159: WHERE crh.cash_receipt_id = cr.cash_receipt_id
2160: and nvl(crh.current_record_flag, 'N') = 'Y'
2161: and cr.vat_tax_id = vt.vat_tax_id (+)
2162: and cr.cash_receipt_id = ra.cash_receipt_id

Line 2289: ar_receivable_applications ra,

2285: FROM
2286: ra_cust_trx_types ctt,
2287: ar_payment_schedules ps,
2288: ar_cash_receipts cr,
2289: ar_receivable_applications ra,
2290: ra_customer_trx ct
2291: WHERE ctt.cust_trx_type_id = ct.cust_trx_type_id
2292: and ps.payment_schedule_id (+) = ra.applied_payment_schedule_id
2293: and cr.cash_receipt_id = ra.cash_receipt_id

Line 2296: FROM ar_receivable_applications ra1

2292: and ps.payment_schedule_id (+) = ra.applied_payment_schedule_id
2293: and cr.cash_receipt_id = ra.cash_receipt_id
2294: and ra.applied_customer_trx_id = ct.customer_trx_id
2295: and exists ( SELECT 'x'
2296: FROM ar_receivable_applications ra1
2297: WHERE ra1.applied_customer_trx_id = cp_customer_trx_id
2298: AND ra1.cash_Receipt_id = ra.cash_receipt_id )
2299: -- bug3567865 Don't insert duplicate cash record.
2300: and not exists (

Line 2424: ar_receivable_applications ra,

2420: FROM
2421: ra_cust_trx_types ctt_cm,
2422: ra_customer_trx ct_cm,
2423: ra_cust_trx_types ctt_inv,
2424: ar_receivable_applications ra,
2425: ra_customer_trx ct_inv
2426: WHERE ctt_cm.cust_trx_type_id = ct_cm.cust_trx_type_id
2427: AND ra.applied_customer_trx_id = ct_inv.customer_trx_id
2428: AND ra.customer_trx_id = ct_cm.customer_trx_id

Line 2554: ar_receivable_applications ra

2550: to_number(null), /* expiration_days */
2551: '' /* override_auto_accounting_flag */
2552: FROM
2553: ar_cash_receipts cr,
2554: ar_receivable_applications ra
2555: where cr.cash_receipt_id = ra.cash_receipt_id
2556: and ra.applied_payment_schedule_id = -3
2557: and ra.status = 'ACTIVITY'
2558: and ra.display = 'Y'

Line 2561: FROM ar_receivable_applications ra1

2557: and ra.status = 'ACTIVITY'
2558: and ra.display = 'Y'
2559: and ra.reversal_gl_date is null
2560: and exists ( SELECT 'x'
2561: FROM ar_receivable_applications ra1
2562: WHERE ra1.applied_customer_trx_id =
2563: cp_customer_trx_id
2564: AND ra1.cash_Receipt_id = ra.cash_receipt_id )
2565: and not exists (

Line 2952: from ar_receivable_applications ra

2948: FOR UPDATE OF adj.customer_trx_id NOWAIT;
2949:
2950: cursor recv_app_cur is
2951: SELECT 'Found' record_found
2952: from ar_receivable_applications ra
2953: WHERE ra.applied_customer_trx_id = p_entity_id
2954: FOR UPDATE OF ra.customer_trx_id NOWAIT;
2955:
2956: cursor pay_sched_cur is

Line 2969: ar_receivable_applications ra,

2965: some stmts. This cursor for loop is not used .
2966: FOR lock_rec IN (
2967: SELECT 'Found' record_found
2968: FROM ra_cust_trx_line_salesreps sales,
2969: ar_receivable_applications ra,
2970: ar_payment_schedules ps,
2971: ar_adjustments adj,
2972: ra_cust_trx_line_gl_dist dist,
2973: ra_customer_trx_lines lines,

Line 3333: FROM ar_receivable_applications

3329: l_unpurgeable_applications NUMBER;
3330: BEGIN
3331: SELECT COUNT(*)
3332: INTO l_unpurgeable_applications
3333: FROM ar_receivable_applications
3334: WHERE
3335: (
3336: applied_customer_trx_id = p_entity_id OR
3337: customer_trx_id = p_entity_id

Line 3686: FROM ar_receivable_applications

3682: 'CASH', acctd_amount_applied_to,
3683: 'CM', acctd_amount_applied_from - acctd_amount_applied_to ),
3684: NVL(acctd_earned_discount_taken,0) +
3685: NVL(acctd_unearned_discount_taken,0)
3686: FROM ar_receivable_applications
3687: WHERE
3688: (
3689: applied_customer_trx_id = cp_applied_invoice_id OR
3690: customer_trx_id = cp_applied_invoice_id

Line 3701: FROM ar_receivable_applications

3697: -- to add unpurgeable trx list.
3698: --
3699: CURSOR app_to_invoice_receipt( cp_cash_receipt_id NUMBER ) IS
3700: SELECT applied_customer_trx_id
3701: FROM ar_receivable_applications
3702: WHERE cash_receipt_id = cp_cash_receipt_id
3703: AND status = 'APP';
3704:
3705: l_application_id NUMBER; -- receipt_id or trx_id

Line 3707: l_application_type ar_receivable_applications.application_type%TYPE;

3703: AND status = 'APP';
3704:
3705: l_application_id NUMBER; -- receipt_id or trx_id
3706: l_applied_customer_trx_id NUMBER;
3707: l_application_type ar_receivable_applications.application_type%TYPE;
3708: l_receipt_amount NUMBER;
3709: l_discount_amount NUMBER;
3710: l_ar_dist_key_value_list gl_ca_utility_pkg.r_key_value_arr;
3711: l_rec_app_key_value_list gl_ca_utility_pkg.r_key_value_arr;

Line 3717: FROM ar_receivable_applications

3713: OPEN app_to_invoice( p_entity_id );
3714: --
3715: DELETE FROM ar_distributions
3716: WHERE source_id in ( SELECT receivable_application_id
3717: FROM ar_receivable_applications
3718: WHERE
3719: ( applied_customer_trx_id = p_entity_id OR
3720: customer_trx_id = p_entity_id
3721: )

Line 3740: DELETE FROM ar_receivable_applications

3736: p_mode => 'BATCH',
3737: p_key_value_list => l_ar_dist_key_value_list);*/
3738:
3739: --
3740: DELETE FROM ar_receivable_applications
3741: WHERE
3742: (
3743: applied_customer_trx_id = p_entity_id OR
3744: customer_trx_id = p_entity_id

Line 3756: p_table_name => 'AR_RECEIVABLE_APPLICATIONS',

3752: +---------------------------------*/
3753:
3754: /* ar_mrc_engine.maintain_mrc_data(
3755: p_event_mode => 'DELETE',
3756: p_table_name => 'AR_RECEIVABLE_APPLICATIONS',
3757: p_mode => 'BATCH',
3758: p_key_value_list => l_rec_app_key_value_list);*/
3759: --
3760: LOOP

Line 3879: FROM ar_receivable_applications ra

3875: FOR UPDATE OF ps.cash_receipt_id NOWAIT;
3876:
3877: cursor ra_cur is
3878: select 'Found' record_found
3879: FROM ar_receivable_applications ra
3880: where ra.cash_receipt_id = p_entity_id
3881: FOR UPDATE OF ra.cash_receipt_id NOWAIT;
3882:
3883: cursor cr_cur is

Line 3897: ar_receivable_applications ra,

3893: FOR lock_rec IN (
3894: SELECT 'Found' record_found
3895: FROM ar_distributions dist,
3896: ar_payment_schedules ps,
3897: ar_receivable_applications ra,
3898: ar_cash_receipt_history crh,
3899: ar_cash_receipts cr
3900: WHERE cr.cash_receipt_id = p_entity_id
3901: AND cr.cash_receipt_id = crh.cash_receipt_id

Line 4048: FROM ar_receivable_applications

4044: l_unpurgeable_applications NUMBER;
4045: BEGIN
4046: SELECT COUNT(*)
4047: INTO l_unpurgeable_applications
4048: FROM ar_receivable_applications
4049: WHERE cash_receipt_id = p_entity_id
4050: AND
4051: (
4052: posting_control_id = -3 OR

Line 4293: FROM ar_receivable_applications

4289: NVL(acctd_unearned_discount_taken,0),
4290: NVL(acctd_amount_applied_from,0) -
4291: NVL(acctd_amount_applied_to,0),
4292: gl_date
4293: FROM ar_receivable_applications
4294: WHERE cash_receipt_id = cp_cash_receipt_id
4295: AND status = 'APP'
4296: FOR UPDATE OF receivable_application_id NOWAIT ;
4297:

Line 4359: DELETE FROM ar_receivable_applications

4355: END IF ;
4356: */
4357:
4358: --
4359: DELETE FROM ar_receivable_applications
4360: WHERE cash_receipt_id = p_entity_id
4361: RETURNING receivable_application_id
4362: BULK COLLECT INTO l_rec_app_key_value_list;
4363:

Line 4371: p_table_name => 'AR_RECEIVABLE_APPLICATIONS',

4367: +---------------------------------*/
4368:
4369: /* ar_mrc_engine.maintain_mrc_data(
4370: p_event_mode => 'DELETE',
4371: p_table_name => 'AR_RECEIVABLE_APPLICATIONS',
4372: p_mode => 'BATCH',
4373: p_key_value_list => l_rec_app_key_value_list);*/
4374:
4375: --

Line 4393: FROM ar_receivable_applications

4389: CLOSE app_from_receipt;
4390: --
4391: DELETE FROM ar_distributions
4392: WHERE source_id in ( SELECT receivable_application_id
4393: FROM ar_receivable_applications
4394: WHERE cash_receipt_id = p_entity_id
4395: AND status <> 'APP' )
4396:
4397: AND source_table = 'RA'

Line 4423: FROM ar_receivable_applications

4419: -- invoice.
4420: --
4421: BEGIN
4422: FOR I in ( SELECT receivable_application_id
4423: FROM ar_receivable_applications
4424: WHERE cash_receipt_id = p_entity_id
4425: AND status <> 'APP'
4426: FOR UPDATE OF receivable_application_id NOWAIT )
4427: LOOP

Line 4428: DELETE FROM ar_receivable_applications

4424: WHERE cash_receipt_id = p_entity_id
4425: AND status <> 'APP'
4426: FOR UPDATE OF receivable_application_id NOWAIT )
4427: LOOP
4428: DELETE FROM ar_receivable_applications
4429: WHERE receivable_application_id =
4430: I.receivable_application_id;
4431:
4432: /*---------------------------------+

Line 4439: p_table_name => 'AR_RECEIVABLE_APPLICATIONS',

4435: +---------------------------------*/
4436:
4437: /* ar_mrc_engine.maintain_mrc_data(
4438: p_event_mode => 'DELETE',
4439: p_table_name => 'AR_RECEIVABLE_APPLICATIONS',
4440: p_mode => 'SINGLE',
4441: p_key_value => I.receivable_application_id);*/
4442:
4443: --