DBA Data[Home] [Help]

APPS.AR_PURGE dependencies on RA_CUSTOMER_TRX

Line 958: ra_customer_trx ct,

954: ra_cust_trx_types ctt,
955: ar_payment_schedules ps,
956: ar_cash_receipts cr,
957: ar_receivable_applications ra,
958: ra_customer_trx ct,
959: (SELECT distinct cash_Receipt_id
960: FROM ar_receivable_applications
961: WHERE cash_receipt_id = cp_cash_receipt_id) ra1
962: WHERE ctt.cust_trx_type_id = ct.cust_trx_type_id

Line 1667: ra_customer_trx ct_prev,

1663: iby_trxn_extensions_v iby,
1664: ra_salesreps sales,
1665: ra_terms term,
1666: ra_cust_trx_line_gl_dist ctlgd,
1667: ra_customer_trx ct_prev,
1668: ra_customer_trx ct
1669: WHERE lu.lookup_code (+) = ct.reason_code
1670: AND lu.lookup_type (+) = 'INVOICING_REASON'
1671: AND iby.trxn_extension_id(+) = ct.payment_trxn_extension_id

Line 1668: ra_customer_trx ct

1664: ra_salesreps sales,
1665: ra_terms term,
1666: ra_cust_trx_line_gl_dist ctlgd,
1667: ra_customer_trx ct_prev,
1668: ra_customer_trx ct
1669: WHERE lu.lookup_code (+) = ct.reason_code
1670: AND lu.lookup_type (+) = 'INVOICING_REASON'
1671: AND iby.trxn_extension_id(+) = ct.payment_trxn_extension_id
1672: AND rule.rule_id (+) = ct.invoicing_rule_id

Line 1830: ra_customer_trx ct

1826: ar_lookups lu,
1827: ar_adjustments adj,
1828: hz_cust_accounts cust,
1829: hz_parties cust_party,
1830: ra_customer_trx ct
1831: WHERE lu.lookup_code (+) = adj.reason_code
1832: AND lu.lookup_type (+) = 'ADJUST_REASON'
1833: AND ctt.cust_trx_type_id = ct.cust_trx_type_id
1834: AND doc.doc_sequence_id (+) = adj.doc_sequence_id

Line 2575: ra_customer_trx_lines ctl,

2571: ra_rules rule1,
2572: ra_cust_trx_types ctt_prev,
2573: ra_cust_trx_types ctt,
2574: mtl_system_items mtl,
2575: ra_customer_trx_lines ctl,
2576: ra_customer_trx ct_prev,
2577: ra_customer_trx ct,
2578: ar_deferred_lines dl
2579: WHERE te.tax_exemption_id (+) = ctl.tax_exemption_id

Line 2576: ra_customer_trx ct_prev,

2572: ra_cust_trx_types ctt_prev,
2573: ra_cust_trx_types ctt,
2574: mtl_system_items mtl,
2575: ra_customer_trx_lines ctl,
2576: ra_customer_trx ct_prev,
2577: ra_customer_trx ct,
2578: ar_deferred_lines dl
2579: WHERE te.tax_exemption_id (+) = ctl.tax_exemption_id
2580: AND te.reason_code = lu_te.lookup_code (+)

Line 2577: ra_customer_trx ct,

2573: ra_cust_trx_types ctt,
2574: mtl_system_items mtl,
2575: ra_customer_trx_lines ctl,
2576: ra_customer_trx ct_prev,
2577: ra_customer_trx ct,
2578: ar_deferred_lines dl
2579: WHERE te.tax_exemption_id (+) = ctl.tax_exemption_id
2580: AND te.reason_code = lu_te.lookup_code (+)
2581: AND lu_te.lookup_type (+) = 'TAX_REASON'

Line 2715: ra_customer_trx ct

