[reconciliation refactor] merge to transaction refactor
authorSandra Huguet <sandra.huguet@openbravo.com>
Tue, 12 Aug 2014 08:56:49 +0200
changeset 24514 ab2cdc383724
parent 24466 b03c39a492e7 (current diff)
parent 24513 9083b13d0f43 (diff)
child 24515 5c1c196b704e
[reconciliation refactor] merge to transaction refactor
modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_COLUMN.xml
modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_ELEMENT.xml
modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_FIELD.xml
modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_REFERENCE.xml
modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/OBUIAPP_PARAMETER.xml
modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/OBUIAPP_PROCESS.xml
src-db/database/sourcedata/AD_FIELD.xml
Binary file modules/org.openbravo.advpaymentmngt/build/classes/org/openbravo/advpaymentmngt/modulescript/UpdateTransactionTypeTransactionTab.class has changed
Binary file modules/org.openbravo.advpaymentmngt/build/classes/org/openbravo/advpaymentmngt/modulescript/UpdateTransactionTypeTransactionTabData.class has changed
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/model/modifiedTables/FIN_FINACC_TRANSACTION.xml	Tue Aug 12 08:32:37 2014 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/model/modifiedTables/FIN_FINACC_TRANSACTION.xml	Tue Aug 12 08:56:49 2014 +0200
@@ -9,5 +9,9 @@
         <default><![CDATA[N]]></default>
         <onCreateDefault/>
       </column>
+      <column name="EM_APRM_PROCESSED" primaryKey="false" required="true" type="VARCHAR" size="60" autoIncrement="false">
+        <default><![CDATA[[P]]></default>
+        <onCreateDefault><![CDATA['R']]></onCreateDefault>
+      </column>
     </table>
   </database>
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_COLUMN.xml	Tue Aug 12 08:32:37 2014 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_COLUMN.xml	Tue Aug 12 08:56:49 2014 +0200
@@ -6179,6 +6179,44 @@
 <!--996C9CE70A9241C1AECF8970F4C32B93-->  <ENTITY_ALIAS><![CDATA[COALESCE(bsl.businessPartner.name, bsl.bpartnername)]]></ENTITY_ALIAS>
 <!--996C9CE70A9241C1AECF8970F4C32B93--></AD_COLUMN>
 
+<!--986B657361F64EB59F7991710E6CBD71--><AD_COLUMN>
+<!--986B657361F64EB59F7991710E6CBD71-->  <AD_COLUMN_ID><![CDATA[986B657361F64EB59F7991710E6CBD71]]></AD_COLUMN_ID>
+<!--986B657361F64EB59F7991710E6CBD71-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--986B657361F64EB59F7991710E6CBD71-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--986B657361F64EB59F7991710E6CBD71-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--986B657361F64EB59F7991710E6CBD71-->  <NAME><![CDATA[EM_Aprm_Processed]]></NAME>
+<!--986B657361F64EB59F7991710E6CBD71-->  <DESCRIPTION><![CDATA[Process Button]]></DESCRIPTION>
+<!--986B657361F64EB59F7991710E6CBD71-->  <HELP><![CDATA[Process Button]]></HELP>
+<!--986B657361F64EB59F7991710E6CBD71-->  <COLUMNNAME><![CDATA[EM_Aprm_Processed]]></COLUMNNAME>
+<!--986B657361F64EB59F7991710E6CBD71-->  <AD_TABLE_ID><![CDATA[4D8C3B3C31D1410DA046140C9F024D17]]></AD_TABLE_ID>
+<!--986B657361F64EB59F7991710E6CBD71-->  <AD_REFERENCE_ID><![CDATA[28]]></AD_REFERENCE_ID>
+<!--986B657361F64EB59F7991710E6CBD71-->  <AD_REFERENCE_VALUE_ID><![CDATA[F671DDEA466D41A996F605590CB545BC]]></AD_REFERENCE_VALUE_ID>
+<!--986B657361F64EB59F7991710E6CBD71-->  <FIELDLENGTH><![CDATA[60]]></FIELDLENGTH>
+<!--986B657361F64EB59F7991710E6CBD71-->  <DEFAULTVALUE><![CDATA[P]]></DEFAULTVALUE>
+<!--986B657361F64EB59F7991710E6CBD71-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--986B657361F64EB59F7991710E6CBD71-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--986B657361F64EB59F7991710E6CBD71-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
+<!--986B657361F64EB59F7991710E6CBD71-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--986B657361F64EB59F7991710E6CBD71-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--986B657361F64EB59F7991710E6CBD71-->  <SEQNO><![CDATA[400]]></SEQNO>
+<!--986B657361F64EB59F7991710E6CBD71-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--986B657361F64EB59F7991710E6CBD71-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--986B657361F64EB59F7991710E6CBD71-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--986B657361F64EB59F7991710E6CBD71-->  <AD_ELEMENT_ID><![CDATA[75E1BCB8DBF444199A4A03CDC44E8A25]]></AD_ELEMENT_ID>
+<!--986B657361F64EB59F7991710E6CBD71-->  <AD_PROCESS_ID><![CDATA[F68F2890E96D4D85A1DEF0274D105BCE]]></AD_PROCESS_ID>
+<!--986B657361F64EB59F7991710E6CBD71-->  <ISSESSIONATTR><![CDATA[Y]]></ISSESSIONATTR>
+<!--986B657361F64EB59F7991710E6CBD71-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--986B657361F64EB59F7991710E6CBD71-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--986B657361F64EB59F7991710E6CBD71-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--986B657361F64EB59F7991710E6CBD71-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--986B657361F64EB59F7991710E6CBD71-->  <POSITION><![CDATA[41]]></POSITION>
+<!--986B657361F64EB59F7991710E6CBD71-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--986B657361F64EB59F7991710E6CBD71-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
+<!--986B657361F64EB59F7991710E6CBD71-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
+<!--986B657361F64EB59F7991710E6CBD71-->  <IMAGESIZEVALUESACTION><![CDATA[N]]></IMAGESIZEVALUESACTION>
+<!--986B657361F64EB59F7991710E6CBD71-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
+<!--986B657361F64EB59F7991710E6CBD71--></AD_COLUMN>
+
 <!--9B79431378824521850D2764C348755B--><AD_COLUMN>
 <!--9B79431378824521850D2764C348755B-->  <AD_COLUMN_ID><![CDATA[9B79431378824521850D2764C348755B]]></AD_COLUMN_ID>
 <!--9B79431378824521850D2764C348755B-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -6491,10 +6529,10 @@
 <!--A028C06E679F6F62E040007F01007206-->  <AD_COLUMN_ID><![CDATA[A028C06E679F6F62E040007F01007206]]></AD_COLUMN_ID>
 <!--A028C06E679F6F62E040007F01007206-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
 <!--A028C06E679F6F62E040007F01007206-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
-<!--A028C06E679F6F62E040007F01007206-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--A028C06E679F6F62E040007F01007206-->  <ISACTIVE><![CDATA[N]]></ISACTIVE>
 <!--A028C06E679F6F62E040007F01007206-->  <NAME><![CDATA[EM_APRM_Delete]]></NAME>
-<!--A028C06E679F6F62E040007F01007206-->  <DESCRIPTION><![CDATA[Delete button]]></DESCRIPTION>
-<!--A028C06E679F6F62E040007F01007206-->  <HELP><![CDATA[Delete button]]></HELP>
+<!--A028C06E679F6F62E040007F01007206-->  <DESCRIPTION><![CDATA[Delete button (Deprecated)]]></DESCRIPTION>
+<!--A028C06E679F6F62E040007F01007206-->  <HELP><![CDATA[Delete button (Deprecated)]]></HELP>
 <!--A028C06E679F6F62E040007F01007206-->  <COLUMNNAME><![CDATA[EM_APRM_Delete]]></COLUMNNAME>
 <!--A028C06E679F6F62E040007F01007206-->  <AD_TABLE_ID><![CDATA[4D8C3B3C31D1410DA046140C9F024D17]]></AD_TABLE_ID>
 <!--A028C06E679F6F62E040007F01007206-->  <AD_REFERENCE_ID><![CDATA[28]]></AD_REFERENCE_ID>
@@ -6515,7 +6553,7 @@
 <!--A028C06E679F6F62E040007F01007206-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
 <!--A028C06E679F6F62E040007F01007206-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
 <!--A028C06E679F6F62E040007F01007206-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
-<!--A028C06E679F6F62E040007F01007206-->  <POSITION><![CDATA[37]]></POSITION>
+<!--A028C06E679F6F62E040007F01007206-->  <POSITION><![CDATA[38]]></POSITION>
 <!--A028C06E679F6F62E040007F01007206-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
 <!--A028C06E679F6F62E040007F01007206-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
 <!--A028C06E679F6F62E040007F01007206-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
@@ -6632,7 +6670,8 @@
 <!--A04179EAC69FF848E040007F01004523-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--A04179EAC69FF848E040007F01004523-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--A04179EAC69FF848E040007F01004523-->  <NAME><![CDATA[EM_APRM_AddTransactions]]></NAME>
-<!--A04179EAC69FF848E040007F01004523-->  <DESCRIPTION><![CDATA[Add Transaction From Financial Account]]></DESCRIPTION>
+<!--A04179EAC69FF848E040007F01004523-->  <DESCRIPTION><![CDATA[Add Transaction From Financial Account (Deprecated)]]></DESCRIPTION>
+<!--A04179EAC69FF848E040007F01004523-->  <HELP><![CDATA[Add Transaction From Financial Account (Deprecated)]]></HELP>
 <!--A04179EAC69FF848E040007F01004523-->  <COLUMNNAME><![CDATA[EM_APRM_AddTransactions]]></COLUMNNAME>
 <!--A04179EAC69FF848E040007F01004523-->  <AD_TABLE_ID><![CDATA[B129E53BC0E747879F7BA17F0AECEC32]]></AD_TABLE_ID>
 <!--A04179EAC69FF848E040007F01004523-->  <AD_REFERENCE_ID><![CDATA[28]]></AD_REFERENCE_ID>
@@ -9071,7 +9110,7 @@
 <!--BC78354AB2F7403FA9725CDF267C0A70-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
 <!--BC78354AB2F7403FA9725CDF267C0A70-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
 <!--BC78354AB2F7403FA9725CDF267C0A70-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
-<!--BC78354AB2F7403FA9725CDF267C0A70-->  <POSITION><![CDATA[38]]></POSITION>
+<!--BC78354AB2F7403FA9725CDF267C0A70-->  <POSITION><![CDATA[39]]></POSITION>
 <!--BC78354AB2F7403FA9725CDF267C0A70-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
 <!--BC78354AB2F7403FA9725CDF267C0A70-->  <ISAUTOSAVE><![CDATA[N]]></ISAUTOSAVE>
 <!--BC78354AB2F7403FA9725CDF267C0A70-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_ELEMENT.xml	Tue Aug 12 08:32:37 2014 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_ELEMENT.xml	Tue Aug 12 08:56:49 2014 +0200
@@ -88,6 +88,20 @@
 <!--2C70D5BAFED340D68C564DA5C3F15A7E-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
 <!--2C70D5BAFED340D68C564DA5C3F15A7E--></AD_ELEMENT>
 
+<!--2CFD3BE7B8D0441BBF151920E5BC384F--><AD_ELEMENT>
+<!--2CFD3BE7B8D0441BBF151920E5BC384F-->  <AD_ELEMENT_ID><![CDATA[2CFD3BE7B8D0441BBF151920E5BC384F]]></AD_ELEMENT_ID>
+<!--2CFD3BE7B8D0441BBF151920E5BC384F-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--2CFD3BE7B8D0441BBF151920E5BC384F-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--2CFD3BE7B8D0441BBF151920E5BC384F-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--2CFD3BE7B8D0441BBF151920E5BC384F-->  <COLUMNNAME><![CDATA[fin_financial_account_id_readonly_logic]]></COLUMNNAME>
+<!--2CFD3BE7B8D0441BBF151920E5BC384F-->  <NAME><![CDATA[Deposit To Read Only Logic]]></NAME>
+<!--2CFD3BE7B8D0441BBF151920E5BC384F-->  <PRINTNAME><![CDATA[Deposit To Read Only Logic]]></PRINTNAME>
+<!--2CFD3BE7B8D0441BBF151920E5BC384F-->  <DESCRIPTION><![CDATA[Parameter used to implement Read Only Logic on Financial Account]]></DESCRIPTION>
+<!--2CFD3BE7B8D0441BBF151920E5BC384F-->  <HELP><![CDATA[Parameter used to implement Read Only Logic on Financial Account]]></HELP>
+<!--2CFD3BE7B8D0441BBF151920E5BC384F-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--2CFD3BE7B8D0441BBF151920E5BC384F-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
+<!--2CFD3BE7B8D0441BBF151920E5BC384F--></AD_ELEMENT>
+
 <!--2D1363BA8FFD443D89B0F2C92FD2BBC4--><AD_ELEMENT>
 <!--2D1363BA8FFD443D89B0F2C92FD2BBC4-->  <AD_ELEMENT_ID><![CDATA[2D1363BA8FFD443D89B0F2C92FD2BBC4]]></AD_ELEMENT_ID>
 <!--2D1363BA8FFD443D89B0F2C92FD2BBC4-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -102,6 +116,20 @@
 <!--2D1363BA8FFD443D89B0F2C92FD2BBC4-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
 <!--2D1363BA8FFD443D89B0F2C92FD2BBC4--></AD_ELEMENT>
 
+<!--349748D8346C46B1A4A652BC15F98EBB--><AD_ELEMENT>
+<!--349748D8346C46B1A4A652BC15F98EBB-->  <AD_ELEMENT_ID><![CDATA[349748D8346C46B1A4A652BC15F98EBB]]></AD_ELEMENT_ID>
+<!--349748D8346C46B1A4A652BC15F98EBB-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--349748D8346C46B1A4A652BC15F98EBB-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--349748D8346C46B1A4A652BC15F98EBB-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--349748D8346C46B1A4A652BC15F98EBB-->  <COLUMNNAME><![CDATA[actual_payment_readonly_logic]]></COLUMNNAME>
+<!--349748D8346C46B1A4A652BC15F98EBB-->  <NAME><![CDATA[Actual Payment Read Only Logic]]></NAME>
+<!--349748D8346C46B1A4A652BC15F98EBB-->  <PRINTNAME><![CDATA[Actual Payment Read Only Logic]]></PRINTNAME>
+<!--349748D8346C46B1A4A652BC15F98EBB-->  <DESCRIPTION><![CDATA[Parameter used to implement Read Only Logic on Actual Payment]]></DESCRIPTION>
+<!--349748D8346C46B1A4A652BC15F98EBB-->  <HELP><![CDATA[Parameter used to implement Read Only Logic on Actual Payment]]></HELP>
+<!--349748D8346C46B1A4A652BC15F98EBB-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--349748D8346C46B1A4A652BC15F98EBB-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
+<!--349748D8346C46B1A4A652BC15F98EBB--></AD_ELEMENT>
+
 <!--36C60E53F1274EDA827ED5146A2B13D1--><AD_ELEMENT>
 <!--36C60E53F1274EDA827ED5146A2B13D1-->  <AD_ELEMENT_ID><![CDATA[36C60E53F1274EDA827ED5146A2B13D1]]></AD_ELEMENT_ID>
 <!--36C60E53F1274EDA827ED5146A2B13D1-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -156,6 +184,20 @@
 <!--429B447E4FE9420287E1EEB75DC341E9-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
 <!--429B447E4FE9420287E1EEB75DC341E9--></AD_ELEMENT>
 
+<!--458D63E9F9D541F7A06B341305ACCB66--><AD_ELEMENT>
+<!--458D63E9F9D541F7A06B341305ACCB66-->  <AD_ELEMENT_ID><![CDATA[458D63E9F9D541F7A06B341305ACCB66]]></AD_ELEMENT_ID>
+<!--458D63E9F9D541F7A06B341305ACCB66-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--458D63E9F9D541F7A06B341305ACCB66-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--458D63E9F9D541F7A06B341305ACCB66-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--458D63E9F9D541F7A06B341305ACCB66-->  <COLUMNNAME><![CDATA[payment_method_readonly_logic]]></COLUMNNAME>
+<!--458D63E9F9D541F7A06B341305ACCB66-->  <NAME><![CDATA[Payment Method Read Only Logic]]></NAME>
+<!--458D63E9F9D541F7A06B341305ACCB66-->  <PRINTNAME><![CDATA[Payment Method Read Only Logic]]></PRINTNAME>
+<!--458D63E9F9D541F7A06B341305ACCB66-->  <DESCRIPTION><![CDATA[Parameter used to implement Read Only Logic on Payment Method]]></DESCRIPTION>
+<!--458D63E9F9D541F7A06B341305ACCB66-->  <HELP><![CDATA[Parameter used to implement Read Only Logic on Payment Method]]></HELP>
+<!--458D63E9F9D541F7A06B341305ACCB66-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--458D63E9F9D541F7A06B341305ACCB66-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
+<!--458D63E9F9D541F7A06B341305ACCB66--></AD_ELEMENT>
+
 <!--4636FFBE88B64C9C990F76457F0D521E--><AD_ELEMENT>
 <!--4636FFBE88B64C9C990F76457F0D521E-->  <AD_ELEMENT_ID><![CDATA[4636FFBE88B64C9C990F76457F0D521E]]></AD_ELEMENT_ID>
 <!--4636FFBE88B64C9C990F76457F0D521E-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -208,6 +250,34 @@
 <!--519F3CD67106443CBF25694F1BB6E92B-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
 <!--519F3CD67106443CBF25694F1BB6E92B--></AD_ELEMENT>
 
+<!--51F0875CB4114D90A239FBCA54B5C1AB--><AD_ELEMENT>
+<!--51F0875CB4114D90A239FBCA54B5C1AB-->  <AD_ELEMENT_ID><![CDATA[51F0875CB4114D90A239FBCA54B5C1AB]]></AD_ELEMENT_ID>
+<!--51F0875CB4114D90A239FBCA54B5C1AB-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--51F0875CB4114D90A239FBCA54B5C1AB-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--51F0875CB4114D90A239FBCA54B5C1AB-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--51F0875CB4114D90A239FBCA54B5C1AB-->  <COLUMNNAME><![CDATA[overpayment_action_display_logic]]></COLUMNNAME>
+<!--51F0875CB4114D90A239FBCA54B5C1AB-->  <NAME><![CDATA[Overpayment Action Display Logic]]></NAME>
+<!--51F0875CB4114D90A239FBCA54B5C1AB-->  <PRINTNAME><![CDATA[Overpayment Action Display Logic]]></PRINTNAME>
+<!--51F0875CB4114D90A239FBCA54B5C1AB-->  <DESCRIPTION><![CDATA[Parameter used to implement Display Logic on Overpayment Action]]></DESCRIPTION>
+<!--51F0875CB4114D90A239FBCA54B5C1AB-->  <HELP><![CDATA[Parameter used to implement Display Logic on Overpayment Action]]></HELP>
+<!--51F0875CB4114D90A239FBCA54B5C1AB-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--51F0875CB4114D90A239FBCA54B5C1AB-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
+<!--51F0875CB4114D90A239FBCA54B5C1AB--></AD_ELEMENT>
+
+<!--52F85707307D4FC5923B7CA29B8D8A87--><AD_ELEMENT>
+<!--52F85707307D4FC5923B7CA29B8D8A87-->  <AD_ELEMENT_ID><![CDATA[52F85707307D4FC5923B7CA29B8D8A87]]></AD_ELEMENT_ID>
+<!--52F85707307D4FC5923B7CA29B8D8A87-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--52F85707307D4FC5923B7CA29B8D8A87-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--52F85707307D4FC5923B7CA29B8D8A87-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--52F85707307D4FC5923B7CA29B8D8A87-->  <COLUMNNAME><![CDATA[c_currency_id_readonly_logic]]></COLUMNNAME>
+<!--52F85707307D4FC5923B7CA29B8D8A87-->  <NAME><![CDATA[Currency Read Only Logic]]></NAME>
+<!--52F85707307D4FC5923B7CA29B8D8A87-->  <PRINTNAME><![CDATA[Currency Read Only Logic]]></PRINTNAME>
+<!--52F85707307D4FC5923B7CA29B8D8A87-->  <DESCRIPTION><![CDATA[Parameter used to implement Read Only Logic on Currency param]]></DESCRIPTION>
+<!--52F85707307D4FC5923B7CA29B8D8A87-->  <HELP><![CDATA[Parameter used to implement Read Only Logic on Currency param]]></HELP>
+<!--52F85707307D4FC5923B7CA29B8D8A87-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--52F85707307D4FC5923B7CA29B8D8A87-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
+<!--52F85707307D4FC5923B7CA29B8D8A87--></AD_ELEMENT>
+
 <!--533E204A46FD4BB9AED3D9FC26EEC67C--><AD_ELEMENT>
 <!--533E204A46FD4BB9AED3D9FC26EEC67C-->  <AD_ELEMENT_ID><![CDATA[533E204A46FD4BB9AED3D9FC26EEC67C]]></AD_ELEMENT_ID>
 <!--533E204A46FD4BB9AED3D9FC26EEC67C-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -308,6 +378,20 @@
 <!--64B01B6184B84599B2B073BC7971EA19-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
 <!--64B01B6184B84599B2B073BC7971EA19--></AD_ELEMENT>
 
+<!--6548FAC738E2475F866F132AF5CF5532--><AD_ELEMENT>
+<!--6548FAC738E2475F866F132AF5CF5532-->  <AD_ELEMENT_ID><![CDATA[6548FAC738E2475F866F132AF5CF5532]]></AD_ELEMENT_ID>
+<!--6548FAC738E2475F866F132AF5CF5532-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--6548FAC738E2475F866F132AF5CF5532-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--6548FAC738E2475F866F132AF5CF5532-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--6548FAC738E2475F866F132AF5CF5532-->  <COLUMNNAME><![CDATA[received_from_readonly_logic]]></COLUMNNAME>
+<!--6548FAC738E2475F866F132AF5CF5532-->  <NAME><![CDATA[Received From Read Only Logic]]></NAME>
+<!--6548FAC738E2475F866F132AF5CF5532-->  <PRINTNAME><![CDATA[Received From Read Only Logic]]></PRINTNAME>
+<!--6548FAC738E2475F866F132AF5CF5532-->  <DESCRIPTION><![CDATA[Parameter used to implement Read Only Logic on Business Partner]]></DESCRIPTION>
+<!--6548FAC738E2475F866F132AF5CF5532-->  <HELP><![CDATA[Parameter used to implement Read Only Logic on Business Partner]]></HELP>
+<!--6548FAC738E2475F866F132AF5CF5532-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--6548FAC738E2475F866F132AF5CF5532-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
+<!--6548FAC738E2475F866F132AF5CF5532--></AD_ELEMENT>
+
 <!--6BC644F4DC3248E2998DE88C055826B2--><AD_ELEMENT>
 <!--6BC644F4DC3248E2998DE88C055826B2-->  <AD_ELEMENT_ID><![CDATA[6BC644F4DC3248E2998DE88C055826B2]]></AD_ELEMENT_ID>
 <!--6BC644F4DC3248E2998DE88C055826B2-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -322,6 +406,20 @@
 <!--6BC644F4DC3248E2998DE88C055826B2-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
 <!--6BC644F4DC3248E2998DE88C055826B2--></AD_ELEMENT>
 
+<!--6C4509E308444DE0B928E1C25A80CD74--><AD_ELEMENT>
+<!--6C4509E308444DE0B928E1C25A80CD74-->  <AD_ELEMENT_ID><![CDATA[6C4509E308444DE0B928E1C25A80CD74]]></AD_ELEMENT_ID>
+<!--6C4509E308444DE0B928E1C25A80CD74-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--6C4509E308444DE0B928E1C25A80CD74-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--6C4509E308444DE0B928E1C25A80CD74-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--6C4509E308444DE0B928E1C25A80CD74-->  <COLUMNNAME><![CDATA[payment_date_readonly_logic]]></COLUMNNAME>
+<!--6C4509E308444DE0B928E1C25A80CD74-->  <NAME><![CDATA[Payment Date Read Only Logic]]></NAME>
+<!--6C4509E308444DE0B928E1C25A80CD74-->  <PRINTNAME><![CDATA[Payment Date Read Only Logic]]></PRINTNAME>
+<!--6C4509E308444DE0B928E1C25A80CD74-->  <DESCRIPTION><![CDATA[Parameter used to implement Read Only Logic on Payment Date]]></DESCRIPTION>
+<!--6C4509E308444DE0B928E1C25A80CD74-->  <HELP><![CDATA[Parameter used to implement Read Only Logic on Payment Date]]></HELP>
+<!--6C4509E308444DE0B928E1C25A80CD74-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--6C4509E308444DE0B928E1C25A80CD74-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
+<!--6C4509E308444DE0B928E1C25A80CD74--></AD_ELEMENT>
+
 <!--6D7CB8FA9C4644E8B0AFDA576D134B6A--><AD_ELEMENT>
 <!--6D7CB8FA9C4644E8B0AFDA576D134B6A-->  <AD_ELEMENT_ID><![CDATA[6D7CB8FA9C4644E8B0AFDA576D134B6A]]></AD_ELEMENT_ID>
 <!--6D7CB8FA9C4644E8B0AFDA576D134B6A-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -336,6 +434,20 @@
 <!--6D7CB8FA9C4644E8B0AFDA576D134B6A-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
 <!--6D7CB8FA9C4644E8B0AFDA576D134B6A--></AD_ELEMENT>
 
+<!--6FE34C5D44364DA7B73F2925C1C4467B--><AD_ELEMENT>
+<!--6FE34C5D44364DA7B73F2925C1C4467B-->  <AD_ELEMENT_ID><![CDATA[6FE34C5D44364DA7B73F2925C1C4467B]]></AD_ELEMENT_ID>
+<!--6FE34C5D44364DA7B73F2925C1C4467B-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--6FE34C5D44364DA7B73F2925C1C4467B-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--6FE34C5D44364DA7B73F2925C1C4467B-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--6FE34C5D44364DA7B73F2925C1C4467B-->  <COLUMNNAME><![CDATA[conversion_rate_readonly_logic]]></COLUMNNAME>
+<!--6FE34C5D44364DA7B73F2925C1C4467B-->  <NAME><![CDATA[Conversion Rate Read Only Logic]]></NAME>
+<!--6FE34C5D44364DA7B73F2925C1C4467B-->  <PRINTNAME><![CDATA[Conversion Rate Read Only Logic]]></PRINTNAME>
+<!--6FE34C5D44364DA7B73F2925C1C4467B-->  <DESCRIPTION><![CDATA[Parameter used to implement Read Only Logic on Conversion Rate]]></DESCRIPTION>
+<!--6FE34C5D44364DA7B73F2925C1C4467B-->  <HELP><![CDATA[Parameter used to implement Read Only Logic on Conversion Rate]]></HELP>
+<!--6FE34C5D44364DA7B73F2925C1C4467B-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--6FE34C5D44364DA7B73F2925C1C4467B-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
+<!--6FE34C5D44364DA7B73F2925C1C4467B--></AD_ELEMENT>
+
 <!--720C4FC08FBD43419FF7EACABECA6AE3--><AD_ELEMENT>
 <!--720C4FC08FBD43419FF7EACABECA6AE3-->  <AD_ELEMENT_ID><![CDATA[720C4FC08FBD43419FF7EACABECA6AE3]]></AD_ELEMENT_ID>
 <!--720C4FC08FBD43419FF7EACABECA6AE3-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -348,6 +460,20 @@
 <!--720C4FC08FBD43419FF7EACABECA6AE3-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
 <!--720C4FC08FBD43419FF7EACABECA6AE3--></AD_ELEMENT>
 
+<!--75E1BCB8DBF444199A4A03CDC44E8A25--><AD_ELEMENT>
+<!--75E1BCB8DBF444199A4A03CDC44E8A25-->  <AD_ELEMENT_ID><![CDATA[75E1BCB8DBF444199A4A03CDC44E8A25]]></AD_ELEMENT_ID>
+<!--75E1BCB8DBF444199A4A03CDC44E8A25-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--75E1BCB8DBF444199A4A03CDC44E8A25-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--75E1BCB8DBF444199A4A03CDC44E8A25-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--75E1BCB8DBF444199A4A03CDC44E8A25-->  <COLUMNNAME><![CDATA[EM_Aprm_Processed]]></COLUMNNAME>
+<!--75E1BCB8DBF444199A4A03CDC44E8A25-->  <NAME><![CDATA[Process]]></NAME>
+<!--75E1BCB8DBF444199A4A03CDC44E8A25-->  <PRINTNAME><![CDATA[Process]]></PRINTNAME>
+<!--75E1BCB8DBF444199A4A03CDC44E8A25-->  <DESCRIPTION><![CDATA[Process Button]]></DESCRIPTION>
+<!--75E1BCB8DBF444199A4A03CDC44E8A25-->  <HELP><![CDATA[Process Button]]></HELP>
+<!--75E1BCB8DBF444199A4A03CDC44E8A25-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--75E1BCB8DBF444199A4A03CDC44E8A25-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
+<!--75E1BCB8DBF444199A4A03CDC44E8A25--></AD_ELEMENT>
+
 <!--77E12B7AAB9F45BF9D3263E5967A696A--><AD_ELEMENT>
 <!--77E12B7AAB9F45BF9D3263E5967A696A-->  <AD_ELEMENT_ID><![CDATA[77E12B7AAB9F45BF9D3263E5967A696A]]></AD_ELEMENT_ID>
 <!--77E12B7AAB9F45BF9D3263E5967A696A-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -640,6 +766,20 @@
 <!--88E9727DAC364BA38FFE37BC8B9BF698-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
 <!--88E9727DAC364BA38FFE37BC8B9BF698--></AD_ELEMENT>
 
+<!--8B17B525CBB345518E99800D610EB93E--><AD_ELEMENT>
+<!--8B17B525CBB345518E99800D610EB93E-->  <AD_ELEMENT_ID><![CDATA[8B17B525CBB345518E99800D610EB93E]]></AD_ELEMENT_ID>
+<!--8B17B525CBB345518E99800D610EB93E-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--8B17B525CBB345518E99800D610EB93E-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--8B17B525CBB345518E99800D610EB93E-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--8B17B525CBB345518E99800D610EB93E-->  <COLUMNNAME><![CDATA[trxtype]]></COLUMNNAME>
+<!--8B17B525CBB345518E99800D610EB93E-->  <NAME><![CDATA[Document]]></NAME>
+<!--8B17B525CBB345518E99800D610EB93E-->  <PRINTNAME><![CDATA[Document]]></PRINTNAME>
+<!--8B17B525CBB345518E99800D610EB93E-->  <PO_NAME><![CDATA[Document]]></PO_NAME>
+<!--8B17B525CBB345518E99800D610EB93E-->  <PO_PRINTNAME><![CDATA[Document]]></PO_PRINTNAME>
+<!--8B17B525CBB345518E99800D610EB93E-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--8B17B525CBB345518E99800D610EB93E-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
+<!--8B17B525CBB345518E99800D610EB93E--></AD_ELEMENT>
+
 <!--8B4372E6182C902CE040007F01000EB9--><AD_ELEMENT>
 <!--8B4372E6182C902CE040007F01000EB9-->  <AD_ELEMENT_ID><![CDATA[8B4372E6182C902CE040007F01000EB9]]></AD_ELEMENT_ID>
 <!--8B4372E6182C902CE040007F01000EB9-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -727,8 +867,8 @@
 <!--A0417A0E924ACA28E040007F01003C18-->  <COLUMNNAME><![CDATA[EM_APRM_Delete]]></COLUMNNAME>
 <!--A0417A0E924ACA28E040007F01003C18-->  <NAME><![CDATA[Delete]]></NAME>
 <!--A0417A0E924ACA28E040007F01003C18-->  <PRINTNAME><![CDATA[Delete]]></PRINTNAME>
-<!--A0417A0E924ACA28E040007F01003C18-->  <DESCRIPTION><![CDATA[Delete button]]></DESCRIPTION>
-<!--A0417A0E924ACA28E040007F01003C18-->  <HELP><![CDATA[Delete button]]></HELP>
+<!--A0417A0E924ACA28E040007F01003C18-->  <DESCRIPTION><![CDATA[Delete button (Deprecated)]]></DESCRIPTION>
+<!--A0417A0E924ACA28E040007F01003C18-->  <HELP><![CDATA[Delete button (Deprecated)]]></HELP>
 <!--A0417A0E924ACA28E040007F01003C18-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
 <!--A0417A0E924ACA28E040007F01003C18-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
 <!--A0417A0E924ACA28E040007F01003C18--></AD_ELEMENT>
@@ -753,7 +893,8 @@
 <!--A0417A0E924CCA28E040007F01003C18-->  <COLUMNNAME><![CDATA[EM_APRM_AddTransactions]]></COLUMNNAME>
 <!--A0417A0E924CCA28E040007F01003C18-->  <NAME><![CDATA[EM_APRM_AddTransactions]]></NAME>
 <!--A0417A0E924CCA28E040007F01003C18-->  <PRINTNAME><![CDATA[EM_APRM_AddTransactions]]></PRINTNAME>
-<!--A0417A0E924CCA28E040007F01003C18-->  <DESCRIPTION><![CDATA[Add Transaction From Financial Account]]></DESCRIPTION>
+<!--A0417A0E924CCA28E040007F01003C18-->  <DESCRIPTION><![CDATA[Add Transaction From Financial Account (Deprecated)]]></DESCRIPTION>
+<!--A0417A0E924CCA28E040007F01003C18-->  <HELP><![CDATA[Add Transaction From Financial Account (Deprecated)]]></HELP>
 <!--A0417A0E924CCA28E040007F01003C18-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
 <!--A0417A0E924CCA28E040007F01003C18-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
 <!--A0417A0E924CCA28E040007F01003C18--></AD_ELEMENT>
@@ -869,6 +1010,20 @@
 <!--A37C6F84AA463F50E040007F01006E35-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
 <!--A37C6F84AA463F50E040007F01006E35--></AD_ELEMENT>
 
+<!--A62C80360F274C44AA6BF58315DF65FF--><AD_ELEMENT>
+<!--A62C80360F274C44AA6BF58315DF65FF-->  <AD_ELEMENT_ID><![CDATA[A62C80360F274C44AA6BF58315DF65FF]]></AD_ELEMENT_ID>
+<!--A62C80360F274C44AA6BF58315DF65FF-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--A62C80360F274C44AA6BF58315DF65FF-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--A62C80360F274C44AA6BF58315DF65FF-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--A62C80360F274C44AA6BF58315DF65FF-->  <COLUMNNAME><![CDATA[converted_amount_readonly_logic]]></COLUMNNAME>
+<!--A62C80360F274C44AA6BF58315DF65FF-->  <NAME><![CDATA[Converted Amount Read Only Logic]]></NAME>
+<!--A62C80360F274C44AA6BF58315DF65FF-->  <PRINTNAME><![CDATA[Converted Amount Read Only Logic]]></PRINTNAME>
+<!--A62C80360F274C44AA6BF58315DF65FF-->  <DESCRIPTION><![CDATA[Parameter used to implement Read Only Logic on Converted Amount]]></DESCRIPTION>
+<!--A62C80360F274C44AA6BF58315DF65FF-->  <HELP><![CDATA[Parameter used to implement Read Only Logic on Converted Amount]]></HELP>
+<!--A62C80360F274C44AA6BF58315DF65FF-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--A62C80360F274C44AA6BF58315DF65FF-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
+<!--A62C80360F274C44AA6BF58315DF65FF--></AD_ELEMENT>
+
 <!--AEA679FCC17546268C951135AB611F57--><AD_ELEMENT>
 <!--AEA679FCC17546268C951135AB611F57-->  <AD_ELEMENT_ID><![CDATA[AEA679FCC17546268C951135AB611F57]]></AD_ELEMENT_ID>
 <!--AEA679FCC17546268C951135AB611F57-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -935,6 +1090,20 @@
 <!--C09E18A3FCFEC058E040007F010024F4-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
 <!--C09E18A3FCFEC058E040007F010024F4--></AD_ELEMENT>
 
+<!--C128589B1E884C15B1062BC6A698A41E--><AD_ELEMENT>
+<!--C128589B1E884C15B1062BC6A698A41E-->  <AD_ELEMENT_ID><![CDATA[C128589B1E884C15B1062BC6A698A41E]]></AD_ELEMENT_ID>
+<!--C128589B1E884C15B1062BC6A698A41E-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--C128589B1E884C15B1062BC6A698A41E-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--C128589B1E884C15B1062BC6A698A41E-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--C128589B1E884C15B1062BC6A698A41E-->  <COLUMNNAME><![CDATA[payment_documentno_readonly_logic]]></COLUMNNAME>
+<!--C128589B1E884C15B1062BC6A698A41E-->  <NAME><![CDATA[Payment DocumentNo Read Only Logic]]></NAME>
+<!--C128589B1E884C15B1062BC6A698A41E-->  <PRINTNAME><![CDATA[Payment DocumentNo Read Only Logic]]></PRINTNAME>
+<!--C128589B1E884C15B1062BC6A698A41E-->  <DESCRIPTION><![CDATA[Parameter used to implement Read Only Logic on Payment DocumentNo]]></DESCRIPTION>
+<!--C128589B1E884C15B1062BC6A698A41E-->  <HELP><![CDATA[Parameter used to implement Read Only Logic on Payment DocumentNo]]></HELP>
+<!--C128589B1E884C15B1062BC6A698A41E-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--C128589B1E884C15B1062BC6A698A41E-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
+<!--C128589B1E884C15B1062BC6A698A41E--></AD_ELEMENT>
+
 <!--C1DA4E5EEEDE4FE5B2E9411AA411BF67--><AD_ELEMENT>
 <!--C1DA4E5EEEDE4FE5B2E9411AA411BF67-->  <AD_ELEMENT_ID><![CDATA[C1DA4E5EEEDE4FE5B2E9411AA411BF67]]></AD_ELEMENT_ID>
 <!--C1DA4E5EEEDE4FE5B2E9411AA411BF67-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -1045,6 +1214,20 @@
 <!--D42C1F18622F4773989190BB8C2C8436-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
 <!--D42C1F18622F4773989190BB8C2C8436--></AD_ELEMENT>
 
+<!--D9E7B70083344E86AF5A6272B2090755--><AD_ELEMENT>
+<!--D9E7B70083344E86AF5A6272B2090755-->  <AD_ELEMENT_ID><![CDATA[D9E7B70083344E86AF5A6272B2090755]]></AD_ELEMENT_ID>
+<!--D9E7B70083344E86AF5A6272B2090755-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--D9E7B70083344E86AF5A6272B2090755-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--D9E7B70083344E86AF5A6272B2090755-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--D9E7B70083344E86AF5A6272B2090755-->  <COLUMNNAME><![CDATA[credit_to_use_display_logic]]></COLUMNNAME>
+<!--D9E7B70083344E86AF5A6272B2090755-->  <NAME><![CDATA[Credit to Use Display Logic]]></NAME>
+<!--D9E7B70083344E86AF5A6272B2090755-->  <PRINTNAME><![CDATA[Credit to Use Display Logic]]></PRINTNAME>
+<!--D9E7B70083344E86AF5A6272B2090755-->  <DESCRIPTION><![CDATA[Parameter used to implement Display Logic on Credit to Use grid]]></DESCRIPTION>
+<!--D9E7B70083344E86AF5A6272B2090755-->  <HELP><![CDATA[Parameter used to implement Display Logic on Credit to Use grid]]></HELP>
+<!--D9E7B70083344E86AF5A6272B2090755-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--D9E7B70083344E86AF5A6272B2090755-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
+<!--D9E7B70083344E86AF5A6272B2090755--></AD_ELEMENT>
+
 <!--DABC92A3E32E4DBFB78068CF6A4FBAC7--><AD_ELEMENT>
 <!--DABC92A3E32E4DBFB78068CF6A4FBAC7-->  <AD_ELEMENT_ID><![CDATA[DABC92A3E32E4DBFB78068CF6A4FBAC7]]></AD_ELEMENT_ID>
 <!--DABC92A3E32E4DBFB78068CF6A4FBAC7-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -1183,6 +1366,20 @@
 <!--F3ABC3F6561D43CF8C08E69212487ECE-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
 <!--F3ABC3F6561D43CF8C08E69212487ECE--></AD_ELEMENT>
 
+<!--F5888F54E21C4D59ABF5FBFE6474B229--><AD_ELEMENT>
+<!--F5888F54E21C4D59ABF5FBFE6474B229-->  <AD_ELEMENT_ID><![CDATA[F5888F54E21C4D59ABF5FBFE6474B229]]></AD_ELEMENT_ID>
+<!--F5888F54E21C4D59ABF5FBFE6474B229-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--F5888F54E21C4D59ABF5FBFE6474B229-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--F5888F54E21C4D59ABF5FBFE6474B229-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--F5888F54E21C4D59ABF5FBFE6474B229-->  <COLUMNNAME><![CDATA[trxtype_display_logic]]></COLUMNNAME>
+<!--F5888F54E21C4D59ABF5FBFE6474B229-->  <NAME><![CDATA[Document Display Logic]]></NAME>
+<!--F5888F54E21C4D59ABF5FBFE6474B229-->  <PRINTNAME><![CDATA[Document Display Logic]]></PRINTNAME>
+<!--F5888F54E21C4D59ABF5FBFE6474B229-->  <DESCRIPTION><![CDATA[Parameter used to implement Display Logic on Document]]></DESCRIPTION>
+<!--F5888F54E21C4D59ABF5FBFE6474B229-->  <HELP><![CDATA[Parameter used to implement Display Logic on Document]]></HELP>
+<!--F5888F54E21C4D59ABF5FBFE6474B229-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--F5888F54E21C4D59ABF5FBFE6474B229-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
+<!--F5888F54E21C4D59ABF5FBFE6474B229--></AD_ELEMENT>
+
 <!--F5D2D2099B7D4949838CA0D405D55BB2--><AD_ELEMENT>
 <!--F5D2D2099B7D4949838CA0D405D55BB2-->  <AD_ELEMENT_ID><![CDATA[F5D2D2099B7D4949838CA0D405D55BB2]]></AD_ELEMENT_ID>
 <!--F5D2D2099B7D4949838CA0D405D55BB2-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_FIELD.xml	Tue Aug 12 08:32:37 2014 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_FIELD.xml	Tue Aug 12 08:56:49 2014 +0200
@@ -1576,7 +1576,7 @@
 <!--1968A3A7AE17432FB792343C8F48002B-->  <AD_FIELD_ID><![CDATA[1968A3A7AE17432FB792343C8F48002B]]></AD_FIELD_ID>
 <!--1968A3A7AE17432FB792343C8F48002B-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
 <!--1968A3A7AE17432FB792343C8F48002B-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
-<!--1968A3A7AE17432FB792343C8F48002B-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--1968A3A7AE17432FB792343C8F48002B-->  <ISACTIVE><![CDATA[N]]></ISACTIVE>
 <!--1968A3A7AE17432FB792343C8F48002B-->  <NAME><![CDATA[Delete]]></NAME>
 <!--1968A3A7AE17432FB792343C8F48002B-->  <DESCRIPTION><![CDATA[Delete button]]></DESCRIPTION>
 <!--1968A3A7AE17432FB792343C8F48002B-->  <HELP><![CDATA[Delete button]]></HELP>
@@ -1584,7 +1584,7 @@
 <!--1968A3A7AE17432FB792343C8F48002B-->  <AD_TAB_ID><![CDATA[23691259D1BD4496BCC5F32645BCA4B9]]></AD_TAB_ID>
 <!--1968A3A7AE17432FB792343C8F48002B-->  <AD_COLUMN_ID><![CDATA[A028C06E679F6F62E040007F01007206]]></AD_COLUMN_ID>
 <!--1968A3A7AE17432FB792343C8F48002B-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
-<!--1968A3A7AE17432FB792343C8F48002B-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--1968A3A7AE17432FB792343C8F48002B-->  <ISDISPLAYED><![CDATA[N]]></ISDISPLAYED>
 <!--1968A3A7AE17432FB792343C8F48002B-->  <DISPLAYLOGIC><![CDATA[@Posted@!'Y' & @FIN_Reconciliation_ID@='']]></DISPLAYLOGIC>
 <!--1968A3A7AE17432FB792343C8F48002B-->  <DISPLAYLENGTH><![CDATA[1]]></DISPLAYLENGTH>
 <!--1968A3A7AE17432FB792343C8F48002B-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
@@ -13167,14 +13167,15 @@
 <!--A0417A0E9257CA28E040007F01003C18-->  <AD_FIELD_ID><![CDATA[A0417A0E9257CA28E040007F01003C18]]></AD_FIELD_ID>
 <!--A0417A0E9257CA28E040007F01003C18-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
 <!--A0417A0E9257CA28E040007F01003C18-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
-<!--A0417A0E9257CA28E040007F01003C18-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--A0417A0E9257CA28E040007F01003C18-->  <ISACTIVE><![CDATA[N]]></ISACTIVE>
 <!--A0417A0E9257CA28E040007F01003C18-->  <NAME><![CDATA[Add Transaction]]></NAME>
-<!--A0417A0E9257CA28E040007F01003C18-->  <DESCRIPTION><![CDATA[Add Transaction From Financial Account]]></DESCRIPTION>
+<!--A0417A0E9257CA28E040007F01003C18-->  <DESCRIPTION><![CDATA[Add Transaction From Financial Account (Deprecated)]]></DESCRIPTION>
+<!--A0417A0E9257CA28E040007F01003C18-->  <HELP><![CDATA[Add Transaction From Financial Account (Deprecated)]]></HELP>
 <!--A0417A0E9257CA28E040007F01003C18-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
 <!--A0417A0E9257CA28E040007F01003C18-->  <AD_TAB_ID><![CDATA[2845D761A8394468BD3BA4710AA888D4]]></AD_TAB_ID>
 <!--A0417A0E9257CA28E040007F01003C18-->  <AD_COLUMN_ID><![CDATA[A04179EAC69FF848E040007F01004523]]></AD_COLUMN_ID>
 <!--A0417A0E9257CA28E040007F01003C18-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
-<!--A0417A0E9257CA28E040007F01003C18-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--A0417A0E9257CA28E040007F01003C18-->  <ISDISPLAYED><![CDATA[N]]></ISDISPLAYED>
 <!--A0417A0E9257CA28E040007F01003C18-->  <DISPLAYLENGTH><![CDATA[1]]></DISPLAYLENGTH>
 <!--A0417A0E9257CA28E040007F01003C18-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--A0417A0E9257CA28E040007F01003C18-->  <SEQNO><![CDATA[260]]></SEQNO>
@@ -19660,6 +19661,32 @@
 <!--E4F4384CEC3F43D6B94FBC45B444F7A0-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
 <!--E4F4384CEC3F43D6B94FBC45B444F7A0--></AD_FIELD>
 
+<!--E5569BAF22C644EF9B5D6846515883F9--><AD_FIELD>
+<!--E5569BAF22C644EF9B5D6846515883F9-->  <AD_FIELD_ID><![CDATA[E5569BAF22C644EF9B5D6846515883F9]]></AD_FIELD_ID>
+<!--E5569BAF22C644EF9B5D6846515883F9-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--E5569BAF22C644EF9B5D6846515883F9-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--E5569BAF22C644EF9B5D6846515883F9-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--E5569BAF22C644EF9B5D6846515883F9-->  <NAME><![CDATA[Transaction Process]]></NAME>
+<!--E5569BAF22C644EF9B5D6846515883F9-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--E5569BAF22C644EF9B5D6846515883F9-->  <AD_TAB_ID><![CDATA[23691259D1BD4496BCC5F32645BCA4B9]]></AD_TAB_ID>
+<!--E5569BAF22C644EF9B5D6846515883F9-->  <AD_COLUMN_ID><![CDATA[986B657361F64EB59F7991710E6CBD71]]></AD_COLUMN_ID>
+<!--E5569BAF22C644EF9B5D6846515883F9-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
+<!--E5569BAF22C644EF9B5D6846515883F9-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--E5569BAF22C644EF9B5D6846515883F9-->  <DISPLAYLENGTH><![CDATA[60]]></DISPLAYLENGTH>
+<!--E5569BAF22C644EF9B5D6846515883F9-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--E5569BAF22C644EF9B5D6846515883F9-->  <SEQNO><![CDATA[2090]]></SEQNO>
+<!--E5569BAF22C644EF9B5D6846515883F9-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--E5569BAF22C644EF9B5D6846515883F9-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--E5569BAF22C644EF9B5D6846515883F9-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--E5569BAF22C644EF9B5D6846515883F9-->  <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
+<!--E5569BAF22C644EF9B5D6846515883F9-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--E5569BAF22C644EF9B5D6846515883F9-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--E5569BAF22C644EF9B5D6846515883F9-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--E5569BAF22C644EF9B5D6846515883F9-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--E5569BAF22C644EF9B5D6846515883F9-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--E5569BAF22C644EF9B5D6846515883F9-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
+<!--E5569BAF22C644EF9B5D6846515883F9--></AD_FIELD>
+
 <!--E55C3ED614734AE68311022E0FDA4E20--><AD_FIELD>
 <!--E55C3ED614734AE68311022E0FDA4E20-->  <AD_FIELD_ID><![CDATA[E55C3ED614734AE68311022E0FDA4E20]]></AD_FIELD_ID>
 <!--E55C3ED614734AE68311022E0FDA4E20-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MESSAGE.xml	Tue Aug 12 08:32:37 2014 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MESSAGE.xml	Tue Aug 12 08:56:49 2014 +0200
@@ -829,6 +829,18 @@
 <!--9CFC61CBF0C84814B6DB7729427A2E38-->  <ISINCLUDEINI18N><![CDATA[N]]></ISINCLUDEINI18N>
 <!--9CFC61CBF0C84814B6DB7729427A2E38--></AD_MESSAGE>
 
+<!--A08760215EF944BABE717FA33F241FC0--><AD_MESSAGE>
+<!--A08760215EF944BABE717FA33F241FC0-->  <AD_MESSAGE_ID><![CDATA[A08760215EF944BABE717FA33F241FC0]]></AD_MESSAGE_ID>
+<!--A08760215EF944BABE717FA33F241FC0-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--A08760215EF944BABE717FA33F241FC0-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--A08760215EF944BABE717FA33F241FC0-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--A08760215EF944BABE717FA33F241FC0-->  <VALUE><![CDATA[APRM_ZEROAMOUNTPAYMENTTRANSACTION]]></VALUE>
+<!--A08760215EF944BABE717FA33F241FC0-->  <MSGTEXT><![CDATA[It is not possible to add a payment of zero amount to a transaction]]></MSGTEXT>
+<!--A08760215EF944BABE717FA33F241FC0-->  <MSGTYPE><![CDATA[E]]></MSGTYPE>
+<!--A08760215EF944BABE717FA33F241FC0-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--A08760215EF944BABE717FA33F241FC0-->  <ISINCLUDEINI18N><![CDATA[N]]></ISINCLUDEINI18N>
+<!--A08760215EF944BABE717FA33F241FC0--></AD_MESSAGE>
+
 <!--A0F2DD5EF309448084FB6F3F44B59798--><AD_MESSAGE>
 <!--A0F2DD5EF309448084FB6F3F44B59798-->  <AD_MESSAGE_ID><![CDATA[A0F2DD5EF309448084FB6F3F44B59798]]></AD_MESSAGE_ID>
 <!--A0F2DD5EF309448084FB6F3F44B59798-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_PROCESS_PARA.xml	Tue Aug 12 08:32:37 2014 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_PROCESS_PARA.xml	Tue Aug 12 08:56:49 2014 +0200
@@ -272,6 +272,27 @@
 <!--9728F9CADE45497E9F583A76B7DE3BE6-->  <AD_ELEMENT_ID><![CDATA[550]]></AD_ELEMENT_ID>
 <!--9728F9CADE45497E9F583A76B7DE3BE6--></AD_PROCESS_PARA>
 
+<!--993E5D1AE89649648DFE15C27360CD52--><AD_PROCESS_PARA>
+<!--993E5D1AE89649648DFE15C27360CD52-->  <AD_PROCESS_PARA_ID><![CDATA[993E5D1AE89649648DFE15C27360CD52]]></AD_PROCESS_PARA_ID>
+<!--993E5D1AE89649648DFE15C27360CD52-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--993E5D1AE89649648DFE15C27360CD52-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--993E5D1AE89649648DFE15C27360CD52-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--993E5D1AE89649648DFE15C27360CD52-->  <NAME><![CDATA[Action]]></NAME>
+<!--993E5D1AE89649648DFE15C27360CD52-->  <DESCRIPTION><![CDATA[A drop down list box indicating the next step to take.]]></DESCRIPTION>
+<!--993E5D1AE89649648DFE15C27360CD52-->  <HELP><![CDATA[The Action field indicates the Action to be performed for this element.]]></HELP>
+<!--993E5D1AE89649648DFE15C27360CD52-->  <AD_PROCESS_ID><![CDATA[F68F2890E96D4D85A1DEF0274D105BCE]]></AD_PROCESS_ID>
+<!--993E5D1AE89649648DFE15C27360CD52-->  <SEQNO><![CDATA[10]]></SEQNO>
+<!--993E5D1AE89649648DFE15C27360CD52-->  <AD_REFERENCE_ID><![CDATA[17]]></AD_REFERENCE_ID>
+<!--993E5D1AE89649648DFE15C27360CD52-->  <AD_REFERENCE_VALUE_ID><![CDATA[F671DDEA466D41A996F605590CB545BC]]></AD_REFERENCE_VALUE_ID>
+<!--993E5D1AE89649648DFE15C27360CD52-->  <AD_VAL_RULE_ID><![CDATA[FAE0D7C8A9D84FAFAE3C10CD5DCE6E30]]></AD_VAL_RULE_ID>
+<!--993E5D1AE89649648DFE15C27360CD52-->  <COLUMNNAME><![CDATA[action]]></COLUMNNAME>
+<!--993E5D1AE89649648DFE15C27360CD52-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--993E5D1AE89649648DFE15C27360CD52-->  <FIELDLENGTH><![CDATA[0]]></FIELDLENGTH>
+<!--993E5D1AE89649648DFE15C27360CD52-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
+<!--993E5D1AE89649648DFE15C27360CD52-->  <ISRANGE><![CDATA[N]]></ISRANGE>
+<!--993E5D1AE89649648DFE15C27360CD52-->  <AD_ELEMENT_ID><![CDATA[152]]></AD_ELEMENT_ID>
+<!--993E5D1AE89649648DFE15C27360CD52--></AD_PROCESS_PARA>
+
 <!--A7B47A5637A74910ADC70CD66E6C6A29--><AD_PROCESS_PARA>
 <!--A7B47A5637A74910ADC70CD66E6C6A29-->  <AD_PROCESS_PARA_ID><![CDATA[A7B47A5637A74910ADC70CD66E6C6A29]]></AD_PROCESS_PARA_ID>
 <!--A7B47A5637A74910ADC70CD66E6C6A29-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_REFERENCE.xml	Tue Aug 12 08:32:37 2014 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_REFERENCE.xml	Tue Aug 12 08:56:49 2014 +0200
@@ -373,6 +373,18 @@
 <!--F378D8FAEF9441F29D3974ADE211BF98-->  <ISVALUEDISPLAYED><![CDATA[N]]></ISVALUEDISPLAYED>
 <!--F378D8FAEF9441F29D3974ADE211BF98--></AD_REFERENCE>
 
+<!--F671DDEA466D41A996F605590CB545BC--><AD_REFERENCE>
+<!--F671DDEA466D41A996F605590CB545BC-->  <AD_REFERENCE_ID><![CDATA[F671DDEA466D41A996F605590CB545BC]]></AD_REFERENCE_ID>
+<!--F671DDEA466D41A996F605590CB545BC-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--F671DDEA466D41A996F605590CB545BC-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--F671DDEA466D41A996F605590CB545BC-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--F671DDEA466D41A996F605590CB545BC-->  <NAME><![CDATA[Process transaction]]></NAME>
+<!--F671DDEA466D41A996F605590CB545BC-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--F671DDEA466D41A996F605590CB545BC-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--F671DDEA466D41A996F605590CB545BC-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
+<!--F671DDEA466D41A996F605590CB545BC-->  <ISVALUEDISPLAYED><![CDATA[N]]></ISVALUEDISPLAYED>
+<!--F671DDEA466D41A996F605590CB545BC--></AD_REFERENCE>
+
 <!--F903F726B41A49D3860243101CEEBA25--><AD_REFERENCE>
 <!--F903F726B41A49D3860243101CEEBA25-->  <AD_REFERENCE_ID><![CDATA[F903F726B41A49D3860243101CEEBA25]]></AD_REFERENCE_ID>
 <!--F903F726B41A49D3860243101CEEBA25-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_REF_LIST.xml	Tue Aug 12 08:32:37 2014 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_REF_LIST.xml	Tue Aug 12 08:56:49 2014 +0200
@@ -171,6 +171,17 @@
 <!--6746D09AE633453EBD21A8B36B16C088-->  <SEQNO><![CDATA[10]]></SEQNO>
 <!--6746D09AE633453EBD21A8B36B16C088--></AD_REF_LIST>
 
+<!--699161A43CD1402590C9026DF810977F--><AD_REF_LIST>
+<!--699161A43CD1402590C9026DF810977F-->  <AD_REF_LIST_ID><![CDATA[699161A43CD1402590C9026DF810977F]]></AD_REF_LIST_ID>
+<!--699161A43CD1402590C9026DF810977F-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--699161A43CD1402590C9026DF810977F-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--699161A43CD1402590C9026DF810977F-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--699161A43CD1402590C9026DF810977F-->  <VALUE><![CDATA[P]]></VALUE>
+<!--699161A43CD1402590C9026DF810977F-->  <NAME><![CDATA[Process]]></NAME>
+<!--699161A43CD1402590C9026DF810977F-->  <AD_REFERENCE_ID><![CDATA[F671DDEA466D41A996F605590CB545BC]]></AD_REFERENCE_ID>
+<!--699161A43CD1402590C9026DF810977F-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--699161A43CD1402590C9026DF810977F--></AD_REF_LIST>
+
 <!--6AA9B332DAE04D7ABEC8A9BE66866A70--><AD_REF_LIST>
 <!--6AA9B332DAE04D7ABEC8A9BE66866A70-->  <AD_REF_LIST_ID><![CDATA[6AA9B332DAE04D7ABEC8A9BE66866A70]]></AD_REF_LIST_ID>
 <!--6AA9B332DAE04D7ABEC8A9BE66866A70-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -312,6 +323,17 @@
 <!--C5D1596D065545B49156C1F9426C9E14-->  <SEQNO><![CDATA[30]]></SEQNO>
 <!--C5D1596D065545B49156C1F9426C9E14--></AD_REF_LIST>
 
+<!--D8B6B39FDFF54278B54440AFCF7FDF3D--><AD_REF_LIST>
+<!--D8B6B39FDFF54278B54440AFCF7FDF3D-->  <AD_REF_LIST_ID><![CDATA[D8B6B39FDFF54278B54440AFCF7FDF3D]]></AD_REF_LIST_ID>
+<!--D8B6B39FDFF54278B54440AFCF7FDF3D-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--D8B6B39FDFF54278B54440AFCF7FDF3D-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--D8B6B39FDFF54278B54440AFCF7FDF3D-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--D8B6B39FDFF54278B54440AFCF7FDF3D-->  <VALUE><![CDATA[R]]></VALUE>
+<!--D8B6B39FDFF54278B54440AFCF7FDF3D-->  <NAME><![CDATA[Reactivate]]></NAME>
+<!--D8B6B39FDFF54278B54440AFCF7FDF3D-->  <AD_REFERENCE_ID><![CDATA[F671DDEA466D41A996F605590CB545BC]]></AD_REFERENCE_ID>
+<!--D8B6B39FDFF54278B54440AFCF7FDF3D-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--D8B6B39FDFF54278B54440AFCF7FDF3D--></AD_REF_LIST>
+
 <!--DDCDE32A9FC046E694D5074144DD6AFF--><AD_REF_LIST>
 <!--DDCDE32A9FC046E694D5074144DD6AFF-->  <AD_REF_LIST_ID><![CDATA[DDCDE32A9FC046E694D5074144DD6AFF]]></AD_REF_LIST_ID>
 <!--DDCDE32A9FC046E694D5074144DD6AFF-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_VAL_RULE.xml	Tue Aug 12 08:32:37 2014 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_VAL_RULE.xml	Tue Aug 12 08:56:49 2014 +0200
@@ -167,6 +167,17 @@
 <!--E491153CCBEE49A1842A7CC8544929DD-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
 <!--E491153CCBEE49A1842A7CC8544929DD--></AD_VAL_RULE>
 
+<!--FAE0D7C8A9D84FAFAE3C10CD5DCE6E30--><AD_VAL_RULE>
+<!--FAE0D7C8A9D84FAFAE3C10CD5DCE6E30-->  <AD_VAL_RULE_ID><![CDATA[FAE0D7C8A9D84FAFAE3C10CD5DCE6E30]]></AD_VAL_RULE_ID>
+<!--FAE0D7C8A9D84FAFAE3C10CD5DCE6E30-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--FAE0D7C8A9D84FAFAE3C10CD5DCE6E30-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--FAE0D7C8A9D84FAFAE3C10CD5DCE6E30-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--FAE0D7C8A9D84FAFAE3C10CD5DCE6E30-->  <NAME><![CDATA[APRM_Process Transactions valid actions]]></NAME>
+<!--FAE0D7C8A9D84FAFAE3C10CD5DCE6E30-->  <TYPE><![CDATA[S]]></TYPE>
+<!--FAE0D7C8A9D84FAFAE3C10CD5DCE6E30-->  <CODE><![CDATA[((@Processed@ = 'N' AND AD_Ref_List.value='P') OR (@Processed@ = 'Y' AND AD_Ref_List.value='R'))]]></CODE>
+<!--FAE0D7C8A9D84FAFAE3C10CD5DCE6E30-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--FAE0D7C8A9D84FAFAE3C10CD5DCE6E30--></AD_VAL_RULE>
+
 <!--FF8080812E448A62012E44943A160017--><AD_VAL_RULE>
 <!--FF8080812E448A62012E44943A160017-->  <AD_VAL_RULE_ID><![CDATA[FF8080812E448A62012E44943A160017]]></AD_VAL_RULE_ID>
 <!--FF8080812E448A62012E44943A160017-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/OBUIAPP_PARAMETER.xml	Tue Aug 12 08:32:37 2014 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/OBUIAPP_PARAMETER.xml	Tue Aug 12 08:56:49 2014 +0200
@@ -49,6 +49,32 @@
 <!--0586B9F7ED4147758536007BF402F1DF-->  <DISPLAYTITLE><![CDATA[N]]></DISPLAYTITLE>
 <!--0586B9F7ED4147758536007BF402F1DF--></OBUIAPP_PARAMETER>
 
+<!--075F4BA7A03F4548A7A501BAFD073DEE--><OBUIAPP_PARAMETER>
+<!--075F4BA7A03F4548A7A501BAFD073DEE-->  <OBUIAPP_PARAMETER_ID><![CDATA[075F4BA7A03F4548A7A501BAFD073DEE]]></OBUIAPP_PARAMETER_ID>
+<!--075F4BA7A03F4548A7A501BAFD073DEE-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--075F4BA7A03F4548A7A501BAFD073DEE-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--075F4BA7A03F4548A7A501BAFD073DEE-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--075F4BA7A03F4548A7A501BAFD073DEE-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--075F4BA7A03F4548A7A501BAFD073DEE-->  <NAME><![CDATA[Payment Method Read Only Logic]]></NAME>
+<!--075F4BA7A03F4548A7A501BAFD073DEE-->  <DESCRIPTION><![CDATA[Parameter used to implement Read Only Logic on Payment Method]]></DESCRIPTION>
+<!--075F4BA7A03F4548A7A501BAFD073DEE-->  <HELP><![CDATA[Parameter used to implement Read Only Logic on Payment Method]]></HELP>
+<!--075F4BA7A03F4548A7A501BAFD073DEE-->  <SEQNO><![CDATA[1160]]></SEQNO>
+<!--075F4BA7A03F4548A7A501BAFD073DEE-->  <AD_REFERENCE_ID><![CDATA[10]]></AD_REFERENCE_ID>
+<!--075F4BA7A03F4548A7A501BAFD073DEE-->  <COLUMNNAME><![CDATA[payment_method_readonly_logic]]></COLUMNNAME>
+<!--075F4BA7A03F4548A7A501BAFD073DEE-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--075F4BA7A03F4548A7A501BAFD073DEE-->  <FIELDLENGTH><![CDATA[0]]></FIELDLENGTH>
+<!--075F4BA7A03F4548A7A501BAFD073DEE-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
+<!--075F4BA7A03F4548A7A501BAFD073DEE-->  <DEFAULTVALUE><![CDATA[OB.getFilterExpression("org.openbravo.advpaymentmngt.filterexpression.AddPaymentReadOnlyLogicsExpression")]]></DEFAULTVALUE>
+<!--075F4BA7A03F4548A7A501BAFD073DEE-->  <AD_ELEMENT_ID><![CDATA[458D63E9F9D541F7A06B341305ACCB66]]></AD_ELEMENT_ID>
+<!--075F4BA7A03F4548A7A501BAFD073DEE-->  <ISFIXED><![CDATA[N]]></ISFIXED>
+<!--075F4BA7A03F4548A7A501BAFD073DEE-->  <EVALUATEFIXEDVALUE><![CDATA[N]]></EVALUATEFIXEDVALUE>
+<!--075F4BA7A03F4548A7A501BAFD073DEE-->  <OBUIAPP_PROCESS_ID><![CDATA[9BED7889E1034FE68BD85D5D16857320]]></OBUIAPP_PROCESS_ID>
+<!--075F4BA7A03F4548A7A501BAFD073DEE-->  <STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
+<!--075F4BA7A03F4548A7A501BAFD073DEE-->  <DISPLAYLOGIC><![CDATA[false]]></DISPLAYLOGIC>
+<!--075F4BA7A03F4548A7A501BAFD073DEE-->  <DISPLAYEDROWS><![CDATA[5]]></DISPLAYEDROWS>
+<!--075F4BA7A03F4548A7A501BAFD073DEE-->  <DISPLAYTITLE><![CDATA[Y]]></DISPLAYTITLE>
+<!--075F4BA7A03F4548A7A501BAFD073DEE--></OBUIAPP_PARAMETER>
+
 <!--0A9E075CCC6E4D59AAC37E3AEF1FE269--><OBUIAPP_PARAMETER>
 <!--0A9E075CCC6E4D59AAC37E3AEF1FE269-->  <OBUIAPP_PARAMETER_ID><![CDATA[0A9E075CCC6E4D59AAC37E3AEF1FE269]]></OBUIAPP_PARAMETER_ID>
 <!--0A9E075CCC6E4D59AAC37E3AEF1FE269-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -93,7 +119,7 @@
 <!--0E081905DD9646A2AFB296F81C1AA62E-->  <EVALUATEFIXEDVALUE><![CDATA[N]]></EVALUATEFIXEDVALUE>
 <!--0E081905DD9646A2AFB296F81C1AA62E-->  <OBUIAPP_PROCESS_ID><![CDATA[9BED7889E1034FE68BD85D5D16857320]]></OBUIAPP_PROCESS_ID>
 <!--0E081905DD9646A2AFB296F81C1AA62E-->  <STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
-<!--0E081905DD9646A2AFB296F81C1AA62E-->  <READONLYLOGIC><![CDATA[OB.PropertyStore.get('NotAllowChangeExchange', this.view.windowId) == 'Y']]></READONLYLOGIC>
+<!--0E081905DD9646A2AFB296F81C1AA62E-->  <READONLYLOGIC><![CDATA[@converted_amount_readonly_logic@ == 'Y']]></READONLYLOGIC>
 <!--0E081905DD9646A2AFB296F81C1AA62E-->  <ONCHANGEFUNCTION><![CDATA[OB.APRM.AddPayment.convertedAmountOnChange]]></ONCHANGEFUNCTION>
 <!--0E081905DD9646A2AFB296F81C1AA62E-->  <DISPLAYEDROWS><![CDATA[5]]></DISPLAYEDROWS>
 <!--0E081905DD9646A2AFB296F81C1AA62E-->  <DISPLAYTITLE><![CDATA[N]]></DISPLAYTITLE>
@@ -149,6 +175,32 @@
 <!--12F5A54CF6FA4702B147CC08BC664051-->  <ONGRIDLOADFUNCTION><![CDATA[OB.APRM.AddPayment.orderInvoiceOnLoadGrid]]></ONGRIDLOADFUNCTION>
 <!--12F5A54CF6FA4702B147CC08BC664051--></OBUIAPP_PARAMETER>
 
+<!--155F39F5EB144A648F409C115D61A489--><OBUIAPP_PARAMETER>
+<!--155F39F5EB144A648F409C115D61A489-->  <OBUIAPP_PARAMETER_ID><![CDATA[155F39F5EB144A648F409C115D61A489]]></OBUIAPP_PARAMETER_ID>
+<!--155F39F5EB144A648F409C115D61A489-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--155F39F5EB144A648F409C115D61A489-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--155F39F5EB144A648F409C115D61A489-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--155F39F5EB144A648F409C115D61A489-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--155F39F5EB144A648F409C115D61A489-->  <NAME><![CDATA[Payment Date Read Only Logic]]></NAME>
+<!--155F39F5EB144A648F409C115D61A489-->  <DESCRIPTION><![CDATA[Parameter used to implement Read Only Logic on Payment Date]]></DESCRIPTION>
+<!--155F39F5EB144A648F409C115D61A489-->  <HELP><![CDATA[Parameter used to implement Read Only Logic on Payment Date]]></HELP>
+<!--155F39F5EB144A648F409C115D61A489-->  <SEQNO><![CDATA[1190]]></SEQNO>
+<!--155F39F5EB144A648F409C115D61A489-->  <AD_REFERENCE_ID><![CDATA[10]]></AD_REFERENCE_ID>
+<!--155F39F5EB144A648F409C115D61A489-->  <COLUMNNAME><![CDATA[payment_date_readonly_logic]]></COLUMNNAME>
+<!--155F39F5EB144A648F409C115D61A489-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--155F39F5EB144A648F409C115D61A489-->  <FIELDLENGTH><![CDATA[0]]></FIELDLENGTH>
+<!--155F39F5EB144A648F409C115D61A489-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
+<!--155F39F5EB144A648F409C115D61A489-->  <DEFAULTVALUE><![CDATA[OB.getFilterExpression("org.openbravo.advpaymentmngt.filterexpression.AddPaymentReadOnlyLogicsExpression")]]></DEFAULTVALUE>
+<!--155F39F5EB144A648F409C115D61A489-->  <AD_ELEMENT_ID><![CDATA[6C4509E308444DE0B928E1C25A80CD74]]></AD_ELEMENT_ID>
+<!--155F39F5EB144A648F409C115D61A489-->  <ISFIXED><![CDATA[N]]></ISFIXED>
+<!--155F39F5EB144A648F409C115D61A489-->  <EVALUATEFIXEDVALUE><![CDATA[N]]></EVALUATEFIXEDVALUE>
+<!--155F39F5EB144A648F409C115D61A489-->  <OBUIAPP_PROCESS_ID><![CDATA[9BED7889E1034FE68BD85D5D16857320]]></OBUIAPP_PROCESS_ID>
+<!--155F39F5EB144A648F409C115D61A489-->  <STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
+<!--155F39F5EB144A648F409C115D61A489-->  <DISPLAYLOGIC><![CDATA[false]]></DISPLAYLOGIC>
+<!--155F39F5EB144A648F409C115D61A489-->  <DISPLAYEDROWS><![CDATA[5]]></DISPLAYEDROWS>
+<!--155F39F5EB144A648F409C115D61A489-->  <DISPLAYTITLE><![CDATA[Y]]></DISPLAYTITLE>
+<!--155F39F5EB144A648F409C115D61A489--></OBUIAPP_PARAMETER>
+
 <!--1CB6D915777343F4BD3317532345B658--><OBUIAPP_PARAMETER>
 <!--1CB6D915777343F4BD3317532345B658-->  <OBUIAPP_PARAMETER_ID><![CDATA[1CB6D915777343F4BD3317532345B658]]></OBUIAPP_PARAMETER_ID>
 <!--1CB6D915777343F4BD3317532345B658-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -197,7 +249,7 @@
 <!--1D16F7BDCDD04F3A9AD259E84811AA41-->  <EVALUATEFIXEDVALUE><![CDATA[N]]></EVALUATEFIXEDVALUE>
 <!--1D16F7BDCDD04F3A9AD259E84811AA41-->  <OBUIAPP_PROCESS_ID><![CDATA[9BED7889E1034FE68BD85D5D16857320]]></OBUIAPP_PROCESS_ID>
 <!--1D16F7BDCDD04F3A9AD259E84811AA41-->  <STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
-<!--1D16F7BDCDD04F3A9AD259E84811AA41-->  <READONLYLOGIC><![CDATA[@fin_payment_id@!undefined & @fin_paymend_id@!null]]></READONLYLOGIC>
+<!--1D16F7BDCDD04F3A9AD259E84811AA41-->  <READONLYLOGIC><![CDATA[@fin_financial_account_id_readonly_logic@ == 'Y']]></READONLYLOGIC>
 <!--1D16F7BDCDD04F3A9AD259E84811AA41-->  <ONCHANGEFUNCTION><![CDATA[OB.APRM.AddPayment.financialAccountOnChange]]></ONCHANGEFUNCTION>
 <!--1D16F7BDCDD04F3A9AD259E84811AA41-->  <DISPLAYEDROWS><![CDATA[5]]></DISPLAYEDROWS>
 <!--1D16F7BDCDD04F3A9AD259E84811AA41-->  <DISPLAYTITLE><![CDATA[N]]></DISPLAYTITLE>
@@ -251,7 +303,7 @@
 <!--200C902859B746D5BDDC773D0C91C1BB-->  <EVALUATEFIXEDVALUE><![CDATA[N]]></EVALUATEFIXEDVALUE>
 <!--200C902859B746D5BDDC773D0C91C1BB-->  <OBUIAPP_PROCESS_ID><![CDATA[9BED7889E1034FE68BD85D5D16857320]]></OBUIAPP_PROCESS_ID>
 <!--200C902859B746D5BDDC773D0C91C1BB-->  <STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
-<!--200C902859B746D5BDDC773D0C91C1BB-->  <READONLYLOGIC><![CDATA[OB.PropertyStore.get('NotAllowChangeExchange', this.view.windowId) == 'Y']]></READONLYLOGIC>
+<!--200C902859B746D5BDDC773D0C91C1BB-->  <READONLYLOGIC><![CDATA[@conversion_rate_readonly_logic@ == 'Y']]></READONLYLOGIC>
 <!--200C902859B746D5BDDC773D0C91C1BB-->  <NUMCOLUMN><![CDATA[4]]></NUMCOLUMN>
 <!--200C902859B746D5BDDC773D0C91C1BB-->  <ONCHANGEFUNCTION><![CDATA[OB.APRM.AddPayment.conversionRateOnChange]]></ONCHANGEFUNCTION>
 <!--200C902859B746D5BDDC773D0C91C1BB-->  <DISPLAYEDROWS><![CDATA[5]]></DISPLAYEDROWS>
@@ -360,6 +412,32 @@
 <!--4C09892656344AB1ACF988D57D84B96B-->  <DISPLAYTITLE><![CDATA[N]]></DISPLAYTITLE>
 <!--4C09892656344AB1ACF988D57D84B96B--></OBUIAPP_PARAMETER>
 
+<!--4CDE749FE6D341B4BCC128ADDAEE6068--><OBUIAPP_PARAMETER>
+<!--4CDE749FE6D341B4BCC128ADDAEE6068-->  <OBUIAPP_PARAMETER_ID><![CDATA[4CDE749FE6D341B4BCC128ADDAEE6068]]></OBUIAPP_PARAMETER_ID>
+<!--4CDE749FE6D341B4BCC128ADDAEE6068-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--4CDE749FE6D341B4BCC128ADDAEE6068-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--4CDE749FE6D341B4BCC128ADDAEE6068-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--4CDE749FE6D341B4BCC128ADDAEE6068-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--4CDE749FE6D341B4BCC128ADDAEE6068-->  <NAME><![CDATA[Conversion Rate Read Only Logic]]></NAME>
+<!--4CDE749FE6D341B4BCC128ADDAEE6068-->  <DESCRIPTION><![CDATA[Parameter used to implement Read Only Logic on Conversion Rate]]></DESCRIPTION>
+<!--4CDE749FE6D341B4BCC128ADDAEE6068-->  <HELP><![CDATA[Parameter used to implement Read Only Logic on Conversion Rate]]></HELP>
+<!--4CDE749FE6D341B4BCC128ADDAEE6068-->  <SEQNO><![CDATA[1210]]></SEQNO>
+<!--4CDE749FE6D341B4BCC128ADDAEE6068-->  <AD_REFERENCE_ID><![CDATA[10]]></AD_REFERENCE_ID>
+<!--4CDE749FE6D341B4BCC128ADDAEE6068-->  <COLUMNNAME><![CDATA[conversion_rate_readonly_logic]]></COLUMNNAME>
+<!--4CDE749FE6D341B4BCC128ADDAEE6068-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--4CDE749FE6D341B4BCC128ADDAEE6068-->  <FIELDLENGTH><![CDATA[0]]></FIELDLENGTH>
+<!--4CDE749FE6D341B4BCC128ADDAEE6068-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
+<!--4CDE749FE6D341B4BCC128ADDAEE6068-->  <DEFAULTVALUE><![CDATA[OB.getFilterExpression("org.openbravo.advpaymentmngt.filterexpression.AddPaymentReadOnlyLogicsExpression")]]></DEFAULTVALUE>
+<!--4CDE749FE6D341B4BCC128ADDAEE6068-->  <AD_ELEMENT_ID><![CDATA[6FE34C5D44364DA7B73F2925C1C4467B]]></AD_ELEMENT_ID>
+<!--4CDE749FE6D341B4BCC128ADDAEE6068-->  <ISFIXED><![CDATA[N]]></ISFIXED>
+<!--4CDE749FE6D341B4BCC128ADDAEE6068-->  <EVALUATEFIXEDVALUE><![CDATA[N]]></EVALUATEFIXEDVALUE>
+<!--4CDE749FE6D341B4BCC128ADDAEE6068-->  <OBUIAPP_PROCESS_ID><![CDATA[9BED7889E1034FE68BD85D5D16857320]]></OBUIAPP_PROCESS_ID>
+<!--4CDE749FE6D341B4BCC128ADDAEE6068-->  <STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
+<!--4CDE749FE6D341B4BCC128ADDAEE6068-->  <DISPLAYLOGIC><![CDATA[false]]></DISPLAYLOGIC>
+<!--4CDE749FE6D341B4BCC128ADDAEE6068-->  <DISPLAYEDROWS><![CDATA[5]]></DISPLAYEDROWS>
+<!--4CDE749FE6D341B4BCC128ADDAEE6068-->  <DISPLAYTITLE><![CDATA[Y]]></DISPLAYTITLE>
+<!--4CDE749FE6D341B4BCC128ADDAEE6068--></OBUIAPP_PARAMETER>
+
 <!--4EDC18E376BB4EEB937AE1F1EF4EB8B1--><OBUIAPP_PARAMETER>
 <!--4EDC18E376BB4EEB937AE1F1EF4EB8B1-->  <OBUIAPP_PARAMETER_ID><![CDATA[4EDC18E376BB4EEB937AE1F1EF4EB8B1]]></OBUIAPP_PARAMETER_ID>
 <!--4EDC18E376BB4EEB937AE1F1EF4EB8B1-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -461,6 +539,32 @@
 <!--60C455BF16B6481D8ED5336CAA3C85C7-->  <DISPLAYTITLE><![CDATA[Y]]></DISPLAYTITLE>
 <!--60C455BF16B6481D8ED5336CAA3C85C7--></OBUIAPP_PARAMETER>
 
+<!--61059745E59240A998ED90DC83E5DA4F--><OBUIAPP_PARAMETER>
+<!--61059745E59240A998ED90DC83E5DA4F-->  <OBUIAPP_PARAMETER_ID><![CDATA[61059745E59240A998ED90DC83E5DA4F]]></OBUIAPP_PARAMETER_ID>
+<!--61059745E59240A998ED90DC83E5DA4F-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--61059745E59240A998ED90DC83E5DA4F-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--61059745E59240A998ED90DC83E5DA4F-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--61059745E59240A998ED90DC83E5DA4F-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--61059745E59240A998ED90DC83E5DA4F-->  <NAME><![CDATA[Credit to Use Display Logic]]></NAME>
+<!--61059745E59240A998ED90DC83E5DA4F-->  <DESCRIPTION><![CDATA[Parameter used to implement Display Logic on Credit to Use grid]]></DESCRIPTION>
+<!--61059745E59240A998ED90DC83E5DA4F-->  <HELP><![CDATA[Parameter used to implement Display Logic on Credit to Use grid]]></HELP>
+<!--61059745E59240A998ED90DC83E5DA4F-->  <SEQNO><![CDATA[1140]]></SEQNO>
+<!--61059745E59240A998ED90DC83E5DA4F-->  <AD_REFERENCE_ID><![CDATA[10]]></AD_REFERENCE_ID>
+<!--61059745E59240A998ED90DC83E5DA4F-->  <COLUMNNAME><![CDATA[credit_to_use_display_logic]]></COLUMNNAME>
+<!--61059745E59240A998ED90DC83E5DA4F-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--61059745E59240A998ED90DC83E5DA4F-->  <FIELDLENGTH><![CDATA[0]]></FIELDLENGTH>
+<!--61059745E59240A998ED90DC83E5DA4F-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
+<!--61059745E59240A998ED90DC83E5DA4F-->  <DEFAULTVALUE><![CDATA[OB.getFilterExpression("org.openbravo.advpaymentmngt.filterexpression.AddPaymentDisplayLogicsExpression")]]></DEFAULTVALUE>
+<!--61059745E59240A998ED90DC83E5DA4F-->  <AD_ELEMENT_ID><![CDATA[D9E7B70083344E86AF5A6272B2090755]]></AD_ELEMENT_ID>
+<!--61059745E59240A998ED90DC83E5DA4F-->  <ISFIXED><![CDATA[N]]></ISFIXED>
+<!--61059745E59240A998ED90DC83E5DA4F-->  <EVALUATEFIXEDVALUE><![CDATA[N]]></EVALUATEFIXEDVALUE>
+<!--61059745E59240A998ED90DC83E5DA4F-->  <OBUIAPP_PROCESS_ID><![CDATA[9BED7889E1034FE68BD85D5D16857320]]></OBUIAPP_PROCESS_ID>
+<!--61059745E59240A998ED90DC83E5DA4F-->  <STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
+<!--61059745E59240A998ED90DC83E5DA4F-->  <DISPLAYLOGIC><![CDATA[false]]></DISPLAYLOGIC>
+<!--61059745E59240A998ED90DC83E5DA4F-->  <DISPLAYEDROWS><![CDATA[5]]></DISPLAYEDROWS>
+<!--61059745E59240A998ED90DC83E5DA4F-->  <DISPLAYTITLE><![CDATA[N]]></DISPLAYTITLE>
+<!--61059745E59240A998ED90DC83E5DA4F--></OBUIAPP_PARAMETER>
+
 <!--6AF091FD5F1440BB9F0E0C674A168144--><OBUIAPP_PARAMETER>
 <!--6AF091FD5F1440BB9F0E0C674A168144-->  <OBUIAPP_PARAMETER_ID><![CDATA[6AF091FD5F1440BB9F0E0C674A168144]]></OBUIAPP_PARAMETER_ID>
 <!--6AF091FD5F1440BB9F0E0C674A168144-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -487,6 +591,32 @@
 <!--6AF091FD5F1440BB9F0E0C674A168144-->  <DISPLAYTITLE><![CDATA[Y]]></DISPLAYTITLE>
 <!--6AF091FD5F1440BB9F0E0C674A168144--></OBUIAPP_PARAMETER>
 
+<!--6E03D970D07D4753941F7B06DAF197F3--><OBUIAPP_PARAMETER>
+<!--6E03D970D07D4753941F7B06DAF197F3-->  <OBUIAPP_PARAMETER_ID><![CDATA[6E03D970D07D4753941F7B06DAF197F3]]></OBUIAPP_PARAMETER_ID>
+<!--6E03D970D07D4753941F7B06DAF197F3-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--6E03D970D07D4753941F7B06DAF197F3-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--6E03D970D07D4753941F7B06DAF197F3-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--6E03D970D07D4753941F7B06DAF197F3-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--6E03D970D07D4753941F7B06DAF197F3-->  <NAME><![CDATA[Document]]></NAME>
+<!--6E03D970D07D4753941F7B06DAF197F3-->  <SEQNO><![CDATA[0]]></SEQNO>
+<!--6E03D970D07D4753941F7B06DAF197F3-->  <AD_REFERENCE_ID><![CDATA[17]]></AD_REFERENCE_ID>
+<!--6E03D970D07D4753941F7B06DAF197F3-->  <AD_REFERENCE_VALUE_ID><![CDATA[40B84CF78FC9435790887846CCDAE875]]></AD_REFERENCE_VALUE_ID>
+<!--6E03D970D07D4753941F7B06DAF197F3-->  <COLUMNNAME><![CDATA[trxtype]]></COLUMNNAME>
+<!--6E03D970D07D4753941F7B06DAF197F3-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--6E03D970D07D4753941F7B06DAF197F3-->  <FIELDLENGTH><![CDATA[0]]></FIELDLENGTH>
+<!--6E03D970D07D4753941F7B06DAF197F3-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
+<!--6E03D970D07D4753941F7B06DAF197F3-->  <DEFAULTVALUE><![CDATA[OB.getFilterExpression("org.openbravo.advpaymentmngt.filterexpression.AddPaymentDefaultValuesExpression")]]></DEFAULTVALUE>
+<!--6E03D970D07D4753941F7B06DAF197F3-->  <AD_ELEMENT_ID><![CDATA[8B17B525CBB345518E99800D610EB93E]]></AD_ELEMENT_ID>
+<!--6E03D970D07D4753941F7B06DAF197F3-->  <ISFIXED><![CDATA[N]]></ISFIXED>
+<!--6E03D970D07D4753941F7B06DAF197F3-->  <EVALUATEFIXEDVALUE><![CDATA[N]]></EVALUATEFIXEDVALUE>
+<!--6E03D970D07D4753941F7B06DAF197F3-->  <OBUIAPP_PROCESS_ID><![CDATA[9BED7889E1034FE68BD85D5D16857320]]></OBUIAPP_PROCESS_ID>
+<!--6E03D970D07D4753941F7B06DAF197F3-->  <STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
+<!--6E03D970D07D4753941F7B06DAF197F3-->  <DISPLAYLOGIC><![CDATA[@trxtype_display_logic@='Y']]></DISPLAYLOGIC>
+<!--6E03D970D07D4753941F7B06DAF197F3-->  <ONCHANGEFUNCTION><![CDATA[OB.APRM.AddPayment.documentOnChange]]></ONCHANGEFUNCTION>
+<!--6E03D970D07D4753941F7B06DAF197F3-->  <DISPLAYEDROWS><![CDATA[5]]></DISPLAYEDROWS>
+<!--6E03D970D07D4753941F7B06DAF197F3-->  <DISPLAYTITLE><![CDATA[Y]]></DISPLAYTITLE>
+<!--6E03D970D07D4753941F7B06DAF197F3--></OBUIAPP_PARAMETER>
+
 <!--7783E23035DA4DBC8DD694EBBD4A1E5F--><OBUIAPP_PARAMETER>
 <!--7783E23035DA4DBC8DD694EBBD4A1E5F-->  <OBUIAPP_PARAMETER_ID><![CDATA[7783E23035DA4DBC8DD694EBBD4A1E5F]]></OBUIAPP_PARAMETER_ID>
 <!--7783E23035DA4DBC8DD694EBBD4A1E5F-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -583,7 +713,7 @@
 <!--838EF92641044D038600E4C1B6F1C4CB-->  <EVALUATEFIXEDVALUE><![CDATA[N]]></EVALUATEFIXEDVALUE>
 <!--838EF92641044D038600E4C1B6F1C4CB-->  <OBUIAPP_PROCESS_ID><![CDATA[9BED7889E1034FE68BD85D5D16857320]]></OBUIAPP_PROCESS_ID>
 <!--838EF92641044D038600E4C1B6F1C4CB-->  <STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
-<!--838EF92641044D038600E4C1B6F1C4CB-->  <READONLYLOGIC><![CDATA[@fin_payment_id@!undefined & @fin_paymend_id@!null]]></READONLYLOGIC>
+<!--838EF92641044D038600E4C1B6F1C4CB-->  <READONLYLOGIC><![CDATA[@payment_method_readonly_logic@ == 'Y']]></READONLYLOGIC>
 <!--838EF92641044D038600E4C1B6F1C4CB-->  <ONCHANGEFUNCTION><![CDATA[OB.APRM.AddPayment.paymentMethodOnChange]]></ONCHANGEFUNCTION>
 <!--838EF92641044D038600E4C1B6F1C4CB-->  <DISPLAYEDROWS><![CDATA[5]]></DISPLAYEDROWS>
 <!--838EF92641044D038600E4C1B6F1C4CB-->  <DISPLAYTITLE><![CDATA[N]]></DISPLAYTITLE>
@@ -635,6 +765,32 @@
 <!--854F44975FB84D20AE8E8DA02999747E-->  <DISPLAYTITLE><![CDATA[N]]></DISPLAYTITLE>
 <!--854F44975FB84D20AE8E8DA02999747E--></OBUIAPP_PARAMETER>
 
+<!--871DE320B33C4B83BDB4894EE99536E5--><OBUIAPP_PARAMETER>
+<!--871DE320B33C4B83BDB4894EE99536E5-->  <OBUIAPP_PARAMETER_ID><![CDATA[871DE320B33C4B83BDB4894EE99536E5]]></OBUIAPP_PARAMETER_ID>
+<!--871DE320B33C4B83BDB4894EE99536E5-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--871DE320B33C4B83BDB4894EE99536E5-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--871DE320B33C4B83BDB4894EE99536E5-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--871DE320B33C4B83BDB4894EE99536E5-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--871DE320B33C4B83BDB4894EE99536E5-->  <NAME><![CDATA[Deposit To Read Only Logic]]></NAME>
+<!--871DE320B33C4B83BDB4894EE99536E5-->  <DESCRIPTION><![CDATA[Parameter used to implement Read Only Logic on Financial Account]]></DESCRIPTION>
+<!--871DE320B33C4B83BDB4894EE99536E5-->  <HELP><![CDATA[Parameter used to implement Read Only Logic on Financial Account]]></HELP>
+<!--871DE320B33C4B83BDB4894EE99536E5-->  <SEQNO><![CDATA[1200]]></SEQNO>
+<!--871DE320B33C4B83BDB4894EE99536E5-->  <AD_REFERENCE_ID><![CDATA[10]]></AD_REFERENCE_ID>
+<!--871DE320B33C4B83BDB4894EE99536E5-->  <COLUMNNAME><![CDATA[fin_financial_account_id_readonly_logic]]></COLUMNNAME>
+<!--871DE320B33C4B83BDB4894EE99536E5-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--871DE320B33C4B83BDB4894EE99536E5-->  <FIELDLENGTH><![CDATA[0]]></FIELDLENGTH>
+<!--871DE320B33C4B83BDB4894EE99536E5-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
+<!--871DE320B33C4B83BDB4894EE99536E5-->  <DEFAULTVALUE><![CDATA[OB.getFilterExpression("org.openbravo.advpaymentmngt.filterexpression.AddPaymentReadOnlyLogicsExpression")]]></DEFAULTVALUE>
+<!--871DE320B33C4B83BDB4894EE99536E5-->  <AD_ELEMENT_ID><![CDATA[2CFD3BE7B8D0441BBF151920E5BC384F]]></AD_ELEMENT_ID>
+<!--871DE320B33C4B83BDB4894EE99536E5-->  <ISFIXED><![CDATA[N]]></ISFIXED>
+<!--871DE320B33C4B83BDB4894EE99536E5-->  <EVALUATEFIXEDVALUE><![CDATA[N]]></EVALUATEFIXEDVALUE>
+<!--871DE320B33C4B83BDB4894EE99536E5-->  <OBUIAPP_PROCESS_ID><![CDATA[9BED7889E1034FE68BD85D5D16857320]]></OBUIAPP_PROCESS_ID>
+<!--871DE320B33C4B83BDB4894EE99536E5-->  <STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
+<!--871DE320B33C4B83BDB4894EE99536E5-->  <DISPLAYLOGIC><![CDATA[false]]></DISPLAYLOGIC>
+<!--871DE320B33C4B83BDB4894EE99536E5-->  <DISPLAYEDROWS><![CDATA[5]]></DISPLAYEDROWS>
+<!--871DE320B33C4B83BDB4894EE99536E5-->  <DISPLAYTITLE><![CDATA[Y]]></DISPLAYTITLE>
+<!--871DE320B33C4B83BDB4894EE99536E5--></OBUIAPP_PARAMETER>
+
 <!--878E7842FC524139BBEE0CAE0C1F3E17--><OBUIAPP_PARAMETER>
 <!--878E7842FC524139BBEE0CAE0C1F3E17-->  <OBUIAPP_PARAMETER_ID><![CDATA[878E7842FC524139BBEE0CAE0C1F3E17]]></OBUIAPP_PARAMETER_ID>
 <!--878E7842FC524139BBEE0CAE0C1F3E17-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -679,7 +835,7 @@
 <!--8A2B3B1A41364852ACD2804CF86A69F5-->  <EVALUATEFIXEDVALUE><![CDATA[N]]></EVALUATEFIXEDVALUE>
 <!--8A2B3B1A41364852ACD2804CF86A69F5-->  <OBUIAPP_PROCESS_ID><![CDATA[9BED7889E1034FE68BD85D5D16857320]]></OBUIAPP_PROCESS_ID>
 <!--8A2B3B1A41364852ACD2804CF86A69F5-->  <STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
-<!--8A2B3B1A41364852ACD2804CF86A69F5-->  <DISPLAYLOGIC><![CDATA[@difference@ > 0]]></DISPLAYLOGIC>
+<!--8A2B3B1A41364852ACD2804CF86A69F5-->  <DISPLAYLOGIC><![CDATA[@overpayment_action_display_logic@='Y']]></DISPLAYLOGIC>
 <!--8A2B3B1A41364852ACD2804CF86A69F5-->  <NUMCOLUMN><![CDATA[2]]></NUMCOLUMN>
 <!--8A2B3B1A41364852ACD2804CF86A69F5-->  <DISPLAYEDROWS><![CDATA[5]]></DISPLAYEDROWS>
 <!--8A2B3B1A41364852ACD2804CF86A69F5-->  <DISPLAYTITLE><![CDATA[Y]]></DISPLAYTITLE>
@@ -711,6 +867,58 @@
 <!--8B738077BBF041E88B843AB9D98B12B0-->  <DISPLAYTITLE><![CDATA[Y]]></DISPLAYTITLE>
 <!--8B738077BBF041E88B843AB9D98B12B0--></OBUIAPP_PARAMETER>
 
+<!--91BE9BC9D1FE44C2A4CD631AE2474EAD--><OBUIAPP_PARAMETER>
+<!--91BE9BC9D1FE44C2A4CD631AE2474EAD-->  <OBUIAPP_PARAMETER_ID><![CDATA[91BE9BC9D1FE44C2A4CD631AE2474EAD]]></OBUIAPP_PARAMETER_ID>
+<!--91BE9BC9D1FE44C2A4CD631AE2474EAD-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--91BE9BC9D1FE44C2A4CD631AE2474EAD-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--91BE9BC9D1FE44C2A4CD631AE2474EAD-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--91BE9BC9D1FE44C2A4CD631AE2474EAD-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--91BE9BC9D1FE44C2A4CD631AE2474EAD-->  <NAME><![CDATA[Payment DocumentNo Read Only Logic]]></NAME>
+<!--91BE9BC9D1FE44C2A4CD631AE2474EAD-->  <DESCRIPTION><![CDATA[Parameter used to implement Read Only Logic on Payment DocumentNo]]></DESCRIPTION>
+<!--91BE9BC9D1FE44C2A4CD631AE2474EAD-->  <HELP><![CDATA[Parameter used to implement Read Only Logic on Payment DocumentNo]]></HELP>
+<!--91BE9BC9D1FE44C2A4CD631AE2474EAD-->  <SEQNO><![CDATA[1150]]></SEQNO>
+<!--91BE9BC9D1FE44C2A4CD631AE2474EAD-->  <AD_REFERENCE_ID><![CDATA[10]]></AD_REFERENCE_ID>
+<!--91BE9BC9D1FE44C2A4CD631AE2474EAD-->  <COLUMNNAME><![CDATA[payment_documentno_readonly_logic]]></COLUMNNAME>
+<!--91BE9BC9D1FE44C2A4CD631AE2474EAD-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--91BE9BC9D1FE44C2A4CD631AE2474EAD-->  <FIELDLENGTH><![CDATA[0]]></FIELDLENGTH>
+<!--91BE9BC9D1FE44C2A4CD631AE2474EAD-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
+<!--91BE9BC9D1FE44C2A4CD631AE2474EAD-->  <DEFAULTVALUE><![CDATA[OB.getFilterExpression("org.openbravo.advpaymentmngt.filterexpression.AddPaymentReadOnlyLogicsExpression")]]></DEFAULTVALUE>
+<!--91BE9BC9D1FE44C2A4CD631AE2474EAD-->  <AD_ELEMENT_ID><![CDATA[C128589B1E884C15B1062BC6A698A41E]]></AD_ELEMENT_ID>
+<!--91BE9BC9D1FE44C2A4CD631AE2474EAD-->  <ISFIXED><![CDATA[N]]></ISFIXED>
+<!--91BE9BC9D1FE44C2A4CD631AE2474EAD-->  <EVALUATEFIXEDVALUE><![CDATA[N]]></EVALUATEFIXEDVALUE>
+<!--91BE9BC9D1FE44C2A4CD631AE2474EAD-->  <OBUIAPP_PROCESS_ID><![CDATA[9BED7889E1034FE68BD85D5D16857320]]></OBUIAPP_PROCESS_ID>
+<!--91BE9BC9D1FE44C2A4CD631AE2474EAD-->  <STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
+<!--91BE9BC9D1FE44C2A4CD631AE2474EAD-->  <DISPLAYLOGIC><![CDATA[false]]></DISPLAYLOGIC>
+<!--91BE9BC9D1FE44C2A4CD631AE2474EAD-->  <DISPLAYEDROWS><![CDATA[5]]></DISPLAYEDROWS>
+<!--91BE9BC9D1FE44C2A4CD631AE2474EAD-->  <DISPLAYTITLE><![CDATA[Y]]></DISPLAYTITLE>
+<!--91BE9BC9D1FE44C2A4CD631AE2474EAD--></OBUIAPP_PARAMETER>
+
+<!--93DC15C203EB4205BDE0D87AFE185D5C--><OBUIAPP_PARAMETER>
+<!--93DC15C203EB4205BDE0D87AFE185D5C-->  <OBUIAPP_PARAMETER_ID><![CDATA[93DC15C203EB4205BDE0D87AFE185D5C]]></OBUIAPP_PARAMETER_ID>
+<!--93DC15C203EB4205BDE0D87AFE185D5C-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--93DC15C203EB4205BDE0D87AFE185D5C-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--93DC15C203EB4205BDE0D87AFE185D5C-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--93DC15C203EB4205BDE0D87AFE185D5C-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--93DC15C203EB4205BDE0D87AFE185D5C-->  <NAME><![CDATA[Overpayment Action Display Logic]]></NAME>
+<!--93DC15C203EB4205BDE0D87AFE185D5C-->  <DESCRIPTION><![CDATA[Parameter used to implement Display Logic on Overpayment Action]]></DESCRIPTION>
+<!--93DC15C203EB4205BDE0D87AFE185D5C-->  <HELP><![CDATA[Parameter used to implement Display Logic on Overpayment Action]]></HELP>
+<!--93DC15C203EB4205BDE0D87AFE185D5C-->  <SEQNO><![CDATA[1120]]></SEQNO>
+<!--93DC15C203EB4205BDE0D87AFE185D5C-->  <AD_REFERENCE_ID><![CDATA[10]]></AD_REFERENCE_ID>
+<!--93DC15C203EB4205BDE0D87AFE185D5C-->  <COLUMNNAME><![CDATA[overpayment_action_display_logic]]></COLUMNNAME>
+<!--93DC15C203EB4205BDE0D87AFE185D5C-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--93DC15C203EB4205BDE0D87AFE185D5C-->  <FIELDLENGTH><![CDATA[0]]></FIELDLENGTH>
+<!--93DC15C203EB4205BDE0D87AFE185D5C-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
+<!--93DC15C203EB4205BDE0D87AFE185D5C-->  <DEFAULTVALUE><![CDATA[OB.getFilterExpression("org.openbravo.advpaymentmngt.filterexpression.AddPaymentDisplayLogicsExpression")]]></DEFAULTVALUE>
+<!--93DC15C203EB4205BDE0D87AFE185D5C-->  <AD_ELEMENT_ID><![CDATA[51F0875CB4114D90A239FBCA54B5C1AB]]></AD_ELEMENT_ID>
+<!--93DC15C203EB4205BDE0D87AFE185D5C-->  <ISFIXED><![CDATA[N]]></ISFIXED>
+<!--93DC15C203EB4205BDE0D87AFE185D5C-->  <EVALUATEFIXEDVALUE><![CDATA[N]]></EVALUATEFIXEDVALUE>
+<!--93DC15C203EB4205BDE0D87AFE185D5C-->  <OBUIAPP_PROCESS_ID><![CDATA[9BED7889E1034FE68BD85D5D16857320]]></OBUIAPP_PROCESS_ID>
+<!--93DC15C203EB4205BDE0D87AFE185D5C-->  <STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
+<!--93DC15C203EB4205BDE0D87AFE185D5C-->  <DISPLAYLOGIC><![CDATA[false]]></DISPLAYLOGIC>
+<!--93DC15C203EB4205BDE0D87AFE185D5C-->  <DISPLAYEDROWS><![CDATA[5]]></DISPLAYEDROWS>
+<!--93DC15C203EB4205BDE0D87AFE185D5C-->  <DISPLAYTITLE><![CDATA[N]]></DISPLAYTITLE>
+<!--93DC15C203EB4205BDE0D87AFE185D5C--></OBUIAPP_PARAMETER>
+
 <!--94DAEE7477AF40ED9B40E3A546EACD02--><OBUIAPP_PARAMETER>
 <!--94DAEE7477AF40ED9B40E3A546EACD02-->  <OBUIAPP_PARAMETER_ID><![CDATA[94DAEE7477AF40ED9B40E3A546EACD02]]></OBUIAPP_PARAMETER_ID>
 <!--94DAEE7477AF40ED9B40E3A546EACD02-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -737,6 +945,32 @@
 <!--94DAEE7477AF40ED9B40E3A546EACD02-->  <DISPLAYTITLE><![CDATA[Y]]></DISPLAYTITLE>
 <!--94DAEE7477AF40ED9B40E3A546EACD02--></OBUIAPP_PARAMETER>
 
+<!--967CEF7421094B06B089DEA1D1F6C37D--><OBUIAPP_PARAMETER>
+<!--967CEF7421094B06B089DEA1D1F6C37D-->  <OBUIAPP_PARAMETER_ID><![CDATA[967CEF7421094B06B089DEA1D1F6C37D]]></OBUIAPP_PARAMETER_ID>
+<!--967CEF7421094B06B089DEA1D1F6C37D-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--967CEF7421094B06B089DEA1D1F6C37D-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--967CEF7421094B06B089DEA1D1F6C37D-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--967CEF7421094B06B089DEA1D1F6C37D-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--967CEF7421094B06B089DEA1D1F6C37D-->  <NAME><![CDATA[Actual Payment Read Only Logic]]></NAME>
+<!--967CEF7421094B06B089DEA1D1F6C37D-->  <DESCRIPTION><![CDATA[Parameter used to implement Read Only Logic on Actual Payment]]></DESCRIPTION>
+<!--967CEF7421094B06B089DEA1D1F6C37D-->  <HELP><![CDATA[Parameter used to implement Read Only Logic on Actual Payment]]></HELP>
+<!--967CEF7421094B06B089DEA1D1F6C37D-->  <SEQNO><![CDATA[1170]]></SEQNO>
+<!--967CEF7421094B06B089DEA1D1F6C37D-->  <AD_REFERENCE_ID><![CDATA[10]]></AD_REFERENCE_ID>
+<!--967CEF7421094B06B089DEA1D1F6C37D-->  <COLUMNNAME><![CDATA[actual_payment_readonly_logic]]></COLUMNNAME>
+<!--967CEF7421094B06B089DEA1D1F6C37D-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--967CEF7421094B06B089DEA1D1F6C37D-->  <FIELDLENGTH><![CDATA[0]]></FIELDLENGTH>
+<!--967CEF7421094B06B089DEA1D1F6C37D-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
+<!--967CEF7421094B06B089DEA1D1F6C37D-->  <DEFAULTVALUE><![CDATA[OB.getFilterExpression("org.openbravo.advpaymentmngt.filterexpression.AddPaymentReadOnlyLogicsExpression")]]></DEFAULTVALUE>
+<!--967CEF7421094B06B089DEA1D1F6C37D-->  <AD_ELEMENT_ID><![CDATA[349748D8346C46B1A4A652BC15F98EBB]]></AD_ELEMENT_ID>
+<!--967CEF7421094B06B089DEA1D1F6C37D-->  <ISFIXED><![CDATA[N]]></ISFIXED>
+<!--967CEF7421094B06B089DEA1D1F6C37D-->  <EVALUATEFIXEDVALUE><![CDATA[N]]></EVALUATEFIXEDVALUE>
+<!--967CEF7421094B06B089DEA1D1F6C37D-->  <OBUIAPP_PROCESS_ID><![CDATA[9BED7889E1034FE68BD85D5D16857320]]></OBUIAPP_PROCESS_ID>
+<!--967CEF7421094B06B089DEA1D1F6C37D-->  <STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
+<!--967CEF7421094B06B089DEA1D1F6C37D-->  <DISPLAYLOGIC><![CDATA[false]]></DISPLAYLOGIC>
+<!--967CEF7421094B06B089DEA1D1F6C37D-->  <DISPLAYEDROWS><![CDATA[5]]></DISPLAYEDROWS>
+<!--967CEF7421094B06B089DEA1D1F6C37D-->  <DISPLAYTITLE><![CDATA[Y]]></DISPLAYTITLE>
+<!--967CEF7421094B06B089DEA1D1F6C37D--></OBUIAPP_PARAMETER>
+
 <!--97DD674259364196944B4C02B0278305--><OBUIAPP_PARAMETER>
 <!--97DD674259364196944B4C02B0278305-->  <OBUIAPP_PARAMETER_ID><![CDATA[97DD674259364196944B4C02B0278305]]></OBUIAPP_PARAMETER_ID>
 <!--97DD674259364196944B4C02B0278305-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -763,6 +997,32 @@
 <!--97DD674259364196944B4C02B0278305-->  <DISPLAYTITLE><![CDATA[Y]]></DISPLAYTITLE>
 <!--97DD674259364196944B4C02B0278305--></OBUIAPP_PARAMETER>
 
+<!--9E82150797C64125965C9BA668C2D2B4--><OBUIAPP_PARAMETER>
+<!--9E82150797C64125965C9BA668C2D2B4-->  <OBUIAPP_PARAMETER_ID><![CDATA[9E82150797C64125965C9BA668C2D2B4]]></OBUIAPP_PARAMETER_ID>
+<!--9E82150797C64125965C9BA668C2D2B4-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--9E82150797C64125965C9BA668C2D2B4-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--9E82150797C64125965C9BA668C2D2B4-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--9E82150797C64125965C9BA668C2D2B4-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--9E82150797C64125965C9BA668C2D2B4-->  <NAME><![CDATA[Document Display Logic]]></NAME>
+<!--9E82150797C64125965C9BA668C2D2B4-->  <DESCRIPTION><![CDATA[Parameter used to implement Display Logic on Document]]></DESCRIPTION>
+<!--9E82150797C64125965C9BA668C2D2B4-->  <HELP><![CDATA[Parameter used to implement Display Logic on Document]]></HELP>
+<!--9E82150797C64125965C9BA668C2D2B4-->  <SEQNO><![CDATA[1130]]></SEQNO>
+<!--9E82150797C64125965C9BA668C2D2B4-->  <AD_REFERENCE_ID><![CDATA[10]]></AD_REFERENCE_ID>
+<!--9E82150797C64125965C9BA668C2D2B4-->  <COLUMNNAME><![CDATA[trxtype_display_logic]]></COLUMNNAME>
+<!--9E82150797C64125965C9BA668C2D2B4-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--9E82150797C64125965C9BA668C2D2B4-->  <FIELDLENGTH><![CDATA[0]]></FIELDLENGTH>
+<!--9E82150797C64125965C9BA668C2D2B4-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
+<!--9E82150797C64125965C9BA668C2D2B4-->  <DEFAULTVALUE><![CDATA[OB.getFilterExpression("org.openbravo.advpaymentmngt.filterexpression.AddPaymentDisplayLogicsExpression")]]></DEFAULTVALUE>
+<!--9E82150797C64125965C9BA668C2D2B4-->  <AD_ELEMENT_ID><![CDATA[F5888F54E21C4D59ABF5FBFE6474B229]]></AD_ELEMENT_ID>
+<!--9E82150797C64125965C9BA668C2D2B4-->  <ISFIXED><![CDATA[N]]></ISFIXED>
+<!--9E82150797C64125965C9BA668C2D2B4-->  <EVALUATEFIXEDVALUE><![CDATA[N]]></EVALUATEFIXEDVALUE>
+<!--9E82150797C64125965C9BA668C2D2B4-->  <OBUIAPP_PROCESS_ID><![CDATA[9BED7889E1034FE68BD85D5D16857320]]></OBUIAPP_PROCESS_ID>
+<!--9E82150797C64125965C9BA668C2D2B4-->  <STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
+<!--9E82150797C64125965C9BA668C2D2B4-->  <DISPLAYLOGIC><![CDATA[false]]></DISPLAYLOGIC>
+<!--9E82150797C64125965C9BA668C2D2B4-->  <DISPLAYEDROWS><![CDATA[5]]></DISPLAYEDROWS>
+<!--9E82150797C64125965C9BA668C2D2B4-->  <DISPLAYTITLE><![CDATA[N]]></DISPLAYTITLE>
+<!--9E82150797C64125965C9BA668C2D2B4--></OBUIAPP_PARAMETER>
+
 <!--A801DA25DEAA404A8C651626CA31B22F--><OBUIAPP_PARAMETER>
 <!--A801DA25DEAA404A8C651626CA31B22F-->  <OBUIAPP_PARAMETER_ID><![CDATA[A801DA25DEAA404A8C651626CA31B22F]]></OBUIAPP_PARAMETER_ID>
 <!--A801DA25DEAA404A8C651626CA31B22F-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -784,7 +1044,7 @@
 <!--A801DA25DEAA404A8C651626CA31B22F-->  <EVALUATEFIXEDVALUE><![CDATA[N]]></EVALUATEFIXEDVALUE>
 <!--A801DA25DEAA404A8C651626CA31B22F-->  <OBUIAPP_PROCESS_ID><![CDATA[9BED7889E1034FE68BD85D5D16857320]]></OBUIAPP_PROCESS_ID>
 <!--A801DA25DEAA404A8C651626CA31B22F-->  <STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
-<!--A801DA25DEAA404A8C651626CA31B22F-->  <DISPLAYLOGIC><![CDATA[@customer_credit@ > 0 & @received_from@!'' & (@issotrx@ == true | @generateCredit@ == 0)]]></DISPLAYLOGIC>
+<!--A801DA25DEAA404A8C651626CA31B22F-->  <DISPLAYLOGIC><![CDATA[@credit_to_use_display_logic@='Y']]></DISPLAYLOGIC>
 <!--A801DA25DEAA404A8C651626CA31B22F-->  <AD_FIELDGROUP_ID><![CDATA[CB265F2D7ACF439F9FB5EFBFA0B50363]]></AD_FIELDGROUP_ID>
 <!--A801DA25DEAA404A8C651626CA31B22F-->  <DISPLAYEDROWS><![CDATA[5]]></DISPLAYEDROWS>
 <!--A801DA25DEAA404A8C651626CA31B22F-->  <DISPLAYTITLE><![CDATA[N]]></DISPLAYTITLE>
@@ -812,7 +1072,7 @@
 <!--A95732C0B3794D79B2E945D50872D931-->  <EVALUATEFIXEDVALUE><![CDATA[N]]></EVALUATEFIXEDVALUE>
 <!--A95732C0B3794D79B2E945D50872D931-->  <OBUIAPP_PROCESS_ID><![CDATA[9BED7889E1034FE68BD85D5D16857320]]></OBUIAPP_PROCESS_ID>
 <!--A95732C0B3794D79B2E945D50872D931-->  <STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
-<!--A95732C0B3794D79B2E945D50872D931-->  <READONLYLOGIC><![CDATA[@issotrx@=='N']]></READONLYLOGIC>
+<!--A95732C0B3794D79B2E945D50872D931-->  <READONLYLOGIC><![CDATA[@actual_payment_readonly_logic@ == 'Y']]></READONLYLOGIC>
 <!--A95732C0B3794D79B2E945D50872D931-->  <ONCHANGEFUNCTION><![CDATA[OB.APRM.AddPayment.actualPaymentOnChange]]></ONCHANGEFUNCTION>
 <!--A95732C0B3794D79B2E945D50872D931-->  <DISPLAYEDROWS><![CDATA[5]]></DISPLAYEDROWS>
 <!--A95732C0B3794D79B2E945D50872D931-->  <DISPLAYTITLE><![CDATA[N]]></DISPLAYTITLE>
@@ -871,6 +1131,58 @@
 <!--B2E975E0ADE3445C90DA81F0F492EA1C-->  <DISPLAYTITLE><![CDATA[Y]]></DISPLAYTITLE>
 <!--B2E975E0ADE3445C90DA81F0F492EA1C--></OBUIAPP_PARAMETER>
 
+<!--B86607BED54F45B89718C80C61878093--><OBUIAPP_PARAMETER>
+<!--B86607BED54F45B89718C80C61878093-->  <OBUIAPP_PARAMETER_ID><![CDATA[B86607BED54F45B89718C80C61878093]]></OBUIAPP_PARAMETER_ID>
+<!--B86607BED54F45B89718C80C61878093-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--B86607BED54F45B89718C80C61878093-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--B86607BED54F45B89718C80C61878093-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--B86607BED54F45B89718C80C61878093-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--B86607BED54F45B89718C80C61878093-->  <NAME><![CDATA[Converted Amount Read Only Logic]]></NAME>
+<!--B86607BED54F45B89718C80C61878093-->  <DESCRIPTION><![CDATA[Parameter used to implement Read Only Logic on Converted Amount]]></DESCRIPTION>
+<!--B86607BED54F45B89718C80C61878093-->  <HELP><![CDATA[Parameter used to implement Read Only Logic on Converted Amount]]></HELP>
+<!--B86607BED54F45B89718C80C61878093-->  <SEQNO><![CDATA[1180]]></SEQNO>
+<!--B86607BED54F45B89718C80C61878093-->  <AD_REFERENCE_ID><![CDATA[10]]></AD_REFERENCE_ID>
+<!--B86607BED54F45B89718C80C61878093-->  <COLUMNNAME><![CDATA[converted_amount_readonly_logic]]></COLUMNNAME>
+<!--B86607BED54F45B89718C80C61878093-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--B86607BED54F45B89718C80C61878093-->  <FIELDLENGTH><![CDATA[0]]></FIELDLENGTH>
+<!--B86607BED54F45B89718C80C61878093-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
+<!--B86607BED54F45B89718C80C61878093-->  <DEFAULTVALUE><![CDATA[OB.getFilterExpression("org.openbravo.advpaymentmngt.filterexpression.AddPaymentReadOnlyLogicsExpression")]]></DEFAULTVALUE>
+<!--B86607BED54F45B89718C80C61878093-->  <AD_ELEMENT_ID><![CDATA[A62C80360F274C44AA6BF58315DF65FF]]></AD_ELEMENT_ID>
+<!--B86607BED54F45B89718C80C61878093-->  <ISFIXED><![CDATA[N]]></ISFIXED>
+<!--B86607BED54F45B89718C80C61878093-->  <EVALUATEFIXEDVALUE><![CDATA[N]]></EVALUATEFIXEDVALUE>
+<!--B86607BED54F45B89718C80C61878093-->  <OBUIAPP_PROCESS_ID><![CDATA[9BED7889E1034FE68BD85D5D16857320]]></OBUIAPP_PROCESS_ID>
+<!--B86607BED54F45B89718C80C61878093-->  <STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
+<!--B86607BED54F45B89718C80C61878093-->  <DISPLAYLOGIC><![CDATA[false]]></DISPLAYLOGIC>
+<!--B86607BED54F45B89718C80C61878093-->  <DISPLAYEDROWS><![CDATA[5]]></DISPLAYEDROWS>
+<!--B86607BED54F45B89718C80C61878093-->  <DISPLAYTITLE><![CDATA[Y]]></DISPLAYTITLE>
+<!--B86607BED54F45B89718C80C61878093--></OBUIAPP_PARAMETER>
+
+<!--B8ECE87414564F1D8B974572A458E98A--><OBUIAPP_PARAMETER>
+<!--B8ECE87414564F1D8B974572A458E98A-->  <OBUIAPP_PARAMETER_ID><![CDATA[B8ECE87414564F1D8B974572A458E98A]]></OBUIAPP_PARAMETER_ID>
+<!--B8ECE87414564F1D8B974572A458E98A-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--B8ECE87414564F1D8B974572A458E98A-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--B8ECE87414564F1D8B974572A458E98A-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--B8ECE87414564F1D8B974572A458E98A-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--B8ECE87414564F1D8B974572A458E98A-->  <NAME><![CDATA[Currency Read Only Logic]]></NAME>
+<!--B8ECE87414564F1D8B974572A458E98A-->  <DESCRIPTION><![CDATA[Parameter used to implement Read Only Logic on Currency param]]></DESCRIPTION>
+<!--B8ECE87414564F1D8B974572A458E98A-->  <HELP><![CDATA[Parameter used to implement Read Only Logic on Currency param]]></HELP>
+<!--B8ECE87414564F1D8B974572A458E98A-->  <SEQNO><![CDATA[1230]]></SEQNO>
+<!--B8ECE87414564F1D8B974572A458E98A-->  <AD_REFERENCE_ID><![CDATA[10]]></AD_REFERENCE_ID>
+<!--B8ECE87414564F1D8B974572A458E98A-->  <COLUMNNAME><![CDATA[c_currency_id_readonly_logic]]></COLUMNNAME>
+<!--B8ECE87414564F1D8B974572A458E98A-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--B8ECE87414564F1D8B974572A458E98A-->  <FIELDLENGTH><![CDATA[0]]></FIELDLENGTH>
+<!--B8ECE87414564F1D8B974572A458E98A-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
+<!--B8ECE87414564F1D8B974572A458E98A-->  <DEFAULTVALUE><![CDATA[OB.getFilterExpression("org.openbravo.advpaymentmngt.filterexpression.AddPaymentReadOnlyLogicsExpression")]]></DEFAULTVALUE>
+<!--B8ECE87414564F1D8B974572A458E98A-->  <AD_ELEMENT_ID><![CDATA[52F85707307D4FC5923B7CA29B8D8A87]]></AD_ELEMENT_ID>
+<!--B8ECE87414564F1D8B974572A458E98A-->  <ISFIXED><![CDATA[N]]></ISFIXED>
+<!--B8ECE87414564F1D8B974572A458E98A-->  <EVALUATEFIXEDVALUE><![CDATA[N]]></EVALUATEFIXEDVALUE>
+<!--B8ECE87414564F1D8B974572A458E98A-->  <OBUIAPP_PROCESS_ID><![CDATA[9BED7889E1034FE68BD85D5D16857320]]></OBUIAPP_PROCESS_ID>
+<!--B8ECE87414564F1D8B974572A458E98A-->  <STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
+<!--B8ECE87414564F1D8B974572A458E98A-->  <DISPLAYLOGIC><![CDATA[false]]></DISPLAYLOGIC>
+<!--B8ECE87414564F1D8B974572A458E98A-->  <DISPLAYEDROWS><![CDATA[5]]></DISPLAYEDROWS>
+<!--B8ECE87414564F1D8B974572A458E98A-->  <DISPLAYTITLE><![CDATA[Y]]></DISPLAYTITLE>
+<!--B8ECE87414564F1D8B974572A458E98A--></OBUIAPP_PARAMETER>
+
 <!--BC5E638E184C4F3AB36B9DA574E0E8BB--><OBUIAPP_PARAMETER>
 <!--BC5E638E184C4F3AB36B9DA574E0E8BB-->  <OBUIAPP_PARAMETER_ID><![CDATA[BC5E638E184C4F3AB36B9DA574E0E8BB]]></OBUIAPP_PARAMETER_ID>
 <!--BC5E638E184C4F3AB36B9DA574E0E8BB-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -940,7 +1252,7 @@
 <!--E2FB4840B65A44D4B3090A7E3C95FD95-->  <EVALUATEFIXEDVALUE><![CDATA[N]]></EVALUATEFIXEDVALUE>
 <!--E2FB4840B65A44D4B3090A7E3C95FD95-->  <OBUIAPP_PROCESS_ID><![CDATA[9BED7889E1034FE68BD85D5D16857320]]></OBUIAPP_PROCESS_ID>
 <!--E2FB4840B65A44D4B3090A7E3C95FD95-->  <STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
-<!--E2FB4840B65A44D4B3090A7E3C95FD95-->  <READONLYLOGIC><![CDATA[@fin_payment_id@!undefined & @fin_paymend_id@!null]]></READONLYLOGIC>
+<!--E2FB4840B65A44D4B3090A7E3C95FD95-->  <READONLYLOGIC><![CDATA[@payment_date_readonly_logic@ == 'Y']]></READONLYLOGIC>
 <!--E2FB4840B65A44D4B3090A7E3C95FD95-->  <DISPLAYEDROWS><![CDATA[5]]></DISPLAYEDROWS>
 <!--E2FB4840B65A44D4B3090A7E3C95FD95-->  <DISPLAYTITLE><![CDATA[N]]></DISPLAYTITLE>
 <!--E2FB4840B65A44D4B3090A7E3C95FD95--></OBUIAPP_PARAMETER>
@@ -994,7 +1306,8 @@
 <!--EA236C2D265845E6A3E2AE5A5A7A7AB2-->  <EVALUATEFIXEDVALUE><![CDATA[N]]></EVALUATEFIXEDVALUE>
 <!--EA236C2D265845E6A3E2AE5A5A7A7AB2-->  <OBUIAPP_PROCESS_ID><![CDATA[9BED7889E1034FE68BD85D5D16857320]]></OBUIAPP_PROCESS_ID>
 <!--EA236C2D265845E6A3E2AE5A5A7A7AB2-->  <STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
-<!--EA236C2D265845E6A3E2AE5A5A7A7AB2-->  <READONLYLOGIC><![CDATA[true]]></READONLYLOGIC>
+<!--EA236C2D265845E6A3E2AE5A5A7A7AB2-->  <READONLYLOGIC><![CDATA[@c_currency_id_readonly_logic@ == 'Y']]></READONLYLOGIC>
+<!--EA236C2D265845E6A3E2AE5A5A7A7AB2-->  <ONCHANGEFUNCTION><![CDATA[OB.APRM.AddPayment.currencyOnChange ]]></ONCHANGEFUNCTION>
 <!--EA236C2D265845E6A3E2AE5A5A7A7AB2-->  <DISPLAYEDROWS><![CDATA[5]]></DISPLAYEDROWS>
 <!--EA236C2D265845E6A3E2AE5A5A7A7AB2-->  <DISPLAYTITLE><![CDATA[N]]></DISPLAYTITLE>
 <!--EA236C2D265845E6A3E2AE5A5A7A7AB2--></OBUIAPP_PARAMETER>
@@ -1021,12 +1334,39 @@
 <!--EB46162236C04DC2812C7095A88FA708-->  <EVALUATEFIXEDVALUE><![CDATA[N]]></EVALUATEFIXEDVALUE>
 <!--EB46162236C04DC2812C7095A88FA708-->  <OBUIAPP_PROCESS_ID><![CDATA[9BED7889E1034FE68BD85D5D16857320]]></OBUIAPP_PROCESS_ID>
 <!--EB46162236C04DC2812C7095A88FA708-->  <STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
-<!--EB46162236C04DC2812C7095A88FA708-->  <READONLYLOGIC><![CDATA[true]]></READONLYLOGIC>
+<!--EB46162236C04DC2812C7095A88FA708-->  <READONLYLOGIC><![CDATA[@received_from_readonly_logic@ == 'Y']]></READONLYLOGIC>
 <!--EB46162236C04DC2812C7095A88FA708-->  <NUMCOLUMN><![CDATA[1]]></NUMCOLUMN>
+<!--EB46162236C04DC2812C7095A88FA708-->  <ONCHANGEFUNCTION><![CDATA[OB.APRM.AddPayment.receivedFromOnChange]]></ONCHANGEFUNCTION>
 <!--EB46162236C04DC2812C7095A88FA708-->  <DISPLAYEDROWS><![CDATA[5]]></DISPLAYEDROWS>
 <!--EB46162236C04DC2812C7095A88FA708-->  <DISPLAYTITLE><![CDATA[N]]></DISPLAYTITLE>
 <!--EB46162236C04DC2812C7095A88FA708--></OBUIAPP_PARAMETER>
 
+<!--F1D97E6ABE584F209CFCEEF4C6FE4A3E--><OBUIAPP_PARAMETER>
+<!--F1D97E6ABE584F209CFCEEF4C6FE4A3E-->  <OBUIAPP_PARAMETER_ID><![CDATA[F1D97E6ABE584F209CFCEEF4C6FE4A3E]]></OBUIAPP_PARAMETER_ID>
+<!--F1D97E6ABE584F209CFCEEF4C6FE4A3E-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--F1D97E6ABE584F209CFCEEF4C6FE4A3E-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--F1D97E6ABE584F209CFCEEF4C6FE4A3E-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--F1D97E6ABE584F209CFCEEF4C6FE4A3E-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--F1D97E6ABE584F209CFCEEF4C6FE4A3E-->  <NAME><![CDATA[Received From Read Only Logic]]></NAME>
+<!--F1D97E6ABE584F209CFCEEF4C6FE4A3E-->  <DESCRIPTION><![CDATA[Parameter used to implement Read Only Logic on Business Partner]]></DESCRIPTION>
+<!--F1D97E6ABE584F209CFCEEF4C6FE4A3E-->  <HELP><![CDATA[Parameter used to implement Read Only Logic on Business Partner]]></HELP>
+<!--F1D97E6ABE584F209CFCEEF4C6FE4A3E-->  <SEQNO><![CDATA[1220]]></SEQNO>
+<!--F1D97E6ABE584F209CFCEEF4C6FE4A3E-->  <AD_REFERENCE_ID><![CDATA[10]]></AD_REFERENCE_ID>
+<!--F1D97E6ABE584F209CFCEEF4C6FE4A3E-->  <COLUMNNAME><![CDATA[received_from_readonly_logic]]></COLUMNNAME>
+<!--F1D97E6ABE584F209CFCEEF4C6FE4A3E-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--F1D97E6ABE584F209CFCEEF4C6FE4A3E-->  <FIELDLENGTH><![CDATA[0]]></FIELDLENGTH>
+<!--F1D97E6ABE584F209CFCEEF4C6FE4A3E-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
+<!--F1D97E6ABE584F209CFCEEF4C6FE4A3E-->  <DEFAULTVALUE><![CDATA[OB.getFilterExpression("org.openbravo.advpaymentmngt.filterexpression.AddPaymentReadOnlyLogicsExpression")]]></DEFAULTVALUE>
+<!--F1D97E6ABE584F209CFCEEF4C6FE4A3E-->  <AD_ELEMENT_ID><![CDATA[6548FAC738E2475F866F132AF5CF5532]]></AD_ELEMENT_ID>
+<!--F1D97E6ABE584F209CFCEEF4C6FE4A3E-->  <ISFIXED><![CDATA[N]]></ISFIXED>
+<!--F1D97E6ABE584F209CFCEEF4C6FE4A3E-->  <EVALUATEFIXEDVALUE><![CDATA[N]]></EVALUATEFIXEDVALUE>
+<!--F1D97E6ABE584F209CFCEEF4C6FE4A3E-->  <OBUIAPP_PROCESS_ID><![CDATA[9BED7889E1034FE68BD85D5D16857320]]></OBUIAPP_PROCESS_ID>
+<!--F1D97E6ABE584F209CFCEEF4C6FE4A3E-->  <STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
+<!--F1D97E6ABE584F209CFCEEF4C6FE4A3E-->  <DISPLAYLOGIC><![CDATA[false]]></DISPLAYLOGIC>
+<!--F1D97E6ABE584F209CFCEEF4C6FE4A3E-->  <DISPLAYEDROWS><![CDATA[5]]></DISPLAYEDROWS>
+<!--F1D97E6ABE584F209CFCEEF4C6FE4A3E-->  <DISPLAYTITLE><![CDATA[Y]]></DISPLAYTITLE>
+<!--F1D97E6ABE584F209CFCEEF4C6FE4A3E--></OBUIAPP_PARAMETER>
+
 <!--F2C546F2C45C4AB58494B2D384E6A8E8--><OBUIAPP_PARAMETER>
 <!--F2C546F2C45C4AB58494B2D384E6A8E8-->  <OBUIAPP_PARAMETER_ID><![CDATA[F2C546F2C45C4AB58494B2D384E6A8E8]]></OBUIAPP_PARAMETER_ID>
 <!--F2C546F2C45C4AB58494B2D384E6A8E8-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -1047,8 +1387,8 @@
 <!--F2C546F2C45C4AB58494B2D384E6A8E8-->  <ISFIXED><![CDATA[N]]></ISFIXED>
 <!--F2C546F2C45C4AB58494B2D384E6A8E8-->  <EVALUATEFIXEDVALUE><![CDATA[N]]></EVALUATEFIXEDVALUE>
 <!--F2C546F2C45C4AB58494B2D384E6A8E8-->  <OBUIAPP_PROCESS_ID><![CDATA[9BED7889E1034FE68BD85D5D16857320]]></OBUIAPP_PROCESS_ID>
-<!--F2C546F2C45C4AB58494B2D384E6A8E8-->  <STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
-<!--F2C546F2C45C4AB58494B2D384E6A8E8-->  <READONLYLOGIC><![CDATA[@fin_payment_id@!undefined & @fin_paymend_id@!null]]></READONLYLOGIC>
+<!--F2C546F2C45C4AB58494B2D384E6A8E8-->  <STARTINNEWLINE><![CDATA[Y]]></STARTINNEWLINE>
+<!--F2C546F2C45C4AB58494B2D384E6A8E8-->  <READONLYLOGIC><![CDATA[@payment_documentno_readonly_logic@ == 'Y']]></READONLYLOGIC>
 <!--F2C546F2C45C4AB58494B2D384E6A8E8-->  <DISPLAYEDROWS><![CDATA[5]]></DISPLAYEDROWS>
 <!--F2C546F2C45C4AB58494B2D384E6A8E8-->  <DISPLAYTITLE><![CDATA[N]]></DISPLAYTITLE>
 <!--F2C546F2C45C4AB58494B2D384E6A8E8--></OBUIAPP_PARAMETER>
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/OBUIAPP_PROCESS.xml	Tue Aug 12 08:32:37 2014 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/OBUIAPP_PROCESS.xml	Tue Aug 12 08:56:49 2014 +0200
@@ -95,7 +95,7 @@
 <!--9BED7889E1034FE68BD85D5D16857320-->  <CLIENTSIDEVALIDATION><![CDATA[OB.APRM.AddPayment.onProcess]]></CLIENTSIDEVALIDATION>
 <!--9BED7889E1034FE68BD85D5D16857320-->  <ISGRIDLEGACY><![CDATA[N]]></ISGRIDLEGACY>
 <!--9BED7889E1034FE68BD85D5D16857320-->  <ON_LOAD_FUNCTION><![CDATA[OB.APRM.AddPayment.onLoad]]></ON_LOAD_FUNCTION>
-<!--9BED7889E1034FE68BD85D5D16857320-->  <ISCANADDRECORDSTOSELECTOR><![CDATA[N]]></ISCANADDRECORDSTOSELECTOR>
+<!--9BED7889E1034FE68BD85D5D16857320-->  <ISCANADDRECORDSTOSELECTOR><![CDATA[Y]]></ISCANADDRECORDSTOSELECTOR>
 <!--9BED7889E1034FE68BD85D5D16857320--></OBUIAPP_PROCESS>
 
 </data>
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/OBUISEL_SELECTOR.xml	Tue Aug 12 08:32:37 2014 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/OBUISEL_SELECTOR.xml	Tue Aug 12 08:56:49 2014 +0200
@@ -8,7 +8,7 @@
 <!--41B3A5EA61AB46FBAF4567E3755BA190-->  <NAME><![CDATA[APRM_ActionDocumentSelector]]></NAME>
 <!--41B3A5EA61AB46FBAF4567E3755BA190-->  <AD_REFERENCE_ID><![CDATA[23AB7A87FF4E462197629E461B9F033C]]></AD_REFERENCE_ID>
 <!--41B3A5EA61AB46FBAF4567E3755BA190-->  <AD_TABLE_ID><![CDATA[104]]></AD_TABLE_ID>
-<!--41B3A5EA61AB46FBAF4567E3755BA190-->  <WHERECLAUSE><![CDATA[e.reference.id = '7D750D39954C4F7A81B35230676D5D9F' and (( @issotrx@ = 'true' and (((select automaticDeposit from FinancialMgmtFinAccPaymentMethod where paymentMethod.id = @fin_paymentmethod_id@ and account.id = @fin_financial_account_id@) = false and e.searchKey in ('PRP', 'PRD')) or ((select automaticDeposit from FinancialMgmtFinAccPaymentMethod where paymentMethod.id = @fin_paymentmethod_id@ and account.id = @fin_financial_account_id@) = true and e.searchKey in ('PRD')))) or (@issotrx@ = 'false' and (((select automaticWithdrawn from FinancialMgmtFinAccPaymentMethod where paymentMethod.id = @fin_paymentmethod_id@ and account.id = @fin_financial_account_id@) = false and e.searchKey in ('PPP', 'PPW')) or ((select automaticWithdrawn from FinancialMgmtFinAccPaymentMethod where paymentMethod.id = @fin_paymentmethod_id@ and account.id = @fin_financial_account_id@) = true and e.searchKey in ('PPW')))))]]></WHERECLAUSE>
+<!--41B3A5EA61AB46FBAF4567E3755BA190-->  <WHERECLAUSE><![CDATA[e.reference.id = '7D750D39954C4F7A81B35230676D5D9F' and (( @issotrx@ = 'true' and (((select automaticDeposit from FinancialMgmtFinAccPaymentMethod where paymentMethod.id = @fin_paymentmethod_id@ and account.id = @fin_financial_account_id@) = false and e.searchKey in ('PRP', 'PRD') and @inpwindowId@ <> '94EAA455D2644E04AB25D93BE5157B6D') or ((select automaticDeposit from FinancialMgmtFinAccPaymentMethod where paymentMethod.id = @fin_paymentmethod_id@ and account.id = @fin_financial_account_id@) = true and e.searchKey in ('PRD') and @inpwindowId@ <> '94EAA455D2644E04AB25D93BE5157B6D') or (@inpwindowId@ = '94EAA455D2644E04AB25D93BE5157B6D' and e.searchKey in ('PRP')))) or (@issotrx@ = 'false' and (((select automaticWithdrawn from FinancialMgmtFinAccPaymentMethod where paymentMethod.id = @fin_paymentmethod_id@ and account.id = @fin_financial_account_id@) = false and e.searchKey in ('PPP', 'PPW') and @inpwindowId@ <> '94EAA455D2644E04AB25D93BE5157B6D') or ((select automaticWithdrawn from FinancialMgmtFinAccPaymentMethod where paymentMethod.id = @fin_paymentmethod_id@ and account.id = @fin_financial_account_id@) = true and e.searchKey in ('PPW') and @inpwindowId@ <> '94EAA455D2644E04AB25D93BE5157B6D') or (@inpwindowId@ = '94EAA455D2644E04AB25D93BE5157B6D' and e.searchKey in ('PPP')))))]]></WHERECLAUSE>
 <!--41B3A5EA61AB46FBAF4567E3755BA190-->  <OBCLKER_TEMPLATE_ID><![CDATA[9314DE8599AD44E7BFC4CC50699042AB]]></OBCLKER_TEMPLATE_ID>
 <!--41B3A5EA61AB46FBAF4567E3755BA190-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--41B3A5EA61AB46FBAF4567E3755BA190-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[startsWith]]></SUGGESTIONTEXTMATCHSTYLE>
@@ -170,7 +170,7 @@
 <!--BA4FDCB15ACB47AD81BE3985E13032EE-->  <NAME><![CDATA[Payment Method]]></NAME>
 <!--BA4FDCB15ACB47AD81BE3985E13032EE-->  <AD_REFERENCE_ID><![CDATA[E664E415582A483DBBC91DEF256FB9E6]]></AD_REFERENCE_ID>
 <!--BA4FDCB15ACB47AD81BE3985E13032EE-->  <AD_TABLE_ID><![CDATA[0B44DF7A2A854784BF34AD49C58647D7]]></AD_TABLE_ID>
-<!--BA4FDCB15ACB47AD81BE3985E13032EE-->  <WHERECLAUSE><![CDATA[exists (select 1 from FinancialMgmtFinAccPaymentMethod fpm where fpm.paymentMethod = e and case when @inpissotrx@ = 'true' then fpm.payinAllow else fpm.payoutAllow end = true)]]></WHERECLAUSE>
+<!--BA4FDCB15ACB47AD81BE3985E13032EE-->  <WHERECLAUSE><![CDATA[exists (select 1 from FinancialMgmtFinAccPaymentMethod fpm where fpm.paymentMethod = e  and  (case when @issotrx@ = 'true' then fpm.payinAllow else fpm.payoutAllow end) = true   and fpm.account.id =  @fin_financial_account_id@ or @inpwindowId@ <> '94EAA455D2644E04AB25D93BE5157B6D')]]></WHERECLAUSE>
 <!--BA4FDCB15ACB47AD81BE3985E13032EE-->  <OBCLKER_TEMPLATE_ID><![CDATA[9314DE8599AD44E7BFC4CC50699042AB]]></OBCLKER_TEMPLATE_ID>
 <!--BA4FDCB15ACB47AD81BE3985E13032EE-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--BA4FDCB15ACB47AD81BE3985E13032EE-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[substring]]></SUGGESTIONTEXTMATCHSTYLE>
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/OBUISEL_SELECTOR_FIELD.xml	Tue Aug 12 08:32:37 2014 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/OBUISEL_SELECTOR_FIELD.xml	Tue Aug 12 08:56:49 2014 +0200
@@ -151,7 +151,7 @@
 <!--583F20A11FD34C65BEC1F15D5DBF70BA-->  <SORTNO><![CDATA[5]]></SORTNO>
 <!--583F20A11FD34C65BEC1F15D5DBF70BA-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--583F20A11FD34C65BEC1F15D5DBF70BA-->  <ISOUTFIELD><![CDATA[N]]></ISOUTFIELD>
-<!--583F20A11FD34C65BEC1F15D5DBF70BA-->  <DEFAULT_EXPRESSION><![CDATA[if (OB.isSalesTransaction() == false) { 'true' } else {''}]]></DEFAULT_EXPRESSION>
+<!--583F20A11FD34C65BEC1F15D5DBF70BA-->  <DEFAULT_EXPRESSION><![CDATA[OB.getFilterExpression('org.openbravo.advpaymentmngt.filterexpression.BusinessPartnerVendorFilterExpression')]]></DEFAULT_EXPRESSION>
 <!--583F20A11FD34C65BEC1F15D5DBF70BA-->  <SHOWINPICKLIST><![CDATA[N]]></SHOWINPICKLIST>
 <!--583F20A11FD34C65BEC1F15D5DBF70BA--></OBUISEL_SELECTOR_FIELD>
 
@@ -261,7 +261,7 @@
 <!--B67B839A695A44499277CF0D09FAC54F-->  <SORTNO><![CDATA[4]]></SORTNO>
 <!--B67B839A695A44499277CF0D09FAC54F-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--B67B839A695A44499277CF0D09FAC54F-->  <ISOUTFIELD><![CDATA[N]]></ISOUTFIELD>
-<!--B67B839A695A44499277CF0D09FAC54F-->  <DEFAULT_EXPRESSION><![CDATA[if (OB.isSalesTransaction() == true) { 'true' } else {''}]]></DEFAULT_EXPRESSION>
+<!--B67B839A695A44499277CF0D09FAC54F-->  <DEFAULT_EXPRESSION><![CDATA[OB.getFilterExpression('org.openbravo.advpaymentmngt.filterexpression.BusinessPartnerCustomerFilterExpression')]]></DEFAULT_EXPRESSION>
 <!--B67B839A695A44499277CF0D09FAC54F-->  <SHOWINPICKLIST><![CDATA[N]]></SHOWINPICKLIST>
 <!--B67B839A695A44499277CF0D09FAC54F--></OBUISEL_SELECTOR_FIELD>
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/org/openbravo/advpaymentmngt/modulescript/UpdateTransactionTypeTransactionTab.java	Tue Aug 12 08:56:49 2014 +0200
@@ -0,0 +1,23 @@
+package org.openbravo.advpaymentmngt.modulescript;
+
+import org.openbravo.database.ConnectionProvider;
+import org.openbravo.modulescript.ModuleScript;
+import java.sql.PreparedStatement;
+
+public class UpdateTransactionTypeTransactionTab extends ModuleScript {
+ 
+  public void execute() {
+    try {
+      ConnectionProvider cp = getConnectionProvider();
+      boolean isUpdated= UpdateTransactionTypeTransactionTabData.isExecuted(cp);
+      if (!isUpdated){
+        UpdateTransactionTypeTransactionTabData.updateToBankFee(cp);
+        UpdateTransactionTypeTransactionTabData.updateToBPDeposit(cp);
+        UpdateTransactionTypeTransactionTabData.updateToBPWithdrawal(cp);
+        UpdateTransactionTypeTransactionTabData.createPreference(cp);
+      }
+    } catch (Exception e) {
+      handleError(e);
+    }   
+  }
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/org/openbravo/advpaymentmngt/modulescript/UpdateTransactionTypeTransactionTab_data.xsql	Tue Aug 12 08:56:49 2014 +0200
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ *************************************************************************
+ * The contents of this file are subject to the Openbravo  Public  License
+ * Version  1.0  (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) 2014 Openbravo SLU
+ * All Rights Reserved.
+ * Contributor(s):  ______________________________________.
+ *************************************************************************
+-->
+<SqlClass name="UpdateTransactionTypeTransactionTabData" package="org.openbravo.advpaymentmngt.modulescript">
+  <SqlClassComment></SqlClassComment>
+  <SqlMethod name="select" type="preparedStatement" return="multiple">
+    <SqlMethodComment></SqlMethodComment>
+    <Sql>
+      <![CDATA[
+        SELECT 1 as name from dual
+      ]]>
+    </Sql>
+  </SqlMethod>
+  <SqlMethod name="updateToBankFee" type="preparedStatement" return="rowcount">
+    <SqlMethodComment></SqlMethodComment>
+    <Sql>
+      <![CDATA[
+        UPDATE FIN_FINACC_TRANSACTION SET TRXTYPE='BF' WHERE FIN_PAYMENT_ID IS NULL AND C_GLITEM_ID IS NULL
+      ]]>
+    </Sql>
+  </SqlMethod>
+  <SqlMethod name="updateToBPDeposit" type="preparedStatement" return="rowcount">
+    <SqlMethodComment></SqlMethodComment>
+    <Sql>
+      <![CDATA[
+        UPDATE FIN_FINACC_TRANSACTION SET TRXTYPE='BPW' WHERE PAYMENTAMT > 0 AND (FIN_PAYMENT_ID IS NOT NULL OR C_GLITEM_ID IS NOT NULL)
+      ]]>
+    </Sql>
+  </SqlMethod>
+  <SqlMethod name="updateToBPWithdrawal" type="preparedStatement" return="rowcount">
+    <SqlMethodComment></SqlMethodComment>
+    <Sql>
+      <![CDATA[
+        UPDATE FIN_FINACC_TRANSACTION SET TRXTYPE='BPD' WHERE DEPOSITAMT > 0 AND (FIN_PAYMENT_ID IS NOT NULL OR C_GLITEM_ID IS NOT NULL) 
+      ]]>
+    </Sql>
+   </SqlMethod>
+    <SqlMethod name="isExecuted" type="preparedStatement" return="boolean">
+    <SqlMethodComment></SqlMethodComment>
+    <Sql>
+      <![CDATA[
+        SELECT count(*) as exist
+        FROM DUAL
+        WHERE EXISTS (SELECT 1 FROM ad_preference
+                      WHERE attribute = 'UpdatedTransactionType')
+      ]]>
+    </Sql>
+  </SqlMethod>
+   <SqlMethod name="createPreference" type="preparedStatement" return="rowcount">
+      <SqlMethodComment></SqlMethodComment>
+       <Sql> 
+       <![CDATA[ 
+           INSERT INTO ad_preference (
+           ad_preference_id, ad_client_id, ad_org_id, isactive,
+           createdby, created, updatedby, updated,attribute
+           ) VALUES (
+           get_uuid(), '0', '0', 'Y', '0', NOW(), '0', NOW(),'UpdatedTransactionType')
+         ]]>
+        </Sql>
+   </SqlMethod>
+</SqlClass>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/src/org/openbravo/advpaymentmngt/modulescript/UpdateTransactionTypeTransactionTabData.java	Tue Aug 12 08:56:49 2014 +0200
@@ -0,0 +1,237 @@
+//Sqlc generated V1.O00-1
+package org.openbravo.advpaymentmngt.modulescript;
+
+import java.sql.*;
+
+import org.apache.log4j.Logger;
+
+import javax.servlet.ServletException;
+
+import org.openbravo.data.FieldProvider;
+import org.openbravo.database.ConnectionProvider;
+import org.openbravo.data.UtilSql;
+import java.util.*;
+
+class UpdateTransactionTypeTransactionTabData implements FieldProvider {
+static Logger log4j = Logger.getLogger(UpdateTransactionTypeTransactionTabData.class);
+  private String InitRecordNumber="0";
+  public String name;
+
+  public String getInitRecordNumber() {
+    return InitRecordNumber;
+  }
+
+  public String getField(String fieldName) {
+    if (fieldName.equalsIgnoreCase("name"))
+      return name;
+   else {
+     log4j.debug("Field does not exist: " + fieldName);
+     return null;
+   }
+ }
+
+  public static UpdateTransactionTypeTransactionTabData[] select(ConnectionProvider connectionProvider)    throws ServletException {
+    return select(connectionProvider, 0, 0);
+  }
+
+  public static UpdateTransactionTypeTransactionTabData[] select(ConnectionProvider connectionProvider, int firstRegister, int numberRegisters)    throws ServletException {
+    String strSql = "";
+    strSql = strSql + 
+      "        SELECT 1 as name from dual";
+
+    ResultSet result;
+    Vector<java.lang.Object> vector = new Vector<java.lang.Object>(0);
+    PreparedStatement st = null;
+
+    try {
+    st = connectionProvider.getPreparedStatement(strSql);
+
+      result = st.executeQuery();
+      long countRecord = 0;
+      long countRecordSkip = 1;
+      boolean continueResult = true;
+      while(countRecordSkip < firstRegister && continueResult) {
+        continueResult = result.next();
+        countRecordSkip++;
+      }
+      while(continueResult && result.next()) {
+        countRecord++;
+        UpdateTransactionTypeTransactionTabData objectUpdateTransactionTypeTransactionTabData = new UpdateTransactionTypeTransactionTabData();
+        objectUpdateTransactionTypeTransactionTabData.name = UtilSql.getValue(result, "name");
+        objectUpdateTransactionTypeTransactionTabData.InitRecordNumber = Integer.toString(firstRegister);
+        vector.addElement(objectUpdateTransactionTypeTransactionTabData);
+        if (countRecord >= numberRegisters && numberRegisters != 0) {
+          continueResult = false;
+        }
+      }
+      result.close();
+    } catch(SQLException e){
+      log4j.error("SQL error in query: " + strSql + "Exception:"+ e);
+      throw new ServletException("@CODE=" + Integer.toString(e.getErrorCode()) + "@" + e.getMessage());
+    } catch(Exception ex){
+      log4j.error("Exception in query: " + strSql + "Exception:"+ ex);
+      throw new ServletException("@CODE=@" + ex.getMessage());
+    } finally {
+      try {
+        connectionProvider.releasePreparedStatement(st);
+      } catch(Exception ignore){
+        ignore.printStackTrace();
+      }
+    }
+    UpdateTransactionTypeTransactionTabData objectUpdateTransactionTypeTransactionTabData[] = new UpdateTransactionTypeTransactionTabData[vector.size()];
+    vector.copyInto(objectUpdateTransactionTypeTransactionTabData);
+    return(objectUpdateTransactionTypeTransactionTabData);
+  }
+
+  public static int updateToBankFee(ConnectionProvider connectionProvider)    throws ServletException {
+    String strSql = "";
+    strSql = strSql + 
+      "        UPDATE FIN_FINACC_TRANSACTION SET TRXTYPE='BF' WHERE FIN_PAYMENT_ID IS NULL AND C_GLITEM_ID IS NULL";
+
+    int updateCount = 0;
+    PreparedStatement st = null;
+
+    try {
+    st = connectionProvider.getPreparedStatement(strSql);
+
+      updateCount = st.executeUpdate();
+    } catch(SQLException e){
+      log4j.error("SQL error in query: " + strSql + "Exception:"+ e);
+      throw new ServletException("@CODE=" + Integer.toString(e.getErrorCode()) + "@" + e.getMessage());
+    } catch(Exception ex){
+      log4j.error("Exception in query: " + strSql + "Exception:"+ ex);
+      throw new ServletException("@CODE=@" + ex.getMessage());
+    } finally {
+      try {
+        connectionProvider.releasePreparedStatement(st);
+      } catch(Exception ignore){
+        ignore.printStackTrace();
+      }
+    }
+    return(updateCount);
+  }
+
+  public static int updateToBPDeposit(ConnectionProvider connectionProvider)    throws ServletException {
+    String strSql = "";
+    strSql = strSql + 
+      "        UPDATE FIN_FINACC_TRANSACTION SET TRXTYPE='BPW' WHERE PAYMENTAMT > 0 AND (FIN_PAYMENT_ID IS NOT NULL OR C_GLITEM_ID IS NOT NULL)";
+
+    int updateCount = 0;
+    PreparedStatement st = null;
+
+    try {
+    st = connectionProvider.getPreparedStatement(strSql);
+
+      updateCount = st.executeUpdate();
+    } catch(SQLException e){
+      log4j.error("SQL error in query: " + strSql + "Exception:"+ e);
+      throw new ServletException("@CODE=" + Integer.toString(e.getErrorCode()) + "@" + e.getMessage());
+    } catch(Exception ex){
+      log4j.error("Exception in query: " + strSql + "Exception:"+ ex);
+      throw new ServletException("@CODE=@" + ex.getMessage());
+    } finally {
+      try {
+        connectionProvider.releasePreparedStatement(st);
+      } catch(Exception ignore){
+        ignore.printStackTrace();
+      }
+    }
+    return(updateCount);
+  }
+
+  public static int updateToBPWithdrawal(ConnectionProvider connectionProvider)    throws ServletException {
+    String strSql = "";
+    strSql = strSql + 
+      "        UPDATE FIN_FINACC_TRANSACTION SET TRXTYPE='BPD' WHERE DEPOSITAMT > 0 AND (FIN_PAYMENT_ID IS NOT NULL OR C_GLITEM_ID IS NOT NULL) ";
+
+    int updateCount = 0;
+    PreparedStatement st = null;
+
+    try {
+    st = connectionProvider.getPreparedStatement(strSql);
+
+      updateCount = st.executeUpdate();
+    } catch(SQLException e){
+      log4j.error("SQL error in query: " + strSql + "Exception:"+ e);
+      throw new ServletException("@CODE=" + Integer.toString(e.getErrorCode()) + "@" + e.getMessage());
+    } catch(Exception ex){
+      log4j.error("Exception in query: " + strSql + "Exception:"+ ex);
+      throw new ServletException("@CODE=@" + ex.getMessage());
+    } finally {
+      try {
+        connectionProvider.releasePreparedStatement(st);
+      } catch(Exception ignore){
+        ignore.printStackTrace();
+      }
+    }
+    return(updateCount);
+  }
+
+  public static boolean isExecuted(ConnectionProvider connectionProvider)    throws ServletException {
+    String strSql = "";
+    strSql = strSql + 
+      "        SELECT count(*) as exist" +
+      "        FROM DUAL" +
+      "        WHERE EXISTS (SELECT 1 FROM ad_preference" +
+      "                      WHERE attribute = 'UpdatedTransactionType')";
+
+    ResultSet result;
+    boolean boolReturn = false;
+    PreparedStatement st = null;
+
+    try {
+    st = connectionProvider.getPreparedStatement(strSql);
+
+      result = st.executeQuery();
+      if(result.next()) {
+        boolReturn = !UtilSql.getValue(result, "exist").equals("0");
+      }
+      result.close();
+    } catch(SQLException e){
+      log4j.error("SQL error in query: " + strSql + "Exception:"+ e);
+      throw new ServletException("@CODE=" + Integer.toString(e.getErrorCode()) + "@" + e.getMessage());
+    } catch(Exception ex){
+      log4j.error("Exception in query: " + strSql + "Exception:"+ ex);
+      throw new ServletException("@CODE=@" + ex.getMessage());
+    } finally {
+      try {
+        connectionProvider.releasePreparedStatement(st);
+      } catch(Exception ignore){
+        ignore.printStackTrace();
+      }
+    }
+    return(boolReturn);
+  }
+
+  public static int createPreference(ConnectionProvider connectionProvider)    throws ServletException {
+    String strSql = "";
+    strSql = strSql + 
+      "           INSERT INTO ad_preference (" +
+      "           ad_preference_id, ad_client_id, ad_org_id, isactive," +
+      "           createdby, created, updatedby, updated,attribute" +
+      "           ) VALUES (" +
+      "           get_uuid(), '0', '0', 'Y', '0', NOW(), '0', NOW(),'UpdatedTransactionType')";
+
+    int updateCount = 0;
+    PreparedStatement st = null;
+
+    try {
+    st = connectionProvider.getPreparedStatement(strSql);
+
+      updateCount = st.executeUpdate();
+    } catch(SQLException e){
+      log4j.error("SQL error in query: " + strSql + "Exception:"+ e);
+      throw new ServletException("@CODE=" + Integer.toString(e.getErrorCode()) + "@" + e.getMessage());
+    } catch(Exception ex){
+      log4j.error("Exception in query: " + strSql + "Exception:"+ ex);
+      throw new ServletException("@CODE=@" + ex.getMessage());
+    } finally {
+      try {
+        connectionProvider.releasePreparedStatement(st);
+      } catch(Exception ignore){
+        ignore.printStackTrace();
+      }
+    }
+    return(updateCount);
+  }
+}
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/actionHandler/AddPaymentActionHandler.java	Tue Aug 12 08:32:37 2014 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/actionHandler/AddPaymentActionHandler.java	Tue Aug 12 08:56:49 2014 +0200
@@ -178,6 +178,16 @@
         errorMessage.put("title", message.getTitle());
         errorMessage.put("text", message.getMessage());
         jsonResponse.put("message", errorMessage);
+        jsonResponse.put("refreshParent", false);
+        JSONObject setSelectorValueFromRecord = new JSONObject();
+        JSONObject record = new JSONObject();
+        JSONObject responseActions = new JSONObject();
+        record.put("value", payment.getId());
+        record.put("map", payment.getIdentifier());
+        setSelectorValueFromRecord.put("record", record);
+        responseActions.put("setSelectorValueFromRecord", setSelectorValueFromRecord);
+        jsonResponse.put("responseActions", responseActions);
+
       }
 
     } catch (Exception e) {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/actionHandler/AddPaymentDisplayLogicActionHandler.java	Tue Aug 12 08:56:49 2014 +0200
@@ -0,0 +1,114 @@
+/*
+ *************************************************************************
+ * 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) 2014 Openbravo SLU
+ * All Rights Reserved.
+ * Contributor(s):  ______________________________________.
+ ************************************************************************
+ */
+
+package org.openbravo.advpaymentmngt.actionHandler;
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Map.Entry;
+
+import javax.servlet.http.HttpSession;
+
+import org.codehaus.jettison.json.JSONArray;
+import org.codehaus.jettison.json.JSONObject;
+import org.openbravo.client.application.Parameter;
+import org.openbravo.client.application.ParameterUtils;
+import org.openbravo.client.kernel.BaseActionHandler;
+import org.openbravo.client.kernel.KernelConstants;
+import org.openbravo.dal.core.OBContext;
+import org.openbravo.dal.service.OBDal;
+import org.openbravo.erpCommon.utility.OBMessageUtils;
+import org.openbravo.service.db.DbUtility;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class AddPaymentDisplayLogicActionHandler extends BaseActionHandler {
+  private static Logger log = LoggerFactory.getLogger(AddPaymentDisplayLogicActionHandler.class);
+
+  @Override
+  protected final JSONObject execute(Map<String, Object> parameters, String data) {
+    JSONObject result = new JSONObject();
+    JSONObject values = new JSONObject();
+    JSONObject errorMessage = new JSONObject();
+    OBContext.setAdminMode(true);
+    try {
+      final JSONObject jsonData = new JSONObject(data);
+      final JSONArray affectedParams = jsonData.getJSONArray("affectedParams");
+      final JSONObject params = jsonData.getJSONObject("params");
+
+      Iterator<String> keys = params.keys();
+      while (keys.hasNext()) {
+        String key = keys.next();
+        Object value = params.get(key);
+        parameters.put(key, value);
+      }
+
+      for (int i = 0; i < affectedParams.length(); i++) {
+        Parameter param = OBDal.getInstance().get(Parameter.class, affectedParams.getString(i));
+        Object defaultValue = null;
+        Map<String, String> requestMap = fixRequestMap(parameters);
+        requestMap.put("currentParam", param.getDBColumnName());
+        defaultValue = ParameterUtils.getJSExpressionResult(requestMap,
+            (HttpSession) parameters.get(KernelConstants.HTTP_SESSION), param.getDefaultValue());
+        values.put(param.getDBColumnName(), defaultValue);
+      }
+      result.put("values", values);
+
+      String message = "Ok";
+      errorMessage.put("severity", "success");
+      errorMessage.put("text", message);
+      result.put("message", errorMessage);
+    } catch (Exception e) {
+      OBDal.getInstance().rollbackAndClose();
+      log.error(e.getMessage(), e);
+      try {
+        Throwable ex = DbUtility.getUnderlyingSQLException(e);
+        String message = OBMessageUtils.translateError(ex.getMessage()).getMessage();
+        errorMessage = new JSONObject();
+        errorMessage.put("severity", "error");
+        errorMessage.put("title", "Error");
+        errorMessage.put("text", message);
+        result.put("message", errorMessage);
+      } catch (Exception e2) {
+        log.error(e.getMessage(), e2);
+        // do nothing, give up
+      }
+    } finally {
+      OBContext.restorePreviousMode();
+    }
+    return result;
+  }
+
+  /*
+   * The request map is <String, Object> because includes the HTTP request and HTTP session, is not
+   * required to handle process parameters
+   */
+  protected Map<String, String> fixRequestMap(Map<String, Object> parameters) {
+    final Map<String, String> retval = new HashMap<String, String>();
+    for (Entry<String, Object> entries : parameters.entrySet()) {
+      if (entries.getKey().equals(KernelConstants.HTTP_REQUEST)
+          || entries.getKey().equals(KernelConstants.HTTP_SESSION)) {
+        continue;
+      }
+      retval.put(entries.getKey(), entries.getValue().toString());
+    }
+    return retval;
+  }
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/actionHandler/AddPaymentReloadLabelsActionHandler.java	Tue Aug 12 08:56:49 2014 +0200
@@ -0,0 +1,124 @@
+/*
+ *************************************************************************
+ * 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) 2014 Openbravo SLU
+ * All Rights Reserved.
+ * Contributor(s):  ______________________________________.
+ ************************************************************************
+ */
+
+package org.openbravo.advpaymentmngt.actionHandler;
+
+import java.util.List;
+import java.util.Map;
+
+import org.codehaus.jettison.json.JSONObject;
+import org.hibernate.criterion.Restrictions;
+import org.openbravo.client.application.Parameter;
+import org.openbravo.client.kernel.BaseActionHandler;
+import org.openbravo.dal.core.OBContext;
+import org.openbravo.dal.service.OBCriteria;
+import org.openbravo.dal.service.OBDal;
+import org.openbravo.erpCommon.utility.OBMessageUtils;
+import org.openbravo.model.ad.system.Language;
+import org.openbravo.model.ad.ui.ElementTrl;
+import org.openbravo.service.db.DbUtility;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class AddPaymentReloadLabelsActionHandler extends BaseActionHandler {
+  private static Logger log = LoggerFactory.getLogger(AddPaymentReloadLabelsActionHandler.class);
+
+  @Override
+  protected JSONObject execute(Map<String, Object> parameters, String data) {
+    JSONObject result = new JSONObject();
+    JSONObject values = new JSONObject();
+    JSONObject errorMessage = new JSONObject();
+    OBContext.setAdminMode(true);
+    try {
+      final String strBusinessPartner = (String) parameters.get("businessPartner");
+      final String strFinancialAccount = (String) parameters.get("financialAccount");
+      final String strIssotrx = (String) parameters.get("issotrx");
+      boolean issotrx = "true".equals(strIssotrx) ? true : false;
+      final Parameter businessPartner = OBDal.getInstance()
+          .get(Parameter.class, strBusinessPartner);
+      final Parameter financialAccount = OBDal.getInstance().get(Parameter.class,
+          strFinancialAccount);
+      final Language language = OBContext.getOBContext().getLanguage();
+
+      final OBCriteria<ElementTrl> obcBP = OBDal.getInstance().createCriteria(ElementTrl.class);
+      obcBP.add(Restrictions.eq(ElementTrl.PROPERTY_ID, businessPartner.getApplicationElement()
+          .getId()));
+      obcBP.add(Restrictions.eq(ElementTrl.PROPERTY_LANGUAGE, language));
+      final List<ElementTrl> obcListBP = obcBP.list();
+      if (obcListBP.size() > 0) {
+        if (issotrx) {
+          values.put("businessPartner", obcListBP.get(0).getName());
+        } else {
+          values.put("businessPartner", obcListBP.get(0).getPurchaseOrderName());
+        }
+      } else {
+        if (issotrx) {
+          values.put("businessPartner", businessPartner.getApplicationElement().getName());
+        } else {
+          values.put("businessPartner", businessPartner.getApplicationElement()
+              .getPurchaseOrderName());
+        }
+      }
+
+      final OBCriteria<ElementTrl> obcFA = OBDal.getInstance().createCriteria(ElementTrl.class);
+      obcFA.add(Restrictions.eq(ElementTrl.PROPERTY_ID, financialAccount.getApplicationElement()
+          .getId()));
+      obcFA.add(Restrictions.eq(ElementTrl.PROPERTY_LANGUAGE, language));
+      final List<ElementTrl> obcListFA = obcFA.list();
+      if (obcListFA.size() > 0) {
+        if (issotrx) {
+          values.put("financialAccount", obcListFA.get(0).getName());
+        } else {
+          values.put("financialAccount", obcListFA.get(0).getPurchaseOrderName());
+        }
+      } else {
+        if (issotrx) {
+          values.put("financialAccount", financialAccount.getApplicationElement().getName());
+        } else {
+          values.put("financialAccount", financialAccount.getApplicationElement()
+              .getPurchaseOrderName());
+        }
+      }
+
+      String message = "Ok";
+      errorMessage.put("severity", "success");
+      errorMessage.put("text", message);
+      result.put("values", values);
+      result.put("message", errorMessage);
+    } catch (Exception e) {
+      OBDal.getInstance().rollbackAndClose();
+      log.error(e.getMessage(), e);
+      try {
+        Throwable ex = DbUtility.getUnderlyingSQLException(e);
+        String message = OBMessageUtils.translateError(ex.getMessage()).getMessage();
+        errorMessage = new JSONObject();
+        errorMessage.put("severity", "error");
+        errorMessage.put("title", "Error");
+        errorMessage.put("text", message);
+        result.put("message", errorMessage);
+      } catch (Exception e2) {
+        log.error(e.getMessage(), e2);
+        // do nothing, give up
+      }
+    } finally {
+      OBContext.restorePreviousMode();
+    }
+    return result;
+  }
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/actionHandler/ReceivedFromPaymentMethodActionHandler.java	Tue Aug 12 08:56:49 2014 +0200
@@ -0,0 +1,73 @@
+/*
+ *************************************************************************
+ * 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) 2014 Openbravo SLU
+ * All Rights Reserved.
+ * Contributor(s):  ______________________________________.
+ ************************************************************************
+ */
+
+package org.openbravo.advpaymentmngt.actionHandler;
+
+import java.util.Map;
+
+import org.apache.commons.lang.StringUtils;
+import org.codehaus.jettison.json.JSONObject;
+import org.openbravo.base.exception.OBException;
+import org.openbravo.client.kernel.BaseActionHandler;
+import org.openbravo.dal.service.OBDal;
+import org.openbravo.model.common.businesspartner.BusinessPartner;
+import org.openbravo.model.financialmgmt.payment.FIN_FinancialAccount;
+import org.openbravo.model.financialmgmt.payment.FIN_PaymentMethod;
+import org.openbravo.model.financialmgmt.payment.FinAccPaymentMethod;
+
+public class ReceivedFromPaymentMethodActionHandler extends BaseActionHandler {
+
+  @Override
+  protected JSONObject execute(Map<String, Object> parameters, String data) {
+    try {
+      final JSONObject jsonData = new JSONObject(data);
+      JSONObject result = new JSONObject();
+      FIN_FinancialAccount financialAccount = OBDal.getInstance().get(FIN_FinancialAccount.class,
+          jsonData.getString("financialAccount"));
+      boolean contains = false;
+      final String receivedFrom = jsonData.getString("receivedFrom");
+      String paymentMethod = null;
+      if (StringUtils.isNotEmpty(receivedFrom)) {
+        BusinessPartner businessPartner = OBDal.getInstance().get(BusinessPartner.class,
+            receivedFrom);
+        if (jsonData.getString("isSOTrx").toString().equals("true")) {
+          paymentMethod = businessPartner.getPaymentMethod().getId();
+        } else {
+          paymentMethod = businessPartner.getPOPaymentMethod().getId();
+        }
+      }
+      for (FinAccPaymentMethod finAccPaymentMethod : financialAccount
+          .getFinancialMgmtFinAccPaymentMethodList()) {
+        if (finAccPaymentMethod.getPaymentMethod().equals(
+            OBDal.getInstance().get(FIN_PaymentMethod.class, paymentMethod))) {
+          contains = true;
+        } else {
+          contains = false;
+        }
+      }
+      if (!contains) {
+        paymentMethod = "";
+      }
+      result.put("paymentMethodId", paymentMethod);
+      return result;
+    } catch (Exception e) {
+      throw new OBException(e);
+    }
+  }
+}
\ No newline at end of file
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_reports/ReportReconciliation.java	Tue Aug 12 08:32:37 2014 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_reports/ReportReconciliation.java	Tue Aug 12 08:56:49 2014 +0200
@@ -190,6 +190,7 @@
       OBCriteria<FIN_FinaccTransaction> obcTrans = OBDal.getInstance().createCriteria(
           FIN_FinaccTransaction.class);
       obcTrans.add(Restrictions.eq(FIN_FinaccTransaction.PROPERTY_ACCOUNT, recon.getAccount()));
+      obcTrans.add(Restrictions.eq(FIN_FinaccTransaction.PROPERTY_PROCESSED, true));
       obcTrans.add(Restrictions.le(FIN_FinaccTransaction.PROPERTY_TRANSACTIONDATE,
           recon.getEndingDate()));
       List<FIN_Reconciliation> afterReconciliations = MatchTransactionDao
@@ -298,6 +299,7 @@
       OBCriteria<FIN_FinaccTransaction> obcTrans = OBDal.getInstance().createCriteria(
           FIN_FinaccTransaction.class);
       obcTrans.add(Restrictions.eq(FIN_FinaccTransaction.PROPERTY_ACCOUNT, recon.getAccount()));
+      obcTrans.add(Restrictions.eq(FIN_FinaccTransaction.PROPERTY_PROCESSED, true));
       obcTrans.add(Restrictions.gt(FIN_FinaccTransaction.PROPERTY_TRANSACTIONDATE,
           recon.getEndingDate()));
       ProjectionList projections = Projections.projectionList();
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/dao/AdvPaymentMngtDao.java	Tue Aug 12 08:32:37 2014 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/dao/AdvPaymentMngtDao.java	Tue Aug 12 08:56:49 2014 +0200
@@ -1181,7 +1181,10 @@
       whereClause.append(" as ft");
       whereClause.append(" where ft.");
       whereClause.append(FIN_FinaccTransaction.PROPERTY_ACCOUNT);
-      whereClause.append(".id = ?) ");
+      whereClause.append(".id = ? ");
+      whereClause.append(" and ft.");
+      whereClause.append(FIN_FinaccTransaction.PROPERTY_PROCESSED);
+      whereClause.append(" = true) ");
       whereClause.append(" and p.");
       whereClause.append(FIN_Payment.PROPERTY_ACCOUNT);
       whereClause.append(".id = ? ");
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/dao/MatchTransactionDao.java	Tue Aug 12 08:32:37 2014 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/dao/MatchTransactionDao.java	Tue Aug 12 08:56:49 2014 +0200
@@ -266,6 +266,8 @@
       whereClause.append(".id = '").append(strFinancialAccountId).append("'");
       whereClause.append("   and ft.").append(FIN_FinaccTransaction.PROPERTY_RECONCILIATION);
       whereClause.append(" is null");
+      whereClause.append("   and ft.").append(FIN_FinaccTransaction.PROPERTY_PROCESSED);
+      whereClause.append(" = true");
       whereClause.append("   and ft.").append(FIN_FinaccTransaction.PROPERTY_STATUS);
       whereClause.append(" <> 'RPPC' ");
       whereClause.append("   and (ft.").append(FIN_FinaccTransaction.PROPERTY_DEPOSITAMOUNT);
@@ -323,6 +325,8 @@
       whereClause.append(".id = '").append(strFinancialAccountId).append("'");
       whereClause.append("   and ft.").append(FIN_FinaccTransaction.PROPERTY_RECONCILIATION);
       whereClause.append(" is null");
+      whereClause.append("   and ft.").append(FIN_FinaccTransaction.PROPERTY_PROCESSED);
+      whereClause.append(" = true");
       whereClause.append("   and ft.").append(FIN_FinaccTransaction.PROPERTY_STATUS);
       whereClause.append(" <> 'RPPC' ");
       whereClause.append("   and (ft.").append(FIN_FinaccTransaction.PROPERTY_DEPOSITAMOUNT);
@@ -376,6 +380,8 @@
     whereClause.append(".id = '").append(strFinancialAccountId).append("'");
     whereClause.append("   and ft.").append(FIN_FinaccTransaction.PROPERTY_RECONCILIATION);
     whereClause.append(" is null");
+    whereClause.append("   and ft.").append(FIN_FinaccTransaction.PROPERTY_PROCESSED);
+    whereClause.append(" = true");
     whereClause.append("   and ft.").append(FIN_FinaccTransaction.PROPERTY_STATUS);
     whereClause.append(" <> 'RPPC' ");
     whereClause.append("   and (ft.").append(FIN_FinaccTransaction.PROPERTY_DEPOSITAMOUNT);
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/AddOrderOrInvoiceFilterExpressionHandler.java	Tue Aug 12 08:32:37 2014 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/AddOrderOrInvoiceFilterExpressionHandler.java	Tue Aug 12 08:56:49 2014 +0200
@@ -76,8 +76,8 @@
     final String strWindowId = context.getString(OBBindingsConstants.WINDOW_ID_PARAM);
     AddPaymentDefaultValuesHandler handler = getDefaultsHandler(strWindowId);
     String paymentMethodId = handler.getDefaultPaymentMethod(requestMap);
-    if (context.has("inpfinPaymentId") && context.get("inpfinPaymentId") != null
-        && StringUtils.isNotBlank((String) context.get("inpfinPaymentId"))) {
+    if (context.has("inpfinPaymentId") && context.get("inpfinPaymentId") != JSONObject.NULL
+        && StringUtils.isNotBlank((String) context.getString("inpfinPaymentId"))) {
       if (hasDetailsWithDifferentPaymentMethods((String) context.get("inpfinPaymentId"))) {
         return "";
       } else {
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/AddPaymentDefaultValuesExpression.java	Tue Aug 12 08:32:37 2014 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/AddPaymentDefaultValuesExpression.java	Tue Aug 12 08:56:49 2014 +0200
@@ -102,6 +102,8 @@
           return handler.getDefaultCurrency(requestMap);
         case Organization:
           return handler.getOrganization(requestMap);
+        case Document:
+          return handler.getDefaultDocument(requestMap);
         }
       } catch (Exception e) {
         log.error("Error trying to get default value of " + strCurrentParam + " " + e.getMessage(),
@@ -147,7 +149,7 @@
         "customer_credit"), IsSOTrx("issotrx"), Payment("fin_payment_id"), Invoice("c_invoice_id"), Order(
         "c_order_id"), ConversionRate("conversion_rate"), ConvertedAmount("converted_amount"), StandardPrecision(
         "StdPrecision"), GenerateCredit("generateCredit"), DocumentCategory("DOCBASETYPE"), ReferenceNo(
-        "reference_no"), Currency("c_currency_id"), Organization("ad_org_id");
+        "reference_no"), Currency("c_currency_id"), Organization("ad_org_id"), Document("trxtype");
 
     private String columnname;
 
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/AddPaymentDefaultValuesHandler.java	Tue Aug 12 08:32:37 2014 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/AddPaymentDefaultValuesHandler.java	Tue Aug 12 08:56:49 2014 +0200
@@ -68,6 +68,8 @@
 
   abstract String getOrganization(Map<String, String> requestMap) throws JSONException;
 
+  abstract String getDefaultDocument(Map<String, String> requestMap) throws JSONException;
+  
   abstract String getDefaultPaymentDate(Map<String, String> requestMap) throws JSONException;
 
   protected abstract long getSeq();
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/AddPaymentDisplayLogicsExpression.java	Tue Aug 12 08:56:49 2014 +0200
@@ -0,0 +1,128 @@
+/*
+ *************************************************************************
+ * 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) 2014 Openbravo SLU
+ * All Rights Reserved.
+ * Contributor(s):  ______________________________________.
+ ************************************************************************
+ */
+
+package org.openbravo.advpaymentmngt.filterexpression;
+
+import java.util.Map;
+
+import javax.enterprise.inject.Any;
+import javax.enterprise.inject.Instance;
+import javax.inject.Inject;
+
+import org.codehaus.jettison.json.JSONException;
+import org.codehaus.jettison.json.JSONObject;
+import org.openbravo.base.exception.OBException;
+import org.openbravo.client.application.FilterExpression;
+import org.openbravo.client.application.OBBindingsConstants;
+import org.openbravo.client.kernel.ComponentProvider;
+import org.openbravo.dal.core.OBContext;
+import org.openbravo.erpCommon.utility.OBMessageUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class AddPaymentDisplayLogicsExpression implements FilterExpression {
+  private static final Logger log = LoggerFactory
+      .getLogger(AddPaymentDisplayLogicsExpression.class);
+  @Inject
+  @Any
+  private Instance<AddPaymentDisplayLogicsHandler> addPaymentFilterExpressionHandlers;
+
+  @Override
+  public String getExpression(Map<String, String> requestMap) {
+    String strCurrentParam = "";
+    try {
+      OBContext.setAdminMode(true);
+      final String strWindowId = getWindowId(requestMap);
+
+      AddPaymentDisplayLogicsHandler handler = getHandler(strWindowId);
+      if (handler == null) {
+        throw new OBException(String.format(OBMessageUtils.messageBD("APRM_NOHANDLER")));
+      }
+      strCurrentParam = requestMap.get("currentParam");
+      Parameters param = Parameters.getParameter(strCurrentParam);
+      try {
+        switch (param) {
+        case Document:
+          return handler.getDocumentDisplayLogic(requestMap) ? "Y" : "N";
+        case CreditToUse:
+          return handler.getCreditToUseDisplayLogic(requestMap) ? "Y" : "N";
+        case OverpaymentAction:
+          return handler.getOverpaymentActionDisplayLogic(requestMap) ? "Y" : "N";
+        }
+      } catch (Exception e) {
+        log.error("Error trying to get default value of " + strCurrentParam + " " + e.getMessage(),
+            e);
+        return null;
+      }
+    } catch (JSONException ignore) {
+    } finally {
+      OBContext.restorePreviousMode();
+    }
+    log.error("No default value found for param: " + strCurrentParam);
+    return null;
+  }
+
+  private String getWindowId(Map<String, String> requestMap) throws JSONException {
+    final String strContext = requestMap.get("context");
+    JSONObject context = new JSONObject(strContext);
+    return context.getString(OBBindingsConstants.WINDOW_ID_PARAM);
+  }
+
+  private AddPaymentDisplayLogicsHandler getHandler(String strWindowId) {
+    AddPaymentDisplayLogicsHandler handler = null;
+    for (AddPaymentDisplayLogicsHandler nextHandler : addPaymentFilterExpressionHandlers
+        .select(new ComponentProvider.Selector(strWindowId))) {
+      if (handler == null) {
+        handler = nextHandler;
+      } else if (nextHandler.getSeq() < handler.getSeq()) {
+        handler = nextHandler;
+      } else if (nextHandler.getSeq() == handler.getSeq()) {
+        log.warn(
+            "Trying to get handler for window with id {}, there are more than one instance with the same sequence",
+            strWindowId);
+      }
+    }
+    return handler;
+  }
+
+  private enum Parameters {
+    Document("trxtype_display_logic"), CreditToUse("credit_to_use_display_logic"), OverpaymentAction(
+        "overpayment_action_display_logic");
+
+    private String columnname;
+
+    Parameters(String columnname) {
+      this.columnname = columnname;
+    }
+
+    public String getColumnName() {
+      return this.columnname;
+    }
+
+    static Parameters getParameter(String strColumnName) {
+      for (Parameters parameter : Parameters.values()) {
+        if (strColumnName.equals(parameter.getColumnName())) {
+          return parameter;
+        }
+      }
+      return null;
+    }
+  }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/AddPaymentDisplayLogicsHandler.java	Tue Aug 12 08:56:49 2014 +0200
@@ -0,0 +1,53 @@
+/*
+ *************************************************************************
+ * 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) 2014 Openbravo SLU
+ * All Rights Reserved.
+ * Contributor(s):  ______________________________________.
+ ************************************************************************
+ */
+package org.openbravo.advpaymentmngt.filterexpression;
+
+import java.math.BigDecimal;
+import java.util.Map;
+
+import javax.enterprise.context.RequestScoped;
+
+import org.codehaus.jettison.json.JSONException;
+import org.codehaus.jettison.json.JSONObject;
+
+@RequestScoped
+abstract class AddPaymentDisplayLogicsHandler {
+
+  abstract boolean getDocumentDisplayLogic(Map<String, String> requestMap) throws JSONException;
+
+  abstract boolean getCreditToUseDisplayLogic(Map<String, String> requestMap) throws JSONException;
+
+  protected abstract long getSeq();
+
+  boolean getOverpaymentActionDisplayLogic(Map<String, String> requestMap) throws JSONException {
+    JSONObject context = new JSONObject(requestMap.get("context"));
+    if (context.has("difference")) {
+      double diff = context.getDouble("difference");
+      BigDecimal difference = new BigDecimal(diff);
+      if (difference.signum() > 0) {
+        return true;
+      } else {
+        return false;
+      }
+    } else {
+      return false;
+    }
+
+  }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/AddPaymentReadOnlyLogicsExpression.java	Tue Aug 12 08:56:49 2014 +0200
@@ -0,0 +1,143 @@
+/*
+ *************************************************************************
+ * 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) 2014 Openbravo SLU
+ * All Rights Reserved.
+ * Contributor(s):  ______________________________________.
+ ************************************************************************
+ */
+
+package org.openbravo.advpaymentmngt.filterexpression;
+
+import java.util.Map;
+
+import javax.enterprise.inject.Any;
+import javax.enterprise.inject.Instance;
+import javax.inject.Inject;
+
+import org.codehaus.jettison.json.JSONException;
+import org.codehaus.jettison.json.JSONObject;
+import org.openbravo.base.exception.OBException;
+import org.openbravo.client.application.FilterExpression;
+import org.openbravo.client.application.OBBindingsConstants;
+import org.openbravo.client.kernel.ComponentProvider;
+import org.openbravo.dal.core.OBContext;
+import org.openbravo.erpCommon.utility.OBMessageUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class AddPaymentReadOnlyLogicsExpression implements FilterExpression {
+  private static final Logger log = LoggerFactory
+      .getLogger(AddPaymentReadOnlyLogicsExpression.class);
+  @Inject
+  @Any
+  private Instance<AddPaymentReadOnlyLogicsHandler> addPaymentFilterExpressionHandlers;
+
+  @Override
+  public String getExpression(Map<String, String> requestMap) {
+    String strCurrentParam = "";
+    try {
+      OBContext.setAdminMode(true);
+      final String strWindowId = getWindowId(requestMap);
+
+      AddPaymentReadOnlyLogicsHandler handler = getHandler(strWindowId);
+      if (handler == null) {
+        throw new OBException(String.format(OBMessageUtils.messageBD("APRM_NOHANDLER")));
+      }
+      strCurrentParam = requestMap.get("currentParam");
+      Parameters param = Parameters.getParameter(strCurrentParam);
+      try {
+        switch (param) {
+        case PaymentDocumentNo:
+          return handler.getPaymentDocumentNoReadOnlyLogic(requestMap) ? "Y" : "N";
+        case ReceivedFrom:
+          return handler.getReceivedFromReadOnlyLogic(requestMap) ? "Y" : "N";
+        case PaymentMethod:
+          return handler.getPaymentMethodReadOnlyLogic(requestMap) ? "Y" : "N";
+        case ActualPayment:
+          return handler.getActualPaymentReadOnlyLogic(requestMap) ? "Y" : "N";
+        case ConvertedAmount:
+          return handler.getConvertedAmountReadOnlyLogic(requestMap) ? "Y" : "N";
+        case PaymentDate:
+          return handler.getPaymentDateReadOnlyLogic(requestMap) ? "Y" : "N";
+        case FinancialAccount:
+          return handler.getFinancialAccountReadOnlyLogic(requestMap) ? "Y" : "N";
+        case ConversionRate:
+          return handler.getConversionRateReadOnlyLogic(requestMap) ? "Y" : "N";
+        case Currency:
+          return handler.getCurrencyReadOnlyLogic(requestMap) ? "Y" : "N";
+        }
+      } catch (Exception e) {
+        log.error("Error trying to get default value of " + strCurrentParam + " " + e.getMessage(),
+            e);
+        return null;
+      }
+    } catch (JSONException ignore) {
+    } finally {
+      OBContext.restorePreviousMode();
+    }
+    log.error("No default value found for param: " + strCurrentParam);
+    return null;
+  }
+
+  private String getWindowId(Map<String, String> requestMap) throws JSONException {
+    final String strContext = requestMap.get("context");
+    JSONObject context = new JSONObject(strContext);
+    return context.getString(OBBindingsConstants.WINDOW_ID_PARAM);
+  }
+
+  private AddPaymentReadOnlyLogicsHandler getHandler(String strWindowId) {
+    AddPaymentReadOnlyLogicsHandler handler = null;
+    for (AddPaymentReadOnlyLogicsHandler nextHandler : addPaymentFilterExpressionHandlers
+        .select(new ComponentProvider.Selector(strWindowId))) {
+      if (handler == null) {
+        handler = nextHandler;
+      } else if (nextHandler.getSeq() < handler.getSeq()) {
+        handler = nextHandler;
+      } else if (nextHandler.getSeq() == handler.getSeq()) {
+        log.warn(
+            "Trying to get handler for window with id {}, there are more than one instance with the same sequence",
+            strWindowId);
+      }
+    }
+    return handler;
+  }
+
+  private enum Parameters {
+    PaymentDocumentNo("payment_documentno_readonly_logic"), ReceivedFrom(
+        "received_from_readonly_logic"), PaymentMethod("payment_method_readonly_logic"), ActualPayment(
+        "actual_payment_readonly_logic"), ConvertedAmount("converted_amount_readonly_logic"), PaymentDate(
+        "payment_date_readonly_logic"), FinancialAccount("fin_financial_account_id_readonly_logic"), ConversionRate(
+        "conversion_rate_readonly_logic"), Currency("c_currency_id_readonly_logic");
+
+    private String columnname;
+
+    Parameters(String columnname) {
+      this.columnname = columnname;
+    }
+
+    public String getColumnName() {
+      return this.columnname;
+    }
+
+    static Parameters getParameter(String strColumnName) {
+      for (Parameters parameter : Parameters.values()) {
+        if (strColumnName.equals(parameter.getColumnName())) {
+          return parameter;
+        }
+      }
+      return null;
+    }
+  }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/AddPaymentReadOnlyLogicsHandler.java	Tue Aug 12 08:56:49 2014 +0200
@@ -0,0 +1,114 @@
+/*
+ *************************************************************************
+ * 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) 2014 Openbravo SLU
+ * All Rights Reserved.
+ * Contributor(s):  ______________________________________.
+ ************************************************************************
+ */
+package org.openbravo.advpaymentmngt.filterexpression;
+
+import java.util.Map;
+
+import javax.enterprise.context.RequestScoped;
+
+import org.codehaus.jettison.json.JSONException;
+import org.codehaus.jettison.json.JSONObject;
+import org.openbravo.dal.core.OBContext;
+import org.openbravo.dal.service.OBDal;
+import org.openbravo.erpCommon.utility.PropertyException;
+import org.openbravo.erpCommon.utility.PropertyNotFoundException;
+import org.openbravo.model.ad.ui.Window;
+import org.openbravo.scheduling.ProcessLogger;
+
+@RequestScoped
+abstract class AddPaymentReadOnlyLogicsHandler {
+
+  private static ProcessLogger logger;
+
+  abstract boolean getPaymentDocumentNoReadOnlyLogic(Map<String, String> requestMap)
+      throws JSONException;
+
+  abstract boolean getReceivedFromReadOnlyLogic(Map<String, String> requestMap)
+      throws JSONException;
+
+  abstract boolean getPaymentMethodReadOnlyLogic(Map<String, String> requestMap)
+      throws JSONException;
+
+  abstract boolean getActualPaymentReadOnlyLogic(Map<String, String> requestMap)
+      throws JSONException;
+
+  abstract boolean getPaymentDateReadOnlyLogic(Map<String, String> requestMap) throws JSONException;
+
+  abstract boolean getFinancialAccountReadOnlyLogic(Map<String, String> requestMap)
+      throws JSONException;
+
+  abstract boolean getCurrencyReadOnlyLogic(Map<String, String> requestMap) throws JSONException;
+
+  protected abstract long getSeq();
+
+  boolean getConvertedAmountReadOnlyLogic(Map<String, String> requestMap) throws JSONException {
+    OBContext.setAdminMode();
+    JSONObject context = new JSONObject(requestMap.get("context"));
+    String strWindow = context.getString("inpwindowId");
+    Window window = OBDal.getInstance().get(Window.class, strWindow == null ? "" : strWindow);
+
+    try {
+      String value = org.openbravo.erpCommon.businessUtility.Preferences.getPreferenceValue(
+          "NotAllowChangeExchange", true, OBContext.getOBContext().getCurrentClient(), OBContext
+              .getOBContext().getCurrentOrganization(), OBContext.getOBContext().getUser(),
+          OBContext.getOBContext().getRole(), window);
+      if ("Y".equals(value)) {
+        return true;
+      } else {
+        return false;
+      }
+    } catch (PropertyNotFoundException e) {
+      // logger.log("Property not found \n");
+      return false;
+    } catch (PropertyException e) {
+      // logger.log("PropertyException, there is a conflict for NotAllowChangeExchange property\n");
+      return false;
+    } finally {
+      OBContext.restorePreviousMode();
+    }
+  }
+
+  boolean getConversionRateReadOnlyLogic(Map<String, String> requestMap) throws JSONException {
+    OBContext.setAdminMode();
+    JSONObject context = new JSONObject(requestMap.get("context"));
+    String strWindow = context.getString("inpwindowId");
+    Window window = OBDal.getInstance().get(Window.class, strWindow == null ? "" : strWindow);
+
+    try {
+      String value = org.openbravo.erpCommon.businessUtility.Preferences.getPreferenceValue(
+          "NotAllowChangeExchange", true, OBContext.getOBContext().getCurrentClient(), OBContext
+              .getOBContext().getCurrentOrganization(), OBContext.getOBContext().getUser(),
+          OBContext.getOBContext().getRole(), window);
+      if ("Y".equals(value)) {
+        return true;
+      } else {
+        return false;
+      }
+    } catch (PropertyNotFoundException e) {
+      // logger.log("Property not found \n");
+      return false;
+    } catch (PropertyException e) {
+      // logger.log("PropertyException, there is a conflict for NotAllowChangeExchange property\n");
+      return false;
+    } finally {
+      OBContext.restorePreviousMode();
+    }
+  }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/BusinessPartnerCustomerFilterExpression.java	Tue Aug 12 08:56:49 2014 +0200
@@ -0,0 +1,51 @@
+package org.openbravo.advpaymentmngt.filterexpression;
+
+import java.util.Map;
+
+import org.apache.log4j.Logger;
+import org.openbravo.client.application.FilterExpression;
+import org.openbravo.client.application.OBBindingsConstants;
+import org.openbravo.client.application.ParameterUtils;
+import org.openbravo.client.kernel.RequestContext;
+
+public class BusinessPartnerCustomerFilterExpression implements FilterExpression {
+  private Logger log = Logger.getLogger(BusinessPartnerCustomerFilterExpression.class);
+  private Map<String, String> requestMap;
+  private String tabId;
+  private String transactionTabId = "23691259D1BD4496BCC5F32645BCA4B9";
+  private String issotrx = null;
+  String result = null;
+
+  @Override
+  public String getExpression(Map<String, String> _requestMap) {
+    requestMap = _requestMap;
+    tabId = requestMap.get(OBBindingsConstants.TAB_ID_PARAM);
+    if (requestMap.get("issotrx") != null && transactionTabId.equals(tabId)) {
+      issotrx = requestMap.get("issotrx");
+      if ("true".equals(issotrx)) {
+        return "true";
+      } else {
+        return "";
+      }
+    } else if (requestMap.get("IsSOTrx") != null && transactionTabId.equals(tabId)) {
+      issotrx = requestMap.get("IsSOTrx");
+      if ("Y".equals(issotrx)) {
+        return "true";
+      } else {
+        return "";
+      }
+    } else {
+      try {
+        result = (String) ParameterUtils.getJSExpressionResult(_requestMap, RequestContext.get()
+            .getSession(), "if (OB.isSalesTransaction() == true) { 'true' } else {''}");
+        return result;
+      } catch (Exception e) {
+        log.error(
+            "Error evaluating filter expression: if (OB.isSalesTransaction() == false) { 'true' } else {''}",
+            e);
+      }
+      return "";
+    }
+  }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/BusinessPartnerVendorFilterExpression.java	Tue Aug 12 08:56:49 2014 +0200
@@ -0,0 +1,51 @@
+package org.openbravo.advpaymentmngt.filterexpression;
+
+import java.util.Map;
+
+import org.apache.log4j.Logger;
+import org.openbravo.client.application.FilterExpression;
+import org.openbravo.client.application.OBBindingsConstants;
+import org.openbravo.client.application.ParameterUtils;
+import org.openbravo.client.kernel.RequestContext;
+
+public class BusinessPartnerVendorFilterExpression implements FilterExpression {
+  private Logger log = Logger.getLogger(BusinessPartnerVendorFilterExpression.class);
+  private Map<String, String> requestMap;
+  private String tabId;
+  private String transactionTabId = "23691259D1BD4496BCC5F32645BCA4B9";
+  private String issotrx = null;
+  String result = null;
+
+  @Override
+  public String getExpression(Map<String, String> _requestMap) {
+    requestMap = _requestMap;
+    tabId = requestMap.get(OBBindingsConstants.TAB_ID_PARAM);
+    if (requestMap.get("issotrx") != null && transactionTabId.equals(tabId)) {
+      issotrx = requestMap.get("issotrx");
+      if ("false".equals(issotrx)) {
+        return "true";
+      } else {
+        return "";
+      }
+    } else if (requestMap.get("IsSOTrx") != null && transactionTabId.equals(tabId)) {
+      issotrx = requestMap.get("IsSOTrx");
+      if ("N".equals(issotrx)) {
+        return "true";
+      } else {
+        return "";
+      }
+    } else {
+      try {
+        result = (String) ParameterUtils.getJSExpressionResult(_requestMap, RequestContext.get()
+            .getSession(), "if (OB.isSalesTransaction() == false) { 'true' } else {''}");
+        return result;
+      } catch (Exception e) {
+        log.error(
+            "Error evaluating filter expression: if (OB.isSalesTransaction() == false) { 'true' } else {''}",
+            e);
+        return "";
+      }
+    }
+  }
+
+}
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/PaymentInAddPaymentDefaultValues.java	Tue Aug 12 08:32:37 2014 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/PaymentInAddPaymentDefaultValues.java	Tue Aug 12 08:56:49 2014 +0200
@@ -150,4 +150,10 @@
     return OBDateUtils.formatDate(getPayment(requestMap).getPaymentDate());
   }
 
+  @Override
+  String getDefaultDocument(Map<String, String> requestMap) throws JSONException {
+    // Document Type
+    return "";
+  }
+
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/PaymentInAddPaymentDisplayLogics.java	Tue Aug 12 08:56:49 2014 +0200
@@ -0,0 +1,81 @@
+/*
+ *************************************************************************
+ * 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) 2014 Openbravo SLU
+ * All Rights Reserved.
+ * Contributor(s):  ______________________________________.
+ ************************************************************************
+ */
+package org.openbravo.advpaymentmngt.filterexpression;
+
+import java.math.BigDecimal;
+import java.util.Map;
+
+import org.codehaus.jettison.json.JSONException;
+import org.codehaus.jettison.json.JSONObject;
+import org.openbravo.advpaymentmngt.dao.AdvPaymentMngtDao;
+import org.openbravo.advpaymentmngt.utility.APRMConstants;
+import org.openbravo.client.kernel.ComponentProvider;
+import org.openbravo.dal.service.OBDal;
+import org.openbravo.model.common.businesspartner.BusinessPartner;
+import org.openbravo.model.common.enterprise.Organization;
+import org.openbravo.model.financialmgmt.payment.FIN_Payment;
+
+@ComponentProvider.Qualifier(APRMConstants.PAYMENT_IN_WINDOW_ID)
+public class PaymentInAddPaymentDisplayLogics extends AddPaymentDisplayLogicsHandler {
+
+  private static final long SEQUENCE = 100l;
+
+  protected long getSeq() {
+    return SEQUENCE;
+  }
+
+  @Override
+  boolean getDocumentDisplayLogic(Map<String, String> requestMap) throws JSONException {
+    // Document Type
+    return false;
+  }
+
+  @Override
+  boolean getCreditToUseDisplayLogic(Map<String, String> requestMap) throws JSONException {
+    // "@customer_credit@ > 0 & @received_from@!'' & (@issotrx@ == true | @generateCredit@ == 0)";
+    FIN_Payment paymentIn = getPayment(requestMap);
+    BusinessPartner bpartner = paymentIn.getBusinessPartner();
+    if (bpartner != null) {
+      Organization org = paymentIn.getOrganization();
+      BigDecimal customerCredit = new AdvPaymentMngtDao().getCustomerCredit(bpartner, true, org);
+      if (customerCredit.signum() > 0) {
+        return true;
+      } else {
+        return false;
+      }
+    } else {
+      return false;
+    }
+  }
+
+  private FIN_Payment getPayment(Map<String, String> requestMap) throws JSONException {
+    // Current Payment
+    JSONObject context = new JSONObject(requestMap.get("context"));
+    String strFinPaymentId = "";
+    if (context.has("inpfinPaymentId") && !context.isNull("inpfinPaymentId")) {
+      strFinPaymentId = context.getString("inpfinPaymentId");
+    }
+    if (context.has("Fin_Payment_ID") && !context.isNull("Fin_Payment_ID")) {
+      strFinPaymentId = context.getString("Fin_Payment_ID");
+    }
+    FIN_Payment payment = OBDal.getInstance().get(FIN_Payment.class, strFinPaymentId);
+    return payment;
+  }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/PaymentInAddPaymentReadOnlyLogics.java	Tue Aug 12 08:56:49 2014 +0200
@@ -0,0 +1,70 @@
+/*
+ *************************************************************************
+ * 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) 2014 Openbravo SLU
+ * All Rights Reserved.
+ * Contributor(s):  ______________________________________.
+ ************************************************************************
+ */
+package org.openbravo.advpaymentmngt.filterexpression;
+
+import java.util.Map;
+
+import org.codehaus.jettison.json.JSONException;
+import org.openbravo.advpaymentmngt.utility.APRMConstants;
+import org.openbravo.client.kernel.ComponentProvider;
+
+@ComponentProvider.Qualifier(APRMConstants.PAYMENT_IN_WINDOW_ID)
+public class PaymentInAddPaymentReadOnlyLogics extends AddPaymentReadOnlyLogicsHandler {
+
+  private static final long SEQUENCE = 100l;
+
+  protected long getSeq() {
+    return SEQUENCE;
+  }
+
+  @Override
+  boolean getPaymentDocumentNoReadOnlyLogic(Map<String, String> requestMap) throws JSONException {
+    return true;
+  }
+
+  @Override
+  boolean getReceivedFromReadOnlyLogic(Map<String, String> requestMap) throws JSONException {
+    return true;
+  }
+
+  @Override
+  boolean getPaymentMethodReadOnlyLogic(Map<String, String> requestMap) throws JSONException {
+    return true;
+  }
+
+  @Override
+  boolean getActualPaymentReadOnlyLogic(Map<String, String> requestMap) throws JSONException {
+    return false;
+  }
+
+  @Override
+  boolean getPaymentDateReadOnlyLogic(Map<String, String> requestMap) throws JSONException {
+    return true;
+  }
+
+  @Override
+  boolean getFinancialAccountReadOnlyLogic(Map<String, String> requestMap) throws JSONException {
+    return true;
+  }
+
+  @Override
+  boolean getCurrencyReadOnlyLogic(Map<String, String> requestMap) throws JSONException {
+    return true;
+  }
+}
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/PaymentOutAddPaymentDefaultValues.java	Tue Aug 12 08:32:37 2014 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/PaymentOutAddPaymentDefaultValues.java	Tue Aug 12 08:56:49 2014 +0200
@@ -161,4 +161,10 @@
     return OBDateUtils.formatDate(getPayment(requestMap).getPaymentDate());
   }
 
+  @Override
+  String getDefaultDocument(Map<String, String> requestMap) throws JSONException {
+    // Document Type
+    return "";
+  }
+
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/PaymentOutAddPaymentDisplayLogics.java	Tue Aug 12 08:56:49 2014 +0200
@@ -0,0 +1,89 @@
+/*
+ *************************************************************************
+ * 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) 2014 Openbravo SLU
+ * All Rights Reserved.
+ * Contributor(s):  ______________________________________.
+ ************************************************************************
+ */
+package org.openbravo.advpaymentmngt.filterexpression;
+
+import java.math.BigDecimal;
+import java.util.Map;
+
+import org.codehaus.jettison.json.JSONException;
+import org.codehaus.jettison.json.JSONObject;
+import org.openbravo.advpaymentmngt.dao.AdvPaymentMngtDao;
+import org.openbravo.advpaymentmngt.utility.APRMConstants;
+import org.openbravo.client.kernel.ComponentProvider;
+import org.openbravo.dal.service.OBDal;
+import org.openbravo.model.common.businesspartner.BusinessPartner;
+import org.openbravo.model.common.enterprise.Organization;
+import org.openbravo.model.financialmgmt.payment.FIN_Payment;
+
+@ComponentProvider.Qualifier(APRMConstants.PAYMENT_OUT_WINDOW_ID)
+public class PaymentOutAddPaymentDisplayLogics extends AddPaymentDisplayLogicsHandler {
+
+  private static final long SEQUENCE = 100l;
+
+  protected long getSeq() {
+    return SEQUENCE;
+  }
+
+  @Override
+  boolean getDocumentDisplayLogic(Map<String, String> requestMap) throws JSONException {
+    // Document Type
+    return false;
+  }
+
+  @Override
+  boolean getCreditToUseDisplayLogic(Map<String, String> requestMap) throws JSONException {
+    FIN_Payment paymentOut = getPayment(requestMap);
+    if (getGeneratedCredit(requestMap).signum() == 0) {
+      BusinessPartner bpartner = paymentOut.getBusinessPartner();
+      if (bpartner != null) {
+        Organization org = paymentOut.getOrganization();
+        BigDecimal customerCredit = new AdvPaymentMngtDao().getCustomerCredit(bpartner, false, org);
+        if (customerCredit.signum() > 0) {
+          return true;
+        } else {
+          return false;
+        }
+      } else {
+        return false;
+      }
+    } else {
+      return false;
+    }
+  }
+
+  private FIN_Payment getPayment(Map<String, String> requestMap) throws JSONException {
+    // Current Payment
+    JSONObject context = new JSONObject(requestMap.get("context"));
+    String strFinPaymentId = "";
+    if (context.has("inpfinPaymentId") && !context.isNull("inpfinPaymentId")) {
+      strFinPaymentId = context.getString("inpfinPaymentId");
+    }
+    if (context.has("Fin_Payment_ID") && !context.isNull("Fin_Payment_ID")) {
+      strFinPaymentId = context.getString("Fin_Payment_ID");
+    }
+    FIN_Payment payment = OBDal.getInstance().get(FIN_Payment.class, strFinPaymentId);
+    return payment;
+  }
+
+  BigDecimal getGeneratedCredit(Map<String, String> requestMap) throws JSONException {
+    // Generated Credit of the current Payment
+    return getPayment(requestMap).getGeneratedCredit();
+  }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/PaymentOutAddPaymentReadOnlyLogics.java	Tue Aug 12 08:56:49 2014 +0200
@@ -0,0 +1,71 @@
+/*
+ *************************************************************************
+ * 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) 2014 Openbravo SLU
+ * All Rights Reserved.
+ * Contributor(s):  ______________________________________.
+ ************************************************************************
+ */
+package org.openbravo.advpaymentmngt.filterexpression;
+
+import java.util.Map;
+
+import org.codehaus.jettison.json.JSONException;
+import org.openbravo.advpaymentmngt.utility.APRMConstants;
+import org.openbravo.client.kernel.ComponentProvider;
+
+@ComponentProvider.Qualifier(APRMConstants.PAYMENT_OUT_WINDOW_ID)
+public class PaymentOutAddPaymentReadOnlyLogics extends AddPaymentReadOnlyLogicsHandler {
+
+  private static final long SEQUENCE = 100l;
+
+  protected long getSeq() {
+    return SEQUENCE;
+  }
+
+  @Override
+  boolean getPaymentDocumentNoReadOnlyLogic(Map<String, String> requestMap) throws JSONException {
+    return true;
+  }
+
+  @Override
+  boolean getReceivedFromReadOnlyLogic(Map<String, String> requestMap) throws JSONException {
+    return true;
+  }
+
+  @Override
+  boolean getPaymentMethodReadOnlyLogic(Map<String, String> requestMap) throws JSONException {
+    return true;
+  }
+
+  @Override
+  boolean getActualPaymentReadOnlyLogic(Map<String, String> requestMap) throws JSONException {
+    return true;
+  }
+
+  @Override
+  boolean getPaymentDateReadOnlyLogic(Map<String, String> requestMap) throws JSONException {
+    return true;
+  }
+
+  @Override
+  boolean getFinancialAccountReadOnlyLogic(Map<String, String> requestMap) throws JSONException {
+    return true;
+  }
+
+  @Override
+  boolean getCurrencyReadOnlyLogic(Map<String, String> requestMap) throws JSONException {
+    return true;
+  }
+
+}
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/PurchaseInvoiceAddPaymentDefaultValues.java	Tue Aug 12 08:32:37 2014 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/PurchaseInvoiceAddPaymentDefaultValues.java	Tue Aug 12 08:56:49 2014 +0200
@@ -125,6 +125,12 @@
     return getInvoice(new JSONObject(requestMap.get("context"))).getOrganization().getId();
   }
 
+  @Override
+  String getDefaultDocument(Map<String, String> requestMap) throws JSONException {
+    // Document Type
+    return "";
+  }
+
   Invoice getInvoice(JSONObject context) throws JSONException {
     return OBDal.getInstance().get(Invoice.class, context.getString("inpcInvoiceId"));
   }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/PurchaseInvoiceAddPaymentDisplayLogics.java	Tue Aug 12 08:56:49 2014 +0200
@@ -0,0 +1,79 @@
+/*
+ *************************************************************************
+ * 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) 2014 Openbravo SLU
+ * All Rights Reserved.
+ * Contributor(s):  ______________________________________.
+ ************************************************************************
+ */
+package org.openbravo.advpaymentmngt.filterexpression;
+
+import java.math.BigDecimal;
+import java.util.Map;
+
+import org.codehaus.jettison.json.JSONException;
+import org.codehaus.jettison.json.JSONObject;
+import org.openbravo.advpaymentmngt.dao.AdvPaymentMngtDao;
+import org.openbravo.advpaymentmngt.utility.APRMConstants;
+import org.openbravo.client.kernel.ComponentProvider;
+import org.openbravo.dal.service.OBDal;
+import org.openbravo.model.common.businesspartner.BusinessPartner;
+import org.openbravo.model.common.enterprise.Organization;
+import org.openbravo.model.common.invoice.Invoice;
+
+@ComponentProvider.Qualifier(APRMConstants.PURCHASE_INVOICE_WINDOW_ID)
+public class PurchaseInvoiceAddPaymentDisplayLogics extends AddPaymentDisplayLogicsHandler {
+
+  private static final long SEQUENCE = 100l;
+
+  protected long getSeq() {
+    return SEQUENCE;
+  }
+
+  @Override
+  boolean getDocumentDisplayLogic(Map<String, String> requestMap) throws JSONException {
+    // Document Type
+    return false;
+  }
+
+  @Override
+  boolean getCreditToUseDisplayLogic(Map<String, String> requestMap) throws JSONException {
+    JSONObject context = new JSONObject(requestMap.get("context"));
+    Invoice invoice = getInvoice(context);
+    if (getDefaultGeneratedCredit(requestMap).signum() == 0) {
+      BusinessPartner bpartner = invoice.getBusinessPartner();
+      if (bpartner != null) {
+        Organization org = invoice.getOrganization();
+        BigDecimal customerCredit = new AdvPaymentMngtDao().getCustomerCredit(bpartner, false, org);
+        if (customerCredit.signum() > 0) {
+          return true;
+        } else {
+          return false;
+        }
+      } else {
+        return false;
+      }
+    } else {
+      return false;
+    }
+  }
+
+  Invoice getInvoice(JSONObject context) throws JSONException {
+    return OBDal.getInstance().get(Invoice.class, context.getString("inpcInvoiceId"));
+  }
+
+  BigDecimal getDefaultGeneratedCredit(Map<String, String> requestMap) throws JSONException {
+    return BigDecimal.ZERO;
+  }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/PurchaseInvoiceAddPaymentReadOnlyLogics.java	Tue Aug 12 08:56:49 2014 +0200
@@ -0,0 +1,71 @@
+/*
+ *************************************************************************
+ * 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) 2014 Openbravo SLU
+ * All Rights Reserved.
+ * Contributor(s):  ______________________________________.
+ ************************************************************************
+ */
+package org.openbravo.advpaymentmngt.filterexpression;
+
+import java.util.Map;
+
+import org.codehaus.jettison.json.JSONException;
+import org.openbravo.advpaymentmngt.utility.APRMConstants;
+import org.openbravo.client.kernel.ComponentProvider;
+
+@ComponentProvider.Qualifier(APRMConstants.PURCHASE_INVOICE_WINDOW_ID)
+public class PurchaseInvoiceAddPaymentReadOnlyLogics extends AddPaymentReadOnlyLogicsHandler {
+
+  private static final long SEQUENCE = 100l;
+
+  protected long getSeq() {
+    return SEQUENCE;
+  }
+
+  @Override
+  boolean getPaymentDocumentNoReadOnlyLogic(Map<String, String> requestMap) throws JSONException {
+    return false;
+  }
+
+  @Override
+  boolean getReceivedFromReadOnlyLogic(Map<String, String> requestMap) throws JSONException {
+    return true;
+  }
+
+  @Override
+  boolean getPaymentMethodReadOnlyLogic(Map<String, String> requestMap) throws JSONException {
+    return false;
+  }
+
+  @Override
+  boolean getActualPaymentReadOnlyLogic(Map<String, String> requestMap) throws JSONException {
+    return true;
+  }
+
+  @Override
+  boolean getPaymentDateReadOnlyLogic(Map<String, String> requestMap) throws JSONException {
+    return false;
+  }
+
+  @Override
+  boolean getFinancialAccountReadOnlyLogic(Map<String, String> requestMap) throws JSONException {
+    return false;
+  }
+
+  @Override
+  boolean getCurrencyReadOnlyLogic(Map<String, String> requestMap) throws JSONException {
+    return true;
+  }
+
+}
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/PurchaseOrderAddPaymentDefaultValues.java	Tue Aug 12 08:32:37 2014 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/PurchaseOrderAddPaymentDefaultValues.java	Tue Aug 12 08:56:49 2014 +0200
@@ -129,6 +129,12 @@
     return getOrder(new JSONObject(requestMap.get("context"))).getOrganization().getId();
   }
 
+  @Override
+  String getDefaultDocument(Map<String, String> requestMap) throws JSONException {
+    // Document Type
+    return "";
+  }
+
   Order getOrder(JSONObject context) throws JSONException {
     return OBDal.getInstance().get(Order.class, context.getString("inpcOrderId"));
   }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/PurchaseOrderAddPaymentDisplayLogics.java	Tue Aug 12 08:56:49 2014 +0200
@@ -0,0 +1,79 @@
+/*
+ *************************************************************************
+ * 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) 2014 Openbravo SLU
+ * All Rights Reserved.
+ * Contributor(s):  ______________________________________.
+ ************************************************************************
+ */
+package org.openbravo.advpaymentmngt.filterexpression;
+
+import java.math.BigDecimal;
+import java.util.Map;
+
+import org.codehaus.jettison.json.JSONException;
+import org.codehaus.jettison.json.JSONObject;
+import org.openbravo.advpaymentmngt.dao.AdvPaymentMngtDao;
+import org.openbravo.advpaymentmngt.utility.APRMConstants;
+import org.openbravo.client.kernel.ComponentProvider;
+import org.openbravo.dal.service.OBDal;
+import org.openbravo.model.common.businesspartner.BusinessPartner;
+import org.openbravo.model.common.enterprise.Organization;
+import org.openbravo.model.common.order.Order;
+
+@ComponentProvider.Qualifier(APRMConstants.PURCHASE_ORDER_WINDOW_ID)
+public class PurchaseOrderAddPaymentDisplayLogics extends AddPaymentDisplayLogicsHandler {
+
+  private static final long SEQUENCE = 100l;
+
+  protected long getSeq() {
+    return SEQUENCE;
+  }
+
+  @Override
+  boolean getDocumentDisplayLogic(Map<String, String> requestMap) throws JSONException {
+    // Document Type
+    return false;
+  }
+
+  @Override
+  boolean getCreditToUseDisplayLogic(Map<String, String> requestMap) throws JSONException {
+    JSONObject context = new JSONObject(requestMap.get("context"));
+    Order order = getOrder(context);
+    if (getDefaultGeneratedCredit(requestMap).signum() == 0) {
+      BusinessPartner bpartner = order.getBusinessPartner();
+      if (bpartner != null) {
+        Organization org = order.getOrganization();
+        BigDecimal customerCredit = new AdvPaymentMngtDao().getCustomerCredit(bpartner, false, org);
+        if (customerCredit.signum() > 0) {
+          return true;
+        } else {
+          return false;
+        }
+      } else {
+        return false;
+      }
+    } else {
+      return false;
+    }
+  }
+
+  private Order getOrder(JSONObject context) throws JSONException {
+    return OBDal.getInstance().get(Order.class, context.getString("inpcOrderId"));
+  }
+
+  BigDecimal getDefaultGeneratedCredit(Map<String, String> requestMap) throws JSONException {
+    return BigDecimal.ZERO;
+  }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/PurchaseOrderAddPaymentReadOnlyLogics.java	Tue Aug 12 08:56:49 2014 +0200
@@ -0,0 +1,71 @@
+/*
+ *************************************************************************
+ * 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) 2014 Openbravo SLU
+ * All Rights Reserved.
+ * Contributor(s):  ______________________________________.
+ ************************************************************************
+ */
+package org.openbravo.advpaymentmngt.filterexpression;
+
+import java.util.Map;
+
+import org.codehaus.jettison.json.JSONException;
+import org.openbravo.advpaymentmngt.utility.APRMConstants;
+import org.openbravo.client.kernel.ComponentProvider;
+
+@ComponentProvider.Qualifier(APRMConstants.PURCHASE_ORDER_WINDOW_ID)
+public class PurchaseOrderAddPaymentReadOnlyLogics extends AddPaymentReadOnlyLogicsHandler {
+
+  private static final long SEQUENCE = 100l;
+
+  protected long getSeq() {
+    return SEQUENCE;
+  }
+
+  @Override
+  boolean getPaymentDocumentNoReadOnlyLogic(Map<String, String> requestMap) throws JSONException {
+    return false;
+  }
+
+  @Override
+  boolean getReceivedFromReadOnlyLogic(Map<String, String> requestMap) throws JSONException {
+    return true;
+  }
+
+  @Override
+  boolean getPaymentMethodReadOnlyLogic(Map<String, String> requestMap) throws JSONException {
+    return false;
+  }
+
+  @Override
+  boolean getActualPaymentReadOnlyLogic(Map<String, String> requestMap) throws JSONException {
+    return true;
+  }
+
+  @Override
+  boolean getPaymentDateReadOnlyLogic(Map<String, String> requestMap) throws JSONException {
+    return false;
+  }
+
+  @Override
+  boolean getFinancialAccountReadOnlyLogic(Map<String, String> requestMap) throws JSONException {
+    return false;
+  }
+
+  @Override
+  boolean getCurrencyReadOnlyLogic(Map<String, String> requestMap) throws JSONException {
+    return true;
+  }
+
+}
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/SalesInvoiceAddPaymentDefaultValues.java	Tue Aug 12 08:32:37 2014 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/SalesInvoiceAddPaymentDefaultValues.java	Tue Aug 12 08:56:49 2014 +0200
@@ -125,6 +125,12 @@
     return getInvoice(new JSONObject(requestMap.get("context"))).getOrganization().getId();
   }
 
+  @Override
+  String getDefaultDocument(Map<String, String> requestMap) throws JSONException {
+    // Document Type
+    return "";
+  }
+
   Invoice getInvoice(JSONObject context) throws JSONException {
     return OBDal.getInstance().get(Invoice.class, context.getString("inpcInvoiceId"));
   }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/SalesInvoiceAddPaymentDisplayLogics.java	Tue Aug 12 08:56:49 2014 +0200
@@ -0,0 +1,71 @@
+/*
+ *************************************************************************
+ * 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) 2014 Openbravo SLU
+ * All Rights Reserved.
+ * Contributor(s):  ______________________________________.
+ ************************************************************************
+ */
+package org.openbravo.advpaymentmngt.filterexpression;
+
+import java.math.BigDecimal;
+import java.util.Map;
+
+import org.codehaus.jettison.json.JSONException;
+import org.codehaus.jettison.json.JSONObject;
+import org.openbravo.advpaymentmngt.dao.AdvPaymentMngtDao;
+import org.openbravo.advpaymentmngt.utility.APRMConstants;
+import org.openbravo.client.kernel.ComponentProvider;
+import org.openbravo.dal.service.OBDal;
+import org.openbravo.model.common.businesspartner.BusinessPartner;
+import org.openbravo.model.common.enterprise.Organization;
+import org.openbravo.model.common.invoice.Invoice;
+
+@ComponentProvider.Qualifier(APRMConstants.SALES_INVOICE_WINDOW_ID)
+public class SalesInvoiceAddPaymentDisplayLogics extends AddPaymentDisplayLogicsHandler {
+
+  private static final long SEQUENCE = 100l;
+
+  protected long getSeq() {
+    return SEQUENCE;
+  }
+
+  @Override
+  boolean getDocumentDisplayLogic(Map<String, String> requestMap) throws JSONException {
+    // Document Type
+    return false;
+  }
+
+  @Override
+  boolean getCreditToUseDisplayLogic(Map<String, String> requestMap) throws JSONException {
+    JSONObject context = new JSONObject(requestMap.get("context"));
+    Invoice invoice = getInvoice(context);
+    BusinessPartner bpartner = invoice.getBusinessPartner();
+    if (bpartner != null) {
+      Organization org = invoice.getOrganization();
+      BigDecimal customerCredit = new AdvPaymentMngtDao().getCustomerCredit(bpartner, true, org);
+      if (customerCredit.signum() > 0) {
+        return true;
+      } else {
+        return false;
+      }
+    } else {
+      return false;
+    }
+  }
+
+  Invoice getInvoice(JSONObject context) throws JSONException {
+    return OBDal.getInstance().get(Invoice.class, context.getString("inpcInvoiceId"));
+  }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/SalesInvoiceAddPaymentReadOnlyLogics.java	Tue Aug 12 08:56:49 2014 +0200
@@ -0,0 +1,71 @@
+/*
+ *************************************************************************
+ * 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) 2014 Openbravo SLU
+ * All Rights Reserved.
+ * Contributor(s):  ______________________________________.
+ ************************************************************************
+ */
+package org.openbravo.advpaymentmngt.filterexpression;
+
+import java.util.Map;
+
+import org.codehaus.jettison.json.JSONException;
+import org.openbravo.advpaymentmngt.utility.APRMConstants;
+import org.openbravo.client.kernel.ComponentProvider;
+
+@ComponentProvider.Qualifier(APRMConstants.SALES_INVOICE_WINDOW_ID)
+public class SalesInvoiceAddPaymentReadOnlyLogics extends AddPaymentReadOnlyLogicsHandler {
+
+  private static final long SEQUENCE = 100l;
+
+  protected long getSeq() {
+    return SEQUENCE;
+  }
+
+  @Override
+  boolean getPaymentDocumentNoReadOnlyLogic(Map<String, String> requestMap) throws JSONException {
+    return false;
+  }
+
+  @Override
+  boolean getReceivedFromReadOnlyLogic(Map<String, String> requestMap) throws JSONException {
+    return true;
+  }
+
+  @Override
+  boolean getPaymentMethodReadOnlyLogic(Map<String, String> requestMap) throws JSONException {
+    return false;
+  }
+
+  @Override
+  boolean getActualPaymentReadOnlyLogic(Map<String, String> requestMap) throws JSONException {
+    return false;
+  }
+
+  @Override
+  boolean getPaymentDateReadOnlyLogic(Map<String, String> requestMap) throws JSONException {
+    return false;
+  }
+
+  @Override
+  boolean getFinancialAccountReadOnlyLogic(Map<String, String> requestMap) throws JSONException {
+    return false;
+  }
+
+  @Override
+  boolean getCurrencyReadOnlyLogic(Map<String, String> requestMap) throws JSONException {
+    return true;
+  }
+
+}
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/SalesOrderAddPaymentDefaultValues.java	Tue Aug 12 08:32:37 2014 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/SalesOrderAddPaymentDefaultValues.java	Tue Aug 12 08:56:49 2014 +0200
@@ -138,4 +138,10 @@
     return OBDateUtils.formatDate(new Date());
   }
 
+  @Override
+  String getDefaultDocument(Map<String, String> requestMap) throws JSONException {
+    // Document Type
+    return "";
+  }
+
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/SalesOrderAddPaymentDisplayLogics.java	Tue Aug 12 08:56:49 2014 +0200
@@ -0,0 +1,72 @@
+/*
+ *************************************************************************
+ * 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) 2014 Openbravo SLU
+ * All Rights Reserved.
+ * Contributor(s):  ______________________________________.
+ ************************************************************************
+ */
+package org.openbravo.advpaymentmngt.filterexpression;
+
+import java.math.BigDecimal;
+import java.util.Map;
+
+import org.codehaus.jettison.json.JSONException;
+import org.codehaus.jettison.json.JSONObject;
+import org.openbravo.advpaymentmngt.dao.AdvPaymentMngtDao;
+import org.openbravo.advpaymentmngt.utility.APRMConstants;
+import org.openbravo.client.kernel.ComponentProvider;
+import org.openbravo.dal.service.OBDal;
+import org.openbravo.model.common.businesspartner.BusinessPartner;
+import org.openbravo.model.common.enterprise.Organization;
+import org.openbravo.model.common.order.Order;
+
+@ComponentProvider.Qualifier(APRMConstants.SALES_ORDER_WINDOW_ID)
+public class SalesOrderAddPaymentDisplayLogics extends AddPaymentDisplayLogicsHandler {
+
+  private static final long SEQUENCE = 100l;
+
+  protected long getSeq() {
+    return SEQUENCE;
+  }
+
+  @Override
+  boolean getDocumentDisplayLogic(Map<String, String> requestMap) throws JSONException {
+    // Document Type
+    return false;
+  }
+
+  @Override
+  boolean getCreditToUseDisplayLogic(Map<String, String> requestMap) throws JSONException {
+    // "@customer_credit@ > 0 & @received_from@!'' & (@issotrx@ == true | @generateCredit@ == 0)";
+    JSONObject context = new JSONObject(requestMap.get("context"));
+    Order order = getOrder(context);
+    BusinessPartner bpartner = order.getBusinessPartner();
+    if (bpartner != null) {
+      Organization org = order.getOrganization();
+      BigDecimal customerCredit = new AdvPaymentMngtDao().getCustomerCredit(bpartner, true, org);
+      if (customerCredit.signum() > 0) {
+        return true;
+      } else {
+        return false;
+      }
+    } else {
+      return false;
+    }
+  }
+
+  private Order getOrder(JSONObject context) throws JSONException {
+    return OBDal.getInstance().get(Order.class, context.getString("inpcOrderId"));
+  }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/SalesOrderAddPaymentReadOnlyLogics.java	Tue Aug 12 08:56:49 2014 +0200
@@ -0,0 +1,72 @@
+/*
+ *************************************************************************
+ * 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) 2014 Openbravo SLU
+ * All Rights Reserved.
+ * Contributor(s):  ______________________________________.
+ ************************************************************************
+ */
+package org.openbravo.advpaymentmngt.filterexpression;
+
+import java.util.Map;
+
+import org.codehaus.jettison.json.JSONException;
+import org.openbravo.advpaymentmngt.utility.APRMConstants;
+import org.openbravo.client.kernel.ComponentProvider;
+
+@ComponentProvider.Qualifier(APRMConstants.SALES_ORDER_WINDOW_ID)
+public class SalesOrderAddPaymentReadOnlyLogics extends AddPaymentReadOnlyLogicsHandler {
+
+  private static final long SEQUENCE = 100l;
+
+  protected long getSeq() {
+    return SEQUENCE;
+  }
+
+  @Override
+  boolean getPaymentDocumentNoReadOnlyLogic(Map<String, String> requestMap) throws JSONException {
+    // Document Type
+    return false;
+  }
+
+  @Override
+  boolean getReceivedFromReadOnlyLogic(Map<String, String> requestMap) throws JSONException {
+    return true;
+  }
+
+  @Override
+  boolean getPaymentMethodReadOnlyLogic(Map<String, String> requestMap) throws JSONException {
+    return false;
+  }
+
+  @Override
+  boolean getActualPaymentReadOnlyLogic(Map<String, String> requestMap) throws JSONException {
+    return false;
+  }
+
+  @Override
+  boolean getPaymentDateReadOnlyLogic(Map<String, String> requestMap) throws JSONException {
+    return false;
+  }
+
+  @Override
+  boolean getFinancialAccountReadOnlyLogic(Map<String, String> requestMap) throws JSONException {
+    return false;
+  }
+
+  @Override
+  boolean getCurrencyReadOnlyLogic(Map<String, String> requestMap) throws JSONException {
+    return true;
+  }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/TransactionAddOrderOrInvoiceFilterExpresion.java	Tue Aug 12 08:56:49 2014 +0200
@@ -0,0 +1,42 @@
+/*
+ *************************************************************************
+ * 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) 2014 Openbravo SLU
+ * All Rights Reserved.
+ * Contributor(s):  ______________________________________.
+ ************************************************************************
+ */
+package org.openbravo.advpaymentmngt.filterexpression;
+
+import java.util.Map;
+
+import org.codehaus.jettison.json.JSONException;
+import org.openbravo.advpaymentmngt.utility.APRMConstants;
+import org.openbravo.client.kernel.ComponentProvider;
+
+@ComponentProvider.Qualifier(APRMConstants.TRANSACTION_WINDOW_ID)
+public class TransactionAddOrderOrInvoiceFilterExpresion extends
+    AddOrderOrInvoiceFilterExpressionHandler {
+
+  private static final long SEQUENCE = 100l;
+
+  protected long getSeq() {
+    return SEQUENCE;
+  }
+
+  @Override
+  public String getFilterExpression(Map<String, String> requestMap) throws JSONException {
+    return getDefaultPaymentMethod(requestMap);
+  }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/TransactionAddPaymentDefaultValues.java	Tue Aug 12 08:56:49 2014 +0200
@@ -0,0 +1,193 @@
+/*
+ *************************************************************************
+ * 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) 2014 Openbravo SLU
+ * All Rights Reserved.
+ * Contributor(s):  ______________________________________.
+ ************************************************************************
+ */
+package org.openbravo.advpaymentmngt.filterexpression;
+
+import java.math.BigDecimal;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.Map;
+
+import org.apache.commons.lang.StringUtils;
+import org.codehaus.jettison.json.JSONException;
+import org.codehaus.jettison.json.JSONObject;
+import org.openbravo.advpaymentmngt.utility.APRMConstants;
+import org.openbravo.client.kernel.ComponentProvider;
+import org.openbravo.dal.service.OBDal;
+import org.openbravo.erpCommon.utility.OBDateUtils;
+import org.openbravo.model.financialmgmt.payment.FIN_FinancialAccount;
+import org.openbravo.model.financialmgmt.payment.FinAccPaymentMethod;
+
+@ComponentProvider.Qualifier(APRMConstants.TRANSACTION_WINDOW_ID)
+public class TransactionAddPaymentDefaultValues extends AddPaymentDefaultValuesHandler {
+
+  private static final long SEQUENCE = 100l;
+
+  protected long getSeq() {
+    return SEQUENCE;
+  }
+
+  @Override
+  String getDefaultExpectedAmount(Map<String, String> requestMap) throws JSONException {
+    return BigDecimal.ZERO.toPlainString();
+  }
+
+  @Override
+  String getDefaultActualAmount(Map<String, String> requestMap) throws JSONException {
+    return BigDecimal.ZERO.toPlainString();
+  }
+
+  @Override
+  String getDefaultIsSOTrx(Map<String, String> requestMap) throws JSONException {
+    JSONObject context = new JSONObject(requestMap.get("context"));
+    if (context.has("inptrxtype") && context.get("inptrxtype") != JSONObject.NULL
+        && StringUtils.isNotEmpty(context.getString("inptrxtype"))) {
+      String document = context.getString("inptrxtype");
+      if ("BPD".equals(document)) {
+        return "Y";
+      } else if ("BPW".equals(document)) {
+        return "N";
+      } else {
+        return "";
+      }
+    }
+    return "";
+  }
+
+  @Override
+  String getDefaultTransactionType(Map<String, String> requestMap) {
+    return "I";
+  }
+
+  @Override
+  String getDefaultPaymentType(Map<String, String> requestMap) throws JSONException {
+    return "";
+  }
+
+  @Override
+  String getDefaultOrderType(Map<String, String> requestMap) throws JSONException {
+    return "";
+  }
+
+  @Override
+  String getDefaultInvoiceType(Map<String, String> requestMap) throws JSONException {
+    return "";
+  }
+
+  @Override
+  String getDefaultConversionRate(Map<String, String> requestMap) throws JSONException {
+    return BigDecimal.ONE.toPlainString();
+  }
+
+  @Override
+  String getDefaultConvertedAmount(Map<String, String> requestMap) throws JSONException {
+    return BigDecimal.ZERO.toPlainString();
+  }
+
+  @Override
+  String getDefaultReceivedFrom(Map<String, String> requestMap) throws JSONException {
+    return "";
+  }
+
+  @Override
+  String getDefaultStandardPrecision(Map<String, String> requestMap) throws JSONException {
+    return getFinancialAccount(requestMap).getCurrency().getStandardPrecision().toString();
+  }
+
+  @Override
+  String getDefaultCurrency(Map<String, String> requestMap) throws JSONException {
+    return getFinancialAccount(requestMap).getCurrency().getId().toString();
+  }
+
+  @Override
+  String getOrganization(Map<String, String> requestMap) throws JSONException {
+    // Organization of the current Payment
+    return getFinancialAccount(requestMap).getOrganization().getId();
+  }
+
+  @Override
+  String getDefaultPaymentMethod(Map<String, String> requestMap) throws JSONException {
+    JSONObject context = new JSONObject(requestMap.get("context"));
+    boolean isReceipt = true;
+    if (context.has("IsSOTrx")) {
+      isReceipt = "Y".equals(context.get("IsSOTrx")) ? true : false;
+    }
+
+    FinAccPaymentMethod anyFinAccPaymentMethod = null;
+    for (FinAccPaymentMethod finAccPaymentMethod : getFinancialAccount(requestMap)
+        .getFinancialMgmtFinAccPaymentMethodList()) {
+      if (finAccPaymentMethod.isDefault()) {
+        if ((isReceipt && finAccPaymentMethod.isPayinAllow())
+            || (!isReceipt && finAccPaymentMethod.isPayoutAllow())) {
+          return finAccPaymentMethod.getPaymentMethod().getId();
+        }
+      }
+      if ((isReceipt && finAccPaymentMethod.isPayinAllow())
+          || (!isReceipt && finAccPaymentMethod.isPayoutAllow())) {
+        anyFinAccPaymentMethod = finAccPaymentMethod;
+      }
+    }
+    return anyFinAccPaymentMethod != null ? anyFinAccPaymentMethod.getPaymentMethod().getId() : "";
+  }
+
+  @Override
+  String getDefaultDocument(Map<String, String> requestMap) throws JSONException {
+    // Document Type
+    JSONObject context = new JSONObject(requestMap.get("context"));
+    if (context.has("inptrxtype") && context.get("inptrxtype") != JSONObject.NULL
+        && StringUtils.isNotEmpty(context.getString("inptrxtype"))) {
+      String document = context.getString("inptrxtype");
+      if ("BPD".equals(document)) {
+        return "RCIN";
+      } else if ("BPW".equals(document)) {
+        return "PDOUT";
+      } else {
+        return "";
+      }
+    }
+    return "";
+  }
+
+  @Override
+  String getDefaultPaymentDate(Map<String, String> requestMap) throws JSONException {
+    JSONObject context = new JSONObject(requestMap.get("context"));
+    if (context.has("inpstatementdate") && !context.isNull("inpstatementdate")
+        && !"".equals(context.getString("inpstatementdate"))) {
+      try {
+        Date date = new SimpleDateFormat("dd-MM-yyyy").parse(context.getString("inpstatementdate"));
+        return OBDateUtils.formatDate(date);
+      } catch (ParseException e) {
+        return OBDateUtils.formatDate(new Date());
+      }
+    } else {
+      return OBDateUtils.formatDate(new Date());
+    }
+  }
+
+  private FIN_FinancialAccount getFinancialAccount(Map<String, String> requestMap)
+      throws JSONException {
+    JSONObject context = new JSONObject(requestMap.get("context"));
+    if (context.has("inpfinFinancialAccountId") && !context.isNull("inpfinFinancialAccountId")
+        && !"".equals(context.getString("inpfinFinancialAccountId"))) {
+      return OBDal.getInstance().get(FIN_FinancialAccount.class,
+          context.get("inpfinFinancialAccountId"));
+    }
+    return null;
+  }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/TransactionAddPaymentDisplayLogics.java	Tue Aug 12 08:56:49 2014 +0200
@@ -0,0 +1,93 @@
+/*
+ *************************************************************************
+ * 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) 2014 Openbravo SLU
+ * All Rights Reserved.
+ * Contributor(s):  ______________________________________.
+ ************************************************************************
+ */
+package org.openbravo.advpaymentmngt.filterexpression;
+
+import java.math.BigDecimal;
+import java.util.Map;
+
+import org.codehaus.jettison.json.JSONException;
+import org.codehaus.jettison.json.JSONObject;
+import org.openbravo.advpaymentmngt.dao.AdvPaymentMngtDao;
+import org.openbravo.advpaymentmngt.utility.APRMConstants;
+import org.openbravo.client.kernel.ComponentProvider;
+import org.openbravo.dal.service.OBDal;
+import org.openbravo.model.common.businesspartner.BusinessPartner;
+import org.openbravo.model.common.enterprise.Organization;
+import org.openbravo.model.financialmgmt.payment.FIN_FinaccTransaction;
+
+@ComponentProvider.Qualifier(APRMConstants.TRANSACTION_WINDOW_ID)
+public class TransactionAddPaymentDisplayLogics extends AddPaymentDisplayLogicsHandler {
+
+  private static final long SEQUENCE = 100l;
+
+  protected long getSeq() {
+    return SEQUENCE;
+  }
+
+  @Override
+  boolean getDocumentDisplayLogic(Map<String, String> requestMap) throws JSONException {
+    // Document Type
+    return true;
+  }
+
+  @Override
+  boolean getCreditToUseDisplayLogic(Map<String, String> requestMap) throws JSONException {
+    JSONObject context = new JSONObject(requestMap.get("context"));
+    if (context.has("received_from") && !context.isNull("received_from")
+        && !"".equals(context.getString("received_from"))) {
+      String document = context.getString("trxtype");
+      String strBusinessPartner = context.getString("received_from");
+      if (getDefaultGeneratedCredit(requestMap).signum() == 0 || "RCIN".equals(document)) {
+        BusinessPartner bpartner = OBDal.getInstance().get(BusinessPartner.class,
+            strBusinessPartner);
+        Organization org = OBDal.getInstance().get(Organization.class, context.get("ad_org_id"));
+        BigDecimal customerCredit = new AdvPaymentMngtDao().getCustomerCredit(bpartner,
+            "RCIN".equals(document), org);
+        if (customerCredit.signum() > 0) {
+          return true;
+        } else {
+          return false;
+        }
+      } else {
+        return false;
+      }
+    } else {
+      return false;
+    }
+  }
+
+  private FIN_FinaccTransaction getTransaction(Map<String, String> requestMap) throws JSONException {
+    // Current Payment
+    JSONObject context = new JSONObject(requestMap.get("context"));
+    String strFinFinaccTransactionIdd = "";
+    if (context.has("inpfinFinaccTransactionId") && !context.isNull("inpfinFinaccTransactionId")) {
+      strFinFinaccTransactionIdd = context.getString("inpfinFinaccTransactionId");
+    }
+    if (context.has("Fin_Finacc_Transaction_ID") && !context.isNull("Fin_Finacc_Transaction_ID")) {
+      strFinFinaccTransactionIdd = context.getString("Fin_Finacc_Transaction_ID");
+    }
+    FIN_FinaccTransaction transaction = OBDal.getInstance().get(FIN_FinaccTransaction.class,
+        strFinFinaccTransactionIdd);
+    return transaction;
+  }
+
+  BigDecimal getDefaultGeneratedCredit(Map<String, String> requestMap) throws JSONException {
+    return BigDecimal.ZERO;
+  }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/TransactionAddPaymentReadOnlyLogics.java	Tue Aug 12 08:56:49 2014 +0200
@@ -0,0 +1,157 @@
+/*
+ *************************************************************************
+ * 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) 2014 Openbravo SLU
+ * All Rights Reserved.
+ * Contributor(s):  ______________________________________.
+ ************************************************************************
+ */
+package org.openbravo.advpaymentmngt.filterexpression;
+
+import java.util.Map;
+
+import org.codehaus.jettison.json.JSONException;
+import org.codehaus.jettison.json.JSONObject;
+import org.openbravo.advpaymentmngt.utility.APRMConstants;
+import org.openbravo.client.kernel.ComponentProvider;
+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;
+
+@ComponentProvider.Qualifier(APRMConstants.TRANSACTION_WINDOW_ID)
+public class TransactionAddPaymentReadOnlyLogics extends AddPaymentReadOnlyLogicsHandler {
+
+  private static final long SEQUENCE = 100l;
+
+  protected long getSeq() {
+    return SEQUENCE;
+  }
+
+  @Override
+  boolean getPaymentDocumentNoReadOnlyLogic(Map<String, String> requestMap) throws JSONException {
+    return false;
+  }
+
+  @Override
+  boolean getReceivedFromReadOnlyLogic(Map<String, String> requestMap) throws JSONException {
+    return false;
+  }
+
+  @Override
+  boolean getPaymentMethodReadOnlyLogic(Map<String, String> requestMap) throws JSONException {
+    return false;
+  }
+
+  @Override
+  boolean getActualPaymentReadOnlyLogic(Map<String, String> requestMap) throws JSONException {
+    JSONObject context = new JSONObject(requestMap.get("context"));
+    String document = null;
+    if (context.has("inptrxtype") && !context.isNull("inptrxtype")) {
+      document = context.getString("inptrxtype");
+    }
+    if (context.has("issotrx") && !context.isNull("issotrx")) {
+      document = context.getString("trxtype");
+    }
+    if ("BPD".equals(document) || "RCIN".equals(document)) {
+      return false;
+    } else {
+      return true;
+    }
+  }
+
+  @Override
+  boolean getPaymentDateReadOnlyLogic(Map<String, String> requestMap) throws JSONException {
+    return false;
+  }
+
+  @Override
+  boolean getFinancialAccountReadOnlyLogic(Map<String, String> requestMap) throws JSONException {
+    return true;
+  }
+
+  @Override
+  boolean getCurrencyReadOnlyLogic(Map<String, String> requestMap) throws JSONException {
+    JSONObject context = new JSONObject(requestMap.get("context"));
+    FIN_PaymentMethod paymentMethod = null;
+    FIN_FinancialAccount financialAccount = null;
+    boolean readOnly = true;
+    if (context.has("fin_paymentmethod_id") && !context.isNull("fin_paymentmethod_id")) {
+      paymentMethod = OBDal.getInstance().get(FIN_PaymentMethod.class,
+          context.getString("fin_paymentmethod_id"));
+    } else {
+      paymentMethod = OBDal.getInstance()
+          .get(FIN_PaymentMethod.class, getPaymentMethod(requestMap));
+    }
+    if (context.has("inpfinFinancialAccountId") && !context.isNull("inpfinFinancialAccountId")) {
+      financialAccount = OBDal.getInstance().get(FIN_FinancialAccount.class,
+          context.getString("inpfinFinancialAccountId"));
+    } else if (context.has("fin_financial_account_id")
+        && !context.isNull("fin_financial_account_id")) {
+      financialAccount = OBDal.getInstance().get(FIN_FinancialAccount.class,
+          context.getString("fin_financial_account_id"));
+    }
+
+    for (FinAccPaymentMethod finAccPaymentMethod : financialAccount
+        .getFinancialMgmtFinAccPaymentMethodList()) {
+      if (context.has("inptrxtype") && !context.isNull("inptrxtype")
+          && (context.getString("inptrxtype").toString().equals("RCIN"))) {
+        if (finAccPaymentMethod.getPaymentMethod().equals(paymentMethod)
+            && finAccPaymentMethod.isPayinIsMulticurrency()) {
+          readOnly = false;
+        }
+      } else {
+        if (finAccPaymentMethod.getPaymentMethod().equals(paymentMethod)
+            && finAccPaymentMethod.isPayoutIsMulticurrency()) {
+          readOnly = false;
+        }
+      }
+    }
+    return readOnly;
+  }
+
+  private String getPaymentMethod(Map<String, String> requestMap) throws JSONException {
+    JSONObject context = new JSONObject(requestMap.get("context"));
+    boolean isReceipt = true;
+    if (context.has("IsSOTrx")) {
+      isReceipt = "Y".equals(context.get("IsSOTrx")) ? true : false;
+    }
+
+    FinAccPaymentMethod anyFinAccPaymentMethod = null;
+    for (FinAccPaymentMethod finAccPaymentMethod : getFinancialAccount(requestMap)
+        .getFinancialMgmtFinAccPaymentMethodList()) {
+      if (finAccPaymentMethod.isDefault()) {
+        if ((isReceipt && finAccPaymentMethod.isPayinAllow())
+            || (!isReceipt && finAccPaymentMethod.isPayoutAllow())) {
+          return finAccPaymentMethod.getPaymentMethod().getId();
+        }
+      }
+      if ((isReceipt && finAccPaymentMethod.isPayinAllow())
+          || (!isReceipt && finAccPaymentMethod.isPayoutAllow())) {
+        anyFinAccPaymentMethod = finAccPaymentMethod;
+      }
+    }
+    return anyFinAccPaymentMethod != null ? anyFinAccPaymentMethod.getPaymentMethod().getId() : "";
+  }
+
+  private FIN_FinancialAccount getFinancialAccount(Map<String, String> requestMap)
+      throws JSONException {
+    JSONObject context = new JSONObject(requestMap.get("context"));
+    if (context.has("inpfinFinancialAccountId") && !context.isNull("inpfinFinancialAccountId")
+        && !"".equals(context.getString("inpfinFinancialAccountId"))) {
+      return OBDal.getInstance().get(FIN_FinancialAccount.class,
+          context.get("inpfinFinancialAccountId"));
+    }
+    return null;
+  }
+}
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/hqlinjections/AddPaymentOrderInvoicesTransformer.java	Tue Aug 12 08:32:37 2014 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/hqlinjections/AddPaymentOrderInvoicesTransformer.java	Tue Aug 12 08:56:49 2014 +0200
@@ -322,9 +322,10 @@
     int orgFilterIndex = hqlQuery.indexOf(" psd.organization in ", whereIndex);
     int beginIndex = hqlQuery.indexOf(" AND ", orgFilterIndex);
     int endIndex = hqlQuery.indexOf("and @whereClause@");
-    String gridFilters = hqlQuery.substring(beginIndex, endIndex);
-
-    hqlQuery = hqlQuery.replace(gridFilters, " ");
+    if (beginIndex != -1) {
+      String gridFilters = hqlQuery.substring(beginIndex, endIndex);
+      hqlQuery = hqlQuery.replace(gridFilters, " ");
+    }
     return hqlQuery;
   }
 
@@ -448,10 +449,10 @@
     if (havingGridFilters.contains("@amount@")) {
       havingGridFilters = havingGridFilters.replaceAll("@amount@", "COALESCE(sum(fp.amount), 0)");
     }
-
-    havingClause.append(" having ( " + havingGridFilters + " )");
+    if (havingGridFilters != null && !"".equals(havingGridFilters.trim())) {
+      havingClause.append(" having ( " + havingGridFilters + " )");
+    }
     hqlQuery = hqlQuery.replace("@havingClause@", havingClause.toString());
-
     return hqlQuery;
   }
 
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_TransactionProcess.java	Tue Aug 12 08:32:37 2014 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_TransactionProcess.java	Tue Aug 12 08:56:49 2014 +0200
@@ -63,7 +63,10 @@
       final String strAction = (String) bundle.getParams().get("action");
 
       // retrieve standard params
-      final String recordID = (String) bundle.getParams().get("Fin_FinAcc_Transaction_ID");
+      String recordID = (String) bundle.getParams().get("Fin_FinAcc_Transaction_ID");
+      if (recordID == null) {
+        recordID = (String) bundle.getParams().get("Fin_Finacc_Transaction_ID");
+      }
       final FIN_FinaccTransaction transaction = dao
           .getObject(FIN_FinaccTransaction.class, recordID);
       final VariablesSecureApp vars = bundle.getContext().toVars();
@@ -132,6 +135,7 @@
               && getConversionRateDocument(transaction).size() == 0) {
             insertConversionRateDocument(transaction);
           }
+          transaction.setAprmProcessed("R");
           OBDal.getInstance().save(financialAccount);
           OBDal.getInstance().save(transaction);
           OBDal.getInstance().flush();
@@ -202,6 +206,7 @@
             transaction.setStatus(transaction.getDepositAmount().compareTo(
                 transaction.getPaymentAmount()) > 0 ? "RPR" : "PPM");
           }
+          transaction.setAprmProcessed("P");
           OBDal.getInstance().save(transaction);
           OBDal.getInstance().flush();
           bundle.setResult(msg);
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/utility/APRMConstants.java	Tue Aug 12 08:32:37 2014 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/utility/APRMConstants.java	Tue Aug 12 08:56:49 2014 +0200
@@ -25,5 +25,6 @@
   public final static String PURCHASE_INVOICE_WINDOW_ID = "183";
   public final static String PAYMENT_IN_WINDOW_ID = "E547CE89D4C04429B6340FFA44E70716";
   public final static String PAYMENT_OUT_WINDOW_ID = "6F8F913FA60F4CBD93DC1D3AA696E76E";
+  public final static String TRANSACTION_WINDOW_ID = "94EAA455D2644E04AB25D93BE5157B6D";
 
 }
\ No newline at end of file
--- a/modules/org.openbravo.advpaymentmngt/web/org.openbravo.advpaymentmngt/js/ob-aprm-addPayment.js	Tue Aug 12 08:32:37 2014 +0200
+++ b/modules/org.openbravo.advpaymentmngt/web/org.openbravo.advpaymentmngt/js/ob-aprm-addPayment.js	Tue Aug 12 08:56:49 2014 +0200
@@ -98,8 +98,10 @@
       creditUseGrid = form.getItem('credit_to_use').canvas.viewGrid,
       overpaymentAction = form.getItem('overpayment_action'),
       payment = form.getItem('fin_payment_id').getValue(),
-      issotrx = form.getItem('issotrx').getValue();
+      issotrx = form.getItem('issotrx').getValue(),
+      trxtype = (form.getItem('trxtype')) ? form.getItem('trxtype').getValue() : "";
   OB.APRM.AddPayment.paymentMethodMulticurrency(view, view.theForm, !payment);
+  OB.APRM.AddPayment.reloadLabels(form);
   glitemGrid.fetchData();
   creditUseGrid.fetchData();
   orderInvoiceGrid.selectionChanged = OB.APRM.AddPayment.selectionChanged;
@@ -114,6 +116,9 @@
   if (issotrx) {
     form.focusInItem(form.getItem('actual_payment'));
   }
+  if (trxtype === "") {
+    form.removeField(0);
+  }
 };
 
 OB.APRM.AddPayment.addNewGLItem = function (grid) {
@@ -169,13 +174,47 @@
 };
 
 OB.APRM.AddPayment.financialAccountOnChange = function (item, view, form, grid) {
+  var affectedParams = [];
   OB.APRM.AddPayment.paymentMethodMulticurrency(view, form, true);
   OB.APRM.AddPayment.checkSingleActionAvailable(form);
+  affectedParams.push(form.getField('c_currency_id_readonly_logic').paramId);
+  OB.APRM.AddPayment.recalcDisplayLogicOrReadOnlyLogic(form, view, affectedParams);
 };
 
 OB.APRM.AddPayment.paymentMethodOnChange = function (item, view, form, grid) {
+  var ordinvgrid = form.getItem('order_invoice').canvas.viewGrid,
+      defaultFilter = {
+      paymentMethodName: item.getElementValue()
+      },
+      trxtype = (form.getItem('trxtype')) ? form.getItem('trxtype').getValue() : "",
+      affectedParams = [];
   OB.APRM.AddPayment.paymentMethodMulticurrency(view, form, true);
   OB.APRM.AddPayment.checkSingleActionAvailable(form);
+  if (trxtype !== "") {
+    ordinvgrid.setFilterEditorCriteria(defaultFilter);
+    ordinvgrid.filterByEditor();
+  }
+  affectedParams.push(form.getField('c_currency_id_readonly_logic').paramId);
+  OB.APRM.AddPayment.recalcDisplayLogicOrReadOnlyLogic(form, view, affectedParams);
+};
+
+OB.APRM.AddPayment.currencyOnChange = function (item, view, form, grid) {
+  var trxtype = (form.getItem('trxtype')) ? form.getItem('trxtype').getValue() : "",
+      ordinvgrid = form.getItem('order_invoice').canvas.viewGrid,
+      newCriteria;
+  if (trxtype !== "") {
+    OB.APRM.AddPayment.paymentMethodMulticurrency(view, form, true);
+
+    // fetch data after change trx type, filters should be preserved and ids of
+    // the selected records should be sent
+    newCriteria = ordinvgrid.addSelectedIDsToCriteria(ordinvgrid.getCriteria(), true);
+    newCriteria.criteria = newCriteria.criteria || [];
+    // add dummy criterion to force fetch
+    newCriteria.criteria.push(isc.OBRestDataSource.getDummyCriterion());
+    ordinvgrid.invalidateCache();
+
+    form.redraw();
+  }
 };
 
 OB.APRM.AddPayment.transactionTypeOnChangeFunction = function (item, view, form, grid) {
@@ -204,7 +243,7 @@
   newCriteria.criteria = newCriteria.criteria || [];
   // add dummy criterion to force fetch
   newCriteria.criteria.push(isc.OBRestDataSource.getDummyCriterion());
-  ordinvgrid.fetchData(newCriteria);
+  ordinvgrid.invalidateCache();
 
   form.redraw();
 };
@@ -385,7 +424,9 @@
       receivedFrom = form.getItem('received_from').getValue() || '',
       totalGLItems = new BigDecimal(String(form.getItem('amount_gl_items').getValue() || 0)),
       diffAmt = actualPayment.add(credit).subtract(total),
-      expectedDiffAmt = expectedPayment.add(credit).subtract(total).add(totalGLItems);
+      expectedDiffAmt = expectedPayment.add(credit).subtract(total).add(totalGLItems),
+      affectedParams = [],
+      displayLogicValues = {};
   differenceItem.setValue(Number(diffAmt.toString()));
   if (expectedDiffAmt.signum() === 0) {
     expectedDifferenceItem.setValue(Number(diffAmt.toString()));
@@ -395,6 +436,8 @@
   if (diffAmt.signum() !== 0) {
     OB.APRM.AddPayment.updateDifferenceActions(form);
   }
+  affectedParams.push(form.getField('overpayment_action_display_logic').paramId);
+  OB.APRM.AddPayment.recalcDisplayLogicOrReadOnlyLogic(form, null, affectedParams);
 };
 
 OB.APRM.AddPayment.updateDifferenceActions = function (form) {
@@ -402,7 +445,11 @@
       overpaymentAction = form.getItem('overpayment_action'),
       actualPayment = new BigDecimal(String(form.getItem('actual_payment').getValue() || 0)),
       newValueMap = {},
-      defaultValue = '';
+      defaultValue = '',
+      trxtype = (form.getItem('trxtype')) ? form.getItem('trxtype').getValue() : "";
+  if (trxtype !== "") {
+    form.isCreditAllowed = form.getItem('received_from').getValue() !== undefined;
+  }
   // Update difference action available values.
   if (form.isCreditAllowed) {
     newValueMap.CR = overpaymentAction.originalValueMap.CR;
@@ -730,6 +777,122 @@
   return retVal;
 };
 
+OB.APRM.AddPayment.documentOnChange = function (item, view, form, grid) {
+  var document = (form.getItem('trxtype')) ? form.getItem('trxtype').getValue() : "",
+      issotrx = form.getItem('issotrx'),
+      affectedParams = [],
+      ordinvgrid = form.getItem('order_invoice').canvas.viewGrid,
+      newCriteria;
+  if (document === 'RCIN') {
+    issotrx.setValue(true);
+  } else {
+    issotrx.setValue(false);
+  }
+
+  form.getItem('fin_paymentmethod_id').setValue(null);
+  form.getItem('received_from').setValue(null);
+  OB.APRM.AddPayment.reloadLabels(form);
+  affectedParams.push(form.getField('credit_to_use_display_logic').paramId);
+  affectedParams.push(form.getField('actual_payment_readonly_logic').paramId);
+  OB.APRM.AddPayment.recalcDisplayLogicOrReadOnlyLogic(form, view, affectedParams);
+
+  if (document !== "") {
+    // fetch data after change trx type, filters should be preserved and ids of
+    // the selected records should be sent
+    newCriteria = ordinvgrid.addSelectedIDsToCriteria(ordinvgrid.getCriteria(), true);
+    newCriteria.criteria = newCriteria.criteria || [];
+    // add dummy criterion to force fetch
+    newCriteria.criteria.push(isc.OBRestDataSource.getDummyCriterion());
+    ordinvgrid.invalidateCache();
+    form.redraw();
+  }
+};
+
+OB.APRM.AddPayment.receivedFromOnChange = function (item, view, form, grid) {
+  var affectedParams = [],
+      trxtype = (form.getItem('trxtype')) ? form.getItem('trxtype').getValue() : "",
+      callback, receivedFrom = form.getItem('received_from').getValue(),
+      isSOTrx = form.getItem('issotrx').getValue(),
+      financialAccount = form.getItem('fin_financial_account_id').getValue();
+  affectedParams.push(form.getField('credit_to_use_display_logic').paramId);
+  OB.APRM.AddPayment.recalcDisplayLogicOrReadOnlyLogic(form, view, affectedParams);
+
+  callback = function (response, data, request) {
+    form.getItem('fin_paymentmethod_id').setValue(data.paymentMethodId);
+  };
+
+  if (trxtype !== "") {
+    OB.RemoteCallManager.call('org.openbravo.advpaymentmngt.actionHandler.ReceivedFromPaymentMethodActionHandler', {
+      receivedFrom: receivedFrom,
+      isSOTrx: isSOTrx,
+      financialAccount: financialAccount
+    }, {}, callback);
+  }
+};
+
+OB.APRM.AddPayment.recalcDisplayLogicOrReadOnlyLogic = function (form, view, affectedParams) {
+  var callbackDisplayLogicActionHandler, params = {},
+      thisform, thisview, creditUseGrid = form.getItem('credit_to_use').canvas.viewGrid;
+  thisform = form;
+  thisview = view;
+  params.context = form.paramWindow.getContextInfo();
+  params.context.inpwindowId = form.paramWindow.parentWindow.windowId;
+
+  callbackDisplayLogicActionHandler = function (response, data, request) {
+    var i, field, def, values = data.values,
+        newCriteria = {};
+
+    for (i in values) {
+      if (values.hasOwnProperty(i)) {
+        def = values[i];
+        field = thisform.getItem(i);
+        if (field) {
+          if (isc.isA.Object(def)) {
+            if (def.identifier && def.value) {
+              field.valueMap = field.valueMap || {};
+              field.valueMap[def.value] = def.identifier;
+              field.setValue(def.value);
+            }
+          } else {
+            field.setValue(thisform.paramWindow.getTypeSafeValue(field.typeInstance, def));
+          }
+        }
+      }
+    }
+    if (thisview) {
+      thisview.handleReadOnlyLogic();
+    }
+    // If credit grid is now displayed fetch data
+    if (values.credit_to_use_display_logic && values.credit_to_use_display_logic === 'Y') {
+      newCriteria.criteria = [];
+      // add dummy criterion to force fetch
+      newCriteria.criteria.push(isc.OBRestDataSource.getDummyCriterion());
+      creditUseGrid.fetchData(newCriteria);
+    }
+    thisform.markForRedraw();
+  };
+
+  OB.RemoteCallManager.call('org.openbravo.advpaymentmngt.actionHandler.AddPaymentDisplayLogicActionHandler', {
+    affectedParams: affectedParams,
+    params: params
+  }, {}, callbackDisplayLogicActionHandler);
+};
+
+OB.APRM.AddPayment.reloadLabels = function (form) {
+  var callbackReloadLabelsActionHandler, params = {};
+  params.businessPartner = form.getItem('received_from').paramId;
+  params.financialAccount = form.getItem('fin_financial_account_id').paramId;
+  params.issotrx = form.getItem('issotrx').getValue();
+
+  callbackReloadLabelsActionHandler = function (response, data, request) {
+    form.getItem('received_from').title = data.values.businessPartner;
+    form.getItem('fin_financial_account_id').title = data.values.financialAccount;
+    form.markForRedraw();
+  };
+
+  OB.RemoteCallManager.call('org.openbravo.advpaymentmngt.actionHandler.AddPaymentReloadLabelsActionHandler', {}, params, callbackReloadLabelsActionHandler);
+};
+
 OB.APRM.AddPayment.onProcess = function (view, actionHandlerCall) {
   var orderInvoiceGrid = view.theForm.getItem('order_invoice').canvas.viewGrid,
       receivedFrom = view.theForm.getItem('received_from').getValue(),
@@ -740,6 +903,7 @@
       actualPayment = new BigDecimal(String(view.theForm.getItem('actual_payment').getValue() || 0)),
       overpaymentAction = view.theForm.getItem('overpayment_action').getValue(),
       creditTotalItem = new BigDecimal(String(view.theForm.getItem('used_credit').getValue() || 0)),
+      document = (view.theForm.getItem('trxtype')) ? view.theForm.getItem('trxtype').getValue() : "",
       amountField = orderInvoiceGrid.getFieldByColumnName('amount'),
       selectedRecords = orderInvoiceGrid.getSelectedRecords(),
       writeOffLimitPreference = OB.PropertyStore.get('WriteOffLimitPreference', view.windowId),
@@ -785,6 +949,11 @@
     return false;
   }
 
+  if (document !== null && document !== '' && actualPayment.compareTo(BigDecimal.prototype.ZERO) === 0) {
+    view.messageBar.setMessage(isc.OBMessageBar.TYPE_ERROR, null, OB.I18N.getLabel('APRM_ZEROAMOUNTPAYMENTTRANSACTION'));
+    return false;
+  }
+
   callbackOnProcessActionHandler = function (response, data, request) {
     //Check if there are blocked Business Partners
     if (data.message.severity === 'error') {
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/process/ob-parameter-window-form.js	Tue Aug 12 08:32:37 2014 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/process/ob-parameter-window-form.js	Tue Aug 12 08:56:49 2014 +0200
@@ -67,6 +67,7 @@
       this.redraw();
     }
     this.paramWindow.okButton.setEnabled(this.paramWindow.allRequiredParametersSet());
+    item._hasChanged = false;
   },
 
   setFieldSections: function () {
--- a/modules/org.openbravo.financial.paymentreport/src/org/openbravo/financial/paymentreport/erpCommon/ad_reports/PaymentReportDao.java	Tue Aug 12 08:32:37 2014 +0200
+++ b/modules/org.openbravo.financial.paymentreport/src/org/openbravo/financial/paymentreport/erpCommon/ad_reports/PaymentReportDao.java	Tue Aug 12 08:56:49 2014 +0200
@@ -1714,6 +1714,7 @@
       obCriteriaTrans.createAlias(FIN_FinaccTransaction.PROPERTY_ACCOUNT, "acc",
           OBCriteria.LEFT_JOIN);
       obCriteriaTrans.add(Restrictions.isNull(FIN_FinaccTransaction.PROPERTY_FINPAYMENT));
+      obCriteriaTrans.add(Restrictions.eq(FIN_FinaccTransaction.PROPERTY_PROCESSED, true));
       obCriteriaTrans.add(Restrictions.in(FIN_FinaccTransaction.PROPERTY_ORGANIZATION,
           organizations));
 
--- a/src-db/database/model/tables/FIN_FINACC_TRANSACTION.xml	Tue Aug 12 08:32:37 2014 +0200
+++ b/src-db/database/model/tables/FIN_FINACC_TRANSACTION.xml	Tue Aug 12 08:56:49 2014 +0200
@@ -212,6 +212,7 @@
       <unique name="FIN_FINACC_TRANSACTION_UN">
         <unique-column name="FIN_PAYMENT_ID"/>
       </unique>
+      <check name="FIN_TRANS_AMOUNTS_CHK"><![CDATA[(PAYMENTAMT <> 0) OR (DEPOSITAMT <> 0)]]></check>
       <check name="FIN_TRANS_CREATE_ALGORITHM_CHK"><![CDATA[CREATEDBYALGORITHM IN ('Y', 'N')]]></check>
       <check name="FIN_TRANS_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
     </table>
--- a/src-db/database/sourcedata/AD_AUXILIARINPUT.xml	Tue Aug 12 08:32:37 2014 +0200
+++ b/src-db/database/sourcedata/AD_AUXILIARINPUT.xml	Tue Aug 12 08:56:49 2014 +0200
@@ -3190,7 +3190,7 @@
 <!--DCA04CBCB2454C7690E5F131326F06EF-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--DCA04CBCB2454C7690E5F131326F06EF-->  <AD_TAB_ID><![CDATA[23691259D1BD4496BCC5F32645BCA4B9]]></AD_TAB_ID>
 <!--DCA04CBCB2454C7690E5F131326F06EF-->  <NAME><![CDATA[IsSOTrx]]></NAME>
-<!--DCA04CBCB2454C7690E5F131326F06EF-->  <CODE><![CDATA[@SQL=SELECT COALESCE(ISRECEIPT,'Y') AS ISRECEIPT FROM FIN_PAYMENT WHERE FIN_PAYMENT_ID = @FIN_PAYMENT_ID@]]></CODE>
+<!--DCA04CBCB2454C7690E5F131326F06EF-->  <CODE><![CDATA[@SQL=select case when trxtype = 'BPW' then 'N' else 'Y' end from fin_finacc_transaction where fin_finacc_transaction_id = @fin_finacc_transaction_id@]]></CODE>
 <!--DCA04CBCB2454C7690E5F131326F06EF-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--DCA04CBCB2454C7690E5F131326F06EF--></AD_AUXILIARINPUT>
 
--- a/src-db/database/sourcedata/AD_CALLOUT.xml	Tue Aug 12 08:32:37 2014 +0200
+++ b/src-db/database/sourcedata/AD_CALLOUT.xml	Tue Aug 12 08:56:49 2014 +0200
@@ -686,6 +686,15 @@
 <!--018982E40A7949429AE0E5C119BD89A4-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--018982E40A7949429AE0E5C119BD89A4--></AD_CALLOUT>
 
+<!--027529F7CAC84C918C1E66F0B9A4B466--><AD_CALLOUT>
+<!--027529F7CAC84C918C1E66F0B9A4B466-->  <AD_CALLOUT_ID><![CDATA[027529F7CAC84C918C1E66F0B9A4B466]]></AD_CALLOUT_ID>
+<!--027529F7CAC84C918C1E66F0B9A4B466-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--027529F7CAC84C918C1E66F0B9A4B466-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--027529F7CAC84C918C1E66F0B9A4B466-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--027529F7CAC84C918C1E66F0B9A4B466-->  <NAME><![CDATA[SE_Trxtype_Transaction]]></NAME>
+<!--027529F7CAC84C918C1E66F0B9A4B466-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--027529F7CAC84C918C1E66F0B9A4B466--></AD_CALLOUT>
+
 <!--056C5E9668194D478889D8043BFBF95C--><AD_CALLOUT>
 <!--056C5E9668194D478889D8043BFBF95C-->  <AD_CALLOUT_ID><![CDATA[056C5E9668194D478889D8043BFBF95C]]></AD_CALLOUT_ID>
 <!--056C5E9668194D478889D8043BFBF95C-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -751,6 +760,15 @@
 <!--16E14A45CD654B78B2C22C1EF5B84A74-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--16E14A45CD654B78B2C22C1EF5B84A74--></AD_CALLOUT>
 
+<!--1D72DBC1B228453A9A64443CAC145991--><AD_CALLOUT>
+<!--1D72DBC1B228453A9A64443CAC145991-->  <AD_CALLOUT_ID><![CDATA[1D72DBC1B228453A9A64443CAC145991]]></AD_CALLOUT_ID>
+<!--1D72DBC1B228453A9A64443CAC145991-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--1D72DBC1B228453A9A64443CAC145991-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--1D72DBC1B228453A9A64443CAC145991-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--1D72DBC1B228453A9A64443CAC145991-->  <NAME><![CDATA[SE_Payment_Transaction]]></NAME>
+<!--1D72DBC1B228453A9A64443CAC145991-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--1D72DBC1B228453A9A64443CAC145991--></AD_CALLOUT>
+
 <!--20FE1F365075451E95AE901650183CC7--><AD_CALLOUT>
 <!--20FE1F365075451E95AE901650183CC7-->  <AD_CALLOUT_ID><![CDATA[20FE1F365075451E95AE901650183CC7]]></AD_CALLOUT_ID>
 <!--20FE1F365075451E95AE901650183CC7-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src-db/database/sourcedata/AD_COLUMN.xml	Tue Aug 12 08:32:37 2014 +0200
+++ b/src-db/database/sourcedata/AD_COLUMN.xml	Tue Aug 12 08:56:49 2014 +0200
@@ -267600,7 +267600,7 @@
 <!--7891269C8418655DE040007F010155CE-->  <COLUMNNAME><![CDATA[Fin_Payment_ID]]></COLUMNNAME>
 <!--7891269C8418655DE040007F010155CE-->  <AD_TABLE_ID><![CDATA[4D8C3B3C31D1410DA046140C9F024D17]]></AD_TABLE_ID>
 <!--7891269C8418655DE040007F010155CE-->  <AD_REFERENCE_ID><![CDATA[95E2A8B50A254B2AAE6774B8C2F28120]]></AD_REFERENCE_ID>
-<!--7891269C8418655DE040007F010155CE-->  <AD_REFERENCE_VALUE_ID><![CDATA[4BEF5D0691664A939E8710FA9EB0BAF5]]></AD_REFERENCE_VALUE_ID>
+<!--7891269C8418655DE040007F010155CE-->  <AD_REFERENCE_VALUE_ID><![CDATA[EE2E61C84926484C809BEBBCED00C7E3]]></AD_REFERENCE_VALUE_ID>
 <!--7891269C8418655DE040007F010155CE-->  <FIELDLENGTH><![CDATA[32]]></FIELDLENGTH>
 <!--7891269C8418655DE040007F010155CE-->  <ISKEY><![CDATA[N]]></ISKEY>
 <!--7891269C8418655DE040007F010155CE-->  <ISPARENT><![CDATA[N]]></ISPARENT>
@@ -267615,6 +267615,7 @@
 <!--7891269C8418655DE040007F010155CE-->  <ISSESSIONATTR><![CDATA[Y]]></ISSESSIONATTR>
 <!--7891269C8418655DE040007F010155CE-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
 <!--7891269C8418655DE040007F010155CE-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--7891269C8418655DE040007F010155CE-->  <AD_CALLOUT_ID><![CDATA[1D72DBC1B228453A9A64443CAC145991]]></AD_CALLOUT_ID>
 <!--7891269C8418655DE040007F010155CE-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
 <!--7891269C8418655DE040007F010155CE-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--7891269C8418655DE040007F010155CE-->  <POSITION><![CDATA[12]]></POSITION>
@@ -267676,6 +267677,7 @@
 <!--7891269C841B655DE040007F010155CE-->  <AD_REFERENCE_VALUE_ID><![CDATA[575BCB88A4694C27BC013DE9C73E6FE7]]></AD_REFERENCE_VALUE_ID>
 <!--7891269C841B655DE040007F010155CE-->  <AD_VAL_RULE_ID><![CDATA[7A86F689FB1C46F19DBE338D6DECD703]]></AD_VAL_RULE_ID>
 <!--7891269C841B655DE040007F010155CE-->  <FIELDLENGTH><![CDATA[40]]></FIELDLENGTH>
+<!--7891269C841B655DE040007F010155CE-->  <DEFAULTVALUE><![CDATA['RPAP']]></DEFAULTVALUE>
 <!--7891269C841B655DE040007F010155CE-->  <ISKEY><![CDATA[N]]></ISKEY>
 <!--7891269C841B655DE040007F010155CE-->  <ISPARENT><![CDATA[N]]></ISPARENT>
 <!--7891269C841B655DE040007F010155CE-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
@@ -267715,6 +267717,7 @@
 <!--7891269C841C655DE040007F010155CE-->  <ISPARENT><![CDATA[N]]></ISPARENT>
 <!--7891269C841C655DE040007F010155CE-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
 <!--7891269C841C655DE040007F010155CE-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--7891269C841C655DE040007F010155CE-->  <READONLYLOGIC><![CDATA[(@Fin_Payment_ID@!''&@Fin_Payment_ID@!null)|@Processed@='Y'|@Trxtype@='BPD']]></READONLYLOGIC>
 <!--7891269C841C655DE040007F010155CE-->  <ISIDENTIFIER><![CDATA[Y]]></ISIDENTIFIER>
 <!--7891269C841C655DE040007F010155CE-->  <SEQNO><![CDATA[150]]></SEQNO>
 <!--7891269C841C655DE040007F010155CE-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
@@ -267749,6 +267752,7 @@
 <!--7891269C841D655DE040007F010155CE-->  <ISPARENT><![CDATA[N]]></ISPARENT>
 <!--7891269C841D655DE040007F010155CE-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
 <!--7891269C841D655DE040007F010155CE-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--7891269C841D655DE040007F010155CE-->  <READONLYLOGIC><![CDATA[(@Fin_Payment_ID@!''&@Fin_Payment_ID@!null)|@Processed@='Y'|@Trxtype@='BPW']]></READONLYLOGIC>
 <!--7891269C841D655DE040007F010155CE-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
 <!--7891269C841D655DE040007F010155CE-->  <SEQNO><![CDATA[160]]></SEQNO>
 <!--7891269C841D655DE040007F010155CE-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
@@ -267791,7 +267795,7 @@
 <!--7891269C841E655DE040007F010155CE-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
 <!--7891269C841E655DE040007F010155CE-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
 <!--7891269C841E655DE040007F010155CE-->  <AD_ELEMENT_ID><![CDATA[1047]]></AD_ELEMENT_ID>
-<!--7891269C841E655DE040007F010155CE-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--7891269C841E655DE040007F010155CE-->  <ISSESSIONATTR><![CDATA[Y]]></ISSESSIONATTR>
 <!--7891269C841E655DE040007F010155CE-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
 <!--7891269C841E655DE040007F010155CE-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
 <!--7891269C841E655DE040007F010155CE-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
@@ -270268,9 +270272,10 @@
 <!--7DC34559B416B45BE040007F0100784A-->  <AD_TABLE_ID><![CDATA[4D8C3B3C31D1410DA046140C9F024D17]]></AD_TABLE_ID>
 <!--7DC34559B416B45BE040007F0100784A-->  <AD_REFERENCE_ID><![CDATA[15]]></AD_REFERENCE_ID>
 <!--7DC34559B416B45BE040007F0100784A-->  <FIELDLENGTH><![CDATA[19]]></FIELDLENGTH>
+<!--7DC34559B416B45BE040007F0100784A-->  <DEFAULTVALUE><![CDATA[@#Date@]]></DEFAULTVALUE>
 <!--7DC34559B416B45BE040007F0100784A-->  <ISKEY><![CDATA[N]]></ISKEY>
 <!--7DC34559B416B45BE040007F0100784A-->  <ISPARENT><![CDATA[N]]></ISPARENT>
-<!--7DC34559B416B45BE040007F0100784A-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
+<!--7DC34559B416B45BE040007F0100784A-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
 <!--7DC34559B416B45BE040007F0100784A-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
 <!--7DC34559B416B45BE040007F0100784A-->  <READONLYLOGIC><![CDATA[@Posted@='Y']]></READONLYLOGIC>
 <!--7DC34559B416B45BE040007F0100784A-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
@@ -279980,9 +279985,10 @@
 <!--828EE0AE801C5FA1E040007F010067C7-->  <AD_REFERENCE_ID><![CDATA[17]]></AD_REFERENCE_ID>
 <!--828EE0AE801C5FA1E040007F010067C7-->  <AD_REFERENCE_VALUE_ID><![CDATA[4EFC9773F30B4ACE97D225BD13CFF8CB]]></AD_REFERENCE_VALUE_ID>
 <!--828EE0AE801C5FA1E040007F010067C7-->  <FIELDLENGTH><![CDATA[60]]></FIELDLENGTH>
+<!--828EE0AE801C5FA1E040007F010067C7-->  <DEFAULTVALUE><![CDATA[BPD]]></DEFAULTVALUE>
 <!--828EE0AE801C5FA1E040007F010067C7-->  <ISKEY><![CDATA[N]]></ISKEY>
 <!--828EE0AE801C5FA1E040007F010067C7-->  <ISPARENT><![CDATA[N]]></ISPARENT>
-<!--828EE0AE801C5FA1E040007F010067C7-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
+<!--828EE0AE801C5FA1E040007F010067C7-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
 <!--828EE0AE801C5FA1E040007F010067C7-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
 <!--828EE0AE801C5FA1E040007F010067C7-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
 <!--828EE0AE801C5FA1E040007F010067C7-->  <SEQNO><![CDATA[260]]></SEQNO>
@@ -279993,6 +279999,7 @@
 <!--828EE0AE801C5FA1E040007F010067C7-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
 <!--828EE0AE801C5FA1E040007F010067C7-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
 <!--828EE0AE801C5FA1E040007F010067C7-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--828EE0AE801C5FA1E040007F010067C7-->  <AD_CALLOUT_ID><![CDATA[027529F7CAC84C918C1E66F0B9A4B466]]></AD_CALLOUT_ID>
 <!--828EE0AE801C5FA1E040007F010067C7-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
 <!--828EE0AE801C5FA1E040007F010067C7-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--828EE0AE801C5FA1E040007F010067C7-->  <POSITION><![CDATA[26]]></POSITION>
@@ -280015,10 +280022,12 @@
 <!--828EE0AE801D5FA1E040007F010067C7-->  <AD_TABLE_ID><![CDATA[4D8C3B3C31D1410DA046140C9F024D17]]></AD_TABLE_ID>
 <!--828EE0AE801D5FA1E040007F010067C7-->  <AD_REFERENCE_ID><![CDATA[15]]></AD_REFERENCE_ID>
 <!--828EE0AE801D5FA1E040007F010067C7-->  <FIELDLENGTH><![CDATA[19]]></FIELDLENGTH>
+<!--828EE0AE801D5FA1E040007F010067C7-->  <DEFAULTVALUE><![CDATA[@#Date@]]></DEFAULTVALUE>
 <!--828EE0AE801D5FA1E040007F010067C7-->  <ISKEY><![CDATA[N]]></ISKEY>
 <!--828EE0AE801D5FA1E040007F010067C7-->  <ISPARENT><![CDATA[N]]></ISPARENT>
-<!--828EE0AE801D5FA1E040007F010067C7-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
+<!--828EE0AE801D5FA1E040007F010067C7-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
 <!--828EE0AE801D5FA1E040007F010067C7-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--828EE0AE801D5FA1E040007F010067C7-->  <READONLYLOGIC><![CDATA[@Processed@='Y']]></READONLYLOGIC>
 <!--828EE0AE801D5FA1E040007F010067C7-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
 <!--828EE0AE801D5FA1E040007F010067C7-->  <SEQNO><![CDATA[270]]></SEQNO>
 <!--828EE0AE801D5FA1E040007F010067C7-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
@@ -311588,7 +311597,7 @@
 <!--C9AE822116F94B6B9272608ED348FB52-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
 <!--C9AE822116F94B6B9272608ED348FB52-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
 <!--C9AE822116F94B6B9272608ED348FB52-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
-<!--C9AE822116F94B6B9272608ED348FB52-->  <POSITION><![CDATA[39]]></POSITION>
+<!--C9AE822116F94B6B9272608ED348FB52-->  <POSITION><![CDATA[37]]></POSITION>
 <!--C9AE822116F94B6B9272608ED348FB52-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
 <!--C9AE822116F94B6B9272608ED348FB52-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
 <!--C9AE822116F94B6B9272608ED348FB52-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
--- a/src-db/database/sourcedata/AD_FIELD.xml	Tue Aug 12 08:32:37 2014 +0200
+++ b/src-db/database/sourcedata/AD_FIELD.xml	Tue Aug 12 08:56:49 2014 +0200
@@ -180884,7 +180884,7 @@
 <!--14BBEDAA976541A0930A98363EA47253-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
 <!--14BBEDAA976541A0930A98363EA47253-->  <AD_FIELDGROUP_ID><![CDATA[800000]]></AD_FIELDGROUP_ID>
 <!--14BBEDAA976541A0930A98363EA47253-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
-<!--14BBEDAA976541A0930A98363EA47253-->  <DISPLAYLOGIC><![CDATA[@$Element_MC@='Y']]></DISPLAYLOGIC>
+<!--14BBEDAA976541A0930A98363EA47253-->  <DISPLAYLOGIC><![CDATA[@$Element_MC@='Y' & @Trxtype@!'']]></DISPLAYLOGIC>
 <!--14BBEDAA976541A0930A98363EA47253-->  <DISPLAYLENGTH><![CDATA[32]]></DISPLAYLENGTH>
 <!--14BBEDAA976541A0930A98363EA47253-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--14BBEDAA976541A0930A98363EA47253-->  <SEQNO><![CDATA[2040]]></SEQNO>
@@ -190420,6 +190420,7 @@
 <!--31DD84CF16C547EC9713DCDAD01E03C0-->  <AD_COLUMN_ID><![CDATA[7891269C8420655DE040007F010155CE]]></AD_COLUMN_ID>
 <!--31DD84CF16C547EC9713DCDAD01E03C0-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
 <!--31DD84CF16C547EC9713DCDAD01E03C0-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--31DD84CF16C547EC9713DCDAD01E03C0-->  <DISPLAYLOGIC><![CDATA[@Processed@='Y']]></DISPLAYLOGIC>
 <!--31DD84CF16C547EC9713DCDAD01E03C0-->  <DISPLAYLENGTH><![CDATA[60]]></DISPLAYLENGTH>
 <!--31DD84CF16C547EC9713DCDAD01E03C0-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--31DD84CF16C547EC9713DCDAD01E03C0-->  <SEQNO><![CDATA[140]]></SEQNO>
@@ -192784,10 +192785,10 @@
 <!--39B39D8823BF4492A9FCD6075F33202F-->  <AD_COLUMN_ID><![CDATA[7891269C841A655DE040007F010155CE]]></AD_COLUMN_ID>
 <!--39B39D8823BF4492A9FCD6075F33202F-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
 <!--39B39D8823BF4492A9FCD6075F33202F-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
-<!--39B39D8823BF4492A9FCD6075F33202F-->  <DISPLAYLOGIC><![CDATA[@Fin_Payment_ID@='']]></DISPLAYLOGIC>
+<!--39B39D8823BF4492A9FCD6075F33202F-->  <DISPLAYLOGIC><![CDATA[@Trxtype@!'' & @Trxtype@!'BF']]></DISPLAYLOGIC>
 <!--39B39D8823BF4492A9FCD6075F33202F-->  <DISPLAYLENGTH><![CDATA[32]]></DISPLAYLENGTH>
 <!--39B39D8823BF4492A9FCD6075F33202F-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
-<!--39B39D8823BF4492A9FCD6075F33202F-->  <SEQNO><![CDATA[70]]></SEQNO>
+<!--39B39D8823BF4492A9FCD6075F33202F-->  <SEQNO><![CDATA[60]]></SEQNO>
 <!--39B39D8823BF4492A9FCD6075F33202F-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--39B39D8823BF4492A9FCD6075F33202F-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--39B39D8823BF4492A9FCD6075F33202F-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
@@ -192796,7 +192797,7 @@
 <!--39B39D8823BF4492A9FCD6075F33202F-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--39B39D8823BF4492A9FCD6075F33202F-->  <GRID_SEQNO><![CDATA[40]]></GRID_SEQNO>
 <!--39B39D8823BF4492A9FCD6075F33202F-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
-<!--39B39D8823BF4492A9FCD6075F33202F-->  <STARTNEWLINE><![CDATA[Y]]></STARTNEWLINE>
+<!--39B39D8823BF4492A9FCD6075F33202F-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
 <!--39B39D8823BF4492A9FCD6075F33202F-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
 <!--39B39D8823BF4492A9FCD6075F33202F-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
 <!--39B39D8823BF4492A9FCD6075F33202F--></AD_FIELD>
@@ -196671,7 +196672,7 @@
 <!--47258ECF7D664AE4849BCD833382B90D-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
 <!--47258ECF7D664AE4849BCD833382B90D-->  <AD_FIELDGROUP_ID><![CDATA[800000]]></AD_FIELDGROUP_ID>
 <!--47258ECF7D664AE4849BCD833382B90D-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
-<!--47258ECF7D664AE4849BCD833382B90D-->  <DISPLAYLOGIC><![CDATA[@ACCT_DIMENSION_DISPLAY@]]></DISPLAYLOGIC>
+<!--47258ECF7D664AE4849BCD833382B90D-->  <DISPLAYLOGIC><![CDATA[@ACCT_DIMENSION_DISPLAY@ & @Trxtype@!'']]></DISPLAYLOGIC>
 <!--47258ECF7D664AE4849BCD833382B90D-->  <DISPLAYLENGTH><![CDATA[32]]></DISPLAYLENGTH>
 <!--47258ECF7D664AE4849BCD833382B90D-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--47258ECF7D664AE4849BCD833382B90D-->  <SEQNO><![CDATA[2080]]></SEQNO>
@@ -214894,7 +214895,7 @@
 <!--63CB20B31B204C198CD93C7B973E44DC-->  <DISPLAYLOGIC><![CDATA[@FIN_Reconciliation_ID@!'']]></DISPLAYLOGIC>
 <!--63CB20B31B204C198CD93C7B973E44DC-->  <DISPLAYLENGTH><![CDATA[32]]></DISPLAYLENGTH>
 <!--63CB20B31B204C198CD93C7B973E44DC-->  <ISREADONLY><![CDATA[Y]]></ISREADONLY>
-<!--63CB20B31B204C198CD93C7B973E44DC-->  <SEQNO><![CDATA[40]]></SEQNO>
+<!--63CB20B31B204C198CD93C7B973E44DC-->  <SEQNO><![CDATA[1]]></SEQNO>
 <!--63CB20B31B204C198CD93C7B973E44DC-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--63CB20B31B204C198CD93C7B973E44DC-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--63CB20B31B204C198CD93C7B973E44DC-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
@@ -216177,7 +216178,7 @@
 <!--6867D362A7994C4C8D35650527889F90-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
 <!--6867D362A7994C4C8D35650527889F90-->  <AD_FIELDGROUP_ID><![CDATA[800000]]></AD_FIELDGROUP_ID>
 <!--6867D362A7994C4C8D35650527889F90-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
-<!--6867D362A7994C4C8D35650527889F90-->  <DISPLAYLOGIC><![CDATA[@ACCT_DIMENSION_DISPLAY@]]></DISPLAYLOGIC>
+<!--6867D362A7994C4C8D35650527889F90-->  <DISPLAYLOGIC><![CDATA[@ACCT_DIMENSION_DISPLAY@ & @Trxtype@!'']]></DISPLAYLOGIC>
 <!--6867D362A7994C4C8D35650527889F90-->  <DISPLAYLENGTH><![CDATA[32]]></DISPLAYLENGTH>
 <!--6867D362A7994C4C8D35650527889F90-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--6867D362A7994C4C8D35650527889F90-->  <SEQNO><![CDATA[2070]]></SEQNO>
@@ -217898,7 +217899,7 @@
 <!--6E37DC58E1494AFE83EA34789D4EC464-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
 <!--6E37DC58E1494AFE83EA34789D4EC464-->  <AD_FIELDGROUP_ID><![CDATA[800000]]></AD_FIELDGROUP_ID>
 <!--6E37DC58E1494AFE83EA34789D4EC464-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
-<!--6E37DC58E1494AFE83EA34789D4EC464-->  <DISPLAYLOGIC><![CDATA[@ACCT_DIMENSION_DISPLAY@]]></DISPLAYLOGIC>
+<!--6E37DC58E1494AFE83EA34789D4EC464-->  <DISPLAYLOGIC><![CDATA[@ACCT_DIMENSION_DISPLAY@ & @Trxtype@!'']]></DISPLAYLOGIC>
 <!--6E37DC58E1494AFE83EA34789D4EC464-->  <DISPLAYLENGTH><![CDATA[32]]></DISPLAYLENGTH>
 <!--6E37DC58E1494AFE83EA34789D4EC464-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--6E37DC58E1494AFE83EA34789D4EC464-->  <SEQNO><![CDATA[2030]]></SEQNO>
@@ -218773,17 +218774,18 @@
 <!--7019E1AFE07B44309AE2F0C6629C1251-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
 <!--7019E1AFE07B44309AE2F0C6629C1251-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
 <!--7019E1AFE07B44309AE2F0C6629C1251-->  <DISPLAYLENGTH><![CDATA[60]]></DISPLAYLENGTH>
-<!--7019E1AFE07B44309AE2F0C6629C1251-->  <ISREADONLY><![CDATA[Y]]></ISREADONLY>
-<!--7019E1AFE07B44309AE2F0C6629C1251-->  <SEQNO><![CDATA[5]]></SEQNO>
+<!--7019E1AFE07B44309AE2F0C6629C1251-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--7019E1AFE07B44309AE2F0C6629C1251-->  <SEQNO><![CDATA[0]]></SEQNO>
 <!--7019E1AFE07B44309AE2F0C6629C1251-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--7019E1AFE07B44309AE2F0C6629C1251-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--7019E1AFE07B44309AE2F0C6629C1251-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
-<!--7019E1AFE07B44309AE2F0C6629C1251-->  <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
+<!--7019E1AFE07B44309AE2F0C6629C1251-->  <SHOWINRELATION><![CDATA[Y]]></SHOWINRELATION>
 <!--7019E1AFE07B44309AE2F0C6629C1251-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
 <!--7019E1AFE07B44309AE2F0C6629C1251-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--7019E1AFE07B44309AE2F0C6629C1251-->  <GRID_SEQNO><![CDATA[0]]></GRID_SEQNO>
 <!--7019E1AFE07B44309AE2F0C6629C1251-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
 <!--7019E1AFE07B44309AE2F0C6629C1251-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
-<!--7019E1AFE07B44309AE2F0C6629C1251-->  <ISSHOWNINSTATUSBAR><![CDATA[Y]]></ISSHOWNINSTATUSBAR>
+<!--7019E1AFE07B44309AE2F0C6629C1251-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
 <!--7019E1AFE07B44309AE2F0C6629C1251-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
 <!--7019E1AFE07B44309AE2F0C6629C1251--></AD_FIELD>
 
@@ -218911,6 +218913,7 @@
 <!--7056A06E1A494D0A947335A14CFB0D4F-->  <AD_COLUMN_ID><![CDATA[7891269C841B655DE040007F010155CE]]></AD_COLUMN_ID>
 <!--7056A06E1A494D0A947335A14CFB0D4F-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
 <!--7056A06E1A494D0A947335A14CFB0D4F-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--7056A06E1A494D0A947335A14CFB0D4F-->  <DISPLAYLOGIC><![CDATA[@Processed@='Y']]></DISPLAYLOGIC>
 <!--7056A06E1A494D0A947335A14CFB0D4F-->  <DISPLAYLENGTH><![CDATA[40]]></DISPLAYLENGTH>
 <!--7056A06E1A494D0A947335A14CFB0D4F-->  <ISREADONLY><![CDATA[Y]]></ISREADONLY>
 <!--7056A06E1A494D0A947335A14CFB0D4F-->  <SEQNO><![CDATA[10]]></SEQNO>
@@ -220856,16 +220859,17 @@
 <!--74928A07F7C54A7D8247E1F6C43FCA30-->  <AD_COLUMN_ID><![CDATA[7891269C8418655DE040007F010155CE]]></AD_COLUMN_ID>
 <!--74928A07F7C54A7D8247E1F6C43FCA30-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
 <!--74928A07F7C54A7D8247E1F6C43FCA30-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
-<!--74928A07F7C54A7D8247E1F6C43FCA30-->  <DISPLAYLOGIC><![CDATA[@Fin_Payment_ID@!'']]></DISPLAYLOGIC>
+<!--74928A07F7C54A7D8247E1F6C43FCA30-->  <DISPLAYLOGIC><![CDATA[@C_Glitem_ID@='' & @Trxtype@!'' & @Trxtype@!'BF']]></DISPLAYLOGIC>
 <!--74928A07F7C54A7D8247E1F6C43FCA30-->  <DISPLAYLENGTH><![CDATA[32]]></DISPLAYLENGTH>
-<!--74928A07F7C54A7D8247E1F6C43FCA30-->  <ISREADONLY><![CDATA[Y]]></ISREADONLY>
+<!--74928A07F7C54A7D8247E1F6C43FCA30-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--74928A07F7C54A7D8247E1F6C43FCA30-->  <SEQNO><![CDATA[50]]></SEQNO>
 <!--74928A07F7C54A7D8247E1F6C43FCA30-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--74928A07F7C54A7D8247E1F6C43FCA30-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--74928A07F7C54A7D8247E1F6C43FCA30-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
-<!--74928A07F7C54A7D8247E1F6C43FCA30-->  <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
+<!--74928A07F7C54A7D8247E1F6C43FCA30-->  <SHOWINRELATION><![CDATA[Y]]></SHOWINRELATION>
 <!--74928A07F7C54A7D8247E1F6C43FCA30-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
 <!--74928A07F7C54A7D8247E1F6C43FCA30-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--74928A07F7C54A7D8247E1F6C43FCA30-->  <GRID_SEQNO><![CDATA[2]]></GRID_SEQNO>
 <!--74928A07F7C54A7D8247E1F6C43FCA30-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
 <!--74928A07F7C54A7D8247E1F6C43FCA30-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
 <!--74928A07F7C54A7D8247E1F6C43FCA30-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
@@ -227983,8 +227987,9 @@
 <!--80CF5FAC7D864E06A046C4740E22B941-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
 <!--80CF5FAC7D864E06A046C4740E22B941-->  <AD_FIELDGROUP_ID><![CDATA[103]]></AD_FIELDGROUP_ID>
 <!--80CF5FAC7D864E06A046C4740E22B941-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--80CF5FAC7D864E06A046C4740E22B941-->  <DISPLAYLOGIC><![CDATA[@Trxtype@!'']]></DISPLAYLOGIC>
 <!--80CF5FAC7D864E06A046C4740E22B941-->  <DISPLAYLENGTH><![CDATA[22]]></DISPLAYLENGTH>
-<!--80CF5FAC7D864E06A046C4740E22B941-->  <ISREADONLY><![CDATA[Y]]></ISREADONLY>
+<!--80CF5FAC7D864E06A046C4740E22B941-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--80CF5FAC7D864E06A046C4740E22B941-->  <SEQNO><![CDATA[110]]></SEQNO>
 <!--80CF5FAC7D864E06A046C4740E22B941-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--80CF5FAC7D864E06A046C4740E22B941-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
@@ -234906,7 +234911,7 @@
 <!--89A6589FEE7A4EEE91F7C2DA256EBC35-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
 <!--89A6589FEE7A4EEE91F7C2DA256EBC35-->  <AD_FIELDGROUP_ID><![CDATA[800000]]></AD_FIELDGROUP_ID>
 <!--89A6589FEE7A4EEE91F7C2DA256EBC35-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
-<!--89A6589FEE7A4EEE91F7C2DA256EBC35-->  <DISPLAYLOGIC><![CDATA[@$Element_SR@='Y']]></DISPLAYLOGIC>
+<!--89A6589FEE7A4EEE91F7C2DA256EBC35-->  <DISPLAYLOGIC><![CDATA[@$Element_SR@='Y' & @Trxtype@!'']]></DISPLAYLOGIC>
 <!--89A6589FEE7A4EEE91F7C2DA256EBC35-->  <DISPLAYLENGTH><![CDATA[32]]></DISPLAYLENGTH>
 <!--89A6589FEE7A4EEE91F7C2DA256EBC35-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--89A6589FEE7A4EEE91F7C2DA256EBC35-->  <SEQNO><![CDATA[2060]]></SEQNO>
@@ -236892,6 +236897,7 @@
 <!--8E8EEAF3075D4A2EBF070D4435AE8659-->  <AD_COLUMN_ID><![CDATA[7DC34559B416B45BE040007F0100784A]]></AD_COLUMN_ID>
 <!--8E8EEAF3075D4A2EBF070D4435AE8659-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
 <!--8E8EEAF3075D4A2EBF070D4435AE8659-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--8E8EEAF3075D4A2EBF070D4435AE8659-->  <DISPLAYLOGIC><![CDATA[@Trxtype@!'']]></DISPLAYLOGIC>
 <!--8E8EEAF3075D4A2EBF070D4435AE8659-->  <DISPLAYLENGTH><![CDATA[19]]></DISPLAYLENGTH>
 <!--8E8EEAF3075D4A2EBF070D4435AE8659-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--8E8EEAF3075D4A2EBF070D4435AE8659-->  <SEQNO><![CDATA[30]]></SEQNO>
@@ -241167,8 +241173,9 @@
 <!--986410C575214480ACE1D247A44A4EF1-->  <AD_COLUMN_ID><![CDATA[828EE0AE801D5FA1E040007F010067C7]]></AD_COLUMN_ID>
 <!--986410C575214480ACE1D247A44A4EF1-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
 <!--986410C575214480ACE1D247A44A4EF1-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--986410C575214480ACE1D247A44A4EF1-->  <DISPLAYLOGIC><![CDATA[@Trxtype@!'']]></DISPLAYLOGIC>
 <!--986410C575214480ACE1D247A44A4EF1-->  <DISPLAYLENGTH><![CDATA[19]]></DISPLAYLENGTH>
-<!--986410C575214480ACE1D247A44A4EF1-->  <ISREADONLY><![CDATA[Y]]></ISREADONLY>
+<!--986410C575214480ACE1D247A44A4EF1-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--986410C575214480ACE1D247A44A4EF1-->  <SEQNO><![CDATA[20]]></SEQNO>
 <!--986410C575214480ACE1D247A44A4EF1-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--986410C575214480ACE1D247A44A4EF1-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
@@ -244201,7 +244208,7 @@
 <!--A1E33651894549DF9CE428E484DC502F-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
 <!--A1E33651894549DF9CE428E484DC502F-->  <AD_FIELDGROUP_ID><![CDATA[800000]]></AD_FIELDGROUP_ID>
 <!--A1E33651894549DF9CE428E484DC502F-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
-<!--A1E33651894549DF9CE428E484DC502F-->  <DISPLAYLOGIC><![CDATA[@ACCT_DIMENSION_DISPLAY@]]></DISPLAYLOGIC>
+<!--A1E33651894549DF9CE428E484DC502F-->  <DISPLAYLOGIC><![CDATA[@ACCT_DIMENSION_DISPLAY@ & @Trxtype@!'']]></DISPLAYLOGIC>
 <!--A1E33651894549DF9CE428E484DC502F-->  <DISPLAYLENGTH><![CDATA[32]]></DISPLAYLENGTH>
 <!--A1E33651894549DF9CE428E484DC502F-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--A1E33651894549DF9CE428E484DC502F-->  <SEQNO><![CDATA[1990]]></SEQNO>
@@ -244454,7 +244461,7 @@
 <!--A3D27BCED0AF46FD9AD575961B9793AE-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
 <!--A3D27BCED0AF46FD9AD575961B9793AE-->  <AD_FIELDGROUP_ID><![CDATA[800000]]></AD_FIELDGROUP_ID>
 <!--A3D27BCED0AF46FD9AD575961B9793AE-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
-<!--A3D27BCED0AF46FD9AD575961B9793AE-->  <DISPLAYLOGIC><![CDATA[@ACCT_DIMENSION_DISPLAY@]]></DISPLAYLOGIC>
+<!--A3D27BCED0AF46FD9AD575961B9793AE-->  <DISPLAYLOGIC><![CDATA[@ACCT_DIMENSION_DISPLAY@ & @Trxtype@!'']]></DISPLAYLOGIC>
 <!--A3D27BCED0AF46FD9AD575961B9793AE-->  <DISPLAYLENGTH><![CDATA[32]]></DISPLAYLENGTH>
 <!--A3D27BCED0AF46FD9AD575961B9793AE-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--A3D27BCED0AF46FD9AD575961B9793AE-->  <SEQNO><![CDATA[2020]]></SEQNO>
@@ -264871,8 +264878,9 @@
 <!--C7C746C2FB494514AE845E28B544371F-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
 <!--C7C746C2FB494514AE845E28B544371F-->  <AD_FIELDGROUP_ID><![CDATA[103]]></AD_FIELDGROUP_ID>
 <!--C7C746C2FB494514AE845E28B544371F-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--C7C746C2FB494514AE845E28B544371F-->  <DISPLAYLOGIC><![CDATA[@Trxtype@!'']]></DISPLAYLOGIC>
 <!--C7C746C2FB494514AE845E28B544371F-->  <DISPLAYLENGTH><![CDATA[22]]></DISPLAYLENGTH>
-<!--C7C746C2FB494514AE845E28B544371F-->  <ISREADONLY><![CDATA[Y]]></ISREADONLY>
+<!--C7C746C2FB494514AE845E28B544371F-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--C7C746C2FB494514AE845E28B544371F-->  <SEQNO><![CDATA[100]]></SEQNO>
 <!--C7C746C2FB494514AE845E28B544371F-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--C7C746C2FB494514AE845E28B544371F-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
@@ -264901,6 +264909,7 @@
 <!--C7D7251DF056400BB756B611D3A48264-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
 <!--C7D7251DF056400BB756B611D3A48264-->  <AD_FIELDGROUP_ID><![CDATA[103]]></AD_FIELDGROUP_ID>
 <!--C7D7251DF056400BB756B611D3A48264-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--C7D7251DF056400BB756B611D3A48264-->  <DISPLAYLOGIC><![CDATA[@Trxtype@!'']]></DISPLAYLOGIC>
 <!--C7D7251DF056400BB756B611D3A48264-->  <DISPLAYLENGTH><![CDATA[32]]></DISPLAYLENGTH>
 <!--C7D7251DF056400BB756B611D3A48264-->  <ISREADONLY><![CDATA[Y]]></ISREADONLY>
 <!--C7D7251DF056400BB756B611D3A48264-->  <SEQNO><![CDATA[90]]></SEQNO>
@@ -270791,9 +270800,10 @@
 <!--D254EAB8FC92485E8ED955D5210849C5-->  <AD_COLUMN_ID><![CDATA[828EE0AE801E5FA1E040007F010067C7]]></AD_COLUMN_ID>
 <!--D254EAB8FC92485E8ED955D5210849C5-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
 <!--D254EAB8FC92485E8ED955D5210849C5-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--D254EAB8FC92485E8ED955D5210849C5-->  <DISPLAYLOGIC><![CDATA[@Trxtype@!'']]></DISPLAYLOGIC>
 <!--D254EAB8FC92485E8ED955D5210849C5-->  <DISPLAYLENGTH><![CDATA[255]]></DISPLAYLENGTH>
 <!--D254EAB8FC92485E8ED955D5210849C5-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
-<!--D254EAB8FC92485E8ED955D5210849C5-->  <SEQNO><![CDATA[60]]></SEQNO>
+<!--D254EAB8FC92485E8ED955D5210849C5-->  <SEQNO><![CDATA[70]]></SEQNO>
 <!--D254EAB8FC92485E8ED955D5210849C5-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--D254EAB8FC92485E8ED955D5210849C5-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--D254EAB8FC92485E8ED955D5210849C5-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
@@ -270802,7 +270812,7 @@
 <!--D254EAB8FC92485E8ED955D5210849C5-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--D254EAB8FC92485E8ED955D5210849C5-->  <GRID_SEQNO><![CDATA[50]]></GRID_SEQNO>
 <!--D254EAB8FC92485E8ED955D5210849C5-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
-<!--D254EAB8FC92485E8ED955D5210849C5-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--D254EAB8FC92485E8ED955D5210849C5-->  <STARTNEWLINE><![CDATA[Y]]></STARTNEWLINE>
 <!--D254EAB8FC92485E8ED955D5210849C5-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
 <!--D254EAB8FC92485E8ED955D5210849C5-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
 <!--D254EAB8FC92485E8ED955D5210849C5--></AD_FIELD>
@@ -274709,7 +274719,7 @@
 <!--D94DCB417B094C4B99A144BB5F7B0146-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
 <!--D94DCB417B094C4B99A144BB5F7B0146-->  <DISPLAYLENGTH><![CDATA[12]]></DISPLAYLENGTH>
 <!--D94DCB417B094C4B99A144BB5F7B0146-->  <ISREADONLY><![CDATA[Y]]></ISREADONLY>
-<!--D94DCB417B094C4B99A144BB5F7B0146-->  <SEQNO><![CDATA[0]]></SEQNO>
+<!--D94DCB417B094C4B99A144BB5F7B0146-->  <SEQNO><![CDATA[8]]></SEQNO>
 <!--D94DCB417B094C4B99A144BB5F7B0146-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--D94DCB417B094C4B99A144BB5F7B0146-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--D94DCB417B094C4B99A144BB5F7B0146-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
@@ -283595,7 +283605,7 @@
 <!--F4A7AD7B84CB49E08F3B5FF360389061-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
 <!--F4A7AD7B84CB49E08F3B5FF360389061-->  <AD_FIELDGROUP_ID><![CDATA[800000]]></AD_FIELDGROUP_ID>
 <!--F4A7AD7B84CB49E08F3B5FF360389061-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
-<!--F4A7AD7B84CB49E08F3B5FF360389061-->  <DISPLAYLOGIC><![CDATA[@ACCT_DIMENSION_DISPLAY@]]></DISPLAYLOGIC>
+<!--F4A7AD7B84CB49E08F3B5FF360389061-->  <DISPLAYLOGIC><![CDATA[@ACCT_DIMENSION_DISPLAY@ & @Trxtype@!'']]></DISPLAYLOGIC>
 <!--F4A7AD7B84CB49E08F3B5FF360389061-->  <DISPLAYLENGTH><![CDATA[32]]></DISPLAYLENGTH>
 <!--F4A7AD7B84CB49E08F3B5FF360389061-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--F4A7AD7B84CB49E08F3B5FF360389061-->  <SEQNO><![CDATA[2000]]></SEQNO>
@@ -284307,7 +284317,7 @@
 <!--F765768F6CBD40F999C3CE135DE91D81-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
 <!--F765768F6CBD40F999C3CE135DE91D81-->  <AD_FIELDGROUP_ID><![CDATA[800000]]></AD_FIELDGROUP_ID>
 <!--F765768F6CBD40F999C3CE135DE91D81-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
-<!--F765768F6CBD40F999C3CE135DE91D81-->  <DISPLAYLOGIC><![CDATA[@ACCT_DIMENSION_DISPLAY@]]></DISPLAYLOGIC>
+<!--F765768F6CBD40F999C3CE135DE91D81-->  <DISPLAYLOGIC><![CDATA[@ACCT_DIMENSION_DISPLAY@ & @Trxtype@!'']]></DISPLAYLOGIC>
 <!--F765768F6CBD40F999C3CE135DE91D81-->  <DISPLAYLENGTH><![CDATA[32]]></DISPLAYLENGTH>
 <!--F765768F6CBD40F999C3CE135DE91D81-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--F765768F6CBD40F999C3CE135DE91D81-->  <SEQNO><![CDATA[2010]]></SEQNO>
@@ -285365,7 +285375,7 @@
 <!--FAB4A3C5C0F34374B68D789C4710BF99-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
 <!--FAB4A3C5C0F34374B68D789C4710BF99-->  <AD_FIELDGROUP_ID><![CDATA[800000]]></AD_FIELDGROUP_ID>
 <!--FAB4A3C5C0F34374B68D789C4710BF99-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
-<!--FAB4A3C5C0F34374B68D789C4710BF99-->  <DISPLAYLOGIC><![CDATA[@$Element_AY@='Y']]></DISPLAYLOGIC>
+<!--FAB4A3C5C0F34374B68D789C4710BF99-->  <DISPLAYLOGIC><![CDATA[@$Element_AY@='Y' & @Trxtype@!'']]></DISPLAYLOGIC>
 <!--FAB4A3C5C0F34374B68D789C4710BF99-->  <DISPLAYLENGTH><![CDATA[32]]></DISPLAYLENGTH>
 <!--FAB4A3C5C0F34374B68D789C4710BF99-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--FAB4A3C5C0F34374B68D789C4710BF99-->  <SEQNO><![CDATA[2050]]></SEQNO>
--- a/src-db/database/sourcedata/AD_MESSAGE.xml	Tue Aug 12 08:32:37 2014 +0200
+++ b/src-db/database/sourcedata/AD_MESSAGE.xml	Tue Aug 12 08:56:49 2014 +0200
@@ -20049,6 +20049,18 @@
 <!--6DA9382638CA4E03BC085D5A73F95A32-->  <ISINCLUDEINI18N><![CDATA[N]]></ISINCLUDEINI18N>
 <!--6DA9382638CA4E03BC085D5A73F95A32--></AD_MESSAGE>
 
+<!--6DE99392EF21432B833B8CC58759B68F--><AD_MESSAGE>
+<!--6DE99392EF21432B833B8CC58759B68F-->  <AD_MESSAGE_ID><![CDATA[6DE99392EF21432B833B8CC58759B68F]]></AD_MESSAGE_ID>
+<!--6DE99392EF21432B833B8CC58759B68F-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--6DE99392EF21432B833B8CC58759B68F-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--6DE99392EF21432B833B8CC58759B68F-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--6DE99392EF21432B833B8CC58759B68F-->  <VALUE><![CDATA[FIN_TRANS_AMOUNTS_CHK]]></VALUE>
+<!--6DE99392EF21432B833B8CC58759B68F-->  <MSGTEXT><![CDATA[Either deposited amount or payment amount should be different than zero]]></MSGTEXT>
+<!--6DE99392EF21432B833B8CC58759B68F-->  <MSGTYPE><![CDATA[I]]></MSGTYPE>
+<!--6DE99392EF21432B833B8CC58759B68F-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--6DE99392EF21432B833B8CC58759B68F-->  <ISINCLUDEINI18N><![CDATA[N]]></ISINCLUDEINI18N>
+<!--6DE99392EF21432B833B8CC58759B68F--></AD_MESSAGE>
+
 <!--6E27BC6E9B654EE297EA8298B73AE578--><AD_MESSAGE>
 <!--6E27BC6E9B654EE297EA8298B73AE578-->  <AD_MESSAGE_ID><![CDATA[6E27BC6E9B654EE297EA8298B73AE578]]></AD_MESSAGE_ID>
 <!--6E27BC6E9B654EE297EA8298B73AE578-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src-db/database/sourcedata/AD_MODEL_OBJECT.xml	Tue Aug 12 08:32:37 2014 +0200
+++ b/src-db/database/sourcedata/AD_MODEL_OBJECT.xml	Tue Aug 12 08:56:49 2014 +0200
@@ -3869,6 +3869,18 @@
 <!--7AEA3C790893370FE040007F01013A5F-->  <OBJECT_TYPE><![CDATA[S]]></OBJECT_TYPE>
 <!--7AEA3C790893370FE040007F01013A5F--></AD_MODEL_OBJECT>
 
+<!--7B99F202771B41E0A07C3F6A2061AF76--><AD_MODEL_OBJECT>
+<!--7B99F202771B41E0A07C3F6A2061AF76-->  <AD_MODEL_OBJECT_ID><![CDATA[7B99F202771B41E0A07C3F6A2061AF76]]></AD_MODEL_OBJECT_ID>
+<!--7B99F202771B41E0A07C3F6A2061AF76-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--7B99F202771B41E0A07C3F6A2061AF76-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--7B99F202771B41E0A07C3F6A2061AF76-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--7B99F202771B41E0A07C3F6A2061AF76-->  <ACTION><![CDATA[C]]></ACTION>
+<!--7B99F202771B41E0A07C3F6A2061AF76-->  <CLASSNAME><![CDATA[org.openbravo.erpCommon.ad_callouts.SE_Trxtype_Transaction]]></CLASSNAME>
+<!--7B99F202771B41E0A07C3F6A2061AF76-->  <ISDEFAULT><![CDATA[Y]]></ISDEFAULT>
+<!--7B99F202771B41E0A07C3F6A2061AF76-->  <AD_CALLOUT_ID><![CDATA[027529F7CAC84C918C1E66F0B9A4B466]]></AD_CALLOUT_ID>
+<!--7B99F202771B41E0A07C3F6A2061AF76-->  <OBJECT_TYPE><![CDATA[S]]></OBJECT_TYPE>
+<!--7B99F202771B41E0A07C3F6A2061AF76--></AD_MODEL_OBJECT>
+
 <!--7D1FF73577D848F3A86900D16B87F0F8--><AD_MODEL_OBJECT>
 <!--7D1FF73577D848F3A86900D16B87F0F8-->  <AD_MODEL_OBJECT_ID><![CDATA[7D1FF73577D848F3A86900D16B87F0F8]]></AD_MODEL_OBJECT_ID>
 <!--7D1FF73577D848F3A86900D16B87F0F8-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -4610,6 +4622,18 @@
 <!--DF2601D0FF9041F49B069600B7603FE0-->  <SEQNO><![CDATA[40]]></SEQNO>
 <!--DF2601D0FF9041F49B069600B7603FE0--></AD_MODEL_OBJECT>
 
+<!--DF579A9AA3754890B3A3F0787F3CAEFA--><AD_MODEL_OBJECT>
+<!--DF579A9AA3754890B3A3F0787F3CAEFA-->  <AD_MODEL_OBJECT_ID><![CDATA[DF579A9AA3754890B3A3F0787F3CAEFA]]></AD_MODEL_OBJECT_ID>
+<!--DF579A9AA3754890B3A3F0787F3CAEFA-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--DF579A9AA3754890B3A3F0787F3CAEFA-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--DF579A9AA3754890B3A3F0787F3CAEFA-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--DF579A9AA3754890B3A3F0787F3CAEFA-->  <ACTION><![CDATA[C]]></ACTION>
+<!--DF579A9AA3754890B3A3F0787F3CAEFA-->  <CLASSNAME><![CDATA[org.openbravo.erpCommon.ad_callouts.SE_Payment_Transaction]]></CLASSNAME>
+<!--DF579A9AA3754890B3A3F0787F3CAEFA-->  <ISDEFAULT><![CDATA[Y]]></ISDEFAULT>
+<!--DF579A9AA3754890B3A3F0787F3CAEFA-->  <AD_CALLOUT_ID><![CDATA[1D72DBC1B228453A9A64443CAC145991]]></AD_CALLOUT_ID>
+<!--DF579A9AA3754890B3A3F0787F3CAEFA-->  <OBJECT_TYPE><![CDATA[S]]></OBJECT_TYPE>
+<!--DF579A9AA3754890B3A3F0787F3CAEFA--></AD_MODEL_OBJECT>
+
 <!--DFEA792C0F72598AE040007F01004BA1--><AD_MODEL_OBJECT>
 <!--DFEA792C0F72598AE040007F01004BA1-->  <AD_MODEL_OBJECT_ID><![CDATA[DFEA792C0F72598AE040007F01004BA1]]></AD_MODEL_OBJECT_ID>
 <!--DFEA792C0F72598AE040007F01004BA1-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src-db/database/sourcedata/AD_MODEL_OBJECT_MAPPING.xml	Tue Aug 12 08:32:37 2014 +0200
+++ b/src-db/database/sourcedata/AD_MODEL_OBJECT_MAPPING.xml	Tue Aug 12 08:56:49 2014 +0200
@@ -4110,6 +4110,16 @@
 <!--81311EAEE5834B99B7DDD85CCA4EB6C9-->  <ISDEFAULT><![CDATA[N]]></ISDEFAULT>
 <!--81311EAEE5834B99B7DDD85CCA4EB6C9--></AD_MODEL_OBJECT_MAPPING>
 
+<!--830D63E7C287428CAF7F7F405C0D66EE--><AD_MODEL_OBJECT_MAPPING>
+<!--830D63E7C287428CAF7F7F405C0D66EE-->  <AD_MODEL_OBJECT_MAPPING_ID><![CDATA[830D63E7C287428CAF7F7F405C0D66EE]]></AD_MODEL_OBJECT_MAPPING_ID>
+<!--830D63E7C287428CAF7F7F405C0D66EE-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--830D63E7C287428CAF7F7F405C0D66EE-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--830D63E7C287428CAF7F7F405C0D66EE-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--830D63E7C287428CAF7F7F405C0D66EE-->  <AD_MODEL_OBJECT_ID><![CDATA[DF579A9AA3754890B3A3F0787F3CAEFA]]></AD_MODEL_OBJECT_ID>
+<!--830D63E7C287428CAF7F7F405C0D66EE-->  <MAPPINGNAME><![CDATA[/ad_callouts/SE_Payment_Transaction.html]]></MAPPINGNAME>
+<!--830D63E7C287428CAF7F7F405C0D66EE-->  <ISDEFAULT><![CDATA[Y]]></ISDEFAULT>
+<!--830D63E7C287428CAF7F7F405C0D66EE--></AD_MODEL_OBJECT_MAPPING>
+
 <!--83A12B7DAABEAB88E040007F01017CB8--><AD_MODEL_OBJECT_MAPPING>
 <!--83A12B7DAABEAB88E040007F01017CB8-->  <AD_MODEL_OBJECT_MAPPING_ID><![CDATA[83A12B7DAABEAB88E040007F01017CB8]]></AD_MODEL_OBJECT_MAPPING_ID>
 <!--83A12B7DAABEAB88E040007F01017CB8-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -4200,6 +4210,16 @@
 <!--8FFBEAE4CF644D3D98B19722BAE14E64-->  <ISDEFAULT><![CDATA[Y]]></ISDEFAULT>
 <!--8FFBEAE4CF644D3D98B19722BAE14E64--></AD_MODEL_OBJECT_MAPPING>
 
+<!--96AB68C2B5AC4E09A94E1A7B259E19BE--><AD_MODEL_OBJECT_MAPPING>
+<!--96AB68C2B5AC4E09A94E1A7B259E19BE-->  <AD_MODEL_OBJECT_MAPPING_ID><![CDATA[96AB68C2B5AC4E09A94E1A7B259E19BE]]></AD_MODEL_OBJECT_MAPPING_ID>
+<!--96AB68C2B5AC4E09A94E1A7B259E19BE-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--96AB68C2B5AC4E09A94E1A7B259E19BE-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--96AB68C2B5AC4E09A94E1A7B259E19BE-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--96AB68C2B5AC4E09A94E1A7B259E19BE-->  <AD_MODEL_OBJECT_ID><![CDATA[7B99F202771B41E0A07C3F6A2061AF76]]></AD_MODEL_OBJECT_ID>
+<!--96AB68C2B5AC4E09A94E1A7B259E19BE-->  <MAPPINGNAME><![CDATA[/ad_callouts/SE_Trxtype_Transaction.html]]></MAPPINGNAME>
+<!--96AB68C2B5AC4E09A94E1A7B259E19BE-->  <ISDEFAULT><![CDATA[Y]]></ISDEFAULT>
+<!--96AB68C2B5AC4E09A94E1A7B259E19BE--></AD_MODEL_OBJECT_MAPPING>
+
 <!--9C7DDC171D20464A9FA79C71B1516DE3--><AD_MODEL_OBJECT_MAPPING>
 <!--9C7DDC171D20464A9FA79C71B1516DE3-->  <AD_MODEL_OBJECT_MAPPING_ID><![CDATA[9C7DDC171D20464A9FA79C71B1516DE3]]></AD_MODEL_OBJECT_MAPPING_ID>
 <!--9C7DDC171D20464A9FA79C71B1516DE3-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src-db/database/sourcedata/AD_REFERENCE.xml	Tue Aug 12 08:32:37 2014 +0200
+++ b/src-db/database/sourcedata/AD_REFERENCE.xml	Tue Aug 12 08:56:49 2014 +0200
@@ -6346,6 +6346,19 @@
 <!--E943EF6DC4524209BD5933661EC0BDDC-->  <ISVALUEDISPLAYED><![CDATA[N]]></ISVALUEDISPLAYED>
 <!--E943EF6DC4524209BD5933661EC0BDDC--></AD_REFERENCE>
 
+<!--EE2E61C84926484C809BEBBCED00C7E3--><AD_REFERENCE>
+<!--EE2E61C84926484C809BEBBCED00C7E3-->  <AD_REFERENCE_ID><![CDATA[EE2E61C84926484C809BEBBCED00C7E3]]></AD_REFERENCE_ID>
+<!--EE2E61C84926484C809BEBBCED00C7E3-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--EE2E61C84926484C809BEBBCED00C7E3-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--EE2E61C84926484C809BEBBCED00C7E3-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--EE2E61C84926484C809BEBBCED00C7E3-->  <NAME><![CDATA[Payment Selector Transaction]]></NAME>
+<!--EE2E61C84926484C809BEBBCED00C7E3-->  <DESCRIPTION><![CDATA[Payment Selector Transaction]]></DESCRIPTION>
+<!--EE2E61C84926484C809BEBBCED00C7E3-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--EE2E61C84926484C809BEBBCED00C7E3-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--EE2E61C84926484C809BEBBCED00C7E3-->  <PARENTREFERENCE_ID><![CDATA[95E2A8B50A254B2AAE6774B8C2F28120]]></PARENTREFERENCE_ID>
+<!--EE2E61C84926484C809BEBBCED00C7E3-->  <ISVALUEDISPLAYED><![CDATA[N]]></ISVALUEDISPLAYED>
+<!--EE2E61C84926484C809BEBBCED00C7E3--></AD_REFERENCE>
+
 <!--EE8B072E19034D0FB34CA1CEB3583620--><AD_REFERENCE>
 <!--EE8B072E19034D0FB34CA1CEB3583620-->  <AD_REFERENCE_ID><![CDATA[EE8B072E19034D0FB34CA1CEB3583620]]></AD_REFERENCE_ID>
 <!--EE8B072E19034D0FB34CA1CEB3583620-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src-db/database/sourcedata/AD_TAB.xml	Tue Aug 12 08:32:37 2014 +0200
+++ b/src-db/database/sourcedata/AD_TAB.xml	Tue Aug 12 08:56:49 2014 +0200
@@ -13645,7 +13645,7 @@
 <!--23691259D1BD4496BCC5F32645BCA4B9-->  <IMPORTFIELDS><![CDATA[N]]></IMPORTFIELDS>
 <!--23691259D1BD4496BCC5F32645BCA4B9-->  <ISSORTTAB><![CDATA[N]]></ISSORTTAB>
 <!--23691259D1BD4496BCC5F32645BCA4B9-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
-<!--23691259D1BD4496BCC5F32645BCA4B9-->  <UIPATTERN><![CDATA[SR]]></UIPATTERN>
+<!--23691259D1BD4496BCC5F32645BCA4B9-->  <UIPATTERN><![CDATA[STD]]></UIPATTERN>
 <!--23691259D1BD4496BCC5F32645BCA4B9-->  <HQLORDERBYCLAUSE><![CDATA[dateAcct, lineNo]]></HQLORDERBYCLAUSE>
 <!--23691259D1BD4496BCC5F32645BCA4B9-->  <HQLFILTERCLAUSE><![CDATA[not exists (select 1 from FIN_Reconciliation r where r = e.reconciliation and r.processed = true)]]></HQLFILTERCLAUSE>
 <!--23691259D1BD4496BCC5F32645BCA4B9-->  <SHOWPARENTBUTTONS><![CDATA[Y]]></SHOWPARENTBUTTONS>
--- a/src-db/database/sourcedata/AD_VAL_RULE.xml	Tue Aug 12 08:32:37 2014 +0200
+++ b/src-db/database/sourcedata/AD_VAL_RULE.xml	Tue Aug 12 08:56:49 2014 +0200
@@ -1743,7 +1743,7 @@
 <!--7A86F689FB1C46F19DBE338D6DECD703-->  <NAME><![CDATA[FIN_Payment status for transactons]]></NAME>
 <!--7A86F689FB1C46F19DBE338D6DECD703-->  <DESCRIPTION><![CDATA[Payment status used as transaction status in financila account]]></DESCRIPTION>
 <!--7A86F689FB1C46F19DBE338D6DECD703-->  <TYPE><![CDATA[S]]></TYPE>
-<!--7A86F689FB1C46F19DBE338D6DECD703-->  <CODE><![CDATA[Value IN ('RDNC','RPPC','PWNC')]]></CODE>
+<!--7A86F689FB1C46F19DBE338D6DECD703-->  <CODE><![CDATA[Value IN ('RPAP','RDNC','RPPC','PWNC')]]></CODE>
 <!--7A86F689FB1C46F19DBE338D6DECD703-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--7A86F689FB1C46F19DBE338D6DECD703--></AD_VAL_RULE>
 
--- a/src-db/database/sourcedata/OBUISEL_SELECTOR.xml	Tue Aug 12 08:32:37 2014 +0200
+++ b/src-db/database/sourcedata/OBUISEL_SELECTOR.xml	Tue Aug 12 08:56:49 2014 +0200
@@ -455,6 +455,25 @@
 <!--A085BAFF89C74D7696A877C697DF350F-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--A085BAFF89C74D7696A877C697DF350F--></OBUISEL_SELECTOR>
 
+<!--A1024EFED9AF41F39C374ACD0EC1D733--><OBUISEL_SELECTOR>
+<!--A1024EFED9AF41F39C374ACD0EC1D733-->  <OBUISEL_SELECTOR_ID><![CDATA[A1024EFED9AF41F39C374ACD0EC1D733]]></OBUISEL_SELECTOR_ID>
+<!--A1024EFED9AF41F39C374ACD0EC1D733-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--A1024EFED9AF41F39C374ACD0EC1D733-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--A1024EFED9AF41F39C374ACD0EC1D733-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--A1024EFED9AF41F39C374ACD0EC1D733-->  <NAME><![CDATA[Payment Selector]]></NAME>
+<!--A1024EFED9AF41F39C374ACD0EC1D733-->  <AD_REFERENCE_ID><![CDATA[EE2E61C84926484C809BEBBCED00C7E3]]></AD_REFERENCE_ID>
+<!--A1024EFED9AF41F39C374ACD0EC1D733-->  <AD_TABLE_ID><![CDATA[D1A97202E832470285C9B1EB026D54E2]]></AD_TABLE_ID>
+<!--A1024EFED9AF41F39C374ACD0EC1D733-->  <AD_COLUMN_ID><![CDATA[7891269C83D0655DE040007F010155CE]]></AD_COLUMN_ID>
+<!--A1024EFED9AF41F39C374ACD0EC1D733-->  <WHERECLAUSE><![CDATA[e.status in ('RPR', 'PPM') and e.amount <>0 and exists ( select 1 from FinancialMgmtFinAccPaymentMethod as  fapm join fapm.account as fa where fapm.paymentMethod = e.paymentMethod and fa.id = @FIN_Financial_Account_ID@ and (case when e.receipt = true then fapm.payinAllow else fapm.payoutAllow end) = true and fa.currency = e.account.currency) and not exists (select 1 from FIN_Finacc_Transaction as ft where e = ft.finPayment)]]></WHERECLAUSE>
+<!--A1024EFED9AF41F39C374ACD0EC1D733-->  <FILTER_EXPRESSION><![CDATA["e.account.id = @FIN_Financial_Account_ID@"]]></FILTER_EXPRESSION>
+<!--A1024EFED9AF41F39C374ACD0EC1D733-->  <OBCLKER_TEMPLATE_ID><![CDATA[9314DE8599AD44E7BFC4CC50699042AB]]></OBCLKER_TEMPLATE_ID>
+<!--A1024EFED9AF41F39C374ACD0EC1D733-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--A1024EFED9AF41F39C374ACD0EC1D733-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[substring]]></SUGGESTIONTEXTMATCHSTYLE>
+<!--A1024EFED9AF41F39C374ACD0EC1D733-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--A1024EFED9AF41F39C374ACD0EC1D733-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
+<!--A1024EFED9AF41F39C374ACD0EC1D733-->  <OBUIAPP_PROCESS_ID><![CDATA[9BED7889E1034FE68BD85D5D16857320]]></OBUIAPP_PROCESS_ID>
+<!--A1024EFED9AF41F39C374ACD0EC1D733--></OBUISEL_SELECTOR>
+
 <!--A25A4A49D65D4460BBDC38EF78F28C09--><OBUISEL_SELECTOR>
 <!--A25A4A49D65D4460BBDC38EF78F28C09-->  <OBUISEL_SELECTOR_ID><![CDATA[A25A4A49D65D4460BBDC38EF78F28C09]]></OBUISEL_SELECTOR_ID>
 <!--A25A4A49D65D4460BBDC38EF78F28C09-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src-db/database/sourcedata/OBUISEL_SELECTOR_FIELD.xml	Tue Aug 12 08:32:37 2014 +0200
+++ b/src-db/database/sourcedata/OBUISEL_SELECTOR_FIELD.xml	Tue Aug 12 08:56:49 2014 +0200
@@ -67,6 +67,28 @@
 <!--082C760C3435477B9A20B9990749F6C7-->  <SHOWINPICKLIST><![CDATA[Y]]></SHOWINPICKLIST>
 <!--082C760C3435477B9A20B9990749F6C7--></OBUISEL_SELECTOR_FIELD>
 
+<!--08391130B441429AB0F05C3747950973--><OBUISEL_SELECTOR_FIELD>
+<!--08391130B441429AB0F05C3747950973-->  <OBUISEL_SELECTOR_FIELD_ID><![CDATA[08391130B441429AB0F05C3747950973]]></OBUISEL_SELECTOR_FIELD_ID>
+<!--08391130B441429AB0F05C3747950973-->  <OBUISEL_SELECTOR_ID><![CDATA[A1024EFED9AF41F39C374ACD0EC1D733]]></OBUISEL_SELECTOR_ID>
+<!--08391130B441429AB0F05C3747950973-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--08391130B441429AB0F05C3747950973-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--08391130B441429AB0F05C3747950973-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--08391130B441429AB0F05C3747950973-->  <AD_COLUMN_ID><![CDATA[7891269C83E2655DE040007F010155CE]]></AD_COLUMN_ID>
+<!--08391130B441429AB0F05C3747950973-->  <NAME><![CDATA[Status]]></NAME>
+<!--08391130B441429AB0F05C3747950973-->  <DESCRIPTION><![CDATA[A defined state or position of a payment.]]></DESCRIPTION>
+<!--08391130B441429AB0F05C3747950973-->  <HELP><![CDATA[Current status of a debt/payment.]]></HELP>
+<!--08391130B441429AB0F05C3747950973-->  <PROPERTY><![CDATA[status]]></PROPERTY>
+<!--08391130B441429AB0F05C3747950973-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--08391130B441429AB0F05C3747950973-->  <SORT><![CDATA[Y]]></SORT>
+<!--08391130B441429AB0F05C3747950973-->  <FILTER><![CDATA[Y]]></FILTER>
+<!--08391130B441429AB0F05C3747950973-->  <SEARCHINSUGGESTIONBOX><![CDATA[N]]></SEARCHINSUGGESTIONBOX>
+<!--08391130B441429AB0F05C3747950973-->  <SHOWINGRID><![CDATA[Y]]></SHOWINGRID>
+<!--08391130B441429AB0F05C3747950973-->  <SORTNO><![CDATA[8]]></SORTNO>
+<!--08391130B441429AB0F05C3747950973-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--08391130B441429AB0F05C3747950973-->  <ISOUTFIELD><![CDATA[N]]></ISOUTFIELD>
+<!--08391130B441429AB0F05C3747950973-->  <SHOWINPICKLIST><![CDATA[N]]></SHOWINPICKLIST>
+<!--08391130B441429AB0F05C3747950973--></OBUISEL_SELECTOR_FIELD>
+
 <!--09443D24F490441BA12AFB6490481875--><OBUISEL_SELECTOR_FIELD>
 <!--09443D24F490441BA12AFB6490481875-->  <OBUISEL_SELECTOR_FIELD_ID><![CDATA[09443D24F490441BA12AFB6490481875]]></OBUISEL_SELECTOR_FIELD_ID>
 <!--09443D24F490441BA12AFB6490481875-->  <OBUISEL_SELECTOR_ID><![CDATA[D47A3616483E46C18A09794B9B276B37]]></OBUISEL_SELECTOR_ID>
@@ -342,6 +364,28 @@
 <!--28CA79CC4C39406C9A29B81474381859-->  <SHOWINPICKLIST><![CDATA[N]]></SHOWINPICKLIST>
 <!--28CA79CC4C39406C9A29B81474381859--></OBUISEL_SELECTOR_FIELD>
 
+<!--2B6B9530CE04486ABBCACA9B04873C1B--><OBUISEL_SELECTOR_FIELD>
+<!--2B6B9530CE04486ABBCACA9B04873C1B-->  <OBUISEL_SELECTOR_FIELD_ID><![CDATA[2B6B9530CE04486ABBCACA9B04873C1B]]></OBUISEL_SELECTOR_FIELD_ID>
+<!--2B6B9530CE04486ABBCACA9B04873C1B-->  <OBUISEL_SELECTOR_ID><![CDATA[A1024EFED9AF41F39C374ACD0EC1D733]]></OBUISEL_SELECTOR_ID>
+<!--2B6B9530CE04486ABBCACA9B04873C1B-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--2B6B9530CE04486ABBCACA9B04873C1B-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--2B6B9530CE04486ABBCACA9B04873C1B-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--2B6B9530CE04486ABBCACA9B04873C1B-->  <AD_COLUMN_ID><![CDATA[03276FB53CC54CC1829E0AA6EC0F2EE6]]></AD_COLUMN_ID>
+<!--2B6B9530CE04486ABBCACA9B04873C1B-->  <NAME><![CDATA[Financial Account]]></NAME>
+<!--2B6B9530CE04486ABBCACA9B04873C1B-->  <DESCRIPTION><![CDATA[Financial account used to deposit / withdrawal money such as bank accounts or petty cash]]></DESCRIPTION>
+<!--2B6B9530CE04486ABBCACA9B04873C1B-->  <HELP><![CDATA[Financial account used to deposit / withdrawal money such as bank accounts or petty cash]]></HELP>
+<!--2B6B9530CE04486ABBCACA9B04873C1B-->  <PROPERTY><![CDATA[account]]></PROPERTY>
+<!--2B6B9530CE04486ABBCACA9B04873C1B-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--2B6B9530CE04486ABBCACA9B04873C1B-->  <SORT><![CDATA[Y]]></SORT>
+<!--2B6B9530CE04486ABBCACA9B04873C1B-->  <FILTER><![CDATA[Y]]></FILTER>
+<!--2B6B9530CE04486ABBCACA9B04873C1B-->  <SEARCHINSUGGESTIONBOX><![CDATA[N]]></SEARCHINSUGGESTIONBOX>
+<!--2B6B9530CE04486ABBCACA9B04873C1B-->  <SHOWINGRID><![CDATA[Y]]></SHOWINGRID>
+<!--2B6B9530CE04486ABBCACA9B04873C1B-->  <SORTNO><![CDATA[1]]></SORTNO>
+<!--2B6B9530CE04486ABBCACA9B04873C1B-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--2B6B9530CE04486ABBCACA9B04873C1B-->  <ISOUTFIELD><![CDATA[N]]></ISOUTFIELD>
+<!--2B6B9530CE04486ABBCACA9B04873C1B-->  <SHOWINPICKLIST><![CDATA[N]]></SHOWINPICKLIST>
+<!--2B6B9530CE04486ABBCACA9B04873C1B--></OBUISEL_SELECTOR_FIELD>
+
 <!--2CB91FE062B541ACB00D82AC69858446--><OBUISEL_SELECTOR_FIELD>
 <!--2CB91FE062B541ACB00D82AC69858446-->  <OBUISEL_SELECTOR_FIELD_ID><![CDATA[2CB91FE062B541ACB00D82AC69858446]]></OBUISEL_SELECTOR_FIELD_ID>
 <!--2CB91FE062B541ACB00D82AC69858446-->  <OBUISEL_SELECTOR_ID><![CDATA[2E64F551C7C4470C80C29DBA24B34A5F]]></OBUISEL_SELECTOR_ID>
@@ -542,6 +586,28 @@
 <!--38075EEC36C24E3CAB44D1B33D2CE637-->  <SHOWINPICKLIST><![CDATA[N]]></SHOWINPICKLIST>
 <!--38075EEC36C24E3CAB44D1B33D2CE637--></OBUISEL_SELECTOR_FIELD>
 
+<!--38FB9B46B1D54C3784469A27926AFA58--><OBUISEL_SELECTOR_FIELD>
+<!--38FB9B46B1D54C3784469A27926AFA58-->  <OBUISEL_SELECTOR_FIELD_ID><![CDATA[38FB9B46B1D54C3784469A27926AFA58]]></OBUISEL_SELECTOR_FIELD_ID>
+<!--38FB9B46B1D54C3784469A27926AFA58-->  <OBUISEL_SELECTOR_ID><![CDATA[A1024EFED9AF41F39C374ACD0EC1D733]]></OBUISEL_SELECTOR_ID>
+<!--38FB9B46B1D54C3784469A27926AFA58-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--38FB9B46B1D54C3784469A27926AFA58-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--38FB9B46B1D54C3784469A27926AFA58-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--38FB9B46B1D54C3784469A27926AFA58-->  <AD_COLUMN_ID><![CDATA[7891269C83E0655DE040007F010155CE]]></AD_COLUMN_ID>
+<!--38FB9B46B1D54C3784469A27926AFA58-->  <NAME><![CDATA[Document No.]]></NAME>
+<!--38FB9B46B1D54C3784469A27926AFA58-->  <DESCRIPTION><![CDATA[An often automatically generated identifier for all documents.]]></DESCRIPTION>
+<!--38FB9B46B1D54C3784469A27926AFA58-->  <HELP><![CDATA[The document number is usually automatically generated by the system and determined by the document type of the document. If the document is not saved, the preliminary number is displayed in "<>". If the document type of your document has no automatic document sequence defined, the field will be empty when creating a new document. This is for documents which usually have an external number (like vendor invoice).  If you leave the field empty, the system will generate a document number for you. The document sequence used for this fallback number is defined in the "Document Sequence" window with the name "DocumentNo_<TableName>", where TableName is the actual name of the table inside the database (e.g. C_Order).]]></HELP>
+<!--38FB9B46B1D54C3784469A27926AFA58-->  <PROPERTY><![CDATA[documentNo]]></PROPERTY>
+<!--38FB9B46B1D54C3784469A27926AFA58-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--38FB9B46B1D54C3784469A27926AFA58-->  <SORT><![CDATA[Y]]></SORT>
+<!--38FB9B46B1D54C3784469A27926AFA58-->  <FILTER><![CDATA[Y]]></FILTER>
+<!--38FB9B46B1D54C3784469A27926AFA58-->  <SEARCHINSUGGESTIONBOX><![CDATA[Y]]></SEARCHINSUGGESTIONBOX>
+<!--38FB9B46B1D54C3784469A27926AFA58-->  <SHOWINGRID><![CDATA[Y]]></SHOWINGRID>
+<!--38FB9B46B1D54C3784469A27926AFA58-->  <SORTNO><![CDATA[2]]></SORTNO>
+<!--38FB9B46B1D54C3784469A27926AFA58-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--38FB9B46B1D54C3784469A27926AFA58-->  <ISOUTFIELD><![CDATA[N]]></ISOUTFIELD>
+<!--38FB9B46B1D54C3784469A27926AFA58-->  <SHOWINPICKLIST><![CDATA[N]]></SHOWINPICKLIST>
+<!--38FB9B46B1D54C3784469A27926AFA58--></OBUISEL_SELECTOR_FIELD>
+
 <!--3AC833E6798F459F82EA1E8D80DE79BE--><OBUISEL_SELECTOR_FIELD>
 <!--3AC833E6798F459F82EA1E8D80DE79BE-->  <OBUISEL_SELECTOR_FIELD_ID><![CDATA[3AC833E6798F459F82EA1E8D80DE79BE]]></OBUISEL_SELECTOR_FIELD_ID>
 <!--3AC833E6798F459F82EA1E8D80DE79BE-->  <OBUISEL_SELECTOR_ID><![CDATA[814758DD755642E9BF38BD2E5AD713EC]]></OBUISEL_SELECTOR_ID>
@@ -949,6 +1015,28 @@
 <!--45EF44862E664D33924023F7293977D0-->  <SHOWINPICKLIST><![CDATA[N]]></SHOWINPICKLIST>
 <!--45EF44862E664D33924023F7293977D0--></OBUISEL_SELECTOR_FIELD>
 
+<!--4C72931EA7A94CF7B4CF570A8C81DC6A--><OBUISEL_SELECTOR_FIELD>
+<!--4C72931EA7A94CF7B4CF570A8C81DC6A-->  <OBUISEL_SELECTOR_FIELD_ID><![CDATA[4C72931EA7A94CF7B4CF570A8C81DC6A]]></OBUISEL_SELECTOR_FIELD_ID>
+<!--4C72931EA7A94CF7B4CF570A8C81DC6A-->  <OBUISEL_SELECTOR_ID><![CDATA[A1024EFED9AF41F39C374ACD0EC1D733]]></OBUISEL_SELECTOR_ID>
+<!--4C72931EA7A94CF7B4CF570A8C81DC6A-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--4C72931EA7A94CF7B4CF570A8C81DC6A-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--4C72931EA7A94CF7B4CF570A8C81DC6A-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--4C72931EA7A94CF7B4CF570A8C81DC6A-->  <AD_COLUMN_ID><![CDATA[8032E178607750D5E040007F01004282]]></AD_COLUMN_ID>
+<!--4C72931EA7A94CF7B4CF570A8C81DC6A-->  <NAME><![CDATA[Document Type]]></NAME>
+<!--4C72931EA7A94CF7B4CF570A8C81DC6A-->  <DESCRIPTION><![CDATA[A value defining what sequence and process setup are used to handle this document.]]></DESCRIPTION>
+<!--4C72931EA7A94CF7B4CF570A8C81DC6A-->  <HELP><![CDATA[The Document Type determines document sequence and processing rules]]></HELP>
+<!--4C72931EA7A94CF7B4CF570A8C81DC6A-->  <PROPERTY><![CDATA[documentType]]></PROPERTY>
+<!--4C72931EA7A94CF7B4CF570A8C81DC6A-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--4C72931EA7A94CF7B4CF570A8C81DC6A-->  <SORT><![CDATA[Y]]></SORT>
+<!--4C72931EA7A94CF7B4CF570A8C81DC6A-->  <FILTER><![CDATA[Y]]></FILTER>
+<!--4C72931EA7A94CF7B4CF570A8C81DC6A-->  <SEARCHINSUGGESTIONBOX><![CDATA[N]]></SEARCHINSUGGESTIONBOX>
+<!--4C72931EA7A94CF7B4CF570A8C81DC6A-->  <SHOWINGRID><![CDATA[Y]]></SHOWINGRID>
+<!--4C72931EA7A94CF7B4CF570A8C81DC6A-->  <SORTNO><![CDATA[0]]></SORTNO>
+<!--4C72931EA7A94CF7B4CF570A8C81DC6A-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--4C72931EA7A94CF7B4CF570A8C81DC6A-->  <ISOUTFIELD><![CDATA[N]]></ISOUTFIELD>
+<!--4C72931EA7A94CF7B4CF570A8C81DC6A-->  <SHOWINPICKLIST><![CDATA[N]]></SHOWINPICKLIST>
+<!--4C72931EA7A94CF7B4CF570A8C81DC6A--></OBUISEL_SELECTOR_FIELD>
+
 <!--5044C81844C841AB9B123DE30591D671--><OBUISEL_SELECTOR_FIELD>
 <!--5044C81844C841AB9B123DE30591D671-->  <OBUISEL_SELECTOR_FIELD_ID><![CDATA[5044C81844C841AB9B123DE30591D671]]></OBUISEL_SELECTOR_FIELD_ID>
 <!--5044C81844C841AB9B123DE30591D671-->  <OBUISEL_SELECTOR_ID><![CDATA[D47A3616483E46C18A09794B9B276B37]]></OBUISEL_SELECTOR_ID>
@@ -1276,6 +1364,28 @@
 <!--681AD87159544997B999B254DD4F97EC-->  <SHOWINPICKLIST><![CDATA[N]]></SHOWINPICKLIST>
 <!--681AD87159544997B999B254DD4F97EC--></OBUISEL_SELECTOR_FIELD>
 
+<!--6AA3521F6AF347338CAD9B9DE8268DE2--><OBUISEL_SELECTOR_FIELD>
+<!--6AA3521F6AF347338CAD9B9DE8268DE2-->  <OBUISEL_SELECTOR_FIELD_ID><![CDATA[6AA3521F6AF347338CAD9B9DE8268DE2]]></OBUISEL_SELECTOR_FIELD_ID>
+<!--6AA3521F6AF347338CAD9B9DE8268DE2-->  <OBUISEL_SELECTOR_ID><![CDATA[A1024EFED9AF41F39C374ACD0EC1D733]]></OBUISEL_SELECTOR_ID>
+<!--6AA3521F6AF347338CAD9B9DE8268DE2-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--6AA3521F6AF347338CAD9B9DE8268DE2-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--6AA3521F6AF347338CAD9B9DE8268DE2-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--6AA3521F6AF347338CAD9B9DE8268DE2-->  <AD_COLUMN_ID><![CDATA[7891269C83DC655DE040007F010155CE]]></AD_COLUMN_ID>
+<!--6AA3521F6AF347338CAD9B9DE8268DE2-->  <NAME><![CDATA[Currency]]></NAME>
+<!--6AA3521F6AF347338CAD9B9DE8268DE2-->  <DESCRIPTION><![CDATA[An accepted medium of monetary exchange that may vary across countries.]]></DESCRIPTION>
+<!--6AA3521F6AF347338CAD9B9DE8268DE2-->  <HELP><![CDATA[Indicates the currency to be used when processing this document.]]></HELP>
+<!--6AA3521F6AF347338CAD9B9DE8268DE2-->  <PROPERTY><![CDATA[currency]]></PROPERTY>
+<!--6AA3521F6AF347338CAD9B9DE8268DE2-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--6AA3521F6AF347338CAD9B9DE8268DE2-->  <SORT><![CDATA[Y]]></SORT>
+<!--6AA3521F6AF347338CAD9B9DE8268DE2-->  <FILTER><![CDATA[Y]]></FILTER>
+<!--6AA3521F6AF347338CAD9B9DE8268DE2-->  <SEARCHINSUGGESTIONBOX><![CDATA[N]]></SEARCHINSUGGESTIONBOX>
+<!--6AA3521F6AF347338CAD9B9DE8268DE2-->  <SHOWINGRID><![CDATA[Y]]></SHOWINGRID>
+<!--6AA3521F6AF347338CAD9B9DE8268DE2-->  <SORTNO><![CDATA[6]]></SORTNO>
+<!--6AA3521F6AF347338CAD9B9DE8268DE2-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--6AA3521F6AF347338CAD9B9DE8268DE2-->  <ISOUTFIELD><![CDATA[N]]></ISOUTFIELD>
+<!--6AA3521F6AF347338CAD9B9DE8268DE2-->  <SHOWINPICKLIST><![CDATA[N]]></SHOWINPICKLIST>
+<!--6AA3521F6AF347338CAD9B9DE8268DE2--></OBUISEL_SELECTOR_FIELD>
+
 <!--6DDC519575994A81A5C92046AD2FB7B6--><OBUISEL_SELECTOR_FIELD>
 <!--6DDC519575994A81A5C92046AD2FB7B6-->  <OBUISEL_SELECTOR_FIELD_ID><![CDATA[6DDC519575994A81A5C92046AD2FB7B6]]></OBUISEL_SELECTOR_FIELD_ID>
 <!--6DDC519575994A81A5C92046AD2FB7B6-->  <OBUISEL_SELECTOR_ID><![CDATA[D47A3616483E46C18A09794B9B276B37]]></OBUISEL_SELECTOR_ID>
@@ -1385,6 +1495,50 @@
 <!--76B1CC6F22E0458AAE60A40B61BD6CEA-->  <SHOWINPICKLIST><![CDATA[N]]></SHOWINPICKLIST>
 <!--76B1CC6F22E0458AAE60A40B61BD6CEA--></OBUISEL_SELECTOR_FIELD>
 
+<!--76C49C94F54A4E17BAC70C1920A017BA--><OBUISEL_SELECTOR_FIELD>
+<!--76C49C94F54A4E17BAC70C1920A017BA-->  <OBUISEL_SELECTOR_FIELD_ID><![CDATA[76C49C94F54A4E17BAC70C1920A017BA]]></OBUISEL_SELECTOR_FIELD_ID>
+<!--76C49C94F54A4E17BAC70C1920A017BA-->  <OBUISEL_SELECTOR_ID><![CDATA[A1024EFED9AF41F39C374ACD0EC1D733]]></OBUISEL_SELECTOR_ID>
+<!--76C49C94F54A4E17BAC70C1920A017BA-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--76C49C94F54A4E17BAC70C1920A017BA-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--76C49C94F54A4E17BAC70C1920A017BA-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--76C49C94F54A4E17BAC70C1920A017BA-->  <AD_COLUMN_ID><![CDATA[4028C9BC2DA5C491012DA689D11F03BD]]></AD_COLUMN_ID>
+<!--76C49C94F54A4E17BAC70C1920A017BA-->  <NAME><![CDATA[Received (Financial Account)]]></NAME>
+<!--76C49C94F54A4E17BAC70C1920A017BA-->  <DESCRIPTION><![CDATA[Amount received in currency of financial account]]></DESCRIPTION>
+<!--76C49C94F54A4E17BAC70C1920A017BA-->  <HELP><![CDATA[The total amount of the payment, converted to the currency of the financial account.]]></HELP>
+<!--76C49C94F54A4E17BAC70C1920A017BA-->  <PROPERTY><![CDATA[financialTransactionAmount]]></PROPERTY>
+<!--76C49C94F54A4E17BAC70C1920A017BA-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--76C49C94F54A4E17BAC70C1920A017BA-->  <SORT><![CDATA[Y]]></SORT>
+<!--76C49C94F54A4E17BAC70C1920A017BA-->  <FILTER><![CDATA[Y]]></FILTER>
+<!--76C49C94F54A4E17BAC70C1920A017BA-->  <SEARCHINSUGGESTIONBOX><![CDATA[N]]></SEARCHINSUGGESTIONBOX>
+<!--76C49C94F54A4E17BAC70C1920A017BA-->  <SHOWINGRID><![CDATA[Y]]></SHOWINGRID>
+<!--76C49C94F54A4E17BAC70C1920A017BA-->  <SORTNO><![CDATA[7]]></SORTNO>
+<!--76C49C94F54A4E17BAC70C1920A017BA-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--76C49C94F54A4E17BAC70C1920A017BA-->  <ISOUTFIELD><![CDATA[N]]></ISOUTFIELD>
+<!--76C49C94F54A4E17BAC70C1920A017BA-->  <SHOWINPICKLIST><![CDATA[N]]></SHOWINPICKLIST>
+<!--76C49C94F54A4E17BAC70C1920A017BA--></OBUISEL_SELECTOR_FIELD>
+
+<!--775E5035EA174F24BEC50854F6F74626--><OBUISEL_SELECTOR_FIELD>
+<!--775E5035EA174F24BEC50854F6F74626-->  <OBUISEL_SELECTOR_FIELD_ID><![CDATA[775E5035EA174F24BEC50854F6F74626]]></OBUISEL_SELECTOR_FIELD_ID>
+<!--775E5035EA174F24BEC50854F6F74626-->  <OBUISEL_SELECTOR_ID><![CDATA[A1024EFED9AF41F39C374ACD0EC1D733]]></OBUISEL_SELECTOR_ID>
+<!--775E5035EA174F24BEC50854F6F74626-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--775E5035EA174F24BEC50854F6F74626-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--775E5035EA174F24BEC50854F6F74626-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--775E5035EA174F24BEC50854F6F74626-->  <AD_COLUMN_ID><![CDATA[7891269C83D9655DE040007F010155CE]]></AD_COLUMN_ID>
+<!--775E5035EA174F24BEC50854F6F74626-->  <NAME><![CDATA[Business Partner]]></NAME>
+<!--775E5035EA174F24BEC50854F6F74626-->  <DESCRIPTION><![CDATA[Anyone who takes part in daily business operations by acting as a customer, employee, etc.]]></DESCRIPTION>
+<!--775E5035EA174F24BEC50854F6F74626-->  <HELP><![CDATA[A Business Partner is anyone with whom you transact.  This can include a customer, vendor, employee or any combination of these.]]></HELP>
+<!--775E5035EA174F24BEC50854F6F74626-->  <PROPERTY><![CDATA[businessPartner]]></PROPERTY>
+<!--775E5035EA174F24BEC50854F6F74626-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--775E5035EA174F24BEC50854F6F74626-->  <SORT><![CDATA[Y]]></SORT>
+<!--775E5035EA174F24BEC50854F6F74626-->  <FILTER><![CDATA[Y]]></FILTER>
+<!--775E5035EA174F24BEC50854F6F74626-->  <SEARCHINSUGGESTIONBOX><![CDATA[N]]></SEARCHINSUGGESTIONBOX>
+<!--775E5035EA174F24BEC50854F6F74626-->  <SHOWINGRID><![CDATA[Y]]></SHOWINGRID>
+<!--775E5035EA174F24BEC50854F6F74626-->  <SORTNO><![CDATA[4]]></SORTNO>
+<!--775E5035EA174F24BEC50854F6F74626-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--775E5035EA174F24BEC50854F6F74626-->  <ISOUTFIELD><![CDATA[N]]></ISOUTFIELD>
+<!--775E5035EA174F24BEC50854F6F74626-->  <SHOWINPICKLIST><![CDATA[N]]></SHOWINPICKLIST>
+<!--775E5035EA174F24BEC50854F6F74626--></OBUISEL_SELECTOR_FIELD>
+
 <!--797E2E6C7A6D4A349491B85A1C1ACB7D--><OBUISEL_SELECTOR_FIELD>
 <!--797E2E6C7A6D4A349491B85A1C1ACB7D-->  <OBUISEL_SELECTOR_FIELD_ID><![CDATA[797E2E6C7A6D4A349491B85A1C1ACB7D]]></OBUISEL_SELECTOR_FIELD_ID>
 <!--797E2E6C7A6D4A349491B85A1C1ACB7D-->  <OBUISEL_SELECTOR_ID><![CDATA[EB3C41F0973A4EDA91E475833792A6D4]]></OBUISEL_SELECTOR_ID>
@@ -1801,6 +1955,26 @@
 <!--943A10BE2F494F768A8DC4BC44B5B092-->  <SHOWINPICKLIST><![CDATA[N]]></SHOWINPICKLIST>
 <!--943A10BE2F494F768A8DC4BC44B5B092--></OBUISEL_SELECTOR_FIELD>
 
+<!--94FC6CA95A1749E8ACF3D43BA30B97F8--><OBUISEL_SELECTOR_FIELD>
+<!--94FC6CA95A1749E8ACF3D43BA30B97F8-->  <OBUISEL_SELECTOR_FIELD_ID><![CDATA[94FC6CA95A1749E8ACF3D43BA30B97F8]]></OBUISEL_SELECTOR_FIELD_ID>
+<!--94FC6CA95A1749E8ACF3D43BA30B97F8-->  <OBUISEL_SELECTOR_ID><![CDATA[A1024EFED9AF41F39C374ACD0EC1D733]]></OBUISEL_SELECTOR_ID>
+<!--94FC6CA95A1749E8ACF3D43BA30B97F8-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--94FC6CA95A1749E8ACF3D43BA30B97F8-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--94FC6CA95A1749E8ACF3D43BA30B97F8-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--94FC6CA95A1749E8ACF3D43BA30B97F8-->  <AD_COLUMN_ID><![CDATA[7891269C83DD655DE040007F010155CE]]></AD_COLUMN_ID>
+<!--94FC6CA95A1749E8ACF3D43BA30B97F8-->  <NAME><![CDATA[Amount]]></NAME>
+<!--94FC6CA95A1749E8ACF3D43BA30B97F8-->  <PROPERTY><![CDATA[amount]]></PROPERTY>
+<!--94FC6CA95A1749E8ACF3D43BA30B97F8-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--94FC6CA95A1749E8ACF3D43BA30B97F8-->  <SORT><![CDATA[Y]]></SORT>
+<!--94FC6CA95A1749E8ACF3D43BA30B97F8-->  <FILTER><![CDATA[Y]]></FILTER>
+<!--94FC6CA95A1749E8ACF3D43BA30B97F8-->  <SEARCHINSUGGESTIONBOX><![CDATA[N]]></SEARCHINSUGGESTIONBOX>
+<!--94FC6CA95A1749E8ACF3D43BA30B97F8-->  <SHOWINGRID><![CDATA[Y]]></SHOWINGRID>
+<!--94FC6CA95A1749E8ACF3D43BA30B97F8-->  <SORTNO><![CDATA[5]]></SORTNO>
+<!--94FC6CA95A1749E8ACF3D43BA30B97F8-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--94FC6CA95A1749E8ACF3D43BA30B97F8-->  <ISOUTFIELD><![CDATA[N]]></ISOUTFIELD>
+<!--94FC6CA95A1749E8ACF3D43BA30B97F8-->  <SHOWINPICKLIST><![CDATA[N]]></SHOWINPICKLIST>
+<!--94FC6CA95A1749E8ACF3D43BA30B97F8--></OBUISEL_SELECTOR_FIELD>
+
 <!--9658A4E18959420F927BC4A1B26D0931--><OBUISEL_SELECTOR_FIELD>
 <!--9658A4E18959420F927BC4A1B26D0931-->  <OBUISEL_SELECTOR_FIELD_ID><![CDATA[9658A4E18959420F927BC4A1B26D0931]]></OBUISEL_SELECTOR_FIELD_ID>
 <!--9658A4E18959420F927BC4A1B26D0931-->  <OBUISEL_SELECTOR_ID><![CDATA[D47A3616483E46C18A09794B9B276B37]]></OBUISEL_SELECTOR_ID>
@@ -2557,6 +2731,26 @@
 <!--D7DF368232B34336ACC82DB829649720-->  <SHOWINPICKLIST><![CDATA[N]]></SHOWINPICKLIST>
 <!--D7DF368232B34336ACC82DB829649720--></OBUISEL_SELECTOR_FIELD>
 
+<!--D9C977C680C04F29BE27151943D2A1B1--><OBUISEL_SELECTOR_FIELD>
+<!--D9C977C680C04F29BE27151943D2A1B1-->  <OBUISEL_SELECTOR_FIELD_ID><![CDATA[D9C977C680C04F29BE27151943D2A1B1]]></OBUISEL_SELECTOR_FIELD_ID>
+<!--D9C977C680C04F29BE27151943D2A1B1-->  <OBUISEL_SELECTOR_ID><![CDATA[A1024EFED9AF41F39C374ACD0EC1D733]]></OBUISEL_SELECTOR_ID>
+<!--D9C977C680C04F29BE27151943D2A1B1-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--D9C977C680C04F29BE27151943D2A1B1-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--D9C977C680C04F29BE27151943D2A1B1-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--D9C977C680C04F29BE27151943D2A1B1-->  <AD_COLUMN_ID><![CDATA[7891269C83DB655DE040007F010155CE]]></AD_COLUMN_ID>
+<!--D9C977C680C04F29BE27151943D2A1B1-->  <NAME><![CDATA[Payment Date]]></NAME>
+<!--D9C977C680C04F29BE27151943D2A1B1-->  <PROPERTY><![CDATA[paymentDate]]></PROPERTY>
+<!--D9C977C680C04F29BE27151943D2A1B1-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--D9C977C680C04F29BE27151943D2A1B1-->  <SORT><![CDATA[Y]]></SORT>
+<!--D9C977C680C04F29BE27151943D2A1B1-->  <FILTER><![CDATA[Y]]></FILTER>
+<!--D9C977C680C04F29BE27151943D2A1B1-->  <SEARCHINSUGGESTIONBOX><![CDATA[N]]></SEARCHINSUGGESTIONBOX>
+<!--D9C977C680C04F29BE27151943D2A1B1-->  <SHOWINGRID><![CDATA[Y]]></SHOWINGRID>
+<!--D9C977C680C04F29BE27151943D2A1B1-->  <SORTNO><![CDATA[3]]></SORTNO>
+<!--D9C977C680C04F29BE27151943D2A1B1-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--D9C977C680C04F29BE27151943D2A1B1-->  <ISOUTFIELD><![CDATA[N]]></ISOUTFIELD>
+<!--D9C977C680C04F29BE27151943D2A1B1-->  <SHOWINPICKLIST><![CDATA[N]]></SHOWINPICKLIST>
+<!--D9C977C680C04F29BE27151943D2A1B1--></OBUISEL_SELECTOR_FIELD>
+
 <!--D9CDC979521D4334A3D2D9A5D038257B--><OBUISEL_SELECTOR_FIELD>
 <!--D9CDC979521D4334A3D2D9A5D038257B-->  <OBUISEL_SELECTOR_FIELD_ID><![CDATA[D9CDC979521D4334A3D2D9A5D038257B]]></OBUISEL_SELECTOR_FIELD_ID>
 <!--D9CDC979521D4334A3D2D9A5D038257B-->  <OBUISEL_SELECTOR_ID><![CDATA[4C8BC3E8E56441F4B8C98C684A0C9212]]></OBUISEL_SELECTOR_ID>
--- a/src/org/openbravo/erpCommon/ad_callouts/SE_GLItem_Transaction.java	Tue Aug 12 08:32:37 2014 +0200
+++ b/src/org/openbravo/erpCommon/ad_callouts/SE_GLItem_Transaction.java	Tue Aug 12 08:56:49 2014 +0200
@@ -37,28 +37,36 @@
       final String strTransactionId = info.getStringParameter("Fin_Finacc_Transaction_ID",
           IsIDFilter.instance);
       if ("".equals(strGLItemId)) {
-        return;
+        info.addResult("inpdescription", "");
       }
       GLItem glItem = OBDal.getInstance().get(GLItem.class, strGLItemId);
       FIN_FinaccTransaction transaction = OBDal.getInstance().get(FIN_FinaccTransaction.class,
           strTransactionId);
-      GLItem oldGLItem = transaction.getGLItem();
-      String description = transaction.getDescription();
-      String oldGlItemString = Utility.messageBD(this, "APRM_GLItem", info.vars.getLanguage())
-          + ": " + oldGLItem.getName();
-      String newGlItemString = Utility.messageBD(this, "APRM_GLItem", info.vars.getLanguage())
-          + ": " + glItem.getName();
-      if (description != null && !description.isEmpty()) {
-        description = description.indexOf(oldGlItemString) != -1 ? (description
-            .indexOf(oldGlItemString) == 0 ? "" : description.substring(0,
-            description.indexOf(oldGlItemString) - 1)
-            + "\n")
-            + newGlItemString
-            + description.substring(
-                oldGlItemString.length() + description.indexOf(oldGlItemString),
-                description.length()) : description;
+      String description = "";
+      if (transaction != null) {
+        GLItem oldGLItem = transaction.getGLItem();
+        description = transaction.getDescription();
+        String oldGlItemString = Utility.messageBD(this, "APRM_GLItem", info.vars.getLanguage())
+            + ": " + oldGLItem.getName();
+        String newGlItemString = Utility.messageBD(this, "APRM_GLItem", info.vars.getLanguage())
+            + ": " + glItem.getName();
+        if (description != null && !description.isEmpty()) {
+          description = description.indexOf(oldGlItemString) != -1 ? (description
+              .indexOf(oldGlItemString) == 0 ? "" : description.substring(0,
+              description.indexOf(oldGlItemString) - 1)
+              + "\n")
+              + newGlItemString
+              + description.substring(
+                  oldGlItemString.length() + description.indexOf(oldGlItemString),
+                  description.length()) : description;
+        }
+        description = (description == null || description.isEmpty()) ? newGlItemString
+            : description;
+      } else {
+        description = Utility.messageBD(this, "APRM_GLItem", info.vars.getLanguage()) + ": "
+            + glItem.getName();
+        ;
       }
-      description = (description == null || description.isEmpty()) ? newGlItemString : description;
       info.addResult("inpdescription", description);
     } catch (Exception e) {
       return;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/org/openbravo/erpCommon/ad_callouts/SE_Payment_Transaction.java	Tue Aug 12 08:56:49 2014 +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) 2014 Openbravo SLU
+ * All Rights Reserved.
+ * Contributor(s):  ______________________________________.
+ ************************************************************************
+ */
+package org.openbravo.erpCommon.ad_callouts;
+
+import java.math.BigDecimal;
+
+import javax.servlet.ServletException;
+
+import org.openbravo.base.filter.IsIDFilter;
+import org.openbravo.dal.service.OBDal;
+import org.openbravo.model.financialmgmt.payment.FIN_Payment;
+
+public class SE_Payment_Transaction extends SimpleCallout {
+
+  private static final long serialVersionUID = 1L;
+
+  @Override
+  protected void execute(CalloutInfo info) throws ServletException {
+    try {
+      final String strPaymentId = info.getStringParameter("inpfinPaymentId", IsIDFilter.instance);
+      if ("".equals(strPaymentId)) {
+        info.addResult("inpdescription", "");
+        info.addResult("inpdepositamt", BigDecimal.ZERO);
+        info.addResult("inppaymentamt", BigDecimal.ZERO);
+      }
+      FIN_Payment payment = OBDal.getInstance().get(FIN_Payment.class, strPaymentId);
+      if ((payment.isReceipt() && payment.getAmount().compareTo(BigDecimal.ZERO) > 0)
+          || (!payment.isReceipt() && payment.getAmount().compareTo(BigDecimal.ZERO) < 0)) {
+        info.addResult("inpdepositamt", payment.getFinancialTransactionAmount().abs());
+        info.addResult("inppaymentamt", BigDecimal.ZERO);
+      } else {
+        info.addResult("inpdepositamt", BigDecimal.ZERO);
+        info.addResult("inppaymentamt", payment.getFinancialTransactionAmount().abs());
+      }
+      if (payment.getBusinessPartner() != null) {
+        info.addResult("inpcBpartnerId", payment.getBusinessPartner().getId());
+      }
+      if (payment.getDescription() != null) {
+        info.addResult("inpdescription", payment.getDescription());
+      }
+    } catch (Exception e) {
+      return;
+    }
+  }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/org/openbravo/erpCommon/ad_callouts/SE_Trxtype_Transaction.java	Tue Aug 12 08:56:49 2014 +0200
@@ -0,0 +1,55 @@
+/*
+ *************************************************************************
+ * 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) 2014 Openbravo SLU
+ * All Rights Reserved.
+ * Contributor(s):  ______________________________________.
+ ************************************************************************
+ */
+package org.openbravo.erpCommon.ad_callouts;
+
+import java.math.BigDecimal;
+
+import javax.servlet.ServletException;
+
+public class SE_Trxtype_Transaction extends SimpleCallout {
+
+  private static final long serialVersionUID = 1L;
+
+  @Override
+  protected void execute(CalloutInfo info) throws ServletException {
+    try {
+      final String strTrxType = info.getStringParameter("inptrxtype", null);
+      if ("BF".equals(strTrxType)) {
+        info.addResult("inpfinPaymentId", "");
+        info.addResult("inpcGlitemId", "");
+        info.addResult("inpdepositamt", BigDecimal.ZERO);
+        info.addResult("inppaymentamt", BigDecimal.ZERO);
+        info.addResult("inpissotrx", "Y");
+      }
+      if ("BPW".equals(strTrxType)) {
+        info.addResult("inpfinPaymentId", "");
+        info.addResult("inpdepositamt", BigDecimal.ZERO);
+        info.addResult("inpissotrx", "N");
+      }
+      if ("BPD".equals(strTrxType)) {
+        info.addResult("inpfinPaymentId", "");
+        info.addResult("inppaymentamt", BigDecimal.ZERO);
+        info.addResult("inpissotrx", "Y");
+      }
+
+    } catch (Exception e) {
+      return;
+    }
+  }
+}
--- a/src/org/openbravo/event/PaidStatusEventHandler.java	Tue Aug 12 08:32:37 2014 +0200
+++ b/src/org/openbravo/event/PaidStatusEventHandler.java	Tue Aug 12 08:56:49 2014 +0200
@@ -54,42 +54,48 @@
         FIN_FinaccTransaction.ENTITY_NAME);
     final Property statusProperty = transactionEntity
         .getProperty(FIN_FinaccTransaction.PROPERTY_STATUS);
+    final Property processedProperty = transactionEntity
+        .getProperty(FIN_FinaccTransaction.PROPERTY_PROCESSED);
     String oldStatus = (String) event.getPreviousState(statusProperty);
+    // boolean processedOldStatus = (Boolean) event.getPreviousState(processedProperty);
+    boolean processedNewStatus = (Boolean) event.getPreviousState(processedProperty);
     String newStatus = (String) event.getCurrentState(statusProperty);
     final FIN_FinaccTransaction transaction = (FIN_FinaccTransaction) event.getTargetInstance();
+    // TODO: Review: What happens when deleting???
+    if (processedNewStatus) {
+      if ((oldStatus.equals(STATUS_DEPOSIT) | oldStatus.equals(STATUS_WITHDRAWN))
+          & newStatus.equals(STATUS_CLEARED)) {
 
-    if ((oldStatus.equals(STATUS_DEPOSIT) | oldStatus.equals(STATUS_WITHDRAWN))
-        & newStatus.equals(STATUS_CLEARED)) {
+        Boolean invoicePaidold = false;
 
-      Boolean invoicePaidold = false;
-
-      if (transaction.getFinPayment() != null) {
-        for (FIN_PaymentDetail pd : transaction.getFinPayment().getFINPaymentDetailList()) {
-          for (FIN_PaymentScheduleDetail psd : pd.getFINPaymentScheduleDetailList()) {
-            invoicePaidold = psd.isInvoicePaid();
-            if (!invoicePaidold) {
-              if (newStatus.equals(transaction.getFinPayment().getStatus())) {
-                psd.setInvoicePaid(true);
-              }
-              if (psd.isInvoicePaid()) {
-                FIN_Utility.updatePaymentAmounts(psd);
-                FIN_Utility.updateBusinessPartnerCredit(transaction.getFinPayment());
+        if (transaction.getFinPayment() != null) {
+          for (FIN_PaymentDetail pd : transaction.getFinPayment().getFINPaymentDetailList()) {
+            for (FIN_PaymentScheduleDetail psd : pd.getFINPaymentScheduleDetailList()) {
+              invoicePaidold = psd.isInvoicePaid();
+              if (!invoicePaidold) {
+                if (newStatus.equals(transaction.getFinPayment().getStatus())) {
+                  psd.setInvoicePaid(true);
+                }
+                if (psd.isInvoicePaid()) {
+                  FIN_Utility.updatePaymentAmounts(psd);
+                  FIN_Utility.updateBusinessPartnerCredit(transaction.getFinPayment());
+                }
               }
             }
           }
         }
-      }
 
-    } else if ((newStatus.equals(STATUS_DEPOSIT) | newStatus.equals(STATUS_WITHDRAWN))
-        & oldStatus.equals(STATUS_CLEARED)) {
-      Boolean invoicePaidold = false;
-      if (transaction.getFinPayment() != null) {
-        for (FIN_PaymentDetail pd : transaction.getFinPayment().getFINPaymentDetailList()) {
-          for (FIN_PaymentScheduleDetail psd : pd.getFINPaymentScheduleDetailList()) {
-            invoicePaidold = psd.isInvoicePaid();
-            if (invoicePaidold) {
-              if (oldStatus.equals(FIN_Utility.invoicePaymentStatus(transaction.getFinPayment()))) {
-                FIN_Utility.restorePaidAmounts(psd);
+      } else if ((newStatus.equals(STATUS_DEPOSIT) | newStatus.equals(STATUS_WITHDRAWN))
+          & oldStatus.equals(STATUS_CLEARED)) {
+        Boolean invoicePaidold = false;
+        if (transaction.getFinPayment() != null) {
+          for (FIN_PaymentDetail pd : transaction.getFinPayment().getFINPaymentDetailList()) {
+            for (FIN_PaymentScheduleDetail psd : pd.getFINPaymentScheduleDetailList()) {
+              invoicePaidold = psd.isInvoicePaid();
+              if (invoicePaidold) {
+                if (oldStatus.equals(FIN_Utility.invoicePaymentStatus(transaction.getFinPayment()))) {
+                  FIN_Utility.restorePaidAmounts(psd);
+                }
               }
             }
           }