[Ben Sommerville] Multicurrency project merge
authorMikel Irurita <mikel.irurita@openbravo.com>
Thu, 02 Jun 2011 10:59:08 +0200
changeset 12671 285a5d879aaa
parent 12670 edb6c469aba9
child 12672 a59d05d09fb1
[Ben Sommerville] Multicurrency project merge
modules/org.openbravo.advpaymentmngt/src-db/database/model/views/APRM_FINACC_TRANSACTION_V.xml
modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_COLUMN.xml
modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_FIELD.xml
modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_TEXTINTERFACES.xml
modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddOrderOrInvoice.html
modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddOrderOrInvoice.java
modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddOrderOrInvoice.xml
modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddPaymentFromInvoice.html
modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddPaymentFromInvoice.java
modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddPaymentFromInvoice.xml
modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddPaymentFromTransaction.html
modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddPaymentFromTransaction.java
modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddPaymentFromTransaction.xml
modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddTransaction.java
modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddTransactionGrid.xml
modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_forms/BatchPaymentExecution.java
modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_forms/Transactions.java
modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/dao/AdvPaymentMngtDao.java
modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/dao/TransactionsDao.java
modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_AddPayment.java
modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_PaymentProcess.java
modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_PaymentProposalProcess.java
modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/utility/FIN_Utility.java
modules/org.openbravo.advpaymentmngt/web/org.openbravo.advpaymentmngt/FIN_Utilities.js
referencedata/sampledata/F_B_International_Group.xml
referencedata/sampledata/QA_Testing.xml
src-db/database/model/tables/FIN_FINACC_PAYMENTMETHOD.xml
src-db/database/model/tables/FIN_FINACC_TRANSACTION.xml
src-db/database/model/tables/FIN_PAYMENT.xml
src-db/database/model/tables/FIN_PAYMENTMETHOD.xml
src-db/database/model/tables/FIN_PAYMENT_PROPOSAL.xml
src-db/database/model/views/FIN_PAYMENT_DETAIL_V.xml
src-db/database/sourcedata/AD_AUXILIARINPUT.xml
src-db/database/sourcedata/AD_CALLOUT.xml
src-db/database/sourcedata/AD_COLUMN.xml
src-db/database/sourcedata/AD_ELEMENT.xml
src-db/database/sourcedata/AD_FIELD.xml
src-db/database/sourcedata/AD_MODEL_OBJECT.xml
src-db/database/sourcedata/AD_MODEL_OBJECT_MAPPING.xml
src-db/database/sourcedata/AD_VAL_RULE.xml
src/org/openbravo/base/util/Convert.java
src/org/openbravo/dal/service/OBDal.java
src/org/openbravo/erpCommon/ad_callouts/SE_PaymentMethod_FinAccount.java
src/org/openbravo/erpCommon/ad_callouts/SE_Payment_AmountOrConvertRate.java
src/org/openbravo/erpCommon/ad_callouts/SE_Payment_Currency.java
src/org/openbravo/erpCommon/ad_callouts/SE_Payment_FinAccTransactionAmount.java
src/org/openbravo/erpCommon/ad_callouts/SE_Payment_FinAccount.java
src/org/openbravo/erpCommon/ad_forms/DocFINFinAccTransaction.java
src/org/openbravo/erpCommon/ad_forms/DocFINPayment.java
src/org/openbravo/erpCommon/ad_forms/DocFINReconciliation.java
src/org/openbravo/erpCommon/ad_forms/Fact.java
src/org/openbravo/erpCommon/ad_forms/FactLine.java
src/org/openbravo/erpCommon/dao/CurrencyDao.java
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/model/views/APRM_FINACC_TRANSACTION_V.xml	Thu Jun 02 00:27:17 2011 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/model/views/APRM_FINACC_TRANSACTION_V.xml	Thu Jun 02 10:59:08 2011 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="VIEW APRM_FINACC_TRANSACTION_V">
-    <view name="APRM_FINACC_TRANSACTION_V"><![CDATA[SELECT trx.fin_finacc_transaction_id AS aprm_finacc_transaction_v_id, trx.fin_finacc_transaction_id, trx.ad_client_id, trx.ad_org_id, trx.isactive, trx.created, trx.createdby, trx.updated, trx.updatedby, trx.fin_financial_account_id, trx.line, trx.description, trx.statementdate, trx.trxtype, trx.fin_payment_id, trx.c_glitem_id, trx.depositamt, trx.paymentamt, trx.c_currency_id, trx.fin_reconciliation_id, trx.status, trx.createdbyalgorithm, trx.posted, trx.dateacct, trx.processed, trx.processing, trx.user1_id, trx.user2_id, trx.c_activity_id, trx.c_campaign_id, trx.c_project_id, 
+    <view name="APRM_FINACC_TRANSACTION_V"><![CDATA[SELECT trx.fin_finacc_transaction_id AS aprm_finacc_transaction_v_id, trx.fin_finacc_transaction_id, trx.ad_client_id, trx.ad_org_id, trx.isactive, trx.created, trx.createdby, trx.updated, trx.updatedby, trx.fin_financial_account_id, trx.line, trx.description, trx.statementdate, trx.trxtype, trx.fin_payment_id, trx.c_glitem_id, trx.depositamt, trx.paymentamt, trx.c_currency_id, trx.fin_reconciliation_id, trx.status, trx.createdbyalgorithm, trx.posted, trx.dateacct, trx.processed, trx.processing, trx.user1_id, trx.user2_id, trx.c_activity_id, trx.c_campaign_id, trx.c_project_id, trx.foreign_currency_id, trx.foreign_amount, trx.foreign_convert_rate, 
 CASE trx.status
 WHEN 'RPPC' THEN 'Y'
 ELSE 'N'
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_COLUMN.xml	Thu Jun 02 00:27:17 2011 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_COLUMN.xml	Thu Jun 02 10:59:08 2011 +0200
@@ -202,6 +202,38 @@
 <!--248F6C6C2AF2435BA1AEDBEDFDEBC794-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
 <!--248F6C6C2AF2435BA1AEDBEDFDEBC794--></AD_COLUMN>
 
+<!--24F844751D19499CA1215A76C9BC2543--><AD_COLUMN>
+<!--24F844751D19499CA1215A76C9BC2543-->  <AD_COLUMN_ID><![CDATA[24F844751D19499CA1215A76C9BC2543]]></AD_COLUMN_ID>
+<!--24F844751D19499CA1215A76C9BC2543-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--24F844751D19499CA1215A76C9BC2543-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--24F844751D19499CA1215A76C9BC2543-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--24F844751D19499CA1215A76C9BC2543-->  <NAME><![CDATA[Foreign_Amount]]></NAME>
+<!--24F844751D19499CA1215A76C9BC2543-->  <DESCRIPTION><![CDATA[Amount of transaction in foreign currency]]></DESCRIPTION>
+<!--24F844751D19499CA1215A76C9BC2543-->  <COLUMNNAME><![CDATA[Foreign_Amount]]></COLUMNNAME>
+<!--24F844751D19499CA1215A76C9BC2543-->  <AD_TABLE_ID><![CDATA[FF8080812FFEC82D012FFECCE3400030]]></AD_TABLE_ID>
+<!--24F844751D19499CA1215A76C9BC2543-->  <AD_REFERENCE_ID><![CDATA[12]]></AD_REFERENCE_ID>
+<!--24F844751D19499CA1215A76C9BC2543-->  <FIELDLENGTH><![CDATA[22]]></FIELDLENGTH>
+<!--24F844751D19499CA1215A76C9BC2543-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--24F844751D19499CA1215A76C9BC2543-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--24F844751D19499CA1215A76C9BC2543-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
+<!--24F844751D19499CA1215A76C9BC2543-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--24F844751D19499CA1215A76C9BC2543-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--24F844751D19499CA1215A76C9BC2543-->  <SEQNO><![CDATA[390]]></SEQNO>
+<!--24F844751D19499CA1215A76C9BC2543-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--24F844751D19499CA1215A76C9BC2543-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--24F844751D19499CA1215A76C9BC2543-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--24F844751D19499CA1215A76C9BC2543-->  <AD_ELEMENT_ID><![CDATA[4028C9BC2E5AD1A6012E5B5B44820037]]></AD_ELEMENT_ID>
+<!--24F844751D19499CA1215A76C9BC2543-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--24F844751D19499CA1215A76C9BC2543-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--24F844751D19499CA1215A76C9BC2543-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--24F844751D19499CA1215A76C9BC2543-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--24F844751D19499CA1215A76C9BC2543-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--24F844751D19499CA1215A76C9BC2543-->  <POSITION><![CDATA[33]]></POSITION>
+<!--24F844751D19499CA1215A76C9BC2543-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--24F844751D19499CA1215A76C9BC2543-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
+<!--24F844751D19499CA1215A76C9BC2543-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
+<!--24F844751D19499CA1215A76C9BC2543--></AD_COLUMN>
+
 <!--26E3702BD6F345FB802CD410C12FC6EE--><AD_COLUMN>
 <!--26E3702BD6F345FB802CD410C12FC6EE-->  <AD_COLUMN_ID><![CDATA[26E3702BD6F345FB802CD410C12FC6EE]]></AD_COLUMN_ID>
 <!--26E3702BD6F345FB802CD410C12FC6EE-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -496,7 +528,7 @@
 <!--437AA9021406408BA74FA0710375ECA5-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
 <!--437AA9021406408BA74FA0710375ECA5-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
 <!--437AA9021406408BA74FA0710375ECA5-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
-<!--437AA9021406408BA74FA0710375ECA5-->  <POSITION><![CDATA[24]]></POSITION>
+<!--437AA9021406408BA74FA0710375ECA5-->  <POSITION><![CDATA[25]]></POSITION>
 <!--437AA9021406408BA74FA0710375ECA5-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
 <!--437AA9021406408BA74FA0710375ECA5-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
 <!--437AA9021406408BA74FA0710375ECA5-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
@@ -1002,6 +1034,39 @@
 <!--7DC34559B3F3B45BE040007F0100784A-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
 <!--7DC34559B3F3B45BE040007F0100784A--></AD_COLUMN>
 
+<!--7EAACC5726724D16B8C92BA732BB566B--><AD_COLUMN>
+<!--7EAACC5726724D16B8C92BA732BB566B-->  <AD_COLUMN_ID><![CDATA[7EAACC5726724D16B8C92BA732BB566B]]></AD_COLUMN_ID>
+<!--7EAACC5726724D16B8C92BA732BB566B-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--7EAACC5726724D16B8C92BA732BB566B-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--7EAACC5726724D16B8C92BA732BB566B-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--7EAACC5726724D16B8C92BA732BB566B-->  <NAME><![CDATA[Foreign_Currency_ID]]></NAME>
+<!--7EAACC5726724D16B8C92BA732BB566B-->  <DESCRIPTION><![CDATA[The currency that transaction was made in if it was different to the account currency]]></DESCRIPTION>
+<!--7EAACC5726724D16B8C92BA732BB566B-->  <COLUMNNAME><![CDATA[Foreign_Currency_ID]]></COLUMNNAME>
+<!--7EAACC5726724D16B8C92BA732BB566B-->  <AD_TABLE_ID><![CDATA[FF8080812FFEC82D012FFECCE3400030]]></AD_TABLE_ID>
+<!--7EAACC5726724D16B8C92BA732BB566B-->  <AD_REFERENCE_ID><![CDATA[18]]></AD_REFERENCE_ID>
+<!--7EAACC5726724D16B8C92BA732BB566B-->  <AD_REFERENCE_VALUE_ID><![CDATA[112]]></AD_REFERENCE_VALUE_ID>
+<!--7EAACC5726724D16B8C92BA732BB566B-->  <FIELDLENGTH><![CDATA[32]]></FIELDLENGTH>
+<!--7EAACC5726724D16B8C92BA732BB566B-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--7EAACC5726724D16B8C92BA732BB566B-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--7EAACC5726724D16B8C92BA732BB566B-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
+<!--7EAACC5726724D16B8C92BA732BB566B-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--7EAACC5726724D16B8C92BA732BB566B-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--7EAACC5726724D16B8C92BA732BB566B-->  <SEQNO><![CDATA[380]]></SEQNO>
+<!--7EAACC5726724D16B8C92BA732BB566B-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--7EAACC5726724D16B8C92BA732BB566B-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--7EAACC5726724D16B8C92BA732BB566B-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--7EAACC5726724D16B8C92BA732BB566B-->  <AD_ELEMENT_ID><![CDATA[4028C9BC2E78EF43012E78FD91500018]]></AD_ELEMENT_ID>
+<!--7EAACC5726724D16B8C92BA732BB566B-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--7EAACC5726724D16B8C92BA732BB566B-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--7EAACC5726724D16B8C92BA732BB566B-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--7EAACC5726724D16B8C92BA732BB566B-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--7EAACC5726724D16B8C92BA732BB566B-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--7EAACC5726724D16B8C92BA732BB566B-->  <POSITION><![CDATA[32]]></POSITION>
+<!--7EAACC5726724D16B8C92BA732BB566B-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--7EAACC5726724D16B8C92BA732BB566B-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
+<!--7EAACC5726724D16B8C92BA732BB566B-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
+<!--7EAACC5726724D16B8C92BA732BB566B--></AD_COLUMN>
+
 <!--7FCAAFE989BCA375E040007F01007F0A--><AD_COLUMN>
 <!--7FCAAFE989BCA375E040007F01007F0A-->  <AD_COLUMN_ID><![CDATA[7FCAAFE989BCA375E040007F01007F0A]]></AD_COLUMN_ID>
 <!--7FCAAFE989BCA375E040007F01007F0A-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -2176,7 +2241,7 @@
 <!--87E684342B43AC4CE040007F010047EE-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
 <!--87E684342B43AC4CE040007F010047EE-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
 <!--87E684342B43AC4CE040007F010047EE-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
-<!--87E684342B43AC4CE040007F010047EE-->  <POSITION><![CDATA[26]]></POSITION>
+<!--87E684342B43AC4CE040007F010047EE-->  <POSITION><![CDATA[27]]></POSITION>
 <!--87E684342B43AC4CE040007F010047EE-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
 <!--87E684342B43AC4CE040007F010047EE-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
 <!--87E684342B43AC4CE040007F010047EE-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
@@ -2713,7 +2778,7 @@
 <!--973EC2D699E948979150D33750F5D35D-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
 <!--973EC2D699E948979150D33750F5D35D-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
 <!--973EC2D699E948979150D33750F5D35D-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
-<!--973EC2D699E948979150D33750F5D35D-->  <POSITION><![CDATA[25]]></POSITION>
+<!--973EC2D699E948979150D33750F5D35D-->  <POSITION><![CDATA[26]]></POSITION>
 <!--973EC2D699E948979150D33750F5D35D-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
 <!--973EC2D699E948979150D33750F5D35D-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
 <!--973EC2D699E948979150D33750F5D35D-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
@@ -4033,7 +4098,7 @@
 <!--A37C6F84AA3D3F50E040007F01006E35-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
 <!--A37C6F84AA3D3F50E040007F01006E35-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
 <!--A37C6F84AA3D3F50E040007F01006E35-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
-<!--A37C6F84AA3D3F50E040007F01006E35-->  <POSITION><![CDATA[32]]></POSITION>
+<!--A37C6F84AA3D3F50E040007F01006E35-->  <POSITION><![CDATA[35]]></POSITION>
 <!--A37C6F84AA3D3F50E040007F01006E35-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
 <!--A37C6F84AA3D3F50E040007F01006E35-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
 <!--A37C6F84AA3D3F50E040007F01006E35-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
@@ -4067,7 +4132,7 @@
 <!--A37C6F84AA3E3F50E040007F01006E35-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
 <!--A37C6F84AA3E3F50E040007F01006E35-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
 <!--A37C6F84AA3E3F50E040007F01006E35-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
-<!--A37C6F84AA3E3F50E040007F01006E35-->  <POSITION><![CDATA[33]]></POSITION>
+<!--A37C6F84AA3E3F50E040007F01006E35-->  <POSITION><![CDATA[36]]></POSITION>
 <!--A37C6F84AA3E3F50E040007F01006E35-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
 <!--A37C6F84AA3E3F50E040007F01006E35-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
 <!--A37C6F84AA3E3F50E040007F01006E35-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
@@ -4098,7 +4163,7 @@
 <!--A37C6F84AA3F3F50E040007F01006E35-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
 <!--A37C6F84AA3F3F50E040007F01006E35-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
 <!--A37C6F84AA3F3F50E040007F01006E35-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
-<!--A37C6F84AA3F3F50E040007F01006E35-->  <POSITION><![CDATA[34]]></POSITION>
+<!--A37C6F84AA3F3F50E040007F01006E35-->  <POSITION><![CDATA[37]]></POSITION>
 <!--A37C6F84AA3F3F50E040007F01006E35-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
 <!--A37C6F84AA3F3F50E040007F01006E35-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
 <!--A37C6F84AA3F3F50E040007F01006E35-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
@@ -4129,7 +4194,7 @@
 <!--A37C6F84AA403F50E040007F01006E35-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
 <!--A37C6F84AA403F50E040007F01006E35-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
 <!--A37C6F84AA403F50E040007F01006E35-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
-<!--A37C6F84AA403F50E040007F01006E35-->  <POSITION><![CDATA[35]]></POSITION>
+<!--A37C6F84AA403F50E040007F01006E35-->  <POSITION><![CDATA[38]]></POSITION>
 <!--A37C6F84AA403F50E040007F01006E35-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
 <!--A37C6F84AA403F50E040007F01006E35-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
 <!--A37C6F84AA403F50E040007F01006E35-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
@@ -4161,7 +4226,7 @@
 <!--A37C6F84AA413F50E040007F01006E35-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
 <!--A37C6F84AA413F50E040007F01006E35-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
 <!--A37C6F84AA413F50E040007F01006E35-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
-<!--A37C6F84AA413F50E040007F01006E35-->  <POSITION><![CDATA[36]]></POSITION>
+<!--A37C6F84AA413F50E040007F01006E35-->  <POSITION><![CDATA[39]]></POSITION>
 <!--A37C6F84AA413F50E040007F01006E35-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
 <!--A37C6F84AA413F50E040007F01006E35-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
 <!--A37C6F84AA413F50E040007F01006E35-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
@@ -4195,7 +4260,7 @@
 <!--A3A1CA451F85C5FBE040007F0100386C-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
 <!--A3A1CA451F85C5FBE040007F0100386C-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
 <!--A3A1CA451F85C5FBE040007F0100386C-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
-<!--A3A1CA451F85C5FBE040007F0100386C-->  <POSITION><![CDATA[37]]></POSITION>
+<!--A3A1CA451F85C5FBE040007F0100386C-->  <POSITION><![CDATA[40]]></POSITION>
 <!--A3A1CA451F85C5FBE040007F0100386C-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
 <!--A3A1CA451F85C5FBE040007F0100386C-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
 <!--A3A1CA451F85C5FBE040007F0100386C-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
@@ -4732,6 +4797,38 @@
 <!--FA5D73939D454F8E804DFACEE44D0C6E-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
 <!--FA5D73939D454F8E804DFACEE44D0C6E--></AD_COLUMN>
 
+<!--FDE1E0795CDC4A00AC9D587E0D98D319--><AD_COLUMN>
+<!--FDE1E0795CDC4A00AC9D587E0D98D319-->  <AD_COLUMN_ID><![CDATA[FDE1E0795CDC4A00AC9D587E0D98D319]]></AD_COLUMN_ID>
+<!--FDE1E0795CDC4A00AC9D587E0D98D319-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--FDE1E0795CDC4A00AC9D587E0D98D319-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--FDE1E0795CDC4A00AC9D587E0D98D319-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--FDE1E0795CDC4A00AC9D587E0D98D319-->  <NAME><![CDATA[Foreign_Convert_Rate]]></NAME>
+<!--FDE1E0795CDC4A00AC9D587E0D98D319-->  <DESCRIPTION><![CDATA[Conversion rate between foreign currency & financial account currency]]></DESCRIPTION>
+<!--FDE1E0795CDC4A00AC9D587E0D98D319-->  <COLUMNNAME><![CDATA[Foreign_Convert_Rate]]></COLUMNNAME>
+<!--FDE1E0795CDC4A00AC9D587E0D98D319-->  <AD_TABLE_ID><![CDATA[FF8080812FFEC82D012FFECCE3400030]]></AD_TABLE_ID>
+<!--FDE1E0795CDC4A00AC9D587E0D98D319-->  <AD_REFERENCE_ID><![CDATA[800019]]></AD_REFERENCE_ID>
+<!--FDE1E0795CDC4A00AC9D587E0D98D319-->  <FIELDLENGTH><![CDATA[12]]></FIELDLENGTH>
+<!--FDE1E0795CDC4A00AC9D587E0D98D319-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--FDE1E0795CDC4A00AC9D587E0D98D319-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--FDE1E0795CDC4A00AC9D587E0D98D319-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
+<!--FDE1E0795CDC4A00AC9D587E0D98D319-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--FDE1E0795CDC4A00AC9D587E0D98D319-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--FDE1E0795CDC4A00AC9D587E0D98D319-->  <SEQNO><![CDATA[400]]></SEQNO>
+<!--FDE1E0795CDC4A00AC9D587E0D98D319-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--FDE1E0795CDC4A00AC9D587E0D98D319-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--FDE1E0795CDC4A00AC9D587E0D98D319-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--FDE1E0795CDC4A00AC9D587E0D98D319-->  <AD_ELEMENT_ID><![CDATA[4028C9BC2E78EF43012E78FE3130001E]]></AD_ELEMENT_ID>
+<!--FDE1E0795CDC4A00AC9D587E0D98D319-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--FDE1E0795CDC4A00AC9D587E0D98D319-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--FDE1E0795CDC4A00AC9D587E0D98D319-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--FDE1E0795CDC4A00AC9D587E0D98D319-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--FDE1E0795CDC4A00AC9D587E0D98D319-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--FDE1E0795CDC4A00AC9D587E0D98D319-->  <POSITION><![CDATA[34]]></POSITION>
+<!--FDE1E0795CDC4A00AC9D587E0D98D319-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--FDE1E0795CDC4A00AC9D587E0D98D319-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
+<!--FDE1E0795CDC4A00AC9D587E0D98D319-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
+<!--FDE1E0795CDC4A00AC9D587E0D98D319--></AD_COLUMN>
+
 <!--FF082FD594D64E958DB1CE24B011C97B--><AD_COLUMN>
 <!--FF082FD594D64E958DB1CE24B011C97B-->  <AD_COLUMN_ID><![CDATA[FF082FD594D64E958DB1CE24B011C97B]]></AD_COLUMN_ID>
 <!--FF082FD594D64E958DB1CE24B011C97B-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_FIELD.xml	Thu Jun 02 00:27:17 2011 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_FIELD.xml	Thu Jun 02 10:59:08 2011 +0200
@@ -174,7 +174,7 @@
 <!--07EC2EF3577B4AAC84EBABCC8DA7C292-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
 <!--07EC2EF3577B4AAC84EBABCC8DA7C292-->  <GRID_SEQNO><![CDATA[80]]></GRID_SEQNO>
 <!--07EC2EF3577B4AAC84EBABCC8DA7C292-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
-<!--07EC2EF3577B4AAC84EBABCC8DA7C292-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--07EC2EF3577B4AAC84EBABCC8DA7C292-->  <STARTNEWLINE><![CDATA[Y]]></STARTNEWLINE>
 <!--07EC2EF3577B4AAC84EBABCC8DA7C292-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
 <!--07EC2EF3577B4AAC84EBABCC8DA7C292--></AD_FIELD>
 
@@ -972,6 +972,343 @@
 <!--3FD9A2F24FA84165AB5ACE9F2BF085FC-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
 <!--3FD9A2F24FA84165AB5ACE9F2BF085FC--></AD_FIELD>
 
+<!--40289C1D2E1298CF012E12B6619D005F--><AD_FIELD>
+<!--40289C1D2E1298CF012E12B6619D005F-->  <AD_FIELD_ID><![CDATA[40289C1D2E1298CF012E12B6619D005F]]></AD_FIELD_ID>
+<!--40289C1D2E1298CF012E12B6619D005F-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--40289C1D2E1298CF012E12B6619D005F-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--40289C1D2E1298CF012E12B6619D005F-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--40289C1D2E1298CF012E12B6619D005F-->  <NAME><![CDATA[Finacc_Currency_ID]]></NAME>
+<!--40289C1D2E1298CF012E12B6619D005F-->  <DESCRIPTION><![CDATA[The currency of the financial account that payment is associated with]]></DESCRIPTION>
+<!--40289C1D2E1298CF012E12B6619D005F-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--40289C1D2E1298CF012E12B6619D005F-->  <AD_TAB_ID><![CDATA[F9751D712A804D57B97A36803843F2D7]]></AD_TAB_ID>
+<!--40289C1D2E1298CF012E12B6619D005F-->  <AD_COLUMN_ID><![CDATA[3DFAB9DBB8D143A3951271CBE02C224F]]></AD_COLUMN_ID>
+<!--40289C1D2E1298CF012E12B6619D005F-->  <ISDISPLAYED><![CDATA[N]]></ISDISPLAYED>
+<!--40289C1D2E1298CF012E12B6619D005F-->  <DISPLAYLENGTH><![CDATA[0]]></DISPLAYLENGTH>
+<!--40289C1D2E1298CF012E12B6619D005F-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--40289C1D2E1298CF012E12B6619D005F-->  <SEQNO><![CDATA[180]]></SEQNO>
+<!--40289C1D2E1298CF012E12B6619D005F-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--40289C1D2E1298CF012E12B6619D005F-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--40289C1D2E1298CF012E12B6619D005F-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--40289C1D2E1298CF012E12B6619D005F-->  <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
+<!--40289C1D2E1298CF012E12B6619D005F-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--40289C1D2E1298CF012E12B6619D005F-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--40289C1D2E1298CF012E12B6619D005F-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--40289C1D2E1298CF012E12B6619D005F-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--40289C1D2E1298CF012E12B6619D005F-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--40289C1D2E1298CF012E12B6619D005F--></AD_FIELD>
+
+<!--40289C1D2E1298CF012E12E79661009B--><AD_FIELD>
+<!--40289C1D2E1298CF012E12E79661009B-->  <AD_FIELD_ID><![CDATA[40289C1D2E1298CF012E12E79661009B]]></AD_FIELD_ID>
+<!--40289C1D2E1298CF012E12E79661009B-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--40289C1D2E1298CF012E12E79661009B-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--40289C1D2E1298CF012E12E79661009B-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--40289C1D2E1298CF012E12E79661009B-->  <NAME><![CDATA[Expected (Account Currency)]]></NAME>
+<!--40289C1D2E1298CF012E12E79661009B-->  <DESCRIPTION><![CDATA[Expected amount in the financial account currency]]></DESCRIPTION>
+<!--40289C1D2E1298CF012E12E79661009B-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--40289C1D2E1298CF012E12E79661009B-->  <AD_TAB_ID><![CDATA[6707D7449A8D45DB851F608BA88329C8]]></AD_TAB_ID>
+<!--40289C1D2E1298CF012E12E79661009B-->  <AD_COLUMN_ID><![CDATA[91375A8F85DF48FFA962C940E9BAF889]]></AD_COLUMN_ID>
+<!--40289C1D2E1298CF012E12E79661009B-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--40289C1D2E1298CF012E12E79661009B-->  <DISPLAYLOGIC><![CDATA[@C_Currency_ID@!@FinAcc_Currency_ID@]]></DISPLAYLOGIC>
+<!--40289C1D2E1298CF012E12E79661009B-->  <DISPLAYLENGTH><![CDATA[12]]></DISPLAYLENGTH>
+<!--40289C1D2E1298CF012E12E79661009B-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--40289C1D2E1298CF012E12E79661009B-->  <SEQNO><![CDATA[140]]></SEQNO>
+<!--40289C1D2E1298CF012E12E79661009B-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--40289C1D2E1298CF012E12E79661009B-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--40289C1D2E1298CF012E12E79661009B-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--40289C1D2E1298CF012E12E79661009B-->  <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
+<!--40289C1D2E1298CF012E12E79661009B-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--40289C1D2E1298CF012E12E79661009B-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--40289C1D2E1298CF012E12E79661009B-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--40289C1D2E1298CF012E12E79661009B-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--40289C1D2E1298CF012E12E79661009B-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--40289C1D2E1298CF012E12E79661009B--></AD_FIELD>
+
+<!--40289C1D2E1298CF012E12E7F5BC00A1--><AD_FIELD>
+<!--40289C1D2E1298CF012E12E7F5BC00A1-->  <AD_FIELD_ID><![CDATA[40289C1D2E1298CF012E12E7F5BC00A1]]></AD_FIELD_ID>
+<!--40289C1D2E1298CF012E12E7F5BC00A1-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--40289C1D2E1298CF012E12E7F5BC00A1-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--40289C1D2E1298CF012E12E7F5BC00A1-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--40289C1D2E1298CF012E12E7F5BC00A1-->  <NAME><![CDATA[Paid (Account Currency)]]></NAME>
+<!--40289C1D2E1298CF012E12E7F5BC00A1-->  <DESCRIPTION><![CDATA[Amount paid in financial account currency]]></DESCRIPTION>
+<!--40289C1D2E1298CF012E12E7F5BC00A1-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--40289C1D2E1298CF012E12E7F5BC00A1-->  <AD_TAB_ID><![CDATA[6707D7449A8D45DB851F608BA88329C8]]></AD_TAB_ID>
+<!--40289C1D2E1298CF012E12E7F5BC00A1-->  <AD_COLUMN_ID><![CDATA[8DF9D8A154DC4353ACD4F91DA30CA06E]]></AD_COLUMN_ID>
+<!--40289C1D2E1298CF012E12E7F5BC00A1-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--40289C1D2E1298CF012E12E7F5BC00A1-->  <DISPLAYLOGIC><![CDATA[@C_Currency_ID@!@FinAcc_Currency_ID@]]></DISPLAYLOGIC>
+<!--40289C1D2E1298CF012E12E7F5BC00A1-->  <DISPLAYLENGTH><![CDATA[12]]></DISPLAYLENGTH>
+<!--40289C1D2E1298CF012E12E7F5BC00A1-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--40289C1D2E1298CF012E12E7F5BC00A1-->  <SEQNO><![CDATA[150]]></SEQNO>
+<!--40289C1D2E1298CF012E12E7F5BC00A1-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--40289C1D2E1298CF012E12E7F5BC00A1-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--40289C1D2E1298CF012E12E7F5BC00A1-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--40289C1D2E1298CF012E12E7F5BC00A1-->  <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
+<!--40289C1D2E1298CF012E12E7F5BC00A1-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--40289C1D2E1298CF012E12E7F5BC00A1-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--40289C1D2E1298CF012E12E7F5BC00A1-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--40289C1D2E1298CF012E12E7F5BC00A1-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--40289C1D2E1298CF012E12E7F5BC00A1-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--40289C1D2E1298CF012E12E7F5BC00A1--></AD_FIELD>
+
+<!--40289C1D2E1298CF012E12E943F000AD--><AD_FIELD>
+<!--40289C1D2E1298CF012E12E943F000AD-->  <AD_FIELD_ID><![CDATA[40289C1D2E1298CF012E12E943F000AD]]></AD_FIELD_ID>
+<!--40289C1D2E1298CF012E12E943F000AD-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--40289C1D2E1298CF012E12E943F000AD-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--40289C1D2E1298CF012E12E943F000AD-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--40289C1D2E1298CF012E12E943F000AD-->  <NAME><![CDATA[Finacc_Currency_ID]]></NAME>
+<!--40289C1D2E1298CF012E12E943F000AD-->  <DESCRIPTION><![CDATA[The currency of the financial account that payment is associated with]]></DESCRIPTION>
+<!--40289C1D2E1298CF012E12E943F000AD-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--40289C1D2E1298CF012E12E943F000AD-->  <AD_TAB_ID><![CDATA[6707D7449A8D45DB851F608BA88329C8]]></AD_TAB_ID>
+<!--40289C1D2E1298CF012E12E943F000AD-->  <AD_COLUMN_ID><![CDATA[3DFAB9DBB8D143A3951271CBE02C224F]]></AD_COLUMN_ID>
+<!--40289C1D2E1298CF012E12E943F000AD-->  <ISDISPLAYED><![CDATA[N]]></ISDISPLAYED>
+<!--40289C1D2E1298CF012E12E943F000AD-->  <DISPLAYLENGTH><![CDATA[0]]></DISPLAYLENGTH>
+<!--40289C1D2E1298CF012E12E943F000AD-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--40289C1D2E1298CF012E12E943F000AD-->  <SEQNO><![CDATA[180]]></SEQNO>
+<!--40289C1D2E1298CF012E12E943F000AD-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--40289C1D2E1298CF012E12E943F000AD-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--40289C1D2E1298CF012E12E943F000AD-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--40289C1D2E1298CF012E12E943F000AD-->  <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
+<!--40289C1D2E1298CF012E12E943F000AD-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--40289C1D2E1298CF012E12E943F000AD-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--40289C1D2E1298CF012E12E943F000AD-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--40289C1D2E1298CF012E12E943F000AD-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--40289C1D2E1298CF012E12E943F000AD-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--40289C1D2E1298CF012E12E943F000AD--></AD_FIELD>
+
+<!--40289C1D2E1298CF012E12EA901C00B6--><AD_FIELD>
+<!--40289C1D2E1298CF012E12EA901C00B6-->  <AD_FIELD_ID><![CDATA[40289C1D2E1298CF012E12EA901C00B6]]></AD_FIELD_ID>
+<!--40289C1D2E1298CF012E12EA901C00B6-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--40289C1D2E1298CF012E12EA901C00B6-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--40289C1D2E1298CF012E12EA901C00B6-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--40289C1D2E1298CF012E12EA901C00B6-->  <NAME><![CDATA[Exchange Rate]]></NAME>
+<!--40289C1D2E1298CF012E12EA901C00B6-->  <DESCRIPTION><![CDATA[Exchange rate used to convert payment to financial account currency]]></DESCRIPTION>
+<!--40289C1D2E1298CF012E12EA901C00B6-->  <HELP><![CDATA[The exchange rate used to convert the payment amount to the financial account amount]]></HELP>
+<!--40289C1D2E1298CF012E12EA901C00B6-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--40289C1D2E1298CF012E12EA901C00B6-->  <AD_TAB_ID><![CDATA[6707D7449A8D45DB851F608BA88329C8]]></AD_TAB_ID>
+<!--40289C1D2E1298CF012E12EA901C00B6-->  <AD_COLUMN_ID><![CDATA[85072D35A21C4487A9B16A210878D3C8]]></AD_COLUMN_ID>
+<!--40289C1D2E1298CF012E12EA901C00B6-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--40289C1D2E1298CF012E12EA901C00B6-->  <DISPLAYLOGIC><![CDATA[@C_Currency_ID@!@FinAcc_Currency_ID@]]></DISPLAYLOGIC>
+<!--40289C1D2E1298CF012E12EA901C00B6-->  <DISPLAYLENGTH><![CDATA[12]]></DISPLAYLENGTH>
+<!--40289C1D2E1298CF012E12EA901C00B6-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--40289C1D2E1298CF012E12EA901C00B6-->  <SEQNO><![CDATA[160]]></SEQNO>
+<!--40289C1D2E1298CF012E12EA901C00B6-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--40289C1D2E1298CF012E12EA901C00B6-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--40289C1D2E1298CF012E12EA901C00B6-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--40289C1D2E1298CF012E12EA901C00B6-->  <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
+<!--40289C1D2E1298CF012E12EA901C00B6-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--40289C1D2E1298CF012E12EA901C00B6-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--40289C1D2E1298CF012E12EA901C00B6-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--40289C1D2E1298CF012E12EA901C00B6-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--40289C1D2E1298CF012E12EA901C00B6-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--40289C1D2E1298CF012E12EA901C00B6--></AD_FIELD>
+
+<!--40289C1D2E1298CF012E12EDCD3400D3--><AD_FIELD>
+<!--40289C1D2E1298CF012E12EDCD3400D3-->  <AD_FIELD_ID><![CDATA[40289C1D2E1298CF012E12EDCD3400D3]]></AD_FIELD_ID>
+<!--40289C1D2E1298CF012E12EDCD3400D3-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--40289C1D2E1298CF012E12EDCD3400D3-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--40289C1D2E1298CF012E12EDCD3400D3-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--40289C1D2E1298CF012E12EDCD3400D3-->  <NAME><![CDATA[Expected (Account Currency)]]></NAME>
+<!--40289C1D2E1298CF012E12EDCD3400D3-->  <DESCRIPTION><![CDATA[Expected amount in the financial account currency]]></DESCRIPTION>
+<!--40289C1D2E1298CF012E12EDCD3400D3-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--40289C1D2E1298CF012E12EDCD3400D3-->  <AD_TAB_ID><![CDATA[FD40D9C2F1F14943933DEFEF4A8458E4]]></AD_TAB_ID>
+<!--40289C1D2E1298CF012E12EDCD3400D3-->  <AD_COLUMN_ID><![CDATA[91375A8F85DF48FFA962C940E9BAF889]]></AD_COLUMN_ID>
+<!--40289C1D2E1298CF012E12EDCD3400D3-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--40289C1D2E1298CF012E12EDCD3400D3-->  <DISPLAYLOGIC><![CDATA[@C_Currency_ID@!@FinAcc_Currency_ID@]]></DISPLAYLOGIC>
+<!--40289C1D2E1298CF012E12EDCD3400D3-->  <DISPLAYLENGTH><![CDATA[12]]></DISPLAYLENGTH>
+<!--40289C1D2E1298CF012E12EDCD3400D3-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--40289C1D2E1298CF012E12EDCD3400D3-->  <SEQNO><![CDATA[140]]></SEQNO>
+<!--40289C1D2E1298CF012E12EDCD3400D3-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--40289C1D2E1298CF012E12EDCD3400D3-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--40289C1D2E1298CF012E12EDCD3400D3-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--40289C1D2E1298CF012E12EDCD3400D3-->  <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
+<!--40289C1D2E1298CF012E12EDCD3400D3-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--40289C1D2E1298CF012E12EDCD3400D3-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--40289C1D2E1298CF012E12EDCD3400D3-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--40289C1D2E1298CF012E12EDCD3400D3-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--40289C1D2E1298CF012E12EDCD3400D3-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--40289C1D2E1298CF012E12EDCD3400D3--></AD_FIELD>
+
+<!--40289C1D2E1298CF012E12EE237C00D9--><AD_FIELD>
+<!--40289C1D2E1298CF012E12EE237C00D9-->  <AD_FIELD_ID><![CDATA[40289C1D2E1298CF012E12EE237C00D9]]></AD_FIELD_ID>
+<!--40289C1D2E1298CF012E12EE237C00D9-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--40289C1D2E1298CF012E12EE237C00D9-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--40289C1D2E1298CF012E12EE237C00D9-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--40289C1D2E1298CF012E12EE237C00D9-->  <NAME><![CDATA[Received (Account Currency)]]></NAME>
+<!--40289C1D2E1298CF012E12EE237C00D9-->  <DESCRIPTION><![CDATA[Amount received in financial account currency]]></DESCRIPTION>
+<!--40289C1D2E1298CF012E12EE237C00D9-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--40289C1D2E1298CF012E12EE237C00D9-->  <AD_TAB_ID><![CDATA[FD40D9C2F1F14943933DEFEF4A8458E4]]></AD_TAB_ID>
+<!--40289C1D2E1298CF012E12EE237C00D9-->  <AD_COLUMN_ID><![CDATA[8DF9D8A154DC4353ACD4F91DA30CA06E]]></AD_COLUMN_ID>
+<!--40289C1D2E1298CF012E12EE237C00D9-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--40289C1D2E1298CF012E12EE237C00D9-->  <DISPLAYLOGIC><![CDATA[@C_Currency_ID@!@FinAcc_Currency_ID@]]></DISPLAYLOGIC>
+<!--40289C1D2E1298CF012E12EE237C00D9-->  <DISPLAYLENGTH><![CDATA[12]]></DISPLAYLENGTH>
+<!--40289C1D2E1298CF012E12EE237C00D9-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--40289C1D2E1298CF012E12EE237C00D9-->  <SEQNO><![CDATA[150]]></SEQNO>
+<!--40289C1D2E1298CF012E12EE237C00D9-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--40289C1D2E1298CF012E12EE237C00D9-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--40289C1D2E1298CF012E12EE237C00D9-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--40289C1D2E1298CF012E12EE237C00D9-->  <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
+<!--40289C1D2E1298CF012E12EE237C00D9-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--40289C1D2E1298CF012E12EE237C00D9-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--40289C1D2E1298CF012E12EE237C00D9-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--40289C1D2E1298CF012E12EE237C00D9-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--40289C1D2E1298CF012E12EE237C00D9-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--40289C1D2E1298CF012E12EE237C00D9--></AD_FIELD>
+
+<!--40289C1D2E1298CF012E12EE89A000DF--><AD_FIELD>
+<!--40289C1D2E1298CF012E12EE89A000DF-->  <AD_FIELD_ID><![CDATA[40289C1D2E1298CF012E12EE89A000DF]]></AD_FIELD_ID>
+<!--40289C1D2E1298CF012E12EE89A000DF-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--40289C1D2E1298CF012E12EE89A000DF-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--40289C1D2E1298CF012E12EE89A000DF-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--40289C1D2E1298CF012E12EE89A000DF-->  <NAME><![CDATA[Exchange Rate]]></NAME>
+<!--40289C1D2E1298CF012E12EE89A000DF-->  <DESCRIPTION><![CDATA[Exchange rate used to convert payment to financial account currency]]></DESCRIPTION>
+<!--40289C1D2E1298CF012E12EE89A000DF-->  <HELP><![CDATA[The exchange rate used to convert the payment amount to the financial account amount]]></HELP>
+<!--40289C1D2E1298CF012E12EE89A000DF-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--40289C1D2E1298CF012E12EE89A000DF-->  <AD_TAB_ID><![CDATA[FD40D9C2F1F14943933DEFEF4A8458E4]]></AD_TAB_ID>
+<!--40289C1D2E1298CF012E12EE89A000DF-->  <AD_COLUMN_ID><![CDATA[85072D35A21C4487A9B16A210878D3C8]]></AD_COLUMN_ID>
+<!--40289C1D2E1298CF012E12EE89A000DF-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--40289C1D2E1298CF012E12EE89A000DF-->  <DISPLAYLOGIC><![CDATA[@C_Currency_ID@!@FinAcc_Currency_ID@]]></DISPLAYLOGIC>
+<!--40289C1D2E1298CF012E12EE89A000DF-->  <DISPLAYLENGTH><![CDATA[12]]></DISPLAYLENGTH>
+<!--40289C1D2E1298CF012E12EE89A000DF-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--40289C1D2E1298CF012E12EE89A000DF-->  <SEQNO><![CDATA[160]]></SEQNO>
+<!--40289C1D2E1298CF012E12EE89A000DF-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--40289C1D2E1298CF012E12EE89A000DF-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--40289C1D2E1298CF012E12EE89A000DF-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--40289C1D2E1298CF012E12EE89A000DF-->  <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
+<!--40289C1D2E1298CF012E12EE89A000DF-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--40289C1D2E1298CF012E12EE89A000DF-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--40289C1D2E1298CF012E12EE89A000DF-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--40289C1D2E1298CF012E12EE89A000DF-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--40289C1D2E1298CF012E12EE89A000DF-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--40289C1D2E1298CF012E12EE89A000DF--></AD_FIELD>
+
+<!--40289C1D2E1298CF012E12EF4A1700E7--><AD_FIELD>
+<!--40289C1D2E1298CF012E12EF4A1700E7-->  <AD_FIELD_ID><![CDATA[40289C1D2E1298CF012E12EF4A1700E7]]></AD_FIELD_ID>
+<!--40289C1D2E1298CF012E12EF4A1700E7-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--40289C1D2E1298CF012E12EF4A1700E7-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--40289C1D2E1298CF012E12EF4A1700E7-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--40289C1D2E1298CF012E12EF4A1700E7-->  <NAME><![CDATA[Finacc_Currency_ID]]></NAME>
+<!--40289C1D2E1298CF012E12EF4A1700E7-->  <DESCRIPTION><![CDATA[The currency of the financial account that payment is associated with]]></DESCRIPTION>
+<!--40289C1D2E1298CF012E12EF4A1700E7-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--40289C1D2E1298CF012E12EF4A1700E7-->  <AD_TAB_ID><![CDATA[FD40D9C2F1F14943933DEFEF4A8458E4]]></AD_TAB_ID>
+<!--40289C1D2E1298CF012E12EF4A1700E7-->  <AD_COLUMN_ID><![CDATA[3DFAB9DBB8D143A3951271CBE02C224F]]></AD_COLUMN_ID>
+<!--40289C1D2E1298CF012E12EF4A1700E7-->  <ISDISPLAYED><![CDATA[N]]></ISDISPLAYED>
+<!--40289C1D2E1298CF012E12EF4A1700E7-->  <DISPLAYLENGTH><![CDATA[0]]></DISPLAYLENGTH>
+<!--40289C1D2E1298CF012E12EF4A1700E7-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--40289C1D2E1298CF012E12EF4A1700E7-->  <SEQNO><![CDATA[180]]></SEQNO>
+<!--40289C1D2E1298CF012E12EF4A1700E7-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--40289C1D2E1298CF012E12EF4A1700E7-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--40289C1D2E1298CF012E12EF4A1700E7-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--40289C1D2E1298CF012E12EF4A1700E7-->  <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
+<!--40289C1D2E1298CF012E12EF4A1700E7-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--40289C1D2E1298CF012E12EF4A1700E7-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--40289C1D2E1298CF012E12EF4A1700E7-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--40289C1D2E1298CF012E12EF4A1700E7-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--40289C1D2E1298CF012E12EF4A1700E7-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--40289C1D2E1298CF012E12EF4A1700E7--></AD_FIELD>
+
+<!--40289C1D2E1298CF012E12F0CDA300F7--><AD_FIELD>
+<!--40289C1D2E1298CF012E12F0CDA300F7-->  <AD_FIELD_ID><![CDATA[40289C1D2E1298CF012E12F0CDA300F7]]></AD_FIELD_ID>
+<!--40289C1D2E1298CF012E12F0CDA300F7-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--40289C1D2E1298CF012E12F0CDA300F7-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--40289C1D2E1298CF012E12F0CDA300F7-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--40289C1D2E1298CF012E12F0CDA300F7-->  <NAME><![CDATA[Expected (Account Currency)]]></NAME>
+<!--40289C1D2E1298CF012E12F0CDA300F7-->  <DESCRIPTION><![CDATA[Expected amount in the financial account currency]]></DESCRIPTION>
+<!--40289C1D2E1298CF012E12F0CDA300F7-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--40289C1D2E1298CF012E12F0CDA300F7-->  <AD_TAB_ID><![CDATA[B82C02920AA84E8DB57D553185BD2F06]]></AD_TAB_ID>
+<!--40289C1D2E1298CF012E12F0CDA300F7-->  <AD_COLUMN_ID><![CDATA[91375A8F85DF48FFA962C940E9BAF889]]></AD_COLUMN_ID>
+<!--40289C1D2E1298CF012E12F0CDA300F7-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--40289C1D2E1298CF012E12F0CDA300F7-->  <DISPLAYLOGIC><![CDATA[@C_Currency_ID@!@FinAcc_Currency_ID@]]></DISPLAYLOGIC>
+<!--40289C1D2E1298CF012E12F0CDA300F7-->  <DISPLAYLENGTH><![CDATA[12]]></DISPLAYLENGTH>
+<!--40289C1D2E1298CF012E12F0CDA300F7-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--40289C1D2E1298CF012E12F0CDA300F7-->  <SEQNO><![CDATA[140]]></SEQNO>
+<!--40289C1D2E1298CF012E12F0CDA300F7-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--40289C1D2E1298CF012E12F0CDA300F7-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--40289C1D2E1298CF012E12F0CDA300F7-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--40289C1D2E1298CF012E12F0CDA300F7-->  <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
+<!--40289C1D2E1298CF012E12F0CDA300F7-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--40289C1D2E1298CF012E12F0CDA300F7-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--40289C1D2E1298CF012E12F0CDA300F7-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--40289C1D2E1298CF012E12F0CDA300F7-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--40289C1D2E1298CF012E12F0CDA300F7-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--40289C1D2E1298CF012E12F0CDA300F7--></AD_FIELD>
+
+<!--40289C1D2E1298CF012E12F1178100FD--><AD_FIELD>
+<!--40289C1D2E1298CF012E12F1178100FD-->  <AD_FIELD_ID><![CDATA[40289C1D2E1298CF012E12F1178100FD]]></AD_FIELD_ID>
+<!--40289C1D2E1298CF012E12F1178100FD-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--40289C1D2E1298CF012E12F1178100FD-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--40289C1D2E1298CF012E12F1178100FD-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--40289C1D2E1298CF012E12F1178100FD-->  <NAME><![CDATA[Received (Account Currency)]]></NAME>
+<!--40289C1D2E1298CF012E12F1178100FD-->  <DESCRIPTION><![CDATA[Amount received in financial account currency]]></DESCRIPTION>
+<!--40289C1D2E1298CF012E12F1178100FD-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--40289C1D2E1298CF012E12F1178100FD-->  <AD_TAB_ID><![CDATA[B82C02920AA84E8DB57D553185BD2F06]]></AD_TAB_ID>
+<!--40289C1D2E1298CF012E12F1178100FD-->  <AD_COLUMN_ID><![CDATA[8DF9D8A154DC4353ACD4F91DA30CA06E]]></AD_COLUMN_ID>
+<!--40289C1D2E1298CF012E12F1178100FD-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--40289C1D2E1298CF012E12F1178100FD-->  <DISPLAYLOGIC><![CDATA[@C_Currency_ID@!@FinAcc_Currency_ID@]]></DISPLAYLOGIC>
+<!--40289C1D2E1298CF012E12F1178100FD-->  <DISPLAYLENGTH><![CDATA[12]]></DISPLAYLENGTH>
+<!--40289C1D2E1298CF012E12F1178100FD-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--40289C1D2E1298CF012E12F1178100FD-->  <SEQNO><![CDATA[150]]></SEQNO>
+<!--40289C1D2E1298CF012E12F1178100FD-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--40289C1D2E1298CF012E12F1178100FD-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--40289C1D2E1298CF012E12F1178100FD-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--40289C1D2E1298CF012E12F1178100FD-->  <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
+<!--40289C1D2E1298CF012E12F1178100FD-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--40289C1D2E1298CF012E12F1178100FD-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--40289C1D2E1298CF012E12F1178100FD-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--40289C1D2E1298CF012E12F1178100FD-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--40289C1D2E1298CF012E12F1178100FD-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--40289C1D2E1298CF012E12F1178100FD--></AD_FIELD>
+
+<!--40289C1D2E1298CF012E12F217090104--><AD_FIELD>
+<!--40289C1D2E1298CF012E12F217090104-->  <AD_FIELD_ID><![CDATA[40289C1D2E1298CF012E12F217090104]]></AD_FIELD_ID>
+<!--40289C1D2E1298CF012E12F217090104-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--40289C1D2E1298CF012E12F217090104-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--40289C1D2E1298CF012E12F217090104-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--40289C1D2E1298CF012E12F217090104-->  <NAME><![CDATA[Exchange Rate]]></NAME>
+<!--40289C1D2E1298CF012E12F217090104-->  <DESCRIPTION><![CDATA[Exchange rate used to convert payment to financial account currency]]></DESCRIPTION>
+<!--40289C1D2E1298CF012E12F217090104-->  <HELP><![CDATA[The exchange rate used to convert the payment amount to the financial account amount]]></HELP>
+<!--40289C1D2E1298CF012E12F217090104-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--40289C1D2E1298CF012E12F217090104-->  <AD_TAB_ID><![CDATA[B82C02920AA84E8DB57D553185BD2F06]]></AD_TAB_ID>
+<!--40289C1D2E1298CF012E12F217090104-->  <AD_COLUMN_ID><![CDATA[85072D35A21C4487A9B16A210878D3C8]]></AD_COLUMN_ID>
+<!--40289C1D2E1298CF012E12F217090104-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--40289C1D2E1298CF012E12F217090104-->  <DISPLAYLOGIC><![CDATA[@C_Currency_ID@!@FinAcc_Currency_ID@]]></DISPLAYLOGIC>
+<!--40289C1D2E1298CF012E12F217090104-->  <DISPLAYLENGTH><![CDATA[12]]></DISPLAYLENGTH>
+<!--40289C1D2E1298CF012E12F217090104-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--40289C1D2E1298CF012E12F217090104-->  <SEQNO><![CDATA[160]]></SEQNO>
+<!--40289C1D2E1298CF012E12F217090104-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--40289C1D2E1298CF012E12F217090104-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--40289C1D2E1298CF012E12F217090104-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--40289C1D2E1298CF012E12F217090104-->  <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
+<!--40289C1D2E1298CF012E12F217090104-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--40289C1D2E1298CF012E12F217090104-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--40289C1D2E1298CF012E12F217090104-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--40289C1D2E1298CF012E12F217090104-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--40289C1D2E1298CF012E12F217090104-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--40289C1D2E1298CF012E12F217090104--></AD_FIELD>
+
+<!--40289C1D2E1298CF012E12F26EB1010A--><AD_FIELD>
+<!--40289C1D2E1298CF012E12F26EB1010A-->  <AD_FIELD_ID><![CDATA[40289C1D2E1298CF012E12F26EB1010A]]></AD_FIELD_ID>
+<!--40289C1D2E1298CF012E12F26EB1010A-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--40289C1D2E1298CF012E12F26EB1010A-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--40289C1D2E1298CF012E12F26EB1010A-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--40289C1D2E1298CF012E12F26EB1010A-->  <NAME><![CDATA[Finacc_Currency_ID]]></NAME>
+<!--40289C1D2E1298CF012E12F26EB1010A-->  <DESCRIPTION><![CDATA[The currency of the financial account that payment is associated with]]></DESCRIPTION>
+<!--40289C1D2E1298CF012E12F26EB1010A-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--40289C1D2E1298CF012E12F26EB1010A-->  <AD_TAB_ID><![CDATA[B82C02920AA84E8DB57D553185BD2F06]]></AD_TAB_ID>
+<!--40289C1D2E1298CF012E12F26EB1010A-->  <AD_COLUMN_ID><![CDATA[3DFAB9DBB8D143A3951271CBE02C224F]]></AD_COLUMN_ID>
+<!--40289C1D2E1298CF012E12F26EB1010A-->  <ISDISPLAYED><![CDATA[N]]></ISDISPLAYED>
+<!--40289C1D2E1298CF012E12F26EB1010A-->  <DISPLAYLENGTH><![CDATA[0]]></DISPLAYLENGTH>
+<!--40289C1D2E1298CF012E12F26EB1010A-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--40289C1D2E1298CF012E12F26EB1010A-->  <SEQNO><![CDATA[180]]></SEQNO>
+<!--40289C1D2E1298CF012E12F26EB1010A-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--40289C1D2E1298CF012E12F26EB1010A-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--40289C1D2E1298CF012E12F26EB1010A-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--40289C1D2E1298CF012E12F26EB1010A-->  <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
+<!--40289C1D2E1298CF012E12F26EB1010A-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--40289C1D2E1298CF012E12F26EB1010A-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--40289C1D2E1298CF012E12F26EB1010A-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--40289C1D2E1298CF012E12F26EB1010A-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--40289C1D2E1298CF012E12F26EB1010A-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--40289C1D2E1298CF012E12F26EB1010A--></AD_FIELD>
+
 <!--415EA1A7A7084D1485CC4413DAC73458--><AD_FIELD>
 <!--415EA1A7A7084D1485CC4413DAC73458-->  <AD_FIELD_ID><![CDATA[415EA1A7A7084D1485CC4413DAC73458]]></AD_FIELD_ID>
 <!--415EA1A7A7084D1485CC4413DAC73458-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -1112,6 +1449,7 @@
 <!--49F7FA0508A441E9ABBF5F1C8208E10D-->  <ISDISPLAYED><![CDATA[N]]></ISDISPLAYED>
 <!--49F7FA0508A441E9ABBF5F1C8208E10D-->  <DISPLAYLENGTH><![CDATA[32]]></DISPLAYLENGTH>
 <!--49F7FA0508A441E9ABBF5F1C8208E10D-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--49F7FA0508A441E9ABBF5F1C8208E10D-->  <SEQNO><![CDATA[80]]></SEQNO>
 <!--49F7FA0508A441E9ABBF5F1C8208E10D-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--49F7FA0508A441E9ABBF5F1C8208E10D-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--49F7FA0508A441E9ABBF5F1C8208E10D-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
@@ -1119,7 +1457,7 @@
 <!--49F7FA0508A441E9ABBF5F1C8208E10D-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
 <!--49F7FA0508A441E9ABBF5F1C8208E10D-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
 <!--49F7FA0508A441E9ABBF5F1C8208E10D-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
-<!--49F7FA0508A441E9ABBF5F1C8208E10D-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--49F7FA0508A441E9ABBF5F1C8208E10D-->  <STARTNEWLINE><![CDATA[Y]]></STARTNEWLINE>
 <!--49F7FA0508A441E9ABBF5F1C8208E10D-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
 <!--49F7FA0508A441E9ABBF5F1C8208E10D--></AD_FIELD>
 
@@ -2745,7 +3083,7 @@
 <!--7FF44B41FD510341E040007F01006989-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
 <!--7FF44B41FD510341E040007F01006989-->  <GRID_SEQNO><![CDATA[80]]></GRID_SEQNO>
 <!--7FF44B41FD510341E040007F01006989-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
-<!--7FF44B41FD510341E040007F01006989-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--7FF44B41FD510341E040007F01006989-->  <STARTNEWLINE><![CDATA[Y]]></STARTNEWLINE>
 <!--7FF44B41FD510341E040007F01006989-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
 <!--7FF44B41FD510341E040007F01006989--></AD_FIELD>
 
@@ -2911,7 +3249,7 @@
 <!--7FF44B41FD590341E040007F01006989-->  <DISPLAYLOGIC><![CDATA[false]]></DISPLAYLOGIC>
 <!--7FF44B41FD590341E040007F01006989-->  <DISPLAYLENGTH><![CDATA[30]]></DISPLAYLENGTH>
 <!--7FF44B41FD590341E040007F01006989-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
-<!--7FF44B41FD590341E040007F01006989-->  <SEQNO><![CDATA[100]]></SEQNO>
+<!--7FF44B41FD590341E040007F01006989-->  <SEQNO><![CDATA[170]]></SEQNO>
 <!--7FF44B41FD590341E040007F01006989-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--7FF44B41FD590341E040007F01006989-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--7FF44B41FD590341E040007F01006989-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
@@ -5240,7 +5578,7 @@
 <!--8C43882A0A404DA29F4C6DA95802CA1B-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
 <!--8C43882A0A404DA29F4C6DA95802CA1B-->  <GRID_SEQNO><![CDATA[80]]></GRID_SEQNO>
 <!--8C43882A0A404DA29F4C6DA95802CA1B-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
-<!--8C43882A0A404DA29F4C6DA95802CA1B-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--8C43882A0A404DA29F4C6DA95802CA1B-->  <STARTNEWLINE><![CDATA[Y]]></STARTNEWLINE>
 <!--8C43882A0A404DA29F4C6DA95802CA1B-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
 <!--8C43882A0A404DA29F4C6DA95802CA1B--></AD_FIELD>
 
@@ -6999,6 +7337,7 @@
 <!--B016ECF8C70F47F29BAA54006C80094A-->  <ISDISPLAYED><![CDATA[N]]></ISDISPLAYED>
 <!--B016ECF8C70F47F29BAA54006C80094A-->  <DISPLAYLENGTH><![CDATA[32]]></DISPLAYLENGTH>
 <!--B016ECF8C70F47F29BAA54006C80094A-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--B016ECF8C70F47F29BAA54006C80094A-->  <SEQNO><![CDATA[80]]></SEQNO>
 <!--B016ECF8C70F47F29BAA54006C80094A-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--B016ECF8C70F47F29BAA54006C80094A-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--B016ECF8C70F47F29BAA54006C80094A-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
@@ -7006,7 +7345,7 @@
 <!--B016ECF8C70F47F29BAA54006C80094A-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
 <!--B016ECF8C70F47F29BAA54006C80094A-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
 <!--B016ECF8C70F47F29BAA54006C80094A-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
-<!--B016ECF8C70F47F29BAA54006C80094A-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--B016ECF8C70F47F29BAA54006C80094A-->  <STARTNEWLINE><![CDATA[Y]]></STARTNEWLINE>
 <!--B016ECF8C70F47F29BAA54006C80094A-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
 <!--B016ECF8C70F47F29BAA54006C80094A--></AD_FIELD>
 
@@ -7579,6 +7918,7 @@
 <!--D0629CC136214B9CA283EFF68CFE1803-->  <ISDISPLAYED><![CDATA[N]]></ISDISPLAYED>
 <!--D0629CC136214B9CA283EFF68CFE1803-->  <DISPLAYLENGTH><![CDATA[30]]></DISPLAYLENGTH>
 <!--D0629CC136214B9CA283EFF68CFE1803-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--D0629CC136214B9CA283EFF68CFE1803-->  <SEQNO><![CDATA[170]]></SEQNO>
 <!--D0629CC136214B9CA283EFF68CFE1803-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--D0629CC136214B9CA283EFF68CFE1803-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--D0629CC136214B9CA283EFF68CFE1803-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
@@ -7856,10 +8196,9 @@
 <!--DDEEC90E7F5045BA8ECB998CD2ED812C-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
 <!--DDEEC90E7F5045BA8ECB998CD2ED812C-->  <AD_TAB_ID><![CDATA[FD40D9C2F1F14943933DEFEF4A8458E4]]></AD_TAB_ID>
 <!--DDEEC90E7F5045BA8ECB998CD2ED812C-->  <AD_COLUMN_ID><![CDATA[E94E132EFCCC422CA9DB4E98BB648E92]]></AD_COLUMN_ID>
-<!--DDEEC90E7F5045BA8ECB998CD2ED812C-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--DDEEC90E7F5045BA8ECB998CD2ED812C-->  <ISDISPLAYED><![CDATA[N]]></ISDISPLAYED>
 <!--DDEEC90E7F5045BA8ECB998CD2ED812C-->  <DISPLAYLENGTH><![CDATA[32]]></DISPLAYLENGTH>
 <!--DDEEC90E7F5045BA8ECB998CD2ED812C-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
-<!--DDEEC90E7F5045BA8ECB998CD2ED812C-->  <SEQNO><![CDATA[80]]></SEQNO>
 <!--DDEEC90E7F5045BA8ECB998CD2ED812C-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--DDEEC90E7F5045BA8ECB998CD2ED812C-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--DDEEC90E7F5045BA8ECB998CD2ED812C-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
@@ -8036,7 +8375,7 @@
 <!--E6EEA6B9F91F459787518691AFBAF351-->  <ISDISPLAYED><![CDATA[N]]></ISDISPLAYED>
 <!--E6EEA6B9F91F459787518691AFBAF351-->  <DISPLAYLENGTH><![CDATA[30]]></DISPLAYLENGTH>
 <!--E6EEA6B9F91F459787518691AFBAF351-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
-<!--E6EEA6B9F91F459787518691AFBAF351-->  <SEQNO><![CDATA[120]]></SEQNO>
+<!--E6EEA6B9F91F459787518691AFBAF351-->  <SEQNO><![CDATA[170]]></SEQNO>
 <!--E6EEA6B9F91F459787518691AFBAF351-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--E6EEA6B9F91F459787518691AFBAF351-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--E6EEA6B9F91F459787518691AFBAF351-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
@@ -8320,6 +8659,7 @@
 <!--F6B85BC485464404B0A58105D8D38B61-->  <ISDISPLAYED><![CDATA[N]]></ISDISPLAYED>
 <!--F6B85BC485464404B0A58105D8D38B61-->  <DISPLAYLENGTH><![CDATA[19]]></DISPLAYLENGTH>
 <!--F6B85BC485464404B0A58105D8D38B61-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--F6B85BC485464404B0A58105D8D38B61-->  <SEQNO><![CDATA[80]]></SEQNO>
 <!--F6B85BC485464404B0A58105D8D38B61-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--F6B85BC485464404B0A58105D8D38B61-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--F6B85BC485464404B0A58105D8D38B61-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
@@ -8327,7 +8667,7 @@
 <!--F6B85BC485464404B0A58105D8D38B61-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
 <!--F6B85BC485464404B0A58105D8D38B61-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
 <!--F6B85BC485464404B0A58105D8D38B61-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
-<!--F6B85BC485464404B0A58105D8D38B61-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--F6B85BC485464404B0A58105D8D38B61-->  <STARTNEWLINE><![CDATA[Y]]></STARTNEWLINE>
 <!--F6B85BC485464404B0A58105D8D38B61-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
 <!--F6B85BC485464404B0A58105D8D38B61--></AD_FIELD>
 
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_TEXTINTERFACES.xml	Thu Jun 02 00:27:17 2011 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_TEXTINTERFACES.xml	Thu Jun 02 10:59:08 2011 +0200
@@ -187,6 +187,17 @@
 <!--1A4798B61AAB47EDAF171E66D5BB63EA-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
 <!--1A4798B61AAB47EDAF171E66D5BB63EA--></AD_TEXTINTERFACES>
 
+<!--1DF86E4E61524E848A4263A847CA1D22--><AD_TEXTINTERFACES>
+<!--1DF86E4E61524E848A4263A847CA1D22-->  <AD_TEXTINTERFACES_ID><![CDATA[1DF86E4E61524E848A4263A847CA1D22]]></AD_TEXTINTERFACES_ID>
+<!--1DF86E4E61524E848A4263A847CA1D22-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--1DF86E4E61524E848A4263A847CA1D22-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--1DF86E4E61524E848A4263A847CA1D22-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--1DF86E4E61524E848A4263A847CA1D22-->  <TEXT><![CDATA[Actual Converted]]></TEXT>
+<!--1DF86E4E61524E848A4263A847CA1D22-->  <FILENAME><![CDATA[/org/openbravo/advpaymentmngt/ad_actionbutton/AddPaymentFromTransaction.html]]></FILENAME>
+<!--1DF86E4E61524E848A4263A847CA1D22-->  <ISUSED><![CDATA[Y]]></ISUSED>
+<!--1DF86E4E61524E848A4263A847CA1D22-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--1DF86E4E61524E848A4263A847CA1D22--></AD_TEXTINTERFACES>
+
 <!--20780A9A54D1483D89458E1C6C6C0D19--><AD_TEXTINTERFACES>
 <!--20780A9A54D1483D89458E1C6C6C0D19-->  <AD_TEXTINTERFACES_ID><![CDATA[20780A9A54D1483D89458E1C6C6C0D19]]></AD_TEXTINTERFACES_ID>
 <!--20780A9A54D1483D89458E1C6C6C0D19-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -319,6 +330,17 @@
 <!--354E5EF7FCD142078572A472031A4F8D-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
 <!--354E5EF7FCD142078572A472031A4F8D--></AD_TEXTINTERFACES>
 
+<!--361C7BAF7DFE4D90B8A2B671B4548B34--><AD_TEXTINTERFACES>
+<!--361C7BAF7DFE4D90B8A2B671B4548B34-->  <AD_TEXTINTERFACES_ID><![CDATA[361C7BAF7DFE4D90B8A2B671B4548B34]]></AD_TEXTINTERFACES_ID>
+<!--361C7BAF7DFE4D90B8A2B671B4548B34-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--361C7BAF7DFE4D90B8A2B671B4548B34-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--361C7BAF7DFE4D90B8A2B671B4548B34-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--361C7BAF7DFE4D90B8A2B671B4548B34-->  <TEXT><![CDATA[Expected Converted]]></TEXT>
+<!--361C7BAF7DFE4D90B8A2B671B4548B34-->  <FILENAME><![CDATA[/org/openbravo/advpaymentmngt/ad_actionbutton/AddPaymentFromInvoice.html]]></FILENAME>
+<!--361C7BAF7DFE4D90B8A2B671B4548B34-->  <ISUSED><![CDATA[Y]]></ISUSED>
+<!--361C7BAF7DFE4D90B8A2B671B4548B34-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--361C7BAF7DFE4D90B8A2B671B4548B34--></AD_TEXTINTERFACES>
+
 <!--36BA74187E0C438F89A89FD4D30676AC--><AD_TEXTINTERFACES>
 <!--36BA74187E0C438F89A89FD4D30676AC-->  <AD_TEXTINTERFACES_ID><![CDATA[36BA74187E0C438F89A89FD4D30676AC]]></AD_TEXTINTERFACES_ID>
 <!--36BA74187E0C438F89A89FD4D30676AC-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -473,6 +495,17 @@
 <!--427B1EDA8D2448BEABBDF3C7CB54D293-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
 <!--427B1EDA8D2448BEABBDF3C7CB54D293--></AD_TEXTINTERFACES>
 
+<!--42A335FF9920466AABA5D24E22C4CE85--><AD_TEXTINTERFACES>
+<!--42A335FF9920466AABA5D24E22C4CE85-->  <AD_TEXTINTERFACES_ID><![CDATA[42A335FF9920466AABA5D24E22C4CE85]]></AD_TEXTINTERFACES_ID>
+<!--42A335FF9920466AABA5D24E22C4CE85-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--42A335FF9920466AABA5D24E22C4CE85-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--42A335FF9920466AABA5D24E22C4CE85-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--42A335FF9920466AABA5D24E22C4CE85-->  <TEXT><![CDATA[Exchange Rate]]></TEXT>
+<!--42A335FF9920466AABA5D24E22C4CE85-->  <FILENAME><![CDATA[/org/openbravo/advpaymentmngt/ad_actionbutton/AddPaymentFromInvoice.html]]></FILENAME>
+<!--42A335FF9920466AABA5D24E22C4CE85-->  <ISUSED><![CDATA[Y]]></ISUSED>
+<!--42A335FF9920466AABA5D24E22C4CE85-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--42A335FF9920466AABA5D24E22C4CE85--></AD_TEXTINTERFACES>
+
 <!--42D825B3AF15493BA1ACD859E190CE8D--><AD_TEXTINTERFACES>
 <!--42D825B3AF15493BA1ACD859E190CE8D-->  <AD_TEXTINTERFACES_ID><![CDATA[42D825B3AF15493BA1ACD859E190CE8D]]></AD_TEXTINTERFACES_ID>
 <!--42D825B3AF15493BA1ACD859E190CE8D-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -759,6 +792,17 @@
 <!--68B66E57BCC34CF78BD7F00532438FEC-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
 <!--68B66E57BCC34CF78BD7F00532438FEC--></AD_TEXTINTERFACES>
 
+<!--69A861AEDD63408B9FDD5CE6044FE5CC--><AD_TEXTINTERFACES>
+<!--69A861AEDD63408B9FDD5CE6044FE5CC-->  <AD_TEXTINTERFACES_ID><![CDATA[69A861AEDD63408B9FDD5CE6044FE5CC]]></AD_TEXTINTERFACES_ID>
+<!--69A861AEDD63408B9FDD5CE6044FE5CC-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--69A861AEDD63408B9FDD5CE6044FE5CC-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--69A861AEDD63408B9FDD5CE6044FE5CC-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--69A861AEDD63408B9FDD5CE6044FE5CC-->  <TEXT><![CDATA[Actual Converted]]></TEXT>
+<!--69A861AEDD63408B9FDD5CE6044FE5CC-->  <FILENAME><![CDATA[/org/openbravo/advpaymentmngt/ad_actionbutton/AddPaymentFromInvoice.html]]></FILENAME>
+<!--69A861AEDD63408B9FDD5CE6044FE5CC-->  <ISUSED><![CDATA[Y]]></ISUSED>
+<!--69A861AEDD63408B9FDD5CE6044FE5CC-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--69A861AEDD63408B9FDD5CE6044FE5CC--></AD_TEXTINTERFACES>
+
 <!--6C15F01D681E41F5A44037DF48EC7926--><AD_TEXTINTERFACES>
 <!--6C15F01D681E41F5A44037DF48EC7926-->  <AD_TEXTINTERFACES_ID><![CDATA[6C15F01D681E41F5A44037DF48EC7926]]></AD_TEXTINTERFACES_ID>
 <!--6C15F01D681E41F5A44037DF48EC7926-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -781,6 +825,17 @@
 <!--6C237ED5003847B998E92860AD1AFC18-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
 <!--6C237ED5003847B998E92860AD1AFC18--></AD_TEXTINTERFACES>
 
+<!--6C2460B2EAB9490CB68FB828F9290EC6--><AD_TEXTINTERFACES>
+<!--6C2460B2EAB9490CB68FB828F9290EC6-->  <AD_TEXTINTERFACES_ID><![CDATA[6C2460B2EAB9490CB68FB828F9290EC6]]></AD_TEXTINTERFACES_ID>
+<!--6C2460B2EAB9490CB68FB828F9290EC6-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--6C2460B2EAB9490CB68FB828F9290EC6-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--6C2460B2EAB9490CB68FB828F9290EC6-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--6C2460B2EAB9490CB68FB828F9290EC6-->  <TEXT><![CDATA[Expected Converted]]></TEXT>
+<!--6C2460B2EAB9490CB68FB828F9290EC6-->  <FILENAME><![CDATA[/org/openbravo/advpaymentmngt/ad_actionbutton/AddPaymentFromTransaction.html]]></FILENAME>
+<!--6C2460B2EAB9490CB68FB828F9290EC6-->  <ISUSED><![CDATA[Y]]></ISUSED>
+<!--6C2460B2EAB9490CB68FB828F9290EC6-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--6C2460B2EAB9490CB68FB828F9290EC6--></AD_TEXTINTERFACES>
+
 <!--6DD60FD81F5B4D17A5101D7BFED7E910--><AD_TEXTINTERFACES>
 <!--6DD60FD81F5B4D17A5101D7BFED7E910-->  <AD_TEXTINTERFACES_ID><![CDATA[6DD60FD81F5B4D17A5101D7BFED7E910]]></AD_TEXTINTERFACES_ID>
 <!--6DD60FD81F5B4D17A5101D7BFED7E910-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -1243,6 +1298,17 @@
 <!--810FC8FB3583BDD3E040007F01006D3C-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
 <!--810FC8FB3583BDD3E040007F01006D3C--></AD_TEXTINTERFACES>
 
+<!--81DE447254A44ACCB40899FD8E65FDAF--><AD_TEXTINTERFACES>
+<!--81DE447254A44ACCB40899FD8E65FDAF-->  <AD_TEXTINTERFACES_ID><![CDATA[81DE447254A44ACCB40899FD8E65FDAF]]></AD_TEXTINTERFACES_ID>
+<!--81DE447254A44ACCB40899FD8E65FDAF-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--81DE447254A44ACCB40899FD8E65FDAF-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--81DE447254A44ACCB40899FD8E65FDAF-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--81DE447254A44ACCB40899FD8E65FDAF-->  <TEXT><![CDATA[Exchange Rate]]></TEXT>
+<!--81DE447254A44ACCB40899FD8E65FDAF-->  <FILENAME><![CDATA[/org/openbravo/advpaymentmngt/ad_actionbutton/AddPaymentFromTransaction.html]]></FILENAME>
+<!--81DE447254A44ACCB40899FD8E65FDAF-->  <ISUSED><![CDATA[Y]]></ISUSED>
+<!--81DE447254A44ACCB40899FD8E65FDAF-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--81DE447254A44ACCB40899FD8E65FDAF--></AD_TEXTINTERFACES>
+
 <!--824388E12E2E4FBEBD3E12CBAD6E97F7--><AD_TEXTINTERFACES>
 <!--824388E12E2E4FBEBD3E12CBAD6E97F7-->  <AD_TEXTINTERFACES_ID><![CDATA[824388E12E2E4FBEBD3E12CBAD6E97F7]]></AD_TEXTINTERFACES_ID>
 <!--824388E12E2E4FBEBD3E12CBAD6E97F7-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -1738,6 +1804,17 @@
 <!--88F9C050D1FBB8EAE040007F010021A2-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
 <!--88F9C050D1FBB8EAE040007F010021A2--></AD_TEXTINTERFACES>
 
+<!--89A928B6FF534D9C93E1FA20D744C009--><AD_TEXTINTERFACES>
+<!--89A928B6FF534D9C93E1FA20D744C009-->  <AD_TEXTINTERFACES_ID><![CDATA[89A928B6FF534D9C93E1FA20D744C009]]></AD_TEXTINTERFACES_ID>
+<!--89A928B6FF534D9C93E1FA20D744C009-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--89A928B6FF534D9C93E1FA20D744C009-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--89A928B6FF534D9C93E1FA20D744C009-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--89A928B6FF534D9C93E1FA20D744C009-->  <TEXT><![CDATA[Exchange Rate]]></TEXT>
+<!--89A928B6FF534D9C93E1FA20D744C009-->  <FILENAME><![CDATA[/org/openbravo/advpaymentmngt/ad_actionbutton/AddOrderOrInvoice.html]]></FILENAME>
+<!--89A928B6FF534D9C93E1FA20D744C009-->  <ISUSED><![CDATA[Y]]></ISUSED>
+<!--89A928B6FF534D9C93E1FA20D744C009-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--89A928B6FF534D9C93E1FA20D744C009--></AD_TEXTINTERFACES>
+
 <!--89D923B8E1FE4F1E9BE8F7783881C81A--><AD_TEXTINTERFACES>
 <!--89D923B8E1FE4F1E9BE8F7783881C81A-->  <AD_TEXTINTERFACES_ID><![CDATA[89D923B8E1FE4F1E9BE8F7783881C81A]]></AD_TEXTINTERFACES_ID>
 <!--89D923B8E1FE4F1E9BE8F7783881C81A-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -2068,6 +2145,17 @@
 <!--9CC12000833D45619574EA9E81649882-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
 <!--9CC12000833D45619574EA9E81649882--></AD_TEXTINTERFACES>
 
+<!--9DDB317C14194483B1B6D7A7E0B46C87--><AD_TEXTINTERFACES>
+<!--9DDB317C14194483B1B6D7A7E0B46C87-->  <AD_TEXTINTERFACES_ID><![CDATA[9DDB317C14194483B1B6D7A7E0B46C87]]></AD_TEXTINTERFACES_ID>
+<!--9DDB317C14194483B1B6D7A7E0B46C87-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--9DDB317C14194483B1B6D7A7E0B46C87-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--9DDB317C14194483B1B6D7A7E0B46C87-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--9DDB317C14194483B1B6D7A7E0B46C87-->  <TEXT><![CDATA[Invoice Currency]]></TEXT>
+<!--9DDB317C14194483B1B6D7A7E0B46C87-->  <FILENAME><![CDATA[/org/openbravo/advpaymentmngt/ad_actionbutton/AddPaymentFromInvoice.html]]></FILENAME>
+<!--9DDB317C14194483B1B6D7A7E0B46C87-->  <ISUSED><![CDATA[Y]]></ISUSED>
+<!--9DDB317C14194483B1B6D7A7E0B46C87-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--9DDB317C14194483B1B6D7A7E0B46C87--></AD_TEXTINTERFACES>
+
 <!--9F4572C44CCA4FF2B4270B084382D60E--><AD_TEXTINTERFACES>
 <!--9F4572C44CCA4FF2B4270B084382D60E-->  <AD_TEXTINTERFACES_ID><![CDATA[9F4572C44CCA4FF2B4270B084382D60E]]></AD_TEXTINTERFACES_ID>
 <!--9F4572C44CCA4FF2B4270B084382D60E-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -2596,6 +2684,17 @@
 <!--DB502BB7F55E41FC8BEAAB244DB25E5F-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
 <!--DB502BB7F55E41FC8BEAAB244DB25E5F--></AD_TEXTINTERFACES>
 
+<!--DB98F20D5C2B4F3F9D5A01B27F9E4946--><AD_TEXTINTERFACES>
+<!--DB98F20D5C2B4F3F9D5A01B27F9E4946-->  <AD_TEXTINTERFACES_ID><![CDATA[DB98F20D5C2B4F3F9D5A01B27F9E4946]]></AD_TEXTINTERFACES_ID>
+<!--DB98F20D5C2B4F3F9D5A01B27F9E4946-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--DB98F20D5C2B4F3F9D5A01B27F9E4946-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--DB98F20D5C2B4F3F9D5A01B27F9E4946-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--DB98F20D5C2B4F3F9D5A01B27F9E4946-->  <TEXT><![CDATA[Actual Converted]]></TEXT>
+<!--DB98F20D5C2B4F3F9D5A01B27F9E4946-->  <FILENAME><![CDATA[/org/openbravo/advpaymentmngt/ad_actionbutton/AddOrderOrInvoice.html]]></FILENAME>
+<!--DB98F20D5C2B4F3F9D5A01B27F9E4946-->  <ISUSED><![CDATA[Y]]></ISUSED>
+<!--DB98F20D5C2B4F3F9D5A01B27F9E4946-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--DB98F20D5C2B4F3F9D5A01B27F9E4946--></AD_TEXTINTERFACES>
+
 <!--DC1CA75BBCA445A99CEB81FCFAC16B80--><AD_TEXTINTERFACES>
 <!--DC1CA75BBCA445A99CEB81FCFAC16B80-->  <AD_TEXTINTERFACES_ID><![CDATA[DC1CA75BBCA445A99CEB81FCFAC16B80]]></AD_TEXTINTERFACES_ID>
 <!--DC1CA75BBCA445A99CEB81FCFAC16B80-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -2607,6 +2706,17 @@
 <!--DC1CA75BBCA445A99CEB81FCFAC16B80-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
 <!--DC1CA75BBCA445A99CEB81FCFAC16B80--></AD_TEXTINTERFACES>
 
+<!--DC8B2BB3C55B4BF7B5782F006EB37106--><AD_TEXTINTERFACES>
+<!--DC8B2BB3C55B4BF7B5782F006EB37106-->  <AD_TEXTINTERFACES_ID><![CDATA[DC8B2BB3C55B4BF7B5782F006EB37106]]></AD_TEXTINTERFACES_ID>
+<!--DC8B2BB3C55B4BF7B5782F006EB37106-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--DC8B2BB3C55B4BF7B5782F006EB37106-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--DC8B2BB3C55B4BF7B5782F006EB37106-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--DC8B2BB3C55B4BF7B5782F006EB37106-->  <TEXT><![CDATA[Expected Converted]]></TEXT>
+<!--DC8B2BB3C55B4BF7B5782F006EB37106-->  <FILENAME><![CDATA[/org/openbravo/advpaymentmngt/ad_actionbutton/AddOrderOrInvoice.html]]></FILENAME>
+<!--DC8B2BB3C55B4BF7B5782F006EB37106-->  <ISUSED><![CDATA[Y]]></ISUSED>
+<!--DC8B2BB3C55B4BF7B5782F006EB37106-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--DC8B2BB3C55B4BF7B5782F006EB37106--></AD_TEXTINTERFACES>
+
 <!--E1FBF4E787254F35B07338C68284B972--><AD_TEXTINTERFACES>
 <!--E1FBF4E787254F35B07338C68284B972-->  <AD_TEXTINTERFACES_ID><![CDATA[E1FBF4E787254F35B07338C68284B972]]></AD_TEXTINTERFACES_ID>
 <!--E1FBF4E787254F35B07338C68284B972-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddOrderOrInvoice.html	Thu Jun 02 00:27:17 2011 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddOrderOrInvoice.html	Thu Jun 02 10:59:08 2011 +0200
@@ -189,6 +189,7 @@
       }
     }
     document.frmMain.inpActualPayment.value = amount;
+    updateConvertedAmounts();
     return submitXmlHttpRequest(callBackGLItem, document.frmMain, 'ADDGLITEM', url, false, null, paramXMLReq);
   } catch (e) {
     alert(e);
@@ -205,6 +206,7 @@
       document.frmMain.inpActualPayment.value = 0;
     }
     document.frmMain.inpGLSumAmount.value = subtract(document.frmMain.inpGLSumAmount.value, document.frmMain.elements['inpHiddenAmt'+key].value);
+    updateConvertedAmounts();
     return submitXmlHttpRequest(callBackGLItem, document.frmMain, 'REMOVEGLITEM', url, false, null, paramXMLReq);
   } catch (e) {
     alert(e);
@@ -219,7 +221,19 @@
   } catch (e) {
     alert(e);
   }
+  updateConvertedAmounts();
 }
+
+function displayMulticurrencyControls() {
+  var invCurrency = document.getElementById('paramCurrencyId').value
+  var accountCurrency = document.getElementById('paramFinancialAccountCurrencyId').value
+
+  var display = ( invCurrency && accountCurrency && invCurrency != accountCurrency );
+
+  displayLogicElement('multiCurrencyRow', display );
+}
+
+
 </script>
 <script language="JavaScript" type="text/javascript">
 function validate(action) {
@@ -419,6 +433,7 @@
   displayLogicElement('lblCredit', compare(document.getElementById('paramCredit').value, '>', '0'));
   displayLogicElement('paramUseCredit', compare(document.getElementById('paramCredit').value, '>', '0') && compare(document.frmMain.inpGeneratedCredit.value, '==', '0') );
   displayLogicElement('lblUseCredit', compare(document.getElementById('paramCredit').value, '>', '0') && compare(document.frmMain.inpGeneratedCredit.value, '==', '0') );
+  displayMulticurrencyControls();
   if (isTrue('isReceipt')) {
     setWindowElementFocus(frm.inpActualPayment);
   } else {
@@ -497,7 +512,6 @@
   <input type="hidden" name="isFirstLoad" value="true"/>
   <input type="hidden" name="isGLItem" value="N"/>
   <input type="hidden" name="inpDeleteGLItem" value=""/>
-  <input type="hidden" id="paramPrecision" name="curPrecision" value="2"/>
   <input type="hidden" id="paramHeaderAmount" name="inpHeaderAmount" value="0"/>
   <input type="hidden" id="paramGLSumAmount" name="inpGLSumAmount" value="0"/>
   <input type="hidden" id="paramGeneratedCredit" name="inpGeneratedCredit" value="0"/>
@@ -775,8 +789,9 @@
               <td class="TextBox_ContentCell"> <input class="readonly dojoValidateValid required TextBox_OneCell_width number" type="text" id="paramExpectedPayment" name="inpExpectedPayment" value="" onchange="updateDifference();"></input>
               </td>
               <td class="TitleCell"></td>
-              <td class="TitleCell"></td>
-              <td class="TitleCell"></td>
+              <td class="TitleCell"><span class="LabelText">Expected Converted</span></td>
+              <td class="TextBox_ContentCell"> <input class="readonly dojoValidateValid required TextBox_OneCell_width number" type="text" id="paramExpectedConverted" name="inpExpectedConverted" value="" onchange="" disabled="true"></input>
+              </td>
               <td class="TitleCell"></td>
             </tr>
 
@@ -822,7 +837,27 @@
               <td class="TitleCell"><span class="LabelText" name="lbl" id="lblUseCredit">Use Available Credit</span></td>
               <td class="Radio_Check_ContentCell"><span class="Checkbox_container_NOT_Focused"><input type="checkbox" name="inpUseCredit" value="Y" id="paramUseCredit" onclick="useCreditOnChange();"></input></span></td>
             </tr>
-            
+
+            <!-- Line 3 -->
+            <tr id="multiCurrencyRow">
+              <td class="TitleCell"><span class="LabelText" id="lblActualConverted">Actual Converted</span></td>
+              <td class="TextBox_ContentCell"> <input class="dojoValidateValid required TextBox_OneCell_width number" type="text" id="paramActualConverted" name="inpActualConverted" value="" onchange="updateConvertedAmounts(true);" ></input>
+              </td>
+              <td class="TextBox_ContentCell">
+                <input type="hidden" id="paramFinancialAccountCurrencyId" name="financialAccountCurrencyId" value=""/>
+                <input type="hidden" id="paramFinancialAccountCurrencyPrecision" name="inpFinancialAccountCurrencyPrecision" value="2"/>
+                <input class="readonly dojoValidateValid required TextBox_OneCell_width" type="text" id="paramFinancialAccountCurrencyName" name="paramFinancialAccountCurrencyName" value=""></input>
+              </td>
+              <td class="TitleCell"><span class="LabelText" id="lblExchangeRate">Exchange Rate</span></td>
+              <td class="TextBox_ContentCell"> <input class="dojoValidateValid required TextBox_OneCell_width number" type="text" id="paramExchangeRate" name="inpExchangeRate" value="" onchange="updateConvertedAmounts();" ></input>
+              </td>
+              <td class="TextBox_ContentCell">
+                <input type="hidden" id="paramCurrencyId" name="inpCurrencyId" value=""/>
+                <input class="readonly dojoValidateValid required TextBox_OneCell_width" type="text" id="paramCurrencyName" name="paramCurrencyName" value=""></input>
+              </td>
+            </tr>
+
+
             <tr class="FieldGroup_BottomMargin"></tr>
             
             <!-- Table filters -->
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddOrderOrInvoice.java	Thu Jun 02 00:27:17 2011 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddOrderOrInvoice.java	Thu Jun 02 10:59:08 2011 +0200
@@ -37,6 +37,7 @@
 import org.openbravo.base.filter.ValueListFilter;
 import org.openbravo.base.secureApp.HttpSecureAppServlet;
 import org.openbravo.base.secureApp.VariablesSecureApp;
+import org.openbravo.base.util.Convert;
 import org.openbravo.dal.core.OBContext;
 import org.openbravo.dal.service.OBDal;
 import org.openbravo.data.FieldProvider;
@@ -46,6 +47,7 @@
 import org.openbravo.erpCommon.utility.OBError;
 import org.openbravo.erpCommon.utility.Utility;
 import org.openbravo.model.common.businesspartner.BusinessPartner;
+import org.openbravo.model.common.currency.Currency;
 import org.openbravo.model.common.enterprise.Organization;
 import org.openbravo.model.financialmgmt.gl.GLItem;
 import org.openbravo.model.financialmgmt.payment.FIN_Payment;
@@ -158,6 +160,11 @@
       String strTabId = vars.getRequiredStringParameter("inpTabId");
       String strPaymentAmount = vars.getRequiredNumericParameter("inpActualPayment");
       String strDocumentType = vars.getStringParameter("inpDocumentType", "");
+      String paymentCurrencyId = vars.getRequiredStringParameter("inpCurrencyId");
+      BigDecimal exchangeRate = new BigDecimal(vars.getRequiredNumericParameter("inpExchangeRate",
+          "1.0"));
+      BigDecimal convertedAmount = new BigDecimal(vars.getRequiredNumericParameter(
+          "inpActualConverted", strPaymentAmount));
       OBError message = null;
       // FIXME: added to access the FIN_PaymentSchedule and FIN_PaymentScheduleDetail tables to be
       // removed when new security implementation is done
@@ -175,11 +182,14 @@
 
         FIN_Payment payment = dao.getObject(FIN_Payment.class, strPaymentId);
         BigDecimal newPaymentAmount = new BigDecimal(strPaymentAmount);
-        if (newPaymentAmount.compareTo(payment.getAmount()) != 0)
+        if (newPaymentAmount.compareTo(payment.getAmount()) != 0) {
           payment.setAmount(newPaymentAmount);
+        }
+        FIN_AddPayment.setFinancialTransactionAmountAndRate(payment, exchangeRate, convertedAmount);
         payment = FIN_AddPayment.savePayment(payment, isReceipt, null, null, null, null, null,
             null, null, null, null, selectedPaymentDetails, selectedPaymentDetailAmounts,
-            strDifferenceAction.equals("writeoff"), strDifferenceAction.equals("refund"));
+            strDifferenceAction.equals("writeoff"), strDifferenceAction.equals("refund"), dao
+                .getObject(Currency.class, paymentCurrencyId), exchangeRate, convertedAmount);
 
         if (strAction.equals("PRP") || strAction.equals("PPP") || strAction.equals("PRD")
             || strAction.equals("PPW")) {
@@ -285,12 +295,24 @@
     xmlDocument.setParameter("generatedCredit", payment.getGeneratedCredit() != null ? payment
         .getGeneratedCredit().toString() : BigDecimal.ZERO.toString());
     OBContext.setAdminMode();
-    try {
-      xmlDocument
-          .setParameter("precision", payment.getCurrency().getStandardPrecision().toString());
-    } finally {
-      OBContext.restorePreviousMode();
+
+    final Currency financialAccountCurrency = payment.getAccount().getCurrency();
+    if (financialAccountCurrency != null) {
+      xmlDocument.setParameter("financialAccountCurrencyId", financialAccountCurrency.getId());
+      xmlDocument.setParameter("financialAccountCurrencyName", financialAccountCurrency
+          .getISOCode());
+      xmlDocument.setParameter("financialAccountCurrencyPrecision", financialAccountCurrency
+          .getStandardPrecision().toString());
     }
+    xmlDocument.setParameter("exchangeRate", Convert.toString(payment
+        .getFinancialTransactionConvertRate()));
+    xmlDocument.setParameter("actualConverted", Convert.toString(payment
+        .getFinancialTransactionAmount()));
+    xmlDocument.setParameter("expectedConverted", Convert.toString(payment
+        .getFinancialTransactionAmount()));
+    xmlDocument.setParameter("currencyId", payment.getCurrency().getId());
+    xmlDocument.setParameter("currencyName", payment.getCurrency().getISOCode());
+
     boolean forcedFinancialAccountTransaction = false;
     forcedFinancialAccountTransaction = FIN_AddPayment.isForcedFinancialAccountTransaction(payment);
     // Action Regarding Document
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddOrderOrInvoice.xml	Thu Jun 02 00:27:17 2011 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddOrderOrInvoice.xml	Thu Jun 02 10:59:08 2011 +0200
@@ -34,13 +34,20 @@
     <PARAMETER id="paramActualPayment" name="actualPayment" attribute="value" format="euroEdition" default="0"/>
     <PARAMETER id="paramCredit" name="credit" attribute="value" format="euroEdition"/>
     <PARAMETER id="paramGeneratedCredit" name="generatedCredit" attribute="value" format="euroEdition"/>
+    <PARAMETER id="paramCurrencyName" name="currencyName" attribute="value"/>
+    <PARAMETER id="paramCurrencyId" name="currencyId" attribute="value"/>
+    <PARAMETER id="paramFinancialAccountCurrencyId" name="financialAccountCurrencyId" attribute="value"/>
+    <PARAMETER id="paramFinancialAccountCurrencyName" name="financialAccountCurrencyName" attribute="value"/>
+    <PARAMETER id="paramFinancialAccountCurrencyPrecision" name="financialAccountCurrencyPrecision" attribute="value"/>
+    <PARAMETER id="paramExchangeRate" name="exchangeRate" attribute="value" format="generalQtyEdition"/>
+    <PARAMETER id="paramExpectedConverted" name="expectedConverted" attribute="value" format="euroEdition"/>
+    <PARAMETER id="paramActualConverted" name="actualConverted" attribute="value" format="euroEdition" default="0"/>
     <PARAMETER id="fieldOrg" name="orgId" attribute="value"/>
     <PARAMETER id="fieldPayment" name="paymentId" attribute="value"/>
     <PARAMETER id="fieldWindowId" name="windowId" attribute="value"/>
     <PARAMETER id="fieldTabId" name="tabId" attribute="value"/>
     <PARAMETER id="fieldReceipt" name="isReceipt" attribute="value"/>
     <PARAMETER id="fieldIsSoTrx" name="isSoTrx" attribute="value"/>
-    <PARAMETER id="paramPrecision" name="precision" attribute="value"/>
     <PARAMETER id="paramHeaderAmount" name="headerAmount" attribute="value" format="euroEdition"/>
 
     <PARAMETER id="paramDueDateFrom" name="dateDisplayFormat" attribute="displayformat" replace="xx"/>
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddPaymentFromInvoice.html	Thu Jun 02 00:27:17 2011 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddPaymentFromInvoice.html	Thu Jun 02 10:59:08 2011 +0200
@@ -14,7 +14,7 @@
  * The Initial Developer of the Original Code is Openbravo SLU
  * All portions are Copyright (C) 2010-2011 Openbravo SLU
  * All Rights Reserved.
- * Contributor(s):  ______________________________________.
+ * Contributor(s): Enterprise Intelligence Systems (http://www.eintel.com.au).
  *************************************************************************
 -->
 <html>
@@ -81,6 +81,16 @@
       setWindowElementFocus(frm.inpPaymentDate);
       showJSMessage(7);
       return false;
+    } else if (isMulticurrencyTxn()) {
+      if (frm.inpActualConverted.value==null || frm.inpActualConverted.value=="") {
+        setWindowElementFocus(frm.inpActualConverted);
+        showJSMessage(7);
+        return false;
+      } else if (frm.inpExchangeRate.value==null || frm.inpExchangeRate.value=="") {
+        setWindowElementFocus(frm.inpExchangeRate);
+        showJSMessage(7);
+        return false;
+      }
     } else {
       var diffAction = frm.inpDifferenceAction,
           i,
@@ -190,6 +200,33 @@
   numberInputEvent('onchange', element);
 }
 
+function paymentDateOnChange(){
+  try {
+    var url = "../org.openbravo.advpaymentmngt.ad_actionbutton/AddPaymentFromInvoice.html";
+    var paramXMLReq = null;
+    return submitXmlHttpRequest(callBackExchangeRate, document.frmMain, "EXCHANGERATE", url, false, null, paramXMLReq);
+  } catch (e) {
+    alert(e);
+  }
+}
+
+function callBackExchangeRate(paramXMLParticular, XMLHttpRequestObj) {
+  if (getReadyStateHandler(XMLHttpRequestObj)) {
+    try {
+      if (XMLHttpRequestObj.responseText) {
+        var resp = decodeJSON(XMLHttpRequestObj.responseText);
+        document.getElementById('paramExchangeRate').value=resp.exchangeRate;
+      } else {
+        document.getElementById('paramExchangeRate').value='';
+      }
+      updateConvertedAmounts();
+      displayMulticurrencyControls();
+    } catch (e) {
+    }
+  }
+  return true;
+}
+
 function useCreditOnChange(){
   actualPaymentOnChange();
   updateTotal();
@@ -203,6 +240,23 @@
     distributeAmount(amount);
   }
 }
+
+function isMulticurrencyTxn() {
+  var invCurrency = document.getElementById('paramCurrencyId').value
+  var accountCurrency = document.getElementById('paramFinancialAccountCurrencyId').value
+  return invCurrency && accountCurrency && invCurrency != accountCurrency;
+}
+
+function displayMulticurrencyControls() {
+  var display = isMulticurrencyTxn();  displayLogicElement('paramExchangeRate', display );
+  displayLogicElement('lblExchangeRate', display );
+  displayLogicElement('paramExpectedConverted', display );
+  displayLogicElement('lblExpectedConverted', display );
+  displayLogicElement('paramActualConvertedCell', display );
+  displayLogicElement('lblActualConverted', display );
+}
+
+
 </script>
 <script language="JavaScript" type="text/javascript">
 function loadGridList() {
@@ -294,15 +348,20 @@
 }
 
 function callBackFinancialAccount(paramXMLParticular, XMLHttpRequestObj) {
-var strText = "";
   if (getReadyStateHandler(XMLHttpRequestObj)) {
     try {
       if (XMLHttpRequestObj.responseText) {
-        strText = XMLHttpRequestObj.responseText;
-        createCombo(document.getElementById('inpFinancialAccount'), strText);
+        var resp = decodeJSON(XMLHttpRequestObj.responseText);
+        createCombo(document.getElementById('inpFinancialAccount'), resp.combo);
+        document.getElementById('paramFinancialAccountCurrencyId').value = resp.financialAccountCurrencyId;
+        document.getElementById('paramExchangeRate').value = resp.exchangeRate;
       } else {
         document.getElementById('inpFinancialAccount').innerHTML = '';
+        document.getElementById('paramFinancialAccountCurrencyId').value = '';
+        document.getElementById('paramExchangeRate').value = '';
       }
+      displayMulticurrencyControls();
+      updateConvertedAmounts();
     } catch (e) {
     }
   }
@@ -349,10 +408,11 @@
     processLabels();
     displayLogicElement('paramCustBalance', isTrue('isReceipt'));
     displayLogicElement('NoPackageslinkCalc', isTrue('isReceipt'));
-    displayLogicElement('paramCredit', compare(document.getElementById('paramCredit').value, '>', "0") );
-    displayLogicElement('lblCredit', compare(document.getElementById('paramCredit').value, '>', "0") );
-    displayLogicElement('paramUseCredit', compare(document.getElementById('paramCredit').value, '>', "0") );
-    displayLogicElement('lblUseCredit', compare(document.getElementById('paramCredit').value, '>', "0") );
+    var hasCredit = compare(document.getElementById('paramCredit').value, '>', "0");
+    displayLogicElement('paramCredit', hasCredit );
+    displayLogicElement('paramUseCreditContainer', hasCredit );
+    displayLogicElement('rowCredit', hasCredit );
+    displayMulticurrencyControls();
     if (isTrue('isReceipt')) {
         setWindowElementFocus(frm.inpActualPayment);
     } else {
@@ -643,12 +703,22 @@
               <td class="TitleCell"><span class="LabelText" name="lblP" id="lblPToBePaidTo">To Be Paid To</span><span class="LabelText" name="lblR" id="lblRReceivedFrom">Received From</span></td>
               <td class="TextBox_ContentCell" colspan="2"><input class="readonly dojoValidateValid TextBox_TwoCells_width" type="text" name="inpBusinessPartner" value="" id="paramBusinessPartner" readonly="true"></input>
               <input type="hidden" name="inpBusinessPartnerId" value="" id="paramBusinessPartnerId"></input></td>
+              <td class="TitleCell"><span class="LabelText">Reference No.</span></td>
+              <td class="TextBox_ContentCell" colspan="2"><input class="dojoValidateValid TextBox_OneCell_width" type="text" name="inpReferenceNo" value="" id="paramReferenceNo"></input></td>
+              <td class="TitleCell"></td>
+            </tr>
+
+            <!-- Line 3 (Hidden if no credit)-->
+            <tr id="rowCredit">
               <td class="TitleCell"><span class="LabelText" name="lbl" id="lblCredit">Available Credit</span></td>
               <td class="TextBox_ContentCell"><input class="readonly dojoValidateValid TextBox_OneCell_width number" type="text" name="inpCredit" value="0" id="paramCredit"></input></td>
               <td class="TitleCell"></td>
+              <td class="TitleCell"><span class="LabelText" name="lbl" id="lblUseCredit">Use Available Credit</span></td>
+              <td class="Radio_Check_ContentCell"><span class="Checkbox_container_NOT_Focused" id="paramUseCreditContainer"><input type="checkbox" name="inpUseCredit" value="Y" id="paramUseCredit" onclick="useCreditOnChange();"></input></span></td>
+              <td class="TitleCell"></td>
             </tr>
             
-            <!-- Line 3 -->
+            <!-- Line 4 -->
             <tr>
               <td class="TitleCell"><span class="LabelText">Payment Method</span></td>
               <td class="Combo_ContentCell" colspan="2">
@@ -659,15 +729,11 @@
                   <div id="sectionDetailPaymentMethod"></div>
                 </select>
               </td>
-              <td class="TitleCell"><span class="LabelText" name="lbl" id="lblUseCredit">Use Available Credit</span></td>
-              <td class="Radio_Check_ContentCell"><span class="Checkbox_container_NOT_Focused"><input type="checkbox" name="inpUseCredit" value="Y" id="paramUseCredit" onclick="useCreditOnChange();"></input></span></td>
-              <td class="TitleCell"></td>
-            </tr>
-            
-            <!-- Line 4 -->
-            <tr>
               <td class="TitleCell"><span class="LabelText" name="lblP" id="lblPTakeFrom">Take From</span><span class="LabelText" name="lblR" id="lblRDepositTo">Deposit To</span></td>
               <td class="Combo_ContentCell" colspan="2">
+                <input type="hidden" id="paramFinancialAccountCurrencyId" name="inpFinancialAccountCurrencyId" value=""/>
+                <input type="hidden" id="paramFinancialAccountCurrencyPrecision" name="inpFinancialAccountCurrencyPrecision" value="2"/>
+
                 <select name="inpFinancialAccount"
                         onkeypress="changeToEditingMode('onkeypress');"
                         onchange="changeToEditingMode('onchange', this);logChanges(this);loadPaymentMethodCombo(); reFillFinancialAccountCombo(); return true;"
@@ -675,32 +741,47 @@
                   <div id="sectionDetailFinancialAccount"></div>
                 </select>
               </td>
-              <td class="TitleCell"><span class="LabelText">Reference No.</span></td>
-              <td class="TextBox_ContentCell" colspan="2"><input class="dojoValidateValid TextBox_OneCell_width" type="text" name="inpReferenceNo" value="" id="paramReferenceNo"></input></td>
-              <td class="TitleCell"></td>
             </tr>
-            
+
             <!-- Line 5 -->
             <tr>
-              <td class="TitleCell"><span class="LabelText">Currency</span></td>
+              <td class="TitleCell"><span class="LabelText">Invoice Currency</span></td>
               <td class="Combo_ContentCell">
-                <input type="hidden" id="paramPrecision" name="curPrecision" value="2"/>
                 <select name="inpCurrencyId" id="paramCurrencyId" class="ComboKeyReadOnly Combo_OneCell_width" onchange="selectCombo(this, 'xx');return true;">
                     <option value=""><div id="reportC_Currency_ID"></div></option>
                 </select>
               </td>
               <td class="TitleCell"></td>
-              <td class="TitleCell"></td>
+              <td class="TitleCell"><span class="LabelText" id="lblExchangeRate">Exchange Rate</span></td>
+              <td class="Textbox_ContentCell">
+                <table style="border: 0px none; border-collapse: collapse;">
+                  <tr><td style="padding-top: 0px;">
+                    <input type="text" onblur="numberInputEvent('onblur', this);" onfocus="numberInputEvent('onfocus', this);" outputformat="generalQtyEdition" onchange="updateConvertedAmounts();return true;" onpaste="changeToEditingMode('onpaste');" oncut="changeToEditingMode('oncut');" onkeypress="changeToEditingMode('onkeypress');" onkeydown="changeToEditingMode('onkeydown'); numberInputEvent('onkeydown', this, event);" onkeyup="" name="inpExchangeRate" maxlength="22" value="" required="true" class="dojoValidateValid required TextBox_btn_OneCell_width number" id="paramExchangeRate"/>
+                  </td></tr>
+                </table>
+                <span id="paramExchangeRateinvalidSpan" style="display: none;" class="TextBox_MsgContainer_span">
+                  <table class="TextBox_MsgContainer_table">
+                    <tbody><tr class="TextBox_MsgContainer_tr">
+                      <td class="TextBox_MsgContainer_td"><div class="TextBox_MsgContainer_div"></div></td><td></td>
+                    </tr>
+                    <tr>
+                      <td class="invalid" colspan="2"><div name="invalidText" id="paramExchangeRateinvalidSpanText" class="TextBox_MsgContainer_div2">* The value entered is not valid.</div></td>
+                    </tr>
+                  </tbody></table>
+                </span>
+              </td>
               <td class="TitleCell"></td>
             </tr>
             
             <!-- Line 6 -->
             <tr>
               <td class="TitleCell"><span name="lblP" id="lblPExpectedPaym" class="LabelText">Expected Payment Out</span><span name="lblR" id="lblRExpectedPaym" class="LabelText">Expected Payment In</span></td>
-              <td class="TextBox_ContentCell"> <input class="readonly dojoValidateValid required TextBox_OneCell_width number" type="text" id="paramExpectedPayment" name="inpExpectedPayment" value="" onchange="updateDifference();" disabled="true"></input>
+              <td class="TextBox_ContentCell"> <input class="readonly dojoValidateValid required TextBox_OneCell_width number" type="text" id="paramExpectedPayment" name="inpExpectedPayment" value="" onchange="updateDifference();updateConvertedAmounts();" disabled="true"></input>
               </td>
               <td class="TitleCell"></td>
-              <td class="TitleCell"></td>
+              <td class="TitleCell"><span class="LabelText" id="lblExpectedConverted">Expected Converted</span></td>
+              <td class="TextBox_ContentCell"> <input class="readonly dojoValidateValid required TextBox_OneCell_width number" type="text" id="paramExpectedConverted" name="inpExpectedConverted" value="" onchange="" disabled="true"></input>
+              </td>
               <td class="TitleCell"></td>
             </tr>
             
@@ -713,7 +794,7 @@
                       <td class="Textbox_ContentCell">
                       <table style="border: 0px none; border-collapse: collapse;">
                         <tr><td style="padding-top: 0px;">
-                          <input type="text" onblur="numberInputEvent('onblur', this);" onfocus="numberInputEvent('onfocus', this);" outputformat="euroEdition" onchange="actualPaymentOnChange();return true;" onpaste="changeToEditingMode('onpaste');" oncut="changeToEditingMode('oncut');" onkeypress="changeToEditingMode('onkeypress');" onkeydown="changeToEditingMode('onkeydown'); numberInputEvent('onkeydown', this, event);" onkeyup="" name="inpActualPayment" maxlength="22" value="" required="true" class="dojoValidateValid required TextBox_btn_OneCell_width number" id="paramActualPayment"/>
+                          <input type="text" onblur="numberInputEvent('onblur', this);" onfocus="numberInputEvent('onfocus', this);" outputformat="euroEdition" onchange="actualPaymentOnChange();updateConvertedAmounts();return true;" onpaste="changeToEditingMode('onpaste');" oncut="changeToEditingMode('oncut');" onkeypress="changeToEditingMode('onkeypress');" onkeydown="changeToEditingMode('onkeydown'); numberInputEvent('onkeydown', this, event);" onkeyup="" name="inpActualPayment" maxlength="22" value="" required="true" class="dojoValidateValid required TextBox_btn_OneCell_width number" id="paramActualPayment"/>
                         </td></tr>
                       </table>
                       <span id="paramActualPaymentinvalidSpan" style="display: none;" class="TextBox_MsgContainer_span">
@@ -752,7 +833,41 @@
                   </table>
               </td>
               <td class="TitleCell"></td>
-              <td class="TitleCell"></td>
+              <td class="TitleCell"><span class="LabelText" id="lblActualConverted">Actual Converted</span></td>
+              <td class="TextBox_btn_ContentCell">
+                  <table border="0" cellspacing="0" cellpadding="0" summary=""  style="padding-top: 0px;" id="paramActualConvertedCell">
+                    <tr>
+                      <td class="Textbox_ContentCell">
+                      <table style="border: 0px none; border-collapse: collapse;">
+                        <tr><td style="padding-top: 0px;">
+                          <input type="text" onblur="numberInputEvent('onblur', this);" onfocus="numberInputEvent('onfocus', this);" outputformat="euroEdition" onchange="updateConvertedAmounts(true);return true;" onpaste="changeToEditingMode('onpaste');" oncut="changeToEditingMode('oncut');" onkeypress="changeToEditingMode('onkeypress');" onkeydown="changeToEditingMode('onkeydown'); numberInputEvent('onkeydown', this, event);" onkeyup="" name="inpActualConverted" maxlength="22" value="" required="true" class="dojoValidateValid required TextBox_btn_OneCell_width number" id="paramActualConverted"/>
+                        </td></tr>
+                      </table>
+                      <span id="paramActualConvertedinvalidSpan" style="display: none;" class="TextBox_MsgContainer_span">
+                        <table class="TextBox_MsgContainer_table">
+                          <tbody><tr class="TextBox_MsgContainer_tr">
+                            <td class="TextBox_MsgContainer_td"><div class="TextBox_MsgContainer_div"></div></td><td></td>
+                          </tr>
+                          <tr>
+                            <td class="invalid" colspan="2"><div name="invalidText" id="paramActualConvertedinvalidSpanText" class="TextBox_MsgContainer_div2">* The value entered is not valid.</div></td>
+                          </tr>
+                        </tbody></table>
+                      </span>
+                      </td>
+                      <td class="FieldButton_ContentCell">
+                      <a class="FieldButtonLink" href="#" onfocus="setWindowElementFocus(this); window.status='Amount From'; return true;" onblur=" window.status=''; return true;" onkeypress="this.className='FieldButtonLink_active'; return true;" onkeyup="this.className='FieldButtonLink_focus'; return true;"  onclick="calculator('frmMain.inpActualConverted', document.frmMain.inpActualConverted.value, false);return false;">
+                      <table class="FieldButton" onmouseout="this.className='FieldButton';window.status='';return true;" onmouseover="this.className='FieldButton_hover';window.status='';return true;" onmousedown="this.className='FieldButton_active';return true;" onmouseup="this.className='FieldButton';return true;" id="NoPackageslinkCalc">
+                          <tr>
+                            <td class="FieldButton_bg">
+                              <img alt="Calculator" class="FieldButton_Icon FieldButton_Icon_Calc" title="Amount" src="../../../../../web/images/blank.gif" border="0" id="buttonCalc"></img>
+                            </td>
+                          </tr>
+                        </table>
+                      </a>
+                      </td>
+                    </tr>
+                  </table>
+              </td>
               <td class="TitleCell"></td>
             </tr>
             
@@ -765,7 +880,7 @@
                     <td class="TextBox_ContentCell">
                       <table style="border: 0px none; border-collapse: collapse;">
                         <tr><td style="padding-top: 0px;">
-                          <input type="text" id="paramPaymentDate" name="inpPaymentDate" onchange="validateDateTextBox(this.id); validateDate(this);logChanges(this);return true;" onblur="expandDateYear(this.id);" oncontextmenu="changeToEditingMode('oncontextmenu');" onpaste="changeToEditingMode('onpaste');" oncut="changeToEditingMode('oncut');" onkeypress="changeToEditingMode('onkeypress');" onkeydown="changeToEditingMode('onkeydown');" onkeyup="autoCompleteDate(this);" maxlength="10" value="" required="true" class="dojoValidateValid required TextBox_btn_OneCell_width" displayFormat="xx" saveFormat="yy">
+                          <input type="text" id="paramPaymentDate" name="inpPaymentDate" onchange="validateDateTextBox(this.id); validateDate(this);paymentDateOnChange(this);logChanges(this);return true;" onblur="expandDateYear(this.id);" oncontextmenu="changeToEditingMode('oncontextmenu');" onpaste="changeToEditingMode('onpaste');" oncut="changeToEditingMode('oncut');" onkeypress="changeToEditingMode('onkeypress');" onkeydown="changeToEditingMode('onkeydown');" onkeyup="autoCompleteDate(this);" maxlength="10" value="" required="true" class="dojoValidateValid required TextBox_btn_OneCell_width" displayFormat="xx" saveFormat="yy">
                         </td></tr>
                       </table>
                       <span id="paramPaymentDateinvalidSpan" style="display: none;" class="TextBox_MsgContainer_span">
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddPaymentFromInvoice.java	Thu Jun 02 00:27:17 2011 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddPaymentFromInvoice.java	Thu Jun 02 10:59:08 2011 +0200
@@ -13,7 +13,7 @@
  * The Initial Developer of the Original Code is Openbravo SLU
  * All portions are Copyright (C) 2010-2011 Openbravo SLU
  * All Rights Reserved.
- * Contributor(s):  ______________________________________.
+ * Contributor(s): Enterprise Intelligence Systems (http://www.eintel.com.au).
  *************************************************************************
  */
 package org.openbravo.advpaymentmngt.ad_actionbutton;
@@ -22,6 +22,7 @@
 import java.io.PrintWriter;
 import java.math.BigDecimal;
 import java.util.ArrayList;
+import java.util.Date;
 import java.util.HashMap;
 import java.util.List;
 
@@ -29,6 +30,8 @@
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
+import org.codehaus.jettison.json.JSONException;
+import org.codehaus.jettison.json.JSONObject;
 import org.hibernate.criterion.Restrictions;
 import org.openbravo.advpaymentmngt.dao.AdvPaymentMngtDao;
 import org.openbravo.advpaymentmngt.process.FIN_AddPayment;
@@ -38,16 +41,19 @@
 import org.openbravo.base.filter.ValueListFilter;
 import org.openbravo.base.secureApp.HttpSecureAppServlet;
 import org.openbravo.base.secureApp.VariablesSecureApp;
+import org.openbravo.base.util.Convert;
 import org.openbravo.dal.core.OBContext;
 import org.openbravo.dal.service.OBCriteria;
 import org.openbravo.dal.service.OBDal;
 import org.openbravo.data.FieldProvider;
+import org.openbravo.erpCommon.dao.CurrencyDao;
 import org.openbravo.erpCommon.utility.ComboTableData;
 import org.openbravo.erpCommon.utility.DateTimeData;
 import org.openbravo.erpCommon.utility.FieldProviderFactory;
 import org.openbravo.erpCommon.utility.OBError;
 import org.openbravo.erpCommon.utility.Utility;
 import org.openbravo.model.common.businesspartner.BusinessPartner;
+import org.openbravo.model.common.currency.ConversionRate;
 import org.openbravo.model.common.currency.Currency;
 import org.openbravo.model.common.enterprise.DocumentType;
 import org.openbravo.model.common.enterprise.Organization;
@@ -106,25 +112,40 @@
       String strFinancialAccountId = vars.getRequestGlobalVariable("inpFinancialAccount", "");
       String strPaymentMethodId = vars.getRequestGlobalVariable("inpPaymentMethod", "");
       String strOrgId = vars.getRequestGlobalVariable("inpadOrgId", "");
-      refreshPaymentMethodCombo(response, strPaymentMethodId, strFinancialAccountId, strOrgId);
+      boolean isReceipt = vars.getRequiredStringParameter("isReceipt").equals("Y");
+      refreshPaymentMethodCombo(response, strPaymentMethodId, strFinancialAccountId, strOrgId,
+          isReceipt);
 
     } else if (vars.commandIn("FINANCIALACCOUNT")) {
       String strFinancialAccountId = vars.getRequestGlobalVariable("inpFinancialAccount", "");
       String strPaymentMethodId = vars.getRequiredStringParameter("inpPaymentMethod");
       String strOrgId = vars.getRequestGlobalVariable("inpadOrgId", "");
       String strCurrencyId = vars.getRequestGlobalVariable("inpCurrencyId", "");
+      String strPaymentDate = vars.getRequestGlobalVariable("inpPaymentDate", "");
+      boolean isReceipt = vars.getRequiredStringParameter("isReceipt").equals("Y");
       refreshFinancialAccountCombo(response, strPaymentMethodId, strFinancialAccountId, strOrgId,
-          strCurrencyId);
+          strCurrencyId, isReceipt, strPaymentDate);
     } else if (vars.commandIn("FILLFINANCIALACCOUNT")) {
       String strFinancialAccountId = vars.getRequestGlobalVariable("inpFinancialAccount", "");
       String strOrgId = vars.getRequestGlobalVariable("inpadOrgId", "");
       String strCurrencyId = vars.getRequestGlobalVariable("inpCurrencyId", "");
-      refreshFinancialAccountCombo(response, "", strFinancialAccountId, strOrgId, strCurrencyId);
+      String strPaymentDate = vars.getRequestGlobalVariable("inpPaymentDate", "");
+      boolean isReceipt = vars.getRequiredStringParameter("isReceipt").equals("Y");
+      refreshFinancialAccountCombo(response, "", strFinancialAccountId, strOrgId, strCurrencyId,
+          isReceipt, strPaymentDate);
 
     } else if (vars.commandIn("FILLPAYMENTMETHOD")) {
       String strPaymentMethodId = vars.getRequiredStringParameter("inpPaymentMethod");
       String strOrgId = vars.getRequestGlobalVariable("inpadOrgId", "");
-      refreshPaymentMethodCombo(response, strPaymentMethodId, "", strOrgId);
+      boolean isReceipt = vars.getRequiredStringParameter("isReceipt").equals("Y");
+      refreshPaymentMethodCombo(response, strPaymentMethodId, "", strOrgId, isReceipt);
+
+    } else if (vars.commandIn("EXCHANGERATE")) {
+      final String strCurrencyId = vars.getRequestGlobalVariable("inpCurrencyId", "");
+      final String strFinancialAccountCurrencyId = vars.getRequestGlobalVariable(
+          "inpFinancialAccountCurrencyId", "");
+      final String strPaymentDate = vars.getRequestGlobalVariable("inpPaymentDate", "");
+      refreshExchangeRate(response, strCurrencyId, strFinancialAccountCurrencyId, strPaymentDate);
 
     } else if (vars.commandIn("SAVE") || vars.commandIn("SAVEANDPROCESS")) {
       boolean isReceipt = vars.getRequiredStringParameter("isReceipt").equals("Y");
@@ -153,6 +174,11 @@
       }
       String strTabId = vars.getRequiredStringParameter("inpTabId");
       String strReferenceNo = vars.getStringParameter("inpReferenceNo", "");
+      String paymentCurrencyId = vars.getRequiredStringParameter("inpCurrencyId");
+      BigDecimal exchangeRate = new BigDecimal(vars.getRequiredNumericParameter("inpExchangeRate",
+          "1.0"));
+      BigDecimal convertedAmount = new BigDecimal(vars.getRequiredNumericParameter(
+          "inpActualConverted", strPaymentAmount));
       OBError message = null;
       // FIXME: added to access the FIN_PaymentSchedule and FIN_PaymentScheduleDetail tables to be
       // removed when new security implementation is done
@@ -185,7 +211,8 @@
             strPaymentAmount, FIN_Utility.getDate(strPaymentDate), dao.getObject(
                 Organization.class, strOrgId), strReferenceNo, selectedPaymentDetails,
             selectedPaymentDetailAmounts, strDifferenceAction.equals("writeoff"),
-            strDifferenceAction.equals("refund"));
+            strDifferenceAction.equals("refund"), dao.getObject(Currency.class, paymentCurrencyId),
+            exchangeRate, convertedAmount);
 
         if (strAction.equals("PRP") || strAction.equals("PPP") || strAction.equals("PRD")
             || strAction.equals("PPW")) {
@@ -288,34 +315,31 @@
     xmlDocument.setParameter("documentNumber", "<" + strDocNo + ">");
     Invoice inv = OBDal.getInstance().get(Invoice.class, strInvoiceId);
     String strPaymentMethodId = inv.getPaymentMethod().getId();
-    String strFinancialAccountId = "";
-    try {
-      strFinancialAccountId = isReceipt ? bp.getAccount().getId() : bp.getPOFinancialAccount()
-          .getId();
-    } catch (Exception e) {
+
+    FIN_FinancialAccount account = isReceipt ? bp.getAccount() : bp.getPOFinancialAccount();
+    if (account == null) {
       log4j.info("No default info for the selected business partner");
+      account = dao.getDefaultFinancialAccountFor(strOrgId);
     }
+
+    String strFinancialAccountId = account != null ? account.getId() : "";
     xmlDocument.setParameter("customerBalance", bp.getCreditUsed().toString());
 
     // Payment Method combobox
     String paymentMethodComboHtml = FIN_Utility.getPaymentMethodList(strPaymentMethodId, "",
-        strOrgId, true, true);
+        strOrgId, true, true, isReceipt);
     xmlDocument.setParameter("sectionDetailPaymentMethod", paymentMethodComboHtml);
 
     // Financial Account combobox
     String finAccountComboHtml = FIN_Utility.getFinancialAccountList(strPaymentMethodId,
-        strFinancialAccountId, strOrgId, true, strCurrencyId);
+        strFinancialAccountId, strOrgId, true, strCurrencyId, isReceipt);
     xmlDocument.setParameter("sectionDetailFinancialAccount", finAccountComboHtml);
 
     // Currency
     xmlDocument.setParameter("CurrencyId", strCurrencyId);
+    final Currency paymentCurrency = dao.getObject(Currency.class, strCurrencyId);
     OBContext.setAdminMode();
-    try {
-      xmlDocument.setParameter("precision", dao.getObject(Currency.class, strCurrencyId)
-          .getStandardPrecision().toString());
-    } finally {
-      OBContext.restorePreviousMode();
-    }
+
     try {
       ComboTableData comboTableData = new ComboTableData(vars, this, "TABLEDIR", "C_Currency_ID",
           "", "", Utility.getContext(this, vars, "#AccessibleOrgTree", "AddPaymentFromInvoice"),
@@ -328,6 +352,17 @@
       throw new ServletException(ex);
     }
 
+    final Currency financialAccountCurrency = dao
+        .getFinancialAccountCurrency(strFinancialAccountId);
+    if (financialAccountCurrency != null) {
+      xmlDocument.setParameter("financialAccountCurrencyId", financialAccountCurrency.getId());
+      xmlDocument.setParameter("financialAccountCurrencyPrecision", financialAccountCurrency
+          .getStandardPrecision().toString());
+    }
+
+    String exchangeRate = findExchangeRate(paymentCurrency, financialAccountCurrency, new Date());
+    xmlDocument.setParameter("exchangeRate", exchangeRate);
+
     boolean forcedFinancialAccountTransaction = false;
     forcedFinancialAccountTransaction = isForcedFinancialAccountTransaction(isReceipt,
         strFinancialAccountId, strPaymentMethodId);
@@ -394,11 +429,12 @@
   }
 
   private void refreshPaymentMethodCombo(HttpServletResponse response, String srtPaymentMethod,
-      String strFinancialAccountId, String strOrgId) throws IOException, ServletException {
+      String strFinancialAccountId, String strOrgId, boolean isReceipt) throws IOException,
+      ServletException {
     log4j.debug("Callout: Financial Account has changed to" + strFinancialAccountId);
 
     String paymentMethodComboHtml = FIN_Utility.getPaymentMethodList(srtPaymentMethod,
-        strFinancialAccountId, strOrgId, true, true);
+        strFinancialAccountId, strOrgId, true, true, isReceipt);
 
     response.setContentType("text/html; charset=UTF-8");
     PrintWriter out = response.getWriter();
@@ -408,20 +444,82 @@
   }
 
   private void refreshFinancialAccountCombo(HttpServletResponse response,
-      String strPaymentMethodId, String strFinancialAccountId, String strOrgId, String strCurrencyId)
-      throws IOException, ServletException {
+      String strPaymentMethodId, String strFinancialAccountId, String strOrgId,
+      String strCurrencyId, boolean isReceipt, String paymentDate) throws IOException,
+      ServletException {
     log4j.debug("Callout: Payment Method has changed to " + strPaymentMethodId);
 
+    AdvPaymentMngtDao dao = new AdvPaymentMngtDao();
+
     String finAccountComboHtml = FIN_Utility.getFinancialAccountList(strPaymentMethodId,
-        strFinancialAccountId, strOrgId, true, strCurrencyId);
+        strFinancialAccountId, strOrgId, true, strCurrencyId, isReceipt);
 
-    response.setContentType("text/html; charset=UTF-8");
+    final Currency financialAccountCurrency = dao
+        .getFinancialAccountCurrency(strFinancialAccountId);
+    final Currency paymentCurrency = dao.getObject(Currency.class, strCurrencyId);
+
+    String exchangeRate = findExchangeRate(paymentCurrency, financialAccountCurrency, FIN_Utility
+        .getDate(paymentDate));
+
+    JSONObject msg = new JSONObject();
+    try {
+      msg.put("combo", finAccountComboHtml);
+      msg.put("financialAccountCurrencyId", financialAccountCurrency.getId());
+      msg.put("exchangeRate", exchangeRate);
+      msg.put("financialAccountCurrencyPrecision", financialAccountCurrency.getStandardPrecision());
+    } catch (JSONException e) {
+      log4j.debug("JSON object error" + msg.toString());
+    }
+
+    response.setContentType("application/json; charset=UTF-8");
     PrintWriter out = response.getWriter();
-    out.println(finAccountComboHtml.replaceAll("\"", "\\'"));
+    out.println(msg.toString());
     out.close();
 
   }
 
+  private void refreshExchangeRate(HttpServletResponse response, String strCurrencyId,
+      String strFinancialAccountCurrencyId, String strPaymentDate) throws IOException,
+      ServletException {
+
+    AdvPaymentMngtDao dao = new AdvPaymentMngtDao();
+
+    final Currency financialAccountCurrency = dao.getObject(Currency.class,
+        strFinancialAccountCurrencyId);
+    final Currency paymentCurrency = dao.getObject(Currency.class, strCurrencyId);
+
+    String exchangeRate = findExchangeRate(paymentCurrency, financialAccountCurrency, FIN_Utility
+        .getDate(strPaymentDate));
+
+    JSONObject msg = new JSONObject();
+    try {
+      msg.put("exchangeRate", exchangeRate);
+    } catch (JSONException e) {
+      log4j.debug("JSON object error" + msg.toString());
+    }
+    response.setContentType("application/json; charset=UTF-8");
+    PrintWriter out = response.getWriter();
+    out.println(msg.toString());
+    out.close();
+  }
+
+  private String findExchangeRate(Currency paymentCurrency, Currency financialAccountCurrency,
+      Date paymentDate) {
+    String exchangeRate = "1.0";
+    if (!financialAccountCurrency.equals(paymentCurrency)) {
+      final CurrencyDao currencyDao = new CurrencyDao();
+      final ConversionRate conversionRate = currencyDao.getConversionRate(paymentCurrency,
+          financialAccountCurrency, paymentDate);
+      if (conversionRate != null) {
+        exchangeRate = Convert.toStringWithPrecision(conversionRate.getMultipleRateBy(),
+            CurrencyDao.CONVERSION_RATE_PRECISION);
+      } else {
+        exchangeRate = "";
+      }
+    }
+    return exchangeRate;
+  }
+
   private FieldProvider[] set() throws ServletException {
     HashMap<String, String> empty = new HashMap<String, String>();
     empty.put("finScheduledPaymentId", "");
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddPaymentFromInvoice.xml	Thu Jun 02 00:27:17 2011 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddPaymentFromInvoice.xml	Thu Jun 02 10:59:08 2011 +0200
@@ -14,7 +14,7 @@
  * The Initial Developer of the Original Code is Openbravo SLU
  * All portions are Copyright (C) 2010 Openbravo SLU
  * All Rights Reserved.
- * Contributor(s):  ______________________________________.
+ * Contributor(s): Enterprise Intelligence Systems (http://www.eintel.com.au).
  *************************************************************************
 -->
 <REPORT>
@@ -37,6 +37,11 @@
     <PARAMETER id="paramC_Currency_ID" name="CurrencyId" attribute="value"/>
     <PARAMETER id="paramExpectedPayment" name="expectedPayment" attribute="value" format="euroEdition"/>
     <PARAMETER id="paramActualPayment" name="actualPayment" attribute="value" format="euroEdition" default="0"/>
+    <PARAMETER id="paramFinancialAccountCurrencyId" name="financialAccountCurrencyId" attribute="value"/>
+    <PARAMETER id="paramFinancialAccountCurrencyPrecision" name="financialAccountCurrencyPrecision" attribute="value"/>
+    <PARAMETER id="paramExchangeRate" name="exchangeRate" attribute="value" format="generalQtyEdition"/>
+    <PARAMETER id="paramExpectedConverted" name="expectedConverted" attribute="value" format="euroEdition"/>
+    <PARAMETER id="paramActualConverted" name="actualConverted" attribute="value" format="euroEdition" default="0"/>
     <PARAMETER id="paramCredit" name="credit" attribute="value" format="euroEdition"/>
     <PARAMETER id="fieldOrg" name="orgId" attribute="value"/>
     <PARAMETER id="fieldInvoice" name="invoiceId" attribute="value"/>
@@ -54,7 +59,6 @@
     <PARAMETER id="paramDueDateTo" name="dateDisplayFormat" attribute="displayformat" replace="xx"/>
     <PARAMETER id="paramDueDateTo" name="dateDisplayFormat" attribute="saveformat" replace="yy"/>
     <PARAMETER id="paramCurrencyId" name="CurrencyId" attribute="onchange" replace="xx"/>
-    <PARAMETER id="paramPrecision" name="precision" attribute="value"/>
     
     <PARAMETER id="sectionDetailPaymentMethod" name="sectionDetailPaymentMethod"/>
     <PARAMETER id="sectionDetailFinancialAccount" name="sectionDetailFinancialAccount"/>
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddPaymentFromTransaction.html	Thu Jun 02 00:27:17 2011 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddPaymentFromTransaction.html	Thu Jun 02 10:59:08 2011 +0200
@@ -14,7 +14,7 @@
  * The Initial Developer of the Original Code is Openbravo SLU
  * All portions are Copyright (C) 2010-2011 Openbravo SLU
  * All Rights Reserved.
- * Contributor(s):  ______________________________________.
+ * Contributor(s):  Enterprise Intelligence Systems (http://www.eintel.com.au).
  *************************************************************************
 -->
 <html>
@@ -72,6 +72,16 @@
       setWindowElementFocus(frm.inpPaymentDate);
       showJSMessage(7);
       return false;
+    } else if (isMulticurrencyTxn()) {
+      if (frm.inpActualConverted.value==null || frm.inpActualConverted.value=="") {
+        setWindowElementFocus(frm.inpActualConverted);
+        showJSMessage(7);
+        return false;
+      } else if (frm.inpExchangeRate.value==null || frm.inpExchangeRate.value=="") {
+        setWindowElementFocus(frm.inpExchangeRate);
+        showJSMessage(7);
+        return false;
+      }
     } else {
       var diffAction = frm.inpDifferenceAction, i,
                        selectedAction = null, actionSelected = false;
@@ -198,6 +208,86 @@
   }
 }
 
+
+function isMulticurrencyTxn() {
+  var invCurrency = document.getElementById('paramCurrencyId').value
+  var accountCurrency = document.getElementById('paramFinancialAccountCurrencyId').value
+  return invCurrency && accountCurrency && invCurrency != accountCurrency;
+}
+
+function displayMulticurrencyControls() {
+  var display = isMulticurrencyTxn();
+  displayLogicElement('paramExchangeRate', display );
+  displayLogicElement('lblExchangeRate', display );
+  displayLogicElement('paramExpectedConverted', display );
+  displayLogicElement('lblExpectedConverted', display );
+  displayLogicElement('paramActualConvertedCell', display );
+  displayLogicElement('lblActualConverted', display );
+}
+
+function currencyOnChange() {
+  if( isPaymentMethodMulticurrency() ) {
+    changeClass('paramCurrencyId','ComboKeyReadOnly ', 'ComboKey dojoValidateValid required ')
+    loadGridList();
+    return refreshExchangeRate();
+  }else {
+    // Reset currency
+    changeClass('paramCurrencyId', 'ComboKey dojoValidateValid required ', 'ComboKeyReadOnly ')
+    selectCombo(document.getElementById('paramCurrencyId'), document.getElementById('paramFinancialAccountCurrencyId').value);
+    document.getElementById('paramExchangeRate').value='1';
+    updateConvertedAmounts();
+    displayMulticurrencyControls();
+    loadGridList();
+  }
+}
+
+function refreshExchangeRate() {
+  try {
+    var url = "../org.openbravo.advpaymentmngt.ad_actionbutton/AddPaymentFromTransaction.html";
+    var paramXMLReq = null;
+    return submitXmlHttpRequest(callBackExchangeRate, document.frmMain, "EXCHANGERATE", url, false, null, paramXMLReq);
+  } catch (e) {
+    alert(e);
+  }
+}
+
+function callBackExchangeRate(paramXMLParticular, XMLHttpRequestObj) {
+  if (getReadyStateHandler(XMLHttpRequestObj)) {
+    try {
+      if (XMLHttpRequestObj.responseText) {
+        var resp = decodeJSON(XMLHttpRequestObj.responseText);
+        document.getElementById('paramExchangeRate').value=resp.exchangeRate;
+      } else {
+        document.getElementById('paramExchangeRate').value='';
+      }
+      updateConvertedAmounts();
+      displayMulticurrencyControls();
+    } catch (e) {
+    }
+  }
+  return true;
+}
+
+
+function paymentMethodOnChange(){
+  currencyOnChange();
+}
+function paymentDateOnChange(){
+  return refreshExchangeRate();
+}
+
+function isPaymentMethodMulticurrency(combo) {
+  if( combo == null ) {
+    combo = document.frmMain.inpPaymentMethod;
+  }
+  var paymentMethodId = inputValue(combo);
+  var multicurrency = false;
+  if( paymentMethodId ) {
+    multicurrency  = paymentMethodMulticurrency[paymentMethodId]
+  }
+  return multicurrency;
+}
+
 function initializeTemplate(){
   initFIN_Utilities(document.frmMain);
   processLabels();
@@ -215,10 +305,10 @@
 </script>
 <script language="JavaScript" type="text/javascript">
 function displayLogicForCredit() {
-  displayLogicElement('paramCredit', compare(document.getElementById('paramCredit').value, '>', "0") );
-  displayLogicElement('lblCredit', compare(document.getElementById('paramCredit').value, '>', "0") );
-  displayLogicElement('paramUseCredit', compare(document.getElementById('paramCredit').value, '>', "0") );
-  displayLogicElement('lblUseCredit', compare(document.getElementById('paramCredit').value, '>', "0") );
+  var hasCredit = compare(document.getElementById('paramCredit').value, '>', "0");
+  displayLogicElement('paramCredit', hasCredit );
+  displayLogicElement('paramUseCreditContainer', hasCredit );
+  displayLogicElement('rowCredit', hasCredit );
 }
 
 function onchangeBPartner(dummy) {
@@ -291,6 +381,7 @@
       if (XMLHttpRequestObj.responseText) {
         strText = XMLHttpRequestObj.responseText;
         createCombo(document.getElementById('inpPaymentMethod'), strText);
+        paymentMethodOnChange();
       }
     } catch (e) {}
   }
@@ -351,6 +442,7 @@
     displayLogicElement('sectionDifference', false);
     displayLogicElement('sectionDifferenceBox', false);
     displayLogicForCredit();
+    displayMulticurrencyControls();
 
     resizeAreaCreateFrom();
   }
@@ -364,7 +456,6 @@
 <form name="frmMain" method="post" action="AddPaymentFromTransaction.html">
   <input type="hidden" name="Command" />
   <input type="hidden" name="IsPopUpCall" value="1" />
-  <input type="hidden" name="inpFinancialAccountId" value="" id="paramFinancialAccountId"/>
   <input type="hidden" name="isReceipt" value="" id="fieldReceipt"/>
   <input type="hidden" name="inpissotrx" value="" id="fieldIsSoTrx"/>
   <input type="hidden" name="inpFinBankStatementLineId" value="" id="paramFinBankStatementLineId"></input>
@@ -635,27 +726,16 @@
               <td class="TitleCell"><span class="LabelText" name="lblP" id="lblPTakeFrom">Take From</span><span class="LabelText" name="lblR" id="lblRDepositTo">Deposit To</span></td>
               <td class="TextBox_ContentCell" colspan="2"><input type="text" name="inpFinancialAccount" id="paramFinancialAccount" class="readonly dojoValidateValid required TextBox_TwoCells_width" value="" />
                 <input type="hidden" name="inpFinancialAccountId" id="paramFinancialAccountId" value="">
+                <input type="hidden" id="paramFinancialAccountCurrencyId" name="inpFinancialAccountCurrencyId" value=""/>
+                <input type="hidden" id="paramFinancialAccountCurrencyPrecision" name="inpFinancialAccountCurrencyPrecision" value="2"/>
               </td>
               <td class="TitleCell"><span class="LabelText">Reference No.</span></td>
               <td class="TextBox_ContentCell" colspan="2"><input class="dojoValidateValid TextBox_OneCell_width" type="text" name="inpReferenceNo" value="" id="paramReferenceNo"></input></td>
               <td class="TitleCell"></td>
             </tr>
-            
+
             <!-- Line 3 -->
             <tr>
-              <td class="TitleCell"><span class="LabelText">Currency</span></td>
-              <td class="TextBox_ContentCell" colspan="2">
-                <input type="hidden" id="paramPrecision" name="curPrecision" value="2"/>
-                <input type="text" name="inpCurrency" id="paramCurrency" class="readonly dojoValidateValid required TextBox_TwoCells_width" value="" />
-              </td>
-              <td class="TitleCell"></td>
-              <td class="TitleCell"></td>
-              <td class="TitleCell"></td>
-              <td class="TitleCell"></td>
-            </tr>
-            
-            <!-- Line 4 -->
-            <tr>
               <td class="TitleCell"><span class="LabelText" name="lblP" id="lblPToBePaidTo">To Be Paid To</span><span class="LabelText" name="lblR" id="lblRReceivedFrom">Received From</span></td>
               <td class="TextBox_ContentCell" colspan="2">
                 <table style="border:0px;border-collapse:collapse;">
@@ -672,6 +752,17 @@
               <td class="TitleCell"></td>
               <td class="TitleCell"></td>
             </tr>
+
+            <!-- Line 4 (Hidden if no credit)-->
+            <tr id="rowCredit">
+              <td class="TitleCell"><span class="LabelText" name="lbl" id="lblCredit">Available Credit</span></td>
+              <td class="TextBox_ContentCell"><input class="readonly dojoValidateValid TextBox_OneCell_width number" type="text" name="inpCredit" value="0" id="paramCredit"></input></td>
+              <td class="TitleCell"></td>
+              <td class="TitleCell"></td>
+              <td class="TitleCell"><span class="LabelText" name="lbl" id="lblUseCredit">Use Available Credit</span></td>
+              <td class="Radio_Check_ContentCell"><span class="Checkbox_container_NOT_Focused"><input type="checkbox" name="inpUseCredit" value="Y" id="paramUseCredit" onclick="useCreditOnChange();"></input></span></td>
+            </tr>
+
             
             <!-- Line 5 -->
             <tr>
@@ -679,13 +770,21 @@
               <td class="Combo_ContentCell" colspan="2">
                 <select name="inpPaymentMethod"
                         onkeypress="changeToEditingMode('onkeypress');"
-                        onchange="changeToEditingMode('onchange', this);logChanges(this);return true;"
+                        onchange="changeToEditingMode('onchange', this);logChanges(this);paymentMethodOnChange(this);return true;"
                         class="dojoValidateValid ComboKey Combo_TwoCells_width required" id="inpPaymentMethod">
                   <div id="sectionDetailPaymentMethod"></div>
                 </select>
+                <div id="sectionDetailPaymentMethodMulticurrency"></div>
               </td>
-              <td class="TitleCell"></td>
-              <td class="TitleCell"></td>
+              <td class="TitleCell"><span class="LabelText">Currency</span></td>
+              <td class="TextBox_ContentCell" colspan="2">
+                <select name="inpCurrencyId" id="paramCurrencyId" class="ComboKeyReadOnly Combo_OneCell_width"
+                        onkeypress="changeToEditingMode('onkeypress');"
+                        onchange="changeToEditingMode('onchange', this);logChanges(this);currencyOnChange();return true;">
+                    <option value=""><div id="reportCurrencyId"></div></option>
+                </select>
+
+              </td>
               <td class="TitleCell"></td>
             </tr>
             
@@ -694,8 +793,9 @@
               <td class="TitleCell"><span name="lblP" id="lblPExpectedPaym" class="LabelText">Expected Payment Out</span><span name="lblR" id="lblRExpectedPaym" class="LabelText">Expected Payment In</span></td>
               <td class="TextBox_ContentCell"><input class="readonly dojoValidateValid required TextBox_OneCell_width number" readonly type="text" id="paramExpectedPayment" name="inpExpectedPayment" value="" onchange="updateDifference();"></input></td>
               <td class="TitleCell"></td>
-              <td class="TitleCell"><span class="LabelText" name="lbl" id="lblCredit">Available Credit</span></td>
-              <td class="TextBox_ContentCell"><input class="readonly dojoValidateValid TextBox_OneCell_width number" type="text" name="inpCredit" value="0" id="paramCredit"></input></td>
+              <td class="TitleCell"><span class="LabelText" id="lblExpectedConverted">Expected Converted</span></td>
+              <td class="TextBox_ContentCell"> <input class="readonly dojoValidateValid required TextBox_OneCell_width number" type="text" id="paramExpectedConverted" name="inpExpectedConverted" value="" onchange="" disabled="true"></input>
+              </td>
               <td class="TitleCell"></td>
             </tr>
 
@@ -738,8 +838,43 @@
                   </table>
               </td>
               <td class="TitleCell"></td>
-              <td class="TitleCell"><span class="LabelText" name="lbl" id="lblUseCredit">Use Available Credit</span></td>
-              <td class="Radio_Check_ContentCell"><span class="Checkbox_container_NOT_Focused"><input type="checkbox" name="inpUseCredit" value="Y" id="paramUseCredit" onclick="useCreditOnChange();"></input></span></td>
+              <td class="TitleCell"><span class="LabelText" id="lblActualConverted">Actual Converted</span></td>
+              <td class="TextBox_btn_ContentCell">
+                  <table border="0" cellspacing="0" cellpadding="0" summary=""  style="padding-top: 0px;" id="paramActualConvertedCell">
+                    <tr>
+                      <td class="Textbox_ContentCell">
+                      <table style="border: 0px none; border-collapse: collapse;">
+                        <tr><td style="padding-top: 0px;">
+                          <input type="text" onblur="numberInputEvent('onblur', this);" onfocus="numberInputEvent('onfocus', this);" outputformat="euroEdition" onchange="updateConvertedAmounts(true);return true;" onpaste="changeToEditingMode('onpaste');" oncut="changeToEditingMode('oncut');" onkeypress="changeToEditingMode('onkeypress');" onkeydown="changeToEditingMode('onkeydown'); numberInputEvent('onkeydown', this, event);" onkeyup="" name="inpActualConverted" maxlength="22" value="" required="true" class="dojoValidateValid required TextBox_btn_OneCell_width number" id="paramActualConverted"/>
+                        </td></tr>
+                      </table>
+                      <span id="paramActualConvertedinvalidSpan" style="display: none;" class="TextBox_MsgContainer_span">
+                        <table class="TextBox_MsgContainer_table">
+                          <tbody><tr class="TextBox_MsgContainer_tr">
+                            <td class="TextBox_MsgContainer_td"><div class="TextBox_MsgContainer_div"></div></td><td></td>
+                          </tr>
+                          <tr>
+                            <td class="invalid" colspan="2"><div name="invalidText" id="paramActualConvertedinvalidSpanText" class="TextBox_MsgContainer_div2">* The value entered is not valid.</div></td>
+                          </tr>
+                        </tbody></table>
+                      </span>
+                      </td>
+                      <td class="FieldButton_ContentCell">
+                      <a class="FieldButtonLink" href="#" onfocus="setWindowElementFocus(this); window.status='Amount From'; return true;" onblur=" window.status=''; return true;" onkeypress="this.className='FieldButtonLink_active'; return true;" onkeyup="this.className='FieldButtonLink_focus'; return true;"  onclick="calculator('frmMain.inpActualConverted', document.frmMain.inpActualConverted.value, false);return false;">
+                      <table class="FieldButton" onmouseout="this.className='FieldButton';window.status='';return true;" onmouseover="this.className='FieldButton_hover';window.status='';return true;" onmousedown="this.className='FieldButton_active';return true;" onmouseup="this.className='FieldButton';return true;" id="NoPackageslinkCalc">
+                          <tr>
+                            <td class="FieldButton_bg">
+                              <img alt="Calculator" class="FieldButton_Icon FieldButton_Icon_Calc" title="Amount" src="../../../../../web/images/blank.gif" border="0" id="buttonCalc"></img>
+                            </td>
+                          </tr>
+                        </table>
+                      </a>
+                      </td>
+                    </tr>
+                  </table>
+              </td>
+
+              <td class="TitleCell"></td>
             </tr>
             
             <!-- Line 8 -->
@@ -749,7 +884,17 @@
                 <table border="0" cellspacing="0" cellpadding="0" summary=""  style="padding-top: 0px;">
                   <tr>
                     <td class="TextBox_ContentCell">
-                      <input type="text" id="paramPaymentDate" class="dojoValidateValid required TextBox_btn_OneCell_width" value="" maxlength="10" name="inpPaymentDate" onkeyup="autoCompleteDate(this);" onkeydown="changeToEditingMode('onkeydown');" onkeypress="changeToEditingMode('onkeypress');" oncut="changeToEditingMode('oncut');" onpaste="changeToEditingMode('onpaste');" oncontextmenu="changeToEditingMode('oncontextmenu');" onblur="expandDateYear(this.id);" displayFormat="xx" saveFormat="yy"></input>
+                      <table style="border: 0px none; border-collapse: collapse;">
+                        <tr><td style="padding-top: 0px;">
+                          <input type="text" id="paramPaymentDate" class="dojoValidateValid required TextBox_btn_OneCell_width" value="" maxlength="10" name="inpPaymentDate" onkeyup="autoCompleteDate(this);" onkeydown="changeToEditingMode('onkeydown');" onkeypress="changeToEditingMode('onkeypress');" oncut="changeToEditingMode('oncut');" onpaste="changeToEditingMode('onpaste');" oncontextmenu="changeToEditingMode('oncontextmenu');" onblur="expandDateYear(this.id);" displayFormat="xx" saveFormat="yy"></input>
+                        </td></tr>
+                      </table>
+                      <span id="paramPaymentDateinvalidSpan" style="display: none;" class="TextBox_MsgContainer_span">
+                        <table class="TextBox_MsgContainer_table">
+                          <tbody><tr class="TextBox_MsgContainer_tr"><td class="TextBox_MsgContainer_td"><div class="TextBox_MsgContainer_div"></div></td><td></td></tr>
+                          <tr><td class="invalid" colspan="2"><div name="invalidText" id="paramPaymentDateinvalidSpanText" class="TextBox_MsgContainer_div2">* The value entered is not valid.</div></td></tr>
+                          </tbody></table>
+                      </span>
                     </td>
                     <td class="FieldButton_ContentCell">
                       <a class="FieldButtonLink" href="#" onfocus="setWindowElementFocus(this); window.status='Calendar'; return true;" onblur="window.status=''; return true;" onkeypress="this.className='FieldButtonLink_active'; return true;" onkeyup="this.className='FieldButtonLink_focus'; return true;" onclick="showCalendar('frmMain.inpPaymentDate', document.frmMain.inpPaymentDate.value, false);return false;">
@@ -766,8 +911,24 @@
                 </table>
               </td>
               <td class="TitleCell"></td>
-              <td class="TitleCell"></td>
-              <td class="TitleCell"></td>
+              <td class="TitleCell"><span class="LabelText" id="lblExchangeRate">Exchange Rate</span></td>
+              <td class="Textbox_ContentCell">
+                <table style="border: 0px none; border-collapse: collapse;">
+                  <tr><td style="padding-top: 0px;">
+                    <input type="text" onblur="numberInputEvent('onblur', this);" onfocus="numberInputEvent('onfocus', this);" outputformat="generalQtyEdition" onchange="updateConvertedAmounts();return true;" onpaste="changeToEditingMode('onpaste');" oncut="changeToEditingMode('oncut');" onkeypress="changeToEditingMode('onkeypress');" onkeydown="changeToEditingMode('onkeydown'); numberInputEvent('onkeydown', this, event);" onkeyup="" name="inpExchangeRate" maxlength="22" value="" required="true" class="dojoValidateValid required TextBox_btn_OneCell_width number" id="paramExchangeRate"/>
+                  </td></tr>
+                </table>
+                <span id="paramExchangeRateinvalidSpan" style="display: none;" class="TextBox_MsgContainer_span">
+                  <table class="TextBox_MsgContainer_table">
+                    <tbody><tr class="TextBox_MsgContainer_tr">
+                      <td class="TextBox_MsgContainer_td"><div class="TextBox_MsgContainer_div"></div></td><td></td>
+                    </tr>
+                    <tr>
+                      <td class="invalid" colspan="2"><div name="invalidText" id="paramExchangeRateinvalidSpanText" class="TextBox_MsgContainer_div2">* The value entered is not valid.</div></td>
+                    </tr>
+                  </tbody></table>
+                </span>
+              </td>
             </tr>
             
             <!-- Text -->
@@ -798,7 +959,6 @@
                       <table style="border: 0px none; border-collapse: collapse;">
                         <tr><td style="padding-top: 0px;">
                           <input type="text" id="paramDueDateFrom" class="dojoValidateValid TextBox_btn_OneCell_width" value="" maxlength="10" name="inpDueDateFrom" onkeyup="autoCompleteDate(this);" onkeydown="changeToEditingMode('onkeydown');" onkeypress="changeToEditingMode('onkeypress');" oncut="changeToEditingMode('oncut');" onpaste="changeToEditingMode('onpaste');" oncontextmenu="changeToEditingMode('oncontextmenu');" onblur="expandDateYear(this.id);" onchange="validateDateTextBox(this.id);  validateDate(this);return true;" displayFormat="xx" saveFormat="xx"></input>
-                          <!--input dojoType="openbravo:DateTextbox" lowerThan="paramDueDateTo" displayFormat="xx" saveFormat="yy"  class="TextBox_btn_OneCell_width" type="text" name="inpDueDateFrom" id="paramDueDateFrom" size="10" maxlength="10" value="" onkeyup="autoCompleteDate(this.textbox, this.displayFormat);return true;" onblur="loadGridList();return true;"></input><script>djConfig.searchIds.push("paramDueDateFrom");</script-->
                         </td></tr>
                       </table>
                       <span id="paramDueDateFrominvalidSpan" style="display: none;" class="TextBox_MsgContainer_span">
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddPaymentFromTransaction.java	Thu Jun 02 00:27:17 2011 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddPaymentFromTransaction.java	Thu Jun 02 10:59:08 2011 +0200
@@ -13,7 +13,7 @@
  * The Initial Developer of the Original Code is Openbravo SLU
  * All portions are Copyright (C) 2010-2011 Openbravo SLU
  * All Rights Reserved.
- * Contributor(s):  ______________________________________.
+ * Contributor(s): Enterprise Intelligence Systems (http://www.eintel.com.au).
  *************************************************************************
  */
 package org.openbravo.advpaymentmngt.ad_actionbutton;
@@ -22,6 +22,7 @@
 import java.io.PrintWriter;
 import java.math.BigDecimal;
 import java.util.ArrayList;
+import java.util.Date;
 import java.util.HashMap;
 import java.util.List;
 
@@ -29,6 +30,8 @@
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
+import org.codehaus.jettison.json.JSONException;
+import org.codehaus.jettison.json.JSONObject;
 import org.hibernate.criterion.Restrictions;
 import org.openbravo.advpaymentmngt.dao.AdvPaymentMngtDao;
 import org.openbravo.advpaymentmngt.process.FIN_AddPayment;
@@ -38,22 +41,27 @@
 import org.openbravo.base.filter.ValueListFilter;
 import org.openbravo.base.secureApp.HttpSecureAppServlet;
 import org.openbravo.base.secureApp.VariablesSecureApp;
+import org.openbravo.base.util.Convert;
 import org.openbravo.dal.core.OBContext;
 import org.openbravo.dal.service.OBCriteria;
 import org.openbravo.dal.service.OBDal;
 import org.openbravo.data.FieldProvider;
+import org.openbravo.erpCommon.dao.CurrencyDao;
 import org.openbravo.erpCommon.utility.ComboTableData;
 import org.openbravo.erpCommon.utility.DateTimeData;
 import org.openbravo.erpCommon.utility.FieldProviderFactory;
 import org.openbravo.erpCommon.utility.OBError;
 import org.openbravo.erpCommon.utility.Utility;
 import org.openbravo.model.common.businesspartner.BusinessPartner;
+import org.openbravo.model.common.currency.ConversionRate;
+import org.openbravo.model.common.currency.Currency;
 import org.openbravo.model.common.enterprise.DocumentType;
 import org.openbravo.model.financialmgmt.payment.FIN_BankStatementLine;
 import org.openbravo.model.financialmgmt.payment.FIN_FinancialAccount;
 import org.openbravo.model.financialmgmt.payment.FIN_Payment;
 import org.openbravo.model.financialmgmt.payment.FIN_PaymentMethod;
 import org.openbravo.model.financialmgmt.payment.FIN_PaymentScheduleDetail;
+import org.openbravo.model.financialmgmt.payment.FinAccPaymentMethod;
 import org.openbravo.service.db.CallStoredProcedure;
 import org.openbravo.xmlEngine.XmlDocument;
 
@@ -73,10 +81,11 @@
           "inpFinFinancialAccountId", IsIDFilter.instance);
       String strFinBankStatementLineId = vars.getStringParameter("inpFinBankStatementLineId", "",
           IsIDFilter.instance);
+      String strCurrencyId = vars.getRequestGlobalVariable("inpCurrencyId", "");
       String strTransactionDate = vars.getStringParameter("inpMainDate", "");
 
       printPage(response, vars, strFinancialAccountId, isReceipt, strFinBankStatementLineId,
-          strTransactionDate);
+          strTransactionDate, strCurrencyId);
 
     } else if (vars.commandIn("GRIDLIST")) {
       final String strBusinessPartnerId = vars.getRequestGlobalVariable("inpcBpartnerId", "");
@@ -87,6 +96,7 @@
       final String strTransDateFrom = vars.getStringParameter("inpTransDateFrom", "");
       final String strTransDateTo = vars.getStringParameter("inpTransDateTo", "");
       final String strDocumentType = vars.getStringParameter("inpDocumentType", "");
+      final String strCurrencyId = vars.getRequestGlobalVariable("inpCurrencyId", "");
       final String strDocumentNo = vars.getStringParameter("inpDocumentNo", "");
       final String strSelectedPaymentDetails = vars.getInStringParameter(
           "inpScheduledPaymentDetailId", IsIDFilter.instance);
@@ -94,13 +104,14 @@
 
       printGrid(response, vars, strFinancialAccountId, strBusinessPartnerId, strDueDateFrom,
           strDueDateTo, strTransDateFrom, strTransDateTo, strDocumentType, strDocumentNo,
-          strSelectedPaymentDetails, isReceipt);
+          strSelectedPaymentDetails, isReceipt, strCurrencyId);
 
     } else if (vars.commandIn("PAYMENTMETHODCOMBO")) {
       final String strBusinessPartnerId = vars.getRequestGlobalVariable("inpcBpartnerId", "");
       final String strFinancialAccountId = vars.getRequiredStringParameter("inpFinancialAccountId",
           IsIDFilter.instance);
-      refreshPaymentMethod(response, strBusinessPartnerId, strFinancialAccountId);
+      boolean isReceipt = "Y".equals(vars.getRequiredStringParameter("isReceipt"));
+      refreshPaymentMethod(response, strBusinessPartnerId, strFinancialAccountId, isReceipt);
 
     } else if (vars.commandIn("LOADCREDIT")) {
       final String strBusinessPartnerId = vars.getRequiredStringParameter("inpcBpartnerId");
@@ -114,6 +125,12 @@
       out.println(customerCredit);
       out.close();
 
+    } else if (vars.commandIn("EXCHANGERATE")) {
+      final String strCurrencyId = vars.getRequestGlobalVariable("inpCurrencyId", "");
+      final String strFinancialAccountCurrencyId = vars.getRequestGlobalVariable(
+          "inpFinancialAccountCurrencyId", "");
+      final String strPaymentDate = vars.getRequestGlobalVariable("inpPaymentDate", "");
+      refreshExchangeRate(response, strCurrencyId, strFinancialAccountCurrencyId, strPaymentDate);
     } else if (vars.commandIn("SAVE") || vars.commandIn("SAVEANDPROCESS")) {
       boolean isReceipt = vars.getRequiredStringParameter("isReceipt").equals("Y");
       String strAction = null;
@@ -139,6 +156,11 @@
       if (strDifferenceAction.equals("refund"))
         refundAmount = new BigDecimal(vars.getRequiredNumericParameter("inpDifference"));
       String strReferenceNo = vars.getStringParameter("inpReferenceNo", "");
+      String paymentCurrencyId = vars.getRequiredStringParameter("inpCurrencyId");
+      BigDecimal exchangeRate = new BigDecimal(vars.getRequiredNumericParameter("inpExchangeRate",
+          "1.0"));
+      BigDecimal convertedAmount = new BigDecimal(vars.getRequiredNumericParameter(
+          "inpActualConverted", strPaymentAmount));
       OBError message = null;
       // FIXME: added to access the FIN_PaymentSchedule and FIN_PaymentScheduleDetail tables to be
       // removed when new security implementation is done
@@ -182,7 +204,8 @@
             .getDate(strPaymentDate), dao.getObject(FIN_FinancialAccount.class,
             strFinancialAccountId).getOrganization(), strReferenceNo, selectedPaymentDetails,
             selectedPaymentDetailAmounts, strDifferenceAction.equals("writeoff"),
-            strDifferenceAction.equals("refund"));
+            strDifferenceAction.equals("refund"), dao.getObject(Currency.class, paymentCurrencyId),
+            exchangeRate, convertedAmount);
 
         if (strAction.equals("PRP") || strAction.equals("PPP") || strAction.equals("PRD")
             || strAction.equals("PPW")) {
@@ -248,7 +271,7 @@
 
   private void printPage(HttpServletResponse response, VariablesSecureApp vars,
       String strFinancialAccountId, boolean isReceipt, String strFinBankStatementLineId,
-      String strTransactionDate) throws IOException, ServletException {
+      String strTransactionDate, String strCurrencyId) throws IOException, ServletException {
     log4j.debug("Output: Add Payment button pressed on Add Transaction popup.");
     dao = new AdvPaymentMngtDao();
     String defaultPaymentMethod = "";
@@ -313,22 +336,71 @@
     xmlDocument.setParameter("documentType", dao.getObject(DocumentType.class, strDocTypeId)
         .getName());
 
+    Currency paymentCurrency;
+    if (strCurrencyId == null || strCurrencyId.isEmpty()) {
+      paymentCurrency = financialAccount.getCurrency();
+    } else {
+      paymentCurrency = dao.getObject(Currency.class, strCurrencyId);
+    }
+
+    xmlDocument.setParameter("currencyId", paymentCurrency.getId());
+    OBContext.setAdminMode();
+    try {
+      ComboTableData comboTableData = new ComboTableData(vars, this, "TABLEDIR", "C_Currency_ID",
+          "", "",
+          Utility.getContext(this, vars, "#AccessibleOrgTree", "AddPaymentFromTransaction"),
+          Utility.getContext(this, vars, "#User_Client", "AddPaymentFromTransaction"), 0);
+      Utility.fillSQLParameters(this, vars, null, comboTableData, "AddPaymentFromTransaction",
+          strCurrencyId);
+      xmlDocument.setData("reportCurrencyId", "liststructure", comboTableData.select(false));
+    } catch (Exception ex) {
+      throw new ServletException(ex);
+    }
+
     xmlDocument.setParameter("financialAccountId", strFinancialAccountId);
     xmlDocument.setParameter("financialAccount", financialAccount.getIdentifier());
-    OBContext.setAdminMode();
-    try {
-      xmlDocument.setParameter("currency", financialAccount.getCurrency().getISOCode());
-      xmlDocument.setParameter("precision", financialAccount.getCurrency().getStandardPrecision()
-          .toString());
-    } finally {
-      OBContext.restorePreviousMode();
+
+    final Currency financialAccountCurrency = dao
+        .getFinancialAccountCurrency(strFinancialAccountId);
+    if (financialAccountCurrency != null) {
+      xmlDocument.setParameter("financialAccountCurrencyId", financialAccountCurrency.getId());
+      xmlDocument.setParameter("financialAccountCurrencyPrecision", financialAccountCurrency
+          .getStandardPrecision().toString());
     }
 
+    String exchangeRate = "1.0";
+    if (financialAccountCurrency != null && !financialAccountCurrency.equals(paymentCurrency)) {
+      exchangeRate = findExchangeRate(paymentCurrency, financialAccountCurrency, new Date());
+    }
+    xmlDocument.setParameter("exchangeRate", exchangeRate);
+
     // Payment Method combobox
     String paymentMethodComboHtml = FIN_Utility.getPaymentMethodList(defaultPaymentMethod,
-        strFinancialAccountId, financialAccount.getOrganization().getId(), true, true);
+        strFinancialAccountId, financialAccount.getOrganization().getId(), true, true, isReceipt);
     xmlDocument.setParameter("sectionDetailPaymentMethod", paymentMethodComboHtml);
 
+    final List<FinAccPaymentMethod> paymentMethods = financialAccount
+        .getFinancialMgmtFinAccPaymentMethodList();
+    JSONObject json = new JSONObject();
+    try {
+      for (FinAccPaymentMethod method : paymentMethods) {
+        if (isReceipt) {
+          json.put(method.getPaymentMethod().getId(), method.isPayinIsMulticurrency());
+        } else {
+          json.put(method.getPaymentMethod().getId(), method.isPayoutIsMulticurrency());
+        }
+      }
+    } catch (JSONException e) {
+      log4j.debug("JSON object error" + json.toString());
+    }
+    StringBuilder sb = new StringBuilder();
+    sb.append("<script language='JavaScript' type='text/javascript'>");
+    sb.append("var paymentMethodMulticurrency = ");
+    sb.append(json.toString());
+    sb.append(";");
+    sb.append("</script>");
+    xmlDocument.setParameter("sectionDetailPaymentMethodMulticurrency", sb.toString());
+
     xmlDocument.setParameter("dateDisplayFormat", vars.getSessionValue("#AD_SqlDateFormat"));
 
     // Action Regarding Document
@@ -355,8 +427,8 @@
   private void printGrid(HttpServletResponse response, VariablesSecureApp vars,
       String strFinancialAccountId, String strBusinessPartnerId, String strDueDateFrom,
       String strDueDateTo, String strTransDateFrom, String strTransDateTo, String strDocumentType,
-      String strDocumentNo, String strSelectedPaymentDetails, boolean isReceipt)
-      throws IOException, ServletException {
+      String strDocumentNo, String strSelectedPaymentDetails, boolean isReceipt,
+      String strCurrencyId) throws IOException, ServletException {
 
     log4j.debug("Output: Grid with pending payments");
 
@@ -379,13 +451,19 @@
     // If business partner and document number are empty search for all filtered scheduled payments
     // list
     if (!"".equals(strBusinessPartnerId) || !"".equals(strDocumentNo)) {
+      Currency paymentCurrency;
+      if (strCurrencyId == null || strCurrencyId.isEmpty()) {
+        paymentCurrency = financialAccount.getCurrency();
+      } else {
+        paymentCurrency = dao.getObject(Currency.class, strCurrencyId);
+      }
+
       filteredScheduledPaymentDetails = dao.getFilteredScheduledPaymentDetails(financialAccount
           .getOrganization(), dao.getObject(BusinessPartner.class, strBusinessPartnerId),
-          financialAccount.getCurrency(), FIN_Utility.getDate(strDueDateFrom), FIN_Utility
-              .getDate(DateTimeData.nDaysAfter(this, strDueDateTo, "1")), FIN_Utility
-              .getDate(strTransDateFrom), FIN_Utility.getDate(DateTimeData.nDaysAfter(this,
-              strTransDateTo, "1")), strDocumentType, strDocumentNo, null,
-          selectedScheduledPaymentDetails, isReceipt);
+          paymentCurrency, FIN_Utility.getDate(strDueDateFrom), FIN_Utility.getDate(DateTimeData
+              .nDaysAfter(this, strDueDateTo, "1")), FIN_Utility.getDate(strTransDateFrom),
+          FIN_Utility.getDate(DateTimeData.nDaysAfter(this, strTransDateTo, "1")), strDocumentType,
+          strDocumentNo, null, selectedScheduledPaymentDetails, isReceipt);
     }
     final FieldProvider[] data = FIN_AddPayment.getShownScheduledPaymentDetails(vars,
         selectedScheduledPaymentDetails, filteredScheduledPaymentDetails, false, null);
@@ -398,7 +476,7 @@
   }
 
   private void refreshPaymentMethod(HttpServletResponse response, String strBusinessPartnerId,
-      String strFinancialAccountId) throws IOException, ServletException {
+      String strFinancialAccountId, boolean isReceipt) throws IOException, ServletException {
     log4j.debug("Callout: Business Partner has changed to" + strBusinessPartnerId);
 
     String paymentMethodComboHtml = "";
@@ -407,7 +485,7 @@
     BusinessPartner bp = OBDal.getInstance().get(BusinessPartner.class, strBusinessPartnerId);
     paymentMethodComboHtml = FIN_Utility.getPaymentMethodList(
         (bp != null && bp.getPaymentMethod() != null) ? bp.getPaymentMethod().getId() : null,
-        strFinancialAccountId, account.getOrganization().getId(), true, true);
+        strFinancialAccountId, account.getOrganization().getId(), true, true, isReceipt);
 
     response.setContentType("text/html; charset=UTF-8");
     PrintWriter out = response.getWriter();
@@ -450,6 +528,48 @@
     return currentBPId != null ? OBDal.getInstance().get(BusinessPartner.class, currentBPId) : null;
   }
 
+  private void refreshExchangeRate(HttpServletResponse response, String strCurrencyId,
+      String strFinancialAccountCurrencyId, String strPaymentDate) throws IOException,
+      ServletException {
+
+    AdvPaymentMngtDao dao = new AdvPaymentMngtDao();
+
+    final Currency financialAccountCurrency = dao.getObject(Currency.class,
+        strFinancialAccountCurrencyId);
+    final Currency paymentCurrency = dao.getObject(Currency.class, strCurrencyId);
+
+    String exchangeRate = findExchangeRate(paymentCurrency, financialAccountCurrency, FIN_Utility
+        .getDate(strPaymentDate));
+
+    JSONObject msg = new JSONObject();
+    try {
+      msg.put("exchangeRate", exchangeRate);
+    } catch (JSONException e) {
+      log4j.debug("JSON object error" + msg.toString());
+    }
+    response.setContentType("application/json; charset=UTF-8");
+    PrintWriter out = response.getWriter();
+    out.println(msg.toString());
+    out.close();
+  }
+
+  private String findExchangeRate(Currency paymentCurrency, Currency financialAccountCurrency,
+      Date paymentDate) {
+    String exchangeRate = "1.0";
+    if (!financialAccountCurrency.equals(paymentCurrency)) {
+      final CurrencyDao currencyDao = new CurrencyDao();
+      final ConversionRate conversionRate = currencyDao.getConversionRate(paymentCurrency,
+          financialAccountCurrency, paymentDate);
+      if (conversionRate != null) {
+        exchangeRate = Convert.toStringWithPrecision(conversionRate.getMultipleRateBy(),
+            CurrencyDao.CONVERSION_RATE_PRECISION);
+      } else {
+        exchangeRate = "";
+      }
+    }
+    return exchangeRate;
+  }
+
   private FieldProvider[] set() throws ServletException {
     HashMap<String, String> empty = new HashMap<String, String>();
     empty.put("finScheduledPaymentId", "");
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddPaymentFromTransaction.xml	Thu Jun 02 00:27:17 2011 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddPaymentFromTransaction.xml	Thu Jun 02 10:59:08 2011 +0200
@@ -14,7 +14,7 @@
  * The Initial Developer of the Original Code is Openbravo SLU
  * All portions are Copyright (C) 2010-2011 Openbravo SLU
  * All Rights Reserved.
- * Contributor(s):  ______________________________________.
+ * Contributor(s):  Enterprise Intelligence Systems (http://www.eintel.com.au).
  *************************************************************************
 -->
 <REPORT>
@@ -32,15 +32,19 @@
     <PARAMETER id="paramDocType" name="documentType" attribute="value"/>
     <PARAMETER id="paramFinancialAccountId" name="financialAccountId" attribute="value"/>
     <PARAMETER id="paramFinancialAccount" name="financialAccount" attribute="value"/>
-    <PARAMETER id="paramCurrency" name="currency" attribute="value"/>
+    <PARAMETER id="paramCurrencyId" name="currencyId" attribute="value"/>
     <PARAMETER id="paramPaymentMethod" name="paymentMethod" attribute="value"/>
     <PARAMETER id="paramExpectedPayment" name="expectedPayment" attribute="value" format="euroEdition"/>
     <PARAMETER id="paramActualPayment" name="actualPayment" attribute="value" format="euroEdition" default="0"/>
+    <PARAMETER id="paramFinancialAccountCurrencyId" name="financialAccountCurrencyId" attribute="value"/>
+    <PARAMETER id="paramFinancialAccountCurrencyPrecision" name="financialAccountCurrencyPrecision" attribute="value"/>
+    <PARAMETER id="paramExchangeRate" name="exchangeRate" attribute="value" format="generalQtyEdition"/>
+    <PARAMETER id="paramExpectedConverted" name="expectedConverted" attribute="value" format="euroEdition"/>
+    <PARAMETER id="paramActualConverted" name="actualConverted" attribute="value" format="euroEdition" default="0"/>
     <PARAMETER id="C_Bpartner_ID" name="businessPartner" attribute="value"/>
     <PARAMETER id="paramCredit" name="credit" attribute="value" format="euroEdition"/>
     <PARAMETER id="fieldReceipt" name="isReceipt" attribute="value"/>
     <PARAMETER id="fieldIsSoTrx" name="isSoTrx" attribute="value"/>
-    <PARAMETER id="paramPrecision" name="precision" attribute="value"/>
     <PARAMETER id="paramFinBankStatementLineId" name="finBankStatementLineId" attribute="value" default=""/>
     <PARAMETER id="fieldOrg" name="orgId" attribute="value"/>
     <PARAMETER id="paramInheritedActualPayment" name="inheritedActualPayment" attribute="value"/>
@@ -62,6 +66,12 @@
     <PARAMETER id="paramTransDateTo" name="dateDisplayFormat" attribute="saveformat" replace="yy"/>
     
     <PARAMETER id="sectionDetailPaymentMethod" name="sectionDetailPaymentMethod"/>
+    <PARAMETER id="sectionDetailPaymentMethodMulticurrency" name="sectionDetailPaymentMethodMulticurrency"/>
+
+    <PARAMETER id="paramCurrencyId" name="currencyId" attribute="onchange" replace="xx"/>
+    <SUBREPORT id="reportCurrencyId" name="reportCurrencyId" report="org/openbravo/erpCommon/reference/List">
+      <ARGUMENT name="parameterListSelected" withId="paramCurrencyId"/>
+    </SUBREPORT>
     
     <PARAMETER id="paramActionDocument" name="ActionDocument" attribute="value"/>
     <SUBREPORT id="reportActionDocument" name="reportActionDocument" report="org/openbravo/erpCommon/reference/List">
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddTransaction.java	Thu Jun 02 00:27:17 2011 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddTransaction.java	Thu Jun 02 10:59:08 2011 +0200
@@ -140,31 +140,22 @@
             selectedPaymentIds);
 
         for (FIN_Payment p : selectedPayments) {
-          BigDecimal depositAmt = BigDecimal.ZERO;
-          BigDecimal paymentAmt = BigDecimal.ZERO;
+          BigDecimal depositAmt = FIN_Utility.getDepositAmount(p.isReceipt(), p
+              .getFinancialTransactionAmount());
+          BigDecimal paymentAmt = FIN_Utility.getPaymentAmount(p.isReceipt(), p
+              .getFinancialTransactionAmount());
 
-          if (p.isReceipt()) {
-            if (p.getAmount().compareTo(BigDecimal.ZERO) == -1)
-              paymentAmt = p.getAmount().abs();
-            else
-              depositAmt = p.getAmount();
-          } else {
-            if (p.getAmount().compareTo(BigDecimal.ZERO) == -1)
-              depositAmt = p.getAmount().abs();
-            else
-              paymentAmt = p.getAmount();
-          }
           String description = null;
           if (p.getDescription() != null) {
             description = p.getDescription().replace("\n", ". ");
           }
 
           FIN_FinaccTransaction finTrans = dao.getNewFinancialTransaction(p.getOrganization(), p
-              .getCurrency(), p.getAccount(), TransactionsDao.getTransactionMaxLineNo(p
-              .getAccount()) + 10, p, description, FIN_Utility.getDate(strTransactionDate), null, p
-              .isReceipt() ? "RDNC" : "PWNC", depositAmt, paymentAmt, null, null, null, p
-              .isReceipt() ? "BPD" : "BPW", FIN_Utility.getDate(strTransactionDate));
-
+              .getAccount(), TransactionsDao.getTransactionMaxLineNo(p.getAccount()) + 10, p,
+              description, FIN_Utility.getDate(strTransactionDate), null, p.isReceipt() ? "RDNC"
+                  : "PWNC", depositAmt, paymentAmt, null, null, null,
+              p.isReceipt() ? "BPD" : "BPW", FIN_Utility.getDate(strTransactionDate), p
+                  .getCurrency(), p.getFinancialTransactionConvertRate(), p.getAmount());
           TransactionsDao.process(finTrans);
           if (!"".equals(strFinBankStatementLineId)) {
             matchBankStatementLine(vars, finTrans, strFinBankStatementLineId);
@@ -189,10 +180,10 @@
 
         // Currency, Organization, paymentDate,
         FIN_FinaccTransaction finTrans = dao.getNewFinancialTransaction(account.getOrganization(),
-            account.getCurrency(), account, TransactionsDao.getTransactionMaxLineNo(account) + 10,
-            null, description, FIN_Utility.getDate(strTransactionDate), glItem, isReceipt ? "RDNC"
-                : "PWNC", glItemDepositAmt, glItemPaymentAmt, null, null, null, isReceipt ? "BPD"
-                : "BPW", FIN_Utility.getDate(strTransactionDate));
+            account, TransactionsDao.getTransactionMaxLineNo(account) + 10, null, description,
+            FIN_Utility.getDate(strTransactionDate), glItem, isReceipt ? "RDNC" : "PWNC",
+            glItemDepositAmt, glItemPaymentAmt, null, null, null, isReceipt ? "BPD" : "BPW",
+            FIN_Utility.getDate(strTransactionDate), null, null, null);
 
         TransactionsDao.process(finTrans);
         strMessage = "1 " + "@RowsInserted@";
@@ -210,10 +201,10 @@
             vars.getLanguage()) : strFeeDescription;
 
         FIN_FinaccTransaction finTrans = dao.getNewFinancialTransaction(account.getOrganization(),
-            account.getCurrency(), account, TransactionsDao.getTransactionMaxLineNo(account) + 10,
-            null, description, FIN_Utility.getDate(strTransactionDate), null, isReceipt ? "RDNC"
-                : "PWNC", feeDepositAmt, feePaymentAmt, null, null, null, "BF", FIN_Utility
-                .getDate(strTransactionDate));
+            account, TransactionsDao.getTransactionMaxLineNo(account) + 10, null, description,
+            FIN_Utility.getDate(strTransactionDate), null, isReceipt ? "RDNC" : "PWNC",
+            feeDepositAmt, feePaymentAmt, null, null, null, "BF", FIN_Utility
+                .getDate(strTransactionDate), null, null, null);
 
         TransactionsDao.process(finTrans);
         strMessage = "1 " + "@RowsInserted@";
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddTransactionGrid.xml	Thu Jun 02 00:27:17 2011 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddTransactionGrid.xml	Thu Jun 02 10:59:08 2011 +0200
@@ -30,8 +30,8 @@
     <FIELD id="fieldDescription">paymentDescriptionTrunc</FIELD>
     <FIELD id="fieldDescription" attribute="title" replace="zz">paymentDescription</FIELD>
     <FIELD id="fieldDate">paymentDate</FIELD>
-    <FIELD id="fieldDepositAmount" format="euroEdition">depositAmount</FIELD>
-    <FIELD id="fieldPaymentAmount" format="euroEdition">paymentAmount</FIELD>
+    <FIELD id="fieldDepositAmount">depositAmount</FIELD>
+    <FIELD id="fieldPaymentAmount">paymentAmount</FIELD>
 
     <SECTION id="sectionLinesDetail"/>
   </structure>
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_forms/BatchPaymentExecution.java	Thu Jun 02 00:27:17 2011 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_forms/BatchPaymentExecution.java	Thu Jun 02 10:59:08 2011 +0200
@@ -110,15 +110,19 @@
     } else if (vars.commandIn("CALLOUTPAYMENTMETHOD")) {
       String strPaymentMethodId = vars.getRequestGlobalVariable("inpPaymentMethod", "");
       String strOrgId = vars.getRequestGlobalVariable("inpOrgId", "");
-      reloadPaymentMethodCombo(response, strPaymentMethodId, "", strOrgId);
+      boolean isReceipt = "Y".equals(vars.getGlobalVariable("inpIsReceipt",
+          "BatchPaymentExecution|IsReceipt", ""));
+      reloadPaymentMethodCombo(response, strPaymentMethodId, "", strOrgId, isReceipt);
 
     } else if (vars.commandIn("CALLOUTFINANCIALACCOUNT")) {
       String strFinancialAccountId = vars.getRequestGlobalVariable("inpFinancialAccount", "");
       String strPaymentMethodId = vars.getRequiredStringParameter("inpPaymentMethod");
       String strOrgId = vars.getRequestGlobalVariable("inpOrgId", "");
       String strCurrencyId = vars.getRequestGlobalVariable("inpCurrencyId", "");
+      boolean isReceipt = "Y".equals(vars.getGlobalVariable("inpIsReceipt",
+          "BatchPaymentExecution|IsReceipt", ""));
       reloadFinancialAccountCombo(response, strPaymentMethodId, strFinancialAccountId, strOrgId,
-          strCurrencyId);
+          strCurrencyId, isReceipt);
 
     } else
       pageError(response);
@@ -188,14 +192,15 @@
     xmlDocument.setParameter("grid_Default", "0");
 
     // Payment Method combobox
+    final boolean isReceipt = "Y".equals(strIsReceipt);
     String paymentMethodComboHtml = FIN_Utility.getPaymentMethodList(strPaymentMethodId, "",
-        newOrg, true, true);
+        newOrg, true, true, isReceipt);
     xmlDocument.setParameter("sectionDetailPaymentMethod", paymentMethodComboHtml);
 
     // Financial Account combobox
     // Currency - not filtered
     String finAccountComboHtml = FIN_Utility.getFinancialAccountList(strPaymentMethodId,
-        strFinancialAccountId, newOrg, true, "");
+        strFinancialAccountId, newOrg, true, "", isReceipt);
     xmlDocument.setParameter("sectionDetailFinancialAccount", finAccountComboHtml);
 
     OBError myMessage = vars.getMessage(adFormId);
@@ -438,11 +443,12 @@
   }
 
   private void reloadPaymentMethodCombo(HttpServletResponse response, String srtPaymentMethod,
-      String strFinancialAccountId, String strOrgId) throws IOException, ServletException {
+      String strFinancialAccountId, String strOrgId, boolean isReceipt) throws IOException,
+      ServletException {
     log4j.debug("Callout: Financial Account has changed to");
 
     String paymentMethodComboHtml = FIN_Utility.getPaymentMethodList(srtPaymentMethod,
-        strFinancialAccountId, strOrgId, true, true);
+        strFinancialAccountId, strOrgId, true, true, isReceipt);
 
     response.setContentType("text/html; charset=UTF-8");
     PrintWriter out = response.getWriter();
@@ -452,12 +458,12 @@
   }
 
   private void reloadFinancialAccountCombo(HttpServletResponse response, String strPaymentMethodId,
-      String strFinancialAccountId, String strOrgId, String strCurrencyId) throws IOException,
-      ServletException {
+      String strFinancialAccountId, String strOrgId, String strCurrencyId, boolean isReceipt)
+      throws IOException, ServletException {
     log4j.debug("Callout: Payment Method has changed to " + strPaymentMethodId);
 
     String finAccountComboHtml = FIN_Utility.getFinancialAccountList(strPaymentMethodId,
-        strFinancialAccountId, strOrgId, true, strCurrencyId);
+        strFinancialAccountId, strOrgId, true, strCurrencyId, isReceipt);
 
     response.setContentType("text/html; charset=UTF-8");
     PrintWriter out = response.getWriter();
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_forms/Transactions.java	Thu Jun 02 00:27:17 2011 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_forms/Transactions.java	Thu Jun 02 10:59:08 2011 +0200
@@ -32,6 +32,7 @@
 import org.openbravo.advpaymentmngt.dao.AdvPaymentMngtDao;
 import org.openbravo.advpaymentmngt.dao.TransactionsDao;
 import org.openbravo.advpaymentmngt.process.FIN_TransactionProcess;
+import org.openbravo.advpaymentmngt.utility.FIN_Utility;
 import org.openbravo.base.exception.OBException;
 import org.openbravo.base.filter.RequestFilter;
 import org.openbravo.base.filter.ValueListFilter;
@@ -520,12 +521,18 @@
                 columnData = finaccTrx.getDescription();
               break;
             case 4: // receivedamount
-              if (finaccTrx.getPaymentAmount() != null)
-                columnData = finaccTrx.getDepositAmount().toString();
+              if (finaccTrx.getDepositAmount() != null) {
+                columnData = FIN_Utility.multiCurrencyAmountToDisplay(
+                    finaccTrx.getDepositAmount(), finaccTrx.getCurrency(),
+                    finaccTrx.getForeignAmount(), finaccTrx.getForeignCurrency());
+              }
               break;
             case 5: // paidamount
-              if (finaccTrx.getDepositAmount() != null)
-                columnData = finaccTrx.getPaymentAmount().toString();
+              if (finaccTrx.getPaymentAmount() != null) {
+                columnData = FIN_Utility.multiCurrencyAmountToDisplay(
+                    finaccTrx.getPaymentAmount(), finaccTrx.getCurrency(),
+                    finaccTrx.getForeignAmount(), finaccTrx.getForeignCurrency());
+              }
               break;
             case 6: // cleared
               columnData = Utility.messageBD(myPool, ((finaccTrx.getStatus().equals("RPPC")) ? "Y"
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/dao/AdvPaymentMngtDao.java	Thu Jun 02 00:27:17 2011 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/dao/AdvPaymentMngtDao.java	Thu Jun 02 10:59:08 2011 +0200
@@ -13,13 +13,14 @@
  * The Initial Developer of the Original Code is Openbravo SLU
  * All portions are Copyright (C) 2010-2011 Openbravo SLU
  * All Rights Reserved.
- * Contributor(s):  ______________________________________.
+ * Contributor(s):  Enterprise Intelligence Systems (http://www.eintel.com.au).
  *************************************************************************
  */
 
 package org.openbravo.advpaymentmngt.dao;
 
 import java.math.BigDecimal;
+import java.math.MathContext;
 import java.text.SimpleDateFormat;
 import java.util.ArrayList;
 import java.util.Date;
@@ -27,7 +28,10 @@
 
 import org.apache.commons.lang.StringUtils;
 import org.hibernate.criterion.Criterion;
+import org.hibernate.criterion.DetachedCriteria;
+import org.hibernate.criterion.Projections;
 import org.hibernate.criterion.Restrictions;
+import org.hibernate.criterion.Subqueries;
 import org.openbravo.advpaymentmngt.APRMPendingPaymentFromInvoice;
 import org.openbravo.advpaymentmngt.utility.FIN_Utility;
 import org.openbravo.advpaymentmngt.utility.Value;
@@ -76,6 +80,10 @@
 
 public class AdvPaymentMngtDao {
 
+  public enum PaymentDirection {
+    IN, OUT, EITHER
+  }
+
   public AdvPaymentMngtDao() {
   }
 
@@ -361,10 +369,20 @@
     }
   }
 
+  @Deprecated
   public FIN_Payment getNewPayment(boolean isReceipt, Organization organization,
       DocumentType docType, String strPaymentDocumentNo, BusinessPartner businessPartner,
       FIN_PaymentMethod paymentMethod, FIN_FinancialAccount finAccount, String strPaymentAmount,
       Date paymentDate, String referenceNo) {
+    return getNewPayment(isReceipt, organization, docType, strPaymentDocumentNo, businessPartner,
+        paymentMethod, finAccount, strPaymentAmount, paymentDate, referenceNo, null, null, null);
+  }
+
+  public FIN_Payment getNewPayment(boolean isReceipt, Organization organization,
+      DocumentType docType, String strPaymentDocumentNo, BusinessPartner businessPartner,
+      FIN_PaymentMethod paymentMethod, FIN_FinancialAccount finAccount, String strPaymentAmount,
+      Date paymentDate, String referenceNo, Currency paymentCurrency, BigDecimal finTxnConvertRate,
+      BigDecimal finTxnAmount) {
     final FIN_Payment newPayment = OBProvider.getInstance().get(FIN_Payment.class);
     newPayment.setReceipt(isReceipt);
     newPayment.setDocumentType(docType);
@@ -375,10 +393,27 @@
     newPayment.setBusinessPartner(businessPartner);
     newPayment.setPaymentMethod(paymentMethod);
     newPayment.setAccount(finAccount);
-    newPayment.setAmount(new BigDecimal(strPaymentAmount));
+    final BigDecimal paymentAmount = new BigDecimal(strPaymentAmount);
+    newPayment.setAmount(paymentAmount);
     newPayment.setPaymentDate(paymentDate);
-    newPayment.setCurrency(finAccount.getCurrency());
+    if (paymentCurrency != null) {
+      newPayment.setCurrency(paymentCurrency);
+    } else {
+      newPayment.setCurrency(finAccount.getCurrency());
+    }
     newPayment.setReferenceNo(referenceNo);
+    if (finTxnConvertRate == null || finTxnConvertRate.compareTo(BigDecimal.ZERO) <= 0) {
+      finTxnConvertRate = BigDecimal.ONE;
+    }
+    if (finTxnAmount == null || finTxnAmount.compareTo(BigDecimal.ZERO) == 0) {
+      finTxnAmount = paymentAmount.multiply(finTxnConvertRate);
+    } else if (paymentAmount != null && paymentAmount.compareTo(BigDecimal.ZERO) != 0) {
+      // Correct exchange rate for rounding that occurs in UI
+      finTxnConvertRate = finTxnAmount.divide(paymentAmount, MathContext.DECIMAL64);
+    }
+
+    newPayment.setFinancialTransactionConvertRate(finTxnConvertRate);
+    newPayment.setFinancialTransactionAmount(finTxnAmount);
 
     OBDal.getInstance().save(newPayment);
     OBDal.getInstance().flush();
@@ -466,25 +501,40 @@
     FIN_FinaccTransaction transaction = FIN_Utility.getOneInstance(FIN_FinaccTransaction.class,
         new Value(FIN_FinaccTransaction.PROPERTY_FINPAYMENT, payment));
     if (transaction == null) {
-      transaction = getNewFinancialTransaction(payment.getOrganization(), payment.getCurrency(),
-          payment.getAccount(), TransactionsDao.getTransactionMaxLineNo(payment.getAccount()) + 10,
-          payment, payment.getDescription(), payment.getPaymentDate(), null, "RPPC", payment
-              .isReceipt() ? payment.getAmount() : BigDecimal.ZERO, !payment.isReceipt() ? payment
-              .getAmount() : BigDecimal.ZERO, payment.getProject(), payment.getSalesCampaign(),
-          payment.getActivity(), payment.isReceipt() ? "BPD" : "BPW", payment.getPaymentDate());
+      transaction = getNewFinancialTransaction(payment.getOrganization(), payment.getAccount(),
+          TransactionsDao.getTransactionMaxLineNo(payment.getAccount()) + 10, payment, payment
+              .getDescription(), payment.getPaymentDate(), null, "RPPC", FIN_Utility
+              .getDepositAmount(payment.isReceipt(), payment.getFinancialTransactionAmount()),
+          FIN_Utility
+              .getPaymentAmount(payment.isReceipt(), payment.getFinancialTransactionAmount()),
+          payment.getProject(), payment.getSalesCampaign(), payment.getActivity(), payment
+              .isReceipt() ? "BPD" : "BPW", payment.getPaymentDate(), payment.getCurrency(),
+          payment.getFinancialTransactionConvertRate(), payment.getAmount());
     }
     return transaction;
   }
 
+  @Deprecated
   public FIN_FinaccTransaction getNewFinancialTransaction(Organization organization,
       Currency currency, FIN_FinancialAccount account, Long line, FIN_Payment payment,
       String description, Date accountingDate, GLItem glItem, String status,
       BigDecimal depositAmount, BigDecimal paymentAmount, Project project, Campaign campaing,
       ABCActivity activity, String transactionType, Date statementDate) {
+    return getNewFinancialTransaction(organization, account, line, payment, description,
+        accountingDate, glItem, status, depositAmount, paymentAmount, project, campaing, activity,
+        transactionType, statementDate, null, null, null);
+  }
+
+  public FIN_FinaccTransaction getNewFinancialTransaction(Organization organization,
+      FIN_FinancialAccount account, Long line, FIN_Payment payment, String description,
+      Date accountingDate, GLItem glItem, String status, BigDecimal depositAmount,
+      BigDecimal paymentAmount, Project project, Campaign campaing, ABCActivity activity,
+      String transactionType, Date statementDate, Currency paymentCurrency, BigDecimal convertRate,
+      BigDecimal sourceAmount) {
     FIN_FinaccTransaction finTrans = OBProvider.getInstance().get(FIN_FinaccTransaction.class);
     finTrans.setActive(true);
     finTrans.setOrganization(organization);
-    finTrans.setCurrency(currency);
+    finTrans.setCurrency(account.getCurrency());
     finTrans.setAccount(account);
     finTrans.setLineNo(line);
     finTrans.setFinPayment(payment);
@@ -504,6 +554,11 @@
     finTrans.setActivity(activity);
     finTrans.setTransactionType(transactionType);
     finTrans.setTransactionDate(statementDate);
+    if (paymentCurrency != null && !paymentCurrency.equals(finTrans.getCurrency())) {
+      finTrans.setForeignCurrency(paymentCurrency);
+      finTrans.setForeignConversionRate(convertRate);
+      finTrans.setForeignAmount(sourceAmount);
+    }
 
     OBDal.getInstance().save(finTrans);
     OBDal.getInstance().flush();
@@ -834,20 +889,18 @@
       FieldProvider[] data = FieldProviderFactory.getFieldProviderArray(paymentOBList);
 
       for (int i = 0; i < data.length; i++) {
-        BigDecimal depositAmt = BigDecimal.ZERO;
-        BigDecimal paymentAmt = BigDecimal.ZERO;
+        Boolean paymentIsReceipt = FIN_Payments[i].isReceipt();
 
-        if (FIN_Payments[i].isReceipt()) {
-          if (FIN_Payments[i].getAmount().compareTo(BigDecimal.ZERO) == -1)
-            paymentAmt = FIN_Payments[i].getAmount().abs();
-          else
-            depositAmt = FIN_Payments[i].getAmount();
-        } else {
-          if (FIN_Payments[i].getAmount().compareTo(BigDecimal.ZERO) == -1)
-            depositAmt = FIN_Payments[i].getAmount().abs();
-          else
-            paymentAmt = FIN_Payments[i].getAmount();
-        }
+        BigDecimal depositAmt = FIN_Utility.getDepositAmount(paymentIsReceipt, FIN_Payments[i]
+            .getFinancialTransactionAmount());
+        BigDecimal paymentAmt = FIN_Utility.getPaymentAmount(paymentIsReceipt, FIN_Payments[i]
+            .getFinancialTransactionAmount());
+        BigDecimal foreignDepositAmt = FIN_Utility.getDepositAmount(paymentIsReceipt,
+            FIN_Payments[i].getAmount());
+        BigDecimal foreignPaymentAmt = FIN_Utility.getPaymentAmount(paymentIsReceipt,
+            FIN_Payments[i].getAmount());
+
+        final Currency foreignCurrency = FIN_Payments[i].getCurrency();
 
         FieldProviderFactory.setField(data[i], "paymentId", FIN_Payments[i].getId());
         FieldProviderFactory.setField(data[i], "paymentInfo", FIN_Payments[i].getDocumentNo()
@@ -869,8 +922,13 @@
 
         FieldProviderFactory.setField(data[i], "paymentDate", dateFormater.format(
             FIN_Payments[i].getPaymentDate()).toString());
-        FieldProviderFactory.setField(data[i], "depositAmount", depositAmt.toString());
-        FieldProviderFactory.setField(data[i], "paymentAmount", paymentAmt.toString());
+        FieldProviderFactory.setField(data[i], "depositAmount", FIN_Utility
+            .multiCurrencyAmountToDisplay(depositAmt, account.getCurrency(), foreignDepositAmt,
+                foreignCurrency));
+        FieldProviderFactory.setField(data[i], "paymentAmount", FIN_Utility
+            .multiCurrencyAmountToDisplay(paymentAmt, account.getCurrency(), foreignPaymentAmt,
+                foreignCurrency));
+
         FieldProviderFactory.setField(data[i], "rownum", "" + i);
       }
 
@@ -893,8 +951,15 @@
     return amount;
   }
 
+  @Deprecated
   public List<FIN_PaymentMethod> getFilteredPaymentMethods(String strFinancialAccountId,
       String strOrgId, boolean excludePaymentMethodWithoutAccount) {
+    return getFilteredPaymentMethods(strFinancialAccountId, strOrgId,
+        excludePaymentMethodWithoutAccount, PaymentDirection.EITHER);
+  }
+
+  public List<FIN_PaymentMethod> getFilteredPaymentMethods(String strFinancialAccountId,
+      String strOrgId, boolean excludePaymentMethodWithoutAccount, PaymentDirection paymentDirection) {
     final OBCriteria<FIN_PaymentMethod> obc = OBDal.getInstance().createCriteria(
         FIN_PaymentMethod.class);
     obc.add(Restrictions.in("organization.id", OBContext.getOBContext()
@@ -905,7 +970,14 @@
     if (strFinancialAccountId != null && !strFinancialAccountId.isEmpty()) {
       for (FinAccPaymentMethod finAccPayMethod : getObject(FIN_FinancialAccount.class,
           strFinancialAccountId).getFinancialMgmtFinAccPaymentMethodList()) {
-        payMethods.add(finAccPayMethod.getPaymentMethod().getId());
+        if (paymentDirection == PaymentDirection.EITHER) {
+          payMethods.add(finAccPayMethod.getPaymentMethod().getId());
+        } else if (paymentDirection == PaymentDirection.IN && finAccPayMethod.isPayinAllow()) {
+          payMethods.add(finAccPayMethod.getPaymentMethod().getId());
+        } else if (paymentDirection == PaymentDirection.OUT && finAccPayMethod.isPayoutAllow()) {
+          payMethods.add(finAccPayMethod.getPaymentMethod().getId());
+        }
+        // else not valid for this type of payment
       }
       if (payMethods.isEmpty()) {
         return (new ArrayList<FIN_PaymentMethod>());
@@ -928,22 +1000,47 @@
         }
         obc.add(Restrictions.in("id", payMethods));
       }
+      if (paymentDirection == PaymentDirection.IN) {
+        obc.add(Restrictions.eq(FIN_PaymentMethod.PROPERTY_PAYINALLOW, true));
+      } else if (paymentDirection == PaymentDirection.OUT) {
+        obc.add(Restrictions.eq(FIN_PaymentMethod.PROPERTY_PAYINALLOW, true));
+      }
     }
 
     return obc.list();
   }
 
+  @Deprecated
   public List<FIN_FinancialAccount> getFilteredFinancialAccounts(String strPaymentMethodId,
       String strOrgId, String strCurrencyId) {
+    return getFilteredFinancialAccounts(strPaymentMethodId, strOrgId, strCurrencyId,
+        PaymentDirection.EITHER);
+  }
+
+  public List<FIN_FinancialAccount> getFilteredFinancialAccounts(String strPaymentMethodId,
+      String strOrgId, String strCurrencyId, PaymentDirection paymentDirection) {
     final OBCriteria<FIN_FinancialAccount> obc = OBDal.getInstance().createCriteria(
-        FIN_FinancialAccount.class);
+        FIN_FinancialAccount.class, "acc");
     obc.add(Restrictions.in("organization.id", OBContext.getOBContext()
         .getOrganizationStructureProvider().getNaturalTree(strOrgId)));
     obc.setFilterOnReadableOrganization(false);
 
+    Currency requiredCurrency = null;
     if (strCurrencyId != null && !strCurrencyId.isEmpty()) {
-      obc.add(Restrictions.eq(FIN_FinancialAccount.PROPERTY_CURRENCY, OBDal.getInstance().get(
-          Currency.class, strCurrencyId)));
+      DetachedCriteria multiCurrAllowed = DetachedCriteria.forEntityName(
+          FinAccPaymentMethod.ENTITY_NAME, "fapm").add(
+          Restrictions.eqProperty(FinAccPaymentMethod.PROPERTY_ACCOUNT + ".id", "acc.id"));
+      if (paymentDirection == PaymentDirection.IN || paymentDirection == PaymentDirection.EITHER) {
+        multiCurrAllowed.add(Restrictions.eq(FinAccPaymentMethod.PROPERTY_PAYINISMULTICURRENCY,
+            true));
+      }
+      if (paymentDirection == PaymentDirection.OUT || paymentDirection == PaymentDirection.EITHER) {
+        multiCurrAllowed.add(Restrictions.eq(FinAccPaymentMethod.PROPERTY_PAYOUTISMULTICURRENCY,
+            true));
+      }
+      requiredCurrency = OBDal.getInstance().get(Currency.class, strCurrencyId);
+      obc.add(Restrictions.or(Restrictions.eq(FIN_FinancialAccount.PROPERTY_CURRENCY,
+          requiredCurrency), Subqueries.exists(multiCurrAllowed.setProjection(Projections.id()))));
     }
 
     if (strPaymentMethodId != null && !strPaymentMethodId.isEmpty()) {
@@ -956,7 +1053,33 @@
       ExpressionForFinAccPayMethod exp = new ExpressionForFinAccPayMethod();
 
       for (FinAccPaymentMethod finAccPayMethod : finAccsMethods) {
-        exp.addFinAccPaymentMethod(finAccPayMethod);
+        boolean validPaymentDirection = true;
+        if (paymentDirection == PaymentDirection.IN) {
+          validPaymentDirection = finAccPayMethod.isPayinAllow();
+        } else if (paymentDirection == PaymentDirection.OUT) {
+          validPaymentDirection = finAccPayMethod.isPayoutAllow();
+        }
+
+        boolean validCurrency = true;
+        if (requiredCurrency != null) {
+          boolean multiCurrencyAllowed = false;
+          if (paymentDirection == PaymentDirection.IN) {
+            multiCurrencyAllowed = finAccPayMethod.isPayinIsMulticurrency();
+          } else if (paymentDirection == PaymentDirection.OUT) {
+            multiCurrencyAllowed = finAccPayMethod.isPayoutIsMulticurrency();
+          } else if (paymentDirection == PaymentDirection.EITHER) {
+            multiCurrencyAllowed = finAccPayMethod.isPayinIsMulticurrency()
+                || finAccPayMethod.isPayoutIsMulticurrency();
+          }
+
+          validCurrency = multiCurrencyAllowed
+              || requiredCurrency.equals(finAccPayMethod.getAccount().getCurrency());
+        }
+
+        if (validPaymentDirection && validCurrency) {
+          exp.addFinAccPaymentMethod(finAccPayMethod);
+        }
+
       }
 
       obc.add(exp.getCriterion()); // compoundexp will be always != null because
@@ -1249,6 +1372,32 @@
     return obcPayment.list();
   }
 
+  public Currency getFinancialAccountCurrency(String strFinancialAccountId) {
+    if (strFinancialAccountId != null && !strFinancialAccountId.isEmpty()) {
+      final FIN_FinancialAccount account = OBDal.getInstance().get(FIN_FinancialAccount.class,
+          strFinancialAccountId);
+      return account.getCurrency();
+    }
+    return null;
+  }
+
+  public FIN_FinancialAccount getDefaultFinancialAccountFor(String strOrgId) {
+    final OBCriteria<FIN_FinancialAccount> obc = OBDal.getInstance().createCriteria(
+        FIN_FinancialAccount.class, "acc");
+    obc.add(Restrictions.in("organization.id", OBContext.getOBContext()
+        .getOrganizationStructureProvider().getNaturalTree(strOrgId)));
+    obc.setFilterOnReadableOrganization(false);
+
+    obc.add(Restrictions.eq(FIN_FinancialAccount.PROPERTY_DEFAULT, true));
+
+    final List<FIN_FinancialAccount> defaultAccounts = obc.list();
+    if (defaultAccounts.size() > 0) {
+      return defaultAccounts.get(0);
+    } else {
+      return null;
+    }
+  }
+
   public boolean existsAPRMReadyPreference() {
     OBCriteria<Preference> obcPreference = OBDal.getInstance().createCriteria(Preference.class);
     obcPreference.setFilterOnReadableClients(false);
@@ -1274,5 +1423,4 @@
     OBDal.getInstance().save(newPref);
     OBDal.getInstance().flush();
   }
-
 }
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/dao/TransactionsDao.java	Thu Jun 02 00:27:17 2011 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/dao/TransactionsDao.java	Thu Jun 02 10:59:08 2011 +0200
@@ -101,19 +101,24 @@
       newTransaction.setTransactionDate(payment.getPaymentDate());
       newTransaction.setActivity(payment.getActivity());
       newTransaction.setProject(payment.getProject());
-      newTransaction.setCurrency(payment.getCurrency());
+      newTransaction.setCurrency(payment.getAccount().getCurrency());
       newTransaction.setDescription(payment.getDescription().replace("\n", ". ").substring(0,
           payment.getDescription().length() > 254 ? 254 : payment.getDescription().length()));
       newTransaction.setClient(payment.getClient());
       newTransaction.setLineNo(getTransactionMaxLineNo(payment.getAccount()) + 10);
       newTransaction
           .setDepositAmount(payment.getDocumentType().getDocumentCategory().equals("ARR") ? payment
-              .getAmount() : BigDecimal.ZERO);
+              .getFinancialTransactionAmount() : BigDecimal.ZERO);
       newTransaction
           .setPaymentAmount(payment.getDocumentType().getDocumentCategory().equals("ARR") ? BigDecimal.ZERO
-              : payment.getAmount());
+              : payment.getFinancialTransactionAmount());
       newTransaction.setStatus(newTransaction.getDepositAmount().compareTo(
           newTransaction.getPaymentAmount()) > 0 ? "RPR" : "PPM");
+      if (!newTransaction.getCurrency().equals(payment.getCurrency())) {
+        newTransaction.setForeignCurrency(payment.getCurrency());
+        newTransaction.setForeignConversionRate(payment.getFinancialTransactionConvertRate());
+        newTransaction.setForeignAmount(payment.getAmount());
+      }
       OBDal.getInstance().save(newTransaction);
       OBDal.getInstance().flush();
     } finally {
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_AddPayment.java	Thu Jun 02 00:27:17 2011 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_AddPayment.java	Thu Jun 02 10:59:08 2011 +0200
@@ -19,6 +19,7 @@
 package org.openbravo.advpaymentmngt.process;
 
 import java.math.BigDecimal;
+import java.math.MathContext;
 import java.text.SimpleDateFormat;
 import java.util.ArrayList;
 import java.util.Date;
@@ -35,6 +36,7 @@
 import org.openbravo.base.exception.OBException;
 import org.openbravo.base.secureApp.VariablesSecureApp;
 import org.openbravo.base.session.OBPropertiesProvider;
+import org.openbravo.base.util.Convert;
 import org.openbravo.dal.core.DalUtil;
 import org.openbravo.dal.core.OBContext;
 import org.openbravo.dal.service.OBCriteria;
@@ -45,6 +47,7 @@
 import org.openbravo.erpCommon.utility.OBError;
 import org.openbravo.erpCommon.utility.Utility;
 import org.openbravo.model.common.businesspartner.BusinessPartner;
+import org.openbravo.model.common.currency.Currency;
 import org.openbravo.model.common.enterprise.DocumentType;
 import org.openbravo.model.common.enterprise.Organization;
 import org.openbravo.model.common.invoice.Invoice;
@@ -102,6 +105,14 @@
    *          Scheduled PAyment Detail amount.
    * @param isRefund
    *          Not used.
+   * @param paymentCurrency
+   *          The currency that the payment is being made in. Will default to financial account
+   *          currency if not specified
+   * @param finTxnConvertRate
+   *          Exchange rate to convert between payment currency and financial account currency for
+   *          this payment. Defaults to 1.0 if not supplied
+   * @param finTxnAmount
+   *          Amount of payment in currency of financial account
    * @return The FIN_Payment OBObject containing all the Payment Details.
    */
   public static FIN_Payment savePayment(FIN_Payment _payment, boolean isReceipt,
@@ -110,7 +121,8 @@
       Date paymentDate, Organization organization, String referenceNo,
       List<FIN_PaymentScheduleDetail> selectedPaymentScheduleDetails,
       HashMap<String, BigDecimal> selectedPaymentScheduleDetailsAmounts, boolean isWriteoff,
-      boolean isRefund) {
+      boolean isRefund, Currency paymentCurrency, BigDecimal finTxnConvertRate,
+      BigDecimal finTxnAmount) {
     dao = new AdvPaymentMngtDao();
 
     BigDecimal assignedAmount = BigDecimal.ZERO;
@@ -119,7 +131,8 @@
       payment = _payment;
     else
       payment = dao.getNewPayment(isReceipt, organization, docType, strPaymentDocumentNo,
-          businessPartner, paymentMethod, finAccount, strPaymentAmount, paymentDate, referenceNo);
+          businessPartner, paymentMethod, finAccount, strPaymentAmount, paymentDate, referenceNo,
+          paymentCurrency, finTxnConvertRate, finTxnAmount);
 
     for (FIN_PaymentDetail paymentDetail : payment.getFINPaymentDetailList())
       assignedAmount = assignedAmount.add(paymentDetail.getAmount());
@@ -159,6 +172,50 @@
     return payment;
   }
 
+  /*
+   * Temporary method to supply defaults for exchange Rate and converted amount
+   */
+  @Deprecated
+  public static FIN_Payment savePayment(FIN_Payment _payment, boolean isReceipt,
+      DocumentType docType, String strPaymentDocumentNo, BusinessPartner businessPartner,
+      FIN_PaymentMethod paymentMethod, FIN_FinancialAccount finAccount, String strPaymentAmount,
+      Date paymentDate, Organization organization, String referenceNo,
+      List<FIN_PaymentScheduleDetail> selectedPaymentScheduleDetails,
+      HashMap<String, BigDecimal> selectedPaymentScheduleDetailsAmounts, boolean isWriteoff,
+      boolean isRefund) {
+    return savePayment(_payment, isReceipt, docType, strPaymentDocumentNo, businessPartner,
+        paymentMethod, finAccount, strPaymentAmount, paymentDate, organization, referenceNo,
+        selectedPaymentScheduleDetails, selectedPaymentScheduleDetailsAmounts, isWriteoff,
+        isRefund, null, null, null);
+  }
+
+  public static FIN_Payment setFinancialTransactionAmountAndRate(FIN_Payment payment,
+      BigDecimal finTxnConvertRate, BigDecimal finTxnAmount) {
+    if (payment == null) {
+      return payment;
+    }
+
+    BigDecimal paymentAmount = payment.getAmount();
+    if (paymentAmount == null) {
+      paymentAmount = BigDecimal.ZERO;
+    }
+
+    if (finTxnConvertRate == null || finTxnConvertRate.compareTo(BigDecimal.ZERO) <= 0) {
+      finTxnConvertRate = BigDecimal.ONE;
+    }
+    if (finTxnAmount == null || finTxnAmount.compareTo(BigDecimal.ZERO) == 0) {
+      finTxnAmount = paymentAmount.multiply(finTxnConvertRate);
+    } else if (paymentAmount.compareTo(BigDecimal.ZERO) != 0) {
+      // Correct exchange rate for rounding that occurs in UI
+      finTxnConvertRate = finTxnAmount.divide(paymentAmount, MathContext.DECIMAL64);
+    }
+
+    payment.setFinancialTransactionAmount(finTxnAmount);
+    payment.setFinancialTransactionConvertRate(finTxnConvertRate);
+
+    return payment;
+  }
+
   public static FIN_Payment createRefundPayment(ConnectionProvider conProvider,
       VariablesSecureApp vars, FIN_Payment payment, BigDecimal refundAmount) {
     dao = new AdvPaymentMngtDao();
@@ -211,6 +268,17 @@
     dao = new AdvPaymentMngtDao();
     paymentProposal.setAmount(paymentAmount);
     paymentProposal.setWriteoffAmount((writeOffAmt != null) ? writeOffAmt : BigDecimal.ZERO);
+    BigDecimal convertRate = paymentProposal.getFinancialTransactionConvertRate();
+    if (BigDecimal.ONE.equals(convertRate)) {
+      paymentProposal.setFinancialTransactionAmount(paymentAmount);
+    } else {
+      Currency finAccountCurrency = paymentProposal.getAccount().getCurrency();
+      BigDecimal finAccountTxnAmount = paymentAmount.multiply(convertRate);
+      finAccountTxnAmount = Convert.toNumberWithPrecision(finAccountTxnAmount, finAccountCurrency
+          .getStandardPrecision());
+      paymentProposal.setFinancialTransactionAmount(finAccountTxnAmount);
+    }
+
     for (FIN_PaymentScheduleDetail paymentScheduleDetail : selectedPaymentScheduleDetails) {
       BigDecimal detailWriteOffAmt = null;
       if (writeOffAmt != null)
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_PaymentProcess.java	Thu Jun 02 00:27:17 2011 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_PaymentProcess.java	Thu Jun 02 10:59:08 2011 +0200
@@ -343,6 +343,7 @@
         OBDal.getInstance().flush();
         payment.setWriteoffAmount(BigDecimal.ZERO);
         payment.setAmount(BigDecimal.ZERO);
+        payment.setFinancialTransactionAmount(BigDecimal.ZERO);
 
         payment.setStatus("RPAP");
         payment.setDescription("");
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_PaymentProposalProcess.java	Thu Jun 02 00:27:17 2011 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_PaymentProposalProcess.java	Thu Jun 02 10:59:08 2011 +0200
@@ -29,12 +29,14 @@
 import org.openbravo.advpaymentmngt.utility.FIN_Utility;
 import org.openbravo.base.exception.OBException;
 import org.openbravo.base.secureApp.VariablesSecureApp;
+import org.openbravo.base.util.Convert;
 import org.openbravo.dal.core.OBContext;
 import org.openbravo.dal.service.OBDal;
 import org.openbravo.database.ConnectionProvider;
 import org.openbravo.erpCommon.utility.OBError;
 import org.openbravo.erpCommon.utility.Utility;
 import org.openbravo.model.common.businesspartner.BusinessPartner;
+import org.openbravo.model.common.currency.Currency;
 import org.openbravo.model.common.enterprise.DocumentType;
 import org.openbravo.model.common.enterprise.Organization;
 import org.openbravo.model.financialmgmt.payment.FIN_FinancialAccount;
@@ -85,6 +87,9 @@
         Organization orgId = paymentProposal.getOrganization();
         Date paymentDate = paymentProposal.getPaymentDate();
         boolean isReceipt = paymentProposal.isReceipt();
+        Currency paymentCurrency = paymentProposal.getCurrency();
+        Currency financialAccountCurrency = paymentProposal.getAccount().getCurrency();
+        BigDecimal exchangeRate = paymentProposal.getFinancialTransactionConvertRate();
 
         OBContext.setAdminMode();
         try {
@@ -124,11 +129,14 @@
               String strPaymentDocumentNo = FIN_Utility.getDocumentNo(orgId, (isReceipt) ? "ARR"
                   : "APP", "DocumentNo_FIN_Payment_Proposal");
 
+              BigDecimal finAccTxnAmount = Convert.toNumberWithPrecision(paymentTotal
+                  .multiply(exchangeRate), financialAccountCurrency.getStandardPrecision());
               FIN_Payment payment = FIN_AddPayment.savePayment(null, isReceipt, dao.getObject(
                   DocumentType.class, strDocTypeId), strPaymentDocumentNo, dao.getObject(
                   BusinessPartner.class, strBusinessPartner_old), paymentMethodId,
                   financialAccountId, paymentTotal.toString(), paymentDate, orgId, null,
-                  selectedPaymentDetails, selectedPaymentDetailsAmounts, isWriteOff, isRefund);
+                  selectedPaymentDetails, selectedPaymentDetailsAmounts, isWriteOff, isRefund,
+                  paymentCurrency, exchangeRate, finAccTxnAmount);
 
               // process payment
               message = FIN_AddPayment.processPayment(vars, conProvider, "P", payment);
@@ -164,11 +172,15 @@
           String strPaymentDocumentNo = FIN_Utility.getDocumentNo(orgId, (isReceipt) ? "ARR"
               : "APP", "DocumentNo_FIN_Payment_Proposal");
 
+          BigDecimal finAccTxnAmount = Convert.toNumberWithPrecision(paymentTotal
+              .multiply(exchangeRate), financialAccountCurrency.getStandardPrecision());
+
           FIN_Payment payment = FIN_AddPayment.savePayment(null, isReceipt, dao.getObject(
               DocumentType.class, strDocTypeId), strPaymentDocumentNo, dao.getObject(
               BusinessPartner.class, strBusinessPartner), paymentMethodId, financialAccountId,
               paymentTotal.toString(), paymentDate, orgId, null, selectedPaymentDetails,
-              selectedPaymentDetailsAmounts, isWriteOff, isRefund);
+              selectedPaymentDetailsAmounts, isWriteOff, isRefund, paymentCurrency, exchangeRate,
+              finAccTxnAmount);
           paymentProposal.setStatus(isReceipt ? "RPR" : "PPM");
           // process payment
           message = FIN_AddPayment.processPayment(vars, conProvider, "P", payment);
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/utility/FIN_Utility.java	Thu Jun 02 00:27:17 2011 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/utility/FIN_Utility.java	Thu Jun 02 10:59:08 2011 +0200
@@ -19,7 +19,9 @@
 
 package org.openbravo.advpaymentmngt.utility;
 
+import java.math.BigDecimal;
 import java.sql.BatchUpdateException;
+import java.text.DecimalFormat;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
 import java.util.ArrayList;
@@ -39,6 +41,7 @@
 import org.openbravo.base.secureApp.VariablesSecureApp;
 import org.openbravo.base.session.OBPropertiesProvider;
 import org.openbravo.base.structure.BaseOBObject;
+import org.openbravo.client.kernel.reference.UIDefinitionController;
 import org.openbravo.dal.core.OBContext;
 import org.openbravo.dal.service.OBCriteria;
 import org.openbravo.dal.service.OBDal;
@@ -48,6 +51,7 @@
 import org.openbravo.erpCommon.utility.Utility;
 import org.openbravo.model.ad.system.Client;
 import org.openbravo.model.ad.utility.Sequence;
+import org.openbravo.model.common.currency.Currency;
 import org.openbravo.model.common.enterprise.DocumentType;
 import org.openbravo.model.common.enterprise.Organization;
 import org.openbravo.model.financialmgmt.payment.FIN_FinancialAccount;
@@ -385,12 +389,49 @@
    *          Payment Methods that belongs to at least on Financial Account
    * @return a String with the html code with the options to fill the drop-down of Payment Methods.
    */
+  @Deprecated
   public static String getPaymentMethodList(String strPaymentMethodId,
       String strFinancialAccountId, String strOrgId, boolean isMandatory,
       boolean excludePaymentMethodWithoutAccount) {
     dao = new AdvPaymentMngtDao();
     List<FIN_PaymentMethod> paymentMethods = dao.getFilteredPaymentMethods(strFinancialAccountId,
-        strOrgId, excludePaymentMethodWithoutAccount);
+        strOrgId, excludePaymentMethodWithoutAccount, AdvPaymentMngtDao.PaymentDirection.EITHER);
+    String options = getOptionsList(paymentMethods, strPaymentMethodId, isMandatory);
+    return options;
+  }
+
+  /**
+   * Gets the available Payment Methods and returns in a String the html code containing all the
+   * Payment Methods in the natural tree of the given organization filtered by the Financial
+   * Account.
+   * 
+   * @param strPaymentMethodId
+   *          the Payment Method id that will be selected by default in case it is present in the
+   *          list.
+   * @param strFinancialAccountId
+   *          optional Financial Account id to filter the Payment Methods.
+   * @param strOrgId
+   *          the Organization id the record belongs to.
+   * @param isMandatory
+   *          boolean parameter to add an extra blank option if the drop-down is optional.
+   * @param excludePaymentMethodWithoutAccount
+   *          if the strPaymentMethodId is empty or null then depending on this parameter the list
+   *          will include payment methods with no Financial Accounts associated or only show the
+   *          Payment Methods that belongs to at least on Financial Account
+   * @param isInPayment
+   *          specifies the type of payment to get payment methods for. If true, will return payment
+   *          methods with Payment In enabled, if false will return payment methods with Payment Out
+   *          enabled.
+   * @return a String with the html code with the options to fill the drop-down of Payment Methods.
+   */
+  public static String getPaymentMethodList(String strPaymentMethodId,
+      String strFinancialAccountId, String strOrgId, boolean isMandatory,
+      boolean excludePaymentMethodWithoutAccount, boolean isInPayment) {
+    dao = new AdvPaymentMngtDao();
+    List<FIN_PaymentMethod> paymentMethods = dao.getFilteredPaymentMethods(strFinancialAccountId,
+        strOrgId, excludePaymentMethodWithoutAccount,
+        isInPayment ? AdvPaymentMngtDao.PaymentDirection.IN
+            : AdvPaymentMngtDao.PaymentDirection.OUT);
     String options = getOptionsList(paymentMethods, strPaymentMethodId, isMandatory);
     return options;
   }
@@ -412,10 +453,44 @@
    * @return a String with the html code with the options to fill the drop-down of Financial
    *         Accounts.
    */
+  @Deprecated
   public static String getFinancialAccountList(String strPaymentMethodId,
       String strFinancialAccountId, String strOrgId, boolean isMandatory, String strCurrencyId) {
     List<FIN_FinancialAccount> financialAccounts = dao.getFilteredFinancialAccounts(
-        strPaymentMethodId, strOrgId, strCurrencyId);
+        strPaymentMethodId, strOrgId, strCurrencyId, AdvPaymentMngtDao.PaymentDirection.EITHER);
+    String options = getOptionsList(financialAccounts, strFinancialAccountId, isMandatory);
+    return options;
+  }
+
+  /**
+   * Gets the available Financial Accounts and returns in a String the html code containing all the
+   * Financial Accounts in the natural tree of the given organization filtered by the Payment
+   * Method.
+   * 
+   * @param strPaymentMethodId
+   *          optional Payment Method id to filter the Financial Accounts.
+   * @param strFinancialAccountId
+   *          the Financial Account id that will be selected by default in case it is present in the
+   *          list.
+   * @param strOrgId
+   *          the Organization id the record belongs to.
+   * @param strCurrencyId
+   *          optional Currency id to filter the Financial Accounts.
+   * @param isInPayment
+   *          specifies the type of payment to that is being made. If true, will return accounts
+   *          with payment methods that have Payment In enabled, if false will return accounts with
+   *          payment methods that have Payment Out enabled.
+   * @return a String with the html code with the options to fill the drop-down of Financial
+   *         Accounts.
+   */
+  public static String getFinancialAccountList(String strPaymentMethodId,
+      String strFinancialAccountId, String strOrgId, boolean isMandatory, String strCurrencyId,
+      boolean isInPayment) {
+
+    List<FIN_FinancialAccount> financialAccounts = dao.getFilteredFinancialAccounts(
+        strPaymentMethodId, strOrgId, strCurrencyId,
+        isInPayment ? AdvPaymentMngtDao.PaymentDirection.IN
+            : AdvPaymentMngtDao.PaymentDirection.OUT);
     String options = getOptionsList(financialAccounts, strFinancialAccountId, isMandatory);
     return options;
   }
@@ -617,4 +692,70 @@
 
   }
 
+  public static BigDecimal getDepositAmount(Boolean isReceipt, BigDecimal amount) {
+    BigDecimal deposit = BigDecimal.ZERO;
+    if (isReceipt) {
+      if (amount.compareTo(BigDecimal.ZERO) == 1) {
+        deposit = amount;
+      }
+      // else received payment was negative so treat as payment
+    } else {
+      if (amount.compareTo(BigDecimal.ZERO) == -1) {
+        // Negative payment out is a deposit
+        deposit = amount.abs();
+      }
+    }
+    return deposit;
+  }
+
+  public static BigDecimal getPaymentAmount(Boolean isReceipt, BigDecimal amount) {
+    BigDecimal payment = BigDecimal.ZERO;
+    if (isReceipt) {
+      if (amount.compareTo(BigDecimal.ZERO) == -1) {
+        // Negative payment in, treat as payment
+        payment = amount.abs();
+      }
+    } else {
+      if (amount.compareTo(BigDecimal.ZERO) == 1) {
+        payment = amount;
+      }
+      // else sent payment was negative so treat as deposit
+    }
+    return payment;
+
+  }
+
+  /**
+   * Convert a multi currency amount to a string for display in the UI. If amount has been converted
+   * to a different currency, then output that converted amount and currency as well
+   * 
+   * @param amt
+   *          Amount of payment
+   * @param currency
+   *          Currency payment was made in
+   * @param convertedAmt
+   *          Amount of payment in converted currency
+   * @param convertedCurrency
+   *          Currency payment was converted to/from
+   * @return String version of amount formatted for display to user
+   */
+  public static String multiCurrencyAmountToDisplay(BigDecimal amt, Currency currency,
+      BigDecimal convertedAmt, Currency convertedCurrency) {
+    StringBuffer out = new StringBuffer();
+    final UIDefinitionController.FormatDefinition formatDef = UIDefinitionController.getInstance()
+        .getFormatDefinition("euro", "Edition");
+    DecimalFormat amountFormatter = new DecimalFormat(formatDef.getFormat());
+    amountFormatter.setMaximumFractionDigits(currency.getStandardPrecision().intValue());
+
+    out.append(amountFormatter.format(amt));
+    if (convertedCurrency != null && !currency.equals(convertedCurrency)
+        && amt.compareTo(BigDecimal.ZERO) != 0) {
+      amountFormatter.setMaximumFractionDigits(convertedCurrency.getStandardPrecision().intValue());
+      out.append(" (").append(amountFormatter.format(convertedAmt)).append(" ").append(
+          convertedCurrency.getISOCode()).append(")");
+    }
+
+    return out.toString();
+  }
+
 }
--- a/modules/org.openbravo.advpaymentmngt/web/org.openbravo.advpaymentmngt/FIN_Utilities.js	Thu Jun 02 00:27:17 2011 +0200
+++ b/modules/org.openbravo.advpaymentmngt/web/org.openbravo.advpaymentmngt/FIN_Utilities.js	Thu Jun 02 10:59:08 2011 +0200
@@ -161,6 +161,28 @@
 }
 
 /**
+ * Arithmetic divide operation of two Strings using the global formats.
+ * @param {String} number1 The first operand
+ * @param {String} number2 The second operand
+ * @return The result of dividing number1 to number2 using the global formats.
+ * @type String
+ */
+function divide(number1, number2) {
+  return formattedNumberOpTemp(number1, '/', number2, globalMaskNumeric, globalDecSeparator, globalGroupSeparator, globalGroupInterval);
+}
+
+/**
+ * Arithmetic multiply operation of two Strings using the global formats.
+ * @param {String} number1 The first operand
+ * @param {String} number2 The second operand
+ * @return The result of multiplying number1 to number2 using the global formats.
+ * @type String
+ */
+function multiply(number1, number2) {
+  return formattedNumberOpTemp(number1, '*', number2, globalMaskNumeric, globalDecSeparator, globalGroupSeparator, globalGroupInterval);	
+}
+
+/**
  * Compares two Strings using the operator
  * @param {String} number1 The first operand
  * @param {String} operator The operator (+ - * / % < > <= >= ...)
@@ -189,6 +211,28 @@
           (compare(value, '<=', 0) && compare(value, '>=', maxValue)));
 }
 
+function updateConvertedAmounts( recalcExchangeRate ) {
+  var exchangeRate = frm.inpExchangeRate;
+  var precision = frm.inpFinancialAccountCurrencyPrecision ? frm.inpFinancialAccountCurrencyPrecision.value : 2;
+  var expectedConverted = frm.inpExpectedConverted;
+  var actualConverted = frm.inpActualConverted;
+  var expectedPayment= frm.inpExpectedPayment;
+  var actualPayment= frm.inpActualPayment;
+  
+  if (actualConverted && expectedConverted && exchangeRate) {
+    if( recalcExchangeRate ) {
+      if( actualConverted.value && actualPayment.value) {
+        exchangeRate.value = divide(actualConverted.value, actualPayment.value);
+      } else {
+        exchangeRate.value = '';
+      }
+    } else {
+      actualConverted.value = multiply(actualPayment.value, exchangeRate.value).toFixed(precision);
+    }
+    expectedConverted.value = multiply(expectedPayment.value,exchangeRate.value).toFixed(precision);
+  }
+}
+
 function validateSelectedAmounts(recordID, existsPendingAmount, selectedAction){
   var pendingAmount = document.frmMain.elements["inpRecordAmt"+recordID].value,
       amount = document.frmMain.elements["inpPaymentAmount"+recordID].value;
@@ -354,6 +398,7 @@
   }
   isCreditAllowed = !selectedBusinessPartners.isMultibpleSelection();
   updateDifference();
+  updateConvertedAmounts();
 }
 
 function distributeAmount(_amount) {
@@ -599,3 +644,15 @@
     });
   }
 }
+
+/**
+ * Helper function to turn a JSON string representation into an object.
+ * @param jsonString
+ */
+function decodeJSON(jsonString) {
+    try{
+        return eval('(' + jsonString + ')'); // do the eval
+    }catch(e){
+        throw new SyntaxError("Invalid JSON string: " + e.message + " parsing: "+ str);
+    }
+}
\ No newline at end of file
--- a/referencedata/sampledata/F_B_International_Group.xml	Thu Jun 02 00:27:17 2011 +0200
+++ b/referencedata/sampledata/F_B_International_Group.xml	Thu Jun 02 10:59:08 2011 +0200
@@ -1721,6 +1721,8 @@
     <uponPaymentUse xsi:nil="true"/>
     <uponWithdrawalUse xsi:nil="true"/>
     <oUTUponClearingUse>CLE</oUTUponClearingUse>
+    <payinIsMulticurrency>false</payinIsMulticurrency>
+    <payoutIsMulticurrency>false</payoutIsMulticurrency>
   </FIN_PaymentMethod>
   <FIN_PaymentMethod id="2E5CF8F5016F4E319BD45C6001B3E1AA">
     <id>2E5CF8F5016F4E319BD45C6001B3E1AA</id>
@@ -1747,6 +1749,8 @@
     <uponPaymentUse xsi:nil="true"/>
     <uponWithdrawalUse>WIT</uponWithdrawalUse>
     <oUTUponClearingUse xsi:nil="true"/>
+    <payinIsMulticurrency>false</payinIsMulticurrency>
+    <payoutIsMulticurrency>false</payoutIsMulticurrency>
   </FIN_PaymentMethod>
   <FIN_PaymentMethod id="45A202BF44884F05B8A1BF741E2063B6">
     <id>45A202BF44884F05B8A1BF741E2063B6</id>
@@ -1773,6 +1777,8 @@
     <uponPaymentUse xsi:nil="true"/>
     <uponWithdrawalUse>WIT</uponWithdrawalUse>
     <oUTUponClearingUse xsi:nil="true"/>
+    <payinIsMulticurrency>false</payinIsMulticurrency>
+    <payoutIsMulticurrency>false</payoutIsMulticurrency>
   </FIN_PaymentMethod>
   <FIN_PaymentMethod id="5A741F883A31408CA3AC097D76AA6D32">
     <id>5A741F883A31408CA3AC097D76AA6D32</id>
@@ -1799,6 +1805,8 @@
     <uponPaymentUse xsi:nil="true"/>
     <uponWithdrawalUse xsi:nil="true"/>
     <oUTUponClearingUse>CLE</oUTUponClearingUse>
+    <payinIsMulticurrency>false</payinIsMulticurrency>
+    <payoutIsMulticurrency>false</payoutIsMulticurrency>
   </FIN_PaymentMethod>
   <FIN_PaymentMethod id="868AF7B2177A4FBBB772995FEF52C072">
     <id>868AF7B2177A4FBBB772995FEF52C072</id>
@@ -1825,6 +1833,8 @@
     <uponPaymentUse>INT</uponPaymentUse>
     <uponWithdrawalUse xsi:nil="true"/>
     <oUTUponClearingUse>CLE</oUTUponClearingUse>
+    <payinIsMulticurrency>false</payinIsMulticurrency>
+    <payoutIsMulticurrency>false</payoutIsMulticurrency>
   </FIN_PaymentMethod>
   <FIN_PaymentMethod id="CAE4A5CFD6EA485AAA5D7D5859341DB0">
     <id>CAE4A5CFD6EA485AAA5D7D5859341DB0</id>
@@ -1851,6 +1861,8 @@
     <uponPaymentUse>INT</uponPaymentUse>
     <uponWithdrawalUse xsi:nil="true"/>
     <oUTUponClearingUse>CLE</oUTUponClearingUse>
+    <payinIsMulticurrency>false</payinIsMulticurrency>
+    <payoutIsMulticurrency>false</payoutIsMulticurrency>
   </FIN_PaymentMethod>
   <FIN_Payment_ScheduleDetail id="0538BF8166CE4CC58960237E6C0A6A18">
     <id>0538BF8166CE4CC58960237E6C0A6A18</id>
@@ -3043,6 +3055,8 @@
     <uponPaymentUse>INT</uponPaymentUse>
     <uponWithdrawalUse xsi:nil="true"/>
     <oUTUponClearingUse>CLE</oUTUponClearingUse>
+    <payinIsMulticurrency>false</payinIsMulticurrency>
+    <payoutIsMulticurrency>false</payoutIsMulticurrency>
   </FinancialMgmtFinAccPaymentMethod>
   <FinancialMgmtFinAccPaymentMethod id="1EE841BCEBF34D6084222955EAAB2D3E">
     <id>1EE841BCEBF34D6084222955EAAB2D3E</id>
@@ -3069,6 +3083,8 @@
     <uponPaymentUse xsi:nil="true"/>
     <uponWithdrawalUse>WIT</uponWithdrawalUse>
     <oUTUponClearingUse xsi:nil="true"/>
+    <payinIsMulticurrency>false</payinIsMulticurrency>
+    <payoutIsMulticurrency>false</payoutIsMulticurrency>
   </FinancialMgmtFinAccPaymentMethod>
   <FinancialMgmtFinAccPaymentMethod id="297B13C115EF48F2AC845812EE56D6E7">
     <id>297B13C115EF48F2AC845812EE56D6E7</id>
@@ -3095,6 +3111,8 @@
     <uponPaymentUse xsi:nil="true"/>
     <uponWithdrawalUse>WIT</uponWithdrawalUse>
     <oUTUponClearingUse xsi:nil="true"/>
+    <payinIsMulticurrency>false</payinIsMulticurrency>
+    <payoutIsMulticurrency>false</payoutIsMulticurrency>
   </FinancialMgmtFinAccPaymentMethod>
   <FinancialMgmtFinAccPaymentMethod id="30E07646763D492B9393CF90D1960306">
     <id>30E07646763D492B9393CF90D1960306</id>
@@ -3121,6 +3139,8 @@
     <uponPaymentUse xsi:nil="true"/>
     <uponWithdrawalUse xsi:nil="true"/>
     <oUTUponClearingUse>CLE</oUTUponClearingUse>
+    <payinIsMulticurrency>false</payinIsMulticurrency>
+    <payoutIsMulticurrency>false</payoutIsMulticurrency>
   </FinancialMgmtFinAccPaymentMethod>
   <FinancialMgmtFinAccPaymentMethod id="385F40891DC1463AA9281A853E5DB39F">
     <id>385F40891DC1463AA9281A853E5DB39F</id>
@@ -3147,6 +3167,8 @@
     <uponPaymentUse xsi:nil="true"/>
     <uponWithdrawalUse xsi:nil="true"/>
     <oUTUponClearingUse>CLE</oUTUponClearingUse>
+    <payinIsMulticurrency>false</payinIsMulticurrency>
+    <payoutIsMulticurrency>false</payoutIsMulticurrency>
   </FinancialMgmtFinAccPaymentMethod>
   <FinancialMgmtFinAccPaymentMethod id="4B84F841F1DE4203AA13D85498AECA0B">
     <id>4B84F841F1DE4203AA13D85498AECA0B</id>
@@ -3173,6 +3195,8 @@
     <uponPaymentUse xsi:nil="true"/>
     <uponWithdrawalUse xsi:nil="true"/>
     <oUTUponClearingUse>CLE</oUTUponClearingUse>
+    <payinIsMulticurrency>false</payinIsMulticurrency>
+    <payoutIsMulticurrency>false</payoutIsMulticurrency>
   </FinancialMgmtFinAccPaymentMethod>
   <FinancialMgmtFinAccPaymentMethod id="97D06DD2FAA54853BD70106680765DA9">
     <id>97D06DD2FAA54853BD70106680765DA9</id>
@@ -3199,6 +3223,8 @@
     <uponPaymentUse xsi:nil="true"/>
     <uponWithdrawalUse>WIT</uponWithdrawalUse>
     <oUTUponClearingUse xsi:nil="true"/>
+    <payinIsMulticurrency>false</payinIsMulticurrency>
+    <payoutIsMulticurrency>false</payoutIsMulticurrency>
   </FinancialMgmtFinAccPaymentMethod>
   <FinancialMgmtFinAccPaymentMethod id="A82C7445CD3E465CA674FD11E0734B23">
     <id>A82C7445CD3E465CA674FD11E0734B23</id>
@@ -3225,6 +3251,8 @@
     <uponPaymentUse>INT</uponPaymentUse>
     <uponWithdrawalUse xsi:nil="true"/>
     <oUTUponClearingUse>CLE</oUTUponClearingUse>
+    <payinIsMulticurrency>false</payinIsMulticurrency>
+    <payoutIsMulticurrency>false</payoutIsMulticurrency>
   </FinancialMgmtFinAccPaymentMethod>
   <FinancialMgmtFinAccPaymentMethod id="AD18F111BD3742A1964F3A791796276C">
     <id>AD18F111BD3742A1964F3A791796276C</id>
@@ -3251,6 +3279,8 @@
     <uponPaymentUse>INT</uponPaymentUse>
     <uponWithdrawalUse xsi:nil="true"/>
     <oUTUponClearingUse>CLE</oUTUponClearingUse>
+    <payinIsMulticurrency>false</payinIsMulticurrency>
+    <payoutIsMulticurrency>false</payoutIsMulticurrency>
   </FinancialMgmtFinAccPaymentMethod>
   <FinancialMgmtFinAccPaymentMethod id="CF7F86D540CA40D39515F105EFF61B45">
     <id>CF7F86D540CA40D39515F105EFF61B45</id>
@@ -3277,6 +3307,8 @@
     <uponPaymentUse>INT</uponPaymentUse>
     <uponWithdrawalUse xsi:nil="true"/>
     <oUTUponClearingUse>CLE</oUTUponClearingUse>
+    <payinIsMulticurrency>false</payinIsMulticurrency>
+    <payoutIsMulticurrency>false</payoutIsMulticurrency>
   </FinancialMgmtFinAccPaymentMethod>
   <FinancialMgmtFinAccPaymentMethod id="D0C1760819C647CE9BBFD72C6A01C120">
     <id>D0C1760819C647CE9BBFD72C6A01C120</id>
@@ -3303,6 +3335,8 @@
     <uponPaymentUse xsi:nil="true"/>
     <uponWithdrawalUse xsi:nil="true"/>
     <oUTUponClearingUse>CLE</oUTUponClearingUse>
+    <payinIsMulticurrency>false</payinIsMulticurrency>
+    <payoutIsMulticurrency>false</payoutIsMulticurrency>
   </FinancialMgmtFinAccPaymentMethod>
   <FinancialMgmtFinAccPaymentMethod id="F33F1C25017E4FC89AB5CEEF3280D9D9">
     <id>F33F1C25017E4FC89AB5CEEF3280D9D9</id>
@@ -3329,6 +3363,8 @@
     <uponPaymentUse xsi:nil="true"/>
     <uponWithdrawalUse>WIT</uponWithdrawalUse>
     <oUTUponClearingUse xsi:nil="true"/>
+    <payinIsMulticurrency>false</payinIsMulticurrency>
+    <payoutIsMulticurrency>false</payoutIsMulticurrency>
   </FinancialMgmtFinAccPaymentMethod>
   <FIN_Payment_Schedule id="001CC332B71D470484E7A15BC3ABEB02">
     <id>001CC332B71D470484E7A15BC3ABEB02</id>
@@ -372561,6 +372597,8 @@
     <aPRMAddScheduledpayments>false</aPRMAddScheduledpayments>
     <aprmExecutepayment>false</aprmExecutepayment>
     <createdByAlgorithm>false</createdByAlgorithm>
+    <financialTransactionConvertRate>1</financialTransactionConvertRate>
+    <financialTransactionAmount>3.00</financialTransactionAmount>
   </FIN_Payment>
   <FIN_Payment id="22F7D21FB4104C089194547F00D0626B">
     <documentNo>700007</documentNo>
@@ -372597,6 +372635,8 @@
     <aPRMAddScheduledpayments>false</aPRMAddScheduledpayments>
     <aprmExecutepayment>false</aprmExecutepayment>
     <createdByAlgorithm>false</createdByAlgorithm>
+    <financialTransactionConvertRate>1</financialTransactionConvertRate>
+    <financialTransactionAmount>550.18</financialTransactionAmount>
   </FIN_Payment>
   <FIN_Payment id="3D048FCA18DF41A1B09D2FDD088B562B">
     <documentNo>400001</documentNo>
@@ -372633,6 +372673,8 @@
     <aPRMAddScheduledpayments>false</aPRMAddScheduledpayments>
     <aprmExecutepayment>false</aprmExecutepayment>
     <createdByAlgorithm>false</createdByAlgorithm>
+    <financialTransactionConvertRate>1</financialTransactionConvertRate>
+    <financialTransactionAmount>610.07</financialTransactionAmount>
   </FIN_Payment>
   <FIN_Payment id="4A5808566ECC40DEAF4A5C05D225D81E">
     <documentNo>700005</documentNo>
@@ -372669,6 +372711,8 @@
     <aPRMAddScheduledpayments>false</aPRMAddScheduledpayments>
     <aprmExecutepayment>false</aprmExecutepayment>
     <createdByAlgorithm>false</createdByAlgorithm>
+    <financialTransactionConvertRate>1</financialTransactionConvertRate>
+    <financialTransactionAmount>202.68</financialTransactionAmount>
   </FIN_Payment>
   <FIN_Payment id="4CBE98FC1EF44556B499DB99EDA26C1B">
     <documentNo>700002</documentNo>
@@ -372705,6 +372749,8 @@
     <aPRMAddScheduledpayments>false</aPRMAddScheduledpayments>
     <aprmExecutepayment>false</aprmExecutepayment>
     <createdByAlgorithm>false</createdByAlgorithm>
+    <financialTransactionConvertRate>1</financialTransactionConvertRate>
+    <financialTransactionAmount>50.00</financialTransactionAmount>
   </FIN_Payment>
   <FIN_Payment id="53CC001E6036491080266E38A54D73DF">
     <documentNo>700006</documentNo>
@@ -372741,6 +372787,8 @@
     <aPRMAddScheduledpayments>false</aPRMAddScheduledpayments>
     <aprmExecutepayment>false</aprmExecutepayment>
     <createdByAlgorithm>false</createdByAlgorithm>
+    <financialTransactionConvertRate>1</financialTransactionConvertRate>
+    <financialTransactionAmount>300.00</financialTransactionAmount>
   </FIN_Payment>
   <FIN_Payment id="8A64B71A2B68AAA5012B7D1849130026">
     <documentNo>400005</documentNo>
@@ -372777,6 +372825,8 @@
     <aPRMAddScheduledpayments>false</aPRMAddScheduledpayments>
     <aprmExecutepayment>false</aprmExecutepayment>
     <createdByAlgorithm>false</createdByAlgorithm>
+    <financialTransactionConvertRate>1</financialTransactionConvertRate>
+    <financialTransactionAmount>1383.20</financialTransactionAmount>
   </FIN_Payment>
   <FIN_Payment id="A9310A008E744E50929ADE299B724D1E">
     <documentNo>700003</documentNo>
@@ -372813,6 +372863,8 @@
     <aPRMAddScheduledpayments>false</aPRMAddScheduledpayments>
     <aprmExecutepayment>false</aprmExecutepayment>
     <createdByAlgorithm>false</createdByAlgorithm>
+    <financialTransactionConvertRate>1</financialTransactionConvertRate>
+    <financialTransactionAmount>628.79</financialTransactionAmount>
   </FIN_Payment>
   <FIN_Payment id="B67C90A29C734646ABB52EE1F8F64974">
     <documentNo>400008</documentNo>
@@ -372849,6 +372901,8 @@
     <aPRMAddScheduledpayments>false</aPRMAddScheduledpayments>
     <aprmExecutepayment>false</aprmExecutepayment>
     <createdByAlgorithm>false</createdByAlgorithm>
+    <financialTransactionConvertRate>1</financialTransactionConvertRate>
+    <financialTransactionAmount>846.83</financialTransactionAmount>
   </FIN_Payment>
   <FIN_Payment id="BE8D60B5AFF8448CBD44DAF62260D2B5">
     <documentNo>400010</documentNo>
@@ -372885,6 +372939,8 @@
     <aPRMAddScheduledpayments>false</aPRMAddScheduledpayments>
     <aprmExecutepayment>false</aprmExecutepayment>
     <createdByAlgorithm>false</createdByAlgorithm>
+    <financialTransactionConvertRate>1</financialTransactionConvertRate>
+    <financialTransactionAmount>97.94</financialTransactionAmount>
   </FIN_Payment>
   <FIN_Payment id="C3783FC1B5C2436C81247DDAEF9D1738">
     <documentNo>400007</documentNo>
@@ -372921,6 +372977,8 @@
     <aPRMAddScheduledpayments>false</aPRMAddScheduledpayments>
     <aprmExecutepayment>false</aprmExecutepayment>
     <createdByAlgorithm>false</createdByAlgorithm>
+    <financialTransactionConvertRate>1</financialTransactionConvertRate>
+    <financialTransactionAmount>500.00</financialTransactionAmount>
   </FIN_Payment>
   <FIN_Payment id="C40A8A65B0FB4522A40830387B93E5CB">
     <documentNo>400004</documentNo>
@@ -372957,6 +373015,8 @@
     <aPRMAddScheduledpayments>false</aPRMAddScheduledpayments>
     <aprmExecutepayment>false</aprmExecutepayment>
     <createdByAlgorithm>false</createdByAlgorithm>
+    <financialTransactionConvertRate>1</financialTransactionConvertRate>
+    <financialTransactionAmount>3.31</financialTransactionAmount>
   </FIN_Payment>
   <FIN_Payment id="E80E742A75F94BB0AA623EA9BBD40758">
     <documentNo>400006</documentNo>
@@ -372993,6 +373053,8 @@
     <aPRMAddScheduledpayments>false</aPRMAddScheduledpayments>
     <aprmExecutepayment>false</aprmExecutepayment>
     <createdByAlgorithm>false</createdByAlgorithm>
+    <financialTransactionConvertRate>1</financialTransactionConvertRate>
+    <financialTransactionAmount>317.19</financialTransactionAmount>
   </FIN_Payment>
   <FIN_Payment id="F9C59628E69F413386585EDBC9DDDD34">
     <documentNo>700004</documentNo>
@@ -373027,6 +373089,8 @@
     <aPRMAddScheduledpayments>false</aPRMAddScheduledpayments>
     <aprmExecutepayment>false</aprmExecutepayment>
     <createdByAlgorithm>false</createdByAlgorithm>
+    <financialTransactionConvertRate>1</financialTransactionConvertRate>
+    <financialTransactionAmount>0</financialTransactionAmount>
   </FIN_Payment>
   <FIN_Payment id="FAE31E5467274E86BC7CDF5FBF1788C2">
     <documentNo>700001</documentNo>
@@ -373063,6 +373127,8 @@
     <aPRMAddScheduledpayments>false</aPRMAddScheduledpayments>
     <aprmExecutepayment>false</aprmExecutepayment>
     <createdByAlgorithm>false</createdByAlgorithm>
+    <financialTransactionConvertRate>1</financialTransactionConvertRate>
+    <financialTransactionAmount>75.03</financialTransactionAmount>
   </FIN_Payment>
   <FIN_Payment id="FF8080812E38E087012E38EA0ACE000C">
     <documentNo>700010</documentNo>
@@ -373099,6 +373165,8 @@
     <aPRMAddScheduledpayments>false</aPRMAddScheduledpayments>
     <aprmExecutepayment>false</aprmExecutepayment>
     <createdByAlgorithm>false</createdByAlgorithm>
+    <financialTransactionConvertRate>1</financialTransactionConvertRate>
+    <financialTransactionAmount>1089.26</financialTransactionAmount>
   </FIN_Payment>
   <FIN_Payment id="FF8080812E38E087012E38EF47FE0016">
     <documentNo>700011</documentNo>
@@ -373135,6 +373203,8 @@
     <aPRMAddScheduledpayments>false</aPRMAddScheduledpayments>
     <aprmExecutepayment>false</aprmExecutepayment>
     <createdByAlgorithm>false</createdByAlgorithm>
+    <financialTransactionConvertRate>1</financialTransactionConvertRate>
+    <financialTransactionAmount>3910.23</financialTransactionAmount>
   </FIN_Payment>
   <FIN_Payment id="FF8080812E39520D012E396BFE590014">
     <documentNo>400012</documentNo>
@@ -373171,6 +373241,8 @@
     <aPRMAddScheduledpayments>false</aPRMAddScheduledpayments>
     <aprmExecutepayment>false</aprmExecutepayment>
     <createdByAlgorithm>false</createdByAlgorithm>
+    <financialTransactionConvertRate>1</financialTransactionConvertRate>
+    <financialTransactionAmount>48.46</financialTransactionAmount>
   </FIN_Payment>
   <FIN_Reconciliation id="8A64B71A2C351129012C356C357A000F">
     <id>8A64B71A2C351129012C356C357A000F</id>
--- a/referencedata/sampledata/QA_Testing.xml	Thu Jun 02 00:27:17 2011 +0200
+++ b/referencedata/sampledata/QA_Testing.xml	Thu Jun 02 10:59:08 2011 +0200
@@ -50,6 +50,8 @@
     <uponPaymentUse xsi:nil="true"/>
     <uponWithdrawalUse xsi:nil="true"/>
     <oUTUponClearingUse>CLE</oUTUponClearingUse>
+    <payinIsMulticurrency>false</payinIsMulticurrency>
+    <payoutIsMulticurrency>false</payoutIsMulticurrency>
   </FIN_PaymentMethod>
   <FIN_PaymentMethod id="3343E8931867421C8A7EDADCE1CDF13E">
     <id>3343E8931867421C8A7EDADCE1CDF13E</id>
@@ -76,6 +78,8 @@
     <uponPaymentUse>INT</uponPaymentUse>
     <uponWithdrawalUse>WIT</uponWithdrawalUse>
     <oUTUponClearingUse>CLE</oUTUponClearingUse>
+    <payinIsMulticurrency>false</payinIsMulticurrency>
+    <payoutIsMulticurrency>false</payoutIsMulticurrency>
   </FIN_PaymentMethod>
   <FIN_PaymentMethod id="3D5E2CD140734B69A1CF3A7BB533DD8E">
     <id>3D5E2CD140734B69A1CF3A7BB533DD8E</id>
@@ -102,6 +106,8 @@
     <uponPaymentUse xsi:nil="true"/>
     <uponWithdrawalUse>INT</uponWithdrawalUse>
     <oUTUponClearingUse>CLE</oUTUponClearingUse>
+    <payinIsMulticurrency>false</payinIsMulticurrency>
+    <payoutIsMulticurrency>false</payoutIsMulticurrency>
   </FIN_PaymentMethod>
   <FIN_PaymentMethod id="42E87E97974E4B35849A430B8F6F2884">
     <id>42E87E97974E4B35849A430B8F6F2884</id>
@@ -128,6 +134,8 @@
     <uponPaymentUse xsi:nil="true"/>
     <uponWithdrawalUse xsi:nil="true"/>
     <oUTUponClearingUse>CLE</oUTUponClearingUse>
+    <payinIsMulticurrency>false</payinIsMulticurrency>
+    <payoutIsMulticurrency>false</payoutIsMulticurrency>
   </FIN_PaymentMethod>
   <FIN_PaymentMethod id="5631D9C9D9A345EB97D70574D174A60C">
     <id>5631D9C9D9A345EB97D70574D174A60C</id>
@@ -154,6 +162,8 @@
     <uponPaymentUse xsi:nil="true"/>
     <uponWithdrawalUse>INT</uponWithdrawalUse>
     <oUTUponClearingUse>CLE</oUTUponClearingUse>
+    <payinIsMulticurrency>false</payinIsMulticurrency>
+    <payoutIsMulticurrency>false</payoutIsMulticurrency>
   </FIN_PaymentMethod>
   <FIN_PaymentMethod id="5843B13EE7104BADB0D565C23F7AC7DF">
     <id>5843B13EE7104BADB0D565C23F7AC7DF</id>
@@ -180,6 +190,8 @@
     <uponPaymentUse xsi:nil="true"/>
     <uponWithdrawalUse xsi:nil="true"/>
     <oUTUponClearingUse>CLE</oUTUponClearingUse>
+    <payinIsMulticurrency>false</payinIsMulticurrency>
+    <payoutIsMulticurrency>false</payoutIsMulticurrency>
   </FIN_PaymentMethod>
   <FIN_PaymentMethod id="5FF6C5FFC2224144AA47504C3980621A">
     <id>5FF6C5FFC2224144AA47504C3980621A</id>
@@ -206,6 +218,8 @@
     <uponPaymentUse xsi:nil="true"/>
     <uponWithdrawalUse xsi:nil="true"/>
     <oUTUponClearingUse>CLE</oUTUponClearingUse>
+    <payinIsMulticurrency>false</payinIsMulticurrency>
+    <payoutIsMulticurrency>false</payoutIsMulticurrency>
   </FIN_PaymentMethod>
   <FIN_PaymentMethod id="6731D39478BA47A5BF0FF761E9BD355A">
     <id>6731D39478BA47A5BF0FF761E9BD355A</id>
@@ -232,6 +246,8 @@
     <uponPaymentUse xsi:nil="true"/>
     <uponWithdrawalUse xsi:nil="true"/>
     <oUTUponClearingUse>CLE</oUTUponClearingUse>
+    <payinIsMulticurrency>false</payinIsMulticurrency>
+    <payoutIsMulticurrency>false</payoutIsMulticurrency>
   </FIN_PaymentMethod>
   <FIN_PaymentMethod id="95BB15D99BED4101BA85A625966862BE">
     <id>95BB15D99BED4101BA85A625966862BE</id>
@@ -258,6 +274,8 @@
     <uponPaymentUse xsi:nil="true"/>
     <uponWithdrawalUse xsi:nil="true"/>
     <oUTUponClearingUse>CLE</oUTUponClearingUse>
+    <payinIsMulticurrency>false</payinIsMulticurrency>
+    <payoutIsMulticurrency>false</payoutIsMulticurrency>
   </FIN_PaymentMethod>
   <FIN_PaymentMethod id="9A54EC7C57CA4200A4BDF91E33A0A28B">
     <id>9A54EC7C57CA4200A4BDF91E33A0A28B</id>
@@ -284,6 +302,8 @@
     <uponPaymentUse xsi:nil="true"/>
     <uponWithdrawalUse>WIT</uponWithdrawalUse>
     <oUTUponClearingUse>CLE</oUTUponClearingUse>
+    <payinIsMulticurrency>false</payinIsMulticurrency>
+    <payoutIsMulticurrency>false</payoutIsMulticurrency>
   </FIN_PaymentMethod>
   <FIN_PaymentMethod id="A60469B5E89E4F6498C9EC2B9B0143F8">
     <id>A60469B5E89E4F6498C9EC2B9B0143F8</id>
@@ -310,6 +330,8 @@
     <uponPaymentUse xsi:nil="true"/>
     <uponWithdrawalUse>INT</uponWithdrawalUse>
     <oUTUponClearingUse>CLE</oUTUponClearingUse>
+    <payinIsMulticurrency>false</payinIsMulticurrency>
+    <payoutIsMulticurrency>false</payoutIsMulticurrency>
   </FIN_PaymentMethod>
   <FIN_PaymentMethod id="A800E70B12AC488CB751425B0E00D4E3">
     <id>A800E70B12AC488CB751425B0E00D4E3</id>
@@ -336,6 +358,8 @@
     <uponPaymentUse>INT</uponPaymentUse>
     <uponWithdrawalUse>WIT</uponWithdrawalUse>
     <oUTUponClearingUse>CLE</oUTUponClearingUse>
+    <payinIsMulticurrency>false</payinIsMulticurrency>
+    <payoutIsMulticurrency>false</payoutIsMulticurrency>
   </FIN_PaymentMethod>
   <FIN_PaymentMethod id="AA2C3AAE8EB14C95A20DC25FBD2C4940">
     <id>AA2C3AAE8EB14C95A20DC25FBD2C4940</id>
@@ -362,6 +386,8 @@
     <uponPaymentUse xsi:nil="true"/>
     <uponWithdrawalUse xsi:nil="true"/>
     <oUTUponClearingUse>CLE</oUTUponClearingUse>
+    <payinIsMulticurrency>false</payinIsMulticurrency>
+    <payoutIsMulticurrency>false</payoutIsMulticurrency>
   </FIN_PaymentMethod>
   <FIN_PaymentMethod id="ABCD17C7F3C3442087FBC4886FDCEAA4">
     <id>ABCD17C7F3C3442087FBC4886FDCEAA4</id>
@@ -388,6 +414,8 @@
     <uponPaymentUse xsi:nil="true"/>
     <uponWithdrawalUse xsi:nil="true"/>
     <oUTUponClearingUse>CLE</oUTUponClearingUse>
+    <payinIsMulticurrency>false</payinIsMulticurrency>
+    <payoutIsMulticurrency>false</payoutIsMulticurrency>
   </FIN_PaymentMethod>
   <FIN_PaymentMethod id="B82AECB19C1F43C8AC568EAC4CD27735">
     <id>B82AECB19C1F43C8AC568EAC4CD27735</id>
@@ -414,6 +442,8 @@
     <uponPaymentUse xsi:nil="true"/>
     <uponWithdrawalUse xsi:nil="true"/>
     <oUTUponClearingUse>CLE</oUTUponClearingUse>
+    <payinIsMulticurrency>false</payinIsMulticurrency>
+    <payoutIsMulticurrency>false</payoutIsMulticurrency>
   </FIN_PaymentMethod>
   <FIN_PaymentMethod id="BC79E3E914CF471C91AE183FC5311BE7">
     <id>BC79E3E914CF471C91AE183FC5311BE7</id>
@@ -440,6 +470,8 @@
     <uponPaymentUse xsi:nil="true"/>
     <uponWithdrawalUse>WIT</uponWithdrawalUse>
     <oUTUponClearingUse>CLE</oUTUponClearingUse>
+    <payinIsMulticurrency>false</payinIsMulticurrency>
+    <payoutIsMulticurrency>false</payoutIsMulticurrency>
   </FIN_PaymentMethod>
   <FIN_PaymentMethod id="D4E18582DED648168745EFA6C853B76A">
     <id>D4E18582DED648168745EFA6C853B76A</id>
@@ -466,6 +498,8 @@
     <uponPaymentUse xsi:nil="true"/>
     <uponWithdrawalUse xsi:nil="true"/>
     <oUTUponClearingUse>CLE</oUTUponClearingUse>
+    <payinIsMulticurrency>false</payinIsMulticurrency>
+    <payoutIsMulticurrency>false</payoutIsMulticurrency>
   </FIN_PaymentMethod>
   <FIN_PaymentMethod id="D577CB13D1D24EF2920A5B3733A5C87A">
     <id>D577CB13D1D24EF2920A5B3733A5C87A</id>
@@ -492,6 +526,8 @@
     <uponPaymentUse>INT</uponPaymentUse>
     <uponWithdrawalUse>WIT</uponWithdrawalUse>
     <oUTUponClearingUse>CLE</oUTUponClearingUse>
+    <payinIsMulticurrency>false</payinIsMulticurrency>
+    <payoutIsMulticurrency>false</payoutIsMulticurrency>
   </FIN_PaymentMethod>
   <FIN_PaymentMethod id="E2EF5523488741B79651005CF5DB6190">
     <id>E2EF5523488741B79651005CF5DB6190</id>
@@ -518,6 +554,8 @@
     <uponPaymentUse xsi:nil="true"/>
     <uponWithdrawalUse>INT</uponWithdrawalUse>
     <oUTUponClearingUse>CLE</oUTUponClearingUse>
+    <payinIsMulticurrency>false</payinIsMulticurrency>
+    <payoutIsMulticurrency>false</payoutIsMulticurrency>
   </FIN_PaymentMethod>
   <FIN_PaymentMethod id="E64A0DBAE4714241879ECAD9711C89CE">
     <id>E64A0DBAE4714241879ECAD9711C89CE</id>
@@ -544,6 +582,8 @@
     <uponPaymentUse>INT</uponPaymentUse>
     <uponWithdrawalUse>WIT</uponWithdrawalUse>
     <oUTUponClearingUse>CLE</oUTUponClearingUse>
+    <payinIsMulticurrency>false</payinIsMulticurrency>
+    <payoutIsMulticurrency>false</payoutIsMulticurrency>
   </FIN_PaymentMethod>
   <FIN_PaymentMethod id="EA0C024507AB45D98ADC1DA02EEB8D65">
     <id>EA0C024507AB45D98ADC1DA02EEB8D65</id>
@@ -570,6 +610,8 @@
     <uponPaymentUse>INT</uponPaymentUse>
     <uponWithdrawalUse>WIT</uponWithdrawalUse>
     <oUTUponClearingUse>CLE</oUTUponClearingUse>
+    <payinIsMulticurrency>false</payinIsMulticurrency>
+    <payoutIsMulticurrency>false</payoutIsMulticurrency>
   </FIN_PaymentMethod>
   <FIN_PaymentMethod id="EA3A4CC375AA41A2BB36940B2078D646">
     <id>EA3A4CC375AA41A2BB36940B2078D646</id>
@@ -596,6 +638,8 @@
     <uponPaymentUse>INT</uponPaymentUse>
     <uponWithdrawalUse>WIT</uponWithdrawalUse>
     <oUTUponClearingUse>CLE</oUTUponClearingUse>
+    <payinIsMulticurrency>false</payinIsMulticurrency>
+    <payoutIsMulticurrency>false</payoutIsMulticurrency>
   </FIN_PaymentMethod>
   <FinancialMgmtFinAccPaymentMethod id="198E718EACAC4F05B6D1900EEB83501E">
     <id>198E718EACAC4F05B6D1900EEB83501E</id>
@@ -622,6 +666,8 @@
     <uponPaymentUse>INT</uponPaymentUse>
     <uponWithdrawalUse>WIT</uponWithdrawalUse>
     <oUTUponClearingUse>CLE</oUTUponClearingUse>
+    <payinIsMulticurrency>false</payinIsMulticurrency>
+    <payoutIsMulticurrency>false</payoutIsMulticurrency>
   </FinancialMgmtFinAccPaymentMethod>
   <FinancialMgmtFinAccPaymentMethod id="2736CDAAA0D747A39650BC573B318E7C">
     <id>2736CDAAA0D747A39650BC573B318E7C</id>
@@ -648,6 +694,8 @@
     <uponPaymentUse xsi:nil="true"/>
     <uponWithdrawalUse>INT</uponWithdrawalUse>
     <oUTUponClearingUse>CLE</oUTUponClearingUse>
+    <payinIsMulticurrency>false</payinIsMulticurrency>
+    <payoutIsMulticurrency>false</payoutIsMulticurrency>
   </FinancialMgmtFinAccPaymentMethod>
   <FinancialMgmtFinAccPaymentMethod id="2B02F8007E204E8987499B13A7125321">
     <id>2B02F8007E204E8987499B13A7125321</id>
@@ -674,6 +722,8 @@
     <uponPaymentUse>INT</uponPaymentUse>
     <uponWithdrawalUse>WIT</uponWithdrawalUse>
     <oUTUponClearingUse>CLE</oUTUponClearingUse>
+    <payinIsMulticurrency>false</payinIsMulticurrency>
+    <payoutIsMulticurrency>false</payoutIsMulticurrency>
   </FinancialMgmtFinAccPaymentMethod>
   <FinancialMgmtFinAccPaymentMethod id="32896EE31C6645EC89E3FFE9A25BCB8F">
     <id>32896EE31C6645EC89E3FFE9A25BCB8F</id>
@@ -700,6 +750,8 @@
     <uponPaymentUse xsi:nil="true"/>
     <uponWithdrawalUse xsi:nil="true"/>
     <oUTUponClearingUse>CLE</oUTUponClearingUse>
+    <payinIsMulticurrency>false</payinIsMulticurrency>
+    <payoutIsMulticurrency>false</payoutIsMulticurrency>
   </FinancialMgmtFinAccPaymentMethod>
   <FinancialMgmtFinAccPaymentMethod id="3BBD5FCD6091479CBD7FBB7EC78BBD69">
     <id>3BBD5FCD6091479CBD7FBB7EC78BBD69</id>
@@ -726,6 +778,8 @@
     <uponPaymentUse xsi:nil="true"/>
     <uponWithdrawalUse xsi:nil="true"/>
     <oUTUponClearingUse>CLE</oUTUponClearingUse>
+    <payinIsMulticurrency>false</payinIsMulticurrency>
+    <payoutIsMulticurrency>false</payoutIsMulticurrency>
   </FinancialMgmtFinAccPaymentMethod>
   <FinancialMgmtFinAccPaymentMethod id="42F31E40DCFC4D78A5F945E64CB6DBC3">
     <id>42F31E40DCFC4D78A5F945E64CB6DBC3</id>
@@ -752,6 +806,8 @@
     <uponPaymentUse xsi:nil="true"/>
     <uponWithdrawalUse>INT</uponWithdrawalUse>
     <oUTUponClearingUse>CLE</oUTUponClearingUse>
+    <payinIsMulticurrency>false</payinIsMulticurrency>
+    <payoutIsMulticurrency>false</payoutIsMulticurrency>
   </FinancialMgmtFinAccPaymentMethod>
   <FinancialMgmtFinAccPaymentMethod id="4B5CDBD0272C4D4BA9A8412E694DCE49">
     <id>4B5CDBD0272C4D4BA9A8412E694DCE49</id>
@@ -778,6 +834,8 @@
     <uponPaymentUse xsi:nil="true"/>
     <uponWithdrawalUse>WIT</uponWithdrawalUse>
     <oUTUponClearingUse>CLE</oUTUponClearingUse>
+    <payinIsMulticurrency>false</payinIsMulticurrency>
+    <payoutIsMulticurrency>false</payoutIsMulticurrency>
   </FinancialMgmtFinAccPaymentMethod>
   <FinancialMgmtFinAccPaymentMethod id="4FAECFF5E652477FBA16EC6F95FBD84D">
     <id>4FAECFF5E652477FBA16EC6F95FBD84D</id>
@@ -804,6 +862,8 @@
     <uponPaymentUse>INT</uponPaymentUse>
     <uponWithdrawalUse>WIT</uponWithdrawalUse>
     <oUTUponClearingUse>CLE</oUTUponClearingUse>
+    <payinIsMulticurrency>false</payinIsMulticurrency>
+    <payoutIsMulticurrency>false</payoutIsMulticurrency>
   </FinancialMgmtFinAccPaymentMethod>
   <FinancialMgmtFinAccPaymentMethod id="5E2F4326037E453FB711AFDB9EB87090">
     <id>5E2F4326037E453FB711AFDB9EB87090</id>
@@ -830,6 +890,8 @@
     <uponPaymentUse xsi:nil="true"/>
     <uponWithdrawalUse xsi:nil="true"/>
     <oUTUponClearingUse>CLE</oUTUponClearingUse>
+    <payinIsMulticurrency>false</payinIsMulticurrency>
+    <payoutIsMulticurrency>false</payoutIsMulticurrency>
   </FinancialMgmtFinAccPaymentMethod>
   <FinancialMgmtFinAccPaymentMethod id="614D99C5DC0E49009D1B5C622B4C8F07">
     <id>614D99C5DC0E49009D1B5C622B4C8F07</id>
@@ -856,6 +918,8 @@
     <uponPaymentUse>INT</uponPaymentUse>
     <uponWithdrawalUse>WIT</uponWithdrawalUse>
     <oUTUponClearingUse>CLE</oUTUponClearingUse>
+    <payinIsMulticurrency>false</payinIsMulticurrency>
+    <payoutIsMulticurrency>false</payoutIsMulticurrency>
   </FinancialMgmtFinAccPaymentMethod>
   <FinancialMgmtFinAccPaymentMethod id="621542823CB64AEBA71062A15205824C">
     <id>621542823CB64AEBA71062A15205824C</id>
@@ -882,6 +946,8 @@
     <uponPaymentUse xsi:nil="true"/>
     <uponWithdrawalUse xsi:nil="true"/>
     <oUTUponClearingUse>CLE</oUTUponClearingUse>
+    <payinIsMulticurrency>false</payinIsMulticurrency>
+    <payoutIsMulticurrency>false</payoutIsMulticurrency>
   </FinancialMgmtFinAccPaymentMethod>
   <FinancialMgmtFinAccPaymentMethod id="68D5B26B0F0E48049AC48B234F767767">
     <id>68D5B26B0F0E48049AC48B234F767767</id>
@@ -908,6 +974,8 @@
     <uponPaymentUse>INT</uponPaymentUse>
     <uponWithdrawalUse>WIT</uponWithdrawalUse>
     <oUTUponClearingUse>CLE</oUTUponClearingUse>
+    <payinIsMulticurrency>false</payinIsMulticurrency>
+    <payoutIsMulticurrency>false</payoutIsMulticurrency>
   </FinancialMgmtFinAccPaymentMethod>
   <FinancialMgmtFinAccPaymentMethod id="7D413F7038424A7F8BE9A49D2EBF107A">
     <id>7D413F7038424A7F8BE9A49D2EBF107A</id>
@@ -934,6 +1002,8 @@
     <uponPaymentUse xsi:nil="true"/>
     <uponWithdrawalUse xsi:nil="true"/>
     <oUTUponClearingUse>CLE</oUTUponClearingUse>
+    <payinIsMulticurrency>false</payinIsMulticurrency>
+    <payoutIsMulticurrency>false</payoutIsMulticurrency>
   </FinancialMgmtFinAccPaymentMethod>
   <FinancialMgmtFinAccPaymentMethod id="95CC806FE55C4E98B23C04A307A08594">
     <id>95CC806FE55C4E98B23C04A307A08594</id>
@@ -960,6 +1030,8 @@
     <uponPaymentUse xsi:nil="true"/>
     <uponWithdrawalUse>WIT</uponWithdrawalUse>
     <oUTUponClearingUse>CLE</oUTUponClearingUse>
+    <payinIsMulticurrency>false</payinIsMulticurrency>
+    <payoutIsMulticurrency>false</payoutIsMulticurrency>
   </FinancialMgmtFinAccPaymentMethod>
   <FinancialMgmtFinAccPaymentMethod id="A61E66C7F61C441E85F57C881A52B692">
     <id>A61E66C7F61C441E85F57C881A52B692</id>
@@ -986,6 +1058,8 @@
     <uponPaymentUse xsi:nil="true"/>
     <uponWithdrawalUse>INT</uponWithdrawalUse>
     <oUTUponClearingUse>CLE</oUTUponClearingUse>
+    <payinIsMulticurrency>false</payinIsMulticurrency>
+    <payoutIsMulticurrency>false</payoutIsMulticurrency>
   </FinancialMgmtFinAccPaymentMethod>
   <FinancialMgmtFinAccPaymentMethod id="A75649A7A06A4A658A701DC715E03456">
     <id>A75649A7A06A4A658A701DC715E03456</id>
@@ -1012,6 +1086,8 @@
     <uponPaymentUse xsi:nil="true"/>
     <uponWithdrawalUse>WIT</uponWithdrawalUse>
     <oUTUponClearingUse>CLE</oUTUponClearingUse>
+    <payinIsMulticurrency>false</payinIsMulticurrency>
+    <payoutIsMulticurrency>false</payoutIsMulticurrency>
   </FinancialMgmtFinAccPaymentMethod>
   <FinancialMgmtFinAccPaymentMethod id="C39F9B40222C4411A89371B6A632AE56">
     <id>C39F9B40222C4411A89371B6A632AE56</id>
@@ -1038,6 +1114,8 @@
     <uponPaymentUse xsi:nil="true"/>
     <uponWithdrawalUse xsi:nil="true"/>
     <oUTUponClearingUse>CLE</oUTUponClearingUse>
+    <payinIsMulticurrency>false</payinIsMulticurrency>
+    <payoutIsMulticurrency>false</payoutIsMulticurrency>
   </FinancialMgmtFinAccPaymentMethod>
   <FinancialMgmtFinAccPaymentMethod id="C3EFB1039DA243BBB4001F7B42E2C71D">
     <id>C3EFB1039DA243BBB4001F7B42E2C71D</id>
@@ -1064,6 +1142,8 @@
     <uponPaymentUse xsi:nil="true"/>
     <uponWithdrawalUse xsi:nil="true"/>
     <oUTUponClearingUse>CLE</oUTUponClearingUse>
+    <payinIsMulticurrency>false</payinIsMulticurrency>
+    <payoutIsMulticurrency>false</payoutIsMulticurrency>
   </FinancialMgmtFinAccPaymentMethod>
   <FinancialMgmtFinAccPaymentMethod id="C41D8B2006274DA98A2F8D9E190889D1">
     <id>C41D8B2006274DA98A2F8D9E190889D1</id>
@@ -1090,6 +1170,8 @@
     <uponPaymentUse xsi:nil="true"/>
     <uponWithdrawalUse>WIT</uponWithdrawalUse>
     <oUTUponClearingUse>CLE</oUTUponClearingUse>
+    <payinIsMulticurrency>false</payinIsMulticurrency>
+    <payoutIsMulticurrency>false</payoutIsMulticurrency>
   </FinancialMgmtFinAccPaymentMethod>
   <FinancialMgmtFinAccPaymentMethod id="C78B541DBD25452FB4C7F7F23FA230C2">
     <id>C78B541DBD25452FB4C7F7F23FA230C2</id>
@@ -1116,6 +1198,8 @@
     <uponPaymentUse xsi:nil="true"/>
     <uponWithdrawalUse xsi:nil="true"/>
     <oUTUponClearingUse>CLE</oUTUponClearingUse>
+    <payinIsMulticurrency>false</payinIsMulticurrency>
+    <payoutIsMulticurrency>false</payoutIsMulticurrency>
   </FinancialMgmtFinAccPaymentMethod>
   <FinancialMgmtFinAccPaymentMethod id="C95E55184ADA4FE5910183F56BEA2D15">
     <id>C95E55184ADA4FE5910183F56BEA2D15</id>
@@ -1142,6 +1226,8 @@
     <uponPaymentUse>INT</uponPaymentUse>
     <uponWithdrawalUse>WIT</uponWithdrawalUse>
     <oUTUponClearingUse>CLE</oUTUponClearingUse>
+    <payinIsMulticurrency>false</payinIsMulticurrency>
+    <payoutIsMulticurrency>false</payoutIsMulticurrency>
   </FinancialMgmtFinAccPaymentMethod>
   <FinancialMgmtFinAccPaymentMethod id="CDFF94397B7E42CFB7E17B94CD1E2320">
     <id>CDFF94397B7E42CFB7E17B94CD1E2320</id>
@@ -1168,6 +1254,8 @@
     <uponPaymentUse>INT</uponPaymentUse>
     <uponWithdrawalUse>WIT</uponWithdrawalUse>
     <oUTUponClearingUse>CLE</oUTUponClearingUse>
+    <payinIsMulticurrency>false</payinIsMulticurrency>
+    <payoutIsMulticurrency>false</payoutIsMulticurrency>
   </FinancialMgmtFinAccPaymentMethod>
   <FinancialMgmtFinAccPaymentMethod id="CFC748C84C86493AA5C0CE7940688205">
     <id>CFC748C84C86493AA5C0CE7940688205</id>
@@ -1194,6 +1282,8 @@
     <uponPaymentUse xsi:nil="true"/>
     <uponWithdrawalUse xsi:nil="true"/>
     <oUTUponClearingUse>CLE</oUTUponClearingUse>
+    <payinIsMulticurrency>false</payinIsMulticurrency>
+    <payoutIsMulticurrency>false</payoutIsMulticurrency>
   </FinancialMgmtFinAccPaymentMethod>
   <FinancialMgmtFinAccPaymentMethod id="D9DFFD6D75BD4F839E5684CBF8C64A0B">
     <id>D9DFFD6D75BD4F839E5684CBF8C64A0B</id>
@@ -1220,6 +1310,8 @@
     <uponPaymentUse>INT</uponPaymentUse>
     <uponWithdrawalUse>WIT</uponWithdrawalUse>
     <oUTUponClearingUse>CLE</oUTUponClearingUse>
+    <payinIsMulticurrency>false</payinIsMulticurrency>
+    <payoutIsMulticurrency>false</payoutIsMulticurrency>
   </FinancialMgmtFinAccPaymentMethod>
   <FinancialMgmtFinAccPaymentMethod id="DE6B59669DFE4998BCE265B5B736E1DA">
     <id>DE6B59669DFE4998BCE265B5B736E1DA</id>
@@ -1246,6 +1338,8 @@
     <uponPaymentUse xsi:nil="true"/>
     <uponWithdrawalUse xsi:nil="true"/>
     <oUTUponClearingUse>CLE</oUTUponClearingUse>
+    <payinIsMulticurrency>false</payinIsMulticurrency>
+    <payoutIsMulticurrency>false</payoutIsMulticurrency>
   </FinancialMgmtFinAccPaymentMethod>
   <FinancialMgmtFinAccPaymentMethod id="E71EFDF43E8B43B5B5A6EBCCD9D7B29E">
     <id>E71EFDF43E8B43B5B5A6EBCCD9D7B29E</id>
@@ -1272,6 +1366,8 @@
     <uponPaymentUse xsi:nil="true"/>
     <uponWithdrawalUse xsi:nil="true"/>
     <oUTUponClearingUse>CLE</oUTUponClearingUse>
+    <payinIsMulticurrency>false</payinIsMulticurrency>
+    <payoutIsMulticurrency>false</payoutIsMulticurrency>
   </FinancialMgmtFinAccPaymentMethod>
   <FinancialMgmtFinAccPaymentMethod id="F706F8A06C3C4056B035A2B49AB66BE4">
     <id>F706F8A06C3C4056B035A2B49AB66BE4</id>
@@ -1298,6 +1394,8 @@
     <uponPaymentUse xsi:nil="true"/>
     <uponWithdrawalUse>INT</uponWithdrawalUse>
     <oUTUponClearingUse>CLE</oUTUponClearingUse>
+    <payinIsMulticurrency>false</payinIsMulticurrency>
+    <payoutIsMulticurrency>false</payoutIsMulticurrency>
   </FinancialMgmtFinAccPaymentMethod>
   <FinancialMgmtFinAccPaymentMethod id="F7BE8F04800F40FBB0B24FE3B50F39E2">
     <id>F7BE8F04800F40FBB0B24FE3B50F39E2</id>
@@ -1324,6 +1422,8 @@
     <uponPaymentUse xsi:nil="true"/>
     <uponWithdrawalUse xsi:nil="true"/>
     <oUTUponClearingUse>CLE</oUTUponClearingUse>
+    <payinIsMulticurrency>false</payinIsMulticurrency>
+    <payoutIsMulticurrency>false</payoutIsMulticurrency>
   </FinancialMgmtFinAccPaymentMethod>
   <FIN_Financial_Account id="0D0000E0A27040E383D5B03755249B61">
     <id>0D0000E0A27040E383D5B03755249B61</id>
@@ -173670,8 +173770,8 @@
     <discount id="098A46DBB0DC45779ADE258624E1333F"/>
     <lineNo>10</lineNo>
     <cascade>false</cascade>
+    <customer>true</customer>
     <applyInOrder>false</applyInOrder>
-    <customer>true</customer>
     <vendor>false</vendor>
   </BusinessPartnerDiscount>
   <BusinessPartnerDiscount id="76208B9F29414BF882818663338D2891">
@@ -173683,8 +173783,8 @@
     <discount id="170701585324421EAE53C3CD95393557"/>
     <lineNo>20</lineNo>
     <cascade>true</cascade>
+    <customer>true</customer>
     <applyInOrder>true</applyInOrder>
-    <customer>true</customer>
     <vendor>false</vendor>
   </BusinessPartnerDiscount>
   <BusinessPartnerDiscount id="96FE82CB4F7F448BAAC6D6D193068AA0">
@@ -173696,8 +173796,8 @@
     <discount id="170701585324421EAE53C3CD95393557"/>
     <lineNo>20</lineNo>
     <cascade>true</cascade>
+    <customer>false</customer>
     <applyInOrder>true</applyInOrder>
-    <customer>false</customer>
     <vendor>true</vendor>
   </BusinessPartnerDiscount>
   <BusinessPartnerDiscount id="970DAA34DD8B4EC398FE6690A8FBED23">
@@ -173709,8 +173809,8 @@
     <discount id="098A46DBB0DC45779ADE258624E1333F"/>
     <lineNo>10</lineNo>
     <cascade>false</cascade>
+    <customer>true</customer>
     <applyInOrder>true</applyInOrder>
-    <customer>true</customer>
     <vendor>false</vendor>
   </BusinessPartnerDiscount>
   <BusinessPartnerDiscount id="A885538908DD4F9DA58F4E615D360445">
@@ -173722,8 +173822,8 @@
     <discount id="098A46DBB0DC45779ADE258624E1333F"/>
     <lineNo>10</lineNo>
     <cascade>false</cascade>
+    <customer>false</customer>
     <applyInOrder>true</applyInOrder>
-    <customer>false</customer>
     <vendor>true</vendor>
   </BusinessPartnerDiscount>
   <BusinessPartnerDiscount id="CB949687B9734946BF9AA51CEFDCA8F3">
@@ -173735,8 +173835,8 @@
     <discount id="098A46DBB0DC45779ADE258624E1333F"/>
     <lineNo>10</lineNo>
     <cascade>false</cascade>
+    <customer>false</customer>
     <applyInOrder>true</applyInOrder>
-    <customer>false</customer>
     <vendor>true</vendor>
   </BusinessPartnerDiscount>
   <FinancialMgmtRemittanceType id="128C6A6405D941AAAB3C41A18732CB23">
--- a/src-db/database/model/tables/FIN_FINACC_PAYMENTMETHOD.xml	Thu Jun 02 00:27:17 2011 +0200
+++ b/src-db/database/model/tables/FIN_FINACC_PAYMENTMETHOD.xml	Thu Jun 02 10:59:08 2011 +0200
@@ -113,6 +113,14 @@
         <default/>
         <onCreateDefault/>
       </column>
+      <column name="PAYIN_ISMULTICURRENCY" primaryKey="false" required="true" type="CHAR" size="1" autoIncrement="false">
+        <default><![CDATA[N]]></default>
+        <onCreateDefault/>
+      </column>
+      <column name="PAYOUT_ISMULTICURRENCY" primaryKey="false" required="true" type="CHAR" size="1" autoIncrement="false">
+        <default><![CDATA[N]]></default>
+        <onCreateDefault/>
+      </column>
       <foreign-key foreignTable="AD_CLIENT" name="FIN_FINACC_PAYMETHOD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
--- a/src-db/database/model/tables/FIN_FINACC_TRANSACTION.xml	Thu Jun 02 00:27:17 2011 +0200
+++ b/src-db/database/model/tables/FIN_FINACC_TRANSACTION.xml	Thu Jun 02 10:59:08 2011 +0200
@@ -121,6 +121,18 @@
         <default><![CDATA[N]]></default>
         <onCreateDefault/>
       </column>
+      <column name="FOREIGN_CURRENCY_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
+        <default/>
+        <onCreateDefault/>
+      </column>
+      <column name="FOREIGN_CONVERT_RATE" primaryKey="false" required="false" type="DECIMAL" autoIncrement="false">
+        <default/>
+        <onCreateDefault/>
+      </column>
+      <column name="FOREIGN_AMOUNT" primaryKey="false" required="false" type="DECIMAL" autoIncrement="false">
+        <default/>
+        <onCreateDefault/>
+      </column>
       <foreign-key foreignTable="AD_CLIENT" name="FIN_AD_CLIENT_TRANSACTION">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
@@ -148,6 +160,9 @@
       <foreign-key foreignTable="FIN_FINANCIAL_ACCOUNT" name="FIN_FINANCIAL_TRANSACTION">
         <reference local="FIN_FINANCIAL_ACCOUNT_ID" foreign="FIN_FINANCIAL_ACCOUNT_ID"/>
       </foreign-key>
+      <foreign-key foreignTable="C_CURRENCY" name="FIN_FOREIGNCRNCY_TRANSACTION">
+        <reference local="FOREIGN_CURRENCY_ID" foreign="C_CURRENCY_ID"/>
+      </foreign-key>
       <foreign-key foreignTable="FIN_PAYMENT" name="FIN_PAYMENT_TRANSACTION">
         <reference local="FIN_PAYMENT_ID" foreign="FIN_PAYMENT_ID"/>
       </foreign-key>
--- a/src-db/database/model/tables/FIN_PAYMENT.xml	Thu Jun 02 00:27:17 2011 +0200
+++ b/src-db/database/model/tables/FIN_PAYMENT.xml	Thu Jun 02 10:59:08 2011 +0200
@@ -129,6 +129,14 @@
         <default><![CDATA[N]]></default>
         <onCreateDefault/>
       </column>
+      <column name="FINACC_TXN_CONVERT_RATE" primaryKey="false" required="true" type="DECIMAL" autoIncrement="false">
+        <default><![CDATA[1]]></default>
+        <onCreateDefault><![CDATA[1]]></onCreateDefault>
+      </column>
+      <column name="FINACC_TXN_AMOUNT" primaryKey="false" required="true" type="DECIMAL" autoIncrement="false">
+        <default/>
+        <onCreateDefault><![CDATA[AMOUNT]]></onCreateDefault>
+      </column>
       <foreign-key foreignTable="AD_CLIENT" name="FIN_AD_CLIENT_PAYMENTS">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
--- a/src-db/database/model/tables/FIN_PAYMENTMETHOD.xml	Thu Jun 02 00:27:17 2011 +0200
+++ b/src-db/database/model/tables/FIN_PAYMENTMETHOD.xml	Thu Jun 02 10:59:08 2011 +0200
@@ -113,6 +113,14 @@
         <default/>
         <onCreateDefault/>
       </column>
+      <column name="PAYIN_ISMULTICURRENCY" primaryKey="false" required="true" type="CHAR" size="1" autoIncrement="false">
+        <default><![CDATA[N]]></default>
+        <onCreateDefault/>
+      </column>
+      <column name="PAYOUT_ISMULTICURRENCY" primaryKey="false" required="true" type="CHAR" size="1" autoIncrement="false">
+        <default><![CDATA[N]]></default>
+        <onCreateDefault/>
+      </column>
       <foreign-key foreignTable="AD_CLIENT" name="FIN_AD_CLIENT_PAYMENTMETHOD">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
--- a/src-db/database/model/tables/FIN_PAYMENT_PROPOSAL.xml	Thu Jun 02 00:27:17 2011 +0200
+++ b/src-db/database/model/tables/FIN_PAYMENT_PROPOSAL.xml	Thu Jun 02 10:59:08 2011 +0200
@@ -97,6 +97,14 @@
         <default/>
         <onCreateDefault/>
       </column>
+      <column name="FINACC_TXN_CONVERT_RATE" primaryKey="false" required="true" type="DECIMAL" autoIncrement="false">
+        <default><![CDATA[1]]></default>
+        <onCreateDefault><![CDATA[1]]></onCreateDefault>
+      </column>
+      <column name="FINACC_TXN_AMOUNT" primaryKey="false" required="true" type="DECIMAL" autoIncrement="false">
+        <default/>
+        <onCreateDefault><![CDATA[AMOUNT]]></onCreateDefault>
+      </column>
       <foreign-key foreignTable="AD_CLIENT" name="FIN_AD_CLIENT_YMENT_PROPOSAL">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
--- a/src-db/database/model/views/FIN_PAYMENT_DETAIL_V.xml	Thu Jun 02 00:27:17 2011 +0200
+++ b/src-db/database/model/views/FIN_PAYMENT_DETAIL_V.xml	Thu Jun 02 10:59:08 2011 +0200
@@ -1,7 +1,8 @@
 <?xml version="1.0"?>
   <database name="VIEW FIN_PAYMENT_DETAIL_V">
-    <view name="FIN_PAYMENT_DETAIL_V"><![CDATA[SELECT psd.fin_payment_scheduledetail_id AS fin_payment_detail_v_id, psd.ad_client_id, psd.ad_org_id, psd.isactive, psd.created, psd.createdby, psd.updated, psd.updatedby, psi.fin_payment_sched_inv_v_id, pso.fin_payment_sched_ord_v_id, i.documentno AS invoiceno, o.documentno AS orderno, p.documentno AS paymentno, pd.fin_payment_id, COALESCE(psi.duedate, pso.duedate) AS duedate, COALESCE(i.grandtotal, o.grandtotal) AS invoicedamt, COALESCE(psi.expected, pso.expected) AS expected, psd.amount AS paidamt, p.c_bpartner_id, p.fin_paymentmethod_id, p.fin_financial_account_id, p.c_currency_id, p.paymentdate, gli.name AS glitemname, pd.writeoffamt
-FROM fin_payment p, fin_payment_detail pd
+    <view name="FIN_PAYMENT_DETAIL_V"><![CDATA[SELECT psd.fin_payment_scheduledetail_id AS fin_payment_detail_v_id, psd.ad_client_id, psd.ad_org_id, psd.isactive, psd.created, psd.createdby, psd.updated, psd.updatedby, psi.fin_payment_sched_inv_v_id, pso.fin_payment_sched_ord_v_id, i.documentno AS invoiceno, o.documentno AS orderno, p.documentno AS paymentno, pd.fin_payment_id, COALESCE(psi.duedate, pso.duedate) AS duedate, COALESCE(i.grandtotal, o.grandtotal) AS invoicedamt, COALESCE(psi.expected, pso.expected) AS expected, psd.amount AS paidamt, p.c_bpartner_id, p.fin_paymentmethod_id, p.fin_financial_account_id, p.c_currency_id, p.paymentdate, gli.name AS glitemname, pd.writeoffamt, fa.c_currency_id AS finacc_currency_id, p.finacc_txn_convert_rate, psd.amount * p.finacc_txn_convert_rate AS paidconverted, COALESCE(psi.expected, pso.expected) * p.finacc_txn_convert_rate AS expectedconverted
+FROM fin_payment p
+LEFT JOIN fin_financial_account fa ON p.fin_financial_account_id = fa.fin_financial_account_id, fin_payment_detail pd
 JOIN fin_payment_scheduledetail psd ON pd.fin_payment_detail_id = psd.fin_payment_detail_id
 LEFT JOIN fin_payment_sched_inv_v psi ON psd.fin_payment_schedule_invoice = psi.fin_payment_sched_inv_v_id
 LEFT JOIN c_invoice i ON psi.c_invoice_id = i.c_invoice_id
--- a/src-db/database/sourcedata/AD_AUXILIARINPUT.xml	Thu Jun 02 00:27:17 2011 +0200
+++ b/src-db/database/sourcedata/AD_AUXILIARINPUT.xml	Thu Jun 02 10:59:08 2011 +0200
@@ -1002,6 +1002,43 @@
 <!--3CACB17421CB46A097666FF3425CD138-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--3CACB17421CB46A097666FF3425CD138--></AD_AUXILIARINPUT>
 
+<!--40289C202E523822012E525106E70036--><AD_AUXILIARINPUT>
+<!--40289C202E523822012E525106E70036-->  <AD_AUXILIARINPUT_ID><![CDATA[40289C202E523822012E525106E70036]]></AD_AUXILIARINPUT_ID>
+<!--40289C202E523822012E525106E70036-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--40289C202E523822012E525106E70036-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--40289C202E523822012E525106E70036-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--40289C202E523822012E525106E70036-->  <AD_TAB_ID><![CDATA[2DD6F1E2CAE0456AA9797A1D627BFF5E]]></AD_TAB_ID>
+<!--40289C202E523822012E525106E70036-->  <NAME><![CDATA[FinancialAccountCurrencyId]]></NAME>
+<!--40289C202E523822012E525106E70036-->  <CODE><![CDATA[@SQL=SELECT C_CURRENCY_ID FROM FIN_FINANCIAL_ACCOUNT WHERE FIN_FINANCIAL_ACCOUNT_ID=@FIN_FINANCIAL_ACCOUNT_ID@
+]]></CODE>
+<!--40289C202E523822012E525106E70036-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--40289C202E523822012E525106E70036--></AD_AUXILIARINPUT>
+
+<!--40289C202E523822012E5251ED4D003A--><AD_AUXILIARINPUT>
+<!--40289C202E523822012E5251ED4D003A-->  <AD_AUXILIARINPUT_ID><![CDATA[40289C202E523822012E5251ED4D003A]]></AD_AUXILIARINPUT_ID>
+<!--40289C202E523822012E5251ED4D003A-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--40289C202E523822012E5251ED4D003A-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--40289C202E523822012E5251ED4D003A-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--40289C202E523822012E5251ED4D003A-->  <AD_TAB_ID><![CDATA[2DD6F1E2CAE0456AA9797A1D627BFF5E]]></AD_TAB_ID>
+<!--40289C202E523822012E5251ED4D003A-->  <NAME><![CDATA[IsMultiCurrencyEnabled]]></NAME>
+<!--40289C202E523822012E5251ED4D003A-->  <CODE><![CDATA[@SQL=SELECT (CASE count(*) WHEN 0 THEN 'N' ELSE 'Y' END) from fin_finacc_paymentmethod 
+where fin_financial_account_id = @FIN_Financial_Account_ID@
+and fin_paymentmethod_id = @FIN_PaymentMethod_ID@ and isactive='Y'
+and payout_allow ='Y' and payout_ismulticurrency='Y']]></CODE>
+<!--40289C202E523822012E5251ED4D003A-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--40289C202E523822012E5251ED4D003A--></AD_AUXILIARINPUT>
+
+<!--40289DEF2E1E98E4012E1EE6C6CD002E--><AD_AUXILIARINPUT>
+<!--40289DEF2E1E98E4012E1EE6C6CD002E-->  <AD_AUXILIARINPUT_ID><![CDATA[40289DEF2E1E98E4012E1EE6C6CD002E]]></AD_AUXILIARINPUT_ID>
+<!--40289DEF2E1E98E4012E1EE6C6CD002E-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--40289DEF2E1E98E4012E1EE6C6CD002E-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--40289DEF2E1E98E4012E1EE6C6CD002E-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--40289DEF2E1E98E4012E1EE6C6CD002E-->  <AD_TAB_ID><![CDATA[F7A52FDAAA0346EFA07D53C125B40404]]></AD_TAB_ID>
+<!--40289DEF2E1E98E4012E1EE6C6CD002E-->  <NAME><![CDATA[FinancialAccountCurrencyId]]></NAME>
+<!--40289DEF2E1E98E4012E1EE6C6CD002E-->  <CODE><![CDATA[@SQL=SELECT C_CURRENCY_ID FROM FIN_FINANCIAL_ACCOUNT WHERE FIN_FINANCIAL_ACCOUNT_ID=@FIN_FINANCIAL_ACCOUNT_ID@]]></CODE>
+<!--40289DEF2E1E98E4012E1EE6C6CD002E-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--40289DEF2E1E98E4012E1EE6C6CD002E--></AD_AUXILIARINPUT>
+
 <!--42236E76CCB2491B8B2E5BCDA4E83624--><AD_AUXILIARINPUT>
 <!--42236E76CCB2491B8B2E5BCDA4E83624-->  <AD_AUXILIARINPUT_ID><![CDATA[42236E76CCB2491B8B2E5BCDA4E83624]]></AD_AUXILIARINPUT_ID>
 <!--42236E76CCB2491B8B2E5BCDA4E83624-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -1707,4 +1744,45 @@
 <!--FB4C3FF138DD4B2AB582E7BFBEF5CA7F-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--FB4C3FF138DD4B2AB582E7BFBEF5CA7F--></AD_AUXILIARINPUT>
 
+<!--FF8080812E26BF58012E2772F0B2003B--><AD_AUXILIARINPUT>
+<!--FF8080812E26BF58012E2772F0B2003B-->  <AD_AUXILIARINPUT_ID><![CDATA[FF8080812E26BF58012E2772F0B2003B]]></AD_AUXILIARINPUT_ID>
+<!--FF8080812E26BF58012E2772F0B2003B-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--FF8080812E26BF58012E2772F0B2003B-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--FF8080812E26BF58012E2772F0B2003B-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--FF8080812E26BF58012E2772F0B2003B-->  <AD_TAB_ID><![CDATA[C4B6506838E14A349D6717D6856F1B56]]></AD_TAB_ID>
+<!--FF8080812E26BF58012E2772F0B2003B-->  <NAME><![CDATA[FinancialAccountCurrencyId]]></NAME>
+<!--FF8080812E26BF58012E2772F0B2003B-->  <CODE><![CDATA[@SQL=SELECT C_CURRENCY_ID FROM FIN_FINANCIAL_ACCOUNT WHERE FIN_FINANCIAL_ACCOUNT_ID=@FIN_FINANCIAL_ACCOUNT_ID@]]></CODE>
+<!--FF8080812E26BF58012E2772F0B2003B-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--FF8080812E26BF58012E2772F0B2003B--></AD_AUXILIARINPUT>
+
+<!--FF8080812E26BF58012E27DC86DE016C--><AD_AUXILIARINPUT>
+<!--FF8080812E26BF58012E27DC86DE016C-->  <AD_AUXILIARINPUT_ID><![CDATA[FF8080812E26BF58012E27DC86DE016C]]></AD_AUXILIARINPUT_ID>
+<!--FF8080812E26BF58012E27DC86DE016C-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--FF8080812E26BF58012E27DC86DE016C-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--FF8080812E26BF58012E27DC86DE016C-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--FF8080812E26BF58012E27DC86DE016C-->  <AD_TAB_ID><![CDATA[F7A52FDAAA0346EFA07D53C125B40404]]></AD_TAB_ID>
+<!--FF8080812E26BF58012E27DC86DE016C-->  <NAME><![CDATA[IsMultiCurrencyEnabled]]></NAME>
+<!--FF8080812E26BF58012E27DC86DE016C-->  <CODE><![CDATA[@SQL=SELECT (CASE count(*) WHEN 0 THEN 'N' ELSE 'Y' END) from fin_finacc_paymentmethod 
+where fin_financial_account_id = @FIN_Financial_Account_ID@
+and fin_paymentmethod_id = @FIN_PaymentMethod_ID@ and isactive='Y'
+and payout_allow ='Y' and payout_ismulticurrency='Y'
+
+]]></CODE>
+<!--FF8080812E26BF58012E27DC86DE016C-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--FF8080812E26BF58012E27DC86DE016C--></AD_AUXILIARINPUT>
+
+<!--FF8080812E26BF58012E27DDC44E0170--><AD_AUXILIARINPUT>
+<!--FF8080812E26BF58012E27DDC44E0170-->  <AD_AUXILIARINPUT_ID><![CDATA[FF8080812E26BF58012E27DDC44E0170]]></AD_AUXILIARINPUT_ID>
+<!--FF8080812E26BF58012E27DDC44E0170-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--FF8080812E26BF58012E27DDC44E0170-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--FF8080812E26BF58012E27DDC44E0170-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--FF8080812E26BF58012E27DDC44E0170-->  <AD_TAB_ID><![CDATA[C4B6506838E14A349D6717D6856F1B56]]></AD_TAB_ID>
+<!--FF8080812E26BF58012E27DDC44E0170-->  <NAME><![CDATA[IsMultiCurrencyEnabled]]></NAME>
+<!--FF8080812E26BF58012E27DDC44E0170-->  <CODE><![CDATA[@SQL=SELECT (CASE count(*) WHEN 0 THEN 'N' ELSE 'Y' END) from fin_finacc_paymentmethod 
+where fin_financial_account_id ='@FIN_Financial_Account_ID@
+and fin_paymentmethod_id = @FIN_PaymentMethod_ID@ and isactive='Y'
+and payin_allow ='Y' and payin_ismulticurrency='Y']]></CODE>
+<!--FF8080812E26BF58012E27DDC44E0170-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--FF8080812E26BF58012E27DDC44E0170--></AD_AUXILIARINPUT>
+
 </data>
--- a/src-db/database/sourcedata/AD_CALLOUT.xml	Thu Jun 02 00:27:17 2011 +0200
+++ b/src-db/database/sourcedata/AD_CALLOUT.xml	Thu Jun 02 10:59:08 2011 +0200
@@ -770,6 +770,46 @@
 <!--3585710F23F244D9B179A28D18242583-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--3585710F23F244D9B179A28D18242583--></AD_CALLOUT>
 
+<!--40289C202E28D30F012E290252730036--><AD_CALLOUT>
+<!--40289C202E28D30F012E290252730036-->  <AD_CALLOUT_ID><![CDATA[40289C202E28D30F012E290252730036]]></AD_CALLOUT_ID>
+<!--40289C202E28D30F012E290252730036-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--40289C202E28D30F012E290252730036-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--40289C202E28D30F012E290252730036-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--40289C202E28D30F012E290252730036-->  <NAME><![CDATA[SE_Payment_FinAccount]]></NAME>
+<!--40289C202E28D30F012E290252730036-->  <DESCRIPTION><![CDATA[Updates currency and exchange rate based for selected financial account]]></DESCRIPTION>
+<!--40289C202E28D30F012E290252730036-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--40289C202E28D30F012E290252730036--></AD_CALLOUT>
+
+<!--40289C202E28D30F012E29062DCC004E--><AD_CALLOUT>
+<!--40289C202E28D30F012E29062DCC004E-->  <AD_CALLOUT_ID><![CDATA[40289C202E28D30F012E29062DCC004E]]></AD_CALLOUT_ID>
+<!--40289C202E28D30F012E29062DCC004E-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--40289C202E28D30F012E29062DCC004E-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--40289C202E28D30F012E29062DCC004E-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--40289C202E28D30F012E29062DCC004E-->  <NAME><![CDATA[SE_Payment_Currency]]></NAME>
+<!--40289C202E28D30F012E29062DCC004E-->  <DESCRIPTION><![CDATA[Updates exchange rate and financial account txn amount based on selected currency]]></DESCRIPTION>
+<!--40289C202E28D30F012E29062DCC004E-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--40289C202E28D30F012E29062DCC004E--></AD_CALLOUT>
+
+<!--40289C202E28D30F012E2906FF350058--><AD_CALLOUT>
+<!--40289C202E28D30F012E2906FF350058-->  <AD_CALLOUT_ID><![CDATA[40289C202E28D30F012E2906FF350058]]></AD_CALLOUT_ID>
+<!--40289C202E28D30F012E2906FF350058-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--40289C202E28D30F012E2906FF350058-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--40289C202E28D30F012E2906FF350058-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--40289C202E28D30F012E2906FF350058-->  <NAME><![CDATA[SE_Payment_AmountOrConvertRate]]></NAME>
+<!--40289C202E28D30F012E2906FF350058-->  <DESCRIPTION><![CDATA[Update converted (financial account) amount based on amount & specified exchange rate]]></DESCRIPTION>
+<!--40289C202E28D30F012E2906FF350058-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--40289C202E28D30F012E2906FF350058--></AD_CALLOUT>
+
+<!--40289C202E28D30F012E2907AA10005D--><AD_CALLOUT>
+<!--40289C202E28D30F012E2907AA10005D-->  <AD_CALLOUT_ID><![CDATA[40289C202E28D30F012E2907AA10005D]]></AD_CALLOUT_ID>
+<!--40289C202E28D30F012E2907AA10005D-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--40289C202E28D30F012E2907AA10005D-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--40289C202E28D30F012E2907AA10005D-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--40289C202E28D30F012E2907AA10005D-->  <NAME><![CDATA[SE_Payment_FinAccTransactionAmount]]></NAME>
+<!--40289C202E28D30F012E2907AA10005D-->  <DESCRIPTION><![CDATA[Update exchange rate based on specified financial account txn amount]]></DESCRIPTION>
+<!--40289C202E28D30F012E2907AA10005D-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--40289C202E28D30F012E2907AA10005D--></AD_CALLOUT>
+
 <!--46349B602D1C4132B9405A97647069AA--><AD_CALLOUT>
 <!--46349B602D1C4132B9405A97647069AA-->  <AD_CALLOUT_ID><![CDATA[46349B602D1C4132B9405A97647069AA]]></AD_CALLOUT_ID>
 <!--46349B602D1C4132B9405A97647069AA-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src-db/database/sourcedata/AD_COLUMN.xml	Thu Jun 02 00:27:17 2011 +0200
+++ b/src-db/database/sourcedata/AD_COLUMN.xml	Thu Jun 02 10:59:08 2011 +0200
@@ -206635,6 +206635,7 @@
 <!--03276FB53CC54CC1829E0AA6EC0F2EE6-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
 <!--03276FB53CC54CC1829E0AA6EC0F2EE6-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
 <!--03276FB53CC54CC1829E0AA6EC0F2EE6-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--03276FB53CC54CC1829E0AA6EC0F2EE6-->  <AD_CALLOUT_ID><![CDATA[40289C202E28D30F012E290252730036]]></AD_CALLOUT_ID>
 <!--03276FB53CC54CC1829E0AA6EC0F2EE6-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
 <!--03276FB53CC54CC1829E0AA6EC0F2EE6-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--03276FB53CC54CC1829E0AA6EC0F2EE6-->  <POSITION><![CDATA[23]]></POSITION>
@@ -208707,6 +208708,7 @@
 <!--1EAEE8AF503C4348B565DB81325665D2-->  <ISPARENT><![CDATA[N]]></ISPARENT>
 <!--1EAEE8AF503C4348B565DB81325665D2-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
 <!--1EAEE8AF503C4348B565DB81325665D2-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--1EAEE8AF503C4348B565DB81325665D2-->  <READONLYLOGIC><![CDATA[@Processed@='Y']]></READONLYLOGIC>
 <!--1EAEE8AF503C4348B565DB81325665D2-->  <ISIDENTIFIER><![CDATA[Y]]></ISIDENTIFIER>
 <!--1EAEE8AF503C4348B565DB81325665D2-->  <SEQNO><![CDATA[150]]></SEQNO>
 <!--1EAEE8AF503C4348B565DB81325665D2-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
@@ -208716,6 +208718,7 @@
 <!--1EAEE8AF503C4348B565DB81325665D2-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
 <!--1EAEE8AF503C4348B565DB81325665D2-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
 <!--1EAEE8AF503C4348B565DB81325665D2-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--1EAEE8AF503C4348B565DB81325665D2-->  <AD_CALLOUT_ID><![CDATA[40289C202E28D30F012E2906FF350058]]></AD_CALLOUT_ID>
 <!--1EAEE8AF503C4348B565DB81325665D2-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
 <!--1EAEE8AF503C4348B565DB81325665D2-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--1EAEE8AF503C4348B565DB81325665D2-->  <POSITION><![CDATA[15]]></POSITION>
@@ -210425,6 +210428,39 @@
 <!--3D81BAED7AA844A3923EE6015B1862D1-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
 <!--3D81BAED7AA844A3923EE6015B1862D1--></AD_COLUMN>
 
+<!--3DFAB9DBB8D143A3951271CBE02C224F--><AD_COLUMN>
+<!--3DFAB9DBB8D143A3951271CBE02C224F-->  <AD_COLUMN_ID><![CDATA[3DFAB9DBB8D143A3951271CBE02C224F]]></AD_COLUMN_ID>
+<!--3DFAB9DBB8D143A3951271CBE02C224F-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--3DFAB9DBB8D143A3951271CBE02C224F-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--3DFAB9DBB8D143A3951271CBE02C224F-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--3DFAB9DBB8D143A3951271CBE02C224F-->  <NAME><![CDATA[Finacc_Currency_ID]]></NAME>
+<!--3DFAB9DBB8D143A3951271CBE02C224F-->  <DESCRIPTION><![CDATA[The currency of the financial account that payment is associated with]]></DESCRIPTION>
+<!--3DFAB9DBB8D143A3951271CBE02C224F-->  <COLUMNNAME><![CDATA[Finacc_Currency_ID]]></COLUMNNAME>
+<!--3DFAB9DBB8D143A3951271CBE02C224F-->  <AD_TABLE_ID><![CDATA[DC63963AB3F1489BAAB5A9A7EFD1B407]]></AD_TABLE_ID>
+<!--3DFAB9DBB8D143A3951271CBE02C224F-->  <AD_REFERENCE_ID><![CDATA[18]]></AD_REFERENCE_ID>
+<!--3DFAB9DBB8D143A3951271CBE02C224F-->  <AD_REFERENCE_VALUE_ID><![CDATA[112]]></AD_REFERENCE_VALUE_ID>
+<!--3DFAB9DBB8D143A3951271CBE02C224F-->  <FIELDLENGTH><![CDATA[32]]></FIELDLENGTH>
+<!--3DFAB9DBB8D143A3951271CBE02C224F-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--3DFAB9DBB8D143A3951271CBE02C224F-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--3DFAB9DBB8D143A3951271CBE02C224F-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
+<!--3DFAB9DBB8D143A3951271CBE02C224F-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--3DFAB9DBB8D143A3951271CBE02C224F-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--3DFAB9DBB8D143A3951271CBE02C224F-->  <SEQNO><![CDATA[320]]></SEQNO>
+<!--3DFAB9DBB8D143A3951271CBE02C224F-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--3DFAB9DBB8D143A3951271CBE02C224F-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--3DFAB9DBB8D143A3951271CBE02C224F-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--3DFAB9DBB8D143A3951271CBE02C224F-->  <AD_ELEMENT_ID><![CDATA[15A8F735DFCD4D0DAA01F5EBFA62345B]]></AD_ELEMENT_ID>
+<!--3DFAB9DBB8D143A3951271CBE02C224F-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--3DFAB9DBB8D143A3951271CBE02C224F-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--3DFAB9DBB8D143A3951271CBE02C224F-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--3DFAB9DBB8D143A3951271CBE02C224F-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--3DFAB9DBB8D143A3951271CBE02C224F-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--3DFAB9DBB8D143A3951271CBE02C224F-->  <POSITION><![CDATA[26]]></POSITION>
+<!--3DFAB9DBB8D143A3951271CBE02C224F-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--3DFAB9DBB8D143A3951271CBE02C224F-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
+<!--3DFAB9DBB8D143A3951271CBE02C224F-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
+<!--3DFAB9DBB8D143A3951271CBE02C224F--></AD_COLUMN>
+
 <!--3EE5C3FA006A425AAA45B703B30A516B--><AD_COLUMN>
 <!--3EE5C3FA006A425AAA45B703B30A516B-->  <AD_COLUMN_ID><![CDATA[3EE5C3FA006A425AAA45B703B30A516B]]></AD_COLUMN_ID>
 <!--3EE5C3FA006A425AAA45B703B30A516B-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -210493,6 +210529,209 @@
 <!--3FE2EA6C9F474DE79421734AD8174FBA-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
 <!--3FE2EA6C9F474DE79421734AD8174FBA--></AD_COLUMN>
 
+<!--4028C9BC2DA5C491012DA62FE936037B--><AD_COLUMN>
+<!--4028C9BC2DA5C491012DA62FE936037B-->  <AD_COLUMN_ID><![CDATA[4028C9BC2DA5C491012DA62FE936037B]]></AD_COLUMN_ID>
+<!--4028C9BC2DA5C491012DA62FE936037B-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--4028C9BC2DA5C491012DA62FE936037B-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--4028C9BC2DA5C491012DA62FE936037B-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--4028C9BC2DA5C491012DA62FE936037B-->  <NAME><![CDATA[Payin_IsMulticurrency]]></NAME>
+<!--4028C9BC2DA5C491012DA62FE936037B-->  <HELP><![CDATA[Allow Receipt of Payments in Other Currencies]]></HELP>
+<!--4028C9BC2DA5C491012DA62FE936037B-->  <COLUMNNAME><![CDATA[Payin_IsMulticurrency]]></COLUMNNAME>
+<!--4028C9BC2DA5C491012DA62FE936037B-->  <AD_TABLE_ID><![CDATA[0B44DF7A2A854784BF34AD49C58647D7]]></AD_TABLE_ID>
+<!--4028C9BC2DA5C491012DA62FE936037B-->  <AD_REFERENCE_ID><![CDATA[20]]></AD_REFERENCE_ID>
+<!--4028C9BC2DA5C491012DA62FE936037B-->  <FIELDLENGTH><![CDATA[1]]></FIELDLENGTH>
+<!--4028C9BC2DA5C491012DA62FE936037B-->  <DEFAULTVALUE><![CDATA[N]]></DEFAULTVALUE>
+<!--4028C9BC2DA5C491012DA62FE936037B-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--4028C9BC2DA5C491012DA62FE936037B-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--4028C9BC2DA5C491012DA62FE936037B-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
+<!--4028C9BC2DA5C491012DA62FE936037B-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--4028C9BC2DA5C491012DA62FE936037B-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--4028C9BC2DA5C491012DA62FE936037B-->  <SEQNO><![CDATA[290]]></SEQNO>
+<!--4028C9BC2DA5C491012DA62FE936037B-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--4028C9BC2DA5C491012DA62FE936037B-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--4028C9BC2DA5C491012DA62FE936037B-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--4028C9BC2DA5C491012DA62FE936037B-->  <AD_ELEMENT_ID><![CDATA[4028C9BC2DA5C491012DA6286A6A0357]]></AD_ELEMENT_ID>
+<!--4028C9BC2DA5C491012DA62FE936037B-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--4028C9BC2DA5C491012DA62FE936037B-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--4028C9BC2DA5C491012DA62FE936037B-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--4028C9BC2DA5C491012DA62FE936037B-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--4028C9BC2DA5C491012DA62FE936037B-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--4028C9BC2DA5C491012DA62FE936037B-->  <POSITION><![CDATA[29]]></POSITION>
+<!--4028C9BC2DA5C491012DA62FE936037B-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--4028C9BC2DA5C491012DA62FE936037B-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
+<!--4028C9BC2DA5C491012DA62FE936037B-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
+<!--4028C9BC2DA5C491012DA62FE936037B--></AD_COLUMN>
+
+<!--4028C9BC2DA5C491012DA6314782037F--><AD_COLUMN>
+<!--4028C9BC2DA5C491012DA6314782037F-->  <AD_COLUMN_ID><![CDATA[4028C9BC2DA5C491012DA6314782037F]]></AD_COLUMN_ID>
+<!--4028C9BC2DA5C491012DA6314782037F-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--4028C9BC2DA5C491012DA6314782037F-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--4028C9BC2DA5C491012DA6314782037F-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--4028C9BC2DA5C491012DA6314782037F-->  <NAME><![CDATA[Payout_IsMulticurrency]]></NAME>
+<!--4028C9BC2DA5C491012DA6314782037F-->  <HELP><![CDATA[Allow withdrawl of Payments in Other Currencies]]></HELP>
+<!--4028C9BC2DA5C491012DA6314782037F-->  <COLUMNNAME><![CDATA[Payout_IsMulticurrency]]></COLUMNNAME>
+<!--4028C9BC2DA5C491012DA6314782037F-->  <AD_TABLE_ID><![CDATA[0B44DF7A2A854784BF34AD49C58647D7]]></AD_TABLE_ID>
+<!--4028C9BC2DA5C491012DA6314782037F-->  <AD_REFERENCE_ID><![CDATA[20]]></AD_REFERENCE_ID>
+<!--4028C9BC2DA5C491012DA6314782037F-->  <FIELDLENGTH><![CDATA[1]]></FIELDLENGTH>
+<!--4028C9BC2DA5C491012DA6314782037F-->  <DEFAULTVALUE><![CDATA[N]]></DEFAULTVALUE>
+<!--4028C9BC2DA5C491012DA6314782037F-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--4028C9BC2DA5C491012DA6314782037F-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--4028C9BC2DA5C491012DA6314782037F-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
+<!--4028C9BC2DA5C491012DA6314782037F-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--4028C9BC2DA5C491012DA6314782037F-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--4028C9BC2DA5C491012DA6314782037F-->  <SEQNO><![CDATA[300]]></SEQNO>
+<!--4028C9BC2DA5C491012DA6314782037F-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--4028C9BC2DA5C491012DA6314782037F-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--4028C9BC2DA5C491012DA6314782037F-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--4028C9BC2DA5C491012DA6314782037F-->  <AD_ELEMENT_ID><![CDATA[4028C9BC2DA5C491012DA62C5F6E0362]]></AD_ELEMENT_ID>
+<!--4028C9BC2DA5C491012DA6314782037F-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--4028C9BC2DA5C491012DA6314782037F-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--4028C9BC2DA5C491012DA6314782037F-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--4028C9BC2DA5C491012DA6314782037F-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--4028C9BC2DA5C491012DA6314782037F-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--4028C9BC2DA5C491012DA6314782037F-->  <POSITION><![CDATA[30]]></POSITION>
+<!--4028C9BC2DA5C491012DA6314782037F-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--4028C9BC2DA5C491012DA6314782037F-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
+<!--4028C9BC2DA5C491012DA6314782037F-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
+<!--4028C9BC2DA5C491012DA6314782037F--></AD_COLUMN>
+
+<!--4028C9BC2DA5C491012DA636918F038B--><AD_COLUMN>
+<!--4028C9BC2DA5C491012DA636918F038B-->  <AD_COLUMN_ID><![CDATA[4028C9BC2DA5C491012DA636918F038B]]></AD_COLUMN_ID>
+<!--4028C9BC2DA5C491012DA636918F038B-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--4028C9BC2DA5C491012DA636918F038B-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--4028C9BC2DA5C491012DA636918F038B-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--4028C9BC2DA5C491012DA636918F038B-->  <NAME><![CDATA[Payin_IsMulticurrency]]></NAME>
+<!--4028C9BC2DA5C491012DA636918F038B-->  <HELP><![CDATA[Allow Receipt of Payments in Other Currencies]]></HELP>
+<!--4028C9BC2DA5C491012DA636918F038B-->  <COLUMNNAME><![CDATA[Payin_IsMulticurrency]]></COLUMNNAME>
+<!--4028C9BC2DA5C491012DA636918F038B-->  <AD_TABLE_ID><![CDATA[AC389EBD8A774AAE8223A77F692983D8]]></AD_TABLE_ID>
+<!--4028C9BC2DA5C491012DA636918F038B-->  <AD_REFERENCE_ID><![CDATA[20]]></AD_REFERENCE_ID>
+<!--4028C9BC2DA5C491012DA636918F038B-->  <FIELDLENGTH><![CDATA[1]]></FIELDLENGTH>
+<!--4028C9BC2DA5C491012DA636918F038B-->  <DEFAULTVALUE><![CDATA[N]]></DEFAULTVALUE>
+<!--4028C9BC2DA5C491012DA636918F038B-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--4028C9BC2DA5C491012DA636918F038B-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--4028C9BC2DA5C491012DA636918F038B-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
+<!--4028C9BC2DA5C491012DA636918F038B-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--4028C9BC2DA5C491012DA636918F038B-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--4028C9BC2DA5C491012DA636918F038B-->  <SEQNO><![CDATA[290]]></SEQNO>
+<!--4028C9BC2DA5C491012DA636918F038B-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--4028C9BC2DA5C491012DA636918F038B-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--4028C9BC2DA5C491012DA636918F038B-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--4028C9BC2DA5C491012DA636918F038B-->  <AD_ELEMENT_ID><![CDATA[4028C9BC2DA5C491012DA6286A6A0357]]></AD_ELEMENT_ID>
+<!--4028C9BC2DA5C491012DA636918F038B-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--4028C9BC2DA5C491012DA636918F038B-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--4028C9BC2DA5C491012DA636918F038B-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--4028C9BC2DA5C491012DA636918F038B-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--4028C9BC2DA5C491012DA636918F038B-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--4028C9BC2DA5C491012DA636918F038B-->  <POSITION><![CDATA[29]]></POSITION>
+<!--4028C9BC2DA5C491012DA636918F038B-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--4028C9BC2DA5C491012DA636918F038B-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
+<!--4028C9BC2DA5C491012DA636918F038B-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
+<!--4028C9BC2DA5C491012DA636918F038B--></AD_COLUMN>
+
+<!--4028C9BC2DA5C491012DA6378598038E--><AD_COLUMN>
+<!--4028C9BC2DA5C491012DA6378598038E-->  <AD_COLUMN_ID><![CDATA[4028C9BC2DA5C491012DA6378598038E]]></AD_COLUMN_ID>
+<!--4028C9BC2DA5C491012DA6378598038E-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--4028C9BC2DA5C491012DA6378598038E-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--4028C9BC2DA5C491012DA6378598038E-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--4028C9BC2DA5C491012DA6378598038E-->  <NAME><![CDATA[Payout_IsMulticurrency]]></NAME>
+<!--4028C9BC2DA5C491012DA6378598038E-->  <HELP><![CDATA[Allow withdrawl of Payments in Other Currencies]]></HELP>
+<!--4028C9BC2DA5C491012DA6378598038E-->  <COLUMNNAME><![CDATA[Payout_IsMulticurrency]]></COLUMNNAME>
+<!--4028C9BC2DA5C491012DA6378598038E-->  <AD_TABLE_ID><![CDATA[AC389EBD8A774AAE8223A77F692983D8]]></AD_TABLE_ID>
+<!--4028C9BC2DA5C491012DA6378598038E-->  <AD_REFERENCE_ID><![CDATA[20]]></AD_REFERENCE_ID>
+<!--4028C9BC2DA5C491012DA6378598038E-->  <FIELDLENGTH><![CDATA[1]]></FIELDLENGTH>
+<!--4028C9BC2DA5C491012DA6378598038E-->  <DEFAULTVALUE><![CDATA[N]]></DEFAULTVALUE>
+<!--4028C9BC2DA5C491012DA6378598038E-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--4028C9BC2DA5C491012DA6378598038E-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--4028C9BC2DA5C491012DA6378598038E-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
+<!--4028C9BC2DA5C491012DA6378598038E-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--4028C9BC2DA5C491012DA6378598038E-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--4028C9BC2DA5C491012DA6378598038E-->  <SEQNO><![CDATA[300]]></SEQNO>
+<!--4028C9BC2DA5C491012DA6378598038E-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--4028C9BC2DA5C491012DA6378598038E-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--4028C9BC2DA5C491012DA6378598038E-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--4028C9BC2DA5C491012DA6378598038E-->  <AD_ELEMENT_ID><![CDATA[4028C9BC2DA5C491012DA62C5F6E0362]]></AD_ELEMENT_ID>
+<!--4028C9BC2DA5C491012DA6378598038E-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--4028C9BC2DA5C491012DA6378598038E-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--4028C9BC2DA5C491012DA6378598038E-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--4028C9BC2DA5C491012DA6378598038E-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--4028C9BC2DA5C491012DA6378598038E-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--4028C9BC2DA5C491012DA6378598038E-->  <POSITION><![CDATA[30]]></POSITION>
+<!--4028C9BC2DA5C491012DA6378598038E-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--4028C9BC2DA5C491012DA6378598038E-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
+<!--4028C9BC2DA5C491012DA6378598038E-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
+<!--4028C9BC2DA5C491012DA6378598038E--></AD_COLUMN>
+
+<!--4028C9BC2DA5C491012DA6832A1003A8--><AD_COLUMN>
+<!--4028C9BC2DA5C491012DA6832A1003A8-->  <AD_COLUMN_ID><![CDATA[4028C9BC2DA5C491012DA6832A1003A8]]></AD_COLUMN_ID>
+<!--4028C9BC2DA5C491012DA6832A1003A8-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--4028C9BC2DA5C491012DA6832A1003A8-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--4028C9BC2DA5C491012DA6832A1003A8-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--4028C9BC2DA5C491012DA6832A1003A8-->  <NAME><![CDATA[Financial Transaction Convert Rate]]></NAME>
+<!--4028C9BC2DA5C491012DA6832A1003A8-->  <DESCRIPTION><![CDATA[Exchange rate used to convert payment to financial account currency]]></DESCRIPTION>
+<!--4028C9BC2DA5C491012DA6832A1003A8-->  <HELP><![CDATA[The exchange rate used to convert the payment amount to the financial account amount]]></HELP>
+<!--4028C9BC2DA5C491012DA6832A1003A8-->  <COLUMNNAME><![CDATA[Finacc_Txn_Convert_Rate]]></COLUMNNAME>
+<!--4028C9BC2DA5C491012DA6832A1003A8-->  <AD_TABLE_ID><![CDATA[D1A97202E832470285C9B1EB026D54E2]]></AD_TABLE_ID>
+<!--4028C9BC2DA5C491012DA6832A1003A8-->  <AD_REFERENCE_ID><![CDATA[800019]]></AD_REFERENCE_ID>
+<!--4028C9BC2DA5C491012DA6832A1003A8-->  <FIELDLENGTH><![CDATA[12]]></FIELDLENGTH>
+<!--4028C9BC2DA5C491012DA6832A1003A8-->  <DEFAULTVALUE><![CDATA[1.0]]></DEFAULTVALUE>
+<!--4028C9BC2DA5C491012DA6832A1003A8-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--4028C9BC2DA5C491012DA6832A1003A8-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--4028C9BC2DA5C491012DA6832A1003A8-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
+<!--4028C9BC2DA5C491012DA6832A1003A8-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--4028C9BC2DA5C491012DA6832A1003A8-->  <READONLYLOGIC><![CDATA[@Processed@='Y']]></READONLYLOGIC>
+<!--4028C9BC2DA5C491012DA6832A1003A8-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--4028C9BC2DA5C491012DA6832A1003A8-->  <SEQNO><![CDATA[430]]></SEQNO>
+<!--4028C9BC2DA5C491012DA6832A1003A8-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--4028C9BC2DA5C491012DA6832A1003A8-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--4028C9BC2DA5C491012DA6832A1003A8-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--4028C9BC2DA5C491012DA6832A1003A8-->  <AD_ELEMENT_ID><![CDATA[4028C9BC2DA5C491012DA6801B4E03A2]]></AD_ELEMENT_ID>
+<!--4028C9BC2DA5C491012DA6832A1003A8-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--4028C9BC2DA5C491012DA6832A1003A8-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--4028C9BC2DA5C491012DA6832A1003A8-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--4028C9BC2DA5C491012DA6832A1003A8-->  <AD_CALLOUT_ID><![CDATA[40289C202E28D30F012E2906FF350058]]></AD_CALLOUT_ID>
+<!--4028C9BC2DA5C491012DA6832A1003A8-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--4028C9BC2DA5C491012DA6832A1003A8-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--4028C9BC2DA5C491012DA6832A1003A8-->  <POSITION><![CDATA[37]]></POSITION>
+<!--4028C9BC2DA5C491012DA6832A1003A8-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--4028C9BC2DA5C491012DA6832A1003A8-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
+<!--4028C9BC2DA5C491012DA6832A1003A8-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
+<!--4028C9BC2DA5C491012DA6832A1003A8--></AD_COLUMN>
+
+<!--4028C9BC2DA5C491012DA689D11F03BD--><AD_COLUMN>
+<!--4028C9BC2DA5C491012DA689D11F03BD-->  <AD_COLUMN_ID><![CDATA[4028C9BC2DA5C491012DA689D11F03BD]]></AD_COLUMN_ID>
+<!--4028C9BC2DA5C491012DA689D11F03BD-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--4028C9BC2DA5C491012DA689D11F03BD-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--4028C9BC2DA5C491012DA689D11F03BD-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--4028C9BC2DA5C491012DA689D11F03BD-->  <NAME><![CDATA[Financial Transaction Amount]]></NAME>
+<!--4028C9BC2DA5C491012DA689D11F03BD-->  <DESCRIPTION><![CDATA[Amount received in currency of financial account]]></DESCRIPTION>
+<!--4028C9BC2DA5C491012DA689D11F03BD-->  <HELP><![CDATA[The total amount of the payment, converted to the currency of the financial account.]]></HELP>
+<!--4028C9BC2DA5C491012DA689D11F03BD-->  <COLUMNNAME><![CDATA[Finacc_Txn_Amount]]></COLUMNNAME>
+<!--4028C9BC2DA5C491012DA689D11F03BD-->  <AD_TABLE_ID><![CDATA[D1A97202E832470285C9B1EB026D54E2]]></AD_TABLE_ID>
+<!--4028C9BC2DA5C491012DA689D11F03BD-->  <AD_REFERENCE_ID><![CDATA[12]]></AD_REFERENCE_ID>
+<!--4028C9BC2DA5C491012DA689D11F03BD-->  <FIELDLENGTH><![CDATA[22]]></FIELDLENGTH>
+<!--4028C9BC2DA5C491012DA689D11F03BD-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--4028C9BC2DA5C491012DA689D11F03BD-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--4028C9BC2DA5C491012DA689D11F03BD-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
+<!--4028C9BC2DA5C491012DA689D11F03BD-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--4028C9BC2DA5C491012DA689D11F03BD-->  <READONLYLOGIC><![CDATA[@Processed@='Y']]></READONLYLOGIC>
+<!--4028C9BC2DA5C491012DA689D11F03BD-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--4028C9BC2DA5C491012DA689D11F03BD-->  <SEQNO><![CDATA[440]]></SEQNO>
+<!--4028C9BC2DA5C491012DA689D11F03BD-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--4028C9BC2DA5C491012DA689D11F03BD-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--4028C9BC2DA5C491012DA689D11F03BD-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--4028C9BC2DA5C491012DA689D11F03BD-->  <AD_ELEMENT_ID><![CDATA[4028C9BC2DA5C491012DA688C30003B9]]></AD_ELEMENT_ID>
+<!--4028C9BC2DA5C491012DA689D11F03BD-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--4028C9BC2DA5C491012DA689D11F03BD-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--4028C9BC2DA5C491012DA689D11F03BD-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--4028C9BC2DA5C491012DA689D11F03BD-->  <AD_CALLOUT_ID><![CDATA[40289C202E28D30F012E2907AA10005D]]></AD_CALLOUT_ID>
+<!--4028C9BC2DA5C491012DA689D11F03BD-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--4028C9BC2DA5C491012DA689D11F03BD-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--4028C9BC2DA5C491012DA689D11F03BD-->  <POSITION><![CDATA[38]]></POSITION>
+<!--4028C9BC2DA5C491012DA689D11F03BD-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--4028C9BC2DA5C491012DA689D11F03BD-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
+<!--4028C9BC2DA5C491012DA689D11F03BD-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
+<!--4028C9BC2DA5C491012DA689D11F03BD--></AD_COLUMN>
+
 <!--40BF00579CF84E8EA5ED994BA4AB322F--><AD_COLUMN>
 <!--40BF00579CF84E8EA5ED994BA4AB322F-->  <AD_COLUMN_ID><![CDATA[40BF00579CF84E8EA5ED994BA4AB322F]]></AD_COLUMN_ID>
 <!--40BF00579CF84E8EA5ED994BA4AB322F-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -210624,6 +210863,39 @@
 <!--420D477883C54FCA861F534FF2C630D9-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
 <!--420D477883C54FCA861F534FF2C630D9--></AD_COLUMN>
 
+<!--428E1C9A367B45CDB3766C928FAE5BF7--><AD_COLUMN>
+<!--428E1C9A367B45CDB3766C928FAE5BF7-->  <AD_COLUMN_ID><![CDATA[428E1C9A367B45CDB3766C928FAE5BF7]]></AD_COLUMN_ID>
+<!--428E1C9A367B45CDB3766C928FAE5BF7-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--428E1C9A367B45CDB3766C928FAE5BF7-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--428E1C9A367B45CDB3766C928FAE5BF7-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--428E1C9A367B45CDB3766C928FAE5BF7-->  <NAME><![CDATA[Foreign Currency]]></NAME>
+<!--428E1C9A367B45CDB3766C928FAE5BF7-->  <DESCRIPTION><![CDATA[The currency that transaction was made in if it was different to the account currency]]></DESCRIPTION>
+<!--428E1C9A367B45CDB3766C928FAE5BF7-->  <COLUMNNAME><![CDATA[Foreign_Currency_ID]]></COLUMNNAME>
+<!--428E1C9A367B45CDB3766C928FAE5BF7-->  <AD_TABLE_ID><![CDATA[4D8C3B3C31D1410DA046140C9F024D17]]></AD_TABLE_ID>
+<!--428E1C9A367B45CDB3766C928FAE5BF7-->  <AD_REFERENCE_ID><![CDATA[18]]></AD_REFERENCE_ID>
+<!--428E1C9A367B45CDB3766C928FAE5BF7-->  <AD_REFERENCE_VALUE_ID><![CDATA[112]]></AD_REFERENCE_VALUE_ID>
+<!--428E1C9A367B45CDB3766C928FAE5BF7-->  <FIELDLENGTH><![CDATA[32]]></FIELDLENGTH>
+<!--428E1C9A367B45CDB3766C928FAE5BF7-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--428E1C9A367B45CDB3766C928FAE5BF7-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--428E1C9A367B45CDB3766C928FAE5BF7-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
+<!--428E1C9A367B45CDB3766C928FAE5BF7-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--428E1C9A367B45CDB3766C928FAE5BF7-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--428E1C9A367B45CDB3766C928FAE5BF7-->  <SEQNO><![CDATA[340]]></SEQNO>
+<!--428E1C9A367B45CDB3766C928FAE5BF7-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--428E1C9A367B45CDB3766C928FAE5BF7-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--428E1C9A367B45CDB3766C928FAE5BF7-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--428E1C9A367B45CDB3766C928FAE5BF7-->  <AD_ELEMENT_ID><![CDATA[4028C9BC2E78EF43012E78FD91500018]]></AD_ELEMENT_ID>
+<!--428E1C9A367B45CDB3766C928FAE5BF7-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--428E1C9A367B45CDB3766C928FAE5BF7-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--428E1C9A367B45CDB3766C928FAE5BF7-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--428E1C9A367B45CDB3766C928FAE5BF7-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--428E1C9A367B45CDB3766C928FAE5BF7-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--428E1C9A367B45CDB3766C928FAE5BF7-->  <POSITION><![CDATA[31]]></POSITION>
+<!--428E1C9A367B45CDB3766C928FAE5BF7-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--428E1C9A367B45CDB3766C928FAE5BF7-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
+<!--428E1C9A367B45CDB3766C928FAE5BF7-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
+<!--428E1C9A367B45CDB3766C928FAE5BF7--></AD_COLUMN>
+
 <!--4307F92C33EE4249A54AD71ED02F02E6--><AD_COLUMN>
 <!--4307F92C33EE4249A54AD71ED02F02E6-->  <AD_COLUMN_ID><![CDATA[4307F92C33EE4249A54AD71ED02F02E6]]></AD_COLUMN_ID>
 <!--4307F92C33EE4249A54AD71ED02F02E6-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -210962,6 +211234,38 @@
 <!--467F96E0F2BE11DDABCF001D09C4A2FE-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
 <!--467F96E0F2BE11DDABCF001D09C4A2FE--></AD_COLUMN>
 
+<!--4681935824194451A79856A9ECA3757F--><AD_COLUMN>
+<!--4681935824194451A79856A9ECA3757F-->  <AD_COLUMN_ID><![CDATA[4681935824194451A79856A9ECA3757F]]></AD_COLUMN_ID>
+<!--4681935824194451A79856A9ECA3757F-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--4681935824194451A79856A9ECA3757F-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--4681935824194451A79856A9ECA3757F-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--4681935824194451A79856A9ECA3757F-->  <NAME><![CDATA[Foreign Amount]]></NAME>
+<!--4681935824194451A79856A9ECA3757F-->  <DESCRIPTION><![CDATA[Amount of transaction in foreign currency]]></DESCRIPTION>
+<!--4681935824194451A79856A9ECA3757F-->  <COLUMNNAME><![CDATA[Foreign_Amount]]></COLUMNNAME>
+<!--4681935824194451A79856A9ECA3757F-->  <AD_TABLE_ID><![CDATA[4D8C3B3C31D1410DA046140C9F024D17]]></AD_TABLE_ID>
+<!--4681935824194451A79856A9ECA3757F-->  <AD_REFERENCE_ID><![CDATA[12]]></AD_REFERENCE_ID>
+<!--4681935824194451A79856A9ECA3757F-->  <FIELDLENGTH><![CDATA[22]]></FIELDLENGTH>
+<!--4681935824194451A79856A9ECA3757F-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--4681935824194451A79856A9ECA3757F-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--4681935824194451A79856A9ECA3757F-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
+<!--4681935824194451A79856A9ECA3757F-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--4681935824194451A79856A9ECA3757F-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--4681935824194451A79856A9ECA3757F-->  <SEQNO><![CDATA[330]]></SEQNO>
+<!--4681935824194451A79856A9ECA3757F-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--4681935824194451A79856A9ECA3757F-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--4681935824194451A79856A9ECA3757F-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--4681935824194451A79856A9ECA3757F-->  <AD_ELEMENT_ID><![CDATA[4028C9BC2E5AD1A6012E5B5B44820037]]></AD_ELEMENT_ID>
+<!--4681935824194451A79856A9ECA3757F-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--4681935824194451A79856A9ECA3757F-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--4681935824194451A79856A9ECA3757F-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--4681935824194451A79856A9ECA3757F-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--4681935824194451A79856A9ECA3757F-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--4681935824194451A79856A9ECA3757F-->  <POSITION><![CDATA[33]]></POSITION>
+<!--4681935824194451A79856A9ECA3757F-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--4681935824194451A79856A9ECA3757F-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
+<!--4681935824194451A79856A9ECA3757F-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
+<!--4681935824194451A79856A9ECA3757F--></AD_COLUMN>
+
 <!--468394CAF2BE11DDA483001D09C4A2FE--><AD_COLUMN>
 <!--468394CAF2BE11DDA483001D09C4A2FE-->  <AD_COLUMN_ID><![CDATA[468394CAF2BE11DDA483001D09C4A2FE]]></AD_COLUMN_ID>
 <!--468394CAF2BE11DDA483001D09C4A2FE-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -229165,7 +229469,7 @@
 <!--6B105FAB5EBA4DB19DF94843871191DC-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
 <!--6B105FAB5EBA4DB19DF94843871191DC-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
 <!--6B105FAB5EBA4DB19DF94843871191DC-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
-<!--6B105FAB5EBA4DB19DF94843871191DC-->  <POSITION><![CDATA[27]]></POSITION>
+<!--6B105FAB5EBA4DB19DF94843871191DC-->  <POSITION><![CDATA[24]]></POSITION>
 <!--6B105FAB5EBA4DB19DF94843871191DC-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
 <!--6B105FAB5EBA4DB19DF94843871191DC-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
 <!--6B105FAB5EBA4DB19DF94843871191DC-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
@@ -233019,6 +233323,7 @@
 <!--7891269C83DB655DE040007F010155CE-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
 <!--7891269C83DB655DE040007F010155CE-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
 <!--7891269C83DB655DE040007F010155CE-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--7891269C83DB655DE040007F010155CE-->  <AD_CALLOUT_ID><![CDATA[40289C202E28D30F012E29062DCC004E]]></AD_CALLOUT_ID>
 <!--7891269C83DB655DE040007F010155CE-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
 <!--7891269C83DB655DE040007F010155CE-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--7891269C83DB655DE040007F010155CE-->  <POSITION><![CDATA[2]]></POSITION>
@@ -233044,6 +233349,7 @@
 <!--7891269C83DC655DE040007F010155CE-->  <ISPARENT><![CDATA[N]]></ISPARENT>
 <!--7891269C83DC655DE040007F010155CE-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
 <!--7891269C83DC655DE040007F010155CE-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--7891269C83DC655DE040007F010155CE-->  <READONLYLOGIC><![CDATA[@IsMultiCurrencyEnabled@!'Y' | @Processed@='Y']]></READONLYLOGIC>
 <!--7891269C83DC655DE040007F010155CE-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
 <!--7891269C83DC655DE040007F010155CE-->  <SEQNO><![CDATA[130]]></SEQNO>
 <!--7891269C83DC655DE040007F010155CE-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
@@ -233053,6 +233359,7 @@
 <!--7891269C83DC655DE040007F010155CE-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
 <!--7891269C83DC655DE040007F010155CE-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
 <!--7891269C83DC655DE040007F010155CE-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--7891269C83DC655DE040007F010155CE-->  <AD_CALLOUT_ID><![CDATA[40289C202E28D30F012E29062DCC004E]]></AD_CALLOUT_ID>
 <!--7891269C83DC655DE040007F010155CE-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
 <!--7891269C83DC655DE040007F010155CE-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--7891269C83DC655DE040007F010155CE-->  <POSITION><![CDATA[12]]></POSITION>
@@ -233086,6 +233393,7 @@
 <!--7891269C83DD655DE040007F010155CE-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
 <!--7891269C83DD655DE040007F010155CE-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
 <!--7891269C83DD655DE040007F010155CE-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--7891269C83DD655DE040007F010155CE-->  <AD_CALLOUT_ID><![CDATA[40289C202E28D30F012E2906FF350058]]></AD_CALLOUT_ID>
 <!--7891269C83DD655DE040007F010155CE-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
 <!--7891269C83DD655DE040007F010155CE-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--7891269C83DD655DE040007F010155CE-->  <POSITION><![CDATA[4]]></POSITION>
@@ -238212,6 +238520,38 @@
 <!--7FDC7A18D86783EAE040007F01012E08-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
 <!--7FDC7A18D86783EAE040007F01012E08--></AD_COLUMN>
 
+<!--7FE86FDF1A7F4EB8B2106557A276D67D--><AD_COLUMN>
+<!--7FE86FDF1A7F4EB8B2106557A276D67D-->  <AD_COLUMN_ID><![CDATA[7FE86FDF1A7F4EB8B2106557A276D67D]]></AD_COLUMN_ID>
+<!--7FE86FDF1A7F4EB8B2106557A276D67D-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--7FE86FDF1A7F4EB8B2106557A276D67D-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--7FE86FDF1A7F4EB8B2106557A276D67D-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--7FE86FDF1A7F4EB8B2106557A276D67D-->  <NAME><![CDATA[Foreign Conversion Rate]]></NAME>
+<!--7FE86FDF1A7F4EB8B2106557A276D67D-->  <DESCRIPTION><![CDATA[Conversion rate between foreign currency & financial account currency]]></DESCRIPTION>
+<!--7FE86FDF1A7F4EB8B2106557A276D67D-->  <COLUMNNAME><![CDATA[Foreign_Convert_Rate]]></COLUMNNAME>
+<!--7FE86FDF1A7F4EB8B2106557A276D67D-->  <AD_TABLE_ID><![CDATA[4D8C3B3C31D1410DA046140C9F024D17]]></AD_TABLE_ID>
+<!--7FE86FDF1A7F4EB8B2106557A276D67D-->  <AD_REFERENCE_ID><![CDATA[800019]]></AD_REFERENCE_ID>
+<!--7FE86FDF1A7F4EB8B2106557A276D67D-->  <FIELDLENGTH><![CDATA[12]]></FIELDLENGTH>
+<!--7FE86FDF1A7F4EB8B2106557A276D67D-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--7FE86FDF1A7F4EB8B2106557A276D67D-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--7FE86FDF1A7F4EB8B2106557A276D67D-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
+<!--7FE86FDF1A7F4EB8B2106557A276D67D-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--7FE86FDF1A7F4EB8B2106557A276D67D-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--7FE86FDF1A7F4EB8B2106557A276D67D-->  <SEQNO><![CDATA[320]]></SEQNO>
+<!--7FE86FDF1A7F4EB8B2106557A276D67D-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--7FE86FDF1A7F4EB8B2106557A276D67D-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--7FE86FDF1A7F4EB8B2106557A276D67D-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--7FE86FDF1A7F4EB8B2106557A276D67D-->  <AD_ELEMENT_ID><![CDATA[4028C9BC2E78EF43012E78FE3130001E]]></AD_ELEMENT_ID>
+<!--7FE86FDF1A7F4EB8B2106557A276D67D-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--7FE86FDF1A7F4EB8B2106557A276D67D-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--7FE86FDF1A7F4EB8B2106557A276D67D-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--7FE86FDF1A7F4EB8B2106557A276D67D-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--7FE86FDF1A7F4EB8B2106557A276D67D-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--7FE86FDF1A7F4EB8B2106557A276D67D-->  <POSITION><![CDATA[32]]></POSITION>
+<!--7FE86FDF1A7F4EB8B2106557A276D67D-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--7FE86FDF1A7F4EB8B2106557A276D67D-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
+<!--7FE86FDF1A7F4EB8B2106557A276D67D-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
+<!--7FE86FDF1A7F4EB8B2106557A276D67D--></AD_COLUMN>
+
 <!--7FF2234748E7844FE040007F01003861--><AD_COLUMN>
 <!--7FF2234748E7844FE040007F01003861-->  <AD_COLUMN_ID><![CDATA[7FF2234748E7844FE040007F01003861]]></AD_COLUMN_ID>
 <!--7FF2234748E7844FE040007F01003861-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -243214,6 +243554,7 @@
 <!--8208AE0F929A4E3CA8FA6E09C2951D6C-->  <ISPARENT><![CDATA[N]]></ISPARENT>
 <!--8208AE0F929A4E3CA8FA6E09C2951D6C-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
 <!--8208AE0F929A4E3CA8FA6E09C2951D6C-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--8208AE0F929A4E3CA8FA6E09C2951D6C-->  <READONLYLOGIC><![CDATA[@IsMultiCurrencyEnabled@!'Y' | @Processed@='Y']]></READONLYLOGIC>
 <!--8208AE0F929A4E3CA8FA6E09C2951D6C-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
 <!--8208AE0F929A4E3CA8FA6E09C2951D6C-->  <SEQNO><![CDATA[140]]></SEQNO>
 <!--8208AE0F929A4E3CA8FA6E09C2951D6C-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
@@ -243223,6 +243564,7 @@
 <!--8208AE0F929A4E3CA8FA6E09C2951D6C-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
 <!--8208AE0F929A4E3CA8FA6E09C2951D6C-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
 <!--8208AE0F929A4E3CA8FA6E09C2951D6C-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--8208AE0F929A4E3CA8FA6E09C2951D6C-->  <AD_CALLOUT_ID><![CDATA[40289C202E28D30F012E29062DCC004E]]></AD_CALLOUT_ID>
 <!--8208AE0F929A4E3CA8FA6E09C2951D6C-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
 <!--8208AE0F929A4E3CA8FA6E09C2951D6C-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--8208AE0F929A4E3CA8FA6E09C2951D6C-->  <POSITION><![CDATA[14]]></POSITION>
@@ -246018,6 +246360,39 @@
 <!--84BE5A55A365CEFEE040007F01000402-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
 <!--84BE5A55A365CEFEE040007F01000402--></AD_COLUMN>
 
+<!--85072D35A21C4487A9B16A210878D3C8--><AD_COLUMN>
+<!--85072D35A21C4487A9B16A210878D3C8-->  <AD_COLUMN_ID><![CDATA[85072D35A21C4487A9B16A210878D3C8]]></AD_COLUMN_ID>
+<!--85072D35A21C4487A9B16A210878D3C8-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--85072D35A21C4487A9B16A210878D3C8-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--85072D35A21C4487A9B16A210878D3C8-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--85072D35A21C4487A9B16A210878D3C8-->  <NAME><![CDATA[Finacc_Txn_Convert_Rate]]></NAME>
+<!--85072D35A21C4487A9B16A210878D3C8-->  <DESCRIPTION><![CDATA[Exchange rate used to convert payment to financial account currency]]></DESCRIPTION>
+<!--85072D35A21C4487A9B16A210878D3C8-->  <HELP><![CDATA[The exchange rate used to convert the payment amount to the financial account amount]]></HELP>
+<!--85072D35A21C4487A9B16A210878D3C8-->  <COLUMNNAME><![CDATA[Finacc_Txn_Convert_Rate]]></COLUMNNAME>
+<!--85072D35A21C4487A9B16A210878D3C8-->  <AD_TABLE_ID><![CDATA[DC63963AB3F1489BAAB5A9A7EFD1B407]]></AD_TABLE_ID>
+<!--85072D35A21C4487A9B16A210878D3C8-->  <AD_REFERENCE_ID><![CDATA[800019]]></AD_REFERENCE_ID>
+<!--85072D35A21C4487A9B16A210878D3C8-->  <FIELDLENGTH><![CDATA[12]]></FIELDLENGTH>
+<!--85072D35A21C4487A9B16A210878D3C8-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--85072D35A21C4487A9B16A210878D3C8-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--85072D35A21C4487A9B16A210878D3C8-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
+<!--85072D35A21C4487A9B16A210878D3C8-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--85072D35A21C4487A9B16A210878D3C8-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--85072D35A21C4487A9B16A210878D3C8-->  <SEQNO><![CDATA[330]]></SEQNO>
+<!--85072D35A21C4487A9B16A210878D3C8-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--85072D35A21C4487A9B16A210878D3C8-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--85072D35A21C4487A9B16A210878D3C8-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--85072D35A21C4487A9B16A210878D3C8-->  <AD_ELEMENT_ID><![CDATA[4028C9BC2DA5C491012DA6801B4E03A2]]></AD_ELEMENT_ID>
+<!--85072D35A21C4487A9B16A210878D3C8-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--85072D35A21C4487A9B16A210878D3C8-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--85072D35A21C4487A9B16A210878D3C8-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--85072D35A21C4487A9B16A210878D3C8-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--85072D35A21C4487A9B16A210878D3C8-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--85072D35A21C4487A9B16A210878D3C8-->  <POSITION><![CDATA[27]]></POSITION>
+<!--85072D35A21C4487A9B16A210878D3C8-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--85072D35A21C4487A9B16A210878D3C8-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
+<!--85072D35A21C4487A9B16A210878D3C8-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
+<!--85072D35A21C4487A9B16A210878D3C8--></AD_COLUMN>
+
 <!--8538E7452F8D22E5E040007F010153CC--><AD_COLUMN>
 <!--8538E7452F8D22E5E040007F010153CC-->  <AD_COLUMN_ID><![CDATA[8538E7452F8D22E5E040007F010153CC]]></AD_COLUMN_ID>
 <!--8538E7452F8D22E5E040007F010153CC-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -249464,6 +249839,7 @@
 <!--8B042E0FE87E44F68B30A31E67C1E158-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
 <!--8B042E0FE87E44F68B30A31E67C1E158-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
 <!--8B042E0FE87E44F68B30A31E67C1E158-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--8B042E0FE87E44F68B30A31E67C1E158-->  <AD_CALLOUT_ID><![CDATA[40289C202E28D30F012E290252730036]]></AD_CALLOUT_ID>
 <!--8B042E0FE87E44F68B30A31E67C1E158-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
 <!--8B042E0FE87E44F68B30A31E67C1E158-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--8B042E0FE87E44F68B30A31E67C1E158-->  <POSITION><![CDATA[12]]></POSITION>
@@ -250167,6 +250543,38 @@
 <!--8DD7E4103EDA46AEB7A4692578740286-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
 <!--8DD7E4103EDA46AEB7A4692578740286--></AD_COLUMN>
 
+<!--8DF9D8A154DC4353ACD4F91DA30CA06E--><AD_COLUMN>
+<!--8DF9D8A154DC4353ACD4F91DA30CA06E-->  <AD_COLUMN_ID><![CDATA[8DF9D8A154DC4353ACD4F91DA30CA06E]]></AD_COLUMN_ID>
+<!--8DF9D8A154DC4353ACD4F91DA30CA06E-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--8DF9D8A154DC4353ACD4F91DA30CA06E-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--8DF9D8A154DC4353ACD4F91DA30CA06E-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--8DF9D8A154DC4353ACD4F91DA30CA06E-->  <NAME><![CDATA[Paid Converted]]></NAME>
+<!--8DF9D8A154DC4353ACD4F91DA30CA06E-->  <DESCRIPTION><![CDATA[Amount received in financial account currency]]></DESCRIPTION>
+<!--8DF9D8A154DC4353ACD4F91DA30CA06E-->  <COLUMNNAME><![CDATA[PaidConverted]]></COLUMNNAME>
+<!--8DF9D8A154DC4353ACD4F91DA30CA06E-->  <AD_TABLE_ID><![CDATA[DC63963AB3F1489BAAB5A9A7EFD1B407]]></AD_TABLE_ID>
+<!--8DF9D8A154DC4353ACD4F91DA30CA06E-->  <AD_REFERENCE_ID><![CDATA[12]]></AD_REFERENCE_ID>
+<!--8DF9D8A154DC4353ACD4F91DA30CA06E-->  <FIELDLENGTH><![CDATA[12]]></FIELDLENGTH>
+<!--8DF9D8A154DC4353ACD4F91DA30CA06E-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--8DF9D8A154DC4353ACD4F91DA30CA06E-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--8DF9D8A154DC4353ACD4F91DA30CA06E-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
+<!--8DF9D8A154DC4353ACD4F91DA30CA06E-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--8DF9D8A154DC4353ACD4F91DA30CA06E-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--8DF9D8A154DC4353ACD4F91DA30CA06E-->  <SEQNO><![CDATA[340]]></SEQNO>
+<!--8DF9D8A154DC4353ACD4F91DA30CA06E-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--8DF9D8A154DC4353ACD4F91DA30CA06E-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--8DF9D8A154DC4353ACD4F91DA30CA06E-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--8DF9D8A154DC4353ACD4F91DA30CA06E-->  <AD_ELEMENT_ID><![CDATA[40289C1D2E1245FD012E1270F01E002B]]></AD_ELEMENT_ID>
+<!--8DF9D8A154DC4353ACD4F91DA30CA06E-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--8DF9D8A154DC4353ACD4F91DA30CA06E-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--8DF9D8A154DC4353ACD4F91DA30CA06E-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--8DF9D8A154DC4353ACD4F91DA30CA06E-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--8DF9D8A154DC4353ACD4F91DA30CA06E-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--8DF9D8A154DC4353ACD4F91DA30CA06E-->  <POSITION><![CDATA[28]]></POSITION>
+<!--8DF9D8A154DC4353ACD4F91DA30CA06E-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--8DF9D8A154DC4353ACD4F91DA30CA06E-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
+<!--8DF9D8A154DC4353ACD4F91DA30CA06E-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
+<!--8DF9D8A154DC4353ACD4F91DA30CA06E--></AD_COLUMN>
+
 <!--8E7CC7A39182B541E040007F01004601--><AD_COLUMN>
 <!--8E7CC7A39182B541E040007F01004601-->  <AD_COLUMN_ID><![CDATA[8E7CC7A39182B541E040007F01004601]]></AD_COLUMN_ID>
 <!--8E7CC7A39182B541E040007F01004601-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -250699,6 +251107,38 @@
 <!--90AF0FEC96674CAF824844EA7690357E-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
 <!--90AF0FEC96674CAF824844EA7690357E--></AD_COLUMN>
 
+<!--91375A8F85DF48FFA962C940E9BAF889--><AD_COLUMN>
+<!--91375A8F85DF48FFA962C940E9BAF889-->  <AD_COLUMN_ID><![CDATA[91375A8F85DF48FFA962C940E9BAF889]]></AD_COLUMN_ID>
+<!--91375A8F85DF48FFA962C940E9BAF889-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--91375A8F85DF48FFA962C940E9BAF889-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--91375A8F85DF48FFA962C940E9BAF889-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--91375A8F85DF48FFA962C940E9BAF889-->  <NAME><![CDATA[Expected Converted]]></NAME>
+<!--91375A8F85DF48FFA962C940E9BAF889-->  <DESCRIPTION><![CDATA[Expected amount in the financial account currency]]></DESCRIPTION>
+<!--91375A8F85DF48FFA962C940E9BAF889-->  <COLUMNNAME><![CDATA[ExpectedConverted]]></COLUMNNAME>
+<!--91375A8F85DF48FFA962C940E9BAF889-->  <AD_TABLE_ID><![CDATA[DC63963AB3F1489BAAB5A9A7EFD1B407]]></AD_TABLE_ID>
+<!--91375A8F85DF48FFA962C940E9BAF889-->  <AD_REFERENCE_ID><![CDATA[12]]></AD_REFERENCE_ID>
+<!--91375A8F85DF48FFA962C940E9BAF889-->  <FIELDLENGTH><![CDATA[12]]></FIELDLENGTH>
+<!--91375A8F85DF48FFA962C940E9BAF889-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--91375A8F85DF48FFA962C940E9BAF889-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--91375A8F85DF48FFA962C940E9BAF889-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
+<!--91375A8F85DF48FFA962C940E9BAF889-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--91375A8F85DF48FFA962C940E9BAF889-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--91375A8F85DF48FFA962C940E9BAF889-->  <SEQNO><![CDATA[350]]></SEQNO>
+<!--91375A8F85DF48FFA962C940E9BAF889-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--91375A8F85DF48FFA962C940E9BAF889-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--91375A8F85DF48FFA962C940E9BAF889-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--91375A8F85DF48FFA962C940E9BAF889-->  <AD_ELEMENT_ID><![CDATA[40289C1D2E1245FD012E126A2A5F0020]]></AD_ELEMENT_ID>
+<!--91375A8F85DF48FFA962C940E9BAF889-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--91375A8F85DF48FFA962C940E9BAF889-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--91375A8F85DF48FFA962C940E9BAF889-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--91375A8F85DF48FFA962C940E9BAF889-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--91375A8F85DF48FFA962C940E9BAF889-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--91375A8F85DF48FFA962C940E9BAF889-->  <POSITION><![CDATA[29]]></POSITION>
+<!--91375A8F85DF48FFA962C940E9BAF889-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--91375A8F85DF48FFA962C940E9BAF889-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
+<!--91375A8F85DF48FFA962C940E9BAF889-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
+<!--91375A8F85DF48FFA962C940E9BAF889--></AD_COLUMN>
+
 <!--9150A393672BD51CE040007F01006877--><AD_COLUMN>
 <!--9150A393672BD51CE040007F01006877-->  <AD_COLUMN_ID><![CDATA[9150A393672BD51CE040007F01006877]]></AD_COLUMN_ID>
 <!--9150A393672BD51CE040007F01006877-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -253481,6 +253921,41 @@
 <!--99BE200F6F79031FE040A8C0BD06667A-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
 <!--99BE200F6F79031FE040A8C0BD06667A--></AD_COLUMN>
 
+<!--99E6DCF9068E43C7A699FEAECF28DD5C--><AD_COLUMN>
+<!--99E6DCF9068E43C7A699FEAECF28DD5C-->  <AD_COLUMN_ID><![CDATA[99E6DCF9068E43C7A699FEAECF28DD5C]]></AD_COLUMN_ID>
+<!--99E6DCF9068E43C7A699FEAECF28DD5C-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--99E6DCF9068E43C7A699FEAECF28DD5C-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--99E6DCF9068E43C7A699FEAECF28DD5C-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--99E6DCF9068E43C7A699FEAECF28DD5C-->  <NAME><![CDATA[Financial Transaction Amount]]></NAME>
+<!--99E6DCF9068E43C7A699FEAECF28DD5C-->  <DESCRIPTION><![CDATA[Amount received in currency of financial account]]></DESCRIPTION>
+<!--99E6DCF9068E43C7A699FEAECF28DD5C-->  <HELP><![CDATA[The total amount of the payment, converted to the currency of the financial account.]]></HELP>
+<!--99E6DCF9068E43C7A699FEAECF28DD5C-->  <COLUMNNAME><![CDATA[Finacc_Txn_Amount]]></COLUMNNAME>
+<!--99E6DCF9068E43C7A699FEAECF28DD5C-->  <AD_TABLE_ID><![CDATA[B9437A72163445C59A0A585209C8ECE5]]></AD_TABLE_ID>
+<!--99E6DCF9068E43C7A699FEAECF28DD5C-->  <AD_REFERENCE_ID><![CDATA[800019]]></AD_REFERENCE_ID>
+<!--99E6DCF9068E43C7A699FEAECF28DD5C-->  <FIELDLENGTH><![CDATA[12]]></FIELDLENGTH>
+<!--99E6DCF9068E43C7A699FEAECF28DD5C-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--99E6DCF9068E43C7A699FEAECF28DD5C-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--99E6DCF9068E43C7A699FEAECF28DD5C-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
+<!--99E6DCF9068E43C7A699FEAECF28DD5C-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--99E6DCF9068E43C7A699FEAECF28DD5C-->  <READONLYLOGIC><![CDATA[@Processed@='Y']]></READONLYLOGIC>
+<!--99E6DCF9068E43C7A699FEAECF28DD5C-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--99E6DCF9068E43C7A699FEAECF28DD5C-->  <SEQNO><![CDATA[300]]></SEQNO>
+<!--99E6DCF9068E43C7A699FEAECF28DD5C-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--99E6DCF9068E43C7A699FEAECF28DD5C-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--99E6DCF9068E43C7A699FEAECF28DD5C-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--99E6DCF9068E43C7A699FEAECF28DD5C-->  <AD_ELEMENT_ID><![CDATA[4028C9BC2DA5C491012DA688C30003B9]]></AD_ELEMENT_ID>
+<!--99E6DCF9068E43C7A699FEAECF28DD5C-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--99E6DCF9068E43C7A699FEAECF28DD5C-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--99E6DCF9068E43C7A699FEAECF28DD5C-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--99E6DCF9068E43C7A699FEAECF28DD5C-->  <AD_CALLOUT_ID><![CDATA[40289C202E28D30F012E2907AA10005D]]></AD_CALLOUT_ID>
+<!--99E6DCF9068E43C7A699FEAECF28DD5C-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--99E6DCF9068E43C7A699FEAECF28DD5C-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--99E6DCF9068E43C7A699FEAECF28DD5C-->  <POSITION><![CDATA[29]]></POSITION>
+<!--99E6DCF9068E43C7A699FEAECF28DD5C-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--99E6DCF9068E43C7A699FEAECF28DD5C-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
+<!--99E6DCF9068E43C7A699FEAECF28DD5C-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
+<!--99E6DCF9068E43C7A699FEAECF28DD5C--></AD_COLUMN>
+
 <!--9BAEEE4845E238D8E040007F01002420--><AD_COLUMN>
 <!--9BAEEE4845E238D8E040007F01002420-->  <AD_COLUMN_ID><![CDATA[9BAEEE4845E238D8E040007F01002420]]></AD_COLUMN_ID>
 <!--9BAEEE4845E238D8E040007F01002420-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -257427,6 +257902,42 @@
 <!--D651E163B279486F8F399DC05B63D426-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
 <!--D651E163B279486F8F399DC05B63D426--></AD_COLUMN>
 
+<!--D7915EA89A2941A39C8D2570B0F56FC4--><AD_COLUMN>
+<!--D7915EA89A2941A39C8D2570B0F56FC4-->  <AD_COLUMN_ID><![CDATA[D7915EA89A2941A39C8D2570B0F56FC4]]></AD_COLUMN_ID>
+<!--D7915EA89A2941A39C8D2570B0F56FC4-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--D7915EA89A2941A39C8D2570B0F56FC4-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--D7915EA89A2941A39C8D2570B0F56FC4-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--D7915EA89A2941A39C8D2570B0F56FC4-->  <NAME><![CDATA[Financial Transaction Convert Rate]]></NAME>
+<!--D7915EA89A2941A39C8D2570B0F56FC4-->  <DESCRIPTION><![CDATA[Exchange rate used to convert payment to financial account currency]]></DESCRIPTION>
+<!--D7915EA89A2941A39C8D2570B0F56FC4-->  <HELP><![CDATA[The exchange rate used to convert the payment amount to the financial account amount]]></HELP>
+<!--D7915EA89A2941A39C8D2570B0F56FC4-->  <COLUMNNAME><![CDATA[Finacc_Txn_Convert_Rate]]></COLUMNNAME>
+<!--D7915EA89A2941A39C8D2570B0F56FC4-->  <AD_TABLE_ID><![CDATA[B9437A72163445C59A0A585209C8ECE5]]></AD_TABLE_ID>
+<!--D7915EA89A2941A39C8D2570B0F56FC4-->  <AD_REFERENCE_ID><![CDATA[800019]]></AD_REFERENCE_ID>
+<!--D7915EA89A2941A39C8D2570B0F56FC4-->  <FIELDLENGTH><![CDATA[12]]></FIELDLENGTH>
+<!--D7915EA89A2941A39C8D2570B0F56FC4-->  <DEFAULTVALUE><![CDATA[1]]></DEFAULTVALUE>
+<!--D7915EA89A2941A39C8D2570B0F56FC4-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--D7915EA89A2941A39C8D2570B0F56FC4-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--D7915EA89A2941A39C8D2570B0F56FC4-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
+<!--D7915EA89A2941A39C8D2570B0F56FC4-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--D7915EA89A2941A39C8D2570B0F56FC4-->  <READONLYLOGIC><![CDATA[@Processed@='Y']]></READONLYLOGIC>
+<!--D7915EA89A2941A39C8D2570B0F56FC4-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--D7915EA89A2941A39C8D2570B0F56FC4-->  <SEQNO><![CDATA[290]]></SEQNO>
+<!--D7915EA89A2941A39C8D2570B0F56FC4-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--D7915EA89A2941A39C8D2570B0F56FC4-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--D7915EA89A2941A39C8D2570B0F56FC4-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--D7915EA89A2941A39C8D2570B0F56FC4-->  <AD_ELEMENT_ID><![CDATA[4028C9BC2DA5C491012DA6801B4E03A2]]></AD_ELEMENT_ID>
+<!--D7915EA89A2941A39C8D2570B0F56FC4-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--D7915EA89A2941A39C8D2570B0F56FC4-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--D7915EA89A2941A39C8D2570B0F56FC4-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--D7915EA89A2941A39C8D2570B0F56FC4-->  <AD_CALLOUT_ID><![CDATA[40289C202E28D30F012E2906FF350058]]></AD_CALLOUT_ID>
+<!--D7915EA89A2941A39C8D2570B0F56FC4-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--D7915EA89A2941A39C8D2570B0F56FC4-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--D7915EA89A2941A39C8D2570B0F56FC4-->  <POSITION><![CDATA[28]]></POSITION>
+<!--D7915EA89A2941A39C8D2570B0F56FC4-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--D7915EA89A2941A39C8D2570B0F56FC4-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
+<!--D7915EA89A2941A39C8D2570B0F56FC4-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
+<!--D7915EA89A2941A39C8D2570B0F56FC4--></AD_COLUMN>
+
 <!--D8C00B0F9EC14D17AEE6EB72D9E871E1--><AD_COLUMN>
 <!--D8C00B0F9EC14D17AEE6EB72D9E871E1-->  <AD_COLUMN_ID><![CDATA[D8C00B0F9EC14D17AEE6EB72D9E871E1]]></AD_COLUMN_ID>
 <!--D8C00B0F9EC14D17AEE6EB72D9E871E1-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -258216,6 +258727,7 @@
 <!--E9A4CCD256404FDDA9EDDC07F9FCAE4B-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
 <!--E9A4CCD256404FDDA9EDDC07F9FCAE4B-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
 <!--E9A4CCD256404FDDA9EDDC07F9FCAE4B-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--E9A4CCD256404FDDA9EDDC07F9FCAE4B-->  <AD_CALLOUT_ID><![CDATA[40289C202E28D30F012E29062DCC004E]]></AD_CALLOUT_ID>
 <!--E9A4CCD256404FDDA9EDDC07F9FCAE4B-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
 <!--E9A4CCD256404FDDA9EDDC07F9FCAE4B-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--E9A4CCD256404FDDA9EDDC07F9FCAE4B-->  <POSITION><![CDATA[13]]></POSITION>
--- a/src-db/database/sourcedata/AD_ELEMENT.xml	Thu Jun 02 00:27:17 2011 +0200
+++ b/src-db/database/sourcedata/AD_ELEMENT.xml	Thu Jun 02 10:59:08 2011 +0200
@@ -19170,6 +19170,18 @@
 <!--14976679CF0542CDA192111320E142C5-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--14976679CF0542CDA192111320E142C5--></AD_ELEMENT>
 
+<!--15A8F735DFCD4D0DAA01F5EBFA62345B--><AD_ELEMENT>
+<!--15A8F735DFCD4D0DAA01F5EBFA62345B-->  <AD_ELEMENT_ID><![CDATA[15A8F735DFCD4D0DAA01F5EBFA62345B]]></AD_ELEMENT_ID>
+<!--15A8F735DFCD4D0DAA01F5EBFA62345B-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--15A8F735DFCD4D0DAA01F5EBFA62345B-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--15A8F735DFCD4D0DAA01F5EBFA62345B-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--15A8F735DFCD4D0DAA01F5EBFA62345B-->  <COLUMNNAME><![CDATA[Finacc_Currency_ID]]></COLUMNNAME>
+<!--15A8F735DFCD4D0DAA01F5EBFA62345B-->  <NAME><![CDATA[Finacc_Currency_ID]]></NAME>
+<!--15A8F735DFCD4D0DAA01F5EBFA62345B-->  <PRINTNAME><![CDATA[Finacc_Currency_ID]]></PRINTNAME>
+<!--15A8F735DFCD4D0DAA01F5EBFA62345B-->  <DESCRIPTION><![CDATA[The currency of the financial account that payment is associated with]]></DESCRIPTION>
+<!--15A8F735DFCD4D0DAA01F5EBFA62345B-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--15A8F735DFCD4D0DAA01F5EBFA62345B--></AD_ELEMENT>
+
 <!--171C2AFB1127408FAC36225596922954--><AD_ELEMENT>
 <!--171C2AFB1127408FAC36225596922954-->  <AD_ELEMENT_ID><![CDATA[171C2AFB1127408FAC36225596922954]]></AD_ELEMENT_ID>
 <!--171C2AFB1127408FAC36225596922954-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -19426,6 +19438,128 @@
 <!--3FCD839866F5449081AD6E4A1D1BFA7B-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--3FCD839866F5449081AD6E4A1D1BFA7B--></AD_ELEMENT>
 
+<!--40289C1D2E1245FD012E126A2A5F0020--><AD_ELEMENT>
+<!--40289C1D2E1245FD012E126A2A5F0020-->  <AD_ELEMENT_ID><![CDATA[40289C1D2E1245FD012E126A2A5F0020]]></AD_ELEMENT_ID>
+<!--40289C1D2E1245FD012E126A2A5F0020-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--40289C1D2E1245FD012E126A2A5F0020-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--40289C1D2E1245FD012E126A2A5F0020-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--40289C1D2E1245FD012E126A2A5F0020-->  <COLUMNNAME><![CDATA[ExpectedConverted]]></COLUMNNAME>
+<!--40289C1D2E1245FD012E126A2A5F0020-->  <NAME><![CDATA[Expected (Account Currency)]]></NAME>
+<!--40289C1D2E1245FD012E126A2A5F0020-->  <PRINTNAME><![CDATA[Expected (Account Currency)]]></PRINTNAME>
+<!--40289C1D2E1245FD012E126A2A5F0020-->  <DESCRIPTION><![CDATA[Expected amount in the financial account currency]]></DESCRIPTION>
+<!--40289C1D2E1245FD012E126A2A5F0020-->  <PO_NAME><![CDATA[Expected (Account Currency)]]></PO_NAME>
+<!--40289C1D2E1245FD012E126A2A5F0020-->  <PO_PRINTNAME><![CDATA[Expected (Account Currency)]]></PO_PRINTNAME>
+<!--40289C1D2E1245FD012E126A2A5F0020-->  <PO_DESCRIPTION><![CDATA[Expected amount in the financial account currency]]></PO_DESCRIPTION>
+<!--40289C1D2E1245FD012E126A2A5F0020-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--40289C1D2E1245FD012E126A2A5F0020--></AD_ELEMENT>
+
+<!--40289C1D2E1245FD012E1270F01E002B--><AD_ELEMENT>
+<!--40289C1D2E1245FD012E1270F01E002B-->  <AD_ELEMENT_ID><![CDATA[40289C1D2E1245FD012E1270F01E002B]]></AD_ELEMENT_ID>
+<!--40289C1D2E1245FD012E1270F01E002B-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--40289C1D2E1245FD012E1270F01E002B-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--40289C1D2E1245FD012E1270F01E002B-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--40289C1D2E1245FD012E1270F01E002B-->  <COLUMNNAME><![CDATA[PaidConverted]]></COLUMNNAME>
+<!--40289C1D2E1245FD012E1270F01E002B-->  <NAME><![CDATA[Received (Account Currency)]]></NAME>
+<!--40289C1D2E1245FD012E1270F01E002B-->  <PRINTNAME><![CDATA[Received (Account Currency)]]></PRINTNAME>
+<!--40289C1D2E1245FD012E1270F01E002B-->  <DESCRIPTION><![CDATA[Amount received in financial account currency]]></DESCRIPTION>
+<!--40289C1D2E1245FD012E1270F01E002B-->  <PO_NAME><![CDATA[Paid (Account Currency)]]></PO_NAME>
+<!--40289C1D2E1245FD012E1270F01E002B-->  <PO_PRINTNAME><![CDATA[Paid (Account Currency)]]></PO_PRINTNAME>
+<!--40289C1D2E1245FD012E1270F01E002B-->  <PO_DESCRIPTION><![CDATA[Amount paid in financial account currency]]></PO_DESCRIPTION>
+<!--40289C1D2E1245FD012E1270F01E002B-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--40289C1D2E1245FD012E1270F01E002B--></AD_ELEMENT>
+
+<!--4028C9BC2DA5C491012DA6286A6A0357--><AD_ELEMENT>
+<!--4028C9BC2DA5C491012DA6286A6A0357-->  <AD_ELEMENT_ID><![CDATA[4028C9BC2DA5C491012DA6286A6A0357]]></AD_ELEMENT_ID>
+<!--4028C9BC2DA5C491012DA6286A6A0357-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--4028C9BC2DA5C491012DA6286A6A0357-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--4028C9BC2DA5C491012DA6286A6A0357-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--4028C9BC2DA5C491012DA6286A6A0357-->  <COLUMNNAME><![CDATA[Payin_IsMulticurrency]]></COLUMNNAME>
+<!--4028C9BC2DA5C491012DA6286A6A0357-->  <NAME><![CDATA[Receive Payments in Other Currencies]]></NAME>
+<!--4028C9BC2DA5C491012DA6286A6A0357-->  <PRINTNAME><![CDATA[Receive Payments in Other Currencies]]></PRINTNAME>
+<!--4028C9BC2DA5C491012DA6286A6A0357-->  <HELP><![CDATA[Allow Receipt of Payments in Other Currencies]]></HELP>
+<!--4028C9BC2DA5C491012DA6286A6A0357-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--4028C9BC2DA5C491012DA6286A6A0357--></AD_ELEMENT>
+
+<!--4028C9BC2DA5C491012DA62C5F6E0362--><AD_ELEMENT>
+<!--4028C9BC2DA5C491012DA62C5F6E0362-->  <AD_ELEMENT_ID><![CDATA[4028C9BC2DA5C491012DA62C5F6E0362]]></AD_ELEMENT_ID>
+<!--4028C9BC2DA5C491012DA62C5F6E0362-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--4028C9BC2DA5C491012DA62C5F6E0362-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--4028C9BC2DA5C491012DA62C5F6E0362-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--4028C9BC2DA5C491012DA62C5F6E0362-->  <COLUMNNAME><![CDATA[Payout_IsMulticurrency]]></COLUMNNAME>
+<!--4028C9BC2DA5C491012DA62C5F6E0362-->  <NAME><![CDATA[Make Payments in Other Currencies]]></NAME>
+<!--4028C9BC2DA5C491012DA62C5F6E0362-->  <PRINTNAME><![CDATA[Make Payments in Other Currencies]]></PRINTNAME>
+<!--4028C9BC2DA5C491012DA62C5F6E0362-->  <HELP><![CDATA[Allow withdrawl of Payments in Other Currencies]]></HELP>
+<!--4028C9BC2DA5C491012DA62C5F6E0362-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--4028C9BC2DA5C491012DA62C5F6E0362--></AD_ELEMENT>
+
+<!--4028C9BC2DA5C491012DA6801B4E03A2--><AD_ELEMENT>
+<!--4028C9BC2DA5C491012DA6801B4E03A2-->  <AD_ELEMENT_ID><![CDATA[4028C9BC2DA5C491012DA6801B4E03A2]]></AD_ELEMENT_ID>
+<!--4028C9BC2DA5C491012DA6801B4E03A2-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--4028C9BC2DA5C491012DA6801B4E03A2-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--4028C9BC2DA5C491012DA6801B4E03A2-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--4028C9BC2DA5C491012DA6801B4E03A2-->  <COLUMNNAME><![CDATA[Finacc_Txn_Convert_Rate]]></COLUMNNAME>
+<!--4028C9BC2DA5C491012DA6801B4E03A2-->  <NAME><![CDATA[Exchange Rate]]></NAME>
+<!--4028C9BC2DA5C491012DA6801B4E03A2-->  <PRINTNAME><![CDATA[Exchange Rate]]></PRINTNAME>
+<!--4028C9BC2DA5C491012DA6801B4E03A2-->  <DESCRIPTION><![CDATA[Exchange rate used to convert payment to financial account currency]]></DESCRIPTION>
+<!--4028C9BC2DA5C491012DA6801B4E03A2-->  <HELP><![CDATA[The exchange rate used to convert the payment amount to the financial account amount]]></HELP>
+<!--4028C9BC2DA5C491012DA6801B4E03A2-->  <PO_NAME><![CDATA[Exchange Rate]]></PO_NAME>
+<!--4028C9BC2DA5C491012DA6801B4E03A2-->  <PO_PRINTNAME><![CDATA[Exchange Rate]]></PO_PRINTNAME>
+<!--4028C9BC2DA5C491012DA6801B4E03A2-->  <PO_DESCRIPTION><![CDATA[Exchange rate used to convert payment to financial account currency]]></PO_DESCRIPTION>
+<!--4028C9BC2DA5C491012DA6801B4E03A2-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--4028C9BC2DA5C491012DA6801B4E03A2--></AD_ELEMENT>
+
+<!--4028C9BC2DA5C491012DA688C30003B9--><AD_ELEMENT>
+<!--4028C9BC2DA5C491012DA688C30003B9-->  <AD_ELEMENT_ID><![CDATA[4028C9BC2DA5C491012DA688C30003B9]]></AD_ELEMENT_ID>
+<!--4028C9BC2DA5C491012DA688C30003B9-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--4028C9BC2DA5C491012DA688C30003B9-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--4028C9BC2DA5C491012DA688C30003B9-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--4028C9BC2DA5C491012DA688C30003B9-->  <COLUMNNAME><![CDATA[Finacc_Txn_Amount]]></COLUMNNAME>
+<!--4028C9BC2DA5C491012DA688C30003B9-->  <NAME><![CDATA[Received (Financial Account)]]></NAME>
+<!--4028C9BC2DA5C491012DA688C30003B9-->  <PRINTNAME><![CDATA[Received (Financial Account)]]></PRINTNAME>
+<!--4028C9BC2DA5C491012DA688C30003B9-->  <DESCRIPTION><![CDATA[Amount received in currency of financial account]]></DESCRIPTION>
+<!--4028C9BC2DA5C491012DA688C30003B9-->  <HELP><![CDATA[The total amount of the payment, converted to the currency of the financial account.]]></HELP>
+<!--4028C9BC2DA5C491012DA688C30003B9-->  <PO_NAME><![CDATA[Paid (Financial Account)]]></PO_NAME>
+<!--4028C9BC2DA5C491012DA688C30003B9-->  <PO_PRINTNAME><![CDATA[Paid (Financial Account)]]></PO_PRINTNAME>
+<!--4028C9BC2DA5C491012DA688C30003B9-->  <PO_DESCRIPTION><![CDATA[Amount paid in currency of financial account]]></PO_DESCRIPTION>
+<!--4028C9BC2DA5C491012DA688C30003B9-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--4028C9BC2DA5C491012DA688C30003B9--></AD_ELEMENT>
+
+<!--4028C9BC2E5AD1A6012E5B5B44820037--><AD_ELEMENT>
+<!--4028C9BC2E5AD1A6012E5B5B44820037-->  <AD_ELEMENT_ID><![CDATA[4028C9BC2E5AD1A6012E5B5B44820037]]></AD_ELEMENT_ID>
+<!--4028C9BC2E5AD1A6012E5B5B44820037-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--4028C9BC2E5AD1A6012E5B5B44820037-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--4028C9BC2E5AD1A6012E5B5B44820037-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--4028C9BC2E5AD1A6012E5B5B44820037-->  <COLUMNNAME><![CDATA[Foreign_Amount]]></COLUMNNAME>
+<!--4028C9BC2E5AD1A6012E5B5B44820037-->  <NAME><![CDATA[Foreign  Amount]]></NAME>
+<!--4028C9BC2E5AD1A6012E5B5B44820037-->  <PRINTNAME><![CDATA[Foreign  Amount]]></PRINTNAME>
+<!--4028C9BC2E5AD1A6012E5B5B44820037-->  <DESCRIPTION><![CDATA[Amount of transaction in foreign currency]]></DESCRIPTION>
+<!--4028C9BC2E5AD1A6012E5B5B44820037-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--4028C9BC2E5AD1A6012E5B5B44820037--></AD_ELEMENT>
+
+<!--4028C9BC2E78EF43012E78FD91500018--><AD_ELEMENT>
+<!--4028C9BC2E78EF43012E78FD91500018-->  <AD_ELEMENT_ID><![CDATA[4028C9BC2E78EF43012E78FD91500018]]></AD_ELEMENT_ID>
+<!--4028C9BC2E78EF43012E78FD91500018-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--4028C9BC2E78EF43012E78FD91500018-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--4028C9BC2E78EF43012E78FD91500018-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--4028C9BC2E78EF43012E78FD91500018-->  <COLUMNNAME><![CDATA[Foreign_Currency_ID]]></COLUMNNAME>
+<!--4028C9BC2E78EF43012E78FD91500018-->  <NAME><![CDATA[Foreign Currency]]></NAME>
+<!--4028C9BC2E78EF43012E78FD91500018-->  <PRINTNAME><![CDATA[Foreign Currency]]></PRINTNAME>
+<!--4028C9BC2E78EF43012E78FD91500018-->  <DESCRIPTION><![CDATA[The currency that transaction was made in if it was different to the account currency]]></DESCRIPTION>
+<!--4028C9BC2E78EF43012E78FD91500018-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--4028C9BC2E78EF43012E78FD91500018--></AD_ELEMENT>
+
+<!--4028C9BC2E78EF43012E78FE3130001E--><AD_ELEMENT>
+<!--4028C9BC2E78EF43012E78FE3130001E-->  <AD_ELEMENT_ID><![CDATA[4028C9BC2E78EF43012E78FE3130001E]]></AD_ELEMENT_ID>
+<!--4028C9BC2E78EF43012E78FE3130001E-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--4028C9BC2E78EF43012E78FE3130001E-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--4028C9BC2E78EF43012E78FE3130001E-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--4028C9BC2E78EF43012E78FE3130001E-->  <COLUMNNAME><![CDATA[Foreign_Convert_Rate]]></COLUMNNAME>
+<!--4028C9BC2E78EF43012E78FE3130001E-->  <NAME><![CDATA[Foreign Conversion Rate]]></NAME>
+<!--4028C9BC2E78EF43012E78FE3130001E-->  <PRINTNAME><![CDATA[Conversion Rate]]></PRINTNAME>
+<!--4028C9BC2E78EF43012E78FE3130001E-->  <DESCRIPTION><![CDATA[Conversion rate between foreign currency & financial account currency]]></DESCRIPTION>
+<!--4028C9BC2E78EF43012E78FE3130001E-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--4028C9BC2E78EF43012E78FE3130001E--></AD_ELEMENT>
+
 <!--40779C622B254653A740320DF4942401--><AD_ELEMENT>
 <!--40779C622B254653A740320DF4942401-->  <AD_ELEMENT_ID><![CDATA[40779C622B254653A740320DF4942401]]></AD_ELEMENT_ID>
 <!--40779C622B254653A740320DF4942401-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src-db/database/sourcedata/AD_FIELD.xml	Thu Jun 02 00:27:17 2011 +0200
+++ b/src-db/database/sourcedata/AD_FIELD.xml	Thu Jun 02 10:59:08 2011 +0200
@@ -161950,6 +161950,30 @@
 <!--04F257152FEA451187F8DA9B3234124C-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
 <!--04F257152FEA451187F8DA9B3234124C--></AD_FIELD>
 
+<!--05262777AD984EF09E1C6EFF71EEAE5F--><AD_FIELD>
+<!--05262777AD984EF09E1C6EFF71EEAE5F-->  <AD_FIELD_ID><![CDATA[05262777AD984EF09E1C6EFF71EEAE5F]]></AD_FIELD_ID>
+<!--05262777AD984EF09E1C6EFF71EEAE5F-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--05262777AD984EF09E1C6EFF71EEAE5F-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--05262777AD984EF09E1C6EFF71EEAE5F-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--05262777AD984EF09E1C6EFF71EEAE5F-->  <NAME><![CDATA[Foreign Conversion Rate]]></NAME>
+<!--05262777AD984EF09E1C6EFF71EEAE5F-->  <DESCRIPTION><![CDATA[Conversion rate between foreign currency & financial account currency]]></DESCRIPTION>
+<!--05262777AD984EF09E1C6EFF71EEAE5F-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--05262777AD984EF09E1C6EFF71EEAE5F-->  <AD_TAB_ID><![CDATA[FF8080812F213146012F2135BC25000E]]></AD_TAB_ID>
+<!--05262777AD984EF09E1C6EFF71EEAE5F-->  <AD_COLUMN_ID><![CDATA[FDE1E0795CDC4A00AC9D587E0D98D319]]></AD_COLUMN_ID>
+<!--05262777AD984EF09E1C6EFF71EEAE5F-->  <ISDISPLAYED><![CDATA[N]]></ISDISPLAYED>
+<!--05262777AD984EF09E1C6EFF71EEAE5F-->  <DISPLAYLENGTH><![CDATA[12]]></DISPLAYLENGTH>
+<!--05262777AD984EF09E1C6EFF71EEAE5F-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--05262777AD984EF09E1C6EFF71EEAE5F-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--05262777AD984EF09E1C6EFF71EEAE5F-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--05262777AD984EF09E1C6EFF71EEAE5F-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--05262777AD984EF09E1C6EFF71EEAE5F-->  <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
+<!--05262777AD984EF09E1C6EFF71EEAE5F-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--05262777AD984EF09E1C6EFF71EEAE5F-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--05262777AD984EF09E1C6EFF71EEAE5F-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--05262777AD984EF09E1C6EFF71EEAE5F-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--05262777AD984EF09E1C6EFF71EEAE5F-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--05262777AD984EF09E1C6EFF71EEAE5F--></AD_FIELD>
+
 <!--0629343F02CA4C2DB79C17D5F05CB3C6--><AD_FIELD>
 <!--0629343F02CA4C2DB79C17D5F05CB3C6-->  <AD_FIELD_ID><![CDATA[0629343F02CA4C2DB79C17D5F05CB3C6]]></AD_FIELD_ID>
 <!--0629343F02CA4C2DB79C17D5F05CB3C6-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -161961,10 +161985,10 @@
 <!--0629343F02CA4C2DB79C17D5F05CB3C6-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
 <!--0629343F02CA4C2DB79C17D5F05CB3C6-->  <AD_TAB_ID><![CDATA[F7A52FDAAA0346EFA07D53C125B40404]]></AD_TAB_ID>
 <!--0629343F02CA4C2DB79C17D5F05CB3C6-->  <AD_COLUMN_ID><![CDATA[7891269C83DC655DE040007F010155CE]]></AD_COLUMN_ID>
-<!--0629343F02CA4C2DB79C17D5F05CB3C6-->  <ISDISPLAYED><![CDATA[N]]></ISDISPLAYED>
+<!--0629343F02CA4C2DB79C17D5F05CB3C6-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
 <!--0629343F02CA4C2DB79C17D5F05CB3C6-->  <DISPLAYLENGTH><![CDATA[19]]></DISPLAYLENGTH>
-<!--0629343F02CA4C2DB79C17D5F05CB3C6-->  <ISREADONLY><![CDATA[Y]]></ISREADONLY>
-<!--0629343F02CA4C2DB79C17D5F05CB3C6-->  <SEQNO><![CDATA[190]]></SEQNO>
+<!--0629343F02CA4C2DB79C17D5F05CB3C6-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--0629343F02CA4C2DB79C17D5F05CB3C6-->  <SEQNO><![CDATA[95]]></SEQNO>
 <!--0629343F02CA4C2DB79C17D5F05CB3C6-->  <ISSAMELINE><![CDATA[Y]]></ISSAMELINE>
 <!--0629343F02CA4C2DB79C17D5F05CB3C6-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--0629343F02CA4C2DB79C17D5F05CB3C6-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
@@ -161973,7 +161997,7 @@
 <!--0629343F02CA4C2DB79C17D5F05CB3C6-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--0629343F02CA4C2DB79C17D5F05CB3C6-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
 <!--0629343F02CA4C2DB79C17D5F05CB3C6-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
-<!--0629343F02CA4C2DB79C17D5F05CB3C6-->  <ISSHOWNINSTATUSBAR><![CDATA[Y]]></ISSHOWNINSTATUSBAR>
+<!--0629343F02CA4C2DB79C17D5F05CB3C6-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
 <!--0629343F02CA4C2DB79C17D5F05CB3C6--></AD_FIELD>
 
 <!--06957965A65E4C919B00878DEAD560C7--><AD_FIELD>
@@ -162394,6 +162418,32 @@
 <!--0FEAE3D3D9D0433D8DE11C24EB9CFB5C-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
 <!--0FEAE3D3D9D0433D8DE11C24EB9CFB5C--></AD_FIELD>
 
+<!--104E8B74FC1A49A685AF98E2071D1FEF--><AD_FIELD>
+<!--104E8B74FC1A49A685AF98E2071D1FEF-->  <AD_FIELD_ID><![CDATA[104E8B74FC1A49A685AF98E2071D1FEF]]></AD_FIELD_ID>
+<!--104E8B74FC1A49A685AF98E2071D1FEF-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--104E8B74FC1A49A685AF98E2071D1FEF-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--104E8B74FC1A49A685AF98E2071D1FEF-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--104E8B74FC1A49A685AF98E2071D1FEF-->  <NAME><![CDATA[Expected (Account Currency)]]></NAME>
+<!--104E8B74FC1A49A685AF98E2071D1FEF-->  <DESCRIPTION><![CDATA[Expected amount in the financial account currency]]></DESCRIPTION>
+<!--104E8B74FC1A49A685AF98E2071D1FEF-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--104E8B74FC1A49A685AF98E2071D1FEF-->  <AD_TAB_ID><![CDATA[F9751D712A804D57B97A36803843F2D7]]></AD_TAB_ID>
+<!--104E8B74FC1A49A685AF98E2071D1FEF-->  <AD_COLUMN_ID><![CDATA[91375A8F85DF48FFA962C940E9BAF889]]></AD_COLUMN_ID>
+<!--104E8B74FC1A49A685AF98E2071D1FEF-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--104E8B74FC1A49A685AF98E2071D1FEF-->  <DISPLAYLOGIC><![CDATA[@C_Currency_ID@!@FinAcc_Currency_ID@]]></DISPLAYLOGIC>
+<!--104E8B74FC1A49A685AF98E2071D1FEF-->  <DISPLAYLENGTH><![CDATA[12]]></DISPLAYLENGTH>
+<!--104E8B74FC1A49A685AF98E2071D1FEF-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--104E8B74FC1A49A685AF98E2071D1FEF-->  <SEQNO><![CDATA[140]]></SEQNO>
+<!--104E8B74FC1A49A685AF98E2071D1FEF-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--104E8B74FC1A49A685AF98E2071D1FEF-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--104E8B74FC1A49A685AF98E2071D1FEF-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--104E8B74FC1A49A685AF98E2071D1FEF-->  <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
+<!--104E8B74FC1A49A685AF98E2071D1FEF-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--104E8B74FC1A49A685AF98E2071D1FEF-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--104E8B74FC1A49A685AF98E2071D1FEF-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--104E8B74FC1A49A685AF98E2071D1FEF-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--104E8B74FC1A49A685AF98E2071D1FEF-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--104E8B74FC1A49A685AF98E2071D1FEF--></AD_FIELD>
+
 <!--10F44D767CA9479B9061C09E0E52EA3E--><AD_FIELD>
 <!--10F44D767CA9479B9061C09E0E52EA3E-->  <AD_FIELD_ID><![CDATA[10F44D767CA9479B9061C09E0E52EA3E]]></AD_FIELD_ID>
 <!--10F44D767CA9479B9061C09E0E52EA3E-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -162497,7 +162547,7 @@
 <!--133B82E6E63D42A8BF22920E72A3A5EA-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--133B82E6E63D42A8BF22920E72A3A5EA-->  <GRID_SEQNO><![CDATA[70]]></GRID_SEQNO>
 <!--133B82E6E63D42A8BF22920E72A3A5EA-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
-<!--133B82E6E63D42A8BF22920E72A3A5EA-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--133B82E6E63D42A8BF22920E72A3A5EA-->  <STARTNEWLINE><![CDATA[Y]]></STARTNEWLINE>
 <!--133B82E6E63D42A8BF22920E72A3A5EA-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
 <!--133B82E6E63D42A8BF22920E72A3A5EA--></AD_FIELD>
 
@@ -164456,6 +164506,62 @@
 <!--3EAE34E3585B4384980CA591C7E07D13-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
 <!--3EAE34E3585B4384980CA591C7E07D13--></AD_FIELD>
 
+<!--40289C202E523822012E5255F0580048--><AD_FIELD>
+<!--40289C202E523822012E5255F0580048-->  <AD_FIELD_ID><![CDATA[40289C202E523822012E5255F0580048]]></AD_FIELD_ID>
+<!--40289C202E523822012E5255F0580048-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--40289C202E523822012E5255F0580048-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--40289C202E523822012E5255F0580048-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--40289C202E523822012E5255F0580048-->  <NAME><![CDATA[Paid (Financial Account)]]></NAME>
+<!--40289C202E523822012E5255F0580048-->  <DESCRIPTION><![CDATA[Amount paid in currency of financial account]]></DESCRIPTION>
+<!--40289C202E523822012E5255F0580048-->  <HELP><![CDATA[The total amount of the payment, converted to the currency of the financial account.]]></HELP>
+<!--40289C202E523822012E5255F0580048-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--40289C202E523822012E5255F0580048-->  <AD_TAB_ID><![CDATA[2DD6F1E2CAE0456AA9797A1D627BFF5E]]></AD_TAB_ID>
+<!--40289C202E523822012E5255F0580048-->  <AD_COLUMN_ID><![CDATA[99E6DCF9068E43C7A699FEAECF28DD5C]]></AD_COLUMN_ID>
+<!--40289C202E523822012E5255F0580048-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--40289C202E523822012E5255F0580048-->  <DISPLAYLOGIC><![CDATA[@FinancialAccountCurrencyId@!'' & @FinancialAccountCurrencyId@!@C_Currency_Id@]]></DISPLAYLOGIC>
+<!--40289C202E523822012E5255F0580048-->  <DISPLAYLENGTH><![CDATA[12]]></DISPLAYLENGTH>
+<!--40289C202E523822012E5255F0580048-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--40289C202E523822012E5255F0580048-->  <SEQNO><![CDATA[133]]></SEQNO>
+<!--40289C202E523822012E5255F0580048-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--40289C202E523822012E5255F0580048-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--40289C202E523822012E5255F0580048-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--40289C202E523822012E5255F0580048-->  <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
+<!--40289C202E523822012E5255F0580048-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--40289C202E523822012E5255F0580048-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--40289C202E523822012E5255F0580048-->  <GRID_SEQNO><![CDATA[90]]></GRID_SEQNO>
+<!--40289C202E523822012E5255F0580048-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--40289C202E523822012E5255F0580048-->  <STARTNEWLINE><![CDATA[Y]]></STARTNEWLINE>
+<!--40289C202E523822012E5255F0580048-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--40289C202E523822012E5255F0580048--></AD_FIELD>
+
+<!--40289C202E523822012E525701050056--><AD_FIELD>
+<!--40289C202E523822012E525701050056-->  <AD_FIELD_ID><![CDATA[40289C202E523822012E525701050056]]></AD_FIELD_ID>
+<!--40289C202E523822012E525701050056-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--40289C202E523822012E525701050056-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--40289C202E523822012E525701050056-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--40289C202E523822012E525701050056-->  <NAME><![CDATA[Exchange Rate]]></NAME>
+<!--40289C202E523822012E525701050056-->  <DESCRIPTION><![CDATA[Exchange rate used to convert payment to financial account currency]]></DESCRIPTION>
+<!--40289C202E523822012E525701050056-->  <HELP><![CDATA[The exchange rate used to convert the payment amount to the financial account amount]]></HELP>
+<!--40289C202E523822012E525701050056-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--40289C202E523822012E525701050056-->  <AD_TAB_ID><![CDATA[2DD6F1E2CAE0456AA9797A1D627BFF5E]]></AD_TAB_ID>
+<!--40289C202E523822012E525701050056-->  <AD_COLUMN_ID><![CDATA[D7915EA89A2941A39C8D2570B0F56FC4]]></AD_COLUMN_ID>
+<!--40289C202E523822012E525701050056-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--40289C202E523822012E525701050056-->  <DISPLAYLOGIC><![CDATA[@FinancialAccountCurrencyId@!'' & @FinancialAccountCurrencyId@!@C_Currency_Id@]]></DISPLAYLOGIC>
+<!--40289C202E523822012E525701050056-->  <DISPLAYLENGTH><![CDATA[12]]></DISPLAYLENGTH>
+<!--40289C202E523822012E525701050056-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--40289C202E523822012E525701050056-->  <SEQNO><![CDATA[137]]></SEQNO>
+<!--40289C202E523822012E525701050056-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--40289C202E523822012E525701050056-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--40289C202E523822012E525701050056-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--40289C202E523822012E525701050056-->  <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
+<!--40289C202E523822012E525701050056-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--40289C202E523822012E525701050056-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--40289C202E523822012E525701050056-->  <GRID_SEQNO><![CDATA[100]]></GRID_SEQNO>
+<!--40289C202E523822012E525701050056-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--40289C202E523822012E525701050056-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--40289C202E523822012E525701050056-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--40289C202E523822012E525701050056--></AD_FIELD>
+
 <!--406CCAB2151D498799711099C60AECD1--><AD_FIELD>
 <!--406CCAB2151D498799711099C60AECD1-->  <AD_FIELD_ID><![CDATA[406CCAB2151D498799711099C60AECD1]]></AD_FIELD_ID>
 <!--406CCAB2151D498799711099C60AECD1-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -173157,6 +173263,33 @@
 <!--5A5492193FF108D1E040007F01001F10-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
 <!--5A5492193FF108D1E040007F01001F10--></AD_FIELD>
 
+<!--5A62780770AC4AD3A447CDDC50A11B5D--><AD_FIELD>
+<!--5A62780770AC4AD3A447CDDC50A11B5D-->  <AD_FIELD_ID><![CDATA[5A62780770AC4AD3A447CDDC50A11B5D]]></AD_FIELD_ID>
+<!--5A62780770AC4AD3A447CDDC50A11B5D-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--5A62780770AC4AD3A447CDDC50A11B5D-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--5A62780770AC4AD3A447CDDC50A11B5D-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--5A62780770AC4AD3A447CDDC50A11B5D-->  <NAME><![CDATA[Make Payments in Other Currencies]]></NAME>
+<!--5A62780770AC4AD3A447CDDC50A11B5D-->  <HELP><![CDATA[Allow withdrawl of Payments in Other Currencies]]></HELP>
+<!--5A62780770AC4AD3A447CDDC50A11B5D-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--5A62780770AC4AD3A447CDDC50A11B5D-->  <AD_TAB_ID><![CDATA[A4A463FA34F946BFA3F687DC8754ED93]]></AD_TAB_ID>
+<!--5A62780770AC4AD3A447CDDC50A11B5D-->  <AD_COLUMN_ID><![CDATA[4028C9BC2DA5C491012DA6314782037F]]></AD_COLUMN_ID>
+<!--5A62780770AC4AD3A447CDDC50A11B5D-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--5A62780770AC4AD3A447CDDC50A11B5D-->  <DISPLAYLOGIC><![CDATA[@Payout_Allow@='Y']]></DISPLAYLOGIC>
+<!--5A62780770AC4AD3A447CDDC50A11B5D-->  <DISPLAYLENGTH><![CDATA[1]]></DISPLAYLENGTH>
+<!--5A62780770AC4AD3A447CDDC50A11B5D-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--5A62780770AC4AD3A447CDDC50A11B5D-->  <SEQNO><![CDATA[155]]></SEQNO>
+<!--5A62780770AC4AD3A447CDDC50A11B5D-->  <ISSAMELINE><![CDATA[Y]]></ISSAMELINE>
+<!--5A62780770AC4AD3A447CDDC50A11B5D-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--5A62780770AC4AD3A447CDDC50A11B5D-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--5A62780770AC4AD3A447CDDC50A11B5D-->  <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
+<!--5A62780770AC4AD3A447CDDC50A11B5D-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--5A62780770AC4AD3A447CDDC50A11B5D-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--5A62780770AC4AD3A447CDDC50A11B5D-->  <GRID_SEQNO><![CDATA[0]]></GRID_SEQNO>
+<!--5A62780770AC4AD3A447CDDC50A11B5D-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--5A62780770AC4AD3A447CDDC50A11B5D-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--5A62780770AC4AD3A447CDDC50A11B5D-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--5A62780770AC4AD3A447CDDC50A11B5D--></AD_FIELD>
+
 <!--5A8D09C46CEC4CDEB2A8ECFCD9E3FD61--><AD_FIELD>
 <!--5A8D09C46CEC4CDEB2A8ECFCD9E3FD61-->  <AD_FIELD_ID><![CDATA[5A8D09C46CEC4CDEB2A8ECFCD9E3FD61]]></AD_FIELD_ID>
 <!--5A8D09C46CEC4CDEB2A8ECFCD9E3FD61-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -174187,6 +174320,33 @@
 <!--5E6B91050CDA4F6B9ABC3DD692875337-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
 <!--5E6B91050CDA4F6B9ABC3DD692875337--></AD_FIELD>
 
+<!--5F82C468A1B7479DBA6E05A58A72D212--><AD_FIELD>
+<!--5F82C468A1B7479DBA6E05A58A72D212-->  <AD_FIELD_ID><![CDATA[5F82C468A1B7479DBA6E05A58A72D212]]></AD_FIELD_ID>
+<!--5F82C468A1B7479DBA6E05A58A72D212-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--5F82C468A1B7479DBA6E05A58A72D212-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--5F82C468A1B7479DBA6E05A58A72D212-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--5F82C468A1B7479DBA6E05A58A72D212-->  <NAME><![CDATA[Receive Payments in Other Currencies]]></NAME>
+<!--5F82C468A1B7479DBA6E05A58A72D212-->  <HELP><![CDATA[Allow Receipt of Payments in Other Currencies]]></HELP>
+<!--5F82C468A1B7479DBA6E05A58A72D212-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--5F82C468A1B7479DBA6E05A58A72D212-->  <AD_TAB_ID><![CDATA[A4A463FA34F946BFA3F687DC8754ED93]]></AD_TAB_ID>
+<!--5F82C468A1B7479DBA6E05A58A72D212-->  <AD_COLUMN_ID><![CDATA[4028C9BC2DA5C491012DA62FE936037B]]></AD_COLUMN_ID>
+<!--5F82C468A1B7479DBA6E05A58A72D212-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--5F82C468A1B7479DBA6E05A58A72D212-->  <DISPLAYLOGIC><![CDATA[@Payin_Allow@='Y']]></DISPLAYLOGIC>
+<!--5F82C468A1B7479DBA6E05A58A72D212-->  <DISPLAYLENGTH><![CDATA[1]]></DISPLAYLENGTH>
+<!--5F82C468A1B7479DBA6E05A58A72D212-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--5F82C468A1B7479DBA6E05A58A72D212-->  <SEQNO><![CDATA[65]]></SEQNO>
+<!--5F82C468A1B7479DBA6E05A58A72D212-->  <ISSAMELINE><![CDATA[Y]]></ISSAMELINE>
+<!--5F82C468A1B7479DBA6E05A58A72D212-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--5F82C468A1B7479DBA6E05A58A72D212-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--5F82C468A1B7479DBA6E05A58A72D212-->  <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
+<!--5F82C468A1B7479DBA6E05A58A72D212-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--5F82C468A1B7479DBA6E05A58A72D212-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--5F82C468A1B7479DBA6E05A58A72D212-->  <GRID_SEQNO><![CDATA[0]]></GRID_SEQNO>
+<!--5F82C468A1B7479DBA6E05A58A72D212-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--5F82C468A1B7479DBA6E05A58A72D212-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--5F82C468A1B7479DBA6E05A58A72D212-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--5F82C468A1B7479DBA6E05A58A72D212--></AD_FIELD>
+
 <!--605B6EB2852573ACE040007F0100282B--><AD_FIELD>
 <!--605B6EB2852573ACE040007F0100282B-->  <AD_FIELD_ID><![CDATA[605B6EB2852573ACE040007F0100282B]]></AD_FIELD_ID>
 <!--605B6EB2852573ACE040007F0100282B-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -174214,6 +174374,32 @@
 <!--605B6EB2852573ACE040007F0100282B-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
 <!--605B6EB2852573ACE040007F0100282B--></AD_FIELD>
 
+<!--606A112082634E7C91581F1A838D1CF8--><AD_FIELD>
+<!--606A112082634E7C91581F1A838D1CF8-->  <AD_FIELD_ID><![CDATA[606A112082634E7C91581F1A838D1CF8]]></AD_FIELD_ID>
+<!--606A112082634E7C91581F1A838D1CF8-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--606A112082634E7C91581F1A838D1CF8-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--606A112082634E7C91581F1A838D1CF8-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--606A112082634E7C91581F1A838D1CF8-->  <NAME><![CDATA[Foreign  Amount]]></NAME>
+<!--606A112082634E7C91581F1A838D1CF8-->  <DESCRIPTION><![CDATA[Amount of transaction in foreign currency]]></DESCRIPTION>
+<!--606A112082634E7C91581F1A838D1CF8-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--606A112082634E7C91581F1A838D1CF8-->  <AD_TAB_ID><![CDATA[FF8080812F213146012F2135BC25000E]]></AD_TAB_ID>
+<!--606A112082634E7C91581F1A838D1CF8-->  <AD_COLUMN_ID><![CDATA[24F844751D19499CA1215A76C9BC2543]]></AD_COLUMN_ID>
+<!--606A112082634E7C91581F1A838D1CF8-->  <ISDISPLAYED><![CDATA[N]]></ISDISPLAYED>
+<!--606A112082634E7C91581F1A838D1CF8-->  <DISPLAYLENGTH><![CDATA[22]]></DISPLAYLENGTH>
+<!--606A112082634E7C91581F1A838D1CF8-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--606A112082634E7C91581F1A838D1CF8-->  <SEQNO><![CDATA[160]]></SEQNO>
+<!--606A112082634E7C91581F1A838D1CF8-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--606A112082634E7C91581F1A838D1CF8-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--606A112082634E7C91581F1A838D1CF8-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--606A112082634E7C91581F1A838D1CF8-->  <SHOWINRELATION><![CDATA[Y]]></SHOWINRELATION>
+<!--606A112082634E7C91581F1A838D1CF8-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--606A112082634E7C91581F1A838D1CF8-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--606A112082634E7C91581F1A838D1CF8-->  <GRID_SEQNO><![CDATA[90]]></GRID_SEQNO>
+<!--606A112082634E7C91581F1A838D1CF8-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--606A112082634E7C91581F1A838D1CF8-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--606A112082634E7C91581F1A838D1CF8-->  <ISSHOWNINSTATUSBAR><![CDATA[Y]]></ISSHOWNINSTATUSBAR>
+<!--606A112082634E7C91581F1A838D1CF8--></AD_FIELD>
+
 <!--60B7D5ABB5FD47608ACB13EC89966A6B--><AD_FIELD>
 <!--60B7D5ABB5FD47608ACB13EC89966A6B-->  <AD_FIELD_ID><![CDATA[60B7D5ABB5FD47608ACB13EC89966A6B]]></AD_FIELD_ID>
 <!--60B7D5ABB5FD47608ACB13EC89966A6B-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -175099,6 +175285,33 @@
 <!--65C8733280D611DD9C3207FB58CC79D6-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
 <!--65C8733280D611DD9C3207FB58CC79D6--></AD_FIELD>
 
+<!--65FEC104441E48EF979F1C5D53A7A1E3--><AD_FIELD>
+<!--65FEC104441E48EF979F1C5D53A7A1E3-->  <AD_FIELD_ID><![CDATA[65FEC104441E48EF979F1C5D53A7A1E3]]></AD_FIELD_ID>
+<!--65FEC104441E48EF979F1C5D53A7A1E3-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--65FEC104441E48EF979F1C5D53A7A1E3-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--65FEC104441E48EF979F1C5D53A7A1E3-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--65FEC104441E48EF979F1C5D53A7A1E3-->  <NAME><![CDATA[Make Payments in Other Currencies]]></NAME>
+<!--65FEC104441E48EF979F1C5D53A7A1E3-->  <HELP><![CDATA[Allow withdrawl of Payments in Other Currencies]]></HELP>
+<!--65FEC104441E48EF979F1C5D53A7A1E3-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--65FEC104441E48EF979F1C5D53A7A1E3-->  <AD_TAB_ID><![CDATA[01F5E95D71544D428E1B9004B05D0298]]></AD_TAB_ID>
+<!--65FEC104441E48EF979F1C5D53A7A1E3-->  <AD_COLUMN_ID><![CDATA[4028C9BC2DA5C491012DA6378598038E]]></AD_COLUMN_ID>
+<!--65FEC104441E48EF979F1C5D53A7A1E3-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--65FEC104441E48EF979F1C5D53A7A1E3-->  <DISPLAYLOGIC><![CDATA[@Payout_Allow@='Y']]></DISPLAYLOGIC>
+<!--65FEC104441E48EF979F1C5D53A7A1E3-->  <DISPLAYLENGTH><![CDATA[1]]></DISPLAYLENGTH>
+<!--65FEC104441E48EF979F1C5D53A7A1E3-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--65FEC104441E48EF979F1C5D53A7A1E3-->  <SEQNO><![CDATA[145]]></SEQNO>
+<!--65FEC104441E48EF979F1C5D53A7A1E3-->  <ISSAMELINE><![CDATA[Y]]></ISSAMELINE>
+<!--65FEC104441E48EF979F1C5D53A7A1E3-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--65FEC104441E48EF979F1C5D53A7A1E3-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--65FEC104441E48EF979F1C5D53A7A1E3-->  <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
+<!--65FEC104441E48EF979F1C5D53A7A1E3-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--65FEC104441E48EF979F1C5D53A7A1E3-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--65FEC104441E48EF979F1C5D53A7A1E3-->  <GRID_SEQNO><![CDATA[0]]></GRID_SEQNO>
+<!--65FEC104441E48EF979F1C5D53A7A1E3-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--65FEC104441E48EF979F1C5D53A7A1E3-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--65FEC104441E48EF979F1C5D53A7A1E3-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--65FEC104441E48EF979F1C5D53A7A1E3--></AD_FIELD>
+
 <!--6617A2667AA54500A007C20DEED65EF0--><AD_FIELD>
 <!--6617A2667AA54500A007C20DEED65EF0-->  <AD_FIELD_ID><![CDATA[6617A2667AA54500A007C20DEED65EF0]]></AD_FIELD_ID>
 <!--6617A2667AA54500A007C20DEED65EF0-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -176988,6 +177201,32 @@
 <!--7994C59E1CE11F99E040007F01015756-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
 <!--7994C59E1CE11F99E040007F01015756--></AD_FIELD>
 
+<!--79B4C19CB5A44AEA930E2AE09321CDEF--><AD_FIELD>
+<!--79B4C19CB5A44AEA930E2AE09321CDEF-->  <AD_FIELD_ID><![CDATA[79B4C19CB5A44AEA930E2AE09321CDEF]]></AD_FIELD_ID>
+<!--79B4C19CB5A44AEA930E2AE09321CDEF-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--79B4C19CB5A44AEA930E2AE09321CDEF-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--79B4C19CB5A44AEA930E2AE09321CDEF-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--79B4C19CB5A44AEA930E2AE09321CDEF-->  <NAME><![CDATA[Foreign Currency]]></NAME>
+<!--79B4C19CB5A44AEA930E2AE09321CDEF-->  <DESCRIPTION><![CDATA[The currency that transaction was made in if it was different to the account currency]]></DESCRIPTION>
+<!--79B4C19CB5A44AEA930E2AE09321CDEF-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--79B4C19CB5A44AEA930E2AE09321CDEF-->  <AD_TAB_ID><![CDATA[FF8080812F213146012F2135BC25000E]]></AD_TAB_ID>
+<!--79B4C19CB5A44AEA930E2AE09321CDEF-->  <AD_COLUMN_ID><![CDATA[7EAACC5726724D16B8C92BA732BB566B]]></AD_COLUMN_ID>
+<!--79B4C19CB5A44AEA930E2AE09321CDEF-->  <ISDISPLAYED><![CDATA[N]]></ISDISPLAYED>
+<!--79B4C19CB5A44AEA930E2AE09321CDEF-->  <DISPLAYLENGTH><![CDATA[32]]></DISPLAYLENGTH>
+<!--79B4C19CB5A44AEA930E2AE09321CDEF-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--79B4C19CB5A44AEA930E2AE09321CDEF-->  <SEQNO><![CDATA[170]]></SEQNO>
+<!--79B4C19CB5A44AEA930E2AE09321CDEF-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--79B4C19CB5A44AEA930E2AE09321CDEF-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--79B4C19CB5A44AEA930E2AE09321CDEF-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--79B4C19CB5A44AEA930E2AE09321CDEF-->  <SHOWINRELATION><![CDATA[Y]]></SHOWINRELATION>
+<!--79B4C19CB5A44AEA930E2AE09321CDEF-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--79B4C19CB5A44AEA930E2AE09321CDEF-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--79B4C19CB5A44AEA930E2AE09321CDEF-->  <GRID_SEQNO><![CDATA[100]]></GRID_SEQNO>
+<!--79B4C19CB5A44AEA930E2AE09321CDEF-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--79B4C19CB5A44AEA930E2AE09321CDEF-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--79B4C19CB5A44AEA930E2AE09321CDEF-->  <ISSHOWNINSTATUSBAR><![CDATA[Y]]></ISSHOWNINSTATUSBAR>
+<!--79B4C19CB5A44AEA930E2AE09321CDEF--></AD_FIELD>
+
 <!--7C541AC0C757FDD7E040007F01016B4D--><AD_FIELD>
 <!--7C541AC0C757FDD7E040007F01016B4D-->  <AD_FIELD_ID><![CDATA[7C541AC0C757FDD7E040007F01016B4D]]></AD_FIELD_ID>
 <!--7C541AC0C757FDD7E040007F01016B4D-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -177052,7 +177291,7 @@
 <!--7C541AC0C759FDD7E040007F01016B4D-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
 <!--7C541AC0C759FDD7E040007F01016B4D-->  <DISPLAYLENGTH><![CDATA[12]]></DISPLAYLENGTH>
 <!--7C541AC0C759FDD7E040007F01016B4D-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
-<!--7C541AC0C759FDD7E040007F01016B4D-->  <SEQNO><![CDATA[100]]></SEQNO>
+<!--7C541AC0C759FDD7E040007F01016B4D-->  <SEQNO><![CDATA[90]]></SEQNO>
 <!--7C541AC0C759FDD7E040007F01016B4D-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--7C541AC0C759FDD7E040007F01016B4D-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--7C541AC0C759FDD7E040007F01016B4D-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
@@ -177078,7 +177317,7 @@
 <!--7C541AC0C75AFDD7E040007F01016B4D-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
 <!--7C541AC0C75AFDD7E040007F01016B4D-->  <DISPLAYLENGTH><![CDATA[32]]></DISPLAYLENGTH>
 <!--7C541AC0C75AFDD7E040007F01016B4D-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
-<!--7C541AC0C75AFDD7E040007F01016B4D-->  <SEQNO><![CDATA[90]]></SEQNO>
+<!--7C541AC0C75AFDD7E040007F01016B4D-->  <SEQNO><![CDATA[95]]></SEQNO>
 <!--7C541AC0C75AFDD7E040007F01016B4D-->  <ISSAMELINE><![CDATA[Y]]></ISSAMELINE>
 <!--7C541AC0C75AFDD7E040007F01016B4D-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--7C541AC0C75AFDD7E040007F01016B4D-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
@@ -177087,7 +177326,7 @@
 <!--7C541AC0C75AFDD7E040007F01016B4D-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--7C541AC0C75AFDD7E040007F01016B4D-->  <GRID_SEQNO><![CDATA[70]]></GRID_SEQNO>
 <!--7C541AC0C75AFDD7E040007F01016B4D-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
-<!--7C541AC0C75AFDD7E040007F01016B4D-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--7C541AC0C75AFDD7E040007F01016B4D-->  <STARTNEWLINE><![CDATA[Y]]></STARTNEWLINE>
 <!--7C541AC0C75AFDD7E040007F01016B4D-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
 <!--7C541AC0C75AFDD7E040007F01016B4D--></AD_FIELD>
 
@@ -177153,10 +177392,10 @@
 <!--7C541AC0C75DFDD7E040007F01016B4D-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
 <!--7C541AC0C75DFDD7E040007F01016B4D-->  <AD_TAB_ID><![CDATA[C4B6506838E14A349D6717D6856F1B56]]></AD_TAB_ID>
 <!--7C541AC0C75DFDD7E040007F01016B4D-->  <AD_COLUMN_ID><![CDATA[7891269C83DC655DE040007F010155CE]]></AD_COLUMN_ID>
-<!--7C541AC0C75DFDD7E040007F01016B4D-->  <ISDISPLAYED><![CDATA[N]]></ISDISPLAYED>
+<!--7C541AC0C75DFDD7E040007F01016B4D-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
 <!--7C541AC0C75DFDD7E040007F01016B4D-->  <DISPLAYLENGTH><![CDATA[21]]></DISPLAYLENGTH>
-<!--7C541AC0C75DFDD7E040007F01016B4D-->  <ISREADONLY><![CDATA[Y]]></ISREADONLY>
-<!--7C541AC0C75DFDD7E040007F01016B4D-->  <SEQNO><![CDATA[190]]></SEQNO>
+<!--7C541AC0C75DFDD7E040007F01016B4D-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--7C541AC0C75DFDD7E040007F01016B4D-->  <SEQNO><![CDATA[100]]></SEQNO>
 <!--7C541AC0C75DFDD7E040007F01016B4D-->  <ISSAMELINE><![CDATA[Y]]></ISSAMELINE>
 <!--7C541AC0C75DFDD7E040007F01016B4D-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--7C541AC0C75DFDD7E040007F01016B4D-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
@@ -177165,7 +177404,7 @@
 <!--7C541AC0C75DFDD7E040007F01016B4D-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--7C541AC0C75DFDD7E040007F01016B4D-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
 <!--7C541AC0C75DFDD7E040007F01016B4D-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
-<!--7C541AC0C75DFDD7E040007F01016B4D-->  <ISSHOWNINSTATUSBAR><![CDATA[Y]]></ISSHOWNINSTATUSBAR>
+<!--7C541AC0C75DFDD7E040007F01016B4D-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
 <!--7C541AC0C75DFDD7E040007F01016B4D--></AD_FIELD>
 
 <!--7C541AC0C75FFDD7E040007F01016B4D--><AD_FIELD>
@@ -177632,7 +177871,7 @@
 <!--7DC34559B3FFB45BE040007F0100784A-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--7DC34559B3FFB45BE040007F0100784A-->  <GRID_SEQNO><![CDATA[80]]></GRID_SEQNO>
 <!--7DC34559B3FFB45BE040007F0100784A-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
-<!--7DC34559B3FFB45BE040007F0100784A-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--7DC34559B3FFB45BE040007F0100784A-->  <STARTNEWLINE><![CDATA[Y]]></STARTNEWLINE>
 <!--7DC34559B3FFB45BE040007F0100784A-->  <ISSHOWNINSTATUSBAR><![CDATA[Y]]></ISSHOWNINSTATUSBAR>
 <!--7DC34559B3FFB45BE040007F0100784A--></AD_FIELD>
 
@@ -177967,7 +178206,7 @@
 <!--7DC34559B40EB45BE040007F0100784A-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--7DC34559B40EB45BE040007F0100784A-->  <GRID_SEQNO><![CDATA[100]]></GRID_SEQNO>
 <!--7DC34559B40EB45BE040007F0100784A-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
-<!--7DC34559B40EB45BE040007F0100784A-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--7DC34559B40EB45BE040007F0100784A-->  <STARTNEWLINE><![CDATA[Y]]></STARTNEWLINE>
 <!--7DC34559B40EB45BE040007F0100784A-->  <ISSHOWNINSTATUSBAR><![CDATA[Y]]></ISSHOWNINSTATUSBAR>
 <!--7DC34559B40EB45BE040007F0100784A--></AD_FIELD>
 
@@ -184480,7 +184719,7 @@
 <!--8E7CC7A3918DB541E040007F01004601-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--8E7CC7A3918DB541E040007F01004601-->  <GRID_SEQNO><![CDATA[90]]></GRID_SEQNO>
 <!--8E7CC7A3918DB541E040007F01004601-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
-<!--8E7CC7A3918DB541E040007F01004601-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--8E7CC7A3918DB541E040007F01004601-->  <STARTNEWLINE><![CDATA[Y]]></STARTNEWLINE>
 <!--8E7CC7A3918DB541E040007F01004601-->  <ISSHOWNINSTATUSBAR><![CDATA[Y]]></ISSHOWNINSTATUSBAR>
 <!--8E7CC7A3918DB541E040007F01004601--></AD_FIELD>
 
@@ -184533,7 +184772,7 @@
 <!--8E7CC7A39196B541E040007F01004601-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--8E7CC7A39196B541E040007F01004601-->  <GRID_SEQNO><![CDATA[90]]></GRID_SEQNO>
 <!--8E7CC7A39196B541E040007F01004601-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
-<!--8E7CC7A39196B541E040007F01004601-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--8E7CC7A39196B541E040007F01004601-->  <STARTNEWLINE><![CDATA[Y]]></STARTNEWLINE>
 <!--8E7CC7A39196B541E040007F01004601-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
 <!--8E7CC7A39196B541E040007F01004601--></AD_FIELD>
 
@@ -187971,7 +188210,7 @@
 <!--B885A9283E044499BFE5DCF12AAD72C5-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--B885A9283E044499BFE5DCF12AAD72C5-->  <GRID_SEQNO><![CDATA[80]]></GRID_SEQNO>
 <!--B885A9283E044499BFE5DCF12AAD72C5-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
-<!--B885A9283E044499BFE5DCF12AAD72C5-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--B885A9283E044499BFE5DCF12AAD72C5-->  <STARTNEWLINE><![CDATA[Y]]></STARTNEWLINE>
 <!--B885A9283E044499BFE5DCF12AAD72C5-->  <ISSHOWNINSTATUSBAR><![CDATA[Y]]></ISSHOWNINSTATUSBAR>
 <!--B885A9283E044499BFE5DCF12AAD72C5--></AD_FIELD>
 
@@ -188508,6 +188747,33 @@
 <!--C75A92B7C068426395CFB10D5CAF12F7-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
 <!--C75A92B7C068426395CFB10D5CAF12F7--></AD_FIELD>
 
+<!--C85A38D3DA84411189BA447A9049C778--><AD_FIELD>
+<!--C85A38D3DA84411189BA447A9049C778-->  <AD_FIELD_ID><![CDATA[C85A38D3DA84411189BA447A9049C778]]></AD_FIELD_ID>
+<!--C85A38D3DA84411189BA447A9049C778-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--C85A38D3DA84411189BA447A9049C778-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--C85A38D3DA84411189BA447A9049C778-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--C85A38D3DA84411189BA447A9049C778-->  <NAME><![CDATA[Receive Payments in Other Currencies]]></NAME>
+<!--C85A38D3DA84411189BA447A9049C778-->  <HELP><![CDATA[Allow Receipt of Payments in Other Currencies]]></HELP>
+<!--C85A38D3DA84411189BA447A9049C778-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--C85A38D3DA84411189BA447A9049C778-->  <AD_TAB_ID><![CDATA[01F5E95D71544D428E1B9004B05D0298]]></AD_TAB_ID>
+<!--C85A38D3DA84411189BA447A9049C778-->  <AD_COLUMN_ID><![CDATA[4028C9BC2DA5C491012DA636918F038B]]></AD_COLUMN_ID>
+<!--C85A38D3DA84411189BA447A9049C778-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--C85A38D3DA84411189BA447A9049C778-->  <DISPLAYLOGIC><![CDATA[@Payin_Allow@='Y']]></DISPLAYLOGIC>
+<!--C85A38D3DA84411189BA447A9049C778-->  <DISPLAYLENGTH><![CDATA[1]]></DISPLAYLENGTH>
+<!--C85A38D3DA84411189BA447A9049C778-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--C85A38D3DA84411189BA447A9049C778-->  <SEQNO><![CDATA[55]]></SEQNO>
+<!--C85A38D3DA84411189BA447A9049C778-->  <ISSAMELINE><![CDATA[Y]]></ISSAMELINE>
+<!--C85A38D3DA84411189BA447A9049C778-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--C85A38D3DA84411189BA447A9049C778-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--C85A38D3DA84411189BA447A9049C778-->  <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
+<!--C85A38D3DA84411189BA447A9049C778-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--C85A38D3DA84411189BA447A9049C778-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--C85A38D3DA84411189BA447A9049C778-->  <GRID_SEQNO><![CDATA[0]]></GRID_SEQNO>
+<!--C85A38D3DA84411189BA447A9049C778-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--C85A38D3DA84411189BA447A9049C778-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--C85A38D3DA84411189BA447A9049C778-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--C85A38D3DA84411189BA447A9049C778--></AD_FIELD>
+
 <!--C90A5A1B7E964312BA428950997620E7--><AD_FIELD>
 <!--C90A5A1B7E964312BA428950997620E7-->  <AD_FIELD_ID><![CDATA[C90A5A1B7E964312BA428950997620E7]]></AD_FIELD_ID>
 <!--C90A5A1B7E964312BA428950997620E7-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -189530,6 +189796,32 @@
 <!--E87269C189534EBFA3E15E63861AC1E5-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
 <!--E87269C189534EBFA3E15E63861AC1E5--></AD_FIELD>
 
+<!--E8C91A2D821242B8B7F85008A172991F--><AD_FIELD>
+<!--E8C91A2D821242B8B7F85008A172991F-->  <AD_FIELD_ID><![CDATA[E8C91A2D821242B8B7F85008A172991F]]></AD_FIELD_ID>
+<!--E8C91A2D821242B8B7F85008A172991F-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--E8C91A2D821242B8B7F85008A172991F-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--E8C91A2D821242B8B7F85008A172991F-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--E8C91A2D821242B8B7F85008A172991F-->  <NAME><![CDATA[Paid (Account Currency)]]></NAME>
+<!--E8C91A2D821242B8B7F85008A172991F-->  <DESCRIPTION><![CDATA[Amount paid in financial account currency]]></DESCRIPTION>
+<!--E8C91A2D821242B8B7F85008A172991F-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--E8C91A2D821242B8B7F85008A172991F-->  <AD_TAB_ID><![CDATA[F9751D712A804D57B97A36803843F2D7]]></AD_TAB_ID>
+<!--E8C91A2D821242B8B7F85008A172991F-->  <AD_COLUMN_ID><![CDATA[8DF9D8A154DC4353ACD4F91DA30CA06E]]></AD_COLUMN_ID>
+<!--E8C91A2D821242B8B7F85008A172991F-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--E8C91A2D821242B8B7F85008A172991F-->  <DISPLAYLOGIC><![CDATA[@C_Currency_ID@!@FinAcc_Currency_ID@]]></DISPLAYLOGIC>
+<!--E8C91A2D821242B8B7F85008A172991F-->  <DISPLAYLENGTH><![CDATA[12]]></DISPLAYLENGTH>
+<!--E8C91A2D821242B8B7F85008A172991F-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--E8C91A2D821242B8B7F85008A172991F-->  <SEQNO><![CDATA[150]]></SEQNO>
+<!--E8C91A2D821242B8B7F85008A172991F-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--E8C91A2D821242B8B7F85008A172991F-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--E8C91A2D821242B8B7F85008A172991F-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--E8C91A2D821242B8B7F85008A172991F-->  <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
+<!--E8C91A2D821242B8B7F85008A172991F-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--E8C91A2D821242B8B7F85008A172991F-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--E8C91A2D821242B8B7F85008A172991F-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--E8C91A2D821242B8B7F85008A172991F-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--E8C91A2D821242B8B7F85008A172991F-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--E8C91A2D821242B8B7F85008A172991F--></AD_FIELD>
+
 <!--EB7FA6A8ACFA11DDA549A7D95E44102D--><AD_FIELD>
 <!--EB7FA6A8ACFA11DDA549A7D95E44102D-->  <AD_FIELD_ID><![CDATA[EB7FA6A8ACFA11DDA549A7D95E44102D]]></AD_FIELD_ID>
 <!--EB7FA6A8ACFA11DDA549A7D95E44102D-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -189796,6 +190088,33 @@
 <!--F54497C98F8044DAA8988EBFA46DD406-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
 <!--F54497C98F8044DAA8988EBFA46DD406--></AD_FIELD>
 
+<!--F675F7859BA84CE1AB0B4D61AA9CC3D2--><AD_FIELD>
+<!--F675F7859BA84CE1AB0B4D61AA9CC3D2-->  <AD_FIELD_ID><![CDATA[F675F7859BA84CE1AB0B4D61AA9CC3D2]]></AD_FIELD_ID>
+<!--F675F7859BA84CE1AB0B4D61AA9CC3D2-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--F675F7859BA84CE1AB0B4D61AA9CC3D2-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--F675F7859BA84CE1AB0B4D61AA9CC3D2-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--F675F7859BA84CE1AB0B4D61AA9CC3D2-->  <NAME><![CDATA[Exchange Rate]]></NAME>
+<!--F675F7859BA84CE1AB0B4D61AA9CC3D2-->  <DESCRIPTION><![CDATA[Exchange rate used to convert payment to financial account currency]]></DESCRIPTION>
+<!--F675F7859BA84CE1AB0B4D61AA9CC3D2-->  <HELP><![CDATA[The exchange rate used to convert the payment amount to the financial account amount]]></HELP>
+<!--F675F7859BA84CE1AB0B4D61AA9CC3D2-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--F675F7859BA84CE1AB0B4D61AA9CC3D2-->  <AD_TAB_ID><![CDATA[F9751D712A804D57B97A36803843F2D7]]></AD_TAB_ID>
+<!--F675F7859BA84CE1AB0B4D61AA9CC3D2-->  <AD_COLUMN_ID><![CDATA[85072D35A21C4487A9B16A210878D3C8]]></AD_COLUMN_ID>
+<!--F675F7859BA84CE1AB0B4D61AA9CC3D2-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--F675F7859BA84CE1AB0B4D61AA9CC3D2-->  <DISPLAYLOGIC><![CDATA[@C_Currency_ID@!@FinAcc_Currency_ID@]]></DISPLAYLOGIC>
+<!--F675F7859BA84CE1AB0B4D61AA9CC3D2-->  <DISPLAYLENGTH><![CDATA[12]]></DISPLAYLENGTH>
+<!--F675F7859BA84CE1AB0B4D61AA9CC3D2-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--F675F7859BA84CE1AB0B4D61AA9CC3D2-->  <SEQNO><![CDATA[160]]></SEQNO>
+<!--F675F7859BA84CE1AB0B4D61AA9CC3D2-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--F675F7859BA84CE1AB0B4D61AA9CC3D2-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--F675F7859BA84CE1AB0B4D61AA9CC3D2-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--F675F7859BA84CE1AB0B4D61AA9CC3D2-->  <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
+<!--F675F7859BA84CE1AB0B4D61AA9CC3D2-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--F675F7859BA84CE1AB0B4D61AA9CC3D2-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--F675F7859BA84CE1AB0B4D61AA9CC3D2-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--F675F7859BA84CE1AB0B4D61AA9CC3D2-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--F675F7859BA84CE1AB0B4D61AA9CC3D2-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--F675F7859BA84CE1AB0B4D61AA9CC3D2--></AD_FIELD>
+
 <!--F8A7E19BEA2A4E6792E81EB12A644DDE--><AD_FIELD>
 <!--F8A7E19BEA2A4E6792E81EB12A644DDE-->  <AD_FIELD_ID><![CDATA[F8A7E19BEA2A4E6792E81EB12A644DDE]]></AD_FIELD_ID>
 <!--F8A7E19BEA2A4E6792E81EB12A644DDE-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -190065,6 +190384,118 @@
 <!--FF6017DC061144718EB362D7DE06A614-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
 <!--FF6017DC061144718EB362D7DE06A614--></AD_FIELD>
 
+<!--FF8080812E26BF58012E277B8D51005A--><AD_FIELD>
+<!--FF8080812E26BF58012E277B8D51005A-->  <AD_FIELD_ID><![CDATA[FF8080812E26BF58012E277B8D51005A]]></AD_FIELD_ID>
+<!--FF8080812E26BF58012E277B8D51005A-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--FF8080812E26BF58012E277B8D51005A-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--FF8080812E26BF58012E277B8D51005A-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--FF8080812E26BF58012E277B8D51005A-->  <NAME><![CDATA[Paid (Financial Account)]]></NAME>
+<!--FF8080812E26BF58012E277B8D51005A-->  <DESCRIPTION><![CDATA[Amount paid in currency of financial account]]></DESCRIPTION>
+<!--FF8080812E26BF58012E277B8D51005A-->  <HELP><![CDATA[The total amount of the payment, converted to the currency of the financial account.]]></HELP>
+<!--FF8080812E26BF58012E277B8D51005A-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--FF8080812E26BF58012E277B8D51005A-->  <AD_TAB_ID><![CDATA[F7A52FDAAA0346EFA07D53C125B40404]]></AD_TAB_ID>
+<!--FF8080812E26BF58012E277B8D51005A-->  <AD_COLUMN_ID><![CDATA[4028C9BC2DA5C491012DA689D11F03BD]]></AD_COLUMN_ID>
+<!--FF8080812E26BF58012E277B8D51005A-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--FF8080812E26BF58012E277B8D51005A-->  <DISPLAYLOGIC><![CDATA[@FinancialAccountCurrencyId@!'' & @FinancialAccountCurrencyId@!@C_Currency_Id@]]></DISPLAYLOGIC>
+<!--FF8080812E26BF58012E277B8D51005A-->  <DISPLAYLENGTH><![CDATA[12]]></DISPLAYLENGTH>
+<!--FF8080812E26BF58012E277B8D51005A-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--FF8080812E26BF58012E277B8D51005A-->  <SEQNO><![CDATA[97]]></SEQNO>
+<!--FF8080812E26BF58012E277B8D51005A-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--FF8080812E26BF58012E277B8D51005A-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--FF8080812E26BF58012E277B8D51005A-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--FF8080812E26BF58012E277B8D51005A-->  <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
+<!--FF8080812E26BF58012E277B8D51005A-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--FF8080812E26BF58012E277B8D51005A-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--FF8080812E26BF58012E277B8D51005A-->  <GRID_SEQNO><![CDATA[110]]></GRID_SEQNO>
+<!--FF8080812E26BF58012E277B8D51005A-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--FF8080812E26BF58012E277B8D51005A-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--FF8080812E26BF58012E277B8D51005A-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--FF8080812E26BF58012E277B8D51005A--></AD_FIELD>
+
+<!--FF8080812E26BF58012E277BCA6F0060--><AD_FIELD>
+<!--FF8080812E26BF58012E277BCA6F0060-->  <AD_FIELD_ID><![CDATA[FF8080812E26BF58012E277BCA6F0060]]></AD_FIELD_ID>
+<!--FF8080812E26BF58012E277BCA6F0060-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--FF8080812E26BF58012E277BCA6F0060-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--FF8080812E26BF58012E277BCA6F0060-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--FF8080812E26BF58012E277BCA6F0060-->  <NAME><![CDATA[Exchange Rate]]></NAME>
+<!--FF8080812E26BF58012E277BCA6F0060-->  <DESCRIPTION><![CDATA[Exchange rate used to convert payment to financial account currency]]></DESCRIPTION>
+<!--FF8080812E26BF58012E277BCA6F0060-->  <HELP><![CDATA[The exchange rate used to convert the payment amount to the financial account amount]]></HELP>
+<!--FF8080812E26BF58012E277BCA6F0060-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--FF8080812E26BF58012E277BCA6F0060-->  <AD_TAB_ID><![CDATA[F7A52FDAAA0346EFA07D53C125B40404]]></AD_TAB_ID>
+<!--FF8080812E26BF58012E277BCA6F0060-->  <AD_COLUMN_ID><![CDATA[4028C9BC2DA5C491012DA6832A1003A8]]></AD_COLUMN_ID>
+<!--FF8080812E26BF58012E277BCA6F0060-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--FF8080812E26BF58012E277BCA6F0060-->  <DISPLAYLOGIC><![CDATA[@FinancialAccountCurrencyId@!'' & @FinancialAccountCurrencyId@!@C_Currency_Id@]]></DISPLAYLOGIC>
+<!--FF8080812E26BF58012E277BCA6F0060-->  <DISPLAYLENGTH><![CDATA[12]]></DISPLAYLENGTH>
+<!--FF8080812E26BF58012E277BCA6F0060-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--FF8080812E26BF58012E277BCA6F0060-->  <SEQNO><![CDATA[98]]></SEQNO>
+<!--FF8080812E26BF58012E277BCA6F0060-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--FF8080812E26BF58012E277BCA6F0060-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--FF8080812E26BF58012E277BCA6F0060-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--FF8080812E26BF58012E277BCA6F0060-->  <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
+<!--FF8080812E26BF58012E277BCA6F0060-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--FF8080812E26BF58012E277BCA6F0060-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--FF8080812E26BF58012E277BCA6F0060-->  <GRID_SEQNO><![CDATA[120]]></GRID_SEQNO>
+<!--FF8080812E26BF58012E277BCA6F0060-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--FF8080812E26BF58012E277BCA6F0060-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--FF8080812E26BF58012E277BCA6F0060-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--FF8080812E26BF58012E277BCA6F0060--></AD_FIELD>
+
+<!--FF8080812E26BF58012E277C961A006A--><AD_FIELD>
+<!--FF8080812E26BF58012E277C961A006A-->  <AD_FIELD_ID><![CDATA[FF8080812E26BF58012E277C961A006A]]></AD_FIELD_ID>
+<!--FF8080812E26BF58012E277C961A006A-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--FF8080812E26BF58012E277C961A006A-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--FF8080812E26BF58012E277C961A006A-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--FF8080812E26BF58012E277C961A006A-->  <NAME><![CDATA[Received (Financial Account)]]></NAME>
+<!--FF8080812E26BF58012E277C961A006A-->  <DESCRIPTION><![CDATA[Amount received in currency of financial account]]></DESCRIPTION>
+<!--FF8080812E26BF58012E277C961A006A-->  <HELP><![CDATA[The total amount of the payment, converted to the currency of the financial account.]]></HELP>
+<!--FF8080812E26BF58012E277C961A006A-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--FF8080812E26BF58012E277C961A006A-->  <AD_TAB_ID><![CDATA[C4B6506838E14A349D6717D6856F1B56]]></AD_TAB_ID>
+<!--FF8080812E26BF58012E277C961A006A-->  <AD_COLUMN_ID><![CDATA[4028C9BC2DA5C491012DA689D11F03BD]]></AD_COLUMN_ID>
+<!--FF8080812E26BF58012E277C961A006A-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--FF8080812E26BF58012E277C961A006A-->  <DISPLAYLOGIC><![CDATA[@FinancialAccountCurrencyId@!'' & @FinancialAccountCurrencyId@!@C_Currency_Id@]]></DISPLAYLOGIC>
+<!--FF8080812E26BF58012E277C961A006A-->  <DISPLAYLENGTH><![CDATA[12]]></DISPLAYLENGTH>
+<!--FF8080812E26BF58012E277C961A006A-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--FF8080812E26BF58012E277C961A006A-->  <SEQNO><![CDATA[103]]></SEQNO>
+<!--FF8080812E26BF58012E277C961A006A-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--FF8080812E26BF58012E277C961A006A-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--FF8080812E26BF58012E277C961A006A-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--FF8080812E26BF58012E277C961A006A-->  <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
+<!--FF8080812E26BF58012E277C961A006A-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--FF8080812E26BF58012E277C961A006A-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--FF8080812E26BF58012E277C961A006A-->  <GRID_SEQNO><![CDATA[110]]></GRID_SEQNO>
+<!--FF8080812E26BF58012E277C961A006A-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--FF8080812E26BF58012E277C961A006A-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--FF8080812E26BF58012E277C961A006A-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--FF8080812E26BF58012E277C961A006A--></AD_FIELD>
+
+<!--FF8080812E26BF58012E277D61A40071--><AD_FIELD>
+<!--FF8080812E26BF58012E277D61A40071-->  <AD_FIELD_ID><![CDATA[FF8080812E26BF58012E277D61A40071]]></AD_FIELD_ID>
+<!--FF8080812E26BF58012E277D61A40071-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--FF8080812E26BF58012E277D61A40071-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--FF8080812E26BF58012E277D61A40071-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--FF8080812E26BF58012E277D61A40071-->  <NAME><![CDATA[Exchange Rate]]></NAME>
+<!--FF8080812E26BF58012E277D61A40071-->  <DESCRIPTION><![CDATA[Exchange rate used to convert payment to financial account currency]]></DESCRIPTION>
+<!--FF8080812E26BF58012E277D61A40071-->  <HELP><![CDATA[The exchange rate used to convert the payment amount to the financial account amount]]></HELP>
+<!--FF8080812E26BF58012E277D61A40071-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--FF8080812E26BF58012E277D61A40071-->  <AD_TAB_ID><![CDATA[C4B6506838E14A349D6717D6856F1B56]]></AD_TAB_ID>
+<!--FF8080812E26BF58012E277D61A40071-->  <AD_COLUMN_ID><![CDATA[4028C9BC2DA5C491012DA6832A1003A8]]></AD_COLUMN_ID>
+<!--FF8080812E26BF58012E277D61A40071-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--FF8080812E26BF58012E277D61A40071-->  <DISPLAYLOGIC><![CDATA[@FinancialAccountCurrencyId@!'' & @FinancialAccountCurrencyId@!@C_Currency_Id@]]></DISPLAYLOGIC>
+<!--FF8080812E26BF58012E277D61A40071-->  <DISPLAYLENGTH><![CDATA[12]]></DISPLAYLENGTH>
+<!--FF8080812E26BF58012E277D61A40071-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--FF8080812E26BF58012E277D61A40071-->  <SEQNO><![CDATA[105]]></SEQNO>
+<!--FF8080812E26BF58012E277D61A40071-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--FF8080812E26BF58012E277D61A40071-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--FF8080812E26BF58012E277D61A40071-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--FF8080812E26BF58012E277D61A40071-->  <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
+<!--FF8080812E26BF58012E277D61A40071-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--FF8080812E26BF58012E277D61A40071-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--FF8080812E26BF58012E277D61A40071-->  <GRID_SEQNO><![CDATA[120]]></GRID_SEQNO>
+<!--FF8080812E26BF58012E277D61A40071-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--FF8080812E26BF58012E277D61A40071-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--FF8080812E26BF58012E277D61A40071-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--FF8080812E26BF58012E277D61A40071--></AD_FIELD>
+
 <!--FF8081812D7FD93F012D80127105008E--><AD_FIELD>
 <!--FF8081812D7FD93F012D80127105008E-->  <AD_FIELD_ID><![CDATA[FF8081812D7FD93F012D80127105008E]]></AD_FIELD_ID>
 <!--FF8081812D7FD93F012D80127105008E-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src-db/database/sourcedata/AD_MODEL_OBJECT.xml	Thu Jun 02 00:27:17 2011 +0200
+++ b/src-db/database/sourcedata/AD_MODEL_OBJECT.xml	Thu Jun 02 10:59:08 2011 +0200
@@ -3126,6 +3126,30 @@
 <!--1EC03C207CB741AE8C94DBF0340E2429-->  <NAME><![CDATA[Session Active]]></NAME>
 <!--1EC03C207CB741AE8C94DBF0340E2429--></AD_MODEL_OBJECT>
 
+<!--2179989E376447CBB02066E8D1CCAE20--><AD_MODEL_OBJECT>
+<!--2179989E376447CBB02066E8D1CCAE20-->  <AD_MODEL_OBJECT_ID><![CDATA[2179989E376447CBB02066E8D1CCAE20]]></AD_MODEL_OBJECT_ID>
+<!--2179989E376447CBB02066E8D1CCAE20-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--2179989E376447CBB02066E8D1CCAE20-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--2179989E376447CBB02066E8D1CCAE20-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--2179989E376447CBB02066E8D1CCAE20-->  <ACTION><![CDATA[C]]></ACTION>
+<!--2179989E376447CBB02066E8D1CCAE20-->  <CLASSNAME><![CDATA[org.openbravo.erpCommon.ad_callouts.SE_Payment_FinAccount]]></CLASSNAME>
+<!--2179989E376447CBB02066E8D1CCAE20-->  <ISDEFAULT><![CDATA[Y]]></ISDEFAULT>
+<!--2179989E376447CBB02066E8D1CCAE20-->  <AD_CALLOUT_ID><![CDATA[40289C202E28D30F012E290252730036]]></AD_CALLOUT_ID>
+<!--2179989E376447CBB02066E8D1CCAE20-->  <OBJECT_TYPE><![CDATA[S]]></OBJECT_TYPE>
+<!--2179989E376447CBB02066E8D1CCAE20--></AD_MODEL_OBJECT>
+
+<!--2575F906F04443588CF7426114486717--><AD_MODEL_OBJECT>
+<!--2575F906F04443588CF7426114486717-->  <AD_MODEL_OBJECT_ID><![CDATA[2575F906F04443588CF7426114486717]]></AD_MODEL_OBJECT_ID>
+<!--2575F906F04443588CF7426114486717-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--2575F906F04443588CF7426114486717-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--2575F906F04443588CF7426114486717-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--2575F906F04443588CF7426114486717-->  <ACTION><![CDATA[C]]></ACTION>
+<!--2575F906F04443588CF7426114486717-->  <CLASSNAME><![CDATA[org.openbravo.erpCommon.ad_callouts.SE_Payment_AmountOrConvertRate]]></CLASSNAME>
+<!--2575F906F04443588CF7426114486717-->  <ISDEFAULT><![CDATA[Y]]></ISDEFAULT>
+<!--2575F906F04443588CF7426114486717-->  <AD_CALLOUT_ID><![CDATA[40289C202E28D30F012E2906FF350058]]></AD_CALLOUT_ID>
+<!--2575F906F04443588CF7426114486717-->  <OBJECT_TYPE><![CDATA[S]]></OBJECT_TYPE>
+<!--2575F906F04443588CF7426114486717--></AD_MODEL_OBJECT>
+
 <!--2920E026BC6411DDBD07001A4D8085A3--><AD_MODEL_OBJECT>
 <!--2920E026BC6411DDBD07001A4D8085A3-->  <AD_MODEL_OBJECT_ID><![CDATA[2920E026BC6411DDBD07001A4D8085A3]]></AD_MODEL_OBJECT_ID>
 <!--2920E026BC6411DDBD07001A4D8085A3-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -3469,6 +3493,18 @@
 <!--5FFD3F1EE94D4CC1A3C57F882FAF57CF-->  <LOADONSTARTUP><![CDATA[100]]></LOADONSTARTUP>
 <!--5FFD3F1EE94D4CC1A3C57F882FAF57CF--></AD_MODEL_OBJECT>
 
+<!--6021F1CF6BB14EA8BBFD6D24AAB7214B--><AD_MODEL_OBJECT>
+<!--6021F1CF6BB14EA8BBFD6D24AAB7214B-->  <AD_MODEL_OBJECT_ID><![CDATA[6021F1CF6BB14EA8BBFD6D24AAB7214B]]></AD_MODEL_OBJECT_ID>
+<!--6021F1CF6BB14EA8BBFD6D24AAB7214B-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--6021F1CF6BB14EA8BBFD6D24AAB7214B-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--6021F1CF6BB14EA8BBFD6D24AAB7214B-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--6021F1CF6BB14EA8BBFD6D24AAB7214B-->  <ACTION><![CDATA[C]]></ACTION>
+<!--6021F1CF6BB14EA8BBFD6D24AAB7214B-->  <CLASSNAME><![CDATA[org.openbravo.erpCommon.ad_callouts.SE_Payment_FinAccTransactionAmount]]></CLASSNAME>
+<!--6021F1CF6BB14EA8BBFD6D24AAB7214B-->  <ISDEFAULT><![CDATA[Y]]></ISDEFAULT>
+<!--6021F1CF6BB14EA8BBFD6D24AAB7214B-->  <AD_CALLOUT_ID><![CDATA[40289C202E28D30F012E2907AA10005D]]></AD_CALLOUT_ID>
+<!--6021F1CF6BB14EA8BBFD6D24AAB7214B-->  <OBJECT_TYPE><![CDATA[S]]></OBJECT_TYPE>
+<!--6021F1CF6BB14EA8BBFD6D24AAB7214B--></AD_MODEL_OBJECT>
+
 <!--6172BEF2FBADFE39E040007F0101461A--><AD_MODEL_OBJECT>
 <!--6172BEF2FBADFE39E040007F0101461A-->  <AD_MODEL_OBJECT_ID><![CDATA[6172BEF2FBADFE39E040007F0101461A]]></AD_MODEL_OBJECT_ID>
 <!--6172BEF2FBADFE39E040007F0101461A-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -3481,6 +3517,18 @@
 <!--6172BEF2FBADFE39E040007F0101461A-->  <OBJECT_TYPE><![CDATA[S]]></OBJECT_TYPE>
 <!--6172BEF2FBADFE39E040007F0101461A--></AD_MODEL_OBJECT>
 
+<!--61E933BEA94543FB8DA0AD8885E7C9E8--><AD_MODEL_OBJECT>
+<!--61E933BEA94543FB8DA0AD8885E7C9E8-->  <AD_MODEL_OBJECT_ID><![CDATA[61E933BEA94543FB8DA0AD8885E7C9E8]]></AD_MODEL_OBJECT_ID>
+<!--61E933BEA94543FB8DA0AD8885E7C9E8-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--61E933BEA94543FB8DA0AD8885E7C9E8-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--61E933BEA94543FB8DA0AD8885E7C9E8-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--61E933BEA94543FB8DA0AD8885E7C9E8-->  <ACTION><![CDATA[C]]></ACTION>
+<!--61E933BEA94543FB8DA0AD8885E7C9E8-->  <CLASSNAME><![CDATA[org.openbravo.erpCommon.ad_callouts.SE_Payment_Currency]]></CLASSNAME>
+<!--61E933BEA94543FB8DA0AD8885E7C9E8-->  <ISDEFAULT><![CDATA[Y]]></ISDEFAULT>
+<!--61E933BEA94543FB8DA0AD8885E7C9E8-->  <AD_CALLOUT_ID><![CDATA[40289C202E28D30F012E29062DCC004E]]></AD_CALLOUT_ID>
+<!--61E933BEA94543FB8DA0AD8885E7C9E8-->  <OBJECT_TYPE><![CDATA[S]]></OBJECT_TYPE>
+<!--61E933BEA94543FB8DA0AD8885E7C9E8--></AD_MODEL_OBJECT>
+
 <!--627B02B041C03FDCE040007F01012A65--><AD_MODEL_OBJECT>
 <!--627B02B041C03FDCE040007F01012A65-->  <AD_MODEL_OBJECT_ID><![CDATA[627B02B041C03FDCE040007F01012A65]]></AD_MODEL_OBJECT_ID>
 <!--627B02B041C03FDCE040007F01012A65-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src-db/database/sourcedata/AD_MODEL_OBJECT_MAPPING.xml	Thu Jun 02 00:27:17 2011 +0200
+++ b/src-db/database/sourcedata/AD_MODEL_OBJECT_MAPPING.xml	Thu Jun 02 10:59:08 2011 +0200
@@ -3550,6 +3550,16 @@
 <!--11D29682D4164031AE2912177808D8C3-->  <ISDEFAULT><![CDATA[Y]]></ISDEFAULT>
 <!--11D29682D4164031AE2912177808D8C3--></AD_MODEL_OBJECT_MAPPING>
 
+<!--165624D7379747598D9A0057066629CA--><AD_MODEL_OBJECT_MAPPING>
+<!--165624D7379747598D9A0057066629CA-->  <AD_MODEL_OBJECT_MAPPING_ID><![CDATA[165624D7379747598D9A0057066629CA]]></AD_MODEL_OBJECT_MAPPING_ID>
+<!--165624D7379747598D9A0057066629CA-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--165624D7379747598D9A0057066629CA-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--165624D7379747598D9A0057066629CA-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--165624D7379747598D9A0057066629CA-->  <AD_MODEL_OBJECT_ID><![CDATA[61E933BEA94543FB8DA0AD8885E7C9E8]]></AD_MODEL_OBJECT_ID>
+<!--165624D7379747598D9A0057066629CA-->  <MAPPINGNAME><![CDATA[/ad_callouts/SE_Payment_Currency.html]]></MAPPINGNAME>
+<!--165624D7379747598D9A0057066629CA-->  <ISDEFAULT><![CDATA[Y]]></ISDEFAULT>
+<!--165624D7379747598D9A0057066629CA--></AD_MODEL_OBJECT_MAPPING>
+
 <!--18765831DAEC41E3A2C2B5B3AF41F11D--><AD_MODEL_OBJECT_MAPPING>
 <!--18765831DAEC41E3A2C2B5B3AF41F11D-->  <AD_MODEL_OBJECT_MAPPING_ID><![CDATA[18765831DAEC41E3A2C2B5B3AF41F11D]]></AD_MODEL_OBJECT_MAPPING_ID>
 <!--18765831DAEC41E3A2C2B5B3AF41F11D-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -3740,6 +3750,16 @@
 <!--4574500DD2314CE28AB179852DFD091C-->  <ISDEFAULT><![CDATA[Y]]></ISDEFAULT>
 <!--4574500DD2314CE28AB179852DFD091C--></AD_MODEL_OBJECT_MAPPING>
 
+<!--52B93BBF2509438F892833BECF6D83B4--><AD_MODEL_OBJECT_MAPPING>
+<!--52B93BBF2509438F892833BECF6D83B4-->  <AD_MODEL_OBJECT_MAPPING_ID><![CDATA[52B93BBF2509438F892833BECF6D83B4]]></AD_MODEL_OBJECT_MAPPING_ID>
+<!--52B93BBF2509438F892833BECF6D83B4-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--52B93BBF2509438F892833BECF6D83B4-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--52B93BBF2509438F892833BECF6D83B4-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--52B93BBF2509438F892833BECF6D83B4-->  <AD_MODEL_OBJECT_ID><![CDATA[6021F1CF6BB14EA8BBFD6D24AAB7214B]]></AD_MODEL_OBJECT_ID>
+<!--52B93BBF2509438F892833BECF6D83B4-->  <MAPPINGNAME><![CDATA[/ad_callouts/SE_Payment_FinAccTransactionAmount.html]]></MAPPINGNAME>
+<!--52B93BBF2509438F892833BECF6D83B4-->  <ISDEFAULT><![CDATA[Y]]></ISDEFAULT>
+<!--52B93BBF2509438F892833BECF6D83B4--></AD_MODEL_OBJECT_MAPPING>
+
 <!--5615C5A76A113B53E040007F01012A63--><AD_MODEL_OBJECT_MAPPING>
 <!--5615C5A76A113B53E040007F01012A63-->  <AD_MODEL_OBJECT_MAPPING_ID><![CDATA[5615C5A76A113B53E040007F01012A63]]></AD_MODEL_OBJECT_MAPPING_ID>
 <!--5615C5A76A113B53E040007F01012A63-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -4050,6 +4070,16 @@
 <!--A123864994F54C859DBFE5101904A5B6-->  <ISDEFAULT><![CDATA[Y]]></ISDEFAULT>
 <!--A123864994F54C859DBFE5101904A5B6--></AD_MODEL_OBJECT_MAPPING>
 
+<!--A2CCA35B0ED84C19B98E40A7EE4D5F6E--><AD_MODEL_OBJECT_MAPPING>
+<!--A2CCA35B0ED84C19B98E40A7EE4D5F6E-->  <AD_MODEL_OBJECT_MAPPING_ID><![CDATA[A2CCA35B0ED84C19B98E40A7EE4D5F6E]]></AD_MODEL_OBJECT_MAPPING_ID>
+<!--A2CCA35B0ED84C19B98E40A7EE4D5F6E-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--A2CCA35B0ED84C19B98E40A7EE4D5F6E-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--A2CCA35B0ED84C19B98E40A7EE4D5F6E-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--A2CCA35B0ED84C19B98E40A7EE4D5F6E-->  <AD_MODEL_OBJECT_ID><![CDATA[2575F906F04443588CF7426114486717]]></AD_MODEL_OBJECT_ID>
+<!--A2CCA35B0ED84C19B98E40A7EE4D5F6E-->  <MAPPINGNAME><![CDATA[/ad_callouts/SE_Payment_AmountOrConvertRate.html]]></MAPPINGNAME>
+<!--A2CCA35B0ED84C19B98E40A7EE4D5F6E-->  <ISDEFAULT><![CDATA[Y]]></ISDEFAULT>
+<!--A2CCA35B0ED84C19B98E40A7EE4D5F6E--></AD_MODEL_OBJECT_MAPPING>
+
 <!--AA17604E2E4F11DEB31B8B9D5D2EB7B9--><AD_MODEL_OBJECT_MAPPING>
 <!--AA17604E2E4F11DEB31B8B9D5D2EB7B9-->  <AD_MODEL_OBJECT_MAPPING_ID><![CDATA[AA17604E2E4F11DEB31B8B9D5D2EB7B9]]></AD_MODEL_OBJECT_MAPPING_ID>
 <!--AA17604E2E4F11DEB31B8B9D5D2EB7B9-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -4190,6 +4220,16 @@
 <!--DB172103A6DC44A19FD33A89993A1E4F-->  <ISDEFAULT><![CDATA[Y]]></ISDEFAULT>
 <!--DB172103A6DC44A19FD33A89993A1E4F--></AD_MODEL_OBJECT_MAPPING>
 
+<!--DEA29D0FC98B4FABB17280C9FF3DE600--><AD_MODEL_OBJECT_MAPPING>
+<!--DEA29D0FC98B4FABB17280C9FF3DE600-->  <AD_MODEL_OBJECT_MAPPING_ID><![CDATA[DEA29D0FC98B4FABB17280C9FF3DE600]]></AD_MODEL_OBJECT_MAPPING_ID>
+<!--DEA29D0FC98B4FABB17280C9FF3DE600-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--DEA29D0FC98B4FABB17280C9FF3DE600-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--DEA29D0FC98B4FABB17280C9FF3DE600-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--DEA29D0FC98B4FABB17280C9FF3DE600-->  <AD_MODEL_OBJECT_ID><![CDATA[2179989E376447CBB02066E8D1CCAE20]]></AD_MODEL_OBJECT_ID>
+<!--DEA29D0FC98B4FABB17280C9FF3DE600-->  <MAPPINGNAME><![CDATA[/ad_callouts/SE_Payment_FinAccount.html]]></MAPPINGNAME>
+<!--DEA29D0FC98B4FABB17280C9FF3DE600-->  <ISDEFAULT><![CDATA[Y]]></ISDEFAULT>
+<!--DEA29D0FC98B4FABB17280C9FF3DE600--></AD_MODEL_OBJECT_MAPPING>
+
 <!--DF6BD3A8D6814A42A31B029036E3CAD0--><AD_MODEL_OBJECT_MAPPING>
 <!--DF6BD3A8D6814A42A31B029036E3CAD0-->  <AD_MODEL_OBJECT_MAPPING_ID><![CDATA[DF6BD3A8D6814A42A31B029036E3CAD0]]></AD_MODEL_OBJECT_MAPPING_ID>
 <!--DF6BD3A8D6814A42A31B029036E3CAD0-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src-db/database/sourcedata/AD_VAL_RULE.xml	Thu Jun 02 00:27:17 2011 +0200
+++ b/src-db/database/sourcedata/AD_VAL_RULE.xml	Thu Jun 02 10:59:08 2011 +0200
@@ -93,7 +93,6 @@
 <!--116-->  <NAME><![CDATA[AD_Client Login]]></NAME>
 <!--116-->  <DESCRIPTION><![CDATA[Restrict to login client]]></DESCRIPTION>
 <!--116-->  <TYPE><![CDATA[S]]></TYPE>
-<!--116-->  <CODE><![CDATA[AD_Client.AD_Client_ID=@#AD_Client_ID@]]></CODE>
 <!--116-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--116--></AD_VAL_RULE>
 
@@ -1665,7 +1664,13 @@
 <!--DC79E946854746F1A7965DCADF1D76FE-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--DC79E946854746F1A7965DCADF1D76FE-->  <NAME><![CDATA[Currency of Financial Account]]></NAME>
 <!--DC79E946854746F1A7965DCADF1D76FE-->  <TYPE><![CDATA[S]]></TYPE>
-<!--DC79E946854746F1A7965DCADF1D76FE-->  <CODE><![CDATA[c_currency.c_currency_id in (select c_currency_id from fin_financial_account where fin_financial_account_id = @FIN_Financial_Account_ID@)]]></CODE>
+<!--DC79E946854746F1A7965DCADF1D76FE-->  <CODE><![CDATA[c_currency.c_currency_id in (select c_currency_id from fin_financial_account where fin_financial_account_id = @FIN_Financial_Account_ID@) 
+OR 
+exists (select 1 from fin_finacc_paymentmethod where fin_financial_account_id = @FIN_Financial_Account_ID@ and fin_paymentmethod_id = @FIN_PaymentMethod_ID@ and isactive='Y' and  (
+(@IsReceipt@ = 'Y' and payin_allow ='Y' and payin_ismulticurrency='Y')
+OR
+(@IsReceipt@ = 'N' and payout_allow ='Y' and payout_ismulticurrency='Y')
+))]]></CODE>
 <!--DC79E946854746F1A7965DCADF1D76FE-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--DC79E946854746F1A7965DCADF1D76FE--></AD_VAL_RULE>
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/org/openbravo/base/util/Convert.java	Thu Jun 02 10:59:08 2011 +0200
@@ -0,0 +1,161 @@
+/*
+ *************************************************************************
+ * The contents of this file are subject to the Openbravo  Public  License
+ * Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
+ * Version 1.1  with a permitted attribution clause; you may not  use this
+ * file except in compliance with the License. You  may  obtain  a copy of
+ * the License at http://www.openbravo.com/legal/license.html
+ * Software distributed under the License  is  distributed  on  an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ * License for the specific  language  governing  rights  and  limitations
+ * under the License.
+ * The Original Code is Openbravo ERP.
+ * The Initial Developer of the Original Code is Openbravo SLU
+ * All portions are Copyright (C) 2011 Openbravo SLU
+ * All Rights Reserved.
+ * Contributor(s):  Enterprise Intelligence Systems (http://www.eintel.com.au).
+ ************************************************************************
+ */
+package org.openbravo.base.util;
+
+import java.math.BigDecimal;
+import java.math.RoundingMode;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+import org.apache.log4j.Logger;
+import org.openbravo.base.session.OBPropertiesProvider;
+
+/**
+ * Collection of static methods for converting data from one form to another
+ * 
+ * @author eintelau (ben.sommerville@eintel.com.au)
+ */
+public class Convert {
+  private static final long serialVersionUID = 1L;
+  static Logger log4j = Logger.getLogger(Convert.class);
+
+  /**
+   * Convert a string to a Date object using the standard java date format
+   * 
+   * @param strDate
+   *          String with date in java date format
+   * @return valid Date object, or null if string cannot be parsed into a date
+   */
+  public static Date toDate(String strDate) {
+    if (strDate == null || strDate.isEmpty())
+      return null;
+    try {
+      String dateFormat = OBPropertiesProvider.getInstance().getOpenbravoProperties().getProperty(
+          "dateFormat.java");
+      SimpleDateFormat outputFormat = new SimpleDateFormat(dateFormat);
+      return (outputFormat.parse(strDate));
+    } catch (ParseException e) {
+      log4j.error(e.getMessage(), e);
+      return null;
+    }
+  }
+
+  /**
+   * Convert a string to an amount (BigDecimal) object
+   * 
+   * @param strAmount
+   *          String with amount
+   * @return valid BigDecimal object, or null if string cannot be parsed into a BigDecimal
+   */
+  public static BigDecimal toAmount(String strAmount) {
+    return toBigDecimal(strAmount);
+  }
+
+  /**
+   * Convert a string to a General Quantity (BigDecimal) object
+   * 
+   * @param strQuantity
+   *          String with amount
+   * @return valid BigDecimal object, or null if string cannot be parsed into a BigDecimal
+   */
+  public static BigDecimal toGeneralQuantity(String strQuantity) {
+    return toBigDecimal(strQuantity);
+  }
+
+  /**
+   * Convert a string to a BigDecimal object
+   * 
+   * @param strNumber
+   *          String with number to be converted
+   * @return valid BigDecimal object, or null if string cannot be parsed into a BigDecimal
+   */
+  public static BigDecimal toBigDecimal(String strNumber) {
+    if (strNumber == null || strNumber.isEmpty()) {
+      return null;
+    }
+    try {
+      return new BigDecimal(strNumber);
+    } catch (NumberFormatException e) {
+      log4j.error(e.getMessage(), e);
+      return null;
+    }
+  }
+
+  /**
+   * Convert a BigDecimal to a string
+   * 
+   * @param in
+   *          BigDecimal to convert to a string
+   * @return String representation of input
+   */
+  public static String toString(BigDecimal in) {
+    if (in == null) {
+      return "";
+    }
+    return in.toPlainString();
+  }
+
+  /**
+   * Convert a BigDecimal to a string with a specified number of decimal places
+   * 
+   * @param in
+   *          BigDecimal to convert to a string
+   * @param precision
+   *          (Max) Number of decimal places to output Note: precision generally refers to the total
+   *          number of digits in a number, but within Openbravo it refers to the number of
+   *          significant digits after the decimal point.
+   * @return String representation of input
+   */
+  public static String toStringWithPrecision(BigDecimal in, long precision) {
+    if (in == null) {
+      return "";
+    }
+    try {
+      return in.setScale((int) precision, RoundingMode.HALF_UP).toPlainString();
+    } catch (ArithmeticException e) {
+      log4j.error(e.getMessage(), e);
+      return null;
+    }
+  }
+
+  /**
+   * Convert a BigDecimal to a BigDecimal with a specified number of decimal places
+   * 
+   * @param in
+   *          BigDecimal to set the precision
+   * @param precision
+   *          (Max) Number of decimal places to output Note: precision generally refers to the total
+   *          number of digits in a number, but within Openbravo it refers to the number of
+   *          significant digits after the decimal point.
+   * @return BigDecimal with specified number of significant decimal places
+   */
+  public static BigDecimal toNumberWithPrecision(BigDecimal in, long precision) {
+    if (in == null) {
+      return null;
+    }
+    try {
+      return in.setScale((int) precision, RoundingMode.HALF_UP);
+    } catch (ArithmeticException e) {
+      log4j.error(e.getMessage(), e);
+      return null;
+    }
+  }
+
+}
--- a/src/org/openbravo/dal/service/OBDal.java	Thu Jun 02 00:27:17 2011 +0200
+++ b/src/org/openbravo/dal/service/OBDal.java	Thu Jun 02 10:59:08 2011 +0200
@@ -369,6 +369,22 @@
   }
 
   /**
+   * Creates an OBCriteria object for the specified class.
+   * 
+   * @param clz
+   *          the class used to create the OBCriteria
+   * @param alias
+   *          an alias that can be used to refer to the specified object
+   * @return a new OBCriteria object
+   */
+  public <T extends BaseOBObject> OBCriteria<T> createCriteria(Class<T> clz, String alias) {
+    checkReadAccess(clz);
+    final OBCriteria<T> obCriteria = new OBCriteria<T>(clz.getName(), alias);
+    obCriteria.setEntity(ModelProvider.getInstance().getEntity(clz));
+    return obCriteria;
+  }
+
+  /**
    * Creates an OBCriteria object for the specified entity.
    * 
    * @param entityName
@@ -383,6 +399,22 @@
   }
 
   /**
+   * Creates an OBCriteria object for the specified entity.
+   * 
+   * @param entityName
+   *          the type used to create the OBCriteria
+   * @param alias
+   *          an alias that can be used to refer to the specified object
+   * @return a new OBCriteria object
+   */
+  public <T extends BaseOBObject> OBCriteria<T> createCriteria(String entityName, String alias) {
+    checkReadAccess(entityName);
+    final OBCriteria<T> obCriteria = new OBCriteria<T>(entityName, alias);
+    obCriteria.setEntity(ModelProvider.getInstance().getEntity(entityName));
+    return obCriteria;
+  }
+
+  /**
    * Retrieves a list of baseOBObjects using the unique-constraints defined for the entity. The
    * passed BaseOBObject and the unique-constraints are used to construct a query searching for
    * matching objects in the database.
--- a/src/org/openbravo/erpCommon/ad_callouts/SE_PaymentMethod_FinAccount.java	Thu Jun 02 00:27:17 2011 +0200
+++ b/src/org/openbravo/erpCommon/ad_callouts/SE_PaymentMethod_FinAccount.java	Thu Jun 02 10:59:08 2011 +0200
@@ -43,6 +43,8 @@
 
     String tabId = info.getTabId();
     boolean isVendorTab = "224".equals(tabId);
+    String finIsReceipt = info.getStringParameter("inpfinIsreceipt", null);
+    boolean isPaymentOut = isVendorTab || "N".equals(finIsReceipt);
     String srtOrgId = info.getStringParameter("inpadOrgId", IsIDFilter.instance);
 
     FIN_PaymentMethod paymentMethod = OBDal.getInstance().get(FIN_PaymentMethod.class,
@@ -53,6 +55,7 @@
         isVendorTab ? "inppoFinancialAccountId" : "inpfinFinancialAccountId", IsIDFilter.instance);
 
     boolean isSelected = true;
+    boolean isMultiCurrencyEnabled = false;
 
     // No Payment Method selected
     if (srtPaymentMethodId.isEmpty() && srtPOPaymentMethodId.isEmpty()) {
@@ -71,19 +74,37 @@
       obc.add(Restrictions.eq(FinAccPaymentMethod.PROPERTY_PAYMENTMETHOD, paymentMethod));
       obc.add(Restrictions.in("organization.id", OBContext.getOBContext()
           .getOrganizationStructureProvider().getNaturalTree(srtOrgId)));
+      if (isPaymentOut) {
+        obc.add(Restrictions.eq(FinAccPaymentMethod.PROPERTY_PAYOUTALLOW, true));
+      } else {
+        obc.add(Restrictions.eq(FinAccPaymentMethod.PROPERTY_PAYINALLOW, true));
+      }
 
+      FinAccPaymentMethod selectedPaymentMethod = null;
       for (FinAccPaymentMethod accPm : obc.list()) {
         if (srtSelectedFinancialAccount.equals(accPm.getAccount().getId())) {
           isSelected = true;
+          selectedPaymentMethod = accPm;
         } else if (srtSelectedFinancialAccount.isEmpty()) {
           srtSelectedFinancialAccount = accPm.getAccount().getIdentifier();
           isSelected = true;
+          selectedPaymentMethod = accPm;
         }
         info.addSelectResult(accPm.getAccount().getId(), accPm.getAccount().getIdentifier(),
             isSelected);
         isSelected = false;
       }
+      if (selectedPaymentMethod != null) {
+        if (isPaymentOut) {
+          isMultiCurrencyEnabled = selectedPaymentMethod.isPayoutAllow()
+              && selectedPaymentMethod.isPayoutIsMulticurrency();
+        } else {
+          isMultiCurrencyEnabled = selectedPaymentMethod.isPayinAllow()
+              && selectedPaymentMethod.isPayinIsMulticurrency();
+        }
+      }
     }
     info.endSelect();
+    info.addResult("inpismulticurrencyenabled", isMultiCurrencyEnabled ? "Y" : "N");
   }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/org/openbravo/erpCommon/ad_callouts/SE_Payment_AmountOrConvertRate.java	Thu Jun 02 10:59:08 2011 +0200
@@ -0,0 +1,61 @@
+/*
+ *************************************************************************
+ * The contents of this file are subject to the Openbravo  Public  License
+ * Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
+ * Version 1.1  with a permitted attribution clause; you may not  use this
+ * file except in compliance with the License. You  may  obtain  a copy of
+ * the License at http://www.openbravo.com/legal/license.html
+ * Software distributed under the License  is  distributed  on  an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ * License for the specific  language  governing  rights  and  limitations
+ * under the License.
+ * The Original Code is Openbravo ERP.
+ * The Initial Developer of the Original Code is Openbravo SLU
+ * All portions are Copyright (C) 2011 Openbravo SLU
+ * All Rights Reserved.
+ * Contributor(s):  Enterprise Intelligence Systems (http://www.eintel.com.au).
+ ************************************************************************
+ */
+package org.openbravo.erpCommon.ad_callouts;
+
+import java.math.BigDecimal;
+
+import javax.servlet.ServletException;
+
+import org.openbravo.base.secureApp.VariablesSecureApp;
+import org.openbravo.base.util.Convert;
+import org.openbravo.dal.service.OBDal;
+import org.openbravo.model.financialmgmt.payment.FIN_FinancialAccount;
+
+/**
+ * Update converted amount
+ * 
+ * @author eintelau (ben.sommerville@eintel.com.au)
+ */
+public class SE_Payment_AmountOrConvertRate extends SimpleCallout {
+
+  private static final long serialVersionUID = 1L;
+
+  @Override
+  protected void execute(CalloutInfo info) throws ServletException {
+    VariablesSecureApp vars = info.vars;
+    String strConvertRate = vars.getStringParameter("inpfinaccTxnConvertRate");
+    BigDecimal convertRate = Convert.toBigDecimal(strConvertRate);
+
+    String strAmount = vars.getNumericParameter("inpamount");
+    BigDecimal amount = Convert.toAmount(strAmount);
+
+    String financialAccountId = vars.getStringParameter("inpfinFinancialAccountId");
+    final OBDal dal = OBDal.getInstance();
+    FIN_FinancialAccount financialAccount = dal.get(FIN_FinancialAccount.class, financialAccountId);
+
+    String finAccTxnAmount = "";
+    if (convertRate != null && amount != null) {
+      BigDecimal converted = amount.multiply(convertRate);
+      finAccTxnAmount = Convert.toStringWithPrecision(converted, financialAccount.getCurrency()
+          .getStandardPrecision());
+      info.addResult("inpfinaccTxnAmount", finAccTxnAmount);
+    }
+
+  }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/org/openbravo/erpCommon/ad_callouts/SE_Payment_Currency.java	Thu Jun 02 10:59:08 2011 +0200
@@ -0,0 +1,83 @@
+/*
+ *************************************************************************
+ * The contents of this file are subject to the Openbravo  Public  License
+ * Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
+ * Version 1.1  with a permitted attribution clause; you may not  use this
+ * file except in compliance with the License. You  may  obtain  a copy of
+ * the License at http://www.openbravo.com/legal/license.html
+ * Software distributed under the License  is  distributed  on  an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ * License for the specific  language  governing  rights  and  limitations
+ * under the License.
+ * The Original Code is Openbravo ERP.
+ * The Initial Developer of the Original Code is Openbravo SLU
+ * All portions are Copyright (C) 2011 Openbravo SLU
+ * All Rights Reserved.
+ * Contributor(s):  Enterprise Intelligence Systems (http://www.eintel.com.au).
+ ************************************************************************
+ */
+package org.openbravo.erpCommon.ad_callouts;
+
+import java.math.BigDecimal;
+
+import javax.servlet.ServletException;
+
+import org.openbravo.base.secureApp.VariablesSecureApp;
+import org.openbravo.base.util.Convert;
+import org.openbravo.dal.service.OBDal;
+import org.openbravo.erpCommon.dao.CurrencyDao;
+import org.openbravo.model.common.currency.ConversionRate;
+import org.openbravo.model.common.currency.Currency;
+import org.openbravo.model.financialmgmt.payment.FIN_FinancialAccount;
+
+/**
+ * Update exchange rate and financial txn amount
+ * 
+ * @author eintelau (ben.sommerville@eintel.com.au)*
+ */
+public class SE_Payment_Currency extends SimpleCallout {
+
+  private static final long serialVersionUID = 1L;
+
+  @Override
+  protected void execute(CalloutInfo info) throws ServletException {
+    VariablesSecureApp vars = info.vars;
+    String financialAccountId = vars.getStringParameter("inpfinFinancialAccountId");
+    String currencyId = vars.getStringParameter("inpcCurrencyId");
+
+    String finAccConvertRate = "";
+    String finAccTxnAmount = "";
+
+    final OBDal dal = OBDal.getInstance();
+    FIN_FinancialAccount financialAccount = dal.get(FIN_FinancialAccount.class, financialAccountId);
+    Currency currency = dal.get(Currency.class, currencyId);
+
+    if (financialAccount != null && currency != null) {
+      String strAmount = vars.getNumericParameter("inpamount");
+      final Currency financialAccountCurrency = financialAccount.getCurrency();
+      if (currency.equals(financialAccountCurrency)) {
+        finAccConvertRate = "1";
+        finAccTxnAmount = strAmount;
+      } else {
+        final CurrencyDao currencyDao = new CurrencyDao();
+        String paymentDate = vars.getStringParameter("inppaymentdate");
+        final ConversionRate conversionRate = currencyDao.getConversionRate(currency,
+            financialAccountCurrency, Convert.toDate(paymentDate));
+        if (conversionRate != null) {
+          finAccConvertRate = Convert.toStringWithPrecision(conversionRate.getMultipleRateBy(),
+              CurrencyDao.CONVERSION_RATE_PRECISION);
+        }
+
+        BigDecimal amount = Convert.toAmount(strAmount);
+        if (amount != null && conversionRate != null) {
+          BigDecimal converted = amount.multiply(conversionRate.getMultipleRateBy());
+          finAccTxnAmount = Convert.toStringWithPrecision(converted, financialAccountCurrency
+              .getStandardPrecision());
+        }
+      }
+    }
+    info.addResult("inpfinaccTxnConvertRate", finAccConvertRate);
+    info.addResult("inpfinaccTxnAmount", finAccTxnAmount);
+
+  }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/org/openbravo/erpCommon/ad_callouts/SE_Payment_FinAccTransactionAmount.java	Thu Jun 02 10:59:08 2011 +0200
@@ -0,0 +1,57 @@
+/*
+ *************************************************************************
+ * The contents of this file are subject to the Openbravo  Public  License
+ * Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
+ * Version 1.1  with a permitted attribution clause; you may not  use this
+ * file except in compliance with the License. You  may  obtain  a copy of
+ * the License at http://www.openbravo.com/legal/license.html
+ * Software distributed under the License  is  distributed  on  an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ * License for the specific  language  governing  rights  and  limitations
+ * under the License.
+ * The Original Code is Openbravo ERP.
+ * The Initial Developer of the Original Code is Openbravo SLU
+ * All portions are Copyright (C) 2011 Openbravo SLU
+ * All Rights Reserved.
+ * Contributor(s):  Enterprise Intelligence Systems (http://www.eintel.com.au).
+ ************************************************************************
+ */
+package org.openbravo.erpCommon.ad_callouts;
+
+import java.math.BigDecimal;
+import java.math.MathContext;
+
+import javax.servlet.ServletException;
+
+import org.openbravo.base.secureApp.VariablesSecureApp;
+import org.openbravo.base.util.Convert;
+import org.openbravo.erpCommon.dao.CurrencyDao;
+
+/**
+ * Update exchange rate
+ * 
+ * @author eintelau (ben.sommerville@eintel.com.au)
+ */
+public class SE_Payment_FinAccTransactionAmount extends SimpleCallout {
+
+  private static final long serialVersionUID = 1L;
+
+  @Override
+  protected void execute(CalloutInfo info) throws ServletException {
+    VariablesSecureApp vars = info.vars;
+    String strFinaccTxnAmount = vars.getStringParameter("inpfinaccTxnAmount");
+    BigDecimal finaccTxnAmount = Convert.toBigDecimal(strFinaccTxnAmount);
+
+    String strAmount = vars.getNumericParameter("inpamount");
+    BigDecimal amount = Convert.toAmount(strAmount);
+
+    if (finaccTxnAmount != null && amount != null && amount.compareTo(BigDecimal.ZERO) != 0) {
+      BigDecimal convertRate = finaccTxnAmount.divide(amount, MathContext.DECIMAL32);
+      String strConvertRate = Convert.toStringWithPrecision(convertRate,
+          CurrencyDao.CONVERSION_RATE_PRECISION);
+      info.addResult("inpfinaccTxnConvertRate", strConvertRate);
+    }
+
+  }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/org/openbravo/erpCommon/ad_callouts/SE_Payment_FinAccount.java	Thu Jun 02 10:59:08 2011 +0200
@@ -0,0 +1,83 @@
+/*
+ *************************************************************************
+ * The contents of this file are subject to the Openbravo  Public  License
+ * Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
+ * Version 1.1  with a permitted attribution clause; you may not  use this
+ * file except in compliance with the License. You  may  obtain  a copy of
+ * the License at http://www.openbravo.com/legal/license.html
+ * Software distributed under the License  is  distributed  on  an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ * License for the specific  language  governing  rights  and  limitations
+ * under the License.
+ * The Original Code is Openbravo ERP.
+ * The Initial Developer of the Original Code is Openbravo SLU
+ * All portions are Copyright (C) 2011 Openbravo SLU
+ * All Rights Reserved.
+ * Contributor(s):  Enterprise Intelligence Systems (http://www.eintel.com.au).
+ ************************************************************************
+ */
+package org.openbravo.erpCommon.ad_callouts;
+
+import javax.servlet.ServletException;
+
+import org.openbravo.base.filter.IsIDFilter;
+import org.openbravo.base.secureApp.VariablesSecureApp;
+import org.openbravo.dal.core.DalUtil;
+import org.openbravo.dal.service.OBDal;
+import org.openbravo.model.financialmgmt.payment.FIN_FinancialAccount;
+import org.openbravo.model.financialmgmt.payment.FIN_PaymentMethod;
+import org.openbravo.model.financialmgmt.payment.FinAccPaymentMethod;
+
+/**
+ * Update currency, exchange rate and financial txn amount
+ * 
+ * @author eintelau (ben.sommerville@eintel.com.au)
+ */
+public class SE_Payment_FinAccount extends SimpleCallout {
+
+  private static final long serialVersionUID = 1L;
+
+  @Override
+  protected void execute(CalloutInfo info) throws ServletException {
+    VariablesSecureApp vars = info.vars;
+    String financialAccountId = vars.getStringParameter("inpfinFinancialAccountId");
+    FIN_FinancialAccount financialAccount = OBDal.getInstance().get(FIN_FinancialAccount.class,
+        financialAccountId);
+    if (financialAccount != null) {
+      info.addResult("inpcCurrencyId", DalUtil.getId(financialAccount.getCurrency()).toString());
+      info.addResult("inpfinancialaccountcurrencyid", DalUtil.getId(financialAccount.getCurrency())
+          .toString());
+
+      info.addResult("inpfinaccTxnConvertRate", 1);
+
+      String strAmount = vars.getNumericParameter("inpamount");
+      info.addResult("inpfinaccTxnAmount", strAmount);
+    } else {
+      info.addResult("inpfinaccTxnConvertRate", "");
+      info.addResult("inpfinaccTxnAmount", "");
+    }
+
+    String finIsReceipt = info.getStringParameter("inpfinIsreceipt", null);
+    boolean isPaymentOut = "N".equals(finIsReceipt);
+
+    String srtPaymentMethodId = info.getStringParameter("inpfinPaymentmethodId",
+        IsIDFilter.instance);
+    FIN_PaymentMethod paymentMethod = OBDal.getInstance().get(FIN_PaymentMethod.class,
+        srtPaymentMethodId);
+
+    boolean isMultiCurrencyEnabled = false;
+    if (paymentMethod != null && financialAccount != null) {
+      for (FinAccPaymentMethod accPm : financialAccount.getFinancialMgmtFinAccPaymentMethodList()) {
+        if (paymentMethod.getId().equals(accPm.getPaymentMethod().getId())) {
+          if (isPaymentOut) {
+            isMultiCurrencyEnabled = accPm.isPayoutAllow() && accPm.isPayoutIsMulticurrency();
+          } else {
+            isMultiCurrencyEnabled = accPm.isPayinAllow() && accPm.isPayinIsMulticurrency();
+          }
+          break;
+        }
+      }
+    }
+    info.addResult("inpismulticurrencyenabled", isMultiCurrencyEnabled ? "Y" : "N");
+  }
+}
--- a/src/org/openbravo/erpCommon/ad_forms/DocFINFinAccTransaction.java	Thu Jun 02 00:27:17 2011 +0200
+++ b/src/org/openbravo/erpCommon/ad_forms/DocFINFinAccTransaction.java	Thu Jun 02 10:59:08 2011 +0200
@@ -20,6 +20,7 @@
 package org.openbravo.erpCommon.ad_forms;
 
 import java.math.BigDecimal;
+import java.math.MathContext;
 import java.sql.Connection;
 import java.text.SimpleDateFormat;
 import java.util.ArrayList;
@@ -31,6 +32,7 @@
 import org.hibernate.criterion.Restrictions;
 import org.openbravo.base.secureApp.VariablesSecureApp;
 import org.openbravo.base.session.OBPropertiesProvider;
+import org.openbravo.base.util.Convert;
 import org.openbravo.dal.core.OBContext;
 import org.openbravo.dal.service.OBCriteria;
 import org.openbravo.dal.service.OBDal;
@@ -42,6 +44,8 @@
 import org.openbravo.model.common.businesspartner.BusinessPartner;
 import org.openbravo.model.common.enterprise.AcctSchemaTableDocType;
 import org.openbravo.model.financialmgmt.accounting.FIN_FinancialAccountAccounting;
+import org.openbravo.model.financialmgmt.accounting.coa.AccountingCombination;
+import org.openbravo.model.financialmgmt.accounting.coa.AcctSchemaDefault;
 import org.openbravo.model.financialmgmt.accounting.coa.AcctSchemaTable;
 import org.openbravo.model.financialmgmt.gl.GLItem;
 import org.openbravo.model.financialmgmt.payment.FIN_FinaccTransaction;
@@ -58,6 +62,7 @@
   public static final String TRXTYPE_BankFee = "BF";
   BigDecimal usedCredit = ZERO;
   BigDecimal generatedCredit = ZERO;
+  String paymentDate = null;
 
   private static final long serialVersionUID = 1L;
   private static final Logger log4j = Logger.getLogger(DocFINFinAccTransaction.class);
@@ -85,6 +90,7 @@
     generatedCredit = "".equals(data[0].getField("GeneratedCredit")) ? ZERO : new BigDecimal(
         data[0].getField("GeneratedCredit"));
     Amounts[AMTTYPE_Gross] = depositAmount.subtract(paymentAmount).toString();
+    paymentDate = data[0].getField("paymentDate");
     loadDocumentType();
     p_lines = loadLines();
     return true;
@@ -360,66 +366,90 @@
     FIN_FinaccTransaction transaction = OBDal.getInstance().get(FIN_FinaccTransaction.class,
         Record_ID);
     String Fact_Acct_Group_ID = SequenceIdData.getUUID();
-    if (!getDocumentPaymentConfirmation(transaction.getFinPayment())) {
+    final FIN_Payment txnFinPayment = transaction.getFinPayment();
+
+    BigDecimal docToSchemaConversionRate = null;
+    // See if we can use the conversion rate specified in the transcaction
+    if (transaction.getForeignCurrency() != null && !as.getC_Currency_ID().equals(C_Currency_ID)
+        && as.getC_Currency_ID().equals(transaction.getForeignCurrency().getId())) {
+      // txn conversion rate is from foreign currency to txn currency
+      // So need to invert to convert from doc currency to schema currency
+      docToSchemaConversionRate = BigDecimal.ONE.divide(transaction.getForeignConversionRate(),
+          MathContext.DECIMAL64);
+    }
+
+    if (!getDocumentPaymentConfirmation(txnFinPayment)) {
+      // Multicurrency balancing
+      BigDecimal paymentToSchemaConversionRate = null;
+      String paymentCurrencyId = C_Currency_ID;
+      if (!C_Currency_ID.equals(txnFinPayment.getCurrency().getId())) {
+        // If payment currency different from account currency, flag as multicurrency so that
+        // source balancing doesn't try match amounts in different currencies
+        MultiCurrency = true;
+        paymentCurrencyId = txnFinPayment.getCurrency().getId();
+        // See if we can use the conversion rate specified in the payment
+        if (!as.getC_Currency_ID().equals(paymentCurrencyId)
+            && as.getC_Currency_ID().equals(C_Currency_ID)) {
+          // Payment financial txn conversion rate is from payment currency to account currency
+          // Can use this rate when schema currency is same as financial account currency
+          paymentToSchemaConversionRate = txnFinPayment.getFinancialTransactionConvertRate();
+        }
+      }
+
       for (int i = 0; p_lines != null && i < p_lines.length; i++) {
         DocLine_FINFinAccTransaction line = (DocLine_FINFinAccTransaction) p_lines[i];
         boolean isPrepayment = "Y".equals(line.getIsPrepayment());
-        boolean isReceipt = transaction.getFinPayment().isReceipt();
+        boolean isReceipt = txnFinPayment.isReceipt();
         BigDecimal bpamount = new BigDecimal(line.getAmount());
         if (!"".equals(line.getWriteOffAmt())
             && ZERO.compareTo(new BigDecimal(line.getWriteOffAmt())) != 0) {
+          // Writeoff uses same exchange rate as original invoice
           fact.createLine(line, getAccount(AcctServer.ACCTTYPE_WriteOffDefault, as, conn),
-              C_Currency_ID, (isReceipt ? line.getWriteOffAmt() : ""),
-              (isReceipt ? "" : line.getWriteOffAmt()), Fact_Acct_Group_ID, nextSeqNo(SeqNo),
-              DocumentType, conn);
+              paymentCurrencyId, (isReceipt ? line.getWriteOffAmt() : ""), (isReceipt ? "" : line
+                  .getWriteOffAmt()), Fact_Acct_Group_ID, nextSeqNo(SeqNo), DocumentType,
+              paymentDate, conn);
           bpamount = bpamount.add(new BigDecimal(line.getWriteOffAmt()));
         }
         // Bug critical: Before GL Item was not taken into account
         if (!"".equals(line.cGlItemId)) {
-          fact.createLine(
-              line,
-              getAccountGLItem(OBDal.getInstance().get(GLItem.class, line.getCGlItemId()), as,
-                  isReceipt, conn), C_Currency_ID, line.getPaymentAmount(),
-              line.getDepositAmount(), Fact_Acct_Group_ID, nextSeqNo(SeqNo), DocumentType, conn);
+          fact.createLine(line, getAccountGLItem(OBDal.getInstance().get(GLItem.class,
+              line.getCGlItemId()), as, isReceipt, conn), paymentCurrencyId, line
+              .getPaymentAmount(), line.getDepositAmount(), Fact_Acct_Group_ID, nextSeqNo(SeqNo),
+              DocumentType, null, paymentToSchemaConversionRate, conn);
         } else {
-          fact.createLine(
-              line,
-              getAccountBPartner(
-                  (line.m_C_BPartner_ID == null || line.m_C_BPartner_ID.equals("")) ? this.C_BPartner_ID
-                      : line.m_C_BPartner_ID, as, isReceipt, isPrepayment, conn), C_Currency_ID,
-              !isReceipt ? bpamount.toString() : "", isReceipt ? bpamount.toString() : "",
-              Fact_Acct_Group_ID, nextSeqNo(SeqNo), DocumentType, conn);
+          fact
+              .createLine(line,
+                  getAccountBPartner((line.m_C_BPartner_ID == null || line.m_C_BPartner_ID
+                      .equals("")) ? this.C_BPartner_ID : line.m_C_BPartner_ID, as, isReceipt,
+                      isPrepayment, conn), paymentCurrencyId,
+                  !isReceipt ? bpamount.toString() : "", isReceipt ? bpamount.toString() : "",
+                  Fact_Acct_Group_ID, nextSeqNo(SeqNo), DocumentType, paymentDate, conn);
         }
       }
       // Pre-payment is consumed when Used Credit Amount not equals Zero. When consuming Credit no
       // credit is generated
-      if (transaction.getFinPayment().getUsedCredit().compareTo(ZERO) != 0
-          && transaction.getFinPayment().getGeneratedCredit().compareTo(ZERO) == 0) {
-        fact.createLine(
-            null,
-            getAccountBPartner(C_BPartner_ID, as, transaction.getFinPayment().isReceipt(), true,
-                conn), C_Currency_ID, (transaction.getFinPayment().isReceipt() ? transaction
-                .getFinPayment().getUsedCredit().toString() : ""), (transaction.getFinPayment()
-                .isReceipt() ? "" : transaction.getFinPayment().getUsedCredit().toString()),
-            Fact_Acct_Group_ID, nextSeqNo(SeqNo), DocumentType, conn);
+      if (txnFinPayment.getUsedCredit().compareTo(ZERO) != 0
+          && txnFinPayment.getGeneratedCredit().compareTo(ZERO) == 0) {
+        fact.createLine(null, getAccountBPartner(C_BPartner_ID, as, txnFinPayment.isReceipt(),
+            true, conn), paymentCurrencyId, (txnFinPayment.isReceipt() ? txnFinPayment
+            .getUsedCredit().toString() : ""), (txnFinPayment.isReceipt() ? "" : txnFinPayment
+            .getUsedCredit().toString()), Fact_Acct_Group_ID, nextSeqNo(SeqNo), DocumentType, null,
+            paymentToSchemaConversionRate, conn);
       }
     } else {
-      fact.createLine(
-          null,
-          getAccountPayment(conn, transaction.getFinPayment().getPaymentMethod(), transaction
-              .getFinPayment().getAccount(), as, transaction.getFinPayment().isReceipt()),
-          C_Currency_ID, !transaction.getFinPayment().isReceipt() ? transaction.getFinPayment()
-              .getAmount().toString() : "", transaction.getFinPayment().isReceipt() ? transaction
-              .getFinPayment().getAmount().toString() : "", Fact_Acct_Group_ID, nextSeqNo(SeqNo),
-          DocumentType, conn);
+      fact.createLine(null, getAccountPayment(conn, txnFinPayment.getPaymentMethod(), txnFinPayment
+          .getAccount(), as, txnFinPayment.isReceipt()), C_Currency_ID,
+          !txnFinPayment.isReceipt() ? txnFinPayment.getFinancialTransactionAmount().toString()
+              : "", txnFinPayment.isReceipt() ? txnFinPayment.getFinancialTransactionAmount()
+              .toString() : "", Fact_Acct_Group_ID, nextSeqNo(SeqNo), DocumentType, paymentDate,
+          docToSchemaConversionRate, conn);
     }
-    fact.createLine(
-        null,
-        getAccountUponDepositWithdrawal(conn, transaction.getFinPayment().getPaymentMethod(),
-            transaction.getAccount(), as, transaction.getFinPayment().isReceipt()), C_Currency_ID,
-        transaction.getDepositAmount().toString(), transaction.getPaymentAmount().toString(),
-        Fact_Acct_Group_ID, nextSeqNo(SeqNo), DocumentType, conn);
+    fact.createLine(null, getAccountUponDepositWithdrawal(conn, txnFinPayment.getPaymentMethod(),
+        transaction.getAccount(), as, txnFinPayment.isReceipt()), C_Currency_ID, transaction
+        .getDepositAmount().toString(), transaction.getPaymentAmount().toString(),
+        Fact_Acct_Group_ID, nextSeqNo(SeqNo), DocumentType, null, docToSchemaConversionRate, conn);
 
+    createFactCurrencyBalancing(as, conn, fact, Fact_Acct_Group_ID, transaction);
     SeqNo = "0";
     return fact;
   }
@@ -442,19 +472,16 @@
       boolean isReceipt = paymentAmount.compareTo(depositAmount) < 0;
       String Fact_Acct_Group_ID = SequenceIdData.getUUID();
       if (!"".equals(line.getCGlItemId()))
-        fact.createLine(
-            line,
-            getAccountGLItem(OBDal.getInstance().get(GLItem.class, line.getCGlItemId()), as,
-                isReceipt, conn), C_Currency_ID, line.getPaymentAmount(), line.getDepositAmount(),
-            Fact_Acct_Group_ID, nextSeqNo(SeqNo), DocumentType, conn);
+        fact.createLine(line, getAccountGLItem(OBDal.getInstance().get(GLItem.class,
+            line.getCGlItemId()), as, isReceipt, conn), C_Currency_ID, line.getPaymentAmount(),
+            line.getDepositAmount(), Fact_Acct_Group_ID, nextSeqNo(SeqNo), DocumentType, conn);
       FIN_FinaccTransaction transaction = OBDal.getInstance().get(FIN_FinaccTransaction.class,
           Record_ID);
-      fact.createLine(
-          line,
-          getAccountUponDepositWithdrawal(conn, transaction.getFinPayment() != null ? transaction
-              .getFinPayment().getPaymentMethod() : null, transaction.getAccount(), as, isReceipt),
-          C_Currency_ID, line.getDepositAmount(), line.getPaymentAmount(), Fact_Acct_Group_ID,
-          "999999", DocumentType, conn);
+      fact.createLine(line, getAccountUponDepositWithdrawal(conn,
+          transaction.getFinPayment() != null ? transaction.getFinPayment().getPaymentMethod()
+              : null, transaction.getAccount(), as, isReceipt), C_Currency_ID, line
+          .getDepositAmount(), line.getPaymentAmount(), Fact_Acct_Group_ID, "999999", DocumentType,
+          conn);
     }
     SeqNo = "0";
     return fact;
@@ -469,6 +496,70 @@
     return createFactGLItem(as, conn, fact);
   }
 
+  private void createFactCurrencyBalancing(AcctSchema as, ConnectionProvider conn, Fact fact,
+      String fact_Acct_Group_ID, FIN_FinaccTransaction finaccTransaction) throws ServletException {
+    final BigDecimal acctBalance = fact.getAcctBalance();
+    if (BigDecimal.ZERO.compareTo(acctBalance) != 0) {
+      // Need to add balancing entry
+      // Balance == AcctDr - AcctCr
+      String currencyLossDR = "0";
+      String currencyGainCR = "0";
+      boolean isGain = acctBalance.compareTo(BigDecimal.ZERO) > 0;
+      if (isGain) {
+        // debit > credit = need to credit
+        currencyGainCR = Convert.toString(acctBalance);
+      } else {
+        // debit < credit = need to debit
+        currencyLossDR = Convert.toString(acctBalance.negate());
+      }
+
+      String currencyLossGainAcctComboId = null;
+      // Find gain / loss accounts from account
+      for (FIN_FinancialAccountAccounting accounting : finaccTransaction.getAccount()
+          .getFINFinancialAccountAcctList()) {
+        if (accounting.getAccountingSchema().getId().equals(as.getC_AcctSchema_ID())) {
+          AccountingCombination revaluationAcct;
+          if (isGain) {
+            revaluationAcct = accounting.getFINBankrevaluationgainAcct();
+          } else {
+            revaluationAcct = accounting.getFINBankrevaluationlossAcct();
+          }
+          if (revaluationAcct != null) {
+            currencyLossGainAcctComboId = revaluationAcct.getId();
+          }
+          break;
+        }
+      }
+      if (currencyLossGainAcctComboId == null) {
+        // Find default gain/loss accounts from schema
+        final OBQuery<AcctSchemaDefault> obqAcctSchemDefault = OBDal.getInstance().createQuery(
+            AcctSchemaDefault.class, " where accountingSchema.id = '" + as.m_C_AcctSchema_ID + "'");
+        final AcctSchemaDefault acctSchemaDefault = obqAcctSchemDefault.list().get(0);
+        AccountingCombination defaultRevaluationAcct;
+        if (isGain) {
+          defaultRevaluationAcct = acctSchemaDefault.getBankRevaluationGain();
+        } else {
+          defaultRevaluationAcct = acctSchemaDefault.getBankRevaluationLoss();
+        }
+        if (currencyLossGainAcctComboId == null && defaultRevaluationAcct != null) {
+          currencyLossGainAcctComboId = defaultRevaluationAcct.getId();
+        }
+      }
+      Account accountGainLoss = Account.getAccount(conn, currencyLossGainAcctComboId);
+      if (accountGainLoss == null) {
+        // Fall back to currency balancing
+        accountGainLoss = as.getCurrencyBalancing_Acct();
+      }
+
+      if (accountGainLoss != null) {
+        final FactLine line = fact.createLine(null, accountGainLoss, as.getC_Currency_ID(),
+            currencyLossDR, currencyGainCR, fact_Acct_Group_ID, nextSeqNo(SeqNo), DocumentType,
+            conn);
+        line.setAmtSource(C_Currency_ID, "0", "0"); // Mimic normal currency balancing
+      }
+    }
+  }
+
   public String nextSeqNo(String oldSeqNo) {
     BigDecimal seqNo = new BigDecimal(oldSeqNo);
     SeqNo = (seqNo.add(new BigDecimal("10"))).toString();
@@ -525,8 +616,8 @@
       OBCriteria<FinAccPaymentMethod> obCriteria = OBDal.getInstance().createCriteria(
           FinAccPaymentMethod.class);
       obCriteria.add(Restrictions.eq(FinAccPaymentMethod.PROPERTY_ACCOUNT, payment.getAccount()));
-      obCriteria.add(Restrictions.eq(FinAccPaymentMethod.PROPERTY_PAYMENTMETHOD,
-          payment.getPaymentMethod()));
+      obCriteria.add(Restrictions.eq(FinAccPaymentMethod.PROPERTY_PAYMENTMETHOD, payment
+          .getPaymentMethod()));
       obCriteria.setFilterOnReadableClients(false);
       obCriteria.setFilterOnReadableOrganization(false);
       List<FinAccPaymentMethod> lines = obCriteria.list();
@@ -574,8 +665,8 @@
       OBCriteria<FinAccPaymentMethod> obCriteria = OBDal.getInstance().createCriteria(
           FinAccPaymentMethod.class);
       obCriteria.add(Restrictions.eq(FinAccPaymentMethod.PROPERTY_ACCOUNT, payment.getAccount()));
-      obCriteria.add(Restrictions.eq(FinAccPaymentMethod.PROPERTY_PAYMENTMETHOD,
-          payment.getPaymentMethod()));
+      obCriteria.add(Restrictions.eq(FinAccPaymentMethod.PROPERTY_PAYMENTMETHOD, payment
+          .getPaymentMethod()));
       obCriteria.setFilterOnReadableClients(false);
       obCriteria.setFilterOnReadableOrganization(false);
       List<FinAccPaymentMethod> lines = obCriteria.list();
@@ -631,8 +722,8 @@
         OBCriteria<FinAccPaymentMethod> obCriteria = OBDal.getInstance().createCriteria(
             FinAccPaymentMethod.class);
         obCriteria.add(Restrictions.eq(FinAccPaymentMethod.PROPERTY_ACCOUNT, payment.getAccount()));
-        obCriteria.add(Restrictions.eq(FinAccPaymentMethod.PROPERTY_PAYMENTMETHOD,
-            payment.getPaymentMethod()));
+        obCriteria.add(Restrictions.eq(FinAccPaymentMethod.PROPERTY_PAYMENTMETHOD, payment
+            .getPaymentMethod()));
         obCriteria.setFilterOnReadableClients(false);
         obCriteria.setFilterOnReadableOrganization(false);
         List<FinAccPaymentMethod> lines = obCriteria.list();
@@ -696,10 +787,8 @@
       OBCriteria<FIN_FinancialAccountAccounting> accounts = OBDal.getInstance().createCriteria(
           FIN_FinancialAccountAccounting.class);
       accounts.add(Restrictions.eq(FIN_FinancialAccountAccounting.PROPERTY_ACCOUNT, finAccount));
-      accounts.add(Restrictions.eq(
-          FIN_FinancialAccountAccounting.PROPERTY_ACCOUNTINGSCHEMA,
-          OBDal.getInstance().get(
-              org.openbravo.model.financialmgmt.accounting.coa.AcctSchema.class,
+      accounts.add(Restrictions.eq(FIN_FinancialAccountAccounting.PROPERTY_ACCOUNTINGSCHEMA, OBDal
+          .getInstance().get(org.openbravo.model.financialmgmt.accounting.coa.AcctSchema.class,
               as.m_C_AcctSchema_ID)));
       accounts.add(Restrictions.eq(FIN_FinancialAccountAccounting.PROPERTY_ACTIVE, true));
       accounts.setFilterOnReadableClients(false);
@@ -777,13 +866,16 @@
       FieldProviderFactory.setField(data[0], "GeneratedCredit",
           transaction.getFinPayment() != null ? transaction.getFinPayment().getGeneratedCredit()
               .toString() : "");
-      String dateFormat = OBPropertiesProvider.getInstance().getOpenbravoProperties()
-          .getProperty("dateFormat.java");
+      String dateFormat = OBPropertiesProvider.getInstance().getOpenbravoProperties().getProperty(
+          "dateFormat.java");
       SimpleDateFormat outputFormat = new SimpleDateFormat(dateFormat);
-      FieldProviderFactory.setField(data[0], "DateAcct",
-          outputFormat.format(transaction.getDateAcct()));
-      FieldProviderFactory.setField(data[0], "trxdate",
-          outputFormat.format(transaction.getTransactionDate()));
+      FieldProviderFactory.setField(data[0], "DateAcct", outputFormat.format(transaction
+          .getDateAcct()));
+      FieldProviderFactory.setField(data[0], "trxdate", outputFormat.format(transaction
+          .getTransactionDate()));
+      FieldProviderFactory.setField(data[0], "paymentDate",
+          transaction.getFinPayment() != null ? outputFormat.format(transaction.getFinPayment()
+              .getPaymentDate()) : "");
       FieldProviderFactory.setField(data[0], "Posted", transaction.getPosted());
       FieldProviderFactory.setField(data[0], "Processed", transaction.isProcessed() ? "Y" : "N");
       FieldProviderFactory.setField(data[0], "Processing", transaction.isProcessNow() ? "Y" : "N");
@@ -812,10 +904,8 @@
       OBCriteria<FIN_FinancialAccountAccounting> accounts = OBDal.getInstance().createCriteria(
           FIN_FinancialAccountAccounting.class);
       accounts.add(Restrictions.eq(FIN_FinancialAccountAccounting.PROPERTY_ACCOUNT, finAccount));
-      accounts.add(Restrictions.eq(
-          FIN_FinancialAccountAccounting.PROPERTY_ACCOUNTINGSCHEMA,
-          OBDal.getInstance().get(
-              org.openbravo.model.financialmgmt.accounting.coa.AcctSchema.class,
+      accounts.add(Restrictions.eq(FIN_FinancialAccountAccounting.PROPERTY_ACCOUNTINGSCHEMA, OBDal
+          .getInstance().get(org.openbravo.model.financialmgmt.accounting.coa.AcctSchema.class,
               as.m_C_AcctSchema_ID)));
       accounts.add(Restrictions.eq(FIN_FinancialAccountAccounting.PROPERTY_ACTIVE, true));
       accounts.setFilterOnReadableClients(false);
@@ -858,10 +948,8 @@
       OBCriteria<FIN_FinancialAccountAccounting> accounts = OBDal.getInstance().createCriteria(
           FIN_FinancialAccountAccounting.class);
       accounts.add(Restrictions.eq(FIN_FinancialAccountAccounting.PROPERTY_ACCOUNT, finAccount));
-      accounts.add(Restrictions.eq(
-          FIN_FinancialAccountAccounting.PROPERTY_ACCOUNTINGSCHEMA,
-          OBDal.getInstance().get(
-              org.openbravo.model.financialmgmt.accounting.coa.AcctSchema.class,
+      accounts.add(Restrictions.eq(FIN_FinancialAccountAccounting.PROPERTY_ACCOUNTINGSCHEMA, OBDal
+          .getInstance().get(org.openbravo.model.financialmgmt.accounting.coa.AcctSchema.class,
               as.m_C_AcctSchema_ID)));
       accounts.add(Restrictions.eq(FIN_FinancialAccountAccounting.PROPERTY_ACTIVE, true));
       accounts.setFilterOnReadableClients(false);
@@ -895,10 +983,8 @@
       OBCriteria<FIN_FinancialAccountAccounting> accounts = OBDal.getInstance().createCriteria(
           FIN_FinancialAccountAccounting.class);
       accounts.add(Restrictions.eq(FIN_FinancialAccountAccounting.PROPERTY_ACCOUNT, finAccount));
-      accounts.add(Restrictions.eq(
-          FIN_FinancialAccountAccounting.PROPERTY_ACCOUNTINGSCHEMA,
-          OBDal.getInstance().get(
-              org.openbravo.model.financialmgmt.accounting.coa.AcctSchema.class,
+      accounts.add(Restrictions.eq(FIN_FinancialAccountAccounting.PROPERTY_ACCOUNTINGSCHEMA, OBDal
+          .getInstance().get(org.openbravo.model.financialmgmt.accounting.coa.AcctSchema.class,
               as.m_C_AcctSchema_ID)));
       accounts.add(Restrictions.eq(FIN_FinancialAccountAccounting.PROPERTY_ACTIVE, true));
       accounts.setFilterOnReadableClients(false);
--- a/src/org/openbravo/erpCommon/ad_forms/DocFINPayment.java	Thu Jun 02 00:27:17 2011 +0200
+++ b/src/org/openbravo/erpCommon/ad_forms/DocFINPayment.java	Thu Jun 02 10:59:08 2011 +0200
@@ -19,9 +19,11 @@
 package org.openbravo.erpCommon.ad_forms;
 
 import java.math.BigDecimal;
+import java.math.MathContext;
 import java.sql.Connection;
 import java.text.SimpleDateFormat;
 import java.util.ArrayList;
+import java.util.Date;
 import java.util.List;
 
 import javax.servlet.ServletException;
@@ -30,6 +32,7 @@
 import org.hibernate.criterion.Restrictions;
 import org.openbravo.base.secureApp.VariablesSecureApp;
 import org.openbravo.base.session.OBPropertiesProvider;
+import org.openbravo.base.util.Convert;
 import org.openbravo.dal.core.OBContext;
 import org.openbravo.dal.service.OBCriteria;
 import org.openbravo.dal.service.OBDal;
@@ -42,12 +45,15 @@
 import org.openbravo.model.common.enterprise.AcctSchemaTableDocType;
 import org.openbravo.model.common.invoice.Invoice;
 import org.openbravo.model.financialmgmt.accounting.FIN_FinancialAccountAccounting;
+import org.openbravo.model.financialmgmt.accounting.coa.AccountingCombination;
+import org.openbravo.model.financialmgmt.accounting.coa.AcctSchemaDefault;
 import org.openbravo.model.financialmgmt.accounting.coa.AcctSchemaTable;
 import org.openbravo.model.financialmgmt.gl.GLItem;
 import org.openbravo.model.financialmgmt.payment.FIN_FinancialAccount;
 import org.openbravo.model.financialmgmt.payment.FIN_Payment;
 import org.openbravo.model.financialmgmt.payment.FIN_PaymentDetail;
 import org.openbravo.model.financialmgmt.payment.FIN_PaymentMethod;
+import org.openbravo.model.financialmgmt.payment.FIN_PaymentScheduleDetail;
 import org.openbravo.model.financialmgmt.payment.FinAccPaymentMethod;
 
 public class DocFINPayment extends AcctServer {
@@ -57,6 +63,9 @@
   String SeqNo = "0";
   String generatedAmount = "";
   String usedAmount = "";
+  String financialAccountCurrencyId;
+  String financialTransactionAmount;
+  String financialTransactionConvertRate;
 
   public DocFINPayment() {
   }
@@ -71,6 +80,10 @@
     Amounts[AMTTYPE_Gross] = data[0].getField("Amount");
     generatedAmount = data[0].getField("GeneratedCredit");
     usedAmount = data[0].getField("UsedCredit");
+    financialAccountCurrencyId = data[0].getField("FinancialAccountCurrencyId");
+    financialTransactionAmount = data[0].getField("FinancialTransactionAmount");
+    financialTransactionConvertRate = data[0].getField("FinancialTransactionConvertRate");
+
     loadDocumentType();
     p_lines = loadLines();
     return true;
@@ -82,6 +95,10 @@
     if (paymentDetails == null)
       return null;
 
+    String dateFormat = OBPropertiesProvider.getInstance().getOpenbravoProperties().getProperty(
+        "dateFormat.java");
+    SimpleDateFormat outputFormat = new SimpleDateFormat(dateFormat);
+
     FieldProviderFactory[] data = new FieldProviderFactory[paymentDetails.size()];
     OBContext.setAdminMode();
     try {
@@ -163,6 +180,17 @@
         // FieldProviderFactory.setField(data[0], "User1_ID", payment.getStDimension().getId());
         // FieldProviderFactory.setField(data[0], "User2_ID", payment.getNdDimension().getId());
 
+        String invoiceAccountingDate = "";
+        for (FIN_PaymentScheduleDetail detail : paymentDetails.get(i)
+            .getFINPaymentScheduleDetailList()) {
+          if (detail.getInvoicePaymentSchedule() != null
+              && detail.getInvoicePaymentSchedule().getInvoice() != null) {
+            final Date accountingDate = detail.getInvoicePaymentSchedule().getInvoice()
+                .getAccountingDate();
+            invoiceAccountingDate = outputFormat.format(accountingDate);
+          }
+        }
+        FieldProviderFactory.setField(data[i], "invoiceAccountingDate", invoiceAccountingDate);
       }
     } finally {
       OBContext.restorePreviousMode();
@@ -188,11 +216,13 @@
         docLine.setIsPrepayment(data[i].getField("isprepayment"));
         docLine.setWriteOffAmt(data[i].getField("WriteOffAmt"));
         docLine.setC_GLItem_ID(data[i].getField("C_GLItem_ID"));
-        docLine
-            .setInvoice(detail.getFINPaymentScheduleDetailList() != null
-                && detail.getFINPaymentScheduleDetailList().get(0).getInvoicePaymentSchedule() != null ? detail
-                .getFINPaymentScheduleDetailList().get(0).getInvoicePaymentSchedule().getInvoice()
-                : null);
+        for (FIN_PaymentScheduleDetail paymentSchedule : detail.getFINPaymentScheduleDetailList()) {
+          if (paymentSchedule.getInvoicePaymentSchedule() != null
+              && paymentSchedule.getInvoicePaymentSchedule().getInvoice() != null) {
+            docLine.setInvoice(paymentSchedule.getInvoicePaymentSchedule().getInvoice());
+          }
+        }
+
         list.add(docLine);
       } finally {
         OBContext.restorePreviousMode();
@@ -251,55 +281,81 @@
         }
       }
 
+      final boolean isReceipt = DocumentType.equals("ARR");
+
+      FIN_Payment payment = OBDal.getInstance().get(FIN_Payment.class, Record_ID);
+      BigDecimal docToSchemaConversionRate = null;
+
+      // Multicurrency balancing
+      if (!C_Currency_ID.equals(financialAccountCurrencyId)) {
+        // If payment currency different from account currency, flag as multicurrency so that
+        // source balancing doesn't try match amounts in different currencies
+        MultiCurrency = true;
+        // See if we can use the conversion rate specified in the payment
+        if (!as.getC_Currency_ID().equals(C_Currency_ID)
+            && as.getC_Currency_ID().equals(financialAccountCurrencyId)) {
+          // Payment financial txn conversion rate is from payment currency to account currency
+          // Can use this rate when schema currency is same as financial account currency
+          docToSchemaConversionRate = payment.getFinancialTransactionConvertRate();
+        }
+      }
+
       for (int i = 0; p_lines != null && i < p_lines.length; i++) {
         DocLine_FINPayment line = (DocLine_FINPayment) p_lines[i];
 
-        boolean isReceipt = DocumentType.equals("ARR");
+        Invoice invoice = line.getInvoice();
+        String invoiceAccountingDate = null;
+        if (invoice != null && !C_Currency_ID.equals(as.m_C_Currency_ID)) {
+          String dateFormat = OBPropertiesProvider.getInstance().getOpenbravoProperties()
+              .getProperty("dateFormat.java");
+          SimpleDateFormat outputFormat = new SimpleDateFormat(dateFormat);
+          invoiceAccountingDate = outputFormat.format(invoice.getAccountingDate());
+        }
+
         boolean isPrepayment = line.getIsPrepayment().equals("Y");
 
         String bpAmount = line.getAmount();
         if (line.WriteOffAmt != null && !line.WriteOffAmt.equals("")
             && new BigDecimal(line.WriteOffAmt).compareTo(ZERO) != 0) {
+          // Writeoff uses same exchange rate as original invoice
           fact.createLine(line, getAccount(AcctServer.ACCTTYPE_WriteOffDefault, as, conn),
               C_Currency_ID, (isReceipt ? line.WriteOffAmt : ""), (isReceipt ? ""
-                  : line.WriteOffAmt), Fact_Acct_Group_ID, nextSeqNo(SeqNo), DocumentType, conn);
+                  : line.WriteOffAmt), Fact_Acct_Group_ID, nextSeqNo(SeqNo), DocumentType,
+              invoiceAccountingDate, conn);
           bpAmount = new BigDecimal(bpAmount).add(new BigDecimal(line.WriteOffAmt)).toString();
         }
+
         if ("".equals(line.getC_GLItem_ID())) {
-          String bpAmountConverted = bpAmount;
-          Invoice invoice = line.getInvoice();
-          String strcCurrencyId = C_Currency_ID;
-          if (invoice != null && !C_Currency_ID.equals(as.m_C_Currency_ID)) {
-            String dateFormat = OBPropertiesProvider.getInstance().getOpenbravoProperties()
-                .getProperty("dateFormat.java");
-            SimpleDateFormat outputFormat = new SimpleDateFormat(dateFormat);
-            bpAmountConverted = convertAmount(bpAmount, isReceipt, DateAcct,
-                outputFormat.format(invoice.getAccountingDate()), C_Currency_ID,
-                as.m_C_Currency_ID, line, as, fact, Fact_Acct_Group_ID, conn);
-            strcCurrencyId = as.m_C_Currency_ID;
-          }
-          fact.createLine(
-              line,
-              getAccountBPartner(
-                  (line.m_C_BPartner_ID == null || line.m_C_BPartner_ID.equals("")) ? this.C_BPartner_ID
-                      : line.m_C_BPartner_ID, as, isReceipt, isPrepayment, conn), strcCurrencyId,
-              (isReceipt ? "" : bpAmountConverted), (isReceipt ? bpAmountConverted : ""),
-              Fact_Acct_Group_ID, nextSeqNo(SeqNo), DocumentType, conn);
+          fact
+              .createLine(line,
+                  getAccountBPartner((line.m_C_BPartner_ID == null || line.m_C_BPartner_ID
+                      .equals("")) ? this.C_BPartner_ID : line.m_C_BPartner_ID, as, isReceipt,
+                      isPrepayment, conn), C_Currency_ID, (isReceipt ? "" : bpAmount),
+                  (isReceipt ? bpAmount : ""), Fact_Acct_Group_ID, nextSeqNo(SeqNo), DocumentType,
+                  invoiceAccountingDate, conn);
         } else {
-          fact.createLine(
-              line,
-              getAccountGLItem(OBDal.getInstance().get(GLItem.class, line.getC_GLItem_ID()), as,
-                  isReceipt, conn), C_Currency_ID, (isReceipt ? "" : bpAmount),
-              (isReceipt ? bpAmount : ""), Fact_Acct_Group_ID, nextSeqNo(SeqNo), DocumentType, conn);
+          fact.createLine(line, getAccountGLItem(OBDal.getInstance().get(GLItem.class,
+              line.getC_GLItem_ID()), as, isReceipt, conn), C_Currency_ID, (isReceipt ? ""
+              : bpAmount), (isReceipt ? bpAmount : ""), Fact_Acct_Group_ID, nextSeqNo(SeqNo),
+              DocumentType, null, docToSchemaConversionRate, conn);
         }
       }
-      FIN_Payment payment = OBDal.getInstance().get(FIN_Payment.class, Record_ID);
-      fact.createLine(