DBA Data[Home] [Help]

APPS.ARP_LOCKBOX_HOOK_PVT dependencies on AR_PAYMENTS_INTERFACE

Line 66: UPDATE ar_payments_interface pi

62: * fetching data from ar_lockboxes. Hence trimmed Lockbox number here. The *
63: * data in interface table will be trimmed later in arlvtr.lpc. * */
64: BEGIN
65: /* Bug 14746822 : This code moved to arlplb.opc
66: UPDATE ar_payments_interface pi
67: SET pi.lockbox_number =
68: (SELECT decode(ff.justification_lookup_code,
69: 'LEFT', RTRIM(pi.lockbox_number, decode(ff.fill_character_lookup_code, 'ZERO', '0', 'BLANK', ' ')),
70: 'RIGHT', LTRIM(pi.lockbox_number,decode(ff.fill_character_lookup_code, 'ZERO', '0', 'BLANK', ' ')))

Line 90: from ar_payments_interface

86: select distinct( nvl(a.line_level_cash_app_rule, 'N'))
87: into l_line_level_cash_app_rule
88: from ar_lockboxes a
89: where a.lockbox_number in ( select distinct(lockbox_number)
90: from ar_payments_interface
91: where transmission_request_id = in_trans_req_id
92: and lockbox_number is not null );
93: EXCEPTION
94: WHEN TOO_MANY_ROWS THEN

Line 441: l_customer_id ar_payments_interface.customer_id%type;

437: l_amount_applied number;
438: l_matching_date date;
439: l_error_flag varchar2(1);
440: l_pay_unrelated_invoices varchar2(1);
441: l_customer_id ar_payments_interface.customer_id%type;
442:
443: cursor distinct_item_num( req_id in number ) is
444: select distinct item_number
445: from ar_payments_interface_all

Line 445: from ar_payments_interface_all

441: l_customer_id ar_payments_interface.customer_id%type;
442:
443: cursor distinct_item_num( req_id in number ) is
444: select distinct item_number
445: from ar_payments_interface_all
446: where transmission_request_id = req_id;
447:
448: cursor overflow_records( request_id in number,
449: itm_num in number,

Line 452: from ar_payments_interface_all

448: cursor overflow_records( request_id in number,
449: itm_num in number,
450: rec_type in varchar) is
451: select transmission_record_id
452: from ar_payments_interface_all
453: where transmission_request_id = request_id
454: and item_number = itm_num
455: and record_type = rec_type
456: order by transmission_record_id;

Line 479: FROM ar_payments_interface_all

475: amount_applied6,
476: amount_applied7,
477: amount_applied8,
478: batch_name
479: FROM ar_payments_interface_all
480: WHERE transmission_request_id = req_id
481: AND record_type in ( select a.record_identifier from ar_trans_record_formats a, ar_transmissions_all b
482: where b.transmission_request_id = req_id
483: and b.requested_trans_format_id = a.transmission_format_id

Line 556: from ar_payments_interface pi,

552: into l_precision
553: from fnd_currencies fc
554: where fc.currency_code =
555: (select max(pi.currency_code)
556: from ar_payments_interface pi,
557: ar_payments_interface pi1
558: where pi.item_number = pi1.item_number
559: and pi1.transmission_request_id = in_trans_req_id
560: and pi1.transmission_record_id = app_rec.transmission_record_id);

Line 557: ar_payments_interface pi1

553: from fnd_currencies fc
554: where fc.currency_code =
555: (select max(pi.currency_code)
556: from ar_payments_interface pi,
557: ar_payments_interface pi1
558: where pi.item_number = pi1.item_number
559: and pi1.transmission_request_id = in_trans_req_id
560: and pi1.transmission_record_id = app_rec.transmission_record_id);
561:

Line 730: * currency application, then a record is inserted into ar_payments_interface *

726: /*
727: * The logic below is like this. For each (matching) number in unresolved array we check *
728: * if it has been resolved. If so, we popualte the resolved array for all those *
729: * (resolved) numbers. If they pass through cross currency validations, if this a cross *
730: * currency application, then a record is inserted into ar_payments_interface *
731: * for each resolved number along with their line level details in ar_pmts_ *
732: * interface_line_details, if any. If a record failed in validation then a record is *
733: * inserted into ar_payments_interface for the matching number, which would eventually fail*
734: * in validation.

Line 733: * inserted into ar_payments_interface for the matching number, which would eventually fail*

729: * (resolved) numbers. If they pass through cross currency validations, if this a cross *
730: * currency application, then a record is inserted into ar_payments_interface *
731: * for each resolved number along with their line level details in ar_pmts_ *
732: * interface_line_details, if any. If a record failed in validation then a record is *
733: * inserted into ar_payments_interface for the matching number, which would eventually fail*
734: * in validation.
735: */
736: IF PG_DEBUG in ('Y', 'C') THEN
737: arp_util.debug('Number of Invoices inside custom code :' || l_last_invoice_index);

