DBA Data[Home] [Help]

APPS.AP_IMPORT_UTILITIES_PKG dependencies on AP_IMPORT_INVOICES_PKG

Line 43: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN

39:
40: WHEN OTHERS then
41:
42: IF (SQLCODE < 0) then
43: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN
44: AP_IMPORT_UTILITIES_PKG.Print(
45: AP_IMPORT_INVOICES_PKG.g_debug_switch, SQLERRM);
46: END IF;
47: END IF;

Line 45: AP_IMPORT_INVOICES_PKG.g_debug_switch, SQLERRM);

41:
42: IF (SQLCODE < 0) then
43: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN
44: AP_IMPORT_UTILITIES_PKG.Print(
45: AP_IMPORT_INVOICES_PKG.g_debug_switch, SQLERRM);
46: END IF;
47: END IF;
48: RETURN 0;
49: END copy_attachments;

Line 107: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') then

103: -- insert a idential record
104: -----------------------------------------------------------------------
105:
106: debug_info := '(Check_control_table 1) Lock the control table ';
107: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') then
108: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
109: END IF;
110:
111: LOCK TABLE AP_INTERFACE_CONTROLS IN EXCLUSIVE MODE;

Line 108: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);

104: -----------------------------------------------------------------------
105:
106: debug_info := '(Check_control_table 1) Lock the control table ';
107: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') then
108: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
109: END IF;
110:
111: LOCK TABLE AP_INTERFACE_CONTROLS IN EXCLUSIVE MODE;
112:

Line 115: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') then

111: LOCK TABLE AP_INTERFACE_CONTROLS IN EXCLUSIVE MODE;
112:
113: debug_info := '(Check_control_table) Open import_requests cursor';
114:
115: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') then
116: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
117: END IF;
118:
119: -- Bug 4145391. To improve the performance of the import program coding two

Line 116: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);

112:
113: debug_info := '(Check_control_table) Open import_requests cursor';
114:
115: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') then
116: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
117: END IF;
118:
119: -- Bug 4145391. To improve the performance of the import program coding two
120: -- different cursors based on the parameter p_group_id

Line 135: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') then

131: -- all requests from the source will be fetched
132: -------------------------------------------------------------------------
133:
134: debug_info := '(Check_control_table 2) Fetch import_requests';
135: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') then
136: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
137: END IF;
138:
139: -- Bug 4145391

Line 136: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);

132: -------------------------------------------------------------------------
133:
134: debug_info := '(Check_control_table 2) Fetch import_requests';
135: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') then
136: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
137: END IF;
138:
139: -- Bug 4145391
140: IF (p_group_id IS NULL) THEN

Line 162: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') then

158: -- Check status for the concurrent program from the request_id
159: -----------------------------------------------------------------------
160:
161: debug_info := '(Check_control_table 3) Check concurrent program status';
162: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') then
163: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,
164: debug_info||' previous req id ='||l_previous_request_id);
165: END IF;
166:

Line 163: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,

159: -----------------------------------------------------------------------
160:
161: debug_info := '(Check_control_table 3) Check concurrent program status';
162: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') then
163: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,
164: debug_info||' previous req id ='||l_previous_request_id);
165: END IF;
166:
167: IF (FND_CONCURRENT.GET_REQUEST_STATUS(

Line 176: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') then

172: status =>l_status,
173: dev_phase =>l_dev_phase,
174: dev_status =>l_dev_status,
175: message =>l_message) <> TRUE) THEN
176: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') then
177: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,
178: 'FUNCTION GET_REQUEST_STATUS ERROR, Reason: '||l_message);
179: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,
180: 'FND_CONCURRENT.GET_REQUEST_STATUS<-'||current_calling_sequence);

Line 177: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,

173: dev_phase =>l_dev_phase,
174: dev_status =>l_dev_status,
175: message =>l_message) <> TRUE) THEN
176: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') then
177: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,
178: 'FUNCTION GET_REQUEST_STATUS ERROR, Reason: '||l_message);
179: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,
180: 'FND_CONCURRENT.GET_REQUEST_STATUS<-'||current_calling_sequence);
181: END IF;

Line 179: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,

175: message =>l_message) <> TRUE) THEN
176: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') then
177: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,
178: 'FUNCTION GET_REQUEST_STATUS ERROR, Reason: '||l_message);
179: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,
180: 'FND_CONCURRENT.GET_REQUEST_STATUS<-'||current_calling_sequence);
181: END IF;
182: RAISE Check_control_failure;
183:

Line 188: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') then

184: END IF;
185:
186: -- show output values (only if debug_switch = 'Y')
187:
188: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') then
189: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,
190: '------------------> l_dev_phase = '||l_dev_phase
191: ||' l_dev_status = '||l_dev_status
192: ||' l_previous_request_id = '||to_char(l_previous_request_id));

Line 189: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,

185:
186: -- show output values (only if debug_switch = 'Y')
187:
188: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') then
189: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,
190: '------------------> l_dev_phase = '||l_dev_phase
191: ||' l_dev_status = '||l_dev_status
192: ||' l_previous_request_id = '||to_char(l_previous_request_id));
193: END IF;

Line 202: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') then

198: -- currentlt running
199: -------------------------------------------------------------------------
200: IF (l_dev_phase in ('PENDING','RUNNING','INACTIVE')) then
201:
202: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') then
203: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,
204: 'ERROR: There are existing import processes currently in the status '
205: ||l_dev_phase||' for this source ('||p_source||') and group_id ('
206: ||p_group_id

Line 203: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,

199: -------------------------------------------------------------------------
200: IF (l_dev_phase in ('PENDING','RUNNING','INACTIVE')) then
201:
202: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') then
203: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,
204: 'ERROR: There are existing import processes currently in the status '
205: ||l_dev_phase||' for this source ('||p_source||') and group_id ('
206: ||p_group_id
207: ||') , please check your concurrent process requests');

Line 220: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') then

216: -- is 'COMPLETE'
217: ---------------------------------------------------------------------
218: debug_info := '(Check_control_table 4.2) Delete the previous record '||
219: 'in ap_interface_controls';
220: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') then
221: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
222: END IF;
223:
224: -- Bug 4145391

Line 221: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);

217: ---------------------------------------------------------------------
218: debug_info := '(Check_control_table 4.2) Delete the previous record '||
219: 'in ap_interface_controls';
220: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') then
221: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
222: END IF;
223:
224: -- Bug 4145391
225: IF (p_group_id IS NULL) THEN

Line 241: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') then

237:
238: END LOOP;
239:
240: debug_info := '(Check_control_table) CLOSE import_requests cursor';
241: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') then
242: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
243: END IF;
244:
245: -- Bug 4145391

Line 242: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);

238: END LOOP;
239:
240: debug_info := '(Check_control_table) CLOSE import_requests cursor';
241: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') then
242: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
243: END IF;
244:
245: -- Bug 4145391
246: IF (p_group_id IS NULL) THEN

Line 258: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') then

254: -- Insert record into control table
255: -----------------------------------------
256:
257: debug_info := '(Check_control_table 5) Insert record into control table';
258: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') then
259: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
260: END IF;
261:
262: INSERT INTO AP_INTERFACE_CONTROLS(

Line 259: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);

255: -----------------------------------------
256:
257: debug_info := '(Check_control_table 5) Insert record into control table';
258: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') then
259: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
260: END IF;
261:
262: INSERT INTO AP_INTERFACE_CONTROLS(
263: source,

Line 268: AP_IMPORT_INVOICES_PKG.g_conc_request_id);

264: group_id,
265: request_id)
266: VALUES (p_source,
267: p_group_id,
268: AP_IMPORT_INVOICES_PKG.g_conc_request_id);
269:
270: ----------------------------------------------------------------------------
271: -- Step 6
272: -- Commit the change to database, it will also release the lock for the table

Line 276: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') then

272: -- Commit the change to database, it will also release the lock for the table
273: ----------------------------------------------------------------------------
274:
275: debug_info := '(Check_control_table 6) Commit';
276: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') then
277: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
278: END IF;
279:
280: COMMIT;

Line 277: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);

273: ----------------------------------------------------------------------------
274:
275: debug_info := '(Check_control_table 6) Commit';
276: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') then
277: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
278: END IF;
279:
280: COMMIT;
281:

Line 287: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') then

283:
284: EXCEPTION
285:
286: WHEN OTHERS then
287: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') then
288: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
289: END IF;
290:
291: IF (SQLCODE < 0) then

Line 288: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);

284: EXCEPTION
285:
286: WHEN OTHERS then
287: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') then
288: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
289: END IF;
290:
291: IF (SQLCODE < 0) then
292: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') then

Line 292: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') then

288: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
289: END IF;
290:
291: IF (SQLCODE < 0) then
292: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') then
293: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,SQLERRM);
294: END IF;
295: END IF;
296:

Line 293: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,SQLERRM);

289: END IF;
290:
291: IF (SQLCODE < 0) then
292: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') then
293: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,SQLERRM);
294: END IF;
295: END IF;
296:
297: -- Bug 4145391

Line 398: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

394:
395: debug_info := '(Insert Rejections 1) Insert into AP_INTERFACE_REJECTIONS, '||
396: 'REJECT CODE:'||p_reject_code;
397:
398: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
399: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
400: END IF;
401:
402: IF(AP_IMPORT_INVOICES_PKG.g_source = 'XML GATEWAY'

Line 399: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);

395: debug_info := '(Insert Rejections 1) Insert into AP_INTERFACE_REJECTIONS, '||
396: 'REJECT CODE:'||p_reject_code;
397:
398: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
399: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
400: END IF;
401:
402: IF(AP_IMPORT_INVOICES_PKG.g_source = 'XML GATEWAY'
403: AND NVL(p_notify_vendor_flag,'Y') = 'Y'

Line 402: IF(AP_IMPORT_INVOICES_PKG.g_source = 'XML GATEWAY'

398: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
399: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
400: END IF;
401:
402: IF(AP_IMPORT_INVOICES_PKG.g_source = 'XML GATEWAY'
403: AND NVL(p_notify_vendor_flag,'Y') = 'Y'
404: AND p_reject_code in ('CAN MATCH TO ONLY 1 LINE',
405: 'DUPLICATE INVOICE NUMBER',
406: 'DUPLICATE LINE NUMBER',

Line 430: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

426: -------------------------------------------------
427:
428: debug_info := '(Insert Rejections 2) '||
429: 'Set notify_vendor_flag for XML GATEWAY';
430: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
431: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
432: END IF;
433:
434: INSERT INTO AP_INTERFACE_REJECTIONS(

Line 431: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);

427:
428: debug_info := '(Insert Rejections 2) '||
429: 'Set notify_vendor_flag for XML GATEWAY';
430: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
431: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
432: END IF;
433:
434: INSERT INTO AP_INTERFACE_REJECTIONS(
435: parent_table,

Line 520: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') then

516: RETURN(TRUE);
517:
518: EXCEPTION
519: WHEN OTHERS then
520: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') then
521: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
522: END IF;
523:
524: IF (SQLCODE < 0) then

Line 521: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);

517:
518: EXCEPTION
519: WHEN OTHERS then
520: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') then
521: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
522: END IF;
523:
524: IF (SQLCODE < 0) then
525: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') then

Line 525: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') then

521: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
522: END IF;
523:
524: IF (SQLCODE < 0) then
525: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') then
526: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,SQLERRM);
527: END IF;
528: END IF;
529:

Line 526: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,SQLERRM);

522: END IF;
523:
524: IF (SQLCODE < 0) then
525: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') then
526: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,SQLERRM);
527: END IF;
528: END IF;
529:
530: RETURN (FALSE);

Line 565: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') then

561: -- Get quantity_outstanding
562: --------------------------------------------------------------------------
563:
564: debug_info := '(Get Overbill for Shipment 1) Get quantity_outstanding';
565: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') then
566: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
567: END IF;
568:
569: --Contract Payments: modified the SELECT clause

Line 566: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);

562: --------------------------------------------------------------------------
563:
564: debug_info := '(Get Overbill for Shipment 1) Get quantity_outstanding';
565: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') then
566: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
567: END IF;
568:
569: --Contract Payments: modified the SELECT clause
570: SELECT decode(pod.distribution_type,'PREPAYMENT',

Line 607: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') then

603: AND pll.line_location_id = pod.line_location_id
604: GROUP BY pod.distribution_type,pll.matching_basis ;
605:
606:
607: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') then
608: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,'------------------>
609: p_quantity_outstanding = '||to_char(p_quantity_outstanding)
610: ||' p_quantity_ordered = '||to_char(p_quantity_ordered)
611: ||' p_qty_already_billed = '||to_char(p_qty_already_billed)

Line 608: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,'------------------>

604: GROUP BY pod.distribution_type,pll.matching_basis ;
605:
606:
607: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') then
608: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,'------------------>
609: p_quantity_outstanding = '||to_char(p_quantity_outstanding)
610: ||' p_quantity_ordered = '||to_char(p_quantity_ordered)
611: ||' p_qty_already_billed = '||to_char(p_qty_already_billed)
612: ||' p_amount_outstanding = '||to_char(p_amount_outstanding)

Line 643: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

639:
640: EXCEPTION
641:
642: WHEN OTHERS THEN
643: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
644: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
645: END IF;
646: IF (SQLCODE < 0) THEN
647: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

Line 644: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);

640: EXCEPTION
641:
642: WHEN OTHERS THEN
643: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
644: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
645: END IF;
646: IF (SQLCODE < 0) THEN
647: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
648: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,SQLERRM);

Line 647: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

643: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
644: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
645: END IF;
646: IF (SQLCODE < 0) THEN
647: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
648: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,SQLERRM);
649: END IF;
650: END IF;
651:

Line 648: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,SQLERRM);

644: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
645: END IF;
646: IF (SQLCODE < 0) THEN
647: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
648: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,SQLERRM);
649: END IF;
650: END IF;
651:
652: RETURN (FALSE);

Line 690: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

686: debug_info := 'Check batch_name existance';
687:
688: BEGIN
689: debug_info := '(Get_batch_id 1) Get old batch id';
690: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
691: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
692: END IF;
693:
694: SELECT 'OLD BATCH',

Line 691: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);

687:
688: BEGIN
689: debug_info := '(Get_batch_id 1) Get old batch id';
690: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
691: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
692: END IF;
693:
694: SELECT 'OLD BATCH',
695: batch_id

Line 713: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

709: -- Get New batch_id and Batch_date
710: ---------------------------------------------
711:
712: debug_info := '(Get_batch_id 2) Get New batch_id';
713: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
714: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
715: END IF;
716:
717: SELECT ap_batches_s.nextval

Line 714: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);

710: ---------------------------------------------
711:
712: debug_info := '(Get_batch_id 2) Get New batch_id';
713: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
714: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
715: END IF;
716:
717: SELECT ap_batches_s.nextval
718: INTO l_batch_id

Line 729: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

725: RETURN(TRUE);
726:
727: EXCEPTION
728: WHEN OTHERS then
729: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
730: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
731: END IF;
732:
733: IF (SQLCODE < 0) THEN

Line 730: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);

726:
727: EXCEPTION
728: WHEN OTHERS then
729: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
730: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
731: END IF;
732:
733: IF (SQLCODE < 0) THEN
734: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

Line 734: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

730: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
731: END IF;
732:
733: IF (SQLCODE < 0) THEN
734: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
735: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,SQLERRM);
736: END IF;
737: END IF;
738:

Line 735: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,SQLERRM);

731: END IF;
732:
733: IF (SQLCODE < 0) THEN
734: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
735: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,SQLERRM);
736: END IF;
737: END IF;
738:
739: RETURN (FALSE);

Line 761: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

757: 'AP_Import_Utilities_Pkg.get_auto_batch_name<-' ||p_calling_sequence;
758:
759: debug_info := '(Get_auto_batch_name 1) automatically create batch name';
760:
761: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
762: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
763: END IF;
764:
765: SELECT ap_batches_s2.nextval

Line 762: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);

758:
759: debug_info := '(Get_auto_batch_name 1) automatically create batch name';
760:
761: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
762: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
763: END IF;
764:
765: SELECT ap_batches_s2.nextval
766: INTO l_batch_num

Line 845: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

841: current_calling_sequence :=
842: 'AP_Import_Utilities_Pkg.Get_info<-'||P_calling_sequence;
843:
844: debug_info := '(Get_info 1) Read from ap_system_parameters';
845: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
846: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
847: END IF;
848:
849: SELECT

Line 846: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);

842: 'AP_Import_Utilities_Pkg.Get_info<-'||P_calling_sequence;
843:
844: debug_info := '(Get_info 1) Read from ap_system_parameters';
845: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
846: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
847: END IF;
848:
849: SELECT
850: set_of_books_id,

Line 895: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

891: ap_product_setup aps
892: WHERE asp.org_id = p_org_id;
893:
894: debug_info := '(Get_info 2) Get Batch Control Profile Option';
895: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
896: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
897: END IF;
898:
899: BEGIN

Line 896: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);

892: WHERE asp.org_id = p_org_id;
893:
894: debug_info := '(Get_info 2) Get Batch Control Profile Option';
895: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
896: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
897: END IF;
898:
899: BEGIN
900: FND_PROFILE.GET('AP_USE_INV_BATCH_CONTROLS',p_batch_control_flag);