2711: '' /* override_auto_accounting_flag */
2712: FROM
2713: ra_cust_trx_types ctt,
2714: ra_cust_trx_line_gl_dist ctlgd,
2715: ra_customer_trx ct
2716: WHERE ctt.cust_trx_type_id = ct.cust_trx_type_id
2717: AND ctlgd.customer_trx_id = ct.customer_trx_id
2718: AND ctlgd.account_set_flag <> 'Y' /* no acount sets */
2719: AND decode(ctlgd.account_class, 'REC',

Line 2835: ra_customer_trx ct,

2831: to_date(null), /* expiration_date */
2832: to_number(null), /* expiration_days */
2833: '' /* override_auto_accounting_flag */
2834: FROM ra_cust_trx_types ctt,
2835: ra_customer_trx ct,
2836: ar_adjustments adj
2837: WHERE adj.customer_trx_id = cp_customer_trx_id
2838: and adj.customer_trx_id = ct.customer_trx_id
2839: and ctt.cust_trx_type_id = ct.cust_trx_type_id

Line 2953: ra_customer_trx_lines ctl,

2949: lc.expiration_date, /* expiration_date */
2950: lc.expiration_days, /* expiration_days */
2951: '' /* override_auto_accounting_flag */
2952: FROM
2953: ra_customer_trx_lines ctl,
2954: ar_line_conts lc
2955: WHERE cp_customer_trx_id = ctl.customer_trx_id
2956: and ctl.customer_trx_line_id = lc.customer_trx_line_id
2957: and cp_archive_level <> 'H'

Line 3207: ra_customer_trx ct

3203: ra_cust_trx_types ctt,
3204: ar_payment_schedules ps,
3205: ar_cash_receipts cr,
3206: ar_receivable_applications ra,
3207: ra_customer_trx ct
3208: WHERE ctt.cust_trx_type_id = ct.cust_trx_type_id
3209: and ps.payment_schedule_id (+) = ra.applied_payment_schedule_id
3210: and cr.cash_receipt_id = ra.cash_receipt_id
3211: and ra.applied_customer_trx_id = ct.customer_trx_id

Line 3339: ra_customer_trx ct_cm,

3335: to_number(null), /* expiration_days */
3336: '' /* override_auto_accounting_flag */
3337: FROM
3338: ra_cust_trx_types ctt_cm,
3339: ra_customer_trx ct_cm,
3340: ra_cust_trx_types ctt_inv,
3341: ar_receivable_applications ra,
3342: ra_customer_trx ct_inv
3343: WHERE ctt_cm.cust_trx_type_id = ct_cm.cust_trx_type_id

Line 3342: ra_customer_trx ct_inv

3338: ra_cust_trx_types ctt_cm,
3339: ra_customer_trx ct_cm,
3340: ra_cust_trx_types ctt_inv,
3341: ar_receivable_applications ra,
3342: ra_customer_trx ct_inv
3343: WHERE ctt_cm.cust_trx_type_id = ct_cm.cust_trx_type_id
3344: AND ra.applied_customer_trx_id = ct_inv.customer_trx_id
3345: AND ra.customer_trx_id = ct_cm.customer_trx_id
3346: -- bug3948805 removed

Line 3345: AND ra.customer_trx_id = ct_cm.customer_trx_id

3341: ar_receivable_applications ra,
3342: ra_customer_trx ct_inv
3343: WHERE ctt_cm.cust_trx_type_id = ct_cm.cust_trx_type_id
3344: AND ra.applied_customer_trx_id = ct_inv.customer_trx_id
3345: AND ra.customer_trx_id = ct_cm.customer_trx_id
3346: -- bug3948805 removed
3347: -- AND ct_cm.previous_customer_trx_id = ct_inv.customer_trx_id
3348: AND ctt_inv.cust_trx_type_id = ct_inv.cust_trx_type_id
3349: AND ctt_inv.type <> 'CM'

Line 3839: from ra_customer_trx trx

3835: /* bug1999155: Divided select stmt which lock all transactions
3836: records into the following stmts */
3837: cursor trx_cur is
3838: SELECT 'Found' record_found
3839: from ra_customer_trx trx
3840: WHERE trx.customer_trx_id = p_entity_id
3841: FOR UPDATE OF trx.customer_trx_id NOWAIT;
3842:
3843: cursor trx_line_cur is

Line 3845: from ra_customer_trx_lines lines

3841: FOR UPDATE OF trx.customer_trx_id NOWAIT;
3842:
3843: cursor trx_line_cur is
3844: SELECT 'Found' record_found
3845: from ra_customer_trx_lines lines
3846: WHERE lines.customer_trx_id = p_entity_id
3847: FOR UPDATE OF lines.customer_trx_id NOWAIT;
3848:
3849: cursor dist_cur is

Line 3871: FOR UPDATE OF ra.customer_trx_id NOWAIT;

3867: cursor recv_app_cur is
3868: SELECT 'Found' record_found
3869: from ar_receivable_applications ra
3870: WHERE ra.applied_customer_trx_id = p_entity_id
3871: FOR UPDATE OF ra.customer_trx_id NOWAIT;
3872:
3873: cursor pay_sched_cur is
3874: SELECT 'Found' record_found
3875: from ar_payment_schedules ps

Line 3890: ra_customer_trx_lines lines,

3886: ar_receivable_applications ra,
3887: ar_payment_schedules ps,
3888: ar_adjustments adj,
3889: ra_cust_trx_line_gl_dist dist,
3890: ra_customer_trx_lines lines,
3891: ra_customer_trx trx
3892: WHERE trx.customer_trx_id = p_entity_id
3893: AND trx.customer_trx_id = lines.customer_trx_id
3894: AND trx.customer_trx_id = dist.customer_trx_id (+)

Line 3891: ra_customer_trx trx

3887: ar_payment_schedules ps,
3888: ar_adjustments adj,
3889: ra_cust_trx_line_gl_dist dist,
3890: ra_customer_trx_lines lines,
3891: ra_customer_trx trx
3892: WHERE trx.customer_trx_id = p_entity_id
3893: AND trx.customer_trx_id = lines.customer_trx_id
3894: AND trx.customer_trx_id = dist.customer_trx_id (+)
3895: AND trx.customer_trx_id = sales.customer_trx_id (+)

Line 3904: ra.customer_trx_id,

3900: lines.customer_trx_id,
3901: dist.customer_trx_id,
3902: sales.customer_trx_id,
3903: adj.customer_trx_id,
3904: ra.customer_trx_id,
3905: ps.customer_trx_id NOWAIT
3906: )
3907: LOOP
3908: l_record_found := lock_rec.record_found ;

