DBA Data[Home] [Help]

APPS.AR_PURGE dependencies on AR_RECEIVABLE_APPLICATIONS

Line 738: ar_receivable_applications ra,

734: hz_locations loc,
735: hz_cust_site_uses su,
736: hz_cust_accounts cust,
737: hz_parties cust_party,
738: ar_receivable_applications ra,
739: ar_receivable_applications ra1, --bug1199027
740: ar_cash_receipt_history crh,
741: ar_cash_receipt_history crh_batch,
742: ar_cash_receipt_history crh_remit,

Line 739: ar_receivable_applications ra1, --bug1199027

735: hz_cust_site_uses su,
736: hz_cust_accounts cust,
737: hz_parties cust_party,
738: ar_receivable_applications ra,
739: ar_receivable_applications ra1, --bug1199027
740: ar_cash_receipt_history crh,
741: ar_cash_receipt_history crh_batch,
742: ar_cash_receipt_history crh_remit,
743: ar_cash_receipts cr

Line 957: ar_receivable_applications ra,

953: FROM
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

Line 960: FROM ar_receivable_applications

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
963: and ps.payment_schedule_id (+) = ra.applied_payment_schedule_id
964: and cr.cash_receipt_id = ra.cash_receipt_id

Line 1984: ar_receivable_applications ra,

1980: hz_cust_site_uses su,
1981: hz_cust_accounts cust,
1982: hz_parties cust_party,
1983: iby_trxn_extensions_v iby,
1984: ar_receivable_applications ra,
1985: ar_receivable_applications ra1, --bug1199027
1986: ar_cash_receipt_history crh,
1987: ar_cash_receipt_history crh_batch,
1988: ar_cash_receipt_history crh_remit,

Line 1985: ar_receivable_applications ra1, --bug1199027

1981: hz_cust_accounts cust,
1982: hz_parties cust_party,
1983: iby_trxn_extensions_v iby,
1984: ar_receivable_applications ra,
1985: ar_receivable_applications ra1, --bug1199027
1986: ar_cash_receipt_history crh,
1987: ar_cash_receipt_history crh_batch,
1988: ar_cash_receipt_history crh_remit,
1989: ar_cash_receipts cr

Line 3075: ar_receivable_applications ra

3071: FROM
3072: ar_vat_tax vt,
3073: ar_cash_receipt_history crh,
3074: ar_cash_receipts cr ,
3075: ar_receivable_applications ra
3076: WHERE crh.cash_receipt_id = cr.cash_receipt_id
3077: and nvl(crh.current_record_flag, 'N') = 'Y'
3078: and cr.vat_tax_id = vt.vat_tax_id (+)
3079: and cr.cash_receipt_id = ra.cash_receipt_id

Line 3206: ar_receivable_applications ra,

3202: FROM
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

