DBA Data[Home] [Help]

APPS.AR_LATE_CHARGE_PKG dependencies on AR_INTEREST_HEADERS

Line 894: UPDATE ar_interest_headers

890: WHERE interest_header_id = l_header_upg(i)
891: AND interest_batch_id = g_interest_batch_id;
892:
893: FORALL i IN l_header_upg.FIRST..l_header_upg.LAST
894: UPDATE ar_interest_headers
895: SET process_status = 'E',
896: process_message = l_header_text(i)
897: WHERE interest_header_id = l_header_upg(i)
898: AND interest_batch_id = g_interest_batch_id;

Line 997: x_msg_data := 'Error are set back in the ar_interest_headers and lines table,

993: iv_create_flag := 'N';
994:
995:
996: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
997: x_msg_data := 'Error are set back in the ar_interest_headers and lines table,
998: please retrieve from table with the interest_batch_id:'||g_interest_batch_id;
999: END IF;
1000:
1001: --

Line 1154: FROM ar_interest_headers h,

1150: l.LAST_CHARGE_DATE ,
1151: l.INTEREST_RATE ,
1152: tty.GL_ID_REV,
1153: p_worker_num
1154: FROM ar_interest_headers h,
1155: ar_interest_lines l,
1156: ar_system_parameters sp,
1157: ra_cust_trx_types tty
1158: WHERE h.interest_batch_id = g_interest_batch_id

Line 1506: log( message => ' update ar_interest_headers for successfull headers');

1502: END IF;
1503:
1504: END IF;
1505:
1506: log( message => ' update ar_interest_headers for successfull headers');
1507:
1508: UPDATE ar_interest_headers SET
1509: process_status = 'S',
1510: process_message = NULL

Line 1508: UPDATE ar_interest_headers SET

1504: END IF;
1505:
1506: log( message => ' update ar_interest_headers for successfull headers');
1507:
1508: UPDATE ar_interest_headers SET
1509: process_status = 'S',
1510: process_message = NULL
1511: WHERE interest_batch_id = g_interest_batch_id
1512: AND process_status = 'N'

Line 1524: log( message => ' update ar_interest_headers for error headers');

1520: AND NVL(p_worker_num,-9)= NVL(worker_num,-9)
1521: AND header_type IN ('INV','DM')
1522: GROUP BY interest_header_id);
1523:
1524: log( message => ' update ar_interest_headers for error headers');
1525: UPDATE ar_interest_headers SET
1526: process_status = 'E'
1527: WHERE interest_batch_id = g_interest_batch_id
1528: AND process_status = 'N'

Line 1525: UPDATE ar_interest_headers SET

1521: AND header_type IN ('INV','DM')
1522: GROUP BY interest_header_id);
1523:
1524: log( message => ' update ar_interest_headers for error headers');
1525: UPDATE ar_interest_headers SET
1526: process_status = 'E'
1527: WHERE interest_batch_id = g_interest_batch_id
1528: AND process_status = 'N'
1529: AND display_flag = 'Y' --HYU CDI only document generating the Late Charge s Doc

Line 1539: FROM ar_interest_headers h,

1535: UPDATE ar_payment_schedules
1536: SET last_charge_date = g_int_cal_date
1537: WHERE payment_schedule_id IN
1538: (SELECT l.PAYMENT_SCHEDULE_ID
1539: FROM ar_interest_headers h,
1540: ar_interest_lines l
1541: WHERE h.interest_batch_id = g_interest_batch_id
1542: AND h.process_status = 'S'
1543: AND h.display_flag = 'Y' --HYU CDI only document generating the Late Charge s Doc

Line 1632: ar_interest_headers h,

1628: 'I',
1629: header_type,
1630: p_worker_num
1631: FROM ar_interest_lines l,
1632: ar_interest_headers h,
1633: ar_interest_batches b,
1634: ar_receivables_trx rtrx,
1635: ar_payment_schedules psch
1636: WHERE b.interest_batch_id = g_interest_batch_id

Line 1939: log( message => 'Updating ar_interest_headers for adjustment in Error');

1935: END LOOP;
1936: CLOSE cadj;
1937:
1938:
1939: log( message => 'Updating ar_interest_headers for adjustment in Error');
1940:
1941: UPDATE ar_interest_headers a
1942: SET a.process_status = 'E'
1943: WHERE a.interest_batch_id = g_interest_batch_id

Line 1941: UPDATE ar_interest_headers a

1937:
1938:
1939: log( message => 'Updating ar_interest_headers for adjustment in Error');
1940:
1941: UPDATE ar_interest_headers a
1942: SET a.process_status = 'E'
1943: WHERE a.interest_batch_id = g_interest_batch_id
1944: AND DECODE(p_worker_num,NULL,NVL(a.worker_num,-9),p_worker_num)=NVL(a.worker_num,-9)
1945: AND a.header_type = 'ADJ'

Line 1953: log( message => 'Updating ar_interest_headers for adjustment in Success');

1949: FROM ar_interest_lines b
1950: WHERE b.interest_header_id = a.interest_header_id
1951: AND b.process_status = 'E');
1952:
1953: log( message => 'Updating ar_interest_headers for adjustment in Success');
1954: UPDATE ar_interest_headers a
1955: SET a.process_status = 'S',
1956: a.process_message= NULL
1957: WHERE a.interest_batch_id = g_interest_batch_id