Line 3969: FROM ra_customer_trx ct,

3965: l_commitment_transactions NUMBER;
3966: BEGIN
3967: SELECT COUNT(*)
3968: INTO l_commitment_transactions
3969: FROM ra_customer_trx ct,
3970: ra_cust_trx_types ctt
3971: WHERE ct.customer_trx_id = p_entity_id
3972: AND ctt.cust_trx_type_id = ct.cust_trx_type_id
3973: AND

Line 3992: l_initial_customer_trx_id ra_customer_trx.initial_customer_trx_id%TYPE;

3988: -- bug2472294 start
3989: -- Handle non post to gl transaction
3990: DECLARE
3991: l_type ra_cust_trx_types.type%TYPE ;
3992: l_initial_customer_trx_id ra_customer_trx.initial_customer_trx_id%TYPE;
3993: l_post_to_gl ra_cust_trx_types.post_to_gl%TYPE;
3994: l_trx_date ra_customer_trx.trx_date%TYPE;
3995:
3996: BEGIN

Line 3994: l_trx_date ra_customer_trx.trx_date%TYPE;

3990: DECLARE
3991: l_type ra_cust_trx_types.type%TYPE ;
3992: l_initial_customer_trx_id ra_customer_trx.initial_customer_trx_id%TYPE;
3993: l_post_to_gl ra_cust_trx_types.post_to_gl%TYPE;
3994: l_trx_date ra_customer_trx.trx_date%TYPE;
3995:
3996: BEGIN
3997:
3998: SELECT ctt.type,

Line 4006: FROM ra_customer_trx ct,

4002: INTO l_type,
4003: l_initial_customer_trx_id,
4004: l_post_to_gl,
4005: l_trx_date
4006: FROM ra_customer_trx ct,
4007: ra_cust_trx_types ctt
4008: WHERE ct.customer_trx_id = p_entity_id
4009: AND ctt.cust_trx_type_id = ct.cust_trx_type_id ;
4010:

Line 4132: FROM ra_customer_trx

4128:
4129: BEGIN
4130: SELECT 'Y'
4131: INTO l_same_customer
4132: FROM ra_customer_trx
4133: WHERE customer_trx_id = p_entity_id
4134: AND bill_to_customer_id = p_customer_id ;
4135:
4136: EXCEPTION