Line 908: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

904: p_batch_control_flag := 'N';
905: END ;
906:
907: debug_info := '(Get_info 3) Get encumbrance option';
908: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
909: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
910: END IF;
911:
912: SELECT purch_encumbrance_flag, retainage_code_combination_id

Line 909: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);

905: END ;
906:
907: debug_info := '(Get_info 3) Get encumbrance option';
908: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
909: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
910: END IF;
911:
912: SELECT purch_encumbrance_flag, retainage_code_combination_id
913: INTO p_purch_encumbrance_flag, p_retainage_ccid

Line 918: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') then

914: FROM financials_system_params_all
915: WHERE org_id = p_org_id;
916:
917: debug_info := '(Get_info 4) Get minimum_accountable_unit';
918: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') then
919: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
920: END IF;
921:
922: FND_CURRENCY.GET_INFO(

Line 919: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);

915: WHERE org_id = p_org_id;
916:
917: debug_info := '(Get_info 4) Get minimum_accountable_unit';
918: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') then
919: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
920: END IF;
921:
922: FND_CURRENCY.GET_INFO(
923: p_base_currency_code ,

Line 929: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

925: l_ext_precision ,
926: p_base_min_acct_unit);
927:
928: debug_info := '(Get_info 5) Get p_sequence_numbering';
929: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
930: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
931: END IF;
932:
933: p_sequence_numbering := FND_PROFILE.VALUE('UNIQUE:SEQ_NUMBERS');

Line 930: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);

926: p_base_min_acct_unit);
927:
928: debug_info := '(Get_info 5) Get p_sequence_numbering';
929: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
930: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
931: END IF;
932:
933: p_sequence_numbering := FND_PROFILE.VALUE('UNIQUE:SEQ_NUMBERS');
934:

Line 937: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

933: p_sequence_numbering := FND_PROFILE.VALUE('UNIQUE:SEQ_NUMBERS');
934:
935:
936: debug_info := '(Get_info 6) Get gl_date based on report parameters';
937: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
938: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
939: END IF;
940:
941: -- Bug 5645581. Gl_date will calculated at the Import_Invoices

Line 938: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);

934:
935:
936: debug_info := '(Get_info 6) Get gl_date based on report parameters';
937: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
938: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
939: END IF;
940:
941: -- Bug 5645581. Gl_date will calculated at the Import_Invoices
942: -- Procedure in the Main Package

Line 947: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

943: /*IF p_source = 'ERS' THEN -- bug 5382889, LE TimeZone
944:
945: debug_info := 'Determine gl_date from ERS invoice';
946:
947: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
948: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
949: END IF;
950:
951: l_rts_txn_le_date := INV_LE_TIMEZONE_PUB.Get_Le_Day_For_Ou(

Line 948: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);

944:
945: debug_info := 'Determine gl_date from ERS invoice';
946:
947: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
948: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
949: END IF;
950:
951: l_rts_txn_le_date := INV_LE_TIMEZONE_PUB.Get_Le_Day_For_Ou(
952: p_trxn_date => nvl(p_goods_received_date, p_invoice_date)

Line 973: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

969: -- Note here that the Invoice date is no longer the same as the receipt_date,
970: -- i.e. the RETURN tranasaction_date , so case I and N are no longer the same
971:
972: debug_info := 'Determine invoice gl_date from LE Timezone API ';
973: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
974: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
975: END IF;
976:
977: If (p_gl_date_from_receipt_flag = 'I') Then

Line 974: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);

970: -- i.e. the RETURN tranasaction_date , so case I and N are no longer the same
971:
972: debug_info := 'Determine invoice gl_date from LE Timezone API ';
973: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
974: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
975: END IF;
976:
977: If (p_gl_date_from_receipt_flag = 'I') Then
978: l_inv_gl_date := l_inv_le_date;

Line 993: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

989: ELSE
990: IF (p_gl_date IS NULL) THEN
991: IF (p_gl_date_from_receipt_flag IN ('S','Y')) THEN
992: debug_info := '(Get_info 6a) GL Date is Sysdate';
993: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
994: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
995: END IF;
996:
997: p_gl_date := sysdate;

Line 994: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);

990: IF (p_gl_date IS NULL) THEN
991: IF (p_gl_date_from_receipt_flag IN ('S','Y')) THEN
992: debug_info := '(Get_info 6a) GL Date is Sysdate';
993: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
994: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
995: END IF;
996:
997: p_gl_date := sysdate;
998:

Line 1001: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

997: p_gl_date := sysdate;
998:
999: ELSE
1000: debug_info := '(Get_info 6b) GL Date should be Invoice Date';
1001: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
1002: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
1003: END IF;
1004: END IF;
1005: END IF;

Line 1002: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);

998:
999: ELSE
1000: debug_info := '(Get_info 6b) GL Date should be Invoice Date';
1001: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
1002: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
1003: END IF;
1004: END IF;
1005: END IF;
1006: END IF;

Line 1010: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

1006: END IF;
1007:
1008: p_gl_date := trunc(p_gl_date); */
1009: debug_info := '(Get_info 7) Check if PA is installed';
1010: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
1011: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
1012: END IF;
1013:
1014: IF (FND_INSTALLATION.GET(275, 275, l_status, l_industry)) THEN

Line 1011: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);

1007:
1008: p_gl_date := trunc(p_gl_date); */
1009: debug_info := '(Get_info 7) Check if PA is installed';
1010: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
1011: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
1012: END IF;
1013:
1014: IF (FND_INSTALLATION.GET(275, 275, l_status, l_industry)) THEN
1015: IF (l_status <> 'I') THEN

Line 1019: AP_IMPORT_INVOICES_PKG.g_pa_allows_overrides :=

1015: IF (l_status <> 'I') THEN
1016: P_PA_INSTALLED := 'N';
1017: ELSE
1018: P_PA_INSTALLED := 'Y';
1019: AP_IMPORT_INVOICES_PKG.g_pa_allows_overrides :=
1020: NVL(FND_PROFILE.VALUE('PA_ALLOW_FLEXBUILDER_OVERRIDES'), 'N');
1021: END IF;
1022: ELSE
1023: RAISE get_info_failure;

Line 1026: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

1022: ELSE
1023: RAISE get_info_failure;
1024: END IF;
1025:
1026: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
1027: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,
1028: '------------------> l_status = '|| l_status
1029: ||' l_industry = ' ||l_industry
1030: ||' p_pa_installed = '||p_pa_installed);

Line 1027: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,

1023: RAISE get_info_failure;
1024: END IF;
1025:
1026: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
1027: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,
1028: '------------------> l_status = '|| l_status
1029: ||' l_industry = ' ||l_industry
1030: ||' p_pa_installed = '||p_pa_installed);
1031: END IF;

Line 1034: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

1030: ||' p_pa_installed = '||p_pa_installed);
1031: END IF;
1032:
1033: debug_info := '(Get_info 8) Get chart_of_accounts_id from p_set_of_books_id';
1034: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
1035: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
1036: END IF;
1037:
1038: SELECT chart_of_accounts_id

Line 1035: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);

1031: END IF;
1032:
1033: debug_info := '(Get_info 8) Get chart_of_accounts_id from p_set_of_books_id';
1034: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
1035: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
1036: END IF;
1037:
1038: SELECT chart_of_accounts_id
1039: INTO p_chart_of_accounts_id

Line 1045: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

1041: WHERE set_of_books_id = p_set_of_books_id;
1042:
1043: -- Bug 5448579
1044: debug_info := '(Get_info 9) Get Asset Book Type Code';
1045: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
1046: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
1047: END IF;
1048: BEGIN
1049: SELECT count(*)

Line 1046: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);

1042:
1043: -- Bug 5448579
1044: debug_info := '(Get_info 9) Get Asset Book Type Code';
1045: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
1046: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
1047: END IF;
1048: BEGIN
1049: SELECT count(*)
1050: INTO l_asset_book_count

Line 1077: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

1073: NULL;
1074: END;
1075:
1076: debug_info := '(Get_info 9) Get system tolerances';
1077: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
1078: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
1079: END IF;
1080:
1081: -- For EDI transactions, if the price and qty tolerance is set to null

Line 1078: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);

1074: END;
1075:
1076: debug_info := '(Get_info 9) Get system tolerances';
1077: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
1078: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
1079: END IF;
1080:
1081: -- For EDI transactions, if the price and qty tolerance is set to null
1082: -- we assume this to be zero. This is implemented as per discussion with

Line 1117: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

1113:
1114:
1115: EXCEPTION
1116: WHEN OTHERS then
1117: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
1118: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
1119: END IF;
1120:
1121: IF (SQLCODE < 0) then

Line 1118: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);

1114:
1115: EXCEPTION
1116: WHEN OTHERS then
1117: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
1118: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
1119: END IF;
1120:
1121: IF (SQLCODE < 0) then
1122: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

Line 1122: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

1118: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
1119: END IF;
1120:
1121: IF (SQLCODE < 0) then
1122: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
1123: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,SQLERRM);
1124: END IF;
1125: END IF;
1126:

Line 1123: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,SQLERRM);

1119: END IF;
1120:
1121: IF (SQLCODE < 0) then
1122: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
1123: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,SQLERRM);
1124: END IF;
1125: END IF;
1126:
1127: RETURN (FALSE);

Line 1163: If AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' then

1159: l_price_tolerance ap_tolerance_templates.price_tolerance%TYPE;
1160: BEGIN
1161:
1162: debug_info := '(Get_tolerance_info 1) Get tolerance info...';
1163: If AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' then
1164: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
1165: End if;
1166:
1167: -- For EDI transactions, if the price and qty tolerance is set to null

Line 1164: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);

1160: BEGIN
1161:
1162: debug_info := '(Get_tolerance_info 1) Get tolerance info...';
1163: If AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' then
1164: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
1165: End if;
1166:
1167: -- For EDI transactions, if the price and qty tolerance is set to null
1168: -- we assume this to be zero. This is implemented as per discussion with

Line 1202: If AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' then

1198:
1199: EXCEPTION
1200: when no_data_found then
1201: debug_info := '(get_tolerance_info 1) NO_DATA_FOUND exception';
1202: If AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' then
1203: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
1204: End if;
1205: END;
1206:

Line 1203: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);

1199: EXCEPTION
1200: when no_data_found then
1201: debug_info := '(get_tolerance_info 1) NO_DATA_FOUND exception';
1202: If AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' then
1203: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
1204: End if;
1205: END;
1206:
1207:

Line 1233: If AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' then

1229:
1230: EXCEPTION WHEN NO_DATA_FOUND THEN
1231:
1232: debug_info := '(get_tolerance_info 2) NO_DATA_FOUND exception';
1233: If AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' then
1234: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
1235: End if;
1236:
1237: END;

Line 1234: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);

1230: EXCEPTION WHEN NO_DATA_FOUND THEN
1231:
1232: debug_info := '(get_tolerance_info 2) NO_DATA_FOUND exception';
1233: If AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' then
1234: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
1235: End if;
1236:
1237: END;
1238:

Line 1239: If AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' then

1235: End if;
1236:
1237: END;
1238:
1239: If AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' then
1240: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,'------------------> p_vendor_site_id = '||
1241: to_char(p_vendor_site_id)
1242: ||' l_price_tolerance = '||to_char(l_price_tolerance)
1243: ||' l_positive_price_tolerance = '||to_char(p_positive_price_tolerance)

Line 1240: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,'------------------> p_vendor_site_id = '||

1236:
1237: END;
1238:
1239: If AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' then
1240: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,'------------------> p_vendor_site_id = '||
1241: to_char(p_vendor_site_id)
1242: ||' l_price_tolerance = '||to_char(l_price_tolerance)
1243: ||' l_positive_price_tolerance = '||to_char(p_positive_price_tolerance)
1244: ||' l_negative_price_tolerance = '||to_char(p_negative_price_tolerance)

Line 1266: If AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' then

1262:
1263: EXCEPTION
1264:
1265: WHEN OTHERS then
1266: If AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' then
1267: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info); End if;
1268:
1269: IF (SQLCODE < 0) then
1270: If AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y'

Line 1267: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info); End if;

1263: EXCEPTION
1264:
1265: WHEN OTHERS then
1266: If AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' then
1267: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info); End if;
1268:
1269: IF (SQLCODE < 0) then
1270: If AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y'
1271: then Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,SQLERRM); End if;

Line 1270: If AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y'

1266: If AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' then
1267: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info); End if;
1268:
1269: IF (SQLCODE < 0) then
1270: If AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y'
1271: then Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,SQLERRM); End if;
1272: END IF;
1273:
1274: RETURN (FALSE);

Line 1271: then Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,SQLERRM); End if;

1267: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info); End if;
1268:
1269: IF (SQLCODE < 0) then
1270: If AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y'
1271: then Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,SQLERRM); End if;
1272: END IF;
1273:
1274: RETURN (FALSE);
1275:

Line 1301: AND NVL(trunc(PVS.INACTIVE_DATE),AP_IMPORT_INVOICES_PKG.g_inv_sysdate+1)

1297: FROM po_vendor_sites PVS
1298: WHERE vendor_id = p_vendor_id
1299: AND pay_site_flag = 'Y'
1300: AND primary_pay_site_flag = 'Y'
1301: AND NVL(trunc(PVS.INACTIVE_DATE),AP_IMPORT_INVOICES_PKG.g_inv_sysdate+1)
1302: > AP_IMPORT_INVOICES_PKG.g_inv_sysdate ;
1303:
1304: CURSOR pay_site_cur IS
1305: SELECT vendor_site_id

Line 1302: > AP_IMPORT_INVOICES_PKG.g_inv_sysdate ;

1298: WHERE vendor_id = p_vendor_id
1299: AND pay_site_flag = 'Y'
1300: AND primary_pay_site_flag = 'Y'
1301: AND NVL(trunc(PVS.INACTIVE_DATE),AP_IMPORT_INVOICES_PKG.g_inv_sysdate+1)
1302: > AP_IMPORT_INVOICES_PKG.g_inv_sysdate ;
1303:
1304: CURSOR pay_site_cur IS
1305: SELECT vendor_site_id
1306: FROM po_vendor_sites PVS

Line 1309: AND NVL(trunc(PVS.INACTIVE_DATE),AP_IMPORT_INVOICES_PKG.g_inv_sysdate+1)

1305: SELECT vendor_site_id
1306: FROM po_vendor_sites PVS
1307: WHERE vendor_id = p_vendor_id
1308: AND pay_site_flag = 'Y'
1309: AND NVL(trunc(PVS.INACTIVE_DATE),AP_IMPORT_INVOICES_PKG.g_inv_sysdate+1)
1310: > AP_IMPORT_INVOICES_PKG.g_inv_sysdate ;
1311:
1312: l_vendor_site_id PO_VENDOR_SITES.VENDOR_SITE_ID%TYPE;
1313: l_paysite_count NUMBER;

Line 1310: > AP_IMPORT_INVOICES_PKG.g_inv_sysdate ;

1306: FROM po_vendor_sites PVS
1307: WHERE vendor_id = p_vendor_id
1308: AND pay_site_flag = 'Y'
1309: AND NVL(trunc(PVS.INACTIVE_DATE),AP_IMPORT_INVOICES_PKG.g_inv_sysdate+1)
1310: > AP_IMPORT_INVOICES_PKG.g_inv_sysdate ;
1311:
1312: l_vendor_site_id PO_VENDOR_SITES.VENDOR_SITE_ID%TYPE;
1313: l_paysite_count NUMBER;
1314: current_calling_sequence VARCHAR2(2000);

Line 1325: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') then

1321: 'AP_IMPORT_UTILITIES_PKG.find_vendor_primary_paysite<-'
1322: ||P_calling_sequence;
1323:
1324: debug_info := '(Find vendor primary paysite 1) Get the primary paysite';
1325: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') then
1326: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
1327: END IF;
1328:
1329: OPEN primary_pay_site_cur;

Line 1326: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);

1322: ||P_calling_sequence;
1323:
1324: debug_info := '(Find vendor primary paysite 1) Get the primary paysite';
1325: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') then
1326: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
1327: END IF;
1328:
1329: OPEN primary_pay_site_cur;
1330: FETCH primary_pay_site_cur INTO l_vendor_site_id;

Line 1340: AND NVL(trunc(PVS.INACTIVE_DATE),AP_IMPORT_INVOICES_PKG.g_inv_sysdate+1)

1336: INTO l_paysite_count
1337: FROM po_vendor_sites PVS
1338: WHERE vendor_id = p_vendor_id
1339: AND pay_site_flag = 'Y'
1340: AND NVL(trunc(PVS.INACTIVE_DATE),AP_IMPORT_INVOICES_PKG.g_inv_sysdate+1)
1341: > AP_IMPORT_INVOICES_PKG.g_inv_sysdate ;
1342:
1343: IF ( l_paysite_count = 1 ) THEN
1344: OPEN pay_site_cur;

Line 1341: > AP_IMPORT_INVOICES_PKG.g_inv_sysdate ;

1337: FROM po_vendor_sites PVS
1338: WHERE vendor_id = p_vendor_id
1339: AND pay_site_flag = 'Y'
1340: AND NVL(trunc(PVS.INACTIVE_DATE),AP_IMPORT_INVOICES_PKG.g_inv_sysdate+1)
1341: > AP_IMPORT_INVOICES_PKG.g_inv_sysdate ;
1342:
1343: IF ( l_paysite_count = 1 ) THEN
1344: OPEN pay_site_cur;
1345: FETCH pay_site_cur INTO l_vendor_site_id;