Line 1954: UPDATE ar_interest_headers a

1950: WHERE b.interest_header_id = a.interest_header_id
1951: AND b.process_status = 'E');
1952:
1953: log( message => 'Updating ar_interest_headers for adjustment in Success');
1954: UPDATE ar_interest_headers a
1955: SET a.process_status = 'S',
1956: a.process_message= NULL
1957: WHERE a.interest_batch_id = g_interest_batch_id
1958: AND a.header_type = 'ADJ'

Line 1970: FROM ar_interest_headers h

1966: UPDATE hz_cust_site_uses
1967: SET LAST_ACCRUE_CHARGE_DATE = s_cal_int_date
1968: WHERE SITE_USE_ID IN
1969: (SELECT DISTINCT customer_site_use_id
1970: FROM ar_interest_headers h
1971: WHERE h.process_status = 'S'
1972: AND h.interest_batch_id = g_interest_batch_id
1973: AND h.header_type = 'ADJ'
1974: AND h.display_flag = 'Y' --HYU CDI only document generating the Late Charge s Doc

Line 2149: FROM ar_interest_headers

2145: x_msg_data VARCHAR2(2000);
2146:
2147: CURSOR c_err IS
2148: SELECT NULL
2149: FROM ar_interest_headers
2150: WHERE interest_batch_id = g_interest_batch_id
2151: AND process_status = 'E'
2152: AND display_flag = 'Y' --HYU CDI only document generating the Late Charge s Doc
2153: AND header_type IN ('INV','DM');

Line 2158: FROM ar_interest_headers

2154: l_err_found VARCHAR2(1);
2155:
2156: CURSOR c_one_doc_success IS
2157: SELECT NULL
2158: FROM ar_interest_headers
2159: WHERE interest_batch_id = g_interest_batch_id
2160: AND process_status = 'S'
2161: AND display_flag = 'Y'; -- Document generating a Late Charges Document
2162:

Line 2170: UPDATE ar_interest_headers a

2166: log('create_late_charge +');
2167:
2168: DELETE FROM ar_late_charge_doc_gt;
2169:
2170: UPDATE ar_interest_headers a
2171: SET a.process_message = ''
2172: WHERE a.interest_batch_id = p_batch_id
2173: AND a.display_flag = 'Y'; --HYU CDI only document generating the Late Charge s Doc
2174:

Line 2179: FROM ar_interest_headers

2175: UPDATE ar_interest_lines a
2176: SET a.process_message = ''
2177: WHERE a.interest_header_id IN
2178: (SELECT interest_header_id
2179: FROM ar_interest_headers
2180: WHERE interest_batch_id = p_batch_id
2181: AND display_flag = 'Y'); --HYU CDI only document generating the Late Charge s Doc
2182:
2183:

Line 2210: please verify the data in ar_interest_headers and lines tables with the batch_id :'||g_interest_batch_id;

2206:
2207: IF x_return_status <> fnd_api.g_ret_sts_success THEN
2208: retcode := 1;
2209: errbuf := 'Some Charge Adjustments have failed,
2210: please verify the data in ar_interest_headers and lines tables with the batch_id :'||g_interest_batch_id;
2211: log(errbuf);
2212: END IF;
2213:
2214: x_return_status := fnd_api.g_ret_sts_success;

Line 2231: please verify the data in ar_interest_headers and lines tables with the batch_id :'||g_interest_batch_id;

2227:
2228: IF x_return_status <> fnd_api.g_ret_sts_success THEN
2229: retcode := 1;
2230: errbuf := 'Some Charge invoice, debit memo have failed
2231: please verify the data in ar_interest_headers and lines tables with the batch_id :'||g_interest_batch_id;
2232: log(errbuf);
2233: ELSE
2234: OPEN c_err;
2235: FETCH c_err INTO l_err_found;

Line 2239: please verify the data in ar_interest_headers and lines tables with the batch_id :'||g_interest_batch_id;

2235: FETCH c_err INTO l_err_found;
2236: IF c_err%FOUND THEN
2237: retcode := 1;
2238: errbuf := 'Some Charge invoice, debit memo have failed
2239: please verify the data in ar_interest_headers and lines tables with the batch_id :'||g_interest_batch_id;
2240: log(errbuf);
2241: END IF;
2242: CLOSE c_err;
2243:

Line 2253: FROM ar_interest_headers h,

2249: UPDATE ar_payment_schedules
2250: SET last_charge_date = g_int_cal_date
2251: WHERE payment_schedule_id IN
2252: (SELECT l.PAYMENT_SCHEDULE_ID
2253: FROM ar_interest_headers h,
2254: ar_interest_lines l
2255: WHERE h.interest_batch_id = g_interest_batch_id
2256: AND h.display_flag = 'N' -- Document included in Late Charges Calculation
2257: AND h.process_status = 'N'

Line 2260: UPDATE ar_interest_headers

2256: AND h.display_flag = 'N' -- Document included in Late Charges Calculation
2257: AND h.process_status = 'N'
2258: AND h.interest_header_id = l.interest_header_id);
2259:
2260: UPDATE ar_interest_headers
2261: SET process_status = 'S'
2262: WHERE interest_batch_id = g_interest_batch_id
2263: AND display_flag = 'N' -- Document included in Late Charges Calculation
2264: AND process_status = 'N';

Line 2490: FROM ar_interest_headers

2486: l_GL_DATE DATE;
2487:
2488: CURSOR c_site IS
2489: SELECT DISTINCT customer_site_use_id
2490: FROM ar_interest_headers
2491: WHERE interest_batch_id = g_interest_batch_id
2492: AND process_status = 'N';
2493:
2494: CURSOR c_batch_source IS

Line 2501: FROM ar_interest_headers

2497: WHERE BATCH_SOURCE_ID = p_batch_source_id;
2498:
2499: CURSOR c_err IS
2500: SELECT NULL
2501: FROM ar_interest_headers
2502: WHERE interest_batch_id = g_interest_batch_id;
2503:
2504: l_err VARCHAR2(1);
2505: l_test VARCHAR2(1);

Line 2755: FROM ar_interest_headers

2751: x_msg_count NUMBER;
2752: x_msg_data VARCHAR2(2000);
2753: CURSOR c_err IS
2754: SELECT NULL
2755: FROM ar_interest_headers
2756: WHERE interest_batch_id = g_interest_batch_id
2757: AND process_status = 'E'
2758: AND display_flag = 'Y' -- Document generating a Late Charges Document
2759: AND p_worker_num = worker_num

Line 2764: FROM ar_interest_headers

2760: AND header_type IN ('INV','DM');
2761:
2762: CURSOR c_one_doc_success IS
2763: SELECT 'Y'
2764: FROM ar_interest_headers
2765: WHERE interest_batch_id = g_interest_batch_id
2766: AND process_status = 'S'
2767: AND display_flag = 'Y' -- Document generating a Late Charges Document
2768: AND p_worker_num = worker_num;

Line 2772: FROM ar_interest_headers

2768: AND p_worker_num = worker_num;
2769:
2770: CURSOR c_dm_exist IS
2771: SELECT 'Y'
2772: FROM ar_interest_headers
2773: WHERE interest_batch_id = g_interest_batch_id
2774: AND process_status = 'N'
2775: AND display_flag = 'N'; -- Document included in the calculation without generating late charges
2776:

Line 2793: UPDATE ar_interest_headers a

2789:
2790:
2791: DELETE FROM ar_late_charge_doc_gt;
2792:
2793: UPDATE ar_interest_headers a
2794: SET a.process_message = ''
2795: WHERE a.interest_batch_id = p_batch_id
2796: AND a.worker_num = p_worker_num
2797: AND a.display_flag = 'Y'; -- Document generating a Late Charges Document

Line 2804: FROM ar_interest_headers

2800: UPDATE ar_interest_lines a
2801: SET a.process_message = ''
2802: WHERE a.interest_header_id IN
2803: (SELECT interest_header_id
2804: FROM ar_interest_headers
2805: WHERE interest_batch_id = p_batch_id
2806: AND display_flag = 'Y' -- Document generating a Late Charges Document
2807: AND worker_num = p_worker_num);
2808:

Line 2828: please verify the data in ar_interest_headers and lines tables with the batch_id :'||g_interest_batch_id,1,239);

2824:
2825: IF x_return_status <> fnd_api.g_ret_sts_success THEN
2826: retcode := 1;
2827: errbuf := SUBSTRB('Some Charge Adjustments have failed,
2828: please verify the data in ar_interest_headers and lines tables with the batch_id :'||g_interest_batch_id,1,239);
2829: log(errbuf);
2830: END IF;
2831:
2832: x_return_status := fnd_api.g_ret_sts_success;

Line 2850: please verify the data in ar_interest_headers and lines tables with the batch_id :'||g_interest_batch_id,1,239);

2846:
2847: IF x_return_status <> fnd_api.g_ret_sts_success THEN
2848: retcode := 1;
2849: errbuf := SUBSTRB('Some Charge invoice, debit memo have failed
2850: please verify the data in ar_interest_headers and lines tables with the batch_id :'||g_interest_batch_id,1,239);
2851: log(errbuf);
2852: ELSE
2853: OPEN c_err;
2854: FETCH c_err INTO l_err_found;

Line 2858: please verify the data in ar_interest_headers and lines tables with the batch_id :'||g_interest_batch_id,1,239);

2854: FETCH c_err INTO l_err_found;
2855: IF c_err%FOUND THEN
2856: retcode := 1;
2857: errbuf := SUBSTRB('Some Charge invoice, debit memo have failed
2858: please verify the data in ar_interest_headers and lines tables with the batch_id :'||g_interest_batch_id,1,239);
2859: log(errbuf);
2860: END IF;
2861: CLOSE c_err;
2862:

Line 2890: FROM ar_interest_headers h,

2886: UPDATE ar_payment_schedules
2887: SET last_charge_date = g_int_cal_date
2888: WHERE payment_schedule_id IN
2889: (SELECT l.PAYMENT_SCHEDULE_ID
2890: FROM ar_interest_headers h,
2891: ar_interest_lines l
2892: WHERE h.interest_batch_id = g_interest_batch_id
2893: AND h.display_flag = 'N' -- Document included in Late Charges Calculation
2894: AND h.process_status = 'N'

Line 2897: UPDATE ar_interest_headers

2893: AND h.display_flag = 'N' -- Document included in Late Charges Calculation
2894: AND h.process_status = 'N'
2895: AND h.interest_header_id = l.interest_header_id);
2896:
2897: UPDATE ar_interest_headers
2898: SET process_status = 'S'
2899: WHERE interest_batch_id = g_interest_batch_id
2900: AND display_flag = 'N' -- Document included in Late Charges Calculation
2901: AND process_status = 'N';

Line 2953: ar_interest_headers_all h,

2949: b.calculate_interest_to_date,
2950: s.late_charge_batch_source_id,
2951: lg.currency_code
2952: FROM ar_interest_batches_all b,
2953: ar_interest_headers_all h,
2954: ar_system_parameters_all s,
2955: gl_ledgers lg
2956: WHERE b.request_id = p_request_id
2957: AND b.org_id = s.org_id

Line 2973: FROM ar_interest_headers_all

2969:
2970: --{Check if the interest batch has some INV or DM before requiring the batch_source_id
2971: CURSOR ht(p_request_id IN NUMBER, p_worker_num IN NUMBER) IS
2972: SELECT NULL
2973: FROM ar_interest_headers_all
2974: WHERE request_id = p_request_id
2975: AND worker_num = p_worker_num
2976: AND display_flag = 'Y' --HYU CDI only document generating the Late Charge s Doc
2977: AND header_type IN ('INV','DM');

Line 3118: FROM ar_interest_headers

3114: IS
3115: CURSOR c IS
3116: SELECT worker_num,
3117: COUNT(interest_header_id)
3118: FROM ar_interest_headers
3119: WHERE interest_batch_id = p_interest_batch_id
3120: AND process_status = 'N'
3121: AND display_flag = 'Y' --HYU CDI only document generating the Late Charge s Doc
3122: GROUP BY worker_num;

Line 3149: UPDATE ar_interest_headers

3145: IF x_return_status = fnd_api.g_ret_sts_success THEN
3146:
3147: log('updating worker_num');
3148: --{HYU CDI this update statement includes Credit Item
3149: UPDATE ar_interest_headers
3150: SET worker_num = mod(rownum, p_max_workers) + 1
3151: WHERE interest_batch_id = p_interest_batch_id
3152: AND process_status = 'N'
3153: AND display_flag = 'Y'; --HYU CDI only document generating the Late Charge s Doc

Line 3208: FROM ar_interest_headers

3204: l_GL_DATE DATE;
3205:
3206: CURSOR c_hdr IS
3207: SELECT interest_header_id
3208: FROM ar_interest_headers
3209: WHERE interest_batch_id = g_interest_batch_id
3210: AND process_status = 'N';
3211:
3212: l_ihid NUMBER;

Line 3222: FROM ar_interest_headers

3218: WHERE BATCH_SOURCE_ID = p_batch_source_id;
3219:
3220: CURSOR c_err IS
3221: SELECT NULL
3222: FROM ar_interest_headers
3223: WHERE interest_batch_id = g_interest_batch_id
3224: AND process_status <> 'S';
3225:
3226: l_err VARCHAR2(1);