Line 4176: FROM ra_customer_trx_lines

4172: l_autorule_incomplete_count NUMBER;
4173: BEGIN
4174: SELECT COUNT(*)
4175: INTO l_autorule_incomplete_count
4176: FROM ra_customer_trx_lines
4177: WHERE customer_trx_id = p_entity_id
4178: AND line_type = 'LINE'
4179: AND autorule_complete_flag = 'N';
4180: IF l_autorule_incomplete_count > 0

Line 4352: ra_customer_trx trx

4348: --
4349: SELECT bat.batch_id
4350: INTO l_batch_id
4351: FROM ra_batches bat,
4352: ra_customer_trx trx
4353: WHERE trx.customer_trx_id = p_entity_id
4354: AND trx.batch_id = bat.batch_id (+)
4355: FOR UPDATE OF bat.batch_id NOWAIT ;
4356: --

Line 4363: from ra_customer_trx

4359: --
4360: /* bug3873165 added two tables for line rev */
4361: DELETE FROM ar_line_conts
4362: WHERE customer_trx_line_id in ( select customer_trx_line_id
4363: from ra_customer_trx
4364: where customer_trx_id = p_entity_id );
4365: --
4366: DELETE FROM ar_deferred_lines
4367: WHERE customer_trx_id = p_entity_id;

Line 4369: DELETE FROM ra_customer_trx_lines

4365: --
4366: DELETE FROM ar_deferred_lines
4367: WHERE customer_trx_id = p_entity_id;
4368: --
4369: DELETE FROM ra_customer_trx_lines
4370: WHERE customer_trx_id = p_entity_id;
4371: --
4372: DELETE FROM ra_cust_trx_line_gl_dist
4373: WHERE customer_trx_id = p_entity_id;

Line 4377: -- delete from RA_CUSTOMER_TRX

4373: WHERE customer_trx_id = p_entity_id;
4374:
4375: --
4376: -- bug 1404679 : to prevent ORA-1403 error when client uses AX,
4377: -- delete from RA_CUSTOMER_TRX
4378: -- after lines and dist table are done
4379: --
4380: -- DELETE FROM ra_customer_trx
4381: -- WHERE customer_trx_id = p_entity_id;

Line 4380: -- DELETE FROM ra_customer_trx

4376: -- bug 1404679 : to prevent ORA-1403 error when client uses AX,
4377: -- delete from RA_CUSTOMER_TRX
4378: -- after lines and dist table are done
4379: --
4380: -- DELETE FROM ra_customer_trx
4381: -- WHERE customer_trx_id = p_entity_id;
4382: --
4383:
4384: -- Call table handler instead of doing direct delete to

Line 4385: -- ra_customer_Trx

4381: -- WHERE customer_trx_id = p_entity_id;
4382: --
4383:
4384: -- Call table handler instead of doing direct delete to
4385: -- ra_customer_Trx
4386:
4387: arp_ct_pkg.delete_p(p_entity_id);
4388:
4389: DELETE FROM ra_batches

Line 4392: FROM ra_customer_trx t

4388:
4389: DELETE FROM ra_batches
4390: WHERE batch_id = l_batch_id
4391: AND NOT EXISTS ( SELECT 'x'
4392: FROM ra_customer_trx t
4393: WHERE t.batch_id = l_batch_id ) ;
4394:
4395:
4396: -- bug3283678 this must be done after above delete stmt.

Line 5509: ra_customer_trx ct,

5505: cp_customer_id NUMBER ,
5506: cp_max_trx_id NUMBER) IS
5507: SELECT ct.customer_trx_id customer_trx_id
5508: FROM ra_cust_trx_types ctt,
5509: ra_customer_trx ct,
5510: ar_payment_schedules ps
5511: WHERE ct.initial_customer_trx_id IS NULL
5512: AND ps.customer_trx_id = ct.customer_trx_id
5513: -- bug1199027

Line 5639: FROM RA_CUSTOMER_TRX

5635: -- by another instance when called recursively
5636: --
5637: SELECT 1
5638: INTO l_existence
5639: FROM RA_CUSTOMER_TRX
5640: WHERE customer_trx_id = l_trx_id
5641: FOR UPDATE OF customer_trx_id NOWAIT ;
5642:
5643: -- lock all the corresponding records