DBA Data[Home] [Help]

APPS.AR_LATE_CHARGE_PKG dependencies on AR_INTEREST_HEADERS

Line 870: UPDATE ar_interest_headers

866: WHERE interest_header_id = l_header_upg(i)
867: AND interest_batch_id = g_interest_batch_id;
868:
869: FORALL i IN l_header_upg.FIRST..l_header_upg.LAST
870: UPDATE ar_interest_headers
871: SET process_status = 'E',
872: process_message = l_header_text(i)
873: WHERE interest_header_id = l_header_upg(i)
874: AND interest_batch_id = g_interest_batch_id;

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

969: iv_create_flag := 'N';
970:
971:
972: IF x_return_status <> FND_API.G_RET_STS_SUCCESS THEN
973: x_msg_data := 'Error are set back in the ar_interest_headers and lines table,
974: please retrieve from table with the interest_batch_id:'||g_interest_batch_id;
975: END IF;
976:
977: --

Line 1126: FROM ar_interest_headers h,

1122: l.LAST_CHARGE_DATE ,
1123: l.INTEREST_RATE ,
1124: tty.GL_ID_REV,
1125: p_worker_num
1126: FROM ar_interest_headers h,
1127: ar_interest_lines l,
1128: ar_system_parameters sp,
1129: ra_cust_trx_types tty
1130: WHERE h.interest_batch_id = g_interest_batch_id

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

1467: END IF;
1468:
1469: END IF;
1470:
1471: log( message => ' update ar_interest_headers for successfull headers');
1472:
1473: UPDATE ar_interest_headers SET
1474: process_status = 'S',
1475: process_message = NULL

Line 1473: UPDATE ar_interest_headers SET

1469: END IF;
1470:
1471: log( message => ' update ar_interest_headers for successfull headers');
1472:
1473: UPDATE ar_interest_headers SET
1474: process_status = 'S',
1475: process_message = NULL
1476: WHERE interest_batch_id = g_interest_batch_id
1477: AND process_status = 'N'

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

1485: AND NVL(p_worker_num,-9)= NVL(worker_num,-9)
1486: AND header_type IN ('INV','DM')
1487: GROUP BY interest_header_id);
1488:
1489: log( message => ' update ar_interest_headers for error headers');
1490: UPDATE ar_interest_headers SET
1491: process_status = 'E'
1492: WHERE interest_batch_id = g_interest_batch_id
1493: AND process_status = 'N'

Line 1490: UPDATE ar_interest_headers SET

1486: AND header_type IN ('INV','DM')
1487: GROUP BY interest_header_id);
1488:
1489: log( message => ' update ar_interest_headers for error headers');
1490: UPDATE ar_interest_headers SET
1491: process_status = 'E'
1492: WHERE interest_batch_id = g_interest_batch_id
1493: AND process_status = 'N'
1494: AND display_flag = 'Y' --HYU CDI only document generating the Late Charge s Doc

Line 1504: FROM ar_interest_headers h,

1500: UPDATE ar_payment_schedules
1501: SET last_charge_date = g_int_cal_date
1502: WHERE payment_schedule_id IN
1503: (SELECT l.PAYMENT_SCHEDULE_ID
1504: FROM ar_interest_headers h,
1505: ar_interest_lines l
1506: WHERE h.interest_batch_id = g_interest_batch_id
1507: AND h.process_status = 'S'
1508: AND h.display_flag = 'Y' --HYU CDI only document generating the Late Charge s Doc

Line 1592: ar_interest_headers h,

1588: 'I',
1589: header_type,
1590: p_worker_num
1591: FROM ar_interest_lines l,
1592: ar_interest_headers h,
1593: ar_interest_batches b,
1594: ar_receivables_trx rtrx,
1595: ar_payment_schedules psch
1596: WHERE b.interest_batch_id = g_interest_batch_id

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

1895: END LOOP;
1896: CLOSE cadj;
1897:
1898:
1899: log( message => 'Updating ar_interest_headers for adjustment in Error');
1900:
1901: UPDATE ar_interest_headers a
1902: SET a.process_status = 'E'
1903: WHERE a.interest_batch_id = g_interest_batch_id

Line 1901: UPDATE ar_interest_headers a

1897:
1898:
1899: log( message => 'Updating ar_interest_headers for adjustment in Error');
1900:
1901: UPDATE ar_interest_headers a
1902: SET a.process_status = 'E'
1903: WHERE a.interest_batch_id = g_interest_batch_id
1904: AND DECODE(p_worker_num,NULL,NVL(a.worker_num,-9),p_worker_num)=NVL(a.worker_num,-9)
1905: AND a.header_type = 'ADJ'

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

1909: FROM ar_interest_lines b
1910: WHERE b.interest_header_id = a.interest_header_id
1911: AND b.process_status = 'E');
1912:
1913: log( message => 'Updating ar_interest_headers for adjustment in Success');
1914: UPDATE ar_interest_headers a
1915: SET a.process_status = 'S',
1916: a.process_message= NULL
1917: WHERE a.interest_batch_id = g_interest_batch_id