Line 799: FROM ar_payments_interface_all

795: invoice5, 5,
796: invoice6, 6,
797: invoice7, 7,
798: invoice8, 8) a
799: FROM ar_payments_interface_all
800: WHERE transmission_request_id = in_trans_req_id
801: AND item_number = l_unres_inv_array(i).item_number
802: AND record_type = l_unres_inv_array(i).record_type
803: AND NVL(batch_name, -1)= NVL(l_unres_inv_array(i).batch_name, -1))

Line 809: ||' FROM ar_payments_interface_all WHERE transmission_request_id = :1'

805:
806: l_sql_stmt := 'SELECT amount_applied_from'||l_resolved_number||', trans_to_receipt_rate'
807: ||l_resolved_number||', invoice_currency_code'||l_resolved_number||', customer_id'
808: ||', amount_applied'||l_resolved_number||', matching'||l_resolved_number||'_date'
809: ||' FROM ar_payments_interface_all WHERE transmission_request_id = :1'
810: ||' AND item_number = :2'
811: ||' AND record_type = :3'
812: ||' AND invoice'||l_resolved_number ||'= :4'
813: ||' AND NVL(batch_name, -1) = :5';

Line 1027: SELECT ar_payments_interface_s.nextval

1023: END IF;/* End all validations */
1024:
1025: IF l_error_flag = 'T' THEN
1026:
1027: SELECT ar_payments_interface_s.nextval
1028: INTO l_transmission_rec_id_of
1029: FROM dual;
1030:
1031: IF PG_DEBUG in ('Y', 'C') THEN

Line 1040: l_upd_stmt := 'UPDATE ar_payments_interface_all'

1036: with the details provided at the resolved invoice level. So insert the Custom
1037: number into the interface tables instead of resolved numbers as an invalid
1038: application. */
1039:
1040: l_upd_stmt := 'UPDATE ar_payments_interface_all'
1041: ||' SET invoice'||l_resolved_number||'status = ''AR_PLB_INVALID_MATCH'''
1042: ||' WHERE transmission_request_id = :1 AND item_number = :2'
1043: ||' AND record_type = :3'
1044: ||' AND invoice'||l_resolved_number ||'= :4'

Line 1055: l_upd_stmt := 'UPDATE ar_payments_interface_all'

1051: l_unres_inv_array(i).matching_number,
1052: nvl(l_unres_inv_array(i).batch_name, -1);
1053:
1054: ELSE
1055: l_upd_stmt := 'UPDATE ar_payments_interface_all'
1056: ||' SET invoice'||l_resolved_number||' = NULL'
1057: ||', amount_applied'||l_resolved_number||' = NULL'
1058: ||' WHERE transmission_request_id = :1 AND item_number = :2'
1059: ||' AND record_type = :3'