Line 1360: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

1356:
1357: EXCEPTION
1358:
1359: WHEN OTHERS THEN
1360: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
1361: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
1362: END IF;
1363: IF (SQLCODE < 0) then
1364: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

Line 1361: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);

1357: EXCEPTION
1358:
1359: WHEN OTHERS THEN
1360: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
1361: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
1362: END IF;
1363: IF (SQLCODE < 0) then
1364: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
1365: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,SQLERRM);

Line 1364: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

1360: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
1361: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
1362: END IF;
1363: IF (SQLCODE < 0) then
1364: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
1365: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,SQLERRM);
1366: END IF;
1367: END IF;
1368:

Line 1365: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,SQLERRM);

1361: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
1362: END IF;
1363: IF (SQLCODE < 0) then
1364: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
1365: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,SQLERRM);
1366: END IF;
1367: END IF;
1368:
1369: RETURN (FALSE);

Line 1397: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

1393: current_calling_sequence := 'get_employee_id<-'||P_calling_sequence;
1394:
1395: BEGIN
1396: debug_info := '(Get_employee_id 1) Get employee id from po_vendors';
1397: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
1398: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
1399: END IF;
1400:
1401: SELECT employee_id

Line 1398: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);

1394:
1395: BEGIN
1396: debug_info := '(Get_employee_id 1) Get employee id from po_vendors';
1397: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
1398: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
1399: END IF;
1400:
1401: SELECT employee_id
1402: INTO l_employee_id

Line 1413: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') then

1409: -- Potentially this should never happen
1410: -- as vendor is already validated at the invoice level
1411:
1412: debug_info := '(Get_employee_id 2) Vendor Id is invalid';
1413: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') then
1414: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
1415: END IF;
1416:
1417: -- Reject Here for Invalid Vendor

Line 1414: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);

1410: -- as vendor is already validated at the invoice level
1411:
1412: debug_info := '(Get_employee_id 2) Vendor Id is invalid';
1413: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') then
1414: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
1415: END IF;
1416:
1417: -- Reject Here for Invalid Vendor
1418:

Line 1420: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

1416:
1417: -- Reject Here for Invalid Vendor
1418:
1419: debug_info := '(Get emloyee_id 3) Check for invalid Supplier.';
1420: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
1421: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
1422: END IF;
1423:
1424: IF (insert_rejections(AP_IMPORT_INVOICES_PKG.g_invoices_table,

Line 1421: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);

1417: -- Reject Here for Invalid Vendor
1418:
1419: debug_info := '(Get emloyee_id 3) Check for invalid Supplier.';
1420: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
1421: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
1422: END IF;
1423:
1424: IF (insert_rejections(AP_IMPORT_INVOICES_PKG.g_invoices_table,
1425: p_invoice_id,

Line 1424: IF (insert_rejections(AP_IMPORT_INVOICES_PKG.g_invoices_table,

1420: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
1421: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
1422: END IF;
1423:
1424: IF (insert_rejections(AP_IMPORT_INVOICES_PKG.g_invoices_table,
1425: p_invoice_id,
1426: 'INVALID SUPPLIER',
1427: p_default_last_updated_by,
1428: p_default_last_update_login,

Line 1430: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') then

1426: 'INVALID SUPPLIER',
1427: p_default_last_updated_by,
1428: p_default_last_update_login,
1429: current_calling_sequence) <> TRUE) THEN
1430: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') then
1431: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,
1432: 'insert_rejections<-'||current_calling_sequence);
1433: END IF;
1434: RAISE get_employee_failure;

Line 1431: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,

1427: p_default_last_updated_by,
1428: p_default_last_update_login,
1429: current_calling_sequence) <> TRUE) THEN
1430: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') then
1431: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,
1432: 'insert_rejections<-'||current_calling_sequence);
1433: END IF;
1434: RAISE get_employee_failure;
1435: END IF;

Line 1444: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

1440:
1441: -- We shall not reject if employee id is Null
1442:
1443: debug_info := '(Get_employee_id 3) Employee_id id Null';
1444: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
1445: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
1446: END IF;
1447:
1448: END IF;

Line 1445: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);

1441: -- We shall not reject if employee id is Null
1442:
1443: debug_info := '(Get_employee_id 3) Employee_id id Null';
1444: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
1445: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
1446: END IF;
1447:
1448: END IF;
1449: --

Line 1457: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

1453: RETURN(TRUE);
1454:
1455: EXCEPTION
1456: WHEN OTHERS THEN
1457: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
1458: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
1459: END IF;
1460:
1461: IF (SQLCODE < 0) THEN

Line 1458: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);

1454:
1455: EXCEPTION
1456: WHEN OTHERS THEN
1457: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
1458: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
1459: END IF;
1460:
1461: IF (SQLCODE < 0) THEN
1462: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

Line 1462: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

1458: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
1459: END IF;
1460:
1461: IF (SQLCODE < 0) THEN
1462: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
1463: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,SQLERRM);
1464: END IF;
1465: END IF;
1466:

Line 1463: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,SQLERRM);

1459: END IF;
1460:
1461: IF (SQLCODE < 0) THEN
1462: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
1463: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,SQLERRM);
1464: END IF;
1465: END IF;
1466:
1467: RETURN (FALSE);

Line 1496: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

1492: --------------------------------------------------------------------------
1493:
1494: debug_info := '(Get Next Dist Line Num 1) Get the next available '||
1495: 'distribution line number';
1496: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
1497: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
1498: END IF;
1499:
1500: /* For bug 3929697

Line 1497: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);

1493:
1494: debug_info := '(Get Next Dist Line Num 1) Get the next available '||
1495: 'distribution line number';
1496: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
1497: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
1498: END IF;
1499:
1500: /* For bug 3929697
1501: * Before executing the select for getting the value

Line 1533: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

1529: lg_dist_line_num := p_next_dist_num;
1530: RETURN(TRUE);
1531:
1532: WHEN OTHERS THEN
1533: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
1534: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
1535: END IF;
1536:
1537: IF (SQLCODE < 0) THEN

Line 1534: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);

1530: RETURN(TRUE);
1531:
1532: WHEN OTHERS THEN
1533: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
1534: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
1535: END IF;
1536:
1537: IF (SQLCODE < 0) THEN
1538: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

Line 1538: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

1534: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
1535: END IF;
1536:
1537: IF (SQLCODE < 0) THEN
1538: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
1539: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,SQLERRM);
1540: END IF;
1541: END IF;
1542:

Line 1539: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,SQLERRM);

1535: END IF;
1536:
1537: IF (SQLCODE < 0) THEN
1538: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
1539: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,SQLERRM);
1540: END IF;
1541: END IF;
1542:
1543: RETURN (FALSE);

Line 1574: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

1570: -- Step 1
1571: -- Get quantity_outstanding
1572: ----------------------------------------------------------------------------
1573: debug_info := '(Get Overbill for PO Line 1) Get quantity_outstanding';
1574: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
1575: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
1576: END IF;
1577:
1578: --Contract Payments: Modified the SELECT clause

Line 1575: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);

1571: -- Get quantity_outstanding
1572: ----------------------------------------------------------------------------
1573: debug_info := '(Get Overbill for PO Line 1) Get quantity_outstanding';
1574: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
1575: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
1576: END IF;
1577:
1578: --Contract Payments: Modified the SELECT clause
1579: /*-----------------------------------------------------------------------------------------+

Line 1663: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

1659: -- bug fix 6959362 starts
1660: group by pl.matching_basis, pll.shipment_type;
1661: -- bug fix 6959362 ends
1662:
1663: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
1664: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,
1665: '------------------> p_outstanding = '
1666: ||to_char(p_outstanding)
1667: ||' p_ordered = '||to_char(p_ordered)

Line 1664: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,

1660: group by pl.matching_basis, pll.shipment_type;
1661: -- bug fix 6959362 ends
1662:
1663: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
1664: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,
1665: '------------------> p_outstanding = '
1666: ||to_char(p_outstanding)
1667: ||' p_ordered = '||to_char(p_ordered)
1668: ||' p_already_billed = '||to_char(p_already_billed));

Line 1694: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

1690: RETURN(TRUE);
1691:
1692: EXCEPTION
1693: WHEN OTHERS THEN
1694: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
1695: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
1696: END IF;
1697:
1698: IF (SQLCODE < 0) THEN

Line 1695: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);

1691:
1692: EXCEPTION
1693: WHEN OTHERS THEN
1694: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
1695: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
1696: END IF;
1697:
1698: IF (SQLCODE < 0) THEN
1699: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

Line 1699: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

1695: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
1696: END IF;
1697:
1698: IF (SQLCODE < 0) THEN
1699: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
1700: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,SQLERRM);
1701: END IF;
1702: END IF;
1703:

Line 1700: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,SQLERRM);

1696: END IF;
1697:
1698: IF (SQLCODE < 0) THEN
1699: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
1700: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,SQLERRM);
1701: END IF;
1702: END IF;
1703:
1704: RETURN (FALSE);

Line 1711: AP_IMPORT_INVOICES_PKG.r_invoice_info_rec,

1707:
1708:
1709: FUNCTION pa_flexbuild (
1710: p_invoice_rec IN
1711: AP_IMPORT_INVOICES_PKG.r_invoice_info_rec,
1712: p_invoice_lines_rec IN OUT NOCOPY
1713: AP_IMPORT_INVOICES_PKG.r_line_info_rec,
1714: p_accounting_date IN DATE,
1715: p_pa_installed IN VARCHAR2,

Line 1713: AP_IMPORT_INVOICES_PKG.r_line_info_rec,

1709: FUNCTION pa_flexbuild (
1710: p_invoice_rec IN
1711: AP_IMPORT_INVOICES_PKG.r_invoice_info_rec,
1712: p_invoice_lines_rec IN OUT NOCOPY
1713: AP_IMPORT_INVOICES_PKG.r_line_info_rec,
1714: p_accounting_date IN DATE,
1715: p_pa_installed IN VARCHAR2,
1716: p_employee_id IN NUMBER,
1717: p_base_currency_code IN VARCHAR2,

Line 1761: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

1757: -- Step 1
1758: ----------------------------------------------------------------------------
1759:
1760: debug_info := '(PA Flexbuild 1) Check for PA installation and Project Info';
1761: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
1762: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
1763: END IF;
1764:
1765: IF (p_pa_installed = 'Y' AND

Line 1762: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);

1758: ----------------------------------------------------------------------------
1759:
1760: debug_info := '(PA Flexbuild 1) Check for PA installation and Project Info';
1761: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
1762: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
1763: END IF;
1764:
1765: IF (p_pa_installed = 'Y' AND
1766: p_invoice_lines_rec.project_id is not null) THEN

Line 1773: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

1769: -- installed and there is a project_id; that is, the invoice is
1770: -- project-related.
1771:
1772: debug_info := '(PA Flexbuild 1) Get User Id';
1773: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
1774: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
1775: END IF;
1776:
1777: user_id := to_number(FND_GLOBAL.USER_ID);

Line 1774: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);

1770: -- project-related.
1771:
1772: debug_info := '(PA Flexbuild 1) Get User Id';
1773: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
1774: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
1775: END IF;
1776:
1777: user_id := to_number(FND_GLOBAL.USER_ID);
1778:

Line 1780: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') then

1776:
1777: user_id := to_number(FND_GLOBAL.USER_ID);
1778:
1779: debug_info := '(PA Flexbuild 1) PA_TRANSACTIONS_PUB.VALIDATE_TRANSACTION';
1780: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') then
1781: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
1782: END IF;
1783:
1784: --bugfix:5725904

Line 1781: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);

1777: user_id := to_number(FND_GLOBAL.USER_ID);
1778:
1779: debug_info := '(PA Flexbuild 1) PA_TRANSACTIONS_PUB.VALIDATE_TRANSACTION';
1780: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') then
1781: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
1782: END IF;
1783:
1784: --bugfix:5725904
1785: If (p_invoice_rec.invoice_type_lookup_code ='EXPENSE REPORT') Then

Line 1845: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

1841: IF (l_msg_data IS NOT NULL) THEN
1842: debug_info :=
1843: '(PA Flexbuild 1) PA_TRANSACTIONS_PUB.VALIDATE_TRANSACTION '||
1844: 'Failed :Insert Rejection';
1845: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
1846: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
1847: END IF;
1848:
1849: -- Bug 5214592 . Added the debug message.

Line 1846: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);

1842: debug_info :=
1843: '(PA Flexbuild 1) PA_TRANSACTIONS_PUB.VALIDATE_TRANSACTION '||
1844: 'Failed :Insert Rejection';
1845: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
1846: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
1847: END IF;
1848:
1849: -- Bug 5214592 . Added the debug message.
1850: debug_info := SUBSTR(l_msg_data,1,80);

Line 1851: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

1847: END IF;
1848:
1849: -- Bug 5214592 . Added the debug message.
1850: debug_info := SUBSTR(l_msg_data,1,80);
1851: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
1852: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
1853: END IF;
1854:
1855:

Line 1852: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);

1848:
1849: -- Bug 5214592 . Added the debug message.
1850: debug_info := SUBSTR(l_msg_data,1,80);
1851: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
1852: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
1853: END IF;
1854:
1855:
1856: IF (AP_IMPORT_UTILITIES_PKG.insert_rejections(

Line 1857: AP_IMPORT_INVOICES_PKG.g_invoice_lines_table,

1853: END IF;
1854:
1855:
1856: IF (AP_IMPORT_UTILITIES_PKG.insert_rejections(
1857: AP_IMPORT_INVOICES_PKG.g_invoice_lines_table,
1858: p_invoice_lines_rec.invoice_line_id,
1859: 'PA FLEXBUILD FAILED',
1860: p_default_last_updated_by,
1861: p_default_last_update_login,

Line 1863: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

1859: 'PA FLEXBUILD FAILED',
1860: p_default_last_updated_by,
1861: p_default_last_update_login,
1862: current_calling_sequence) <> TRUE) THEN
1863: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
1864: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,
1865: 'insert_rejections<- '||current_calling_sequence);
1866: END IF;
1867: RAISE pa_flexbuild_failure;

Line 1864: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,

1860: p_default_last_updated_by,
1861: p_default_last_update_login,
1862: current_calling_sequence) <> TRUE) THEN
1863: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
1864: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,
1865: 'insert_rejections<- '||current_calling_sequence);
1866: END IF;
1867: RAISE pa_flexbuild_failure;
1868: END IF;

Line 1881: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

1877: -- Step 2 - Flexbuild
1878: --------------------------------------------------------------------------
1879:
1880: debug_info := '(PA Flexbuild 2) Call for flexbuilding';
1881: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
1882: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
1883: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,
1884: '------------> '
1885: ||' P_CHART_OF_ACCOUNTS_ID = '||to_char(P_CHART_OF_ACCOUNTS_ID)

Line 1882: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);

1878: --------------------------------------------------------------------------
1879:
1880: debug_info := '(PA Flexbuild 2) Call for flexbuilding';
1881: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
1882: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
1883: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,
1884: '------------> '
1885: ||' P_CHART_OF_ACCOUNTS_ID = '||to_char(P_CHART_OF_ACCOUNTS_ID)
1886: ||' PROJECT_ID = '||to_char(P_invoice_lines_rec.PROJECT_ID)

Line 1883: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,

1879:
1880: debug_info := '(PA Flexbuild 2) Call for flexbuilding';
1881: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
1882: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
1883: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,
1884: '------------> '
1885: ||' P_CHART_OF_ACCOUNTS_ID = '||to_char(P_CHART_OF_ACCOUNTS_ID)
1886: ||' PROJECT_ID = '||to_char(P_invoice_lines_rec.PROJECT_ID)
1887: ||' TASK_ID = '||to_char(P_invoice_lines_rec.TASK_ID)

Line 1901: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') then

1897:
1898: debug_info :=
1899: '(PA Flexbuild 2) Call pa_acc_gen_wf_pkg.ap_inv_generate_account '||
1900: 'for flexbuilding';
1901: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') then
1902: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
1903: END IF;
1904:
1905: IF ( NOT pa_acc_gen_wf_pkg.ap_inv_generate_account (

Line 1902: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);

1898: debug_info :=
1899: '(PA Flexbuild 2) Call pa_acc_gen_wf_pkg.ap_inv_generate_account '||
1900: 'for flexbuilding';
1901: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') then
1902: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
1903: END IF;
1904:
1905: IF ( NOT pa_acc_gen_wf_pkg.ap_inv_generate_account (
1906: p_project_id => p_invoice_lines_rec.project_id,

Line 1964: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

1960: fnd_message.set_encoded(l_errmsg);
1961: l_errmsg := fnd_message.get;
1962: -- CHANGES FOR BUG - 3657665 ** ENDS **
1963:
1964: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
1965: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,
1966: '------------> l_errmsg '|| l_errmsg);
1967: END IF;
1968:

Line 1965: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,

1961: l_errmsg := fnd_message.get;
1962: -- CHANGES FOR BUG - 3657665 ** ENDS **
1963:
1964: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
1965: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,
1966: '------------> l_errmsg '|| l_errmsg);
1967: END IF;
1968:
1969: -- REJECT here

Line 1974: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

1970:
1971: debug_info :=
1972: '(PA Flexbuild 2) pa_acc_gen_wf_pkg.ap_inv_generate_account '||
1973: 'Failed :Insert Rejection';
1974: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
1975: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
1976: END IF;
1977:
1978: IF (AP_IMPORT_UTILITIES_PKG.insert_rejections(

Line 1975: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);

1971: debug_info :=
1972: '(PA Flexbuild 2) pa_acc_gen_wf_pkg.ap_inv_generate_account '||
1973: 'Failed :Insert Rejection';
1974: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
1975: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
1976: END IF;
1977:
1978: IF (AP_IMPORT_UTILITIES_PKG.insert_rejections(
1979: AP_IMPORT_INVOICES_PKG.g_invoice_lines_table,

Line 1979: AP_IMPORT_INVOICES_PKG.g_invoice_lines_table,

1975: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
1976: END IF;
1977:
1978: IF (AP_IMPORT_UTILITIES_PKG.insert_rejections(
1979: AP_IMPORT_INVOICES_PKG.g_invoice_lines_table,
1980: p_invoice_lines_rec.invoice_line_id,
1981: 'PA FLEXBUILD FAILED',
1982: p_default_last_updated_by,
1983: p_default_last_update_login,

Line 1986: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

1982: p_default_last_updated_by,
1983: p_default_last_update_login,
1984: current_calling_sequence) <> TRUE) THEN
1985:
1986: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
1987: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,
1988: 'insert_rejections<- '||current_calling_sequence);
1989: END IF;
1990: RAISE pa_flexbuild_failure;

Line 1987: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,

1983: p_default_last_update_login,
1984: current_calling_sequence) <> TRUE) THEN
1985:
1986: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
1987: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,
1988: 'insert_rejections<- '||current_calling_sequence);
1989: END IF;
1990: RAISE pa_flexbuild_failure;
1991: END IF;

Line 2002: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

1998:
1999: END IF; -- If not pa generate account
2000:
2001: debug_info := '(PA Flexbuild 2) Return Concatenated Segments';
2002: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
2003: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
2004: END IF;
2005:
2006: P_PA_CONCATENATED_SEGMENTS := l_concat_segs;

Line 2003: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);

1999: END IF; -- If not pa generate account
2000:
2001: debug_info := '(PA Flexbuild 2) Return Concatenated Segments';
2002: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
2003: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
2004: END IF;
2005:
2006: P_PA_CONCATENATED_SEGMENTS := l_concat_segs;
2007: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

Line 2007: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

2003: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
2004: END IF;
2005:
2006: P_PA_CONCATENATED_SEGMENTS := l_concat_segs;
2007: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
2008: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,
2009: '------------> p_pa_default_dist_ccid = '
2010: || to_char(p_pa_default_dist_ccid)
2011: ||' p_pa_concatenated_segments = '||p_pa_concatenated_segments

Line 2008: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,

2004: END IF;
2005:
2006: P_PA_CONCATENATED_SEGMENTS := l_concat_segs;
2007: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
2008: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,
2009: '------------> p_pa_default_dist_ccid = '
2010: || to_char(p_pa_default_dist_ccid)
2011: ||' p_pa_concatenated_segments = '||p_pa_concatenated_segments
2012: ||' l_concat_segs = '||l_concat_segs

Line 2021: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

2017: END IF;
2018: END IF; -- pa installed and project id is not null
2019:
2020: debug_info := '(PA Flexbuild 3) Return Invoice Status';
2021: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
2022: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
2023: END IF;
2024:
2025: p_current_invoice_status := l_current_invoice_status;

Line 2022: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);

2018: END IF; -- pa installed and project id is not null
2019:
2020: debug_info := '(PA Flexbuild 3) Return Invoice Status';
2021: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
2022: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
2023: END IF;
2024:
2025: p_current_invoice_status := l_current_invoice_status;
2026: RETURN(TRUE);

Line 2030: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

2026: RETURN(TRUE);
2027:
2028: EXCEPTION
2029: WHEN OTHERS THEN
2030: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
2031: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
2032: END IF;
2033: IF (SQLCODE < 0) THEN
2034: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

Line 2031: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);

2027:
2028: EXCEPTION
2029: WHEN OTHERS THEN
2030: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
2031: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
2032: END IF;
2033: IF (SQLCODE < 0) THEN
2034: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
2035: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, SQLERRM);

Line 2034: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

2030: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
2031: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
2032: END IF;
2033: IF (SQLCODE < 0) THEN
2034: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
2035: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, SQLERRM);
2036: END IF;
2037: END IF;
2038:

Line 2035: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, SQLERRM);

2031: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
2032: END IF;
2033: IF (SQLCODE < 0) THEN
2034: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
2035: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, SQLERRM);
2036: END IF;
2037: END IF;
2038:
2039: RETURN (FALSE);

Line 2130: AP_IMPORT_INVOICES_PKG.r_invoice_info_rec,

2126: ============================================================================*/
2127:
2128: FUNCTION get_doc_sequence(
2129: p_invoice_rec IN OUT
2130: AP_IMPORT_INVOICES_PKG.r_invoice_info_rec,
2131: p_inv_doc_cat_override IN VARCHAR2,
2132: p_set_of_books_id IN NUMBER,
2133: p_sequence_numbering IN VARCHAR2,
2134: p_default_last_updated_by IN NUMBER,

Line 2169: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

2165: -- Reject if Doc category provided is provided by user in this case.
2166: --------------------------------------------------------------------------
2167:
2168: debug_info := '(Get Doc Sequence 1) Reject Seq Num is not enabled ';
2169: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
2170: Print( AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
2171: END IF;
2172:
2173: IF (AP_IMPORT_UTILITIES_PKG.insert_rejections(

Line 2170: Print( AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);

2166: --------------------------------------------------------------------------
2167:
2168: debug_info := '(Get Doc Sequence 1) Reject Seq Num is not enabled ';
2169: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
2170: Print( AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
2171: END IF;
2172:
2173: IF (AP_IMPORT_UTILITIES_PKG.insert_rejections(
2174: 'AP_INVOICE_INTERFACE',

Line 2180: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

2176: 'DOC CAT NOT REQD',
2177: p_default_last_updated_by,
2178: p_default_last_update_login,
2179: current_calling_sequence) <> TRUE) THEN
2180: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
2181: Print( AP_IMPORT_INVOICES_PKG.g_debug_switch,
2182: 'insert_rejections<- '||current_calling_sequence);
2183: END IF;
2184: RAISE get_doc_seq_failure;

Line 2181: Print( AP_IMPORT_INVOICES_PKG.g_debug_switch,

2177: p_default_last_updated_by,
2178: p_default_last_update_login,
2179: current_calling_sequence) <> TRUE) THEN
2180: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
2181: Print( AP_IMPORT_INVOICES_PKG.g_debug_switch,
2182: 'insert_rejections<- '||current_calling_sequence);
2183: END IF;
2184: RAISE get_doc_seq_failure;
2185: l_current_invoice_status := 'N';

Line 2199: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

2195: -------------------------------------------------------------------------
2196: IF (p_invoice_rec.doc_category_code IS NOT NULL) THEN
2197: debug_info := '(Get Doc Sequence 2) Seq Numbering is enabled AND doc_cat'
2198: || ' is not null process doc category ';
2199: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
2200: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
2201: END IF;
2202:
2203: IF (p_inv_doc_cat_override = 'Y') THEN

Line 2200: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);

2196: IF (p_invoice_rec.doc_category_code IS NOT NULL) THEN
2197: debug_info := '(Get Doc Sequence 2) Seq Numbering is enabled AND doc_cat'
2198: || ' is not null process doc category ';
2199: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
2200: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
2201: END IF;
2202:
2203: IF (p_inv_doc_cat_override = 'Y') THEN
2204: ---------------------------------------------------------------------

Line 2209: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

2205: -- Step 2.1
2206: -- Doc Category Override is allowed
2207: ---------------------------------------------------------------------
2208: debug_info := '(Get Doc Sequence 2.1) Doc Category Override allowed';
2209: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
2210: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
2211: END IF;
2212:
2213: -- Reject if category is a seeded one and not allowed in this case

Line 2210: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);

2206: -- Doc Category Override is allowed
2207: ---------------------------------------------------------------------
2208: debug_info := '(Get Doc Sequence 2.1) Doc Category Override allowed';
2209: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
2210: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
2211: END IF;
2212:
2213: -- Reject if category is a seeded one and not allowed in this case
2214:

Line 2254: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

2250: 'REC INV',
2251: 'WIRE PAY'))) THEN
2252:
2253: debug_info := '(Get Doc Sequence 2.1) Reject->category seeded one';
2254: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
2255: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
2256: END IF;
2257:
2258: IF (AP_IMPORT_UTILITIES_PKG.insert_rejections(

Line 2255: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);

2251: 'WIRE PAY'))) THEN
2252:
2253: debug_info := '(Get Doc Sequence 2.1) Reject->category seeded one';
2254: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
2255: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
2256: END IF;
2257:
2258: IF (AP_IMPORT_UTILITIES_PKG.insert_rejections(
2259: AP_IMPORT_INVOICES_PKG.g_invoices_table,

Line 2259: AP_IMPORT_INVOICES_PKG.g_invoices_table,

2255: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
2256: END IF;
2257:
2258: IF (AP_IMPORT_UTILITIES_PKG.insert_rejections(
2259: AP_IMPORT_INVOICES_PKG.g_invoices_table,
2260: p_invoice_rec.invoice_id,
2261: 'INVALID DOC CATEGORY',
2262: p_default_last_updated_by,
2263: p_default_last_update_login,

Line 2267: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

2263: p_default_last_update_login,
2264: current_calling_sequence) <> TRUE) THEN
2265:
2266: debug_info := 'insert_rejections<- '||current_calling_sequence;
2267: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
2268: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
2269: END IF;
2270: RAISE get_doc_seq_failure;
2271: END IF;

Line 2268: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);

2264: current_calling_sequence) <> TRUE) THEN
2265:
2266: debug_info := 'insert_rejections<- '||current_calling_sequence;
2267: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
2268: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
2269: END IF;
2270: RAISE get_doc_seq_failure;
2271: END IF;
2272: l_current_invoice_status := 'N';

Line 2281: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

2277: -- Validate Doc Category
2278: -----------------------------------------------------------------------
2279: debug_info := '(Get Doc Sequence 2.2) Check Doc Category ' ||
2280: 'exists and valid';
2281: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
2282: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
2283: END IF;
2284:
2285: BEGIN

Line 2282: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);

2278: -----------------------------------------------------------------------
2279: debug_info := '(Get Doc Sequence 2.2) Check Doc Category ' ||
2280: 'exists and valid';
2281: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
2282: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
2283: END IF;
2284:
2285: BEGIN
2286: SELECT name, application_id

Line 2294: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

2290: AND table_name IN ('AP_INVOICES','AP_INVOICES_ALL');
2291: EXCEPTION
2292: WHEN NO_DATA_FOUND THEN
2293: debug_info := debug_info || 'Reject->Doc cat does not exist';
2294: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
2295: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
2296: END IF;
2297: IF (AP_IMPORT_UTILITIES_PKG.insert_rejections(
2298: AP_IMPORT_INVOICES_PKG.g_invoices_table,

Line 2295: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);

2291: EXCEPTION
2292: WHEN NO_DATA_FOUND THEN
2293: debug_info := debug_info || 'Reject->Doc cat does not exist';
2294: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
2295: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
2296: END IF;
2297: IF (AP_IMPORT_UTILITIES_PKG.insert_rejections(
2298: AP_IMPORT_INVOICES_PKG.g_invoices_table,
2299: p_invoice_rec.invoice_id,

Line 2298: AP_IMPORT_INVOICES_PKG.g_invoices_table,

2294: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
2295: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
2296: END IF;
2297: IF (AP_IMPORT_UTILITIES_PKG.insert_rejections(
2298: AP_IMPORT_INVOICES_PKG.g_invoices_table,
2299: p_invoice_rec.invoice_id,
2300: 'INVALID DOC CATEGORY',
2301: p_default_last_updated_by,
2302: p_default_last_update_login,

Line 2306: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

2302: p_default_last_update_login,
2303: current_calling_sequence) <> TRUE) THEN
2304:
2305: debug_info := 'insert_rejections<- '||current_calling_sequence;
2306: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
2307: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
2308: END IF;
2309: RAISE get_doc_seq_failure;
2310: END IF;

Line 2307: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);

2303: current_calling_sequence) <> TRUE) THEN
2304:
2305: debug_info := 'insert_rejections<- '||current_calling_sequence;
2306: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
2307: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
2308: END IF;
2309: RAISE get_doc_seq_failure;
2310: END IF;
2311: l_current_invoice_status := 'N';

Line 2321: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

2317: -- Reject Override not allowed
2318: -----------------------------------------------------------------------
2319:
2320: debug_info := '(Get Doc Sequence 3) Reject->cat override not allowed';
2321: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
2322: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
2323: END IF;
2324:
2325: IF (AP_IMPORT_UTILITIES_PKG.insert_rejections(

Line 2322: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);

2318: -----------------------------------------------------------------------
2319:
2320: debug_info := '(Get Doc Sequence 3) Reject->cat override not allowed';
2321: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
2322: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
2323: END IF;
2324:
2325: IF (AP_IMPORT_UTILITIES_PKG.insert_rejections(
2326: AP_IMPORT_INVOICES_PKG.g_invoices_table,

Line 2326: AP_IMPORT_INVOICES_PKG.g_invoices_table,

2322: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
2323: END IF;
2324:
2325: IF (AP_IMPORT_UTILITIES_PKG.insert_rejections(
2326: AP_IMPORT_INVOICES_PKG.g_invoices_table,
2327: p_invoice_rec.invoice_id,
2328: 'OVERRIDE DISALLOWED',
2329: p_default_last_updated_by,
2330: p_default_last_update_login,

Line 2333: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

2329: p_default_last_updated_by,
2330: p_default_last_update_login,
2331: current_calling_sequence) <> TRUE) THEN
2332: debug_info := 'insert_rejections<- '||current_calling_sequence;
2333: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
2334: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
2335: END IF;
2336: RAISE get_doc_seq_failure;
2337: END IF;

Line 2334: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);

2330: p_default_last_update_login,
2331: current_calling_sequence) <> TRUE) THEN
2332: debug_info := 'insert_rejections<- '||current_calling_sequence;
2333: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
2334: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
2335: END IF;
2336: RAISE get_doc_seq_failure;
2337: END IF;
2338: l_current_invoice_status := 'N';

Line 2347: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

2343: -- Step 4
2344: -- Use Default Doc Category
2345: ---------------------------------------------------------------------
2346: debug_info := '(Get Doc Sequence 4) Use Default Category, Seq:Always';
2347: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
2348: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
2349: END IF;
2350:
2351: --Contract Payments: Modified the IF condition to look at the invoice_type

Line 2348: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);

2344: -- Use Default Doc Category
2345: ---------------------------------------------------------------------
2346: debug_info := '(Get Doc Sequence 4) Use Default Category, Seq:Always';
2347: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
2348: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
2349: END IF;
2350:
2351: --Contract Payments: Modified the IF condition to look at the invoice_type
2352: --rather than the sign of the invoice_amount in deciding which category to

Line 2370: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

2366: l_doc_category_code := 'PREPAY INV';
2367: END IF;
2368:
2369: debug_info := '-----> l_doc_category_code = ' || l_doc_category_code ;
2370: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
2371: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
2372: END IF;
2373: END IF; -- end of check Doc_category_code is not null
2374:

Line 2371: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);

2367: END IF;
2368:
2369: debug_info := '-----> l_doc_category_code = ' || l_doc_category_code ;
2370: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
2371: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
2372: END IF;
2373: END IF; -- end of check Doc_category_code is not null
2374:
2375: ---------------------------------------------------------------------------

Line 2385: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

2381: (l_current_invoice_status = 'Y')) THEN
2382:
2383: debug_info := '(Get Doc Sequence 5) Valid Category ->Check if valid ' ||
2384: ' Sequence assigned';
2385: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
2386: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
2387: END IF;
2388:
2389: BEGIN

Line 2386: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);

2382:
2383: debug_info := '(Get Doc Sequence 5) Valid Category ->Check if valid ' ||
2384: ' Sequence assigned';
2385: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
2386: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
2387: END IF;
2388:
2389: BEGIN
2390: SELECT SEQ.DB_SEQUENCE_NAME,

Line 2405: AP_IMPORT_INVOICES_PKG.g_inv_sysdate) between

2401: AND NVL(SA.METHOD_CODE,'A') = 'A'
2402: AND NVL(SA.SET_OF_BOOKS_ID,
2403: p_set_of_books_id) = p_set_of_books_id -- 3817492
2404: AND NVL(p_invoice_rec.gl_date,
2405: AP_IMPORT_INVOICES_PKG.g_inv_sysdate) between
2406: SA.START_DATE and
2407: NVL(SA.END_DATE, TO_DATE('31/12/4712','DD/MM/YYYY'));
2408:
2409: -- Bug 5064959 starts. Check for inconsistent Voucher info. When a valid sequence exists ,

Line 2415: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

2411:
2412: If (p_invoice_rec.voucher_num IS NOT NULL) Then
2413:
2414: debug_info := '(Get Doc Sequence 5) Reject: Inconsistent Voucher Info';
2415: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
2416: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
2417: END IF;
2418:
2419: IF (AP_IMPORT_UTILITIES_PKG.insert_rejections( AP_IMPORT_INVOICES_PKG.g_invoices_table,

Line 2416: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);

2412: If (p_invoice_rec.voucher_num IS NOT NULL) Then
2413:
2414: debug_info := '(Get Doc Sequence 5) Reject: Inconsistent Voucher Info';
2415: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
2416: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
2417: END IF;
2418:
2419: IF (AP_IMPORT_UTILITIES_PKG.insert_rejections( AP_IMPORT_INVOICES_PKG.g_invoices_table,
2420: p_invoice_rec.invoice_id,

Line 2419: IF (AP_IMPORT_UTILITIES_PKG.insert_rejections( AP_IMPORT_INVOICES_PKG.g_invoices_table,

2415: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
2416: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
2417: END IF;
2418:
2419: IF (AP_IMPORT_UTILITIES_PKG.insert_rejections( AP_IMPORT_INVOICES_PKG.g_invoices_table,
2420: p_invoice_rec.invoice_id,
2421: 'INCONSISTENT VOUCHER INFO',
2422: p_default_last_updated_by,
2423: p_default_last_update_login,

Line 2426: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

2422: p_default_last_updated_by,
2423: p_default_last_update_login,
2424: current_calling_sequence) <> TRUE) THEN
2425: debug_info := 'insert_rejections<- '||current_calling_sequence;
2426: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
2427: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
2428: END IF;
2429: RAISE get_doc_seq_failure;
2430:

Line 2427: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);

2423: p_default_last_update_login,
2424: current_calling_sequence) <> TRUE) THEN
2425: debug_info := 'insert_rejections<- '||current_calling_sequence;
2426: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
2427: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
2428: END IF;
2429: RAISE get_doc_seq_failure;
2430:
2431: END IF;

Line 2447: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

2443: --Only if the Sequenctial numbering option is 'Always Used',we raise the error.
2444: IF(p_sequence_numbering='A') THEN --bug5854731.Only if the Sequenctial numbering op
2445: debug_info := '(Get Doc Sequence 5) Reject:Invalid Sequence' ||
2446: 'assignment';
2447: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
2448: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
2449: END IF;
2450:
2451: IF (AP_IMPORT_UTILITIES_PKG.insert_rejections(

Line 2448: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);

2444: IF(p_sequence_numbering='A') THEN --bug5854731.Only if the Sequenctial numbering op
2445: debug_info := '(Get Doc Sequence 5) Reject:Invalid Sequence' ||
2446: 'assignment';
2447: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
2448: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
2449: END IF;
2450:
2451: IF (AP_IMPORT_UTILITIES_PKG.insert_rejections(
2452: AP_IMPORT_INVOICES_PKG.g_invoices_table,

Line 2452: AP_IMPORT_INVOICES_PKG.g_invoices_table,

2448: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
2449: END IF;
2450:
2451: IF (AP_IMPORT_UTILITIES_PKG.insert_rejections(
2452: AP_IMPORT_INVOICES_PKG.g_invoices_table,
2453: p_invoice_rec.invoice_id,
2454: 'INVALID ASSIGNMENT',
2455: p_default_last_updated_by,
2456: p_default_last_update_login,

Line 2459: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

2455: p_default_last_updated_by,
2456: p_default_last_update_login,
2457: current_calling_sequence) <> TRUE) THEN
2458: debug_info := 'insert_rejections<- '||current_calling_sequence;
2459: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
2460: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
2461: END IF;
2462: RAISE get_doc_seq_failure;
2463: END IF;

Line 2460: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);

2456: p_default_last_update_login,
2457: current_calling_sequence) <> TRUE) THEN
2458: debug_info := 'insert_rejections<- '||current_calling_sequence;
2459: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
2460: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
2461: END IF;
2462: RAISE get_doc_seq_failure;
2463: END IF;
2464: l_current_invoice_status := 'N';

Line 2479: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

2475: -- Step 6
2476: -- Get Doc Sequence Val
2477: ----------------------------------------------------------------------
2478: debug_info := '(Get Doc Sequence 6) Get Next Val';
2479: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
2480: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
2481: END IF;
2482:
2483: l_return_code := FND_SEQNUM.GET_SEQ_VAL(

Line 2480: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);

2476: -- Get Doc Sequence Val
2477: ----------------------------------------------------------------------
2478: debug_info := '(Get Doc Sequence 6) Get Next Val';
2479: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
2480: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
2481: END IF;
2482:
2483: l_return_code := FND_SEQNUM.GET_SEQ_VAL(
2484: 200,

Line 2489: AP_IMPORT_INVOICES_PKG.g_inv_sysdate),

2485: l_doc_category_code,
2486: p_set_of_books_id,
2487: 'A',
2488: NVL(p_invoice_rec.gl_date,
2489: AP_IMPORT_INVOICES_PKG.g_inv_sysdate),
2490: p_db_sequence_value,
2491: p_db_sequence_id ,
2492: 'N',
2493: 'N');

Line 2494: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

2490: p_db_sequence_value,
2491: p_db_sequence_id ,
2492: 'N',
2493: 'N');
2494: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
2495: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,
2496: '-----------> l_doc_category_code = '|| l_doc_category_code
2497: || ' p_set_of_books_id = '||to_char(p_set_of_books_id)
2498: || ' p_db_sequence_id = '||to_char(p_db_sequence_id )

Line 2495: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,

2491: p_db_sequence_id ,
2492: 'N',
2493: 'N');
2494: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
2495: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,
2496: '-----------> l_doc_category_code = '|| l_doc_category_code
2497: || ' p_set_of_books_id = '||to_char(p_set_of_books_id)
2498: || ' p_db_sequence_id = '||to_char(p_db_sequence_id )
2499: ||' p_db_seq_name = '||p_db_seq_name

Line 2505: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

2501: END IF;
2502:
2503: IF ((p_db_sequence_value IS NULL) or (l_return_code <> 0)) THEN
2504: debug_info := '(Get Doc Sequence 7) Reject:Invalid Sequence';
2505: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
2506: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
2507: END IF;
2508:
2509: IF (AP_IMPORT_UTILITIES_PKG.insert_rejections(

Line 2506: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);

2502:
2503: IF ((p_db_sequence_value IS NULL) or (l_return_code <> 0)) THEN
2504: debug_info := '(Get Doc Sequence 7) Reject:Invalid Sequence';
2505: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
2506: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
2507: END IF;
2508:
2509: IF (AP_IMPORT_UTILITIES_PKG.insert_rejections(
2510: AP_IMPORT_INVOICES_PKG.g_invoices_table,

Line 2510: AP_IMPORT_INVOICES_PKG.g_invoices_table,

2506: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
2507: END IF;
2508:
2509: IF (AP_IMPORT_UTILITIES_PKG.insert_rejections(
2510: AP_IMPORT_INVOICES_PKG.g_invoices_table,
2511: p_invoice_rec.invoice_id,
2512: 'INVALID SEQUENCE',
2513: p_default_last_updated_by,
2514: p_default_last_update_login,

Line 2517: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

2513: p_default_last_updated_by,
2514: p_default_last_update_login,
2515: current_calling_sequence) <> TRUE) THEN
2516: debug_info := 'insert_rejections<- '||current_calling_sequence;
2517: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
2518: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
2519: END IF;
2520: RAISE get_doc_seq_failure;
2521: END IF;

Line 2518: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);

2514: p_default_last_update_login,
2515: current_calling_sequence) <> TRUE) THEN
2516: debug_info := 'insert_rejections<- '||current_calling_sequence;
2517: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
2518: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
2519: END IF;
2520: RAISE get_doc_seq_failure;
2521: END IF;
2522: l_current_invoice_status := 'N';

Line 2536: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

2532: -- if ( ( LENGTH( nvl(p_db_sequence_value,0)) > 9 ) or --Condition value changed from 8 to 9 for BUG 5950643
2533: If ( TRANSLATE( p_db_sequence_value ,'x1234567890','x') IS NOT NULL) then
2534:
2535: debug_info := '(Get Doc Sequence 8) Reject: Invalid Voucher Number';
2536: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
2537: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
2538: END IF;
2539:
2540: IF (AP_IMPORT_UTILITIES_PKG.insert_rejections( AP_IMPORT_INVOICES_PKG.g_invoices_table,

Line 2537: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);

2533: If ( TRANSLATE( p_db_sequence_value ,'x1234567890','x') IS NOT NULL) then
2534:
2535: debug_info := '(Get Doc Sequence 8) Reject: Invalid Voucher Number';
2536: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
2537: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
2538: END IF;
2539:
2540: IF (AP_IMPORT_UTILITIES_PKG.insert_rejections( AP_IMPORT_INVOICES_PKG.g_invoices_table,
2541: p_invoice_rec.invoice_id,

Line 2540: IF (AP_IMPORT_UTILITIES_PKG.insert_rejections( AP_IMPORT_INVOICES_PKG.g_invoices_table,

2536: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
2537: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
2538: END IF;
2539:
2540: IF (AP_IMPORT_UTILITIES_PKG.insert_rejections( AP_IMPORT_INVOICES_PKG.g_invoices_table,
2541: p_invoice_rec.invoice_id,
2542: 'INCONSISTENT VOUCHER INFO',
2543: p_default_last_updated_by,
2544: p_default_last_update_login,

Line 2547: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

2543: p_default_last_updated_by,
2544: p_default_last_update_login,
2545: current_calling_sequence) <> TRUE) THEN
2546: debug_info := 'insert_rejections<- '||current_calling_sequence;
2547: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
2548: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
2549: END IF;
2550: RAISE get_doc_seq_failure;
2551:

Line 2548: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);

2544: p_default_last_update_login,
2545: current_calling_sequence) <> TRUE) THEN
2546: debug_info := 'insert_rejections<- '||current_calling_sequence;
2547: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
2548: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
2549: END IF;
2550: RAISE get_doc_seq_failure;
2551:
2552: END IF;

Line 2568: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

2564:
2565: EXCEPTION
2566: WHEN OTHERS THEN
2567:
2568: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
2569: Print(
2570: AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
2571: END IF;
2572:

Line 2570: AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);

2566: WHEN OTHERS THEN
2567:
2568: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
2569: Print(
2570: AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
2571: END IF;
2572:
2573: IF (SQLCODE < 0) THEN
2574: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

Line 2574: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

2570: AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
2571: END IF;
2572:
2573: IF (SQLCODE < 0) THEN
2574: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
2575: Print(
2576: AP_IMPORT_INVOICES_PKG.g_debug_switch, SQLERRM);
2577: END IF;
2578: END IF;

Line 2576: AP_IMPORT_INVOICES_PKG.g_debug_switch, SQLERRM);

2572:
2573: IF (SQLCODE < 0) THEN
2574: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
2575: Print(
2576: AP_IMPORT_INVOICES_PKG.g_debug_switch, SQLERRM);
2577: END IF;
2578: END IF;
2579:
2580: RETURN (FALSE);

Line 2591: AP_IMPORT_INVOICES_PKG.r_invoice_info_rec,

2587: =================================================================== */
2588:
2589: FUNCTION get_invoice_info(
2590: p_invoice_rec IN OUT NOCOPY
2591: AP_IMPORT_INVOICES_PKG.r_invoice_info_rec,
2592: p_default_last_updated_by IN NUMBER,
2593: p_default_last_update_login IN NUMBER,
2594: p_pay_curr_invoice_amount OUT NOCOPY NUMBER,
2595: p_payment_priority OUT NOCOPY NUMBER,

Line 2618: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

2614: ----------------------------------------------------------------------------
2615:
2616: debug_info := '(Get Invoice Info step 1) Calculate invoice amount in ' ||
2617: 'payment currency ';
2618: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
2619: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
2620: END IF;
2621:
2622: IF ( p_invoice_rec.payment_cross_rate is NOT NULL) THEN

Line 2619: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);

2615:
2616: debug_info := '(Get Invoice Info step 1) Calculate invoice amount in ' ||
2617: 'payment currency ';
2618: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
2619: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
2620: END IF;
2621:
2622: IF ( p_invoice_rec.payment_cross_rate is NOT NULL) THEN
2623: p_pay_curr_invoice_amount := gl_currency_api.convert_amount(

Line 2639: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

2635: -----------------------------------------------------------------------------
2636:
2637: debug_info := '(Get Invoice Info step 2) Get amt_applicable_to_discount ' ||
2638: ' value if not given';
2639: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
2640: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
2641: END IF;
2642:
2643: p_invoice_rec.amount_applicable_to_discount :=

Line 2640: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);

2636:
2637: debug_info := '(Get Invoice Info step 2) Get amt_applicable_to_discount ' ||
2638: ' value if not given';
2639: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
2640: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
2641: END IF;
2642:
2643: p_invoice_rec.amount_applicable_to_discount :=
2644: NVL(p_invoice_rec.amount_applicable_to_discount,

Line 2664: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

2660: -- Payment Requests: Added the if condition for payment requests type invoices
2661: IF (p_invoice_rec.invoice_type_lookup_code = 'PAYMENT REQUEST') THEN
2662:
2663: debug_info := '(Get Invoice Info step 3) Get payment default info ';
2664: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
2665: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
2666: END IF;
2667: BEGIN
2668:

Line 2665: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);

2661: IF (p_invoice_rec.invoice_type_lookup_code = 'PAYMENT REQUEST') THEN
2662:
2663: debug_info := '(Get Invoice Info step 3) Get payment default info ';
2664: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
2665: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
2666: END IF;
2667: BEGIN
2668:
2669: SELECT DECODE(p_invoice_rec.pay_group_lookup_code,

Line 2694: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

2690: AND asp.org_id = fsp.org_id;
2691: EXCEPTION
2692: WHEN no_data_found THEN
2693: debug_info := debug_info || '->no data found in query';
2694: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
2695: Print(
2696: AP_IMPORT_INVOICES_PKG.g_debug_switch,
2697: debug_info);
2698: END IF;

Line 2696: AP_IMPORT_INVOICES_PKG.g_debug_switch,

2692: WHEN no_data_found THEN
2693: debug_info := debug_info || '->no data found in query';
2694: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
2695: Print(
2696: AP_IMPORT_INVOICES_PKG.g_debug_switch,
2697: debug_info);
2698: END IF;
2699: RAISE get_invoice_info_failure;
2700: END;

Line 2705: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

2701:
2702: ELSE
2703:
2704: debug_info := '(Get Invoice Info step 3) Get supplier site default info ';
2705: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
2706: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
2707: END IF;
2708: BEGIN
2709:

Line 2706: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);

2702: ELSE
2703:
2704: debug_info := '(Get Invoice Info step 3) Get supplier site default info ';
2705: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
2706: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
2707: END IF;
2708: BEGIN
2709:
2710: SELECT DECODE(p_invoice_rec.pay_group_lookup_code,

Line 2734: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

2730: AND vendor_site_id = p_invoice_rec.vendor_site_id;
2731: EXCEPTION
2732: WHEN no_data_found THEN
2733: debug_info := debug_info || '->no data found in query';
2734: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
2735: Print(
2736: AP_IMPORT_INVOICES_PKG.g_debug_switch,
2737: debug_info);
2738: END IF;

Line 2736: AP_IMPORT_INVOICES_PKG.g_debug_switch,

2732: WHEN no_data_found THEN
2733: debug_info := debug_info || '->no data found in query';
2734: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
2735: Print(
2736: AP_IMPORT_INVOICES_PKG.g_debug_switch,
2737: debug_info);
2738: END IF;
2739: RAISE get_invoice_info_failure;
2740: END;

Line 2748: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

2744: -- Step 4
2745: -- Populate who columns if null
2746: -----------------------------------------------------------------------------
2747: debug_info := '(Get Invoice Info step 4) Get WHO columns ';
2748: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
2749: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
2750: END IF;
2751: p_invoice_rec.last_updated_by :=
2752: NVL(p_invoice_rec.last_updated_by,p_default_last_updated_by);

Line 2749: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);

2745: -- Populate who columns if null
2746: -----------------------------------------------------------------------------
2747: debug_info := '(Get Invoice Info step 4) Get WHO columns ';
2748: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
2749: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
2750: END IF;
2751: p_invoice_rec.last_updated_by :=
2752: NVL(p_invoice_rec.last_updated_by,p_default_last_updated_by);
2753: p_invoice_rec.last_update_login :=

Line 2759: NVL(p_invoice_rec.creation_date, AP_IMPORT_INVOICES_PKG.g_inv_sysdate);

2755: p_default_last_updated_by));
2756: p_invoice_rec.created_by :=
2757: NVL(p_invoice_rec.created_by,p_default_last_updated_by);
2758: p_invoice_rec.creation_date :=
2759: NVL(p_invoice_rec.creation_date, AP_IMPORT_INVOICES_PKG.g_inv_sysdate);
2760: p_invoice_rec.last_update_date :=
2761: NVL(p_invoice_rec.last_update_date, AP_IMPORT_INVOICES_PKG.g_inv_sysdate);
2762:
2763: RETURN(TRUE);

Line 2761: NVL(p_invoice_rec.last_update_date, AP_IMPORT_INVOICES_PKG.g_inv_sysdate);

2757: NVL(p_invoice_rec.created_by,p_default_last_updated_by);
2758: p_invoice_rec.creation_date :=
2759: NVL(p_invoice_rec.creation_date, AP_IMPORT_INVOICES_PKG.g_inv_sysdate);
2760: p_invoice_rec.last_update_date :=
2761: NVL(p_invoice_rec.last_update_date, AP_IMPORT_INVOICES_PKG.g_inv_sysdate);
2762:
2763: RETURN(TRUE);
2764: EXCEPTION
2765: WHEN OTHERS then

Line 2767: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

2763: RETURN(TRUE);
2764: EXCEPTION
2765: WHEN OTHERS then
2766: debug_info := debug_info || '->exception';
2767: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
2768: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
2769: END IF;
2770:
2771: IF (SQLCODE < 0) then

Line 2768: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);

2764: EXCEPTION
2765: WHEN OTHERS then
2766: debug_info := debug_info || '->exception';
2767: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
2768: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
2769: END IF;
2770:
2771: IF (SQLCODE < 0) then
2772: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

Line 2772: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

2768: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
2769: END IF;
2770:
2771: IF (SQLCODE < 0) then
2772: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
2773: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, SQLERRM);
2774: END IF;
2775: END IF;
2776:

Line 2773: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, SQLERRM);

2769: END IF;
2770:
2771: IF (SQLCODE < 0) then
2772: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
2773: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, SQLERRM);
2774: END IF;
2775: END IF;
2776:
2777: RETURN (FALSE);

Line 2790: AP_IMPORT_INVOICES_PKG.r_invoice_info_rec,

2786: =========================================================================*/
2787: -- Payment Request: Added p_needs_invoice_approval for payment request invoices
2788: FUNCTION insert_ap_invoices(
2789: p_invoice_rec IN OUT
2790: AP_IMPORT_INVOICES_PKG.r_invoice_info_rec,
2791: p_base_invoice_id OUT NOCOPY NUMBER,
2792: p_set_of_books_id IN NUMBER,
2793: p_doc_sequence_id IN
2794: AP_INVOICES.doc_sequence_id%TYPE,

Line 2828: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

2824: -----------------------------------------------------------------------------
2825:
2826: debug_info := '(Insert ap invoices step 1) Get new invoice_id for base ' ||
2827: 'table ap_invoices';
2828: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
2829: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
2830: END IF;
2831: -- Bug 5448579
2832: /*

Line 2829: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);

2825:
2826: debug_info := '(Insert ap invoices step 1) Get new invoice_id for base ' ||
2827: 'table ap_invoices';
2828: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
2829: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
2830: END IF;
2831: -- Bug 5448579
2832: /*
2833: SELECT ap_invoices_s.nextval

Line 2844: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

2840: -----------------------------------------------------------------------------
2841:
2842: debug_info := '(Insert ap invoices step 2)-Get wfapproval_status ' ||
2843: 'depends on profile value';
2844: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
2845: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
2846: END IF;
2847:
2848: IF p_approval_workflow_flag = 'N' THEN

Line 2845: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);

2841:
2842: debug_info := '(Insert ap invoices step 2)-Get wfapproval_status ' ||
2843: 'depends on profile value';
2844: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
2845: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
2846: END IF;
2847:
2848: IF p_approval_workflow_flag = 'N' THEN
2849: l_wfapproval_status := 'NOT REQUIRED';

Line 2878: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

2874: -- Insert jg_zz_invoice_info
2875: -----------------------------------------------------------------------------
2876: debug_info := '(Insert ap invoices step 3) - Call ' ||
2877: 'jg_globe_flex_val.insert_jg_zz_invoice_info';
2878: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
2879: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
2880: END IF;
2881:
2882: jg_globe_flex_val.insert_jg_zz_invoice_info(

Line 2879: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);

2875: -----------------------------------------------------------------------------
2876: debug_info := '(Insert ap invoices step 3) - Call ' ||
2877: 'jg_globe_flex_val.insert_jg_zz_invoice_info';
2878: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
2879: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
2880: END IF;
2881:
2882: jg_globe_flex_val.insert_jg_zz_invoice_info(
2883: l_invoice_id,

Line 2916: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

2912: */
2913:
2914:
2915: debug_info := '(Insert ap invoices step 3) Calculate earliest settlement date for Prepayment type invoices';
2916: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
2917: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
2918: END IF;
2919:
2920: IF (p_invoice_rec.invoice_type_lookup_code = 'PREPAYMENT') THEN

Line 2917: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);

2913:
2914:
2915: debug_info := '(Insert ap invoices step 3) Calculate earliest settlement date for Prepayment type invoices';
2916: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
2917: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
2918: END IF;
2919:
2920: IF (p_invoice_rec.invoice_type_lookup_code = 'PREPAYMENT') THEN
2921: l_earliest_settlement_date := sysdate + nvl(p_add_days_settlement_date,0);

Line 2931: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

2927: -- Insert into ap_invoices table
2928: -----------------------------------------------------------------------------
2929:
2930: debug_info := '(Insert ap invoices step 4) - Insert into ap_invoices';
2931: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
2932: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
2933: END IF;
2934:
2935: -- Payment Requests: Added party_id, party_site_id,

Line 2932: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);

2928: -----------------------------------------------------------------------------
2929:
2930: debug_info := '(Insert ap invoices step 4) - Insert into ap_invoices';
2931: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
2932: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
2933: END IF;
2934:
2935: -- Payment Requests: Added party_id, party_site_id,
2936: -- pay_proc_trxn_type_code, payment_function to the insert stmt

Line 3251: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

3247: -----------------------------------------------------------------------------
3248: debug_info := '(Insert ap invoices step 5) before copy attachments: '||
3249: 'source = ' || p_invoice_rec.source || ', from_invoice_id = ' ||
3250: p_invoice_rec.invoice_id || ', to_invoice_id = ' || l_invoice_id;
3251: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
3252: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
3253: END IF;
3254:
3255: l_attachments_count :=

Line 3252: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);

3248: debug_info := '(Insert ap invoices step 5) before copy attachments: '||
3249: 'source = ' || p_invoice_rec.source || ', from_invoice_id = ' ||
3250: p_invoice_rec.invoice_id || ', to_invoice_id = ' || l_invoice_id;
3251: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
3252: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
3253: END IF;
3254:
3255: l_attachments_count :=
3256: copy_attachments(p_invoice_rec.invoice_id, l_invoice_id);

Line 3259: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

3255: l_attachments_count :=
3256: copy_attachments(p_invoice_rec.invoice_id, l_invoice_id);
3257: debug_info := '(Insert ap invoices step 5) copy attachments done: ' ||
3258: l_attachments_count;
3259: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
3260: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
3261: END IF;
3262:
3263: -----------------------------------------------------------------------------

Line 3260: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);

3256: copy_attachments(p_invoice_rec.invoice_id, l_invoice_id);
3257: debug_info := '(Insert ap invoices step 5) copy attachments done: ' ||
3258: l_attachments_count;
3259: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
3260: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
3261: END IF;
3262:
3263: -----------------------------------------------------------------------------
3264: -- Step 6

Line 3269: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

3265: -- Assign the out parameter for new invoice_id
3266: -----------------------------------------------------------------------------
3267: debug_info := '(Insert ap invoices step 6) - Return the new invoice_id-> ' ||
3268: to_char(l_invoice_id);
3269: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
3270: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
3271: END IF;
3272:
3273:

Line 3270: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);

3266: -----------------------------------------------------------------------------
3267: debug_info := '(Insert ap invoices step 6) - Return the new invoice_id-> ' ||
3268: to_char(l_invoice_id);
3269: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
3270: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
3271: END IF;
3272:
3273:
3274: p_base_invoice_id := l_invoice_id;

Line 3280: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

3276: RETURN( TRUE );
3277: EXCEPTION
3278: WHEN OTHERS THEN
3279: debug_info := debug_info || '->exception';
3280: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
3281: Print(
3282: AP_IMPORT_INVOICES_PKG.g_debug_switch,
3283: debug_info);
3284: END IF;

Line 3282: AP_IMPORT_INVOICES_PKG.g_debug_switch,

3278: WHEN OTHERS THEN
3279: debug_info := debug_info || '->exception';
3280: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
3281: Print(
3282: AP_IMPORT_INVOICES_PKG.g_debug_switch,
3283: debug_info);
3284: END IF;
3285: IF (SQLCODE < 0) THEN
3286: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

Line 3286: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

3282: AP_IMPORT_INVOICES_PKG.g_debug_switch,
3283: debug_info);
3284: END IF;
3285: IF (SQLCODE < 0) THEN
3286: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
3287: Print(
3288: AP_IMPORT_INVOICES_PKG.g_debug_switch,
3289: SQLERRM);
3290: END IF;

Line 3288: AP_IMPORT_INVOICES_PKG.g_debug_switch,

3284: END IF;
3285: IF (SQLCODE < 0) THEN
3286: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
3287: Print(
3288: AP_IMPORT_INVOICES_PKG.g_debug_switch,
3289: SQLERRM);
3290: END IF;
3291: END IF;
3292: RETURN (FALSE);

Line 3332: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN

3328: ---------------------------------------------
3329:
3330: debug_info := '(Change_invoice_status 1) Change invoice status to '||
3331: p_status;
3332: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN
3333: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
3334: END IF;
3335:
3336: UPDATE AP_INVOICES_INTERFACE

Line 3333: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);

3329:
3330: debug_info := '(Change_invoice_status 1) Change invoice status to '||
3331: p_status;
3332: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN
3333: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
3334: END IF;
3335:
3336: UPDATE AP_INVOICES_INTERFACE
3337: SET status = p_status

Line 3344: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN

3340: RETURN(TRUE);
3341:
3342: EXCEPTION
3343: WHEN OTHERS THEN
3344: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN
3345: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
3346: END IF;
3347:
3348: IF (SQLCODE < 0) THEN

Line 3345: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);

3341:
3342: EXCEPTION
3343: WHEN OTHERS THEN
3344: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN
3345: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
3346: END IF;
3347:
3348: IF (SQLCODE < 0) THEN
3349: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN

Line 3349: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN

3345: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
3346: END IF;
3347:
3348: IF (SQLCODE < 0) THEN
3349: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN
3350: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,SQLERRM);
3351: END IF;
3352: END IF;
3353:

Line 3350: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,SQLERRM);

3346: END IF;
3347:
3348: IF (SQLCODE < 0) THEN
3349: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN
3350: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,SQLERRM);
3351: END IF;
3352: END IF;
3353:
3354: RETURN (FALSE);

Line 3396: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN

3392: ---------------------------------------------
3393: debug_info := '(Update_temp_invoice_status 1) Change '||
3394: 'PROCESSING to PROCESSED ';
3395:
3396: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN
3397: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
3398: END IF;
3399:
3400: ---------------------------------------------

Line 3397: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);

3393: debug_info := '(Update_temp_invoice_status 1) Change '||
3394: 'PROCESSING to PROCESSED ';
3395:
3396: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN
3397: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
3398: END IF;
3399:
3400: ---------------------------------------------
3401: -- 2. Change REJECTING to REJECTED

Line 3405: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN

3401: -- 2. Change REJECTING to REJECTED
3402: ---------------------------------------------
3403: debug_info := '(Update_temp_invoice_status 2) Change REJECTING to REJECTED';
3404:
3405: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN
3406: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
3407: END IF;
3408: -- Bug fix: 1952122
3409: -- Rewrite with two statements avoiding AND ((p_group_id is NULL) OR (group_id = --p_group_id))

Line 3406: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);

3402: ---------------------------------------------
3403: debug_info := '(Update_temp_invoice_status 2) Change REJECTING to REJECTED';
3404:
3405: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN
3406: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
3407: END IF;
3408: -- Bug fix: 1952122
3409: -- Rewrite with two statements avoiding AND ((p_group_id is NULL) OR (group_id = --p_group_id))
3410: --3910020, used binds in the sql below

Line 3423: AND request_id = AP_IMPORT_INVOICES_PKG.g_conc_request_id;

3419: SET status = l_processed
3420: WHERE source = p_source
3421: AND p_group_id is NULL
3422: AND status = l_processing
3423: AND request_id = AP_IMPORT_INVOICES_PKG.g_conc_request_id;
3424:
3425: UPDATE AP_INVOICES_INTERFACE
3426: SET status = l_rejected
3427: WHERE source = p_source

Line 3430: AND request_id = AP_IMPORT_INVOICES_PKG.g_conc_request_id;

3426: SET status = l_rejected
3427: WHERE source = p_source
3428: AND p_group_id is NULL
3429: AND status = l_rejecting
3430: AND request_id = AP_IMPORT_INVOICES_PKG.g_conc_request_id;
3431:
3432: ELSE
3433:
3434: UPDATE AP_INVOICES_INTERFACE

Line 3439: ANd request_id = AP_IMPORT_INVOICES_PKG.g_conc_request_id;

3435: SET status = l_processed
3436: WHERE source = p_source
3437: AND group_id = p_group_id
3438: AND status = l_processing
3439: ANd request_id = AP_IMPORT_INVOICES_PKG.g_conc_request_id;
3440:
3441: UPDATE AP_INVOICES_INTERFACE
3442: SET status = l_rejected
3443: WHERE source = p_source

Line 3446: AND request_id = AP_IMPORT_INVOICES_PKG.g_conc_request_id;

3442: SET status = l_rejected
3443: WHERE source = p_source
3444: AND group_id = p_group_id
3445: AND status = l_rejecting
3446: AND request_id = AP_IMPORT_INVOICES_PKG.g_conc_request_id;
3447:
3448: END IF;
3449:
3450: RETURN(TRUE);

Line 3454: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN

3450: RETURN(TRUE);
3451:
3452: EXCEPTION
3453: WHEN OTHERS THEN
3454: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN
3455: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
3456: END IF;
3457:
3458: IF (SQLCODE < 0) THEN

Line 3455: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);

3451:
3452: EXCEPTION
3453: WHEN OTHERS THEN
3454: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN
3455: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
3456: END IF;
3457:
3458: IF (SQLCODE < 0) THEN
3459: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN

Line 3459: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN

3455: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
3456: END IF;
3457:
3458: IF (SQLCODE < 0) THEN
3459: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN
3460: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,SQLERRM);
3461: END IF;
3462: END IF;
3463:

Line 3460: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,SQLERRM);

3456: END IF;
3457:
3458: IF (SQLCODE < 0) THEN
3459: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN
3460: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,SQLERRM);
3461: END IF;
3462: END IF;
3463:
3464: RETURN (FALSE);

Line 3531: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN

3527:
3528: EXCEPTION
3529:
3530: WHEN OTHERS then
3531: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN
3532: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
3533: END IF;
3534:
3535: IF (SQLCODE < 0) THEN

Line 3532: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);

3528: EXCEPTION
3529:
3530: WHEN OTHERS then
3531: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN
3532: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
3533: END IF;
3534:
3535: IF (SQLCODE < 0) THEN
3536: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN

Line 3536: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN

3532: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
3533: END IF;
3534:
3535: IF (SQLCODE < 0) THEN
3536: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN
3537: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,SQLERRM);
3538: END IF;
3539: END IF;
3540:

Line 3537: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,SQLERRM);

3533: END IF;
3534:
3535: IF (SQLCODE < 0) THEN
3536: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN
3537: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,SQLERRM);
3538: END IF;
3539: END IF;
3540:
3541: RETURN (FALSE);

Line 3592: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN

3588: RETURN(TRUE);
3589:
3590: EXCEPTION
3591: WHEN OTHERS THEN
3592: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN
3593: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
3594: END IF;
3595:
3596: IF (SQLCODE<0) THEN

Line 3593: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);

3589:
3590: EXCEPTION
3591: WHEN OTHERS THEN
3592: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN
3593: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
3594: END IF;
3595:
3596: IF (SQLCODE<0) THEN
3597: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN

Line 3597: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN

3593: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
3594: END IF;
3595:
3596: IF (SQLCODE<0) THEN
3597: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN
3598: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,SQLERRM);
3599: END IF;
3600: END IF;
3601:

Line 3598: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,SQLERRM);

3594: END IF;
3595:
3596: IF (SQLCODE<0) THEN
3597: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN
3598: Print(AP_IMPORT_INVOICES_PKG.g_debug_switch,SQLERRM);
3599: END IF;
3600: END IF;
3601:
3602: RETURN(FALSE);

Line 3626: AP_IMPORT_INVOICES_PKG.t_lines_table,