Line 1914: UPDATE ar_interest_headers a

1910: WHERE b.interest_header_id = a.interest_header_id
1911: AND b.process_status = 'E');
1912:
1913: log( message => 'Updating ar_interest_headers for adjustment in Success');
1914: UPDATE ar_interest_headers a
1915: SET a.process_status = 'S',
1916: a.process_message= NULL
1917: WHERE a.interest_batch_id = g_interest_batch_id
1918: AND a.header_type = 'ADJ'

Line 1930: FROM ar_interest_headers h

1926: UPDATE hz_cust_site_uses
1927: SET LAST_ACCRUE_CHARGE_DATE = s_cal_int_date
1928: WHERE SITE_USE_ID IN
1929: (SELECT DISTINCT customer_site_use_id
1930: FROM ar_interest_headers h
1931: WHERE h.process_status = 'S'
1932: AND h.interest_batch_id = g_interest_batch_id
1933: AND h.header_type = 'ADJ'
1934: AND h.display_flag = 'Y' --HYU CDI only document generating the Late Charge s Doc

Line 2109: FROM ar_interest_headers

2105: x_msg_data VARCHAR2(2000);
2106:
2107: CURSOR c_err IS
2108: SELECT NULL
2109: FROM ar_interest_headers
2110: WHERE interest_batch_id = g_interest_batch_id
2111: AND process_status = 'E'
2112: AND display_flag = 'Y' --HYU CDI only document generating the Late Charge s Doc
2113: AND header_type IN ('INV','DM');

Line 2118: FROM ar_interest_headers

2114: l_err_found VARCHAR2(1);
2115:
2116: CURSOR c_one_doc_success IS
2117: SELECT NULL
2118: FROM ar_interest_headers
2119: WHERE interest_batch_id = g_interest_batch_id
2120: AND process_status = 'S'
2121: AND display_flag = 'Y'; -- Document generating a Late Charges Document
2122:

Line 2130: UPDATE ar_interest_headers a

2126: log('create_late_charge +');
2127:
2128: DELETE FROM ar_late_charge_doc_gt;
2129:
2130: UPDATE ar_interest_headers a
2131: SET a.process_message = ''
2132: WHERE a.interest_batch_id = p_batch_id
2133: AND a.display_flag = 'Y'; --HYU CDI only document generating the Late Charge s Doc
2134:

Line 2139: FROM ar_interest_headers

2135: UPDATE ar_interest_lines a
2136: SET a.process_message = ''
2137: WHERE a.interest_header_id IN
2138: (SELECT interest_header_id
2139: FROM ar_interest_headers
2140: WHERE interest_batch_id = p_batch_id
2141: AND display_flag = 'Y'); --HYU CDI only document generating the Late Charge s Doc
2142:
2143:

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

2166:
2167: IF x_return_status <> fnd_api.g_ret_sts_success THEN
2168: retcode := 1;
2169: errbuf := 'Some Charge Adjustments have failed,
2170: please verify the data in ar_interest_headers and lines tables with the batch_id :'||g_interest_batch_id;
2171: log(errbuf);
2172: END IF;
2173:
2174: x_return_status := fnd_api.g_ret_sts_success;

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

2187:
2188: IF x_return_status <> fnd_api.g_ret_sts_success THEN
2189: retcode := 1;
2190: errbuf := 'Some Charge invoice, debit memo have failed
2191: please verify the data in ar_interest_headers and lines tables with the batch_id :'||g_interest_batch_id;
2192: log(errbuf);
2193: ELSE
2194: OPEN c_err;
2195: FETCH c_err INTO l_err_found;

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

2195: FETCH c_err INTO l_err_found;
2196: IF c_err%FOUND THEN
2197: retcode := 1;
2198: errbuf := 'Some Charge invoice, debit memo have failed
2199: please verify the data in ar_interest_headers and lines tables with the batch_id :'||g_interest_batch_id;
2200: log(errbuf);
2201: END IF;
2202: CLOSE c_err;
2203:

Line 2213: FROM ar_interest_headers h,

2209: UPDATE ar_payment_schedules
2210: SET last_charge_date = g_int_cal_date
2211: WHERE payment_schedule_id IN
2212: (SELECT l.PAYMENT_SCHEDULE_ID
2213: FROM ar_interest_headers h,
2214: ar_interest_lines l
2215: WHERE h.interest_batch_id = g_interest_batch_id
2216: AND h.display_flag = 'N' -- Document included in Late Charges Calculation
2217: AND h.process_status = 'N'

Line 2220: UPDATE ar_interest_headers

2216: AND h.display_flag = 'N' -- Document included in Late Charges Calculation
2217: AND h.process_status = 'N'
2218: AND h.interest_header_id = l.interest_header_id);
2219:
2220: UPDATE ar_interest_headers
2221: SET process_status = 'S'
2222: WHERE interest_batch_id = g_interest_batch_id
2223: AND display_flag = 'N' -- Document included in Late Charges Calculation
2224: AND process_status = 'N';

Line 2450: FROM ar_interest_headers

2446: l_GL_DATE DATE;
2447:
2448: CURSOR c_site IS
2449: SELECT DISTINCT customer_site_use_id
2450: FROM ar_interest_headers
2451: WHERE interest_batch_id = g_interest_batch_id
2452: AND process_status = 'N';
2453:
2454: CURSOR c_batch_source IS

Line 2461: FROM ar_interest_headers

2457: WHERE BATCH_SOURCE_ID = p_batch_source_id;
2458:
2459: CURSOR c_err IS
2460: SELECT NULL
2461: FROM ar_interest_headers
2462: WHERE interest_batch_id = g_interest_batch_id;
2463:
2464: l_err VARCHAR2(1);
2465: l_test VARCHAR2(1);

Line 2715: FROM ar_interest_headers

2711: x_msg_count NUMBER;
2712: x_msg_data VARCHAR2(2000);
2713: CURSOR c_err IS
2714: SELECT NULL
2715: FROM ar_interest_headers
2716: WHERE interest_batch_id = g_interest_batch_id
2717: AND process_status = 'E'
2718: AND display_flag = 'Y' -- Document generating a Late Charges Document
2719: AND p_worker_num = worker_num

Line 2724: FROM ar_interest_headers

2720: AND header_type IN ('INV','DM');
2721:
2722: CURSOR c_one_doc_success IS
2723: SELECT 'Y'
2724: FROM ar_interest_headers
2725: WHERE interest_batch_id = g_interest_batch_id
2726: AND process_status = 'S'
2727: AND display_flag = 'Y' -- Document generating a Late Charges Document
2728: AND p_worker_num = worker_num;

Line 2732: FROM ar_interest_headers

2728: AND p_worker_num = worker_num;
2729:
2730: CURSOR c_dm_exist IS
2731: SELECT 'Y'
2732: FROM ar_interest_headers
2733: WHERE interest_batch_id = g_interest_batch_id
2734: AND process_status = 'N'
2735: AND display_flag = 'N'; -- Document included in the calculation without generating late charges
2736:

Line 2753: UPDATE ar_interest_headers a

2749:
2750:
2751: DELETE FROM ar_late_charge_doc_gt;
2752:
2753: UPDATE ar_interest_headers a
2754: SET a.process_message = ''
2755: WHERE a.interest_batch_id = p_batch_id
2756: AND a.worker_num = p_worker_num
2757: AND a.display_flag = 'Y'; -- Document generating a Late Charges Document

Line 2764: FROM ar_interest_headers

2760: UPDATE ar_interest_lines a
2761: SET a.process_message = ''
2762: WHERE a.interest_header_id IN
2763: (SELECT interest_header_id
2764: FROM ar_interest_headers
2765: WHERE interest_batch_id = p_batch_id
2766: AND display_flag = 'Y' -- Document generating a Late Charges Document
2767: AND worker_num = p_worker_num);
2768:

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

2784:
2785: IF x_return_status <> fnd_api.g_ret_sts_success THEN
2786: retcode := 1;
2787: errbuf := SUBSTRB('Some Charge Adjustments have failed,
2788: please verify the data in ar_interest_headers and lines tables with the batch_id :'||g_interest_batch_id,1,239);
2789: log(errbuf);
2790: END IF;
2791:
2792: x_return_status := fnd_api.g_ret_sts_success;

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

2806:
2807: IF x_return_status <> fnd_api.g_ret_sts_success THEN
2808: retcode := 1;
2809: errbuf := SUBSTRB('Some Charge invoice, debit memo have failed
2810: please verify the data in ar_interest_headers and lines tables with the batch_id :'||g_interest_batch_id,1,239);
2811: log(errbuf);
2812: ELSE
2813: OPEN c_err;
2814: FETCH c_err INTO l_err_found;

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

2814: FETCH c_err INTO l_err_found;
2815: IF c_err%FOUND THEN
2816: retcode := 1;
2817: errbuf := SUBSTRB('Some Charge invoice, debit memo have failed
2818: please verify the data in ar_interest_headers and lines tables with the batch_id :'||g_interest_batch_id,1,239);
2819: log(errbuf);
2820: END IF;
2821: CLOSE c_err;
2822:

Line 2850: FROM ar_interest_headers h,

2846: UPDATE ar_payment_schedules
2847: SET last_charge_date = g_int_cal_date
2848: WHERE payment_schedule_id IN
2849: (SELECT l.PAYMENT_SCHEDULE_ID
2850: FROM ar_interest_headers h,
2851: ar_interest_lines l
2852: WHERE h.interest_batch_id = g_interest_batch_id
2853: AND h.display_flag = 'N' -- Document included in Late Charges Calculation
2854: AND h.process_status = 'N'

Line 2857: UPDATE ar_interest_headers

2853: AND h.display_flag = 'N' -- Document included in Late Charges Calculation
2854: AND h.process_status = 'N'
2855: AND h.interest_header_id = l.interest_header_id);
2856:
2857: UPDATE ar_interest_headers
2858: SET process_status = 'S'
2859: WHERE interest_batch_id = g_interest_batch_id
2860: AND display_flag = 'N' -- Document included in Late Charges Calculation
2861: AND process_status = 'N';

Line 2913: ar_interest_headers_all h,

2909: b.calculate_interest_to_date,
2910: s.late_charge_batch_source_id,
2911: lg.currency_code
2912: FROM ar_interest_batches_all b,
2913: ar_interest_headers_all h,
2914: ar_system_parameters_all s,
2915: gl_ledgers lg
2916: WHERE b.request_id = p_request_id
2917: AND b.org_id = s.org_id

Line 2933: FROM ar_interest_headers_all

2929:
2930: --{Check if the interest batch has some INV or DM before requiring the batch_source_id
2931: CURSOR ht(p_request_id IN NUMBER, p_worker_num IN NUMBER) IS
2932: SELECT NULL
2933: FROM ar_interest_headers_all
2934: WHERE request_id = p_request_id
2935: AND worker_num = p_worker_num
2936: AND display_flag = 'Y' --HYU CDI only document generating the Late Charge s Doc
2937: AND header_type IN ('INV','DM');

Line 3078: FROM ar_interest_headers

3074: IS
3075: CURSOR c IS
3076: SELECT worker_num,
3077: COUNT(interest_header_id)
3078: FROM ar_interest_headers
3079: WHERE interest_batch_id = p_interest_batch_id
3080: AND process_status = 'N'
3081: AND display_flag = 'Y' --HYU CDI only document generating the Late Charge s Doc
3082: GROUP BY worker_num;

Line 3109: UPDATE ar_interest_headers

3105: IF x_return_status = fnd_api.g_ret_sts_success THEN
3106:
3107: log('updating worker_num');
3108: --{HYU CDI this update statement includes Credit Item
3109: UPDATE ar_interest_headers
3110: SET worker_num = mod(rownum, p_max_workers) + 1
3111: WHERE interest_batch_id = p_interest_batch_id
3112: AND process_status = 'N'
3113: AND display_flag = 'Y'; --HYU CDI only document generating the Late Charge s Doc

Line 3168: FROM ar_interest_headers

3164: l_GL_DATE DATE;
3165:
3166: CURSOR c_hdr IS
3167: SELECT interest_header_id
3168: FROM ar_interest_headers
3169: WHERE interest_batch_id = g_interest_batch_id
3170: AND process_status = 'N';
3171:
3172: l_ihid NUMBER;

Line 3182: FROM ar_interest_headers

3178: WHERE BATCH_SOURCE_ID = p_batch_source_id;
3179:
3180: CURSOR c_err IS
3181: SELECT NULL
3182: FROM ar_interest_headers
3183: WHERE interest_batch_id = g_interest_batch_id
3184: AND process_status <> 'S';
3185:
3186: l_err VARCHAR2(1);