DBA Data[Home] [Help]

APPS.AR_CALC_LATE_CHARGE dependencies on AR_INTEREST_BATCHES

Line 1677: ar_interest_batches bat

1673: /* Make sure that this customer, site and currency combination is not
1674: part of a failed final batch */
1675: WHERE not exists (select ''exists failed batch''
1676: from ar_interest_headers hdr,
1677: ar_interest_batches bat
1678: where hdr.customer_id = a.customer_id
1679: and hdr.customer_site_use_id = a.customer_site_use_id
1680: and hdr.currency_code = a.currency_code
1681: and hdr.org_id = a.org_id

Line 2746: ar_interest_batches bat

2742: /* Make sure that this payment schedule is not part of a failed final batch */
2743: and not exists (select payment_schedule_id
2744: from ar_interest_lines lines,
2745: ar_interest_headers hdrs,
2746: ar_interest_batches bat
2747: where lines.payment_schedule_id = c.payment_schedule_id
2748: and lines.interest_header_id = hdrs.interest_header_id
2749: and hdrs.interest_batch_id = bat.interest_batch_id
2750: and bat.batch_status ='F'

Line 3618: ar_interest_batches bat

3614: /* Make sure that this payment schedule is not part of a failed final batch */
3615: and not exists (select payment_schedule_id
3616: from ar_interest_lines lines,
3617: ar_interest_headers hdrs,
3618: ar_interest_batches bat
3619: where lines.payment_schedule_id = b.payment_schedule_id
3620: and lines.interest_header_id = hdrs.interest_header_id
3621: and hdrs.interest_batch_id = bat.interest_batch_id
3622: and bat.batch_status ='F'

Line 4107: ar_interest_batches bat

4103: /* Make sure that this payment schedule is not part of a failed final batch */
4104: and not exists (select payment_schedule_id
4105: from ar_interest_lines lines,
4106: ar_interest_headers hdrs,
4107: ar_interest_batches bat
4108: where lines.payment_schedule_id = a.payment_schedule_id
4109: and lines.interest_header_id = hdrs.interest_header_id
4110: and hdrs.interest_batch_id = bat.interest_batch_id
4111: and bat.batch_status ='F'

Line 4871: ar_interest_batches bat

4867: /* Make sure that this customer, site and currency combination is not
4868: part of a failed final batch */
4869: where not exists (select 'exists failed batch'
4870: from ar_interest_headers hdr,
4871: ar_interest_batches bat
4872: where hdr.customer_id = b.customer_id
4873: and hdr.customer_site_use_id = b.site_use_id
4874: and hdr.currency_code = b.currency_code
4875: and hdr.interest_batch_id = bat.interest_batch_id

Line 5556: from ar_interest_batches batch,

5552: /* delete lines first */
5553:
5554: delete from ar_interest_lines
5555: where interest_header_id in (select hdr.interest_header_id
5556: from ar_interest_batches batch,
5557: ar_interest_headers hdr
5558: where batch.batch_status = 'D'
5559: and batch.interest_batch_id = hdr.interest_batch_id
5560: and mod(nvl(hdr.customer_site_use_id,0),p_total_workers) =

Line 5603: l_batch_name ar_interest_batches.batch_name%type;

5599: p_gl_date IN DATE,
5600: p_request_id IN NUMBER) IS
5601:
5602: l_operating_unit_id number;
5603: l_batch_name ar_interest_batches.batch_name%type;
5604: l_fin_charge_date date;
5605: l_batch_status varchar2(1);
5606: l_gl_date date;
5607: l_srs_request_id number;

Line 5633: insert into ar_interest_batches

5629: debug( 'Batch Name Derived : '||l_batch_name);
5630: END IF;
5631: END IF;
5632:
5633: insert into ar_interest_batches
5634: ( interest_batch_id,
5635: batch_name,
5636: calculate_interest_to_date,
5637: batch_status,

Line 5648: (select ar_interest_batches_s.nextval,

5644: transferred_status,
5645: request_id,
5646: org_id,
5647: object_version_number)
5648: (select ar_interest_batches_s.nextval,
5649: l_batch_name||' '||ar_interest_batches_s2.nextval
5650: ||' '||to_char(l_fin_charge_date,'DD-Mon-YYYY'),
5651: l_fin_charge_date,
5652: l_batch_status,

Line 5649: l_batch_name||' '||ar_interest_batches_s2.nextval

5645: request_id,
5646: org_id,
5647: object_version_number)
5648: (select ar_interest_batches_s.nextval,
5649: l_batch_name||' '||ar_interest_batches_s2.nextval
5650: ||' '||to_char(l_fin_charge_date,'DD-Mon-YYYY'),
5651: l_fin_charge_date,
5652: l_batch_status,
5653: l_gl_date,

Line 5837: ar_interest_batches bat,

5833: trx.late_charge_type,
5834: trx.org_id,
5835: trx.display_flag) hdr,
5836: ar_lc_cust_sites_t cust_site,
5837: ar_interest_batches bat,
5838: ar_system_parameters sysparam
5839: where hdr.customer_id = cust_site.customer_id
5840: and hdr.customer_site_use_id = cust_site.customer_site_use_id
5841: and hdr.currency_code = cust_site.currency_code

Line 6396: delete from ar_interest_batches bat

6392: IF l_debug_flag = 'Y' THEN
6393: debug('ar_calc_late_charge.delete_empty_batches()+');
6394: END IF;
6395:
6396: delete from ar_interest_batches bat
6397: where not exists (select interest_header_id
6398: from ar_interest_headers hdr
6399: where bat.interest_batch_id = hdr.interest_batch_id)
6400: and ( request_id = l_request_id

Line 6417: from ar_interest_batches

6413: PROCEDURE lock_batches IS
6414:
6415: CURSOR c_lock IS
6416: select interest_batch_id, batch_name, transferred_status
6417: from ar_interest_batches
6418: where request_id = l_request_id
6419: for update of transferred_status nowait;
6420:
6421: TYPE l_int_batch_rec_type IS RECORD(

Line 7158: from ar_interest_batches

7154:
7155: /*
7156: select count(*)
7157: into l_num_batches
7158: from ar_interest_batches
7159: where request_id = l_request_id;
7160: debug('Number of batches found in ar_interest_batches for this request : '||l_num_batches);
7161: */
7162:

Line 7160: debug('Number of batches found in ar_interest_batches for this request : '||l_num_batches);

7156: select count(*)
7157: into l_num_batches
7158: from ar_interest_batches
7159: where request_id = l_request_id;
7160: debug('Number of batches found in ar_interest_batches for this request : '||l_num_batches);
7161: */
7162:
7163: /* Check if late_charge calculation is enabled in system options */
7164: IF l_org_id IS NOT NULL THEN

Line 7260: ar_interest_batches, ar_interest_headers and ar_interest_lines */

7256: p_total_workers => l_total_workers);
7257: /* Enhacement 6469663*/
7258: update_interest_amt('PENALTY');
7259: /* If there are records in ar_late_charge_trx_t, insert data into the preview tables
7260: ar_interest_batches, ar_interest_headers and ar_interest_lines */
7261:
7262: select count(*)
7263: into l_count_int_lines
7264: from ar_late_charge_trx_t;

Line 7379: l_batch_name ar_interest_batches.batch_name%type;

7375: p_total_workers IN VARCHAR2) IS
7376: l_worker_number NUMBER ;
7377: l_req_id NUMBER;
7378: l_rep_req_id NUMBER := 0;
7379: l_batch_name ar_interest_batches.batch_name%type;
7380: l_customer_name_from hz_parties.party_name%TYPE;
7381: l_customer_name_to hz_parties.party_name%TYPE;
7382: l_late_charge_batch VARCHAR2(100);
7383: l_fin_charge_date DATE;

Line 7533: from ar_interest_batches

7529: lock_batches;
7530:
7531: select count(*)
7532: into l_num_batches
7533: from ar_interest_batches
7534: where request_id = l_request_id;
7535:
7536: debug('Number of batches created = '||l_num_batches);
7537:

Line 7597: update ar_interest_batches bat

7593: records corresponding to a given batch is S
7594: b) Else the transferred_status should be E */
7595:
7596: IF p_mode = 'F' THEN
7597: update ar_interest_batches bat
7598: set bat.transferred_status = 'S'
7599: where not exists (select hdr.interest_header_id
7600: from ar_interest_headers hdr
7601: where bat.interest_batch_id = hdr.interest_batch_id

Line 7605: update ar_interest_batches bat

7601: where bat.interest_batch_id = hdr.interest_batch_id
7602: and hdr.process_status <> 'S')
7603: and bat.request_id = l_request_id;
7604:
7605: update ar_interest_batches bat
7606: set bat.transferred_status = 'E'
7607: where exists (select hdr.interest_header_id
7608: from ar_interest_headers hdr
7609: where bat.interest_batch_id = hdr.interest_batch_id