Line 3213: FROM ar_receivable_applications ra1

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
3212: and exists ( SELECT 'x'
3213: FROM ar_receivable_applications ra1
3214: WHERE ra1.applied_customer_trx_id = cp_customer_trx_id
3215: AND ra1.cash_Receipt_id = ra.cash_receipt_id )
3216: -- bug3567865 Don't insert duplicate cash record.
3217: and not exists (

Line 3341: ar_receivable_applications ra,

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
3344: AND ra.applied_customer_trx_id = ct_inv.customer_trx_id
3345: AND ra.customer_trx_id = ct_cm.customer_trx_id

Line 3471: ar_receivable_applications ra

3467: to_number(null), /* expiration_days */
3468: '' /* override_auto_accounting_flag */
3469: FROM
3470: ar_cash_receipts cr,
3471: ar_receivable_applications ra
3472: where cr.cash_receipt_id = ra.cash_receipt_id
3473: and ra.applied_payment_schedule_id = -3
3474: and ra.status = 'ACTIVITY'
3475: and ra.display = 'Y'

Line 3478: FROM ar_receivable_applications ra1

3474: and ra.status = 'ACTIVITY'
3475: and ra.display = 'Y'
3476: and ra.reversal_gl_date is null
3477: and exists ( SELECT 'x'
3478: FROM ar_receivable_applications ra1
3479: WHERE ra1.applied_customer_trx_id =
3480: cp_customer_trx_id
3481: AND ra1.cash_Receipt_id = ra.cash_receipt_id )
3482: and not exists (

Line 3869: from ar_receivable_applications ra

3865: FOR UPDATE OF adj.customer_trx_id NOWAIT;
3866:
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

Line 3886: ar_receivable_applications ra,

3882: some stmts. This cursor for loop is not used .
3883: FOR lock_rec IN (
3884: SELECT 'Found' record_found
3885: FROM ra_cust_trx_line_salesreps sales,
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,

Line 4250: FROM ar_receivable_applications

4246: l_unpurgeable_applications NUMBER;
4247: BEGIN
4248: SELECT COUNT(*)
4249: INTO l_unpurgeable_applications
4250: FROM ar_receivable_applications
4251: WHERE
4252: (
4253: applied_customer_trx_id = p_entity_id OR
4254: customer_trx_id = p_entity_id

Line 4538: FROM ar_receivable_applications

4534: 'CASH', acctd_amount_applied_to,
4535: 'CM', acctd_amount_applied_from - acctd_amount_applied_to ),
4536: NVL(acctd_earned_discount_taken,0) +
4537: NVL(acctd_unearned_discount_taken,0)
4538: FROM ar_receivable_applications
4539: WHERE
4540: (
4541: applied_customer_trx_id = cp_applied_invoice_id OR
4542: customer_trx_id = cp_applied_invoice_id

Line 4553: FROM ar_receivable_applications

4549: -- to add unpurgeable trx list.
4550: --
4551: CURSOR app_to_invoice_receipt( cp_cash_receipt_id NUMBER ) IS
4552: SELECT applied_customer_trx_id
4553: FROM ar_receivable_applications
4554: WHERE cash_receipt_id = cp_cash_receipt_id
4555: AND status = 'APP';
4556:
4557: l_application_id NUMBER; -- receipt_id or trx_id

Line 4559: l_application_type ar_receivable_applications.application_type%TYPE;

4555: AND status = 'APP';
4556:
4557: l_application_id NUMBER; -- receipt_id or trx_id
4558: l_applied_customer_trx_id NUMBER;
4559: l_application_type ar_receivable_applications.application_type%TYPE;
4560: l_receipt_amount NUMBER;
4561: l_discount_amount NUMBER;
4562: BEGIN
4563: OPEN app_to_invoice( p_entity_id );

Line 4567: FROM ar_receivable_applications

4563: OPEN app_to_invoice( p_entity_id );
4564: --
4565: DELETE FROM ar_distributions
4566: WHERE source_id in ( SELECT receivable_application_id
4567: FROM ar_receivable_applications
4568: WHERE
4569: ( applied_customer_trx_id = p_entity_id OR
4570: customer_trx_id = p_entity_id
4571: )

Line 4578: DELETE FROM ar_receivable_applications

4574:
4575:
4576:
4577: --
4578: DELETE FROM ar_receivable_applications
4579: WHERE
4580: (
4581: applied_customer_trx_id = p_entity_id OR
4582: customer_trx_id = p_entity_id

Line 4717: FROM ar_receivable_applications ra

4713: FOR UPDATE OF ps.cash_receipt_id NOWAIT;
4714:
4715: cursor ra_cur is
4716: select 'Found' record_found
4717: FROM ar_receivable_applications ra
4718: where ra.cash_receipt_id = p_entity_id
4719: FOR UPDATE OF ra.cash_receipt_id NOWAIT;
4720:
4721: cursor cr_cur is

Line 4735: ar_receivable_applications ra,

4731: FOR lock_rec IN (
4732: SELECT 'Found' record_found
4733: FROM ar_distributions dist,
4734: ar_payment_schedules ps,
4735: ar_receivable_applications ra,
4736: ar_cash_receipt_history crh,
4737: ar_cash_receipts cr
4738: WHERE cr.cash_receipt_id = p_entity_id
4739: AND cr.cash_receipt_id = crh.cash_receipt_id

Line 4886: FROM ar_receivable_applications

4882: l_unpurgeable_applications NUMBER;
4883: BEGIN
4884: SELECT COUNT(*)
4885: INTO l_unpurgeable_applications
4886: FROM ar_receivable_applications
4887: WHERE cash_receipt_id = p_entity_id
4888: AND
4889: (
4890: posting_control_id = -3 OR

Line 5075: FROM ar_receivable_applications

5071: NVL(acctd_unearned_discount_taken,0),
5072: NVL(acctd_amount_applied_from,0) -
5073: NVL(acctd_amount_applied_to,0),
5074: gl_date
5075: FROM ar_receivable_applications
5076: WHERE cash_receipt_id = cp_cash_receipt_id
5077: AND status = 'APP'
5078: FOR UPDATE OF receivable_application_id NOWAIT ;
5079:

Line 5139: DELETE FROM ar_receivable_applications

5135: END IF ;
5136: */
5137:
5138: --
5139: DELETE FROM ar_receivable_applications
5140: WHERE cash_receipt_id = p_entity_id;
5141:
5142:
5143: --

Line 5161: FROM ar_receivable_applications

5157: CLOSE app_from_receipt;
5158: --
5159: DELETE FROM ar_distributions
5160: WHERE source_id in ( SELECT receivable_application_id
5161: FROM ar_receivable_applications
5162: WHERE cash_receipt_id = p_entity_id
5163: AND status <> 'APP' )
5164:
5165: AND source_table = 'RA' ;

Line 5179: FROM ar_receivable_applications

5175: -- invoice.
5176: --
5177: BEGIN
5178: FOR I in ( SELECT receivable_application_id
5179: FROM ar_receivable_applications
5180: WHERE cash_receipt_id = p_entity_id
5181: AND status <> 'APP'
5182: FOR UPDATE OF receivable_application_id NOWAIT )
5183: LOOP

Line 5184: DELETE FROM ar_receivable_applications

5180: WHERE cash_receipt_id = p_entity_id
5181: AND status <> 'APP'
5182: FOR UPDATE OF receivable_application_id NOWAIT )
5183: LOOP
5184: DELETE FROM ar_receivable_applications
5185: WHERE receivable_application_id =
5186: I.receivable_application_id;
5187:
5188: /*---------------------------------+

Line 5195: p_table_name => 'AR_RECEIVABLE_APPLICATIONS',

5191: +---------------------------------*/
5192:
5193: /* ar_mrc_engine.maintain_mrc_data(
5194: p_event_mode => 'DELETE',
5195: p_table_name => 'AR_RECEIVABLE_APPLICATIONS',
5196: p_mode => 'SINGLE',
5197: p_key_value => I.receivable_application_id);*/
5198:
5199: --

Line 5261: not exists (select 'x' from ar_receivable_applications RA

5257: NVL(cp_customer_id, 0 ) = DECODE(cp_customer_id,NULL,0,CR.PAY_FROM_CUSTOMER) AND
5258: CRH.GL_POSTED_DATE <=cp_as_of_gl_date AND
5259: CRH.POSTING_CONTROL_ID <> -3 AND
5260: CR.CASH_RECEIPT_ID > cp_max_recpt_id AND
5261: not exists (select 'x' from ar_receivable_applications RA
5262: where RA.CASH_RECEIPT_ID=CR.CASH_RECEIPT_ID AND
5263: RA.GL_POSTED_DATE > cp_as_of_gl_date AND
5264: RA.POSTING_CONTROL_ID <> -3 )
5265: ORDER BY CR.CASH_RECEIPT_ID ;

Line 5304: from ar_receivable_applications

5300: l_rcpt_id :=l_rec_table(l_rec_rows);
5301: l_rec_table.DELETE(l_rec_rows);
5302: print(0,'Cash_receipt_id:'||l_rcpt_id||' p_worker_number:'||p_worker_number);
5303: select count(*) into ra_total_count
5304: from ar_receivable_applications
5305: where CASH_RECEIPT_ID=l_rcpt_id;
5306:
5307: select count(*) into ra_posted_count
5308: from ar_receivable_applications

Line 5308: from ar_receivable_applications

5304: from ar_receivable_applications
5305: where CASH_RECEIPT_ID=l_rcpt_id;
5306:
5307: select count(*) into ra_posted_count
5308: from ar_receivable_applications
5309: where CASH_RECEIPT_ID=l_rcpt_id AND
5310: gl_posted_date <= p_as_of_gl_date;
5311:
5312: IF ra_total_count <> ra_posted_count THEN

Line 5348: SELECT 'X' FROM ar_receivable_applications

5344: AND source_table = 'CRH'
5345: FOR UPDATE OF SOURCE_ID NOWAIT;
5346:
5347: CURSOR c_ra( cr_id number) IS
5348: SELECT 'X' FROM ar_receivable_applications
5349: WHERE cash_receipt_id = cr_id
5350: FOR UPDATE OF cash_receipt_id NOWAIT;
5351: CURSOR c_ap( cr_id number) IS
5352: SELECT 'X' FROM ar_payment_schedules

Line 5398: DELETE FROM ar_receivable_applications

5394: arp_cr_history_pkg.delete_p_cr(l_rcpt_id);
5395:
5396: ARP_CASH_RECEIPTS_PKG.DELETE_P(l_rcpt_id);
5397:
5398: DELETE FROM ar_receivable_applications
5399: WHERE cash_receipt_id = l_rcpt_id;
5400:
5401: /*---------------------------------+
5402: | Calling central MRC library |

Line 5408: p_table_name => 'AR_RECEIVABLE_APPLICATIONS',

5404: +---------------------------------*/
5405: -- Commented as a fix to bug - 13653152
5406: /*ar_mrc_engine.maintain_mrc_data(
5407: p_event_mode => 'DELETE',
5408: p_table_name => 'AR_RECEIVABLE_APPLICATIONS',
5409: p_mode => 'BATCH',
5410: p_key_value_list => r_rec_app_key_value_list);*/
5411:
5412: