164: END IF;
165: --
166: EXCEPTION
167: WHEN OTHERS THEN
168: arp_standard.debug('Exception: ar_automatic_clearing_pkg ');
169: RAISE;
170: --
171: END;
172: --
236: 'and cpc.site_use_id(+) is null ' ||
237: 'and cr.pay_from_customer = cps.cust_account_id(+) ' ||
238: 'and cr.customer_site_use_id = cps.site_use_id(+) ';
239: IF PG_DEBUG in ('Y', 'C') THEN
240: arp_standard.debug('Inside main_select_risk');
241: arp_standard.debug( 'Statement ' || statement);
242: END IF;
243: --
244: EXCEPTION
237: 'and cr.pay_from_customer = cps.cust_account_id(+) ' ||
238: 'and cr.customer_site_use_id = cps.site_use_id(+) ';
239: IF PG_DEBUG in ('Y', 'C') THEN
240: arp_standard.debug('Inside main_select_risk');
241: arp_standard.debug( 'Statement ' || statement);
242: END IF;
243: --
244: EXCEPTION
245: WHEN OTHERS THEN
242: END IF;
243: --
244: EXCEPTION
245: WHEN OTHERS THEN
246: arp_standard.debug('Exception: ar_automatic_clearing_pkg ');
247: RAISE;
248: --
249: END;
250: --
326: 'from ar_payment_schedules ps1 ' ||
327: 'where ps1.reversed_cash_receipt_id = cr.cash_receipt_id ' ||
328: 'and ps1.class = ''DM'') ';
329: IF PG_DEBUG in ('Y', 'C') THEN
330: arp_standard.debug('Inside main_select_factored');
331: arp_standard.debug( 'Statement ' || statement);
332: END IF;
333: EXCEPTION
334: WHEN OTHERS THEN
327: 'where ps1.reversed_cash_receipt_id = cr.cash_receipt_id ' ||
328: 'and ps1.class = ''DM'') ';
329: IF PG_DEBUG in ('Y', 'C') THEN
330: arp_standard.debug('Inside main_select_factored');
331: arp_standard.debug( 'Statement ' || statement);
332: END IF;
333: EXCEPTION
334: WHEN OTHERS THEN
335: arp_standard.debug('Exception: ar_automatic_clearing_pkg ');
331: arp_standard.debug( 'Statement ' || statement);
332: END IF;
333: EXCEPTION
334: WHEN OTHERS THEN
335: arp_standard.debug('Exception: ar_automatic_clearing_pkg ');
336: RAISE;
337: --
338: END;
339: --
424: 'from ar_payment_schedules ps1 ' ||
425: 'where ps1.reversed_cash_receipt_id = cr.cash_receipt_id ' ||
426: 'and ps1.class = ''DM'') ';
427: IF PG_DEBUG in ('Y', 'C') THEN
428: arp_standard.debug('Inside main_select_remitted');
429: arp_standard.debug( 'Statement ' || statement);
430: END IF;
431: --
432: EXCEPTION
425: 'where ps1.reversed_cash_receipt_id = cr.cash_receipt_id ' ||
426: 'and ps1.class = ''DM'') ';
427: IF PG_DEBUG in ('Y', 'C') THEN
428: arp_standard.debug('Inside main_select_remitted');
429: arp_standard.debug( 'Statement ' || statement);
430: END IF;
431: --
432: EXCEPTION
433: WHEN OTHERS THEN
430: END IF;
431: --
432: EXCEPTION
433: WHEN OTHERS THEN
434: arp_standard.debug('Exception: ar_automatic_clearing_pkg ');
435: RAISE;
436: --
437: END;
438: --
491: END IF;
492: --
493: EXCEPTION
494: WHEN OTHERS THEN
495: arp_standard.debug('Exception: ar_automatic_clearing_pkg ');
496: RAISE;
497: --
498: END;
499: --
730: nvl(v_ex_rate,1),
731: NULL,NULL );
732: END IF;
733:
734: arp_standard.debug('Before calling arp_cashbook.clear');
735: arp_standard.debug('remitted_or_factored_or_risk :' || to_char(remitted_or_factored_or_risk));
736: arp_standard.debug('v_cr_id :' || to_char(v_cr_id));
737: arp_standard.debug('v_trx_date[clear_date] :' || to_char(v_trx_date));
738: arp_standard.debug('v_ex_date :' || to_char(v_ex_date));
731: NULL,NULL );
732: END IF;
733:
734: arp_standard.debug('Before calling arp_cashbook.clear');
735: arp_standard.debug('remitted_or_factored_or_risk :' || to_char(remitted_or_factored_or_risk));
736: arp_standard.debug('v_cr_id :' || to_char(v_cr_id));
737: arp_standard.debug('v_trx_date[clear_date] :' || to_char(v_trx_date));
738: arp_standard.debug('v_ex_date :' || to_char(v_ex_date));
739: arp_standard.debug('v_ex_rate :' || to_char(v_ex_rate));
732: END IF;
733:
734: arp_standard.debug('Before calling arp_cashbook.clear');
735: arp_standard.debug('remitted_or_factored_or_risk :' || to_char(remitted_or_factored_or_risk));
736: arp_standard.debug('v_cr_id :' || to_char(v_cr_id));
737: arp_standard.debug('v_trx_date[clear_date] :' || to_char(v_trx_date));
738: arp_standard.debug('v_ex_date :' || to_char(v_ex_date));
739: arp_standard.debug('v_ex_rate :' || to_char(v_ex_rate));
740: arp_standard.debug('v_ex_rate_type :' || v_ex_rate_type);
733:
734: arp_standard.debug('Before calling arp_cashbook.clear');
735: arp_standard.debug('remitted_or_factored_or_risk :' || to_char(remitted_or_factored_or_risk));
736: arp_standard.debug('v_cr_id :' || to_char(v_cr_id));
737: arp_standard.debug('v_trx_date[clear_date] :' || to_char(v_trx_date));
738: arp_standard.debug('v_ex_date :' || to_char(v_ex_date));
739: arp_standard.debug('v_ex_rate :' || to_char(v_ex_rate));
740: arp_standard.debug('v_ex_rate_type :' || v_ex_rate_type);
741: arp_standard.debug('v_currency :' || v_currency);
734: arp_standard.debug('Before calling arp_cashbook.clear');
735: arp_standard.debug('remitted_or_factored_or_risk :' || to_char(remitted_or_factored_or_risk));
736: arp_standard.debug('v_cr_id :' || to_char(v_cr_id));
737: arp_standard.debug('v_trx_date[clear_date] :' || to_char(v_trx_date));
738: arp_standard.debug('v_ex_date :' || to_char(v_ex_date));
739: arp_standard.debug('v_ex_rate :' || to_char(v_ex_rate));
740: arp_standard.debug('v_ex_rate_type :' || v_ex_rate_type);
741: arp_standard.debug('v_currency :' || v_currency);
742: arp_standard.debug('New v_amount :' || to_char(v_amount));
735: arp_standard.debug('remitted_or_factored_or_risk :' || to_char(remitted_or_factored_or_risk));
736: arp_standard.debug('v_cr_id :' || to_char(v_cr_id));
737: arp_standard.debug('v_trx_date[clear_date] :' || to_char(v_trx_date));
738: arp_standard.debug('v_ex_date :' || to_char(v_ex_date));
739: arp_standard.debug('v_ex_rate :' || to_char(v_ex_rate));
740: arp_standard.debug('v_ex_rate_type :' || v_ex_rate_type);
741: arp_standard.debug('v_currency :' || v_currency);
742: arp_standard.debug('New v_amount :' || to_char(v_amount));
743: arp_standard.debug('v_fac_disc_amount :' || to_char(v_fac_disc_amount));
736: arp_standard.debug('v_cr_id :' || to_char(v_cr_id));
737: arp_standard.debug('v_trx_date[clear_date] :' || to_char(v_trx_date));
738: arp_standard.debug('v_ex_date :' || to_char(v_ex_date));
739: arp_standard.debug('v_ex_rate :' || to_char(v_ex_rate));
740: arp_standard.debug('v_ex_rate_type :' || v_ex_rate_type);
741: arp_standard.debug('v_currency :' || v_currency);
742: arp_standard.debug('New v_amount :' || to_char(v_amount));
743: arp_standard.debug('v_fac_disc_amount :' || to_char(v_fac_disc_amount));
744: arp_standard.debug('v_ex_rate_old :' || to_char(v_ex_rate_old));
737: arp_standard.debug('v_trx_date[clear_date] :' || to_char(v_trx_date));
738: arp_standard.debug('v_ex_date :' || to_char(v_ex_date));
739: arp_standard.debug('v_ex_rate :' || to_char(v_ex_rate));
740: arp_standard.debug('v_ex_rate_type :' || v_ex_rate_type);
741: arp_standard.debug('v_currency :' || v_currency);
742: arp_standard.debug('New v_amount :' || to_char(v_amount));
743: arp_standard.debug('v_fac_disc_amount :' || to_char(v_fac_disc_amount));
744: arp_standard.debug('v_ex_rate_old :' || to_char(v_ex_rate_old));
745: arp_standard.debug('v_cr_currency :' || v_cr_currency);
738: arp_standard.debug('v_ex_date :' || to_char(v_ex_date));
739: arp_standard.debug('v_ex_rate :' || to_char(v_ex_rate));
740: arp_standard.debug('v_ex_rate_type :' || v_ex_rate_type);
741: arp_standard.debug('v_currency :' || v_currency);
742: arp_standard.debug('New v_amount :' || to_char(v_amount));
743: arp_standard.debug('v_fac_disc_amount :' || to_char(v_fac_disc_amount));
744: arp_standard.debug('v_ex_rate_old :' || to_char(v_ex_rate_old));
745: arp_standard.debug('v_cr_currency :' || v_cr_currency);
746:
739: arp_standard.debug('v_ex_rate :' || to_char(v_ex_rate));
740: arp_standard.debug('v_ex_rate_type :' || v_ex_rate_type);
741: arp_standard.debug('v_currency :' || v_currency);
742: arp_standard.debug('New v_amount :' || to_char(v_amount));
743: arp_standard.debug('v_fac_disc_amount :' || to_char(v_fac_disc_amount));
744: arp_standard.debug('v_ex_rate_old :' || to_char(v_ex_rate_old));
745: arp_standard.debug('v_cr_currency :' || v_cr_currency);
746:
747: arp_cashbook.clear( v_cr_id,
740: arp_standard.debug('v_ex_rate_type :' || v_ex_rate_type);
741: arp_standard.debug('v_currency :' || v_currency);
742: arp_standard.debug('New v_amount :' || to_char(v_amount));
743: arp_standard.debug('v_fac_disc_amount :' || to_char(v_fac_disc_amount));
744: arp_standard.debug('v_ex_rate_old :' || to_char(v_ex_rate_old));
745: arp_standard.debug('v_cr_currency :' || v_cr_currency);
746:
747: arp_cashbook.clear( v_cr_id,
748: v_trx_date,
741: arp_standard.debug('v_currency :' || v_currency);
742: arp_standard.debug('New v_amount :' || to_char(v_amount));
743: arp_standard.debug('v_fac_disc_amount :' || to_char(v_fac_disc_amount));
744: arp_standard.debug('v_ex_rate_old :' || to_char(v_ex_rate_old));
745: arp_standard.debug('v_cr_currency :' || v_cr_currency);
746:
747: arp_cashbook.clear( v_cr_id,
748: v_trx_date,
749: v_gl_date,
760: /* bug: 3820774 Added the handling of exception rate. */
761: ELSE
762: IF v_ex_rate = -1
763: THEN
764: arp_standard.debug('ar_automatic_clearing_pkg: NO_RATE');
765: arp_standard.debug('v_cr_id :' || to_char(v_cr_id));
766: arp_standard.debug('v_ex_date :' || to_char(v_ex_date));
767: arp_standard.debug('v_ex_rate_type :' || v_ex_rate_type);
768: arp_standard.debug('v_ex_rate :' || to_char(v_ex_rate));
761: ELSE
762: IF v_ex_rate = -1
763: THEN
764: arp_standard.debug('ar_automatic_clearing_pkg: NO_RATE');
765: arp_standard.debug('v_cr_id :' || to_char(v_cr_id));
766: arp_standard.debug('v_ex_date :' || to_char(v_ex_date));
767: arp_standard.debug('v_ex_rate_type :' || v_ex_rate_type);
768: arp_standard.debug('v_ex_rate :' || to_char(v_ex_rate));
769:
762: IF v_ex_rate = -1
763: THEN
764: arp_standard.debug('ar_automatic_clearing_pkg: NO_RATE');
765: arp_standard.debug('v_cr_id :' || to_char(v_cr_id));
766: arp_standard.debug('v_ex_date :' || to_char(v_ex_date));
767: arp_standard.debug('v_ex_rate_type :' || v_ex_rate_type);
768: arp_standard.debug('v_ex_rate :' || to_char(v_ex_rate));
769:
770: fnd_file.put_line(fnd_file.log,'ar_automatic_clearing_pkg: NO_RATE');
763: THEN
764: arp_standard.debug('ar_automatic_clearing_pkg: NO_RATE');
765: arp_standard.debug('v_cr_id :' || to_char(v_cr_id));
766: arp_standard.debug('v_ex_date :' || to_char(v_ex_date));
767: arp_standard.debug('v_ex_rate_type :' || v_ex_rate_type);
768: arp_standard.debug('v_ex_rate :' || to_char(v_ex_rate));
769:
770: fnd_file.put_line(fnd_file.log,'ar_automatic_clearing_pkg: NO_RATE');
771: fnd_file.put_line(fnd_file.log,'v_cr_id :' || to_char(v_cr_id));
764: arp_standard.debug('ar_automatic_clearing_pkg: NO_RATE');
765: arp_standard.debug('v_cr_id :' || to_char(v_cr_id));
766: arp_standard.debug('v_ex_date :' || to_char(v_ex_date));
767: arp_standard.debug('v_ex_rate_type :' || v_ex_rate_type);
768: arp_standard.debug('v_ex_rate :' || to_char(v_ex_rate));
769:
770: fnd_file.put_line(fnd_file.log,'ar_automatic_clearing_pkg: NO_RATE');
771: fnd_file.put_line(fnd_file.log,'v_cr_id :' || to_char(v_cr_id));
772: fnd_file.put_line(fnd_file.log,'v_ex_date :' || to_char(v_ex_date));
774: fnd_file.put_line(fnd_file.log,'v_ex_rate :' || to_char(v_ex_rate));
775:
776: ELSIF v_ex_rate = -2
777: THEN
778: arp_standard.debug('ar_automatic_clearing_pkg: INVALID_CURRENCY');
779: arp_standard.debug('v_cr_id :' || to_char(v_cr_id));
780: arp_standard.debug('v_ex_date :' || to_char(v_ex_date));
781: arp_standard.debug('v_ex_rate_type :' || v_ex_rate_type);
782: arp_standard.debug('v_ex_rate :' || to_char(v_ex_rate));
775:
776: ELSIF v_ex_rate = -2
777: THEN
778: arp_standard.debug('ar_automatic_clearing_pkg: INVALID_CURRENCY');
779: arp_standard.debug('v_cr_id :' || to_char(v_cr_id));
780: arp_standard.debug('v_ex_date :' || to_char(v_ex_date));
781: arp_standard.debug('v_ex_rate_type :' || v_ex_rate_type);
782: arp_standard.debug('v_ex_rate :' || to_char(v_ex_rate));
783:
776: ELSIF v_ex_rate = -2
777: THEN
778: arp_standard.debug('ar_automatic_clearing_pkg: INVALID_CURRENCY');
779: arp_standard.debug('v_cr_id :' || to_char(v_cr_id));
780: arp_standard.debug('v_ex_date :' || to_char(v_ex_date));
781: arp_standard.debug('v_ex_rate_type :' || v_ex_rate_type);
782: arp_standard.debug('v_ex_rate :' || to_char(v_ex_rate));
783:
784: fnd_file.put_line(fnd_file.log,'ar_automatic_clearing_pkg: INVALID_CURRENCY');
777: THEN
778: arp_standard.debug('ar_automatic_clearing_pkg: INVALID_CURRENCY');
779: arp_standard.debug('v_cr_id :' || to_char(v_cr_id));
780: arp_standard.debug('v_ex_date :' || to_char(v_ex_date));
781: arp_standard.debug('v_ex_rate_type :' || v_ex_rate_type);
782: arp_standard.debug('v_ex_rate :' || to_char(v_ex_rate));
783:
784: fnd_file.put_line(fnd_file.log,'ar_automatic_clearing_pkg: INVALID_CURRENCY');
785: fnd_file.put_line(fnd_file.log,'v_cr_id :' || to_char(v_cr_id));
778: arp_standard.debug('ar_automatic_clearing_pkg: INVALID_CURRENCY');
779: arp_standard.debug('v_cr_id :' || to_char(v_cr_id));
780: arp_standard.debug('v_ex_date :' || to_char(v_ex_date));
781: arp_standard.debug('v_ex_rate_type :' || v_ex_rate_type);
782: arp_standard.debug('v_ex_rate :' || to_char(v_ex_rate));
783:
784: fnd_file.put_line(fnd_file.log,'ar_automatic_clearing_pkg: INVALID_CURRENCY');
785: fnd_file.put_line(fnd_file.log,'v_cr_id :' || to_char(v_cr_id));
786: fnd_file.put_line(fnd_file.log,'v_ex_date :' || to_char(v_ex_date));
799: dbms_sql.close_cursor(c);
800: --
801: EXCEPTION
802: WHEN OTHERS THEN
803: arp_standard.debug('Exception: ar_automatic_clearing_pkg ');
804: RAISE;
805: --
806: END;
807: --
886: return(TRUE);
887: --
888: EXCEPTION
889: WHEN OTHERS THEN
890: arp_standard.debug('Exception: ar_automatic_clearing_pkg ');
891: RAISE;
892: END;
893: --
894: /*========================================================================+
951: END IF;
952: --
953: EXCEPTION
954: WHEN OTHERS THEN
955: arp_standard.debug('Exception: ar_automatic_clearing_pkg ');
956: RAISE;
957: END;
958:
959: --
1061: SELECT org_id
1062: INTO l_org_id
1063: FROM ar_system_parameters;
1064:
1065: l_master_request_id := arp_standard.profile.request_id;
1066:
1067: IF (p_clr_remitted_receipts = 'Y') THEN
1068: remitted_or_factored_or_risk := 1;
1069: populate_interim_table (
1140: fnd_file.put_line(FND_FILE.LOG,'worker # : ' || l_worker_number );
1141: submit_subrequest (l_worker_number,l_org_id,l_master_request_id);
1142: END LOOP;
1143:
1144: arp_standard.debug ( 'The Master program waits for child processes');
1145:
1146: -- Wait for the completion of the submitted requests
1147: FOR i in 1..p_total_workers LOOP
1148:
1333: --
1334: dbms_sql.parse(c, statement, dbms_sql.native);
1335: --
1336: IF PG_DEBUG in ('Y', 'C') THEN
1337: arp_standard.debug('Inside populate_interim_table()');
1338: arp_standard.debug( 'Statement ' || statement);
1339: END IF;
1340: -- Bind variables
1341: --
1334: dbms_sql.parse(c, statement, dbms_sql.native);
1335: --
1336: IF PG_DEBUG in ('Y', 'C') THEN
1337: arp_standard.debug('Inside populate_interim_table()');
1338: arp_standard.debug( 'Statement ' || statement);
1339: END IF;
1340: -- Bind variables
1341: --
1342: dbms_sql.bind_variable(c, ':b_clear_date' ,p_clear_date);
1374: fnd_file.put_line( FND_FILE.LOG, 'populate_interim_table()-');
1375: --
1376: EXCEPTION
1377: WHEN OTHERS THEN
1378: arp_standard.debug('Exception: ar_automatic_clearing_pkg ');
1379: RAISE;
1380: --
1381: END;
1382: --
1404: 'request_id = :b_request_id ' ||
1405: 'and current_worker = :b_worker_number '||
1406: 'and type = ''RISK'' ';
1407: IF PG_DEBUG in ('Y', 'C') THEN
1408: arp_standard.debug( 'Statement ' || statement);
1409: END IF;
1410: fnd_file.put_line(fnd_file.log, 'main_select_risk_parallel()-');
1411: --
1412: EXCEPTION
1410: fnd_file.put_line(fnd_file.log, 'main_select_risk_parallel()-');
1411: --
1412: EXCEPTION
1413: WHEN OTHERS THEN
1414: arp_standard.debug('Exception: ar_automatic_clearing_pkg ');
1415: RAISE;
1416: --
1417: END;
1418: --
1452: 'request_id = :b_request_id ' ||
1453: 'and current_worker = :b_worker_number '||
1454: 'and type = ''FACTOR'' ';
1455: IF PG_DEBUG in ('Y', 'C') THEN
1456: arp_standard.debug( 'Statement ' || statement);
1457: END IF;
1458: fnd_file.put_line(fnd_file.log, 'main_select_factored_parallel()-');
1459: EXCEPTION
1460: WHEN OTHERS THEN
1457: END IF;
1458: fnd_file.put_line(fnd_file.log, 'main_select_factored_parallel()-');
1459: EXCEPTION
1460: WHEN OTHERS THEN
1461: arp_standard.debug('Exception: ar_automatic_clearing_pkg ');
1462: RAISE;
1463: --
1464: END;
1465: --
1498: 'request_id = :b_request_id ' ||
1499: 'and current_worker = :b_worker_number '||
1500: 'and type = ''REMIT'' ';
1501: IF PG_DEBUG in ('Y', 'C') THEN
1502: arp_standard.debug( 'Statement ' || statement);
1503: END IF;
1504: fnd_file.put_line(fnd_file.log, 'main_select_remitted_parallel()-');
1505: --
1506: EXCEPTION
1504: fnd_file.put_line(fnd_file.log, 'main_select_remitted_parallel()-');
1505: --
1506: EXCEPTION
1507: WHEN OTHERS THEN
1508: arp_standard.debug('Exception: ar_automatic_clearing_pkg ');
1509: RAISE;
1510: --
1511: END;
1512: --
1528: END IF;
1529: --
1530: EXCEPTION
1531: WHEN OTHERS THEN
1532: arp_standard.debug('Exception: ar_automatic_clearing_pkg ');
1533: RAISE;
1534: --
1535: END;
1536: --
1719: ARP_GLOBAL.functional_currency,
1720: nvl(v_ex_rate,1),
1721: NULL,NULL );
1722: END IF;
1723: arp_standard.debug('Before calling arp_cashbook.clear');
1724: arp_standard.debug('remitted_or_factored_or_risk :' || to_char(remitted_or_factored_or_risk));
1725: arp_standard.debug('v_cr_id :' || to_char(v_cr_id));
1726: arp_standard.debug('v_trx_date[clear_date] :' || to_char(v_trx_date));
1727: arp_standard.debug('v_ex_date :' || to_char(v_ex_date));
1720: nvl(v_ex_rate,1),
1721: NULL,NULL );
1722: END IF;
1723: arp_standard.debug('Before calling arp_cashbook.clear');
1724: arp_standard.debug('remitted_or_factored_or_risk :' || to_char(remitted_or_factored_or_risk));
1725: arp_standard.debug('v_cr_id :' || to_char(v_cr_id));
1726: arp_standard.debug('v_trx_date[clear_date] :' || to_char(v_trx_date));
1727: arp_standard.debug('v_ex_date :' || to_char(v_ex_date));
1728: arp_standard.debug('v_ex_rate :' || to_char(v_ex_rate));
1721: NULL,NULL );
1722: END IF;
1723: arp_standard.debug('Before calling arp_cashbook.clear');
1724: arp_standard.debug('remitted_or_factored_or_risk :' || to_char(remitted_or_factored_or_risk));
1725: arp_standard.debug('v_cr_id :' || to_char(v_cr_id));
1726: arp_standard.debug('v_trx_date[clear_date] :' || to_char(v_trx_date));
1727: arp_standard.debug('v_ex_date :' || to_char(v_ex_date));
1728: arp_standard.debug('v_ex_rate :' || to_char(v_ex_rate));
1729: arp_standard.debug('v_ex_rate_type :' || v_ex_rate_type);
1722: END IF;
1723: arp_standard.debug('Before calling arp_cashbook.clear');
1724: arp_standard.debug('remitted_or_factored_or_risk :' || to_char(remitted_or_factored_or_risk));
1725: arp_standard.debug('v_cr_id :' || to_char(v_cr_id));
1726: arp_standard.debug('v_trx_date[clear_date] :' || to_char(v_trx_date));
1727: arp_standard.debug('v_ex_date :' || to_char(v_ex_date));
1728: arp_standard.debug('v_ex_rate :' || to_char(v_ex_rate));
1729: arp_standard.debug('v_ex_rate_type :' || v_ex_rate_type);
1730: arp_standard.debug('v_currency :' || v_currency);
1723: arp_standard.debug('Before calling arp_cashbook.clear');
1724: arp_standard.debug('remitted_or_factored_or_risk :' || to_char(remitted_or_factored_or_risk));
1725: arp_standard.debug('v_cr_id :' || to_char(v_cr_id));
1726: arp_standard.debug('v_trx_date[clear_date] :' || to_char(v_trx_date));
1727: arp_standard.debug('v_ex_date :' || to_char(v_ex_date));
1728: arp_standard.debug('v_ex_rate :' || to_char(v_ex_rate));
1729: arp_standard.debug('v_ex_rate_type :' || v_ex_rate_type);
1730: arp_standard.debug('v_currency :' || v_currency);
1731: arp_standard.debug('New v_amount :' || to_char(v_amount));
1724: arp_standard.debug('remitted_or_factored_or_risk :' || to_char(remitted_or_factored_or_risk));
1725: arp_standard.debug('v_cr_id :' || to_char(v_cr_id));
1726: arp_standard.debug('v_trx_date[clear_date] :' || to_char(v_trx_date));
1727: arp_standard.debug('v_ex_date :' || to_char(v_ex_date));
1728: arp_standard.debug('v_ex_rate :' || to_char(v_ex_rate));
1729: arp_standard.debug('v_ex_rate_type :' || v_ex_rate_type);
1730: arp_standard.debug('v_currency :' || v_currency);
1731: arp_standard.debug('New v_amount :' || to_char(v_amount));
1732: arp_standard.debug('v_fac_disc_amount :' || to_char(v_fac_disc_amount));
1725: arp_standard.debug('v_cr_id :' || to_char(v_cr_id));
1726: arp_standard.debug('v_trx_date[clear_date] :' || to_char(v_trx_date));
1727: arp_standard.debug('v_ex_date :' || to_char(v_ex_date));
1728: arp_standard.debug('v_ex_rate :' || to_char(v_ex_rate));
1729: arp_standard.debug('v_ex_rate_type :' || v_ex_rate_type);
1730: arp_standard.debug('v_currency :' || v_currency);
1731: arp_standard.debug('New v_amount :' || to_char(v_amount));
1732: arp_standard.debug('v_fac_disc_amount :' || to_char(v_fac_disc_amount));
1733: arp_standard.debug('v_ex_rate_old :' || to_char(v_ex_rate_old));
1726: arp_standard.debug('v_trx_date[clear_date] :' || to_char(v_trx_date));
1727: arp_standard.debug('v_ex_date :' || to_char(v_ex_date));
1728: arp_standard.debug('v_ex_rate :' || to_char(v_ex_rate));
1729: arp_standard.debug('v_ex_rate_type :' || v_ex_rate_type);
1730: arp_standard.debug('v_currency :' || v_currency);
1731: arp_standard.debug('New v_amount :' || to_char(v_amount));
1732: arp_standard.debug('v_fac_disc_amount :' || to_char(v_fac_disc_amount));
1733: arp_standard.debug('v_ex_rate_old :' || to_char(v_ex_rate_old));
1734: arp_standard.debug('v_cr_currency :' || v_cr_currency);
1727: arp_standard.debug('v_ex_date :' || to_char(v_ex_date));
1728: arp_standard.debug('v_ex_rate :' || to_char(v_ex_rate));
1729: arp_standard.debug('v_ex_rate_type :' || v_ex_rate_type);
1730: arp_standard.debug('v_currency :' || v_currency);
1731: arp_standard.debug('New v_amount :' || to_char(v_amount));
1732: arp_standard.debug('v_fac_disc_amount :' || to_char(v_fac_disc_amount));
1733: arp_standard.debug('v_ex_rate_old :' || to_char(v_ex_rate_old));
1734: arp_standard.debug('v_cr_currency :' || v_cr_currency);
1735:
1728: arp_standard.debug('v_ex_rate :' || to_char(v_ex_rate));
1729: arp_standard.debug('v_ex_rate_type :' || v_ex_rate_type);
1730: arp_standard.debug('v_currency :' || v_currency);
1731: arp_standard.debug('New v_amount :' || to_char(v_amount));
1732: arp_standard.debug('v_fac_disc_amount :' || to_char(v_fac_disc_amount));
1733: arp_standard.debug('v_ex_rate_old :' || to_char(v_ex_rate_old));
1734: arp_standard.debug('v_cr_currency :' || v_cr_currency);
1735:
1736: arp_cashbook.clear( v_cr_id,
1729: arp_standard.debug('v_ex_rate_type :' || v_ex_rate_type);
1730: arp_standard.debug('v_currency :' || v_currency);
1731: arp_standard.debug('New v_amount :' || to_char(v_amount));
1732: arp_standard.debug('v_fac_disc_amount :' || to_char(v_fac_disc_amount));
1733: arp_standard.debug('v_ex_rate_old :' || to_char(v_ex_rate_old));
1734: arp_standard.debug('v_cr_currency :' || v_cr_currency);
1735:
1736: arp_cashbook.clear( v_cr_id,
1737: v_trx_date,
1730: arp_standard.debug('v_currency :' || v_currency);
1731: arp_standard.debug('New v_amount :' || to_char(v_amount));
1732: arp_standard.debug('v_fac_disc_amount :' || to_char(v_fac_disc_amount));
1733: arp_standard.debug('v_ex_rate_old :' || to_char(v_ex_rate_old));
1734: arp_standard.debug('v_cr_currency :' || v_cr_currency);
1735:
1736: arp_cashbook.clear( v_cr_id,
1737: v_trx_date,
1738: v_gl_date,
1750: /* bug: 3820774 Added the handling of exception rate. */
1751: ELSE
1752: IF v_ex_rate = -1
1753: THEN
1754: arp_standard.debug('ar_automatic_clearing_pkg: NO_RATE');
1755: arp_standard.debug('v_cr_id :' || to_char(v_cr_id));
1756: arp_standard.debug('v_ex_date :' || to_char(v_ex_date));
1757: arp_standard.debug('v_ex_rate_type :' || v_ex_rate_type);
1758: arp_standard.debug('v_ex_rate :' || to_char(v_ex_rate));
1751: ELSE
1752: IF v_ex_rate = -1
1753: THEN
1754: arp_standard.debug('ar_automatic_clearing_pkg: NO_RATE');
1755: arp_standard.debug('v_cr_id :' || to_char(v_cr_id));
1756: arp_standard.debug('v_ex_date :' || to_char(v_ex_date));
1757: arp_standard.debug('v_ex_rate_type :' || v_ex_rate_type);
1758: arp_standard.debug('v_ex_rate :' || to_char(v_ex_rate));
1759:
1752: IF v_ex_rate = -1
1753: THEN
1754: arp_standard.debug('ar_automatic_clearing_pkg: NO_RATE');
1755: arp_standard.debug('v_cr_id :' || to_char(v_cr_id));
1756: arp_standard.debug('v_ex_date :' || to_char(v_ex_date));
1757: arp_standard.debug('v_ex_rate_type :' || v_ex_rate_type);
1758: arp_standard.debug('v_ex_rate :' || to_char(v_ex_rate));
1759:
1760: fnd_file.put_line(fnd_file.log,'ar_automatic_clearing_pkg: NO_RATE');
1753: THEN
1754: arp_standard.debug('ar_automatic_clearing_pkg: NO_RATE');
1755: arp_standard.debug('v_cr_id :' || to_char(v_cr_id));
1756: arp_standard.debug('v_ex_date :' || to_char(v_ex_date));
1757: arp_standard.debug('v_ex_rate_type :' || v_ex_rate_type);
1758: arp_standard.debug('v_ex_rate :' || to_char(v_ex_rate));
1759:
1760: fnd_file.put_line(fnd_file.log,'ar_automatic_clearing_pkg: NO_RATE');
1761: fnd_file.put_line(fnd_file.log,'v_cr_id :' || to_char(v_cr_id));
1754: arp_standard.debug('ar_automatic_clearing_pkg: NO_RATE');
1755: arp_standard.debug('v_cr_id :' || to_char(v_cr_id));
1756: arp_standard.debug('v_ex_date :' || to_char(v_ex_date));
1757: arp_standard.debug('v_ex_rate_type :' || v_ex_rate_type);
1758: arp_standard.debug('v_ex_rate :' || to_char(v_ex_rate));
1759:
1760: fnd_file.put_line(fnd_file.log,'ar_automatic_clearing_pkg: NO_RATE');
1761: fnd_file.put_line(fnd_file.log,'v_cr_id :' || to_char(v_cr_id));
1762: fnd_file.put_line(fnd_file.log,'v_ex_date :' || to_char(v_ex_date));
1764: fnd_file.put_line(fnd_file.log,'v_ex_rate :' || to_char(v_ex_rate));
1765:
1766: ELSIF v_ex_rate = -2
1767: THEN
1768: arp_standard.debug('ar_automatic_clearing_pkg: INVALID_CURRENCY');
1769: arp_standard.debug('v_cr_id :' || to_char(v_cr_id));
1770: arp_standard.debug('v_ex_date :' || to_char(v_ex_date));
1771: arp_standard.debug('v_ex_rate_type :' || v_ex_rate_type);
1772: arp_standard.debug('v_ex_rate :' || to_char(v_ex_rate));
1765:
1766: ELSIF v_ex_rate = -2
1767: THEN
1768: arp_standard.debug('ar_automatic_clearing_pkg: INVALID_CURRENCY');
1769: arp_standard.debug('v_cr_id :' || to_char(v_cr_id));
1770: arp_standard.debug('v_ex_date :' || to_char(v_ex_date));
1771: arp_standard.debug('v_ex_rate_type :' || v_ex_rate_type);
1772: arp_standard.debug('v_ex_rate :' || to_char(v_ex_rate));
1773:
1766: ELSIF v_ex_rate = -2
1767: THEN
1768: arp_standard.debug('ar_automatic_clearing_pkg: INVALID_CURRENCY');
1769: arp_standard.debug('v_cr_id :' || to_char(v_cr_id));
1770: arp_standard.debug('v_ex_date :' || to_char(v_ex_date));
1771: arp_standard.debug('v_ex_rate_type :' || v_ex_rate_type);
1772: arp_standard.debug('v_ex_rate :' || to_char(v_ex_rate));
1773:
1774: fnd_file.put_line(fnd_file.log,'ar_automatic_clearing_pkg: INVALID_CURRENCY');
1767: THEN
1768: arp_standard.debug('ar_automatic_clearing_pkg: INVALID_CURRENCY');
1769: arp_standard.debug('v_cr_id :' || to_char(v_cr_id));
1770: arp_standard.debug('v_ex_date :' || to_char(v_ex_date));
1771: arp_standard.debug('v_ex_rate_type :' || v_ex_rate_type);
1772: arp_standard.debug('v_ex_rate :' || to_char(v_ex_rate));
1773:
1774: fnd_file.put_line(fnd_file.log,'ar_automatic_clearing_pkg: INVALID_CURRENCY');
1775: fnd_file.put_line(fnd_file.log,'v_cr_id :' || to_char(v_cr_id));
1768: arp_standard.debug('ar_automatic_clearing_pkg: INVALID_CURRENCY');
1769: arp_standard.debug('v_cr_id :' || to_char(v_cr_id));
1770: arp_standard.debug('v_ex_date :' || to_char(v_ex_date));
1771: arp_standard.debug('v_ex_rate_type :' || v_ex_rate_type);
1772: arp_standard.debug('v_ex_rate :' || to_char(v_ex_rate));
1773:
1774: fnd_file.put_line(fnd_file.log,'ar_automatic_clearing_pkg: INVALID_CURRENCY');
1775: fnd_file.put_line(fnd_file.log,'v_cr_id :' || to_char(v_cr_id));
1776: fnd_file.put_line(fnd_file.log,'v_ex_date :' || to_char(v_ex_date));
1790: fnd_file.put_line(fnd_file.log, 'clr_remit_disc_risk_rcpts_pa()-');
1791: --
1792: EXCEPTION
1793: WHEN OTHERS THEN
1794: arp_standard.debug('Exception: ar_automatic_clearing_pkg ');
1795: RAISE;
1796: --
1797: END;
1798: --