DBA Data[Home] [Help]

APPS.AR_CALC_LATE_CHARGE dependencies on AR_INTEREST_BATCHES

Line 1286: ar_interest_batches bat

1282: /* Make sure that this customer, site and currency combination is not
1283: part of a failed final batch */
1284: WHERE not exists (select ''exists failed batch''
1285: from ar_interest_headers hdr,
1286: ar_interest_batches bat
1287: where hdr.customer_id = a.customer_id
1288: and hdr.customer_site_use_id = a.customer_site_use_id
1289: and hdr.currency_code = a.currency_code
1290: and hdr.org_id = a.org_id

Line 2347: ar_interest_batches bat

2343: /* Make sure that this payment schedule is not part of a failed final batch */
2344: and not exists (select payment_schedule_id
2345: from ar_interest_lines lines,
2346: ar_interest_headers hdrs,
2347: ar_interest_batches bat
2348: where lines.payment_schedule_id = c.payment_schedule_id
2349: and lines.interest_header_id = hdrs.interest_header_id
2350: and hdrs.interest_batch_id = bat.interest_batch_id
2351: and bat.batch_status ='F'

Line 3215: ar_interest_batches bat

3211: /* Make sure that this payment schedule is not part of a failed final batch */
3212: and not exists (select payment_schedule_id
3213: from ar_interest_lines lines,
3214: ar_interest_headers hdrs,
3215: ar_interest_batches bat
3216: where lines.payment_schedule_id = b.payment_schedule_id
3217: and lines.interest_header_id = hdrs.interest_header_id
3218: and hdrs.interest_batch_id = bat.interest_batch_id
3219: and bat.batch_status ='F'

Line 3693: ar_interest_batches bat

3689: /* Make sure that this payment schedule is not part of a failed final batch */
3690: and not exists (select payment_schedule_id
3691: from ar_interest_lines lines,
3692: ar_interest_headers hdrs,
3693: ar_interest_batches bat
3694: where lines.payment_schedule_id = a.payment_schedule_id
3695: and lines.interest_header_id = hdrs.interest_header_id
3696: and hdrs.interest_batch_id = bat.interest_batch_id
3697: and bat.batch_status ='F'

Line 4456: ar_interest_batches bat

4452: /* Make sure that this customer, site and currency combination is not
4453: part of a failed final batch */
4454: where not exists (select 'exists failed batch'
4455: from ar_interest_headers hdr,
4456: ar_interest_batches bat
4457: where hdr.customer_id = b.customer_id
4458: and hdr.customer_site_use_id = b.site_use_id
4459: and hdr.currency_code = b.currency_code
4460: and hdr.interest_batch_id = bat.interest_batch_id

Line 5063: from ar_interest_batches batch,

5059: /* delete lines first */
5060:
5061: delete from ar_interest_lines
5062: where interest_header_id in (select hdr.interest_header_id
5063: from ar_interest_batches batch,
5064: ar_interest_headers hdr
5065: where batch.batch_status = 'D'
5066: and batch.interest_batch_id = hdr.interest_batch_id
5067: and mod(nvl(hdr.customer_site_use_id,0),p_total_workers) =

Line 5110: l_batch_name ar_interest_batches.batch_name%type;

5106: p_gl_date IN DATE,
5107: p_request_id IN NUMBER) IS
5108:
5109: l_operating_unit_id number;
5110: l_batch_name ar_interest_batches.batch_name%type;
5111: l_fin_charge_date date;
5112: l_batch_status varchar2(1);
5113: l_gl_date date;
5114: l_srs_request_id number;

Line 5140: insert into ar_interest_batches

5136: debug( 'Batch Name Derived : '||l_batch_name);
5137: END IF;
5138: END IF;
5139:
5140: insert into ar_interest_batches
5141: ( interest_batch_id,
5142: batch_name,
5143: calculate_interest_to_date,
5144: batch_status,

Line 5155: (select ar_interest_batches_s.nextval,

5151: transferred_status,
5152: request_id,
5153: org_id,
5154: object_version_number)
5155: (select ar_interest_batches_s.nextval,
5156: l_batch_name||' '||ar_interest_batches_s2.nextval
5157: ||' '||to_char(l_fin_charge_date,'DD-Mon-YYYY'),
5158: l_fin_charge_date,
5159: l_batch_status,

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

5152: request_id,
5153: org_id,
5154: object_version_number)
5155: (select ar_interest_batches_s.nextval,
5156: l_batch_name||' '||ar_interest_batches_s2.nextval
5157: ||' '||to_char(l_fin_charge_date,'DD-Mon-YYYY'),
5158: l_fin_charge_date,
5159: l_batch_status,
5160: l_gl_date,

Line 5342: ar_interest_batches bat,

5338: trx.late_charge_type,
5339: trx.org_id,
5340: trx.display_flag) hdr,
5341: ar_lc_cust_sites_t cust_site,
5342: ar_interest_batches bat,
5343: ar_system_parameters sysparam
5344: where hdr.customer_id = cust_site.customer_id
5345: and hdr.customer_site_use_id = cust_site.customer_site_use_id
5346: and hdr.currency_code = cust_site.currency_code

Line 5890: delete from ar_interest_batches bat

5886: IF l_debug_flag = 'Y' THEN
5887: debug('ar_calc_late_charge.delete_empty_batches()+');
5888: END IF;
5889:
5890: delete from ar_interest_batches bat
5891: where not exists (select interest_header_id
5892: from ar_interest_headers hdr
5893: where bat.interest_batch_id = hdr.interest_batch_id)
5894: and ( request_id = l_request_id

Line 5911: from ar_interest_batches

5907: PROCEDURE lock_batches IS
5908:
5909: CURSOR c_lock IS
5910: select interest_batch_id, batch_name, transferred_status
5911: from ar_interest_batches
5912: where request_id = l_request_id
5913: for update of transferred_status nowait;
5914:
5915: TYPE l_int_batch_rec_type IS RECORD(

Line 6651: from ar_interest_batches

6647:
6648: /*
6649: select count(*)
6650: into l_num_batches
6651: from ar_interest_batches
6652: where request_id = l_request_id;
6653: debug('Number of batches found in ar_interest_batches for this request : '||l_num_batches);
6654: */
6655:

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

6649: select count(*)
6650: into l_num_batches
6651: from ar_interest_batches
6652: where request_id = l_request_id;
6653: debug('Number of batches found in ar_interest_batches for this request : '||l_num_batches);
6654: */
6655:
6656: /* Check if late_charge calculation is enabled in system options */
6657: IF l_org_id IS NOT NULL THEN

Line 6748: ar_interest_batches, ar_interest_headers and ar_interest_lines */

6744: p_total_workers => l_total_workers);
6745: /* Enhacement 6469663*/
6746: update_interest_amt('PENALTY');
6747: /* If there are records in ar_late_charge_trx_t, insert data into the preview tables
6748: ar_interest_batches, ar_interest_headers and ar_interest_lines */
6749:
6750: select count(*)
6751: into l_count_int_lines
6752: from ar_late_charge_trx_t;

Line 6859: l_batch_name ar_interest_batches.batch_name%type;

6855: p_total_workers IN VARCHAR2) IS
6856: l_worker_number NUMBER ;
6857: l_req_id NUMBER;
6858: l_rep_req_id NUMBER := 0;
6859: l_batch_name ar_interest_batches.batch_name%type;
6860: l_customer_name_from hz_parties.party_name%TYPE;
6861: l_customer_name_to hz_parties.party_name%TYPE;
6862: l_late_charge_batch VARCHAR2(100);
6863: l_fin_charge_date DATE;

Line 7013: from ar_interest_batches

7009: lock_batches;
7010:
7011: select count(*)
7012: into l_num_batches
7013: from ar_interest_batches
7014: where request_id = l_request_id;
7015:
7016: debug('Number of batches created = '||l_num_batches);
7017:

Line 7077: update ar_interest_batches bat

7073: records corresponding to a given batch is S
7074: b) Else the transferred_status should be E */
7075:
7076: IF p_mode = 'F' THEN
7077: update ar_interest_batches bat
7078: set bat.transferred_status = 'S'
7079: where not exists (select hdr.interest_header_id
7080: from ar_interest_headers hdr
7081: where bat.interest_batch_id = hdr.interest_batch_id

Line 7085: update ar_interest_batches bat

7081: where bat.interest_batch_id = hdr.interest_batch_id
7082: and hdr.process_status <> 'S')
7083: and bat.request_id = l_request_id;
7084:
7085: update ar_interest_batches bat
7086: set bat.transferred_status = 'E'
7087: where exists (select hdr.interest_header_id
7088: from ar_interest_headers hdr
7089: where bat.interest_batch_id = hdr.interest_batch_id