DBA Data[Home] [Help]

APPS.ARP_MAINTAIN_PS dependencies on AR_ADJUSTMENTS

Line 318: FROM ar_adjustments

314: IF p_control_rec.process_mode = 'I' THEN
315:
316: SELECT 1
317: INTO l_adj_exists
318: FROM ar_adjustments
319: WHERE customer_trx_id = p_control_rec.previous_customer_trx_id
320: AND adjustment_type = 'C'
321: AND receivables_trx_id = -1
322: AND rownum = 1

Line 325: FROM ar_adjustments

321: AND receivables_trx_id = -1
322: AND rownum = 1
323: UNION ALL
324: SELECT 1
325: FROM ar_adjustments
326: WHERE subsequent_trx_id = p_control_rec.previous_customer_trx_id
327: AND adjustment_type = 'C'
328: AND receivables_trx_id = -1
329: AND rownum = 1;

Line 337: FROM ar_adjustments

333: /* IF p_control_rec.process_mode = 'I' THEN
334: IF p_control_rec.initial_trx_type = 'DEP' THEN
335: SELECT 1
336: INTO l_adj_exists
337: FROM ar_adjustments
338: WHERE customer_trx_id = p_control_rec.previous_customer_trx_id
339: AND adjustment_type = 'C'
340: AND receivables_trx_id = -1
341: AND rownum = 1;

Line 345: FROM ar_adjustments

341: AND rownum = 1;
342: ELSIF p_control_rec.initial_trx_type = 'GUAR' THEN
343: SELECT 1
344: INTO l_adj_exists
345: FROM ar_adjustments
346: WHERE subsequent_trx_id = p_control_rec.previous_customer_trx_id
347: AND adjustment_type = 'C'
348: AND receivables_trx_id = -1
349: AND rownum = 1;

Line 357: FROM ar_adjustments

353:
354: IF p_control_rec.initial_trx_type = 'DEP' THEN
355: SELECT 1
356: INTO l_adj_exists
357: FROM ar_adjustments
358: WHERE customer_trx_id = p_control_rec.previous_customer_trx_id
359: AND subsequent_trx_id = p_control_rec.customer_trx_id
360: AND adjustment_type = 'C'
361: AND receivables_trx_id = -1

Line 366: FROM ar_adjustments

362: AND rownum = 1;
363: ELSIF p_control_rec.initial_trx_type = 'GUAR' THEN
364: SELECT 1
365: INTO l_adj_exists
366: FROM ar_adjustments
367: WHERE customer_trx_id = p_control_rec.initial_customer_trx_id
368: AND subsequent_trx_id = p_control_rec.customer_trx_id
369: AND adjustment_type = 'C'
370: AND receivables_trx_id = -1

Line 493: FROM AR_ADJUSTMENTS'||CRLF||p_where_clause;

489: :sequence_assignment_id,
490: doc_sequence_value,
491: creation_date,
492: created_by
493: FROM AR_ADJUSTMENTS'||CRLF||p_where_clause;
494:
495:
496: ------------------------------------------------
497: -- Parse sql stmts

Line 550: 'UPDATE ar_adjustments adj

546: --did not work for gaples sequence.
547: --p_sequence_name contains the sequence value now.
548:
549: l_update_adj_sql :=
550: 'UPDATE ar_adjustments adj
551: SET
552: doc_sequence_value = ' || p_sequence_name || ',' || CRLF ||
553: 'doc_sequence_id = ' || p_sequence_id || CRLF || p_where_clause;
554:

Line 616: cursor c_ar_adjustments(cust_trx_id BINARY_INTEGER) is

612: v_profVal varchar2(40);--Bug 1796816
613: --BugFix 2095183 Added the Following 2 Statements.
614: l_update_where_clause varchar2(2000) default NULL;
615: /* bugfix 2454787 */
616: cursor c_ar_adjustments(cust_trx_id BINARY_INTEGER) is
617: select adjustment_id from ar_adjustments where customer_trx_id=cust_trx_id
618: UNION
619: select adjustment_id from ar_adjustments where subsequent_trx_id = cust_trx_id;
620:

Line 617: select adjustment_id from ar_adjustments where customer_trx_id=cust_trx_id

613: --BugFix 2095183 Added the Following 2 Statements.
614: l_update_where_clause varchar2(2000) default NULL;
615: /* bugfix 2454787 */
616: cursor c_ar_adjustments(cust_trx_id BINARY_INTEGER) is
617: select adjustment_id from ar_adjustments where customer_trx_id=cust_trx_id
618: UNION
619: select adjustment_id from ar_adjustments where subsequent_trx_id = cust_trx_id;
620:
621: BEGIN

Line 619: select adjustment_id from ar_adjustments where subsequent_trx_id = cust_trx_id;