Line 1076: FROM ar_payments_interface_all a,

1072: a.batch_name,
1073: a.currency_code,
1074: decode(format_amount1,'Y',d.precision,0)
1075: INTO l_org_id, l_lockbox_number, l_batch_name, l_currency_code, l_precision
1076: FROM ar_payments_interface_all a,
1077: ar_transmissions_all b,
1078: ar_trans_record_formats c,
1079: fnd_currencies d
1080: WHERE a.transmission_request_id = b.transmission_request_id

Line 1095: SELECT ar_payments_interface_s.nextval

1091: END IF;
1092:
1093: FOR j in 1..l_res_invoice_index LOOP
1094:
1095: SELECT ar_payments_interface_s.nextval
1096: INTO l_transmission_rec_id_of
1097: FROM dual;
1098:
1099: /* Insert a new overflow record for the new invoice number resolved. */

Line 1100: INSERT INTO ar_payments_interface_all(

1096: INTO l_transmission_rec_id_of
1097: FROM dual;
1098:
1099: /* Insert a new overflow record for the new invoice number resolved. */
1100: INSERT INTO ar_payments_interface_all(
1101: transmission_record_id,
1102: item_number,
1103: record_type,
1104: status,

Line 1186: delete from ar_payments_interface_all

1182: /* Delete the old overflow records for all the receipts, where all the matching numbers in
1183: the overflow record are resolved in custom code i.e, no use in having overflow
1184: records with all invoice1 to invoice8 columns null. */
1185:
1186: delete from ar_payments_interface_all
1187: where transmission_request_id = in_trans_req_id
1188: and invoice1 is null
1189: and invoice2 is null
1190: and invoice3 is null

Line 1204: update ar_payments_interface_all

1200:
1201: FOR item_num IN distinct_item_num( in_trans_req_id ) LOOP
1202: l_overflow_seq := 1;
1203: FOR record_id IN overflow_records(in_trans_req_id, item_num.item_number, l_overflow_rec ) LOOP
1204: update ar_payments_interface_all
1205: set overflow_sequence = l_overflow_seq,
1206: overflow_indicator = l_overflow_indicator
1207: where transmission_record_id = record_id.transmission_record_id;
1208:

Line 1215: update ar_payments_interface_all

1211:
1212: /* Overflow the last overflow record's overflow indicator to indicate
1213: there are no more further overflow records for the receipt. */
1214:
1215: update ar_payments_interface_all
1216: set overflow_indicator = l_final_rec_overflow_ind
1217: where transmission_record_id = (
1218: select max(transmission_record_id)
1219: from ar_payments_interface_all

Line 1219: from ar_payments_interface_all

1215: update ar_payments_interface_all
1216: set overflow_indicator = l_final_rec_overflow_ind
1217: where transmission_record_id = (
1218: select max(transmission_record_id)
1219: from ar_payments_interface_all
1220: where transmission_request_id = in_trans_req_id
1221: and item_number = item_num.item_number
1222: and record_type = l_overflow_rec );
1223: END LOOP;

Line 1228: update ar_payments_interface_all

1224:
1225: /* Update the transmission record count with correct value if there are
1226: transmission header or trailer records in the transmission. */
1227:
1228: update ar_payments_interface_all
1229: set transmission_record_count = (
1230: select count(*) from ar_payments_interface_all
1231: where transmission_request_id = in_trans_req_id )
1232: where transmission_request_id = in_trans_req_id

Line 1230: select count(*) from ar_payments_interface_all

1226: transmission header or trailer records in the transmission. */
1227:
1228: update ar_payments_interface_all
1229: set transmission_record_count = (
1230: select count(*) from ar_payments_interface_all
1231: where transmission_request_id = in_trans_req_id )
1232: where transmission_request_id = in_trans_req_id
1233: and record_type in ( select a.record_identifier
1234: from ar_trans_record_formats a, ar_transmissions_all b