3622:
3623: FUNCTION insert_ap_invoice_lines(
3624: p_base_invoice_id IN NUMBER,
3625: p_invoice_lines_tab IN
3626: AP_IMPORT_INVOICES_PKG.t_lines_table,
3627: p_set_of_books_id IN NUMBER,
3628: p_approval_workflow_flag IN VARCHAR2,
3629: p_tax_only_flag IN VARCHAR2,
3630: p_tax_only_rcv_matched_flag IN VARCHAR2,

Line 3678: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

3674:
3675: debug_info := '(Insert ap invoice lines step 1) - populate the '||
3676: 'wfapproval_status_flag';
3677:
3678: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
3679: Print( AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
3680: END IF;
3681:
3682: IF ( NVL(p_approval_workflow_flag, 'N') = 'N' ) THEN

Line 3679: Print( AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);

3675: debug_info := '(Insert ap invoice lines step 1) - populate the '||
3676: 'wfapproval_status_flag';
3677:
3678: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
3679: Print( AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
3680: END IF;
3681:
3682: IF ( NVL(p_approval_workflow_flag, 'N') = 'N' ) THEN
3683: l_wfapproval_status := 'NOT REQUIRED';

Line 3706: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

3702: -----------------------------------------------------------------------------
3703:
3704: debug_info := '(Insert ap invoice lines step 2) - Loop the Pl/sql table';
3705:
3706: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
3707: Print( AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
3708: END IF;
3709:
3710: Open c_ship_to (p_base_invoice_id);

Line 3707: Print( AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);

3703:
3704: debug_info := '(Insert ap invoice lines step 2) - Loop the Pl/sql table';
3705:
3706: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
3707: Print( AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
3708: END IF;
3709:
3710: Open c_ship_to (p_base_invoice_id);
3711: Fetch c_ship_to

Line 4131: AP_IMPORT_INVOICES_PKG.g_inv_sysdate,

4127: p_invoice_lines_tab(i).credit_card_trx_id,
4128: -- credit_card_trx_id
4129: p_invoice_lines_tab(i).company_prepaid_invoice_id, -- company_prepaid_invoice_id --Bug6167068
4130: p_invoice_lines_tab(i).cc_reversal_flag, -- cc_reversal_flag --Bug6167068
4131: AP_IMPORT_INVOICES_PKG.g_inv_sysdate,
4132: -- creation_date
4133: p_default_last_updated_by,
4134: -- created_by
4135: p_default_last_updated_by,

Line 4137: AP_IMPORT_INVOICES_PKG.g_inv_sysdate,

4133: p_default_last_updated_by,
4134: -- created_by
4135: p_default_last_updated_by,
4136: -- last_updated_by
4137: AP_IMPORT_INVOICES_PKG.g_inv_sysdate,
4138: -- last_update_date
4139: p_default_last_update_login,
4140: -- last_update_login
4141: AP_IMPORT_INVOICES_PKG.g_program_application_id,

Line 4141: AP_IMPORT_INVOICES_PKG.g_program_application_id,

4137: AP_IMPORT_INVOICES_PKG.g_inv_sysdate,
4138: -- last_update_date
4139: p_default_last_update_login,
4140: -- last_update_login
4141: AP_IMPORT_INVOICES_PKG.g_program_application_id,
4142: -- program_application_id
4143: AP_IMPORT_INVOICES_PKG.g_program_id,
4144: -- program_id
4145: AP_IMPORT_INVOICES_PKG.g_inv_sysdate,

Line 4143: AP_IMPORT_INVOICES_PKG.g_program_id,

4139: p_default_last_update_login,
4140: -- last_update_login
4141: AP_IMPORT_INVOICES_PKG.g_program_application_id,
4142: -- program_application_id
4143: AP_IMPORT_INVOICES_PKG.g_program_id,
4144: -- program_id
4145: AP_IMPORT_INVOICES_PKG.g_inv_sysdate,
4146: -- program_update_date
4147: AP_IMPORT_INVOICES_PKG.g_conc_request_id,

Line 4145: AP_IMPORT_INVOICES_PKG.g_inv_sysdate,

4141: AP_IMPORT_INVOICES_PKG.g_program_application_id,
4142: -- program_application_id
4143: AP_IMPORT_INVOICES_PKG.g_program_id,
4144: -- program_id
4145: AP_IMPORT_INVOICES_PKG.g_inv_sysdate,
4146: -- program_update_date
4147: AP_IMPORT_INVOICES_PKG.g_conc_request_id,
4148: -- request_id
4149: p_invoice_lines_tab(i).attribute_category,

Line 4147: AP_IMPORT_INVOICES_PKG.g_conc_request_id,

4143: AP_IMPORT_INVOICES_PKG.g_program_id,
4144: -- program_id
4145: AP_IMPORT_INVOICES_PKG.g_inv_sysdate,
4146: -- program_update_date
4147: AP_IMPORT_INVOICES_PKG.g_conc_request_id,
4148: -- request_id
4149: p_invoice_lines_tab(i).attribute_category,
4150: -- attribute_category
4151: p_invoice_lines_tab(i).attribute1,

Line 4300: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

4296: RETURN( TRUE );
4297: EXCEPTION
4298: WHEN OTHERS THEN
4299: debug_info := debug_info || '->exception';
4300: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
4301: Print( AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
4302: END IF;
4303:
4304: IF (SQLCODE < 0) THEN

Line 4301: Print( AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);

4297: EXCEPTION
4298: WHEN OTHERS THEN
4299: debug_info := debug_info || '->exception';
4300: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
4301: Print( AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
4302: END IF;
4303:
4304: IF (SQLCODE < 0) THEN
4305: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

Line 4305: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

4301: Print( AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
4302: END IF;
4303:
4304: IF (SQLCODE < 0) THEN
4305: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
4306: Print( AP_IMPORT_INVOICES_PKG.g_debug_switch, SQLERRM);
4307: END IF;
4308: END IF;
4309:

Line 4306: Print( AP_IMPORT_INVOICES_PKG.g_debug_switch, SQLERRM);

4302: END IF;
4303:
4304: IF (SQLCODE < 0) THEN
4305: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
4306: Print( AP_IMPORT_INVOICES_PKG.g_debug_switch, SQLERRM);
4307: END IF;
4308: END IF;
4309:
4310: RETURN (FALSE);

Line 4341: AP_IMPORT_INVOICES_PKG.t_lines_table,

4337: FUNCTION Create_Lines(
4338: p_batch_id IN NUMBER,
4339: p_base_invoice_id IN NUMBER,
4340: p_invoice_lines_tab IN
4341: AP_IMPORT_INVOICES_PKG.t_lines_table,
4342: p_base_currency_code IN VARCHAR2,
4343: p_set_of_books_id IN NUMBER,
4344: p_approval_workflow_flag IN VARCHAR2,
4345: p_tax_only_flag IN VARCHAR2,

Line 4384: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

4380: -- Call API that Bulk insert invoice lines regardless of line type.
4381: --------------------------------------------------------------------------
4382:
4383: debug_info := '(Create lines 1) Call API to Insert all the lines ';
4384: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
4385: Print( AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
4386: END IF;
4387:
4388: IF ( insert_ap_invoice_lines(

Line 4385: Print( AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);

4381: --------------------------------------------------------------------------
4382:
4383: debug_info := '(Create lines 1) Call API to Insert all the lines ';
4384: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
4385: Print( AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
4386: END IF;
4387:
4388: IF ( insert_ap_invoice_lines(
4389: p_base_invoice_id => p_base_invoice_id,

Line 4400: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

4396: p_default_last_update_login => p_default_last_update_login,
4397: p_calling_sequence => current_calling_sequence )<>TRUE) THEN
4398:
4399: debug_info := debug_info || 'exceptions';
4400: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
4401: Print( AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
4402: RAISE create_lines_failure;
4403: END IF;
4404: END IF;

Line 4401: Print( AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);

4397: p_calling_sequence => current_calling_sequence )<>TRUE) THEN
4398:
4399: debug_info := debug_info || 'exceptions';
4400: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
4401: Print( AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
4402: RAISE create_lines_failure;
4403: END IF;
4404: END IF;
4405:

Line 4414: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

4410: --------------------------------------------------------------------------
4411:
4412: debug_info := '(Create lines 2) Call Utility function to round the line '||
4413: ' before create distributions';
4414: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
4415: Print( AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
4416: END IF;
4417:
4418: /* modifying following code as per the bug 6892789 as there is a chance

Line 4415: Print( AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);

4411:
4412: debug_info := '(Create lines 2) Call Utility function to round the line '||
4413: ' before create distributions';
4414: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
4415: Print( AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
4416: END IF;
4417:
4418: /* modifying following code as per the bug 6892789 as there is a chance
4419: that line base amt goes to -ve value (line amount being +ve) so in such

Line 4477: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

4473: -- or call allocations package if allocation rule/lines need to be created
4474: --------------------------------------------------------------------------
4475: debug_info := '(Create lines 3) Call Matching or Allocations';
4476:
4477: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
4478: Print( AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
4479: END IF;
4480:
4481: BEGIN

Line 4478: Print( AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);

4474: --------------------------------------------------------------------------
4475: debug_info := '(Create lines 3) Call Matching or Allocations';
4476:
4477: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
4478: Print( AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
4479: END IF;
4480:
4481: BEGIN
4482:

Line 4491: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') then

4487: IF (p_invoice_lines_tab(i).po_line_location_id IS NOT NULL) THEN
4488: debug_info := '(Create Lines 3.1) Check for quantity overbill '
4489: ||'for PO Shipment';
4490:
4491: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') then
4492: AP_IMPORT_UTILITIES_PKG.Print(
4493: AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
4494: END IF;
4495:

Line 4493: AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);

4489: ||'for PO Shipment';
4490:
4491: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') then
4492: AP_IMPORT_UTILITIES_PKG.Print(
4493: AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
4494: END IF;
4495:
4496: IF (AP_IMPORT_UTILITIES_PKG.get_overbill_for_shipment(
4497: p_invoice_lines_tab(i).po_line_location_id, -- IN

Line 4509: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

4505: l_amount_ordered, -- OUT NOCOPY
4506: l_amt_already_billed, -- OUT NOCOPY
4507: current_calling_sequence) <> TRUE) THEN
4508:
4509: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
4510: AP_IMPORT_UTILITIES_PKG.Print(
4511: AP_IMPORT_INVOICES_PKG.g_debug_switch,
4512: 'get_overbill_for_shipment<-'||current_calling_sequence);
4513: END IF;

Line 4511: AP_IMPORT_INVOICES_PKG.g_debug_switch,

4507: current_calling_sequence) <> TRUE) THEN
4508:
4509: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
4510: AP_IMPORT_UTILITIES_PKG.Print(
4511: AP_IMPORT_INVOICES_PKG.g_debug_switch,
4512: 'get_overbill_for_shipment<-'||current_calling_sequence);
4513: END IF;
4514: RAISE create_lines_failure;
4515: END IF;

Line 4537: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

4533: p_invoice_lines_tab(i).line_number,
4534: l_error_code))) THEN
4535:
4536: debug_info := '(Create lines 5) Error encountered: '||l_error_code;
4537: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
4538: Print( AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
4539: END IF;
4540: RETURN(FALSE);
4541:

Line 4538: Print( AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);

4534: l_error_code))) THEN
4535:
4536: debug_info := '(Create lines 5) Error encountered: '||l_error_code;
4537: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
4538: Print( AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
4539: END IF;
4540: RETURN(FALSE);
4541:
4542: END IF;

Line 4555: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

4551: l_error_code))) THEN
4552:
4553: debug_info := '(Create lines 6) Error encountered: '||l_error_code;
4554:
4555: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
4556: Print( AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
4557: END IF;
4558:
4559: RETURN(FALSE);

Line 4556: Print( AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);

4552:
4553: debug_info := '(Create lines 6) Error encountered: '||l_error_code;
4554:
4555: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
4556: Print( AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
4557: END IF;
4558:
4559: RETURN(FALSE);
4560: END IF;

Line 4573: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

4569: EXCEPTION
4570: WHEN OTHERS THEN
4571:
4572: debug_info := debug_info || '->exception';
4573: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
4574: Print( AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
4575: END IF;
4576:
4577: IF (SQLCODE < 0) THEN

Line 4574: Print( AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);

4570: WHEN OTHERS THEN
4571:
4572: debug_info := debug_info || '->exception';
4573: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
4574: Print( AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
4575: END IF;
4576:
4577: IF (SQLCODE < 0) THEN
4578: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

Line 4578: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN

4574: Print( AP_IMPORT_INVOICES_PKG.g_debug_switch, debug_info);
4575: END IF;
4576:
4577: IF (SQLCODE < 0) THEN
4578: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
4579: Print( AP_IMPORT_INVOICES_PKG.g_debug_switch, SQLERRM);
4580: END IF;
4581: END IF;
4582: RETURN (FALSE);

Line 4579: Print( AP_IMPORT_INVOICES_PKG.g_debug_switch, SQLERRM);

4575: END IF;
4576:
4577: IF (SQLCODE < 0) THEN
4578: IF (AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y') THEN
4579: Print( AP_IMPORT_INVOICES_PKG.g_debug_switch, SQLERRM);
4580: END IF;
4581: END IF;
4582: RETURN (FALSE);
4583: END Create_lines;

Line 4611: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN

4607: -- Insert invoice holds FROM the import batch
4608: --------------------------------------------------------------------------
4609:
4610: debug_info := '(Insert Holds 1) Insert invoice holds FROM the import batch';
4611: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN
4612: AP_IMPORT_UTILITIES_PKG.Print(
4613: AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
4614: END IF;
4615:

Line 4613: AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);

4609:
4610: debug_info := '(Insert Holds 1) Insert invoice holds FROM the import batch';
4611: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN
4612: AP_IMPORT_UTILITIES_PKG.Print(
4613: AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
4614: END IF;
4615:
4616: IF (p_hold_code is NOT NULL) THEN
4617: ap_holds_pkg.insert_single_hold(

Line 4632: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN

4628: -- Insert Suppler's holds
4629: ---------------------------------------------------------------------------
4630:
4631: debug_info := '(Insert Holds 2) Insert Suppler holds';
4632: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN
4633: AP_IMPORT_UTILITIES_PKG.Print(
4634: AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
4635: END IF;
4636:

Line 4634: AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);

4630:
4631: debug_info := '(Insert Holds 2) Insert Suppler holds';
4632: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN
4633: AP_IMPORT_UTILITIES_PKG.Print(
4634: AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
4635: END IF;
4636:
4637: iF (NVL(p_hold_future_payments_flag,'N') = 'Y') THEN
4638: ap_holds_pkg.insert_single_hold(

Line 4656: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN

4652: -- Insert Hold IF invoice_base_amount > invoice_amount_limit
4653: --------------------------------------------------------------------------
4654: debug_info := '(Insert Holds 3) Insert Hold IF invoice_base_amount > '||
4655: 'invoice_amount_limit';
4656: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN
4657: AP_IMPORT_UTILITIES_PKG.Print(
4658: AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
4659: END IF;
4660:

Line 4658: AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);

4654: debug_info := '(Insert Holds 3) Insert Hold IF invoice_base_amount > '||
4655: 'invoice_amount_limit';
4656: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN
4657: AP_IMPORT_UTILITIES_PKG.Print(
4658: AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
4659: END IF;
4660:
4661: ap_holds_pkg.insert_single_hold(
4662: X_invoice_id =>p_base_invoice_id,

Line 4674: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN

4670: RETURN(TRUE);
4671:
4672: EXCEPTION
4673: WHEN OTHERS THEN
4674: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN
4675: AP_IMPORT_UTILITIES_PKG.Print(
4676: AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
4677: END IF;
4678:

Line 4676: AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);

4672: EXCEPTION
4673: WHEN OTHERS THEN
4674: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN
4675: AP_IMPORT_UTILITIES_PKG.Print(
4676: AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
4677: END IF;
4678:
4679: IF (SQLCODE < 0) THEN
4680: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN

Line 4680: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN

4676: AP_IMPORT_INVOICES_PKG.g_debug_switch,debug_info);
4677: END IF;
4678:
4679: IF (SQLCODE < 0) THEN
4680: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN
4681: AP_IMPORT_UTILITIES_PKG.Print(
4682: AP_IMPORT_INVOICES_PKG.g_debug_switch,SQLERRM);
4683: END IF;
4684: END IF;

Line 4682: AP_IMPORT_INVOICES_PKG.g_debug_switch,SQLERRM);

4678:
4679: IF (SQLCODE < 0) THEN
4680: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN
4681: AP_IMPORT_UTILITIES_PKG.Print(
4682: AP_IMPORT_INVOICES_PKG.g_debug_switch,SQLERRM);
4683: END IF;
4684: END IF;
4685:
4686: RETURN (FALSE);

Line 4807: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN

4803:
4804: BEGIN
4805:
4806: l_curr_calling_sequence := 'Is_Product_Registered <-'||p_calling_sequence;
4807: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN
4808: AP_IMPORT_UTILITIES_PKG.Print(
4809: AP_IMPORT_INVOICES_PKG.g_debug_switch,l_curr_calling_sequence);
4810: END IF;
4811:

Line 4809: AP_IMPORT_INVOICES_PKG.g_debug_switch,l_curr_calling_sequence);

4805:
4806: l_curr_calling_sequence := 'Is_Product_Registered <-'||p_calling_sequence;
4807: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN
4808: AP_IMPORT_UTILITIES_PKG.Print(
4809: AP_IMPORT_INVOICES_PKG.g_debug_switch,l_curr_calling_sequence);
4810: END IF;
4811:
4812: l_debug_info := 'Check if the other application is registered for Distribution Generation';
4813: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN

Line 4813: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN

4809: AP_IMPORT_INVOICES_PKG.g_debug_switch,l_curr_calling_sequence);
4810: END IF;
4811:
4812: l_debug_info := 'Check if the other application is registered for Distribution Generation';
4813: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN
4814: AP_IMPORT_UTILITIES_PKG.Print(
4815: AP_IMPORT_INVOICES_PKG.g_debug_switch,l_debug_info);
4816: END IF;
4817:

Line 4815: AP_IMPORT_INVOICES_PKG.g_debug_switch,l_debug_info);

4811:
4812: l_debug_info := 'Check if the other application is registered for Distribution Generation';
4813: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN
4814: AP_IMPORT_UTILITIES_PKG.Print(
4815: AP_IMPORT_INVOICES_PKG.g_debug_switch,l_debug_info);
4816: END IF;
4817:
4818:
4819: BEGIN

Line 4853: P_Moac_Org_Table OUT NOCOPY AP_IMPORT_INVOICES_PKG.moac_ou_tab_type,

4849: END Is_Product_Registered;
4850:
4851: -- Bug 5448579. This function will be used for caching org_id, name
4852: FUNCTION Cache_Org_Id_Name (
4853: P_Moac_Org_Table OUT NOCOPY AP_IMPORT_INVOICES_PKG.moac_ou_tab_type,
4854: P_Fsp_Org_Table OUT NOCOPY AP_IMPORT_INVOICES_PKG.fsp_org_tab_type,
4855: P_Calling_Sequence IN VARCHAR2 )
4856:
4857: RETURN BOOLEAN IS

Line 4854: P_Fsp_Org_Table OUT NOCOPY AP_IMPORT_INVOICES_PKG.fsp_org_tab_type,

4850:
4851: -- Bug 5448579. This function will be used for caching org_id, name
4852: FUNCTION Cache_Org_Id_Name (
4853: P_Moac_Org_Table OUT NOCOPY AP_IMPORT_INVOICES_PKG.moac_ou_tab_type,
4854: P_Fsp_Org_Table OUT NOCOPY AP_IMPORT_INVOICES_PKG.fsp_org_tab_type,
4855: P_Calling_Sequence IN VARCHAR2 )
4856:
4857: RETURN BOOLEAN IS
4858:

Line 4875: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN

4871:
4872: BEGIN
4873:
4874: l_curr_calling_sequence := 'Cache_Org_Id_Name <- '||P_calling_sequence;
4875: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN
4876: AP_IMPORT_UTILITIES_PKG.Print(
4877: AP_IMPORT_INVOICES_PKG.g_debug_switch,l_curr_calling_sequence);
4878: END IF;
4879:

Line 4877: AP_IMPORT_INVOICES_PKG.g_debug_switch,l_curr_calling_sequence);

4873:
4874: l_curr_calling_sequence := 'Cache_Org_Id_Name <- '||P_calling_sequence;
4875: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN
4876: AP_IMPORT_UTILITIES_PKG.Print(
4877: AP_IMPORT_INVOICES_PKG.g_debug_switch,l_curr_calling_sequence);
4878: END IF;
4879:
4880: l_debug_info := 'Caching Org_id , Name from MO: Security Profile';
4881: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN

Line 4881: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN

4877: AP_IMPORT_INVOICES_PKG.g_debug_switch,l_curr_calling_sequence);
4878: END IF;
4879:
4880: l_debug_info := 'Caching Org_id , Name from MO: Security Profile';
4881: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN
4882: AP_IMPORT_UTILITIES_PKG.Print(
4883: AP_IMPORT_INVOICES_PKG.g_debug_switch,l_debug_info);
4884: END IF;
4885:

Line 4883: AP_IMPORT_INVOICES_PKG.g_debug_switch,l_debug_info);

4879:
4880: l_debug_info := 'Caching Org_id , Name from MO: Security Profile';
4881: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN
4882: AP_IMPORT_UTILITIES_PKG.Print(
4883: AP_IMPORT_INVOICES_PKG.g_debug_switch,l_debug_info);
4884: END IF;
4885:
4886: OPEN moac_org;
4887: FETCH moac_org

Line 4892: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN

4888: BULK COLLECT INTO P_Moac_Org_Table;
4889: CLOSE moac_org;
4890:
4891: l_debug_info := 'Caching Org_id from Financials Systems';
4892: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN
4893: AP_IMPORT_UTILITIES_PKG.Print(
4894: AP_IMPORT_INVOICES_PKG.g_debug_switch,l_debug_info);
4895: END IF;
4896:

Line 4894: AP_IMPORT_INVOICES_PKG.g_debug_switch,l_debug_info);

4890:
4891: l_debug_info := 'Caching Org_id from Financials Systems';
4892: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN
4893: AP_IMPORT_UTILITIES_PKG.Print(
4894: AP_IMPORT_INVOICES_PKG.g_debug_switch,l_debug_info);
4895: END IF;
4896:
4897: OPEN fsp_org;
4898: FETCH fsp_org

Line 4942: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN

4938: -- Update the calling sequence
4939: --
4940: l_curr_calling_sequence :=
4941: 'AP_IMPORT_UTILITIES_PKG.Check_For_Calendar_Term<-'||p_calling_sequence;
4942: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN
4943: AP_IMPORT_UTILITIES_PKG.Print(
4944: AP_IMPORT_INVOICES_PKG.g_debug_switch,l_curr_calling_sequence);
4945: END IF;
4946:

Line 4944: AP_IMPORT_INVOICES_PKG.g_debug_switch,l_curr_calling_sequence);

4940: l_curr_calling_sequence :=
4941: 'AP_IMPORT_UTILITIES_PKG.Check_For_Calendar_Term<-'||p_calling_sequence;
4942: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN
4943: AP_IMPORT_UTILITIES_PKG.Print(
4944: AP_IMPORT_INVOICES_PKG.g_debug_switch,l_curr_calling_sequence);
4945: END IF;
4946:
4947: --------------------------------------------------------
4948: l_debug_info := 'OPEN cursor c';

Line 4950: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN

4946:
4947: --------------------------------------------------------
4948: l_debug_info := 'OPEN cursor c';
4949: --------------------------------------------------------
4950: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN
4951: AP_IMPORT_UTILITIES_PKG.Print(
4952: AP_IMPORT_INVOICES_PKG.g_debug_switch,l_debug_info);
4953: END IF;
4954:

Line 4952: AP_IMPORT_INVOICES_PKG.g_debug_switch,l_debug_info);

4948: l_debug_info := 'OPEN cursor c';
4949: --------------------------------------------------------
4950: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN
4951: AP_IMPORT_UTILITIES_PKG.Print(
4952: AP_IMPORT_INVOICES_PKG.g_debug_switch,l_debug_info);
4953: END IF;
4954:
4955: l_cal_exists := '';
4956: OPEN c;

Line 4962: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN

4958: LOOP
4959: --------------------------------------------------------
4960: l_debug_info := 'Fetch cursor C';
4961: --------------------------------------------------------
4962: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN
4963: AP_IMPORT_UTILITIES_PKG.Print(
4964: AP_IMPORT_INVOICES_PKG.g_debug_switch,l_debug_info);
4965: END IF;
4966:

Line 4964: AP_IMPORT_INVOICES_PKG.g_debug_switch,l_debug_info);

4960: l_debug_info := 'Fetch cursor C';
4961: --------------------------------------------------------
4962: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN
4963: AP_IMPORT_UTILITIES_PKG.Print(
4964: AP_IMPORT_INVOICES_PKG.g_debug_switch,l_debug_info);
4965: END IF;
4966:
4967: FETCH c INTO l_calendar;
4968: EXIT WHEN c%NOTFOUND;

Line 4973: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN

4969:
4970: --------------------------------------------------------
4971: l_debug_info := 'Check for calendar';
4972: --------------------------------------------------------
4973: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN
4974: AP_IMPORT_UTILITIES_PKG.Print(
4975: AP_IMPORT_INVOICES_PKG.g_debug_switch,l_debug_info);
4976: END IF;
4977:

Line 4975: AP_IMPORT_INVOICES_PKG.g_debug_switch,l_debug_info);

4971: l_debug_info := 'Check for calendar';
4972: --------------------------------------------------------
4973: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN
4974: AP_IMPORT_UTILITIES_PKG.Print(
4975: AP_IMPORT_INVOICES_PKG.g_debug_switch,l_debug_info);
4976: END IF;
4977:
4978: BEGIN
4979:

Line 5006: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN

5002: END LOOP;
5003: --------------------------------------------------------
5004: l_debug_info := 'CLOSE cursor c';
5005: --------------------------------------------------------
5006: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN
5007: AP_IMPORT_UTILITIES_PKG.Print(
5008: AP_IMPORT_INVOICES_PKG.g_debug_switch,l_debug_info);
5009: END IF;
5010:

Line 5008: AP_IMPORT_INVOICES_PKG.g_debug_switch,l_debug_info);

5004: l_debug_info := 'CLOSE cursor c';
5005: --------------------------------------------------------
5006: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN
5007: AP_IMPORT_UTILITIES_PKG.Print(
5008: AP_IMPORT_INVOICES_PKG.g_debug_switch,l_debug_info);
5009: END IF;
5010:
5011: CLOSE c;
5012:

Line 5029: P_Pay_Group_Table OUT NOCOPY AP_IMPORT_INVOICES_PKG.pay_group_tab_type,

5025: End Check_For_Calendar_Term;
5026:
5027: -- Bug 5448579. This function will be used for caching Pay Group
5028: FUNCTION Cache_Pay_Group (
5029: P_Pay_Group_Table OUT NOCOPY AP_IMPORT_INVOICES_PKG.pay_group_tab_type,
5030: P_Calling_Sequence IN VARCHAR2)
5031: RETURN BOOLEAN IS
5032:
5033: CURSOR pay_group IS

Line 5038: AP_IMPORT_INVOICES_PKG.g_inv_sysdate) -

5034: SELECT lookup_code
5035: FROM po_lookup_codes
5036: WHERE lookup_type = 'PAY GROUP'
5037: AND DECODE(SIGN(NVL(inactive_date,
5038: AP_IMPORT_INVOICES_PKG.g_inv_sysdate) -
5039: AP_IMPORT_INVOICES_PKG.g_inv_sysdate),
5040: -1,'','*') = '*';
5041:
5042: l_debug_info VARCHAR2(1000);

Line 5039: AP_IMPORT_INVOICES_PKG.g_inv_sysdate),

5035: FROM po_lookup_codes
5036: WHERE lookup_type = 'PAY GROUP'
5037: AND DECODE(SIGN(NVL(inactive_date,
5038: AP_IMPORT_INVOICES_PKG.g_inv_sysdate) -
5039: AP_IMPORT_INVOICES_PKG.g_inv_sysdate),
5040: -1,'','*') = '*';
5041:
5042: l_debug_info VARCHAR2(1000);
5043: l_curr_calling_sequence VARCHAR2(2000);

Line 5049: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN

5045:
5046: BEGIN
5047:
5048: l_curr_calling_sequence := 'Cache_Pay_group <- '||P_calling_sequence;
5049: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN
5050: AP_IMPORT_UTILITIES_PKG.Print(
5051: AP_IMPORT_INVOICES_PKG.g_debug_switch,l_curr_calling_sequence);
5052: END IF;
5053:

Line 5051: AP_IMPORT_INVOICES_PKG.g_debug_switch,l_curr_calling_sequence);

5047:
5048: l_curr_calling_sequence := 'Cache_Pay_group <- '||P_calling_sequence;
5049: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN
5050: AP_IMPORT_UTILITIES_PKG.Print(
5051: AP_IMPORT_INVOICES_PKG.g_debug_switch,l_curr_calling_sequence);
5052: END IF;
5053:
5054: l_debug_info := 'Caching Pay Group from PO Lookup Codes';
5055: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN

Line 5055: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN

5051: AP_IMPORT_INVOICES_PKG.g_debug_switch,l_curr_calling_sequence);
5052: END IF;
5053:
5054: l_debug_info := 'Caching Pay Group from PO Lookup Codes';
5055: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN
5056: AP_IMPORT_UTILITIES_PKG.Print(
5057: AP_IMPORT_INVOICES_PKG.g_debug_switch,l_debug_info);
5058: END IF;
5059:

Line 5057: AP_IMPORT_INVOICES_PKG.g_debug_switch,l_debug_info);

5053:
5054: l_debug_info := 'Caching Pay Group from PO Lookup Codes';
5055: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN
5056: AP_IMPORT_UTILITIES_PKG.Print(
5057: AP_IMPORT_INVOICES_PKG.g_debug_switch,l_debug_info);
5058: END IF;
5059:
5060: OPEN pay_group;
5061: FETCH pay_group

Line 5081: P_Payment_Method_Table OUT NOCOPY AP_IMPORT_INVOICES_PKG.payment_method_tab_type,

5077: END Cache_Pay_Group;
5078:
5079: -- Bug 5448579. This function will be used for caching Payment Method from IBY
5080: FUNCTION Cache_Payment_Method (
5081: P_Payment_Method_Table OUT NOCOPY AP_IMPORT_INVOICES_PKG.payment_method_tab_type,
5082: P_Calling_Sequence IN VARCHAR2)
5083: RETURN BOOLEAN IS
5084:
5085: CURSOR payment_method IS

Line 5096: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN

5092:
5093: BEGIN
5094:
5095: l_curr_calling_sequence := 'Cache_Payment_Method <- '||P_calling_sequence;
5096: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN
5097: AP_IMPORT_UTILITIES_PKG.Print(
5098: AP_IMPORT_INVOICES_PKG.g_debug_switch,l_curr_calling_sequence);
5099: END IF;
5100:

Line 5098: AP_IMPORT_INVOICES_PKG.g_debug_switch,l_curr_calling_sequence);

5094:
5095: l_curr_calling_sequence := 'Cache_Payment_Method <- '||P_calling_sequence;
5096: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN
5097: AP_IMPORT_UTILITIES_PKG.Print(
5098: AP_IMPORT_INVOICES_PKG.g_debug_switch,l_curr_calling_sequence);
5099: END IF;
5100:
5101: l_debug_info := 'Caching Payment Method from IBY';
5102: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN

Line 5102: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN

5098: AP_IMPORT_INVOICES_PKG.g_debug_switch,l_curr_calling_sequence);
5099: END IF;
5100:
5101: l_debug_info := 'Caching Payment Method from IBY';
5102: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN
5103: AP_IMPORT_UTILITIES_PKG.Print(
5104: AP_IMPORT_INVOICES_PKG.g_debug_switch,l_debug_info);
5105: END IF;
5106:

Line 5104: AP_IMPORT_INVOICES_PKG.g_debug_switch,l_debug_info);

5100:
5101: l_debug_info := 'Caching Payment Method from IBY';
5102: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN
5103: AP_IMPORT_UTILITIES_PKG.Print(
5104: AP_IMPORT_INVOICES_PKG.g_debug_switch,l_debug_info);
5105: END IF;
5106:
5107: OPEN payment_method;
5108: FETCH payment_method

Line 5127: P_Fnd_Currency_Table OUT NOCOPY AP_IMPORT_INVOICES_PKG.fnd_currency_tab_type,

5123:
5124: END Cache_Payment_Method;
5125:
5126: FUNCTION Cache_Fnd_Currency (
5127: P_Fnd_Currency_Table OUT NOCOPY AP_IMPORT_INVOICES_PKG.fnd_currency_tab_type,
5128: P_Calling_Sequence IN VARCHAR2)
5129: RETURN BOOLEAN IS
5130:
5131: CURSOR currency_code_cur IS

Line 5147: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN

5143:
5144: BEGIN
5145:
5146: l_curr_calling_sequence := 'Cache_Fnd_Currency <- '||P_calling_sequence;
5147: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN
5148: AP_IMPORT_UTILITIES_PKG.Print(
5149: AP_IMPORT_INVOICES_PKG.g_debug_switch,l_curr_calling_sequence);
5150: END IF;
5151:

Line 5149: AP_IMPORT_INVOICES_PKG.g_debug_switch,l_curr_calling_sequence);

5145:
5146: l_curr_calling_sequence := 'Cache_Fnd_Currency <- '||P_calling_sequence;
5147: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN
5148: AP_IMPORT_UTILITIES_PKG.Print(
5149: AP_IMPORT_INVOICES_PKG.g_debug_switch,l_curr_calling_sequence);
5150: END IF;
5151:
5152: l_debug_info := 'Caching Currency from Fnd Currency';
5153: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN

Line 5153: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN

5149: AP_IMPORT_INVOICES_PKG.g_debug_switch,l_curr_calling_sequence);
5150: END IF;
5151:
5152: l_debug_info := 'Caching Currency from Fnd Currency';
5153: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN
5154: AP_IMPORT_UTILITIES_PKG.Print(
5155: AP_IMPORT_INVOICES_PKG.g_debug_switch,l_debug_info);
5156: END IF;
5157:

Line 5155: AP_IMPORT_INVOICES_PKG.g_debug_switch,l_debug_info);

5151:
5152: l_debug_info := 'Caching Currency from Fnd Currency';
5153: IF AP_IMPORT_INVOICES_PKG.g_debug_switch = 'Y' THEN
5154: AP_IMPORT_UTILITIES_PKG.Print(
5155: AP_IMPORT_INVOICES_PKG.g_debug_switch,l_debug_info);
5156: END IF;
5157:
5158: OPEN currency_code_cur;
5159: FETCH currency_code_cur