615: /* bugfix 2454787 */
616: cursor c_ar_adjustments(cust_trx_id BINARY_INTEGER) is
617: select adjustment_id from ar_adjustments where customer_trx_id=cust_trx_id
618: UNION
619: select adjustment_id from ar_adjustments where subsequent_trx_id = cust_trx_id;
620:
621: BEGIN
622:
623: print_fcn_label( 'arp_maintain_ps.update_adj_document_number()+' );

Line 803: --AR_ADJUSTMENTS Records for the Corresponding customer_trx_id.

799: debug(' sequence_value='||
800: l_sequence_value, MSG_LEVEL_DEVELOP );
801: */
802: --BugFix 2095183 Added the Following For Loop For Fetching
803: --AR_ADJUSTMENTS Records for the Corresponding customer_trx_id.
804:
805: For adj_rec in c_ar_adjustments(p_customer_trx_id) loop
806:
807: --Bug 1508981 - Added the call to get the next sequence number

Line 805: For adj_rec in c_ar_adjustments(p_customer_trx_id) loop

801: */
802: --BugFix 2095183 Added the Following For Loop For Fetching
803: --AR_ADJUSTMENTS Records for the Corresponding customer_trx_id.
804:
805: For adj_rec in c_ar_adjustments(p_customer_trx_id) loop
806:
807: --Bug 1508981 - Added the call to get the next sequence number
808:
809: l_sequence_value := FND_SEQNUM.get_next_sequence (222,

Line 818: -- Update the ar_adjustments table

814: l_db_sequence_name,
815: l_sequence_assignment_id);
816:
817: -----------------------------------------------------------
818: -- Update the ar_adjustments table
819: -----------------------------------------------------------
820: BEGIN
821:
822: -------------------------------------------------------

Line 864: debug( 'EXCEPTION: Error updating ar_adjustments',

860: MSG_LEVEL_DEBUG );
861:
862: EXCEPTION
863: WHEN OTHERS THEN
864: debug( 'EXCEPTION: Error updating ar_adjustments',
865: MSG_LEVEL_BASIC );
866: RAISE;
867:
868: END;

Line 870: END LOOP; /* For c_ar_adjustments Cursor */

866: RAISE;
867:
868: END;
869: --BugFix 2095183 Added the following Statement.
870: END LOOP; /* For c_ar_adjustments Cursor */
871:
872:
873: -----------------------------------------------------------
874: -- Insert into the audit table: ar_doc_sequence_audit

Line 1077: FROM ar_adjustments adj

1073:
1074: IF( p_subsequent_trx_id IS NULL ) THEN
1075:
1076: DELETE
1077: FROM ar_adjustments adj
1078: WHERE adj.customer_trx_id = p_customer_trx_id
1079: and adj.receivables_trx_id = -1
1080: RETURNING adjustment_id
1081: BULK COLLECT INTO l_adj_key_value_list;

Line 1090: p_table_name => 'AR_ADJUSTMENTS',

1086: +---------------------------------*/
1087:
1088: ar_mrc_engine.maintain_mrc_data(
1089: p_event_mode => 'DELETE',
1090: p_table_name => 'AR_ADJUSTMENTS',
1091: p_mode => 'BULK',
1092: p_key_value_list => l_adj_key_value_list);
1093:
1094: ELSE

Line 1097: FROM ar_adjustments adj

1093:
1094: ELSE
1095:
1096: DELETE
1097: FROM ar_adjustments adj
1098: WHERE adj.customer_trx_id = p_customer_trx_id
1099: and adj.subsequent_trx_id = p_subsequent_trx_id
1100: and adj.receivables_trx_id = -1
1101: RETURNING adjustment_id

Line 1111: p_table_name => 'AR_ADJUSTMENTS',

1107: +---------------------------------*/
1108:
1109: ar_mrc_engine.maintain_mrc_data(
1110: p_event_mode => 'DELETE',
1111: p_table_name => 'AR_ADJUSTMENTS',
1112: p_mode => 'BULK',
1113: p_key_value_list => l_adj_key_value_list);
1114:
1115: END IF;

Line 1145: l_adjustment_id ar_adjustments.adjustment_id%type;

1141: p_subsequent_trx_id IN BINARY_INTEGER
1142: ) IS
1143: /* VAT changes */
1144: l_ae_doc_rec ae_doc_rec_type;
1145: l_adjustment_id ar_adjustments.adjustment_id%type;
1146:
1147: l_ar_ps_key_value_list gl_ca_utility_pkg.r_key_value_arr;
1148:
1149: BEGIN

Line 1225: ar_adjustments adj,

1221: p_profile_info.user_id,
1222: trunc(sysdate),
1223: p_profile_info.conc_login_id
1224: FROM
1225: ar_adjustments adj,
1226: ar_payment_schedules ps2,
1227: ar_adjustments adj2,
1228: ar_receivable_applications ra2
1229: WHERE adj.receivables_trx_id =-1

Line 1227: ar_adjustments adj2,

1223: p_profile_info.conc_login_id
1224: FROM
1225: ar_adjustments adj,
1226: ar_payment_schedules ps2,
1227: ar_adjustments adj2,
1228: ar_receivable_applications ra2
1229: WHERE adj.receivables_trx_id =-1
1230: and adj.customer_trx_id = p_customer_trx_id
1231: and adj.subsequent_trx_id = p_subsequent_trx_id

Line 1261: FROM ar_adjustments adj3

1257: WHERE ps.payment_schedule_id in
1258: (
1259: SELECT
1260: adj3.payment_schedule_id
1261: FROM ar_adjustments adj3
1262: WHERE adj3.customer_trx_id = p_customer_trx_id
1263: and adj3.subsequent_trx_id = p_subsequent_trx_id
1264: and adj3.receivables_trx_id = -1
1265: )

Line 1296: FROM ar_adjustments adj

1292: /* bug 2808262. Changed the code to have a cursor */
1293:
1294: DECLARE
1295: CURSOR c1 IS SELECT adj.adjustment_id
1296: FROM ar_adjustments adj
1297: WHERE adj.customer_trx_id = p_customer_trx_id
1298: AND adj.receivables_trx_id = -1;
1299: BEGIN
1300: FOR i IN c1 LOOP

Line 1380: ar_adjustments adj2,

1376: p_profile_info.conc_login_id
1377: FROM
1378: ar_receivable_applications ra,
1379: ar_payment_schedules ps2,
1380: ar_adjustments adj2,
1381: ar_receivable_applications ra2
1382: WHERE ra.customer_trx_id = p_customer_trx_id
1383: and ra.status||'' = 'APP'
1384: and ra.applied_payment_schedule_id = ps2.payment_schedule_id

Line 1713: ar_adjustments adj2

1709: FROM
1710: ar_receivable_applications ra,
1711: ar_payment_schedules ps2,
1712: ar_receivable_applications ra2,
1713: ar_adjustments adj2
1714: WHERE ra.customer_trx_id = p_control.customer_trx_id
1715: and ra.status||'' = 'APP'
1716: and ra.reversal_gl_date IS NULL
1717: and ra.applied_payment_schedule_id = ps2.payment_schedule_id

Line 2152: l_adjustment_id ar_adjustments.adjustment_id%type;

2148:
2149: l_doc_where_clause VARCHAR2(1000);
2150: /* VAT changes */
2151: l_ae_doc_rec ae_doc_rec_type;
2152: l_adjustment_id ar_adjustments.adjustment_id%type;
2153: l_ccid ar_adjustments.code_combination_id%type;
2154:
2155: BEGIN
2156:

Line 2153: l_ccid ar_adjustments.code_combination_id%type;

2149: l_doc_where_clause VARCHAR2(1000);
2150: /* VAT changes */
2151: l_ae_doc_rec ae_doc_rec_type;
2152: l_adjustment_id ar_adjustments.adjustment_id%type;
2153: l_ccid ar_adjustments.code_combination_id%type;
2154:
2155: BEGIN
2156:
2157: print_fcn_label( 'arp_maintain_ps.update_adjustments()+' );

Line 2166: FROM ar_adjustments adj

2162: -- Determine if adjustments exist on child invoice
2163: --
2164: SELECT adj.adjustment_id
2165: INTO l_dummy
2166: FROM ar_adjustments adj
2167: WHERE adj.receivables_trx_id = -1
2168: and adj.customer_trx_id = p_control.previous_customer_trx_id
2169: and adj.subsequent_trx_id = p_control.customer_trx_id
2170: and rownum = 1;

Line 2306: FROM ar_adjustments adj

2302: INTO
2303: l_update_inv_adr,
2304: l_update_inv_acctd_adr,
2305: l_update_new_adj_amount
2306: FROM ar_adjustments adj
2307: WHERE adj.customer_trx_id = p_control.previous_customer_trx_id
2308: and adj.subsequent_trx_id = p_control.customer_trx_id
2309: and adj.receivables_trx_id = -1
2310: and adj.payment_schedule_id = p_control.payment_schedule_id;

Line 2355: select ar_adjustments_s.nextval into l_adjustment_id

2351:
2352: -- do the insert
2353: BEGIN
2354:
2355: select ar_adjustments_s.nextval into l_adjustment_id
2356: from dual;
2357:
2358: INSERT INTO ar_adjustments
2359: (

Line 2358: INSERT INTO ar_adjustments

2354:
2355: select ar_adjustments_s.nextval into l_adjustment_id
2356: from dual;
2357:
2358: INSERT INTO ar_adjustments
2359: (
2360: created_by,
2361: creation_date,
2362: last_updated_by,

Line 2415: ar_adjustments adj2,

2411: 'ARAPSI',
2412: -3
2413: ,arp_standard.sysparm.org_id /* SSA changes anuj */
2414: FROM
2415: ar_adjustments adj2,
2416: ar_receivable_applications ra,
2417: ra_customer_trx ct
2418: WHERE adj2.receivables_trx_id= -1
2419: and adj2.customer_trx_id = p_control.previous_customer_trx_id

Line 2428: FROM ar_adjustments adj3

2424: and adj2.payment_schedule_id =
2425: (
2426: /* find an adjustment against the invoice by the CM */
2427: SELECT max(payment_schedule_id)
2428: FROM ar_adjustments adj3
2429: WHERE adj3.receivables_trx_id=-1
2430: and adj3.customer_trx_id = p_control.previous_customer_trx_id
2431: and adj3.subsequent_trx_id = p_control.customer_trx_id
2432: );

Line 2443: p_table_name => 'AR_ADJUSTMENTS',

2439: +---------------------------------*/
2440:
2441: ar_mrc_engine.maintain_mrc_data(
2442: p_event_mode => 'INSERT',
2443: p_table_name => 'AR_ADJUSTMENTS',
2444: p_mode => 'SINGLE',
2445: p_key_value => l_adjustment_id
2446: );
2447:

Line 2471: -- Fill in document number in the ar_adjustments table

2467:
2468: END;
2469:
2470: ------------------------------------------------------------------
2471: -- Fill in document number in the ar_adjustments table
2472: ------------------------------------------------------------------
2473:
2474: l_doc_where_clause :=
2475: 'WHERE customer_trx_id = :bind1 '|| CRLF ||

Line 2524: UPDATE ar_adjustments adj

2520: DECLARE
2521: l_adj_key_value_list gl_ca_utility_pkg.r_key_value_arr;
2522: BEGIN
2523:
2524: UPDATE ar_adjustments adj
2525: SET
2526: (
2527: amount,
2528: acctd_amount,

Line 2569: p_table_name => 'AR_ADJUSTMENTS',

2565: +---------------------------------*/
2566:
2567: ar_mrc_engine.maintain_mrc_data(
2568: p_event_mode => 'UPDATE',
2569: p_table_name => 'AR_ADJUSTMENTS',
2570: p_mode => 'BATCH',
2571: p_key_value_list => l_adj_key_value_list);
2572:
2573: EXCEPTION

Line 2584: FROM ar_adjustments adj

2580:
2581: /* VAT changes: update accounting entry */
2582: SELECT adjustment_id
2583: INTO l_adjustment_id
2584: FROM ar_adjustments adj
2585: WHERE adj.customer_trx_id = p_control.previous_customer_trx_id
2586: and adj.subsequent_trx_id = p_control.customer_trx_id
2587: and adj.receivables_trx_id = -1
2588: and adj.payment_schedule_id = p_control.payment_schedule_id;

Line 2694: ar_adjustments adj2

2690: FROM
2691: ar_receivable_applications ra,
2692: ar_payment_schedules ps2,
2693: ar_receivable_applications ra2,
2694: ar_adjustments adj2
2695: WHERE ra.customer_trx_id = p_control.customer_trx_id
2696: and ra.status||'' = 'APP'
2697: and ra.applied_payment_schedule_id = ps2.payment_schedule_id
2698: and ps.payment_schedule_id = ps2.payment_schedule_id

Line 2948: FROM ar_adjustments adj

2944:
2945: SELECT
2946: nvl( sum( nvl(-adj.amount, 0) ), 0 )
2947: INTO l_temp
2948: FROM ar_adjustments adj
2949: WHERE adj.customer_trx_id =
2950: decode( p_control.initial_trx_type,
2951: 'DEP', p_control.customer_trx_id,
2952: 'GUAR', p_control.initial_customer_trx_id )

Line 3071: l_adjustment_id ar_adjustments.adjustment_id%type;

3067: l_doc_where_clause VARCHAR2(1000);
3068: l_control_rec control_rec_type;
3069: /* VAT changes */
3070: l_ae_doc_rec ae_doc_rec_type;
3071: l_adjustment_id ar_adjustments.adjustment_id%type;
3072:
3073: BEGIN
3074:
3075: print_fcn_label( 'arp_maintain_ps.maintain_payment_schedules()+' );

Line 3156: FROM ar_adjustments adj

3152: debug( ' DEP case', MSG_LEVEL_DEBUG );
3153:
3154: /* VAT changes: delete accounting entry for adjustment */
3155: SELECT adj.adjustment_id into l_adjustment_id
3156: FROM ar_adjustments adj
3157: WHERE adj.customer_trx_id = l_control_rec.customer_trx_id
3158: and adj.receivables_trx_id = -1;
3159:
3160: l_ae_doc_rec.document_type := 'ADJUSTMENT';