Merge temporary head for 3.0PR15Q3.5
authorRM packaging bot <staff.rm@openbravo.com>
Fri, 22 Jan 2016 08:42:24 +0000
changeset 28863 af17d82ee9ed
parent 28496 0683187303f4 (diff)
parent 28862 5ff9bd11230c (current diff)
child 28882 1adc9a58e28a
Merge temporary head for 3.0PR15Q3.5
.hgsigs
.hgtags
modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/utility/FIN_Utility.java
modules/org.openbravo.base.weld/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.base.weld/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.client.application/src/org/openbravo/client/application/report/ReportingUtils.java
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-minidaterange.js
modules/org.openbravo.client.htmlwidget/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.client.htmlwidget/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.client.kernel/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.client.kernel/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.client.myob/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.client.myob/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.client.querylist/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.client.querylist/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.client.widgets/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.client.widgets/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.financial.paymentreport/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.financial.paymentreport/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.reports.ordersawaitingdelivery/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.reports.ordersawaitingdelivery/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.service.datasource/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.service.datasource/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.service.integration.google/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.service.integration.google/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.service.integration.openid/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.service.integration.openid/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.service.json/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.service.json/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.userinterface.selector/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.userinterface.selector/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.userinterface.skin.250to300Comp/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.userinterface.skin.250to300Comp/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.userinterface.smartclient/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.userinterface.smartclient/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.utility.cleanup.log/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.utility.cleanup.log/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.v3.datasets/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.v3.datasets/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.v3.framework/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.v3.framework/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.v3/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.v3/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
src-db/database/model/triggers/GL_JOURNAL_CHK_RESTRICT_TRG.xml
src-db/database/sourcedata/AD_MODULE.xml
src-db/database/sourcedata/AD_TABLE.xml
src/org/openbravo/erpCommon/utility/WindowTree.java
--- a/.classpath.template	Thu Jan 21 09:06:30 2016 +0000
+++ b/.classpath.template	Fri Jan 22 08:42:24 2016 +0000
@@ -5,6 +5,7 @@
 	<classpathentry combineaccessrules="false" exported="true" kind="src" path="/OpenbravoTrl"/>
 	<classpathentry combineaccessrules="false" exported="true" kind="src" path="/OpenbravoWAD"/>
 	<classpathentry including="**/*.ext|**/*.ftl|**/*.java|**/*.oaw|**/*.properties|**/*.xml|**/*.xpt|**/*.xslt" kind="src" path="src"/>
+	<classpathentry kind="src" path="modules/org.openbravo.apachejdbcconnectionpool/src"/>
 	<classpathentry kind="src" path="modules/org.openbravo.client.widgets/src"/>
 	<classpathentry kind="src" path="modules/org.openbravo.client.htmlwidget/src"/>
 	<classpathentry kind="src" path="modules/org.openbravo.base.weld/src"/>
--- a/.hgsigs	Thu Jan 21 09:06:30 2016 +0000
+++ b/.hgsigs	Fri Jan 22 08:42:24 2016 +0000
@@ -173,4 +173,15 @@
 ac761ac78f576cee64046e115ac42d2a3b227682 0 iEYEABECAAYFAlVItlgACgkQCX/oGf+2qkPgSACeNz58xoUWpTvMywmncbWx7+r7bnUAn1Ba1al80Q9HMY/wiMNu1Vfpd9Jo
 fdb1e0cd936d09381ae1aa87be98cc4f0f334f31 0 iEYEABECAAYFAlVbM8QACgkQCX/oGf+2qkO+wACfTbKub/UT0e2V2iyIB21716NAn/oAoIHu7PYZ7w/BkTQDZWR0PXDdYkty
 bd0e758ae44eb624d8af403fb4764629c1a45b21 0 iEYEABECAAYFAlWChbsACgkQCX/oGf+2qkM6xACfXP4M7zXaih+uqkIpGHMqGPTzxD8An0r58zI1YN3gKOT9t0kZ3IdaNA7c
+906c7a47100c5694d720f6a00a8d205538562334 0 iEYEABECAAYFAlW3GiEACgkQCX/oGf+2qkNk4gCfVlZA1GqR2LvJwBPBXoMn6RCRyFYAnA4aPF+fOZXRpAqKMRT55nvswuRI
+6dfd2fade034c7225367366dc34dcf402b596555 0 iEYEABECAAYFAlXccLwACgkQCX/oGf+2qkPEMQCeM4MxdgXlCtbu0xqZNcX0IAEuGZgAnAjQlB4gOw0q84Q/gFyRL38jkahJ
+9f4a209cc84b3b4e7f3176388f6d6071779ac3e2 0 iEYEABECAAYFAlX5YqQACgkQCX/oGf+2qkOLNwCgr9InQrxWVMHG2e7sabvZBm3KD6gAoPvoMDHktqqkv2Qqtbv3G1mqpTrM
+f22b32ad49b1baca7b310bdf68d8d411e897f7bf 0 iEYEABECAAYFAlYtwHYACgkQCX/oGf+2qkOQ1QCgsBVLaaNfILpxAYrZfhBD+GDVVLEAnREcCa1Lvzf4mJ8eD8VWTx1g8kqk
+73f7d3c67dc7d6063af1dac6e71db12b9081150a 0 iEYEABECAAYFAlXMHl0ACgkQCX/oGf+2qkNVuACfTfB6/RfeioYrYtsi81kAwADW0lgAoOJdXKScLwl6RHeXIFvMlrzlcT6w
+f8b98762376a89ec93a0a623c61fdab00975c3a9 0 iEYEABECAAYFAlXtQ4gACgkQCX/oGf+2qkMZUgCePOnen6iguLqaG+86NeCC8Hr0yzAAoKTnw/BIXyBm5Ski5JQT/0mF1zHK
+9755d00af209f39887eba34a08922463fbcdac91 0 iEYEABECAAYFAlYt2zgACgkQCX/oGf+2qkN1KgCg6tzAQat0ZJJIWeFyr6yLRVCvh24AnjVyPbFPvbJ3/EOgUHtJWz5lWzeM
+d20a396ffa245fd3cdbadc3196df3554018d2e20 0 iEYEABECAAYFAlY4SL4ACgkQCX/oGf+2qkOjJACfS1q37UfrWobml4IVCOKqGeV+CU0An3iRcDJJ+N3aJMuzjkZh8xYe0mRQ
+089152094fe394f987fa18606cba401cc20283ec 0 iEYEABECAAYFAlZmVhkACgkQCX/oGf+2qkOFxgCaA0tF7KBDttIBpX4Iezn3GPqSqJQAoIO5TQRfs/Gpwo/lV48IaAIG94vJ
 6c3455925759761e11a3e14afee7d4bfa6d44b7b 0 iEYEABECAAYFAlagn5YACgkQCX/oGf+2qkO+bwCg5QR2pBchydWi0CYFTF0W0E3YP5AAoI2VCfXgMzocJ8AAeqsXRtetQ1pR
+d2c765a228d83098cc5f253cdd364abdb4a4697e 0 iEYEABECAAYFAlZOorMACgkQCX/oGf+2qkMFfwCgocaX6vsWuoGtE55aoHgBD1/7OKoAoOv4J31+P+8BtkVHJyKLhxGVBoLo
+cf00bd72641cd3d41f95c0610058f127dad7b91a 0 iEYEABECAAYFAlZv7k4ACgkQCX/oGf+2qkNDIgCeO9reaQhgk94B44p24tVR/E5NsccAoOoJYRH9w6b6sWOOQkRivfVjQwSv
--- a/.hgtags	Thu Jan 21 09:06:30 2016 +0000
+++ b/.hgtags	Fri Jan 22 08:42:24 2016 +0000
@@ -184,4 +184,15 @@
 4239774eb8de8f0740bfbd6e3e36c075ee2a5a91 3.0PR15Q2
 e861122b0b1d2aa2ca6e177bfbb9ddf939e33dd7 3.0PR15Q2.1
 a28a880b5aeb9208eaf0ce569fd51b7a5fc2b48e 3.0PR15Q2.2
+01405101d810eaafec106bab50ce31b41df52569 3.0PR15Q2.3
+d26c43a861dec9147a6a60d8aca52359837e9591 3.0PR15Q2.4
+f38025d616fa8a50a95d0dd3a3c38bcf6bbce053 3.0PR15Q2.5
+8b094ef73876cad67e35345c1add17266413af46 3.0PR15Q2.6
+828faf1939944cd8d55d562494138f68305c5b50 3.0PR15Q3
+e5863950c81de2bcf7dce57035094e96d544a9ae 3.0PR15Q3.1
+9320a67a9ef1cafb5076d06bdd6d716abc662c40 3.0PR15Q3.2
+bce57079bd436cec545edb6c12246170862f0416 3.0PR15Q3.3
+8dabadcfecebf5aced31ed98411517afcb10d792 3.0PR15Q3.4
 0c91d0ae09c32dc46fc9e91f516ef36c6cdecda7 3.0PR15Q3.5
+84cd25c33900a44c955c5a899e570281f02e0ccc 3.0PR15Q4
+f698a5f953c867f7f7fefe86d7cca3ff80324181 3.0PR15Q4.1
--- a/build.xml	Thu Jan 21 09:06:30 2016 +0000
+++ b/build.xml	Fri Jan 22 08:42:24 2016 +0000
@@ -554,13 +554,29 @@
   </target>
 
   <target name="generate.java.doc">
-    <javadoc sourcepath="${base.src}:${base.src.test}:${build.AD}:${base.src.core}/src:${base.src.gen}:build/javasqlc/src/:build/javasqlc/srcAD" Windowtitle="${title}" access="protected" Header="${header}" Footer="${footer}" destdir="${build.docs}" linksource="no" maxmemory="1024M">
+    <javadoc Windowtitle="${title}" access="protected" Header="${header}" Footer="${footer}" destdir="${build.docs}" maxmemory="1024M">
+      <sourcepath>
+        <pathelement path="${base.src}" />
+        <pathelement path="${base.src.test}/src" />
+        <pathelement path="${build.AD}" />
+        <pathelement path="${base.src.core}/src" />
+        <pathelement path="${base.src.gen}" />
+        <pathelement path="build/javasqlc/src" />
+        <pathelement path="build/javasqlc/srcAD" />
+        <dirset dir="${base.modules}">
+          <include name="*/src" />
+          <include name="*/src-test" />
+        </dirset>
+      </sourcepath>
       <excludepackage name="org.openbravo.erpWindows.*"/>
       <classpath>
         <path refid="project.class.path"/>
         <pathelement path="lib/build/js.jar" />
+        <fileset dir="${base.modules}">
+          <include name="*/lib/test/*.jar" />
+        </fileset>
       </classpath>
-      <link href="http://java.sun.com/javase/6/docs/api/"/>
+      <link href="http://docs.oracle.com/javase/6/docs/api/"/>
     </javadoc>
   </target>
 
@@ -597,6 +613,10 @@
     <ant dir="${base.src.test}" target="run.quick.tests" inheritAll="true" inheritRefs="true" />
   </target>
 
+  <target name="run.test" depends="init">
+    <ant dir="${base.src.test}" target="run.test" inheritAll="true" inheritRefs="true" />
+  </target>
+
   <target name="run.api.test.javascript">
     <ant dir="${base.src.test}" target="run.api.test.javascript" inheritAll="true" inheritRefs="true" />
   </target>
@@ -1084,7 +1104,7 @@
         <pathelement path="${base.lib}/runtime/log4j-1.2.16.jar" />
         <pathelement path="${base.lib}/runtime/commons-pool-1.5.6.jar" />
         <pathelement path="${base.lib}/runtime/commons-dbcp-1.4.jar" />
-        <pathelement path="${base.lib}/runtime/postgresql-9.0-801.jdbc4.jar" />
+        <pathelement path="${base.lib}/runtime/postgresql-9.4-1201.jdbc4.jar" />
         <pathelement path="${base.lib}/runtime/ojdbc6.jar" />
         <pathelement path="${base.lib}/runtime/commons-collectionsi-3.2.1.jar" />
         <pathelement path="${base.lib}/runtime/ant-1.9.2.jar" />
--- a/config/Openbravo.properties.template	Thu Jan 21 09:06:30 2016 +0000
+++ b/config/Openbravo.properties.template	Fri Jan 22 08:42:24 2016 +0000
@@ -10,7 +10,7 @@
 # * under the License. 
 # * The Original Code is Openbravo ERP. 
 # * The Initial Developer of the Original Code is Openbravo SLU 
-# * All portions are Copyright (C) 2007-2012 Openbravo SLU 
+# * All portions are Copyright (C) 2007-2015 Openbravo SLU 
 # * All Rights Reserved. 
 # * Contributor(s):  ______________________________________.
 # ************************************************************************
@@ -81,6 +81,25 @@
 bbdd.password=tad
 bbdd.sessionConfig=select update_dateFormat('DD-MM-YYYY')
 
+######################
+# DB connection pool #
+######################
+
+db.externalPoolClassName=org.openbravo.apachejdbcconnectionpool.JdbcExternalConnectionPool
+
+# Documentation at http://wiki.openbravo.com/wiki/Modules:Apache_JDBC_Connection_Pool#Pool_Configuration
+db.pool.initialSize=1
+db.pool.minIdle=5
+db.pool.maxActive=10000
+db.pool.timeBetweenEvictionRunsMillis=60000
+db.pool.minEvictableIdleTimeMillis=120000
+db.pool.removeAbandoned=false
+db.pool.testOnBorrow=true
+db.pool.testWhileIdle=false
+db.pool.testOnReturn=false
+db.pool.validationQuery=SELECT 1 FROM DUAL
+db.pool.validationInterval=30000
+
 ##################
 # Tomcat manager #
 ##################
--- a/legal/Licensing.txt	Thu Jan 21 09:06:30 2016 +0000
+++ b/legal/Licensing.txt	Fri Jan 22 08:42:24 2016 +0000
@@ -107,7 +107,7 @@
 # commons-dbcp-1.4.jar
 # commons-digester-1.8.1.jar
 # commons-fileupload-1.2.2.jar
-# commons-io-2.0.1.jar
+# commons-io-2.4.jar
 # commons-lang-2.6.jar
 # commons-logging-1.1.1.jar
 # commons-pool-1.5.6.jar
@@ -123,7 +123,7 @@
 All files under Apache Software License 2.0, available at
 http://www.apache.org/licenses/LICENSE-2.0
 
-# postgresql-9.0-801.jdbc4.jar
+# postgresql-9.4-1201.jdbc4.jar
 Under the BSD license, also available at http://jdbc.postgresql.org/license.html  
 
 # xstream-1.3.1.jar
@@ -212,6 +212,7 @@
 # ejb-api-3.0.jar
 # jboss-interceptor-api-3.1.0-CR3.jar
 # jboss-ejb3-api-3.1.0.jar
+# jboss-el-api_2.2_spec-1.0.0.Final.jar
 Under the LGPL license (included as LGPL-2.1.txt in this folder)
 
 # cal10n-api-0.7.4.jar
@@ -227,23 +228,36 @@
 # weld-core-1.1.24.Final.jar
 # weld-servlet-core-1.1.24.Final.jar
 # weld-spi.jar
-# arquillian-api-1.0.0.Alpha4.jar
-# arquillian-impl-base-1.0.0.Alpha4.jar
-# arquillian-junit-1.0.0.Alpha4.jar
-# arquillian-protocol-local-1.0.0.Alpha4.jar
-# arquillian-spi-1.0.0.Alpha4.jar
-# arquillian-testenricher-cdi-1.0.0.Alpha4.jar
-# arquillian-weld-ee-embedded-1.1-1.0.0.Alpha4.jar
-# shrinkwrap-api-1.0.0-alpha-11.jar
-# shrinkwrap-extension-classloader-1.0.0-alpha-11.jar
-# shrinkwrap-impl-base-1.0.0-alpha-11.jar
-# shrinkwrap-spi-1.0.0-alpha-11.jar
+# arquillian-config-api-1.1.8.Final.jar
+# arquillian-config-impl-base-1.1.8.Final.jar
+# arquillian-container-impl-base-1.1.8.Final.jar
+# arquillian-container-spi-1.1.8.Final.jar
+# arquillian-container-test-api-1.1.8.Final.jar
+# arquillian-container-test-impl-base-1.1.8.Final.jar
+# arquillian-container-test-spi-1.1.8.Final.jar
+# arquillian-core-api-1.1.8.Final.jar
+# arquillian-core-impl-base-1.1.8.Final.jar
+# arquillian-core-spi-1.1.8.Final.jar
+# arquillian-junit-container-1.1.8.Final.jar
+# arquillian-junit-core-1.1.8.Final.jar
+# arquillian-test-api-1.1.8.Final.jar
+# arquillian-testenricher-cdi-1.0.2.Final.jar
+# arquillian-test-impl-base-1.1.8.Final.jar
+# arquillian-test-spi-1.1.8.Final.jar
+# arquillian-weld-ee-embedded-1.1-1.0.0.CR8.jar
+# shrinkwrap-api-1.2.2.jar
+# shrinkwrap-descriptors-api-base-2.0.0-alpha-7.jar
+# shrinkwrap-descriptors-spi-2.0.0-alpha-7.jar
+# shrinkwrap-impl-base-1.2.2.jar
+# shrinkwrap-spi-1.2.2.jar
 # validation-api-1.0.0.GA.jar
 # jsmin.0.2.4.jar
 # httpcore-4.0.1.jar
 # httpclient-4.0.jar
 # httpmime-4.1.jar
 # guice-2.0.jar
+# tomcat-juli.jar
+# tomcat-jdbc.jar
 Under the Apache 2.0 license (included as Apache_license-2.0.txt in this folder)
 
 # jslint4java-1.4.7.jar
Binary file lib/runtime/commons-io-2.0.1.jar has changed
Binary file lib/runtime/commons-io-2.4.jar has changed
Binary file lib/runtime/postgresql-9.0-801.jdbc4.jar has changed
Binary file lib/runtime/postgresql-9.4-1201.jdbc4.jar has changed
Binary file modules/org.openbravo.advpaymentmngt/build/classes/org/openbravo/advpaymentmngt/modulescript/AlertsForWrongInvoices.class has changed
Binary file modules/org.openbravo.advpaymentmngt/build/classes/org/openbravo/advpaymentmngt/modulescript/AlertsForWrongInvoicesData.class has changed
Binary file modules/org.openbravo.advpaymentmngt/build/classes/org/openbravo/advpaymentmngt/modulescript/AlertsForWrongOrders.class has changed
Binary file modules/org.openbravo.advpaymentmngt/build/classes/org/openbravo/advpaymentmngt/modulescript/AlertsForWrongOrdersData.class has changed
Binary file modules/org.openbravo.advpaymentmngt/build/classes/org/openbravo/advpaymentmngt/modulescript/CreateAccountingConfiguration.class has changed
Binary file modules/org.openbravo.advpaymentmngt/build/classes/org/openbravo/advpaymentmngt/modulescript/CreateDocumentNoSequence.class has changed
Binary file modules/org.openbravo.advpaymentmngt/build/classes/org/openbravo/advpaymentmngt/modulescript/DeleteWrongTransactions.class has changed
Binary file modules/org.openbravo.advpaymentmngt/build/classes/org/openbravo/advpaymentmngt/modulescript/InitializeAPRMReadyPreference.class has changed
Binary file modules/org.openbravo.advpaymentmngt/build/classes/org/openbravo/advpaymentmngt/modulescript/Issue28591UpdatePSD.class has changed
Binary file modules/org.openbravo.advpaymentmngt/build/classes/org/openbravo/advpaymentmngt/modulescript/LinkCreditPayments.class has changed
Binary file modules/org.openbravo.advpaymentmngt/build/classes/org/openbravo/advpaymentmngt/modulescript/UpdateCustomerBalance.class has changed
Binary file modules/org.openbravo.advpaymentmngt/build/classes/org/openbravo/advpaymentmngt/modulescript/UpdateGeneratedUsedCreditColumns.class has changed
Binary file modules/org.openbravo.advpaymentmngt/build/classes/org/openbravo/advpaymentmngt/modulescript/UpdateMatchedDocument.class has changed
Binary file modules/org.openbravo.advpaymentmngt/build/classes/org/openbravo/advpaymentmngt/modulescript/UpdatePaymentProcessedValue.class has changed
Binary file modules/org.openbravo.advpaymentmngt/build/classes/org/openbravo/advpaymentmngt/modulescript/UpdatePaymentProcessedValueData.class has changed
Binary file modules/org.openbravo.advpaymentmngt/build/classes/org/openbravo/advpaymentmngt/modulescript/UpdatePaymentScheduledetail.class has changed
Binary file modules/org.openbravo.advpaymentmngt/build/classes/org/openbravo/advpaymentmngt/modulescript/UpdateReconciliationProcessButtonValue.class has changed
Binary file modules/org.openbravo.advpaymentmngt/build/classes/org/openbravo/advpaymentmngt/modulescript/UpdateReconciliationStatementProcessedValue.class has changed
Binary file modules/org.openbravo.advpaymentmngt/build/classes/org/openbravo/advpaymentmngt/modulescript/UpdateRecordId2Value.class has changed
Binary file modules/org.openbravo.advpaymentmngt/build/classes/org/openbravo/advpaymentmngt/modulescript/UpdateTransactionBPExchangeRate.class has changed
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/WrongPaymentsFromJournalLine.class has changed
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/model/functions/APRM_GEN_PAYMENTSCHEDULE_ORD.xml	Thu Jan 21 09:06:30 2016 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/model/functions/APRM_GEN_PAYMENTSCHEDULE_ORD.xml	Fri Jan 22 08:42:24 2016 +0000
@@ -204,7 +204,8 @@
       WHERE ps.fin_payment_schedule_id = psd.fin_payment_schedule_order
         AND ps.c_order_id = p_record_id
         AND psd.fin_payment_detail_id = pd.fin_payment_detail_id
-        AND pd.fin_payment_id = p.fin_payment_id;
+        AND pd.fin_payment_id = p.fin_payment_id
+        AND p.status <> 'RPAP';
       IF (v_count <> 0) THEN
         RAISE_APPLICATION_ERROR(-20000, '@APRM_OrderWithPayments@'||v_DocumentNo);
       END IF;
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_COLUMN.xml	Thu Jan 21 09:06:30 2016 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_COLUMN.xml	Fri Jan 22 08:42:24 2016 +0000
@@ -9474,10 +9474,10 @@
 <!--B8A0E2E81E294B2AB10F4325BD4B563C-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
 <!--B8A0E2E81E294B2AB10F4325BD4B563C-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--B8A0E2E81E294B2AB10F4325BD4B563C-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
-<!--B8A0E2E81E294B2AB10F4325BD4B563C-->  <NAME><![CDATA[Transaction Date]]></NAME>
+<!--B8A0E2E81E294B2AB10F4325BD4B563C-->  <NAME><![CDATA[trxDate]]></NAME>
 <!--B8A0E2E81E294B2AB10F4325BD4B563C-->  <DESCRIPTION><![CDATA[The date that a specified transaction is entered into the application.]]></DESCRIPTION>
 <!--B8A0E2E81E294B2AB10F4325BD4B563C-->  <HELP><![CDATA[The Transaction Date indicates the date of the transaction.]]></HELP>
-<!--B8A0E2E81E294B2AB10F4325BD4B563C-->  <COLUMNNAME><![CDATA[transactionDate]]></COLUMNNAME>
+<!--B8A0E2E81E294B2AB10F4325BD4B563C-->  <COLUMNNAME><![CDATA[trxDate]]></COLUMNNAME>
 <!--B8A0E2E81E294B2AB10F4325BD4B563C-->  <AD_TABLE_ID><![CDATA[BC21981DCF0846338D631887BEDFE7FA]]></AD_TABLE_ID>
 <!--B8A0E2E81E294B2AB10F4325BD4B563C-->  <AD_REFERENCE_ID><![CDATA[15]]></AD_REFERENCE_ID>
 <!--B8A0E2E81E294B2AB10F4325BD4B563C-->  <FIELDLENGTH><![CDATA[19]]></FIELDLENGTH>
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MESSAGE.xml	Thu Jan 21 09:06:30 2016 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MESSAGE.xml	Fri Jan 22 08:42:24 2016 +0000
@@ -649,6 +649,18 @@
 <!--712C841E501642B881A998CCAC13E420-->  <ISINCLUDEINI18N><![CDATA[N]]></ISINCLUDEINI18N>
 <!--712C841E501642B881A998CCAC13E420--></AD_MESSAGE>
 
+<!--76D4A0740BAD4274B8718A0AF2A1C9B4--><AD_MESSAGE>
+<!--76D4A0740BAD4274B8718A0AF2A1C9B4-->  <AD_MESSAGE_ID><![CDATA[76D4A0740BAD4274B8718A0AF2A1C9B4]]></AD_MESSAGE_ID>
+<!--76D4A0740BAD4274B8718A0AF2A1C9B4-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--76D4A0740BAD4274B8718A0AF2A1C9B4-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--76D4A0740BAD4274B8718A0AF2A1C9B4-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--76D4A0740BAD4274B8718A0AF2A1C9B4-->  <VALUE><![CDATA[APRM_ErrorOnUnmatchingRecords]]></VALUE>
+<!--76D4A0740BAD4274B8718A0AF2A1C9B4-->  <MSGTEXT><![CDATA[%0 record(s) failed. Reference No.: ]]></MSGTEXT>
+<!--76D4A0740BAD4274B8718A0AF2A1C9B4-->  <MSGTYPE><![CDATA[W]]></MSGTYPE>
+<!--76D4A0740BAD4274B8718A0AF2A1C9B4-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--76D4A0740BAD4274B8718A0AF2A1C9B4-->  <ISINCLUDEINI18N><![CDATA[N]]></ISINCLUDEINI18N>
+<!--76D4A0740BAD4274B8718A0AF2A1C9B4--></AD_MESSAGE>
+
 <!--7918E1E75DF84F499AD21A51F53F9A9B--><AD_MESSAGE>
 <!--7918E1E75DF84F499AD21A51F53F9A9B-->  <AD_MESSAGE_ID><![CDATA[7918E1E75DF84F499AD21A51F53F9A9B]]></AD_MESSAGE_ID>
 <!--7918E1E75DF84F499AD21A51F53F9A9B-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -1381,6 +1393,18 @@
 <!--DF6BD33E986149C0ADE4D0CC45D7394C-->  <ISINCLUDEINI18N><![CDATA[N]]></ISINCLUDEINI18N>
 <!--DF6BD33E986149C0ADE4D0CC45D7394C--></AD_MESSAGE>
 
+<!--E103F874F07D44269B98F457EFCAF367--><AD_MESSAGE>
+<!--E103F874F07D44269B98F457EFCAF367-->  <AD_MESSAGE_ID><![CDATA[E103F874F07D44269B98F457EFCAF367]]></AD_MESSAGE_ID>
+<!--E103F874F07D44269B98F457EFCAF367-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--E103F874F07D44269B98F457EFCAF367-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--E103F874F07D44269B98F457EFCAF367-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--E103F874F07D44269B98F457EFCAF367-->  <VALUE><![CDATA[APRM_UnmatchedRecords]]></VALUE>
+<!--E103F874F07D44269B98F457EFCAF367-->  <MSGTEXT><![CDATA[%0 record(s) were properly unmatched.]]></MSGTEXT>
+<!--E103F874F07D44269B98F457EFCAF367-->  <MSGTYPE><![CDATA[I]]></MSGTYPE>
+<!--E103F874F07D44269B98F457EFCAF367-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--E103F874F07D44269B98F457EFCAF367-->  <ISINCLUDEINI18N><![CDATA[N]]></ISINCLUDEINI18N>
+<!--E103F874F07D44269B98F457EFCAF367--></AD_MESSAGE>
+
 <!--E217A4F4BDE84DC6A95ACB3F54549FDD--><AD_MESSAGE>
 <!--E217A4F4BDE84DC6A95ACB3F54549FDD-->  <AD_MESSAGE_ID><![CDATA[E217A4F4BDE84DC6A95ACB3F54549FDD]]></AD_MESSAGE_ID>
 <!--E217A4F4BDE84DC6A95ACB3F54549FDD-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -1405,6 +1429,18 @@
 <!--E92C3899BD924A5C991A39B2CDA74D29-->  <ISINCLUDEINI18N><![CDATA[N]]></ISINCLUDEINI18N>
 <!--E92C3899BD924A5C991A39B2CDA74D29--></AD_MESSAGE>
 
+<!--EAA6B599637E4A909131395D843C3C61--><AD_MESSAGE>
+<!--EAA6B599637E4A909131395D843C3C61-->  <AD_MESSAGE_ID><![CDATA[EAA6B599637E4A909131395D843C3C61]]></AD_MESSAGE_ID>
+<!--EAA6B599637E4A909131395D843C3C61-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--EAA6B599637E4A909131395D843C3C61-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--EAA6B599637E4A909131395D843C3C61-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--EAA6B599637E4A909131395D843C3C61-->  <VALUE><![CDATA[APRM_NoFinancialAccountAvailable]]></VALUE>
+<!--EAA6B599637E4A909131395D843C3C61-->  <MSGTEXT><![CDATA[It does not exist any Financial Account available for this Payment Method]]></MSGTEXT>
+<!--EAA6B599637E4A909131395D843C3C61-->  <MSGTYPE><![CDATA[E]]></MSGTYPE>
+<!--EAA6B599637E4A909131395D843C3C61-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--EAA6B599637E4A909131395D843C3C61-->  <ISINCLUDEINI18N><![CDATA[N]]></ISINCLUDEINI18N>
+<!--EAA6B599637E4A909131395D843C3C61--></AD_MESSAGE>
+
 <!--EDEA16A966B94F63A7C1E339FC095B08--><AD_MESSAGE>
 <!--EDEA16A966B94F63A7C1E339FC095B08-->  <AD_MESSAGE_ID><![CDATA[EDEA16A966B94F63A7C1E339FC095B08]]></AD_MESSAGE_ID>
 <!--EDEA16A966B94F63A7C1E339FC095B08-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MODULE.xml	Thu Jan 21 09:06:30 2016 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MODULE.xml	Fri Jan 22 08:42:24 2016 +0000
@@ -6,7 +6,7 @@
 <!--A918E3331C404B889D69AA9BFAFB23AC-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--A918E3331C404B889D69AA9BFAFB23AC-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--A918E3331C404B889D69AA9BFAFB23AC-->  <NAME><![CDATA[Advanced Payables and Receivables Mngmt]]></NAME>
-<!--A918E3331C404B889D69AA9BFAFB23AC-->  <VERSION><![CDATA[3.0.27124]]></VERSION>
+<!--A918E3331C404B889D69AA9BFAFB23AC-->  <VERSION><![CDATA[3.0.28173]]></VERSION>
 <!--A918E3331C404B889D69AA9BFAFB23AC-->  <DESCRIPTION><![CDATA[Managing your finances with an ERP does not have to be difficult. Enjoy a radically improved user experience that combines the power of an enterprise grade financial application with the simplicity and ease of a web 2.0 personal accounting service.]]></DESCRIPTION>
 <!--A918E3331C404B889D69AA9BFAFB23AC-->  <HELP><![CDATA[Advanced Payables and Receivables Management simplifies and automates the business processes around the management of financial accounts, from the receipt and issue of payment, to the reconciliation of those events with bank statements.
 If you would like to help shape this module you are welcome to take part in the forum discussions or register feature requests or issues in the corresponding (Forum and Bug Tracking) sections in the Advanced Payables and Receivable project in the OB Forge.]]></HELP>
@@ -25,7 +25,7 @@
 <!--A918E3331C404B889D69AA9BFAFB23AC-->  <UPDATEINFO><![CDATA[Fixed issue with document sequence numbers reset in case of applying dataset second time.
 Fixed issue 15305.]]></UPDATEINFO>
 <!--A918E3331C404B889D69AA9BFAFB23AC-->  <REFERENCEDATAINFO><![CDATA[Document types and default algorithm for bank statement auto matching]]></REFERENCEDATAINFO>
-<!--A918E3331C404B889D69AA9BFAFB23AC-->  <VERSION_LABEL><![CDATA[PR15Q3.5]]></VERSION_LABEL>
+<!--A918E3331C404B889D69AA9BFAFB23AC-->  <VERSION_LABEL><![CDATA[CI]]></VERSION_LABEL>
 <!--A918E3331C404B889D69AA9BFAFB23AC-->  <ISCOMMERCIAL><![CDATA[N]]></ISCOMMERCIAL>
 <!--A918E3331C404B889D69AA9BFAFB23AC-->  <ISTRIALALLOWED><![CDATA[N]]></ISTRIALALLOWED>
 <!--A918E3331C404B889D69AA9BFAFB23AC--></AD_MODULE>
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Thu Jan 21 09:06:30 2016 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Fri Jan 22 08:42:24 2016 +0000
@@ -7,7 +7,7 @@
 <!--89326AE95DAD449D85DFAB2C5B1C6683-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--89326AE95DAD449D85DFAB2C5B1C6683-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
 <!--89326AE95DAD449D85DFAB2C5B1C6683-->  <AD_DEPENDENT_MODULE_ID><![CDATA[5EB4F15C80684ACA904756BDC12ADBE5]]></AD_DEPENDENT_MODULE_ID>
-<!--89326AE95DAD449D85DFAB2C5B1C6683-->  <STARTVERSION><![CDATA[2.1.27124]]></STARTVERSION>
+<!--89326AE95DAD449D85DFAB2C5B1C6683-->  <STARTVERSION><![CDATA[2.1.28173]]></STARTVERSION>
 <!--89326AE95DAD449D85DFAB2C5B1C6683-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--89326AE95DAD449D85DFAB2C5B1C6683-->  <DEPENDANT_MODULE_NAME><![CDATA[User Interface Selector]]></DEPENDANT_MODULE_NAME>
 <!--89326AE95DAD449D85DFAB2C5B1C6683-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -21,7 +21,7 @@
 <!--B97FC854C6DD41E692161585645A900F-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--B97FC854C6DD41E692161585645A900F-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
 <!--B97FC854C6DD41E692161585645A900F-->  <AD_DEPENDENT_MODULE_ID><![CDATA[0]]></AD_DEPENDENT_MODULE_ID>
-<!--B97FC854C6DD41E692161585645A900F-->  <STARTVERSION><![CDATA[3.0.27124]]></STARTVERSION>
+<!--B97FC854C6DD41E692161585645A900F-->  <STARTVERSION><![CDATA[3.0.28173]]></STARTVERSION>
 <!--B97FC854C6DD41E692161585645A900F-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--B97FC854C6DD41E692161585645A900F-->  <DEPENDANT_MODULE_NAME><![CDATA[core]]></DEPENDANT_MODULE_NAME>
 <!--B97FC854C6DD41E692161585645A900F-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_REF_LIST.xml	Thu Jan 21 09:06:30 2016 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_REF_LIST.xml	Fri Jan 22 08:42:24 2016 +0000
@@ -343,6 +343,30 @@
 <!--7AC4F4FF644247B7BD320BBF67C4F066-->  <SEQNO><![CDATA[10]]></SEQNO>
 <!--7AC4F4FF644247B7BD320BBF67C4F066--></AD_REF_LIST>
 
+<!--94334E10107D4F3C868191FF2C9AEAD0--><AD_REF_LIST>
+<!--94334E10107D4F3C868191FF2C9AEAD0-->  <AD_REF_LIST_ID><![CDATA[94334E10107D4F3C868191FF2C9AEAD0]]></AD_REF_LIST_ID>
+<!--94334E10107D4F3C868191FF2C9AEAD0-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--94334E10107D4F3C868191FF2C9AEAD0-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--94334E10107D4F3C868191FF2C9AEAD0-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--94334E10107D4F3C868191FF2C9AEAD0-->  <VALUE><![CDATA[UN]]></VALUE>
+<!--94334E10107D4F3C868191FF2C9AEAD0-->  <NAME><![CDATA[Unmatch Selected]]></NAME>
+<!--94334E10107D4F3C868191FF2C9AEAD0-->  <AD_REFERENCE_ID><![CDATA[C20E5E22588E40E5B8CC6D80ED3015C5]]></AD_REFERENCE_ID>
+<!--94334E10107D4F3C868191FF2C9AEAD0-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--94334E10107D4F3C868191FF2C9AEAD0-->  <SEQNO><![CDATA[30]]></SEQNO>
+<!--94334E10107D4F3C868191FF2C9AEAD0--></AD_REF_LIST>
+
+<!--9AE9EBD541F34CC7AC8830B9601C52CB--><AD_REF_LIST>
+<!--9AE9EBD541F34CC7AC8830B9601C52CB-->  <AD_REF_LIST_ID><![CDATA[9AE9EBD541F34CC7AC8830B9601C52CB]]></AD_REF_LIST_ID>
+<!--9AE9EBD541F34CC7AC8830B9601C52CB-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--9AE9EBD541F34CC7AC8830B9601C52CB-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--9AE9EBD541F34CC7AC8830B9601C52CB-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--9AE9EBD541F34CC7AC8830B9601C52CB-->  <VALUE><![CDATA[APRM_AutoDistributeAmt]]></VALUE>
+<!--9AE9EBD541F34CC7AC8830B9601C52CB-->  <NAME><![CDATA[Add Payment: Automatically distribute amounts]]></NAME>
+<!--9AE9EBD541F34CC7AC8830B9601C52CB-->  <DESCRIPTION><![CDATA[If set as 'N' then auto distribution is not done]]></DESCRIPTION>
+<!--9AE9EBD541F34CC7AC8830B9601C52CB-->  <AD_REFERENCE_ID><![CDATA[A26BA480E2014707B47257024C3CBFF7]]></AD_REFERENCE_ID>
+<!--9AE9EBD541F34CC7AC8830B9601C52CB-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--9AE9EBD541F34CC7AC8830B9601C52CB--></AD_REF_LIST>
+
 <!--A29540336120479B825D190E5B51C79E--><AD_REF_LIST>
 <!--A29540336120479B825D190E5B51C79E-->  <AD_REF_LIST_ID><![CDATA[A29540336120479B825D190E5B51C79E]]></AD_REF_LIST_ID>
 <!--A29540336120479B825D190E5B51C79E-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -454,7 +478,7 @@
 <!--C69982184F634AC79728338D1F327B76-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--C69982184F634AC79728338D1F327B76-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--C69982184F634AC79728338D1F327B76-->  <VALUE><![CDATA[RE]]></VALUE>
-<!--C69982184F634AC79728338D1F327B76-->  <NAME><![CDATA[Reconcile]]></NAME>
+<!--C69982184F634AC79728338D1F327B76-->  <NAME><![CDATA[Reconcile All]]></NAME>
 <!--C69982184F634AC79728338D1F327B76-->  <AD_REFERENCE_ID><![CDATA[C20E5E22588E40E5B8CC6D80ED3015C5]]></AD_REFERENCE_ID>
 <!--C69982184F634AC79728338D1F327B76-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
 <!--C69982184F634AC79728338D1F327B76-->  <SEQNO><![CDATA[20]]></SEQNO>
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_TAB.xml	Thu Jan 21 09:06:30 2016 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_TAB.xml	Fri Jan 22 08:42:24 2016 +0000
@@ -916,10 +916,11 @@
 <!--ED54A4E24196476596955286D403461E-->  <DISABLE_PARENT_KEY_PROPERTY><![CDATA[N]]></DISABLE_PARENT_KEY_PROPERTY>
 <!--ED54A4E24196476596955286D403461E-->  <ISREADONLYTREE><![CDATA[N]]></ISREADONLYTREE>
 <!--ED54A4E24196476596955286D403461E-->  <ISSHOWTREENODEICONS><![CDATA[Y]]></ISSHOWTREENODEICONS>
+<!--ED54A4E24196476596955286D403461E-->  <EM_OBUIAPP_SELECTION><![CDATA[OB.APRM.MatchStatement.selectionChanged]]></EM_OBUIAPP_SELECTION>
 <!--ED54A4E24196476596955286D403461E-->  <EM_OBUIAPP_CAN_ADD><![CDATA[N]]></EM_OBUIAPP_CAN_ADD>
 <!--ED54A4E24196476596955286D403461E-->  <EM_OBUIAPP_CAN_DELETE><![CDATA[N]]></EM_OBUIAPP_CAN_DELETE>
-<!--ED54A4E24196476596955286D403461E-->  <EM_OBUIAPP_SHOW_SELECT><![CDATA[N]]></EM_OBUIAPP_SHOW_SELECT>
-<!--ED54A4E24196476596955286D403461E-->  <EM_OBUIAPP_SELECTION_TYPE><![CDATA[S]]></EM_OBUIAPP_SELECTION_TYPE>
+<!--ED54A4E24196476596955286D403461E-->  <EM_OBUIAPP_SHOW_SELECT><![CDATA[Y]]></EM_OBUIAPP_SHOW_SELECT>
+<!--ED54A4E24196476596955286D403461E-->  <EM_OBUIAPP_SELECTION_TYPE><![CDATA[M]]></EM_OBUIAPP_SELECTION_TYPE>
 <!--ED54A4E24196476596955286D403461E--></AD_TAB>
 
 <!--F6C2283A21314407BBBB23FF14B85ED4--><AD_TAB>
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_TABLE.xml	Thu Jan 21 09:06:30 2016 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_TABLE.xml	Fri Jan 22 08:42:24 2016 +0000
@@ -208,7 +208,7 @@
 <!--BC21981DCF0846338D631887BEDFE7FA-->  <HQLQUERY><![CDATA[select bsl.transactionDate as banklineDate, case when bp is null then bsl.bpartnername  else bp.name end AS businessPartner, bsl.bpartnername AS Bpartnername, bsl.referenceNo as referenceNo, bsl.cramount - bsl.dramount as amount, bsl.id as match, bsl.matchingtype as affinity, 
 case when fat is null then false else true end AS cleared,
 bsl.matchingtype as matchingtype, bsl.id as id, 
-fat.transactionDate as transactionDate, transactionBP.name as transactionBPName, fat.depositAmount - fat.paymentAmount as transactionAmount, bsl.lineNo as lineNo, fat as fin_finacc_transaction_id, bsl.description as description, fat.description as fatDescription, case when bsl.cramount - bsl.dramount >0 then 'D' else 'P' end as type, bsl.matchedDocument as matchedDocument, transactionGLItem.name as transactionGLItemName, glitem.name as glitemName, bsl.updated as bslUpdated
+fat.transactionDate as trxDate, transactionBP.name as transactionBPName, fat.depositAmount - fat.paymentAmount as transactionAmount, bsl.lineNo as lineNo, fat as fin_finacc_transaction_id, bsl.description as description, fat.description as fatDescription, case when bsl.cramount - bsl.dramount >0 then 'D' else 'P' end as type, bsl.matchedDocument as matchedDocument, transactionGLItem.name as transactionGLItemName, glitem.name as glitemName, bsl.updated as bslUpdated
  @selectClause@
 from FIN_BankStatementLine as bsl
  join bsl.bankStatement as bs
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/OBUISEL_SELECTOR.xml	Thu Jan 21 09:06:30 2016 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/OBUISEL_SELECTOR.xml	Fri Jan 22 08:42:24 2016 +0000
@@ -55,7 +55,7 @@
 <!--5D29D4DFCF4440B8BF89420419A0DBFE-->  <NAME><![CDATA[Financial Account]]></NAME>
 <!--5D29D4DFCF4440B8BF89420419A0DBFE-->  <AD_REFERENCE_ID><![CDATA[7F1A079A842545DF966D7EFD4BC5CFCE]]></AD_REFERENCE_ID>
 <!--5D29D4DFCF4440B8BF89420419A0DBFE-->  <AD_TABLE_ID><![CDATA[B129E53BC0E747879F7BA17F0AECEC32]]></AD_TABLE_ID>
-<!--5D29D4DFCF4440B8BF89420419A0DBFE-->  <WHERECLAUSE><![CDATA[@fin_paymentmethod_id@ is null or exists (select 1 from FinancialMgmtFinAccPaymentMethod fpm join fpm.account as fa where fpm.paymentMethod.id = @fin_paymentmethod_id@ and fa = e and (case when @issotrx@ = 'true' then fpm.payinAllow else fpm.payoutAllow end) = true and (@c_currency_id@ = fa.currency.id or (case when @issotrx@ = 'true' then fpm.payinIsMulticurrency else fpm.payoutIsMulticurrency end) = true))]]></WHERECLAUSE>
+<!--5D29D4DFCF4440B8BF89420419A0DBFE-->  <WHERECLAUSE><![CDATA[@fin_paymentmethod_id@ is null or exists (select 1 from FinancialMgmtFinAccPaymentMethod fpm join fpm.account as fa where fpm.paymentMethod.id = @fin_paymentmethod_id@ and fa = e and (case when @issotrx@ = 'true' then fpm.payinAllow else fpm.payoutAllow end) = true and (coalesce(@inpcCurrencyId@, @c_currency_id@) = fa.currency.id or (case when @issotrx@ = 'true' then fpm.payinIsMulticurrency else fpm.payoutIsMulticurrency end) = true) and fpm.active = true)]]></WHERECLAUSE>
 <!--5D29D4DFCF4440B8BF89420419A0DBFE-->  <OBCLKER_TEMPLATE_ID><![CDATA[9314DE8599AD44E7BFC4CC50699042AB]]></OBCLKER_TEMPLATE_ID>
 <!--5D29D4DFCF4440B8BF89420419A0DBFE-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--5D29D4DFCF4440B8BF89420419A0DBFE-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[startsWith]]></SUGGESTIONTEXTMATCHSTYLE>
--- a/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/org/openbravo/advpaymentmngt/modulescript/AlertsForWrongInvoices.java	Thu Jan 21 09:06:30 2016 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,97 +0,0 @@
-/* 
- *************************************************************************
- * 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) 2011-2015 Openbravo SLU
- * All Rights Reserved.
- * Contributor(s):  ______________________________________.
- *************************************************************************
- */
-package org.openbravo.advpaymentmngt.modulescript;
-
-import javax.servlet.ServletException;
-
-import org.openbravo.database.ConnectionProvider;
-import org.openbravo.modulescript.ModuleScript;
-
-public class AlertsForWrongInvoices extends ModuleScript {
-  
-  final static private String ALERT_RULE_SQL = "select distinct ad_column_identifier('c_invoice', fin_payment_schedule.c_invoice_id, 'en_US') as record_id, fin_payment_schedule.c_invoice_id  as referencekey_id, 0 as ad_role_id, null as ad_user_id, 'This invoice needs to be reactivated and processed again due to wrong payment info.' as description, 'Y' as isActive, fin_payment_schedule.ad_org_id, fin_payment_schedule.ad_client_id, now() as created, 0 as createdBy, now() as updated, 0 as updatedBy from fin_payment_schedule, fin_payment_scheduledetail where fin_payment_schedule.fin_payment_schedule_id = fin_payment_scheduledetail.fin_payment_schedule_invoice and fin_payment_scheduledetail.iscanceled = 'N' group by fin_payment_schedule.ad_org_id, fin_payment_schedule.ad_client_id, fin_payment_schedule.fin_payment_schedule_id, fin_payment_schedule.c_invoice_id, fin_payment_schedule.amount having fin_payment_schedule.amount <> sum(fin_payment_scheduledetail.amount + coalesce(fin_payment_scheduledetail.writeoffamt,0)) order by 1";
-
-  @Override
-  // Inserting Alerts for invoices which needs to be recalculated/processed
-  public void execute() {
-    try {      
-      ConnectionProvider cp = getConnectionProvider();
-      boolean isAlertsForWrongInvoicesExecuted = AlertsForWrongInvoicesData.isAlertsForWrongInvoicesExecuted(cp);
-      if (!isAlertsForWrongInvoicesExecuted) {
-        AlertsForWrongInvoicesData[] data = AlertsForWrongInvoicesData.select(cp);
-        for (AlertsForWrongInvoicesData wrongInvoice : data) {
-          createAlert(cp, wrongInvoice);
-        }
-        
-        // Fix sql for all the alert rules created not taking in account voided payments
-        AlertsForWrongInvoicesData[] oldAlertRules = AlertsForWrongInvoicesData.selectOldAlertRules(cp);
-        for (AlertsForWrongInvoicesData alertRule : oldAlertRules) {
-          // Check if exist any alert created using the wrong sql query. In that case fix the alert
-          AlertsForWrongInvoicesData[] oldAlerts = AlertsForWrongInvoicesData.selectVoidAlerts(cp, alertRule.adAlertruleId);
-          for (AlertsForWrongInvoicesData alert : oldAlerts) {
-            AlertsForWrongInvoicesData.updateAlertStatus(cp, "SOLVED", "Y", alert.adAlertId);
-          }
-          AlertsForWrongInvoicesData.updateAlertRuleSql(cp, ALERT_RULE_SQL, alertRule.adAlertruleId);
-        }
-        AlertsForWrongInvoicesData.createPreference(cp); 
-      }
-      
-    } catch (Exception e) {
-      handleError(e);
-    }
-  }
-  
-  private void createAlert(ConnectionProvider cp, AlertsForWrongInvoicesData wrongInvoice)
-      throws ServletException {
-    final String SALES_INVOICE_WINDOW = "167";
-    final String PURCHASE_INVOICE_WINDOW = "183";
-    final String SALES_INVOICE_TAB = "263";
-    final String PURCHASE_INVOICE_TAB = "290";
-    String ALERT_RULE = "Wrong purchase invoice. Wrong amount in payment plan detail";
-    String WindowInvoiceId = PURCHASE_INVOICE_TAB;
-    String strTabId = PURCHASE_INVOICE_TAB;
-    if ("Y".equals(wrongInvoice.issotrx)) {
-      strTabId = SALES_INVOICE_TAB;
-      WindowInvoiceId = SALES_INVOICE_WINDOW;
-      ALERT_RULE = "Wrong sales invoice. Wrong amount in payment plan detail";
-    }
-    String strName = "Invoice: '" + wrongInvoice.invoice
-        + "' needs to be reactivated and processed again due to wrong payment info.";
-    String oldAlertRuleId = AlertsForWrongInvoicesData.getAlertRuleId(cp, ALERT_RULE,
-        wrongInvoice.adClientId);
-    if (!AlertsForWrongInvoicesData.existsAlert(cp, oldAlertRuleId, wrongInvoice.cInvoiceId)) {
-      if (!AlertsForWrongInvoicesData.existsAlertRule(cp, ALERT_RULE, wrongInvoice.adClientId)) {
-        AlertsForWrongInvoicesData.insertAlertRule(cp, wrongInvoice.adClientId, ALERT_RULE,
-            strTabId, ALERT_RULE_SQL);
-        AlertsForWrongInvoicesData[] roles = AlertsForWrongInvoicesData.getRoleId(cp,
-            WindowInvoiceId, wrongInvoice.adClientId);
-        for (AlertsForWrongInvoicesData role : roles) {
-          AlertsForWrongInvoicesData.insertAlertRecipient(cp, wrongInvoice.adClientId,
-              wrongInvoice.adOrgId,
-              AlertsForWrongInvoicesData.getAlertRuleId(cp, ALERT_RULE, wrongInvoice.adClientId),
-              role.adRoleId);
-        }
-      }
-      String alertRuleId = AlertsForWrongInvoicesData.getAlertRuleId(cp, ALERT_RULE,
-          wrongInvoice.adClientId);
-      AlertsForWrongInvoicesData.insertAlert(cp, wrongInvoice.adClientId, wrongInvoice.adOrgId,
-          strName, alertRuleId, wrongInvoice.invoice, wrongInvoice.cInvoiceId);
-    }
-  }
-}
--- a/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/org/openbravo/advpaymentmngt/modulescript/AlertsForWrongInvoices_data.xsql	Thu Jan 21 09:06:30 2016 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,210 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
- ************************************************************************************
- * Copyright (C) 2011 - 2015 Openbravo S.L.U.
- * Licensed under the Openbravo Commercial License version 1.0
- * You may obtain a copy of the License at http://www.openbravo.com/legal/obcl.html
- * or in the legal folder of this module distribution.
- ************************************************************************************
--->
-<SqlClass name="AlertsForWrongInvoicesData" package="org.openbravo.advpaymentmngt.modulescript">
-   <SqlClassComment></SqlClassComment>
-   <SqlMethod name="select" type="preparedStatement" return="multiple">
-    <SqlMethodComment></SqlMethodComment>
-    <Sql>
-      <![CDATA[
-      select distinct fin_payment_schedule.ad_client_id, ad_column_identifier('c_invoice', fin_payment_schedule.c_invoice_id, 'en_US') as invoice, 
-      fin_payment_schedule.c_invoice_id, fin_payment_schedule.ad_org_id, c_invoice.issotrx, '' as ad_role_id, '' as ad_alertrule_id, '' as ad_alert_id
-      from c_invoice, fin_payment_schedule, fin_payment_scheduledetail
-      where c_invoice.c_invoice_id = fin_payment_schedule.c_invoice_id 
-      and fin_payment_schedule.fin_payment_schedule_id = fin_payment_scheduledetail.fin_payment_schedule_invoice
-      and fin_payment_scheduledetail.iscanceled = 'N'
-      group by fin_payment_schedule.ad_client_id, fin_payment_schedule.ad_org_id, c_invoice.issotrx, fin_payment_schedule.fin_payment_schedule_id, fin_payment_schedule.c_invoice_id, fin_payment_schedule.amount
-      having fin_payment_schedule.amount <> sum(fin_payment_scheduledetail.amount + coalesce(fin_payment_scheduledetail.writeoffamt,0))
-      order by 1, 2
-      ]]>
-    </Sql>
-  </SqlMethod>
-  <SqlMethod name="selectVoidAlerts" type="preparedStatement" return="multiple">
-    <SqlMethodComment>Identify alerts created not taking in account the void payment functionality.</SqlMethodComment>
-    <Sql>
-      <![CDATA[
-      select distinct fin_payment_schedule.c_invoice_id, ad_alert.ad_alert_id
-      from fin_payment_schedule, fin_payment_scheduledetail, ad_alert
-      where fin_payment_schedule.fin_payment_schedule_id = fin_payment_scheduledetail.fin_payment_schedule_invoice
-            and ad_alert.referencekey_id = fin_payment_schedule.c_invoice_id
-      and exists (select 1
-                  from fin_payment_scheduledetail psd
-                  where psd.fin_payment_scheduledetail_id = fin_payment_scheduledetail.fin_payment_scheduledetail_id
-                        and psd.iscanceled = 'Y')
-      and ad_alert.ad_alertrule_id = ?
-      group by fin_payment_schedule.fin_payment_schedule_id, fin_payment_schedule.c_invoice_id, fin_payment_schedule.amount, ad_alert.ad_alert_id
-      having fin_payment_schedule.amount <> sum(fin_payment_scheduledetail.amount + coalesce(fin_payment_scheduledetail.writeoffamt,0))
-      ]]>
-    </Sql>
-    <Parameter name="alertRuleId"/>
-  </SqlMethod>  
-  <SqlMethod name="existsAlertRule" type="preparedStatement" return="boolean">
-    <SqlMethodComment></SqlMethodComment>
-    <Sql><![CDATA[
-       SELECT COUNT(*) AS EXISTING
-       FROM AD_ALERTRULE
-       WHERE NAME = ?
-         AND AD_CLIENT_ID = ?
-      ]]>
-    </Sql>
-    <Parameter name="alertRule"/>
-    <Parameter name="client"/>
-  </SqlMethod>
-  <SqlMethod name="existsAlert" type="preparedStatement" return="boolean">
-    <SqlMethodComment></SqlMethodComment>
-    <Sql><![CDATA[
-       SELECT COUNT(*) AS EXISTING
-       FROM AD_ALERT
-       WHERE AD_ALERTRULE_ID = ?
-       AND REFERENCEKEY_ID = ?
-       AND ISFIXED = 'N'
-      ]]>
-    </Sql>
-    <Parameter name="alertRule"/>
-    <Parameter name="invoice"/>
-  </SqlMethod>
-  <SqlMethod name="getAlertRuleId" type="preparedStatement" return="string">
-    <SqlMethodComment></SqlMethodComment>
-    <Sql><![CDATA[
-       SELECT MAX(ad_alertrule_id) AS name
-       FROM AD_ALERTRULE
-       WHERE NAME LIKE ?
-         AND ISACTIVE = 'Y'
-         AND AD_CLIENT_ID = ?
-      ]]></Sql>
-    <Parameter name="name"/>
-    <Parameter name="client"/>
-  </SqlMethod>
-  <SqlMethod name="selectOldAlertRules" type="preparedStatement" return="multiple">
-    <SqlMethodComment></SqlMethodComment>
-    <Sql><![CDATA[
-       SELECT ad_alertrule_id
-       FROM AD_ALERTRULE
-       WHERE (name = 'Wrong purchase invoice. Wrong amount in payment plan detail' OR
-              name = 'Wrong sales invoice. Wrong amount in payment plan detail')
-         AND ISACTIVE = 'Y'
-         AND lower(SQL) not like '%iscanceled%'
-      ]]></Sql>
-  </SqlMethod>
-  <SqlMethod name="getRoleId" type="preparedStatement" return="multiple">
-    <SqlMethodComment></SqlMethodComment>
-    <Sql><![CDATA[
-       SELECT distinct ad_role_id
-       FROM ad_window_access
-       WHERE ad_window_id = ?
-       AND AD_CLIENT_ID = ?
-         AND ISACTIVE = 'Y'
-      ]]></Sql>
-    <Parameter name="window"/>
-    <Parameter name="clientId"/>
-  </SqlMethod>
-  <SqlMethod name="insertAlertRule" type="preparedStatement" return="rowcount">
-    <SqlMethodComment></SqlMethodComment>
-    <Sql><![CDATA[
-      INSERT INTO AD_ALERTRULE (
-        AD_ALERTRULE_ID, AD_CLIENT_ID, AD_ORG_ID,ISACTIVE,
-        CREATED, CREATEDBY,  UPDATED, UPDATEDBY,
-        NAME, AD_TAB_ID, FILTERCLAUSE, TYPE,
-        SQL
-      ) VALUES (
-        get_uuid(), ?, '0', 'Y',
-        now(), '100', now(), '100',
-        ?, ?, '', 'D',
-        ?
-      )
-    ]]></Sql>
-    <Parameter name="clientId"/>
-    <Parameter name="name"/>
-    <Parameter name="tabId"/>
-    <Parameter name="sql"/>
-  </SqlMethod>
-  <SqlMethod name="insertAlert" type="preparedStatement" return="rowcount">
-    <SqlMethodComment></SqlMethodComment>
-    <Sql><![CDATA[
-      INSERT INTO AD_Alert (
-        AD_Alert_ID, AD_Client_ID, AD_Org_ID, IsActive,
-        Created, CreatedBy, Updated, UpdatedBy,
-        Description, AD_AlertRule_ID, Record_Id, Referencekey_ID
-      ) VALUES (
-        get_uuid(), ?, ?, 'Y',
-        NOW(), '0', NOW(), '0',
-        ?, ?, ?, ?)
-      ]]>
-    </Sql>
-    <Parameter name="client"/>
-    <Parameter name="org"/>
-    <Parameter name="description" />
-    <Parameter name="adAlertRuleId" />
-    <Parameter name="recordId" />
-    <Parameter name="referencekey_id" />
-  </SqlMethod>
-  <SqlMethod name="insertAlertRecipient" type="preparedStatement" return="rowcount">
-    <SqlMethodComment></SqlMethodComment>
-    <Sql><![CDATA[
-    INSERT INTO ad_alertrecipient(
-            ad_user_id, ad_client_id, ad_org_id, isactive, created, createdby, 
-            updated, updatedby, ad_alertrecipient_id, ad_alertrule_id, ad_role_id, 
-            sendemail)
-    VALUES (null, ?, ?, 'Y', now(), '100', 
-            now(), '100', get_uuid(), ?, ?, 
-            'N')
-      ]]>
-    </Sql>
-    <Parameter name="client"/>
-    <Parameter name="org"/>
-    <Parameter name="adAlertRuleId" />
-    <Parameter name="role" />
-  </SqlMethod>
-  <SqlMethod name="updateAlertRuleSql" type="preparedStatement" return="rowcount">
-    <SqlMethodComment></SqlMethodComment>
-    <Sql><![CDATA[
-      UPDATE ad_alertrule SET SQL = ? WHERE ad_alertrule_id = ?
-      ]]>
-    </Sql>
-    <Parameter name="sql"/>
-    <Parameter name="adAlertRuleId"/>
-  </SqlMethod>
-  <SqlMethod name="updateAlertStatus" type="preparedStatement" return="rowcount">
-    <SqlMethodComment></SqlMethodComment>
-    <Sql><![CDATA[
-      UPDATE ad_alert SET status = ?, isfixed = ? WHERE ad_alert_id = ?
-      ]]>
-    </Sql>
-    <Parameter name="status"/>
-    <Parameter name="isfixed"/>
-    <Parameter name="alertId"/>
-  </SqlMethod>
-  <SqlMethod name="isAlertsForWrongInvoicesExecuted" type="preparedStatement" return="boolean">
-    <SqlMethodComment></SqlMethodComment>
-    <Sql>
-      <![CDATA[
-        SELECT count(*) as exist
-        FROM DUAL
-        WHERE EXISTS (SELECT 1 FROM ad_preference
-                      WHERE attribute = 'AlertsForWrongInvoices')
-      ]]>
-    </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(),
-          'AlertsForWrongInvoices'
-        )
-      ]]>
-    </Sql>
-  </SqlMethod>
-</SqlClass>
--- a/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/org/openbravo/advpaymentmngt/modulescript/AlertsForWrongOrders.java	Thu Jan 21 09:06:30 2016 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,84 +0,0 @@
-/* 
- *************************************************************************
- * 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):  ______________________________________.
- *************************************************************************
- */
-package org.openbravo.advpaymentmngt.modulescript;
-
-import javax.servlet.ServletException;
-
-import org.openbravo.database.ConnectionProvider;
-import org.openbravo.modulescript.ModuleScript;
-
-public class AlertsForWrongOrders extends ModuleScript {
-  
-  final static private String ALERT_RULE_SQL = "select distinct ad_column_identifier('C_Order', fin_payment_schedule.c_order_id, 'en_US') as record_id, fin_payment_schedule.c_order_id  as referencekey_id, 0 as ad_role_id, null as ad_user_id, 'This order needs to be checked due to wrong payment info.' as description, 'Y' as isActive, fin_payment_schedule.ad_org_id, fin_payment_schedule.ad_client_id, now() as created, 0 as createdBy, now() as updated, 0 as updatedBy from fin_payment_schedule, fin_payment_scheduledetail where fin_payment_schedule.fin_payment_schedule_id = fin_payment_scheduledetail.fin_payment_schedule_order and fin_payment_scheduledetail.iscanceled = 'N' and fin_payment_scheduledetail.fin_payment_detail_id IS NOT NULL group by fin_payment_schedule.ad_org_id, fin_payment_schedule.ad_client_id, fin_payment_schedule.fin_payment_schedule_id, fin_payment_schedule.c_order_id, fin_payment_schedule.paidamt having fin_payment_schedule.paidamt <> sum(fin_payment_scheduledetail.amount + coalesce(fin_payment_scheduledetail.writeoffamt,0)) order by 1";
-  
-  @Override
-  // Inserting Alerts for orders which needs to be recalculated/processed
-  public void execute() {
-    try {
-      ConnectionProvider cp = getConnectionProvider();
-      AlertsForWrongOrdersData[] data = AlertsForWrongOrdersData.select(cp);
-      for (AlertsForWrongOrdersData wrongOrder : data) {
-        createAlert(cp, wrongOrder);
-      }
-     } catch (Exception e) {
-      handleError(e);
-    }
-  }
-
-  private void createAlert(ConnectionProvider cp, AlertsForWrongOrdersData wrongOrder)
-	      throws ServletException {
-	  	final String SALES_ORDER_WINDOW = "143";
-	    final String PURCHASE_ORDER_WINDOW = "181";
-	    final String SALES_ORDER_TAB = "186";
-	    final String PURCHASE_ORDER_TAB = "294";
-	    String WindowOrderId = PURCHASE_ORDER_WINDOW;
-	    String strTabId = PURCHASE_ORDER_TAB;
-	    String ALERT_RULE = "Wrong Purchase Order Payment Plan";
-	    if ("Y".equals(wrongOrder.issotrx)) {
-	      strTabId = SALES_ORDER_TAB;
-	      WindowOrderId = SALES_ORDER_WINDOW;	    
-	      ALERT_RULE = "Wrong Sales Order Payment Plan";
-	    }
-	    String strName = "Order: '" + wrongOrder.orderinfo
-	            + "' needs to be checked due to wrong payment info.";
-	    String oldAlertRuleId = AlertsForWrongOrdersData.getAlertRuleId(cp, ALERT_RULE,
-	            wrongOrder.adClientId);
-	    if (!AlertsForWrongOrdersData.existsAlert(cp, oldAlertRuleId, wrongOrder.cOrderId)) {
-	    if (!AlertsForWrongOrdersData.existsAlertRule(cp, ALERT_RULE, wrongOrder.adClientId)) {
-	    	AlertsForWrongOrdersData.insertAlertRule(cp, wrongOrder.adClientId, ALERT_RULE, strTabId, "");
-	        AlertsForWrongOrdersData[] roles = AlertsForWrongOrdersData.getRoleId(cp,
-	            WindowOrderId, wrongOrder.adClientId);
-	        for (AlertsForWrongOrdersData role : roles) {
-	          AlertsForWrongOrdersData.insertAlertRecipient(cp, wrongOrder.adClientId,
-	              wrongOrder.adOrgId,
-	              AlertsForWrongOrdersData.getAlertRuleId(cp, ALERT_RULE, wrongOrder.adClientId),
-	              role.adRoleId);
-	        }
-	      } else {
-	        AlertsForWrongOrdersData.updateAlertRule(cp, ALERT_RULE, wrongOrder.adClientId);
-	      }
-	    	String alertRuleId = AlertsForWrongOrdersData.getAlertRuleId(cp, ALERT_RULE,
-	            wrongOrder.adClientId);
-	      AlertsForWrongOrdersData.insertAlert(cp, wrongOrder.adClientId, wrongOrder.adOrgId,
-	          strName, alertRuleId, wrongOrder.orderinfo, wrongOrder.cOrderId);
-	    } else {
-              AlertsForWrongOrdersData.updateAlertRule(cp, ALERT_RULE, wrongOrder.adClientId);
-            }
-  	}
-}
--- a/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/org/openbravo/advpaymentmngt/modulescript/AlertsForWrongOrders_data.xsql	Thu Jan 21 09:06:30 2016 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,148 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
- ************************************************************************************
- * Copyright (C) 2014-2015 Openbravo S.L.U.
- * Licensed under the Openbravo Commercial License version 1.0
- * You may obtain a copy of the License at http://www.openbravo.com/legal/obcl.html
- * or in the legal folder of this module distribution.
- ************************************************************************************
--->
-<SqlClass name="AlertsForWrongOrdersData" package="org.openbravo.advpaymentmngt.modulescript">
-   <SqlClassComment></SqlClassComment>
-   <SqlMethod name="select" type="preparedStatement" return="multiple">
-    <SqlMethodComment></SqlMethodComment>
-    <Sql>
-      <![CDATA[
-      select distinct fin_payment_schedule.ad_client_id, ad_column_identifier('C_Order', fin_payment_schedule.c_order_id, 'en_US') as orderinfo, 
-      fin_payment_schedule.c_order_id, fin_payment_schedule.ad_org_id,  c_order.issotrx, '' as ad_role_id, '' as ad_alertrule_id, '' as ad_alert_id
-      from c_order, fin_payment_schedule, fin_payment_scheduledetail 
-      where c_order.c_order_id = fin_payment_schedule.c_order_id
-      and fin_payment_schedule.fin_payment_schedule_id = fin_payment_scheduledetail.fin_payment_schedule_order 
-      and fin_payment_scheduledetail.isinvoicepaid = 'Y'
-      and fin_payment_scheduledetail.fin_payment_detail_id IS NOT NULL 
-      group by fin_payment_schedule.ad_org_id, fin_payment_schedule.ad_client_id, c_order.issotrx, fin_payment_schedule.fin_payment_schedule_id, 
-      fin_payment_schedule.c_order_id, fin_payment_schedule.paidamt 
-      having fin_payment_schedule.paidamt <> sum(fin_payment_scheduledetail.amount + coalesce(fin_payment_scheduledetail.writeoffamt,0)) 
-      order by 1, 2
-      ]]>
-    </Sql>
-  </SqlMethod>
-  <SqlMethod name="existsAlertRule" type="preparedStatement" return="boolean">
-    <SqlMethodComment></SqlMethodComment>
-    <Sql><![CDATA[
-       SELECT COUNT(*) AS EXISTING
-       FROM AD_ALERTRULE
-       WHERE NAME = ?
-         AND ISACTIVE = 'Y'
-         AND AD_CLIENT_ID = ?
-      ]]>
-    </Sql>
-    <Parameter name="alertRule"/>
-    <Parameter name="client"/>
-  </SqlMethod>
-  <SqlMethod name="updateAlertRule" type="preparedStatement" return="rowcount">
-    <SqlMethodComment></SqlMethodComment>
-    <Sql>
-      <![CDATA[
-        UPDATE AD_AlertRule
-        SET SQL='', TYPE='E' WHERE NAME = ? AND AD_Client_ID = ?
-      ]]>
-    </Sql>
-    <Parameter name="name"/>
-    <Parameter name="clientId"/>
-  </SqlMethod>
-  <SqlMethod name="existsAlert" type="preparedStatement" return="boolean">
-    <SqlMethodComment></SqlMethodComment>
-    <Sql><![CDATA[
-       SELECT COUNT(*) AS EXISTING
-       FROM AD_ALERT
-       WHERE AD_ALERTRULE_ID = ?
-       AND REFERENCEKEY_ID = ?
-       AND ISFIXED = 'N'
-      ]]>
-    </Sql>
-    <Parameter name="alertRule"/>
-    <Parameter name="order"/>
-  </SqlMethod>
-  <SqlMethod name="getAlertRuleId" type="preparedStatement" return="string">
-    <SqlMethodComment></SqlMethodComment>
-    <Sql><![CDATA[
-       SELECT MAX(ad_alertrule_id) AS name
-       FROM AD_ALERTRULE
-       WHERE NAME LIKE ?
-         AND ISACTIVE = 'Y'
-         AND AD_CLIENT_ID = ?
-      ]]></Sql>
-    <Parameter name="name"/>
-    <Parameter name="client"/>
-  </SqlMethod>  
-  <SqlMethod name="getRoleId" type="preparedStatement" return="multiple">
-    <SqlMethodComment></SqlMethodComment>
-    <Sql><![CDATA[
-       SELECT distinct ad_role_id
-       FROM ad_window_access
-       WHERE ad_window_id = ?
-       AND AD_CLIENT_ID = ?
-         AND ISACTIVE = 'Y'
-      ]]></Sql>
-    <Parameter name="window"/>
-    <Parameter name="clientId"/>
-  </SqlMethod>
-  <SqlMethod name="insertAlertRule" type="preparedStatement" return="rowcount">
-    <SqlMethodComment></SqlMethodComment>
-    <Sql><![CDATA[
-      INSERT INTO AD_ALERTRULE (
-        AD_ALERTRULE_ID, AD_CLIENT_ID, AD_ORG_ID,ISACTIVE,
-        CREATED, CREATEDBY,  UPDATED, UPDATEDBY,
-        NAME, AD_TAB_ID, FILTERCLAUSE, TYPE,
-        SQL
-      ) VALUES (
-        get_uuid(), ?, '0', 'Y',
-        now(), '100', now(), '100',
-        ?, ?, '', 'E',
-        ?
-      )
-    ]]></Sql>
-    <Parameter name="clientId"/>
-    <Parameter name="name"/>
-    <Parameter name="tabId"/>
-    <Parameter name="sql"/>
-  </SqlMethod>
-  <SqlMethod name="insertAlert" type="preparedStatement" return="rowcount">
-    <SqlMethodComment></SqlMethodComment>
-    <Sql><![CDATA[
-      INSERT INTO AD_Alert (
-        AD_Alert_ID, AD_Client_ID, AD_Org_ID, IsActive,
-        Created, CreatedBy, Updated, UpdatedBy,
-        Description, AD_AlertRule_ID, Record_Id, Referencekey_ID
-      ) VALUES (
-        get_uuid(), ?, ?, 'Y',
-        NOW(), '0', NOW(), '0',
-        ?, ?, ?, ?)
-      ]]>
-    </Sql>
-    <Parameter name="client"/>
-    <Parameter name="org"/>
-    <Parameter name="description" />
-    <Parameter name="adAlertRuleId" />
-    <Parameter name="recordId" />
-    <Parameter name="referencekey_id" />
-  </SqlMethod>
-  <SqlMethod name="insertAlertRecipient" type="preparedStatement" return="rowcount">
-    <SqlMethodComment></SqlMethodComment>
-    <Sql><![CDATA[
-    INSERT INTO ad_alertrecipient(
-            ad_user_id, ad_client_id, ad_org_id, isactive, created, createdby, 
-            updated, updatedby, ad_alertrecipient_id, ad_alertrule_id, ad_role_id, 
-            sendemail)
-    VALUES (null, ?, ?, 'Y', now(), '100', 
-            now(), '100', get_uuid(), ?, ?, 
-            'N')
-      ]]>
-    </Sql>
-    <Parameter name="client"/>
-    <Parameter name="org"/>
-    <Parameter name="adAlertRuleId" />
-    <Parameter name="role" />
-  </SqlMethod>  
-</SqlClass>
--- a/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/org/openbravo/advpaymentmngt/modulescript/CreateAccountingConfiguration.java	Thu Jan 21 09:06:30 2016 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/org/openbravo/advpaymentmngt/modulescript/CreateAccountingConfiguration.java	Fri Jan 22 08:42:24 2016 +0000
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2010-2011 Openbravo SLU
+ * All portions are Copyright (C) 2010-2015 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  *************************************************************************
@@ -27,6 +27,8 @@
 
 import org.openbravo.database.ConnectionProvider;
 import org.openbravo.modulescript.ModuleScript;
+import org.openbravo.modulescript.ModuleScriptExecutionLimits;
+import org.openbravo.modulescript.OpenbravoVersion;
 
 public class CreateAccountingConfiguration extends ModuleScript {
   private static final Logger log4j = Logger.getLogger(CreateAccountingConfiguration.class);
@@ -49,6 +51,12 @@
       handleError(e);
     }
   }
+  
+  @Override
+  protected ModuleScriptExecutionLimits getModuleScriptExecutionLimits() {
+    return new ModuleScriptExecutionLimits("A918E3331C404B889D69AA9BFAFB23AC", null, 
+        new OpenbravoVersion(3,0,19579));
+  }
 
   void createAcctSchemaTables(ConnectionProvider cp) throws Exception {
     CreateAccountingConfigurationData[] data = CreateAccountingConfigurationData
--- a/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/org/openbravo/advpaymentmngt/modulescript/CreateDocumentNoSequence.java	Thu Jan 21 09:06:30 2016 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/org/openbravo/advpaymentmngt/modulescript/CreateDocumentNoSequence.java	Fri Jan 22 08:42:24 2016 +0000
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2010-2011 Openbravo SLU
+ * All portions are Copyright (C) 2010-2015 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  *************************************************************************
@@ -27,6 +27,8 @@
 
 import org.openbravo.database.ConnectionProvider;
 import org.openbravo.modulescript.ModuleScript;
+import org.openbravo.modulescript.ModuleScriptExecutionLimits;
+import org.openbravo.modulescript.OpenbravoVersion;
 
 public class CreateDocumentNoSequence extends ModuleScript {
 
@@ -44,4 +46,10 @@
       handleError(e);
     }
   }
+  
+  @Override
+  protected ModuleScriptExecutionLimits getModuleScriptExecutionLimits() {
+    return new ModuleScriptExecutionLimits("A918E3331C404B889D69AA9BFAFB23AC", null, 
+        new OpenbravoVersion(3,0,9091));
+  }
 }
--- a/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/org/openbravo/advpaymentmngt/modulescript/DeleteWrongTransactions.java	Thu Jan 21 09:06:30 2016 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/org/openbravo/advpaymentmngt/modulescript/DeleteWrongTransactions.java	Fri Jan 22 08:42:24 2016 +0000
@@ -11,7 +11,7 @@
  * 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 portions are Copyright (C) 2014-2015 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -23,18 +23,20 @@
 import org.openbravo.utils.FormatUtilities;
 import org.openbravo.database.ConnectionProvider;
 import org.openbravo.modulescript.ModuleScript;
+import org.openbravo.modulescript.ModuleScriptExecutionLimits;
+import org.openbravo.modulescript.OpenbravoVersion;
 
 public class DeleteWrongTransactions extends ModuleScript {
 
   @Override
   public void execute() {
-  try {
-    ConnectionProvider cp = getConnectionProvider();
-    Connection conn = cp.getTransactionConnection();
+    try {
+      ConnectionProvider cp = getConnectionProvider();
+      Connection conn = cp.getTransactionConnection();
       try {
-        boolean isDeleteWrongTransactionsExecuted= DeleteWrongTransactionsData.isDeleteWrongTransactionsExecuted(cp);
-        if (!isDeleteWrongTransactionsExecuted){
-          for (DeleteWrongTransactionsData paymentTransaction : DeleteWrongTransactionsData.selectPaymentTransactions(cp)) {    
+        boolean isDeleteWrongTransactionsExecuted = DeleteWrongTransactionsData.isDeleteWrongTransactionsExecuted(cp);
+        if (!isDeleteWrongTransactionsExecuted) {
+          for (DeleteWrongTransactionsData paymentTransaction : DeleteWrongTransactionsData.selectPaymentTransactions(cp)) {
             DeleteWrongTransactionsData.updatePaymentStatus(conn, cp, paymentTransaction.finPaymentId);          
           }
           DeleteWrongTransactionsData.updateWrongTransactions(conn, cp);
@@ -42,14 +44,19 @@
           DeleteWrongTransactionsData.createPreference(conn, cp); 
         } 
         cp.releaseCommitConnection(conn);
- 
       } catch (Exception e) {
-      cp.releaseRollbackConnection(conn);
+        cp.releaseRollbackConnection(conn);
+        handleError(e);
+      }
+    } catch (Exception e) {
       handleError(e);
-      }
- } catch (Exception e) {
-   handleError(e);
- }
-}
+    }
+  }
+  
+  @Override
+  protected ModuleScriptExecutionLimits getModuleScriptExecutionLimits() {
+    return new ModuleScriptExecutionLimits("A918E3331C404B889D69AA9BFAFB23AC", null, 
+        new OpenbravoVersion(3,0,24735));
+  }
 }
 
--- a/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/org/openbravo/advpaymentmngt/modulescript/InitializeAPRMReadyPreference.java	Thu Jan 21 09:06:30 2016 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/org/openbravo/advpaymentmngt/modulescript/InitializeAPRMReadyPreference.java	Fri Jan 22 08:42:24 2016 +0000
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2011 Openbravo SLU
+ * All portions are Copyright (C) 2011-2015 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  *************************************************************************
@@ -21,6 +21,8 @@
 import org.openbravo.database.ConnectionProvider;
 import org.openbravo.modulescript.ModuleScript;
 
+// FIXME: https://issues.openbravo.com/view.php?id=30706
+// APRM process should create preference properly and modulescript should be removed
 public class InitializeAPRMReadyPreference extends ModuleScript {
 
   /**
--- a/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/org/openbravo/advpaymentmngt/modulescript/Issue28591UpdatePSD.java	Thu Jan 21 09:06:30 2016 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/org/openbravo/advpaymentmngt/modulescript/Issue28591UpdatePSD.java	Fri Jan 22 08:42:24 2016 +0000
@@ -20,6 +20,9 @@
 
 import org.openbravo.database.ConnectionProvider;
 import org.openbravo.modulescript.ModuleScript;
+import org.openbravo.modulescript.ModuleScriptExecutionLimits;
+import org.openbravo.modulescript.OpenbravoVersion;
+
 import java.math.BigDecimal;
 
 public class Issue28591UpdatePSD extends ModuleScript {
@@ -47,4 +50,10 @@
       handleError(e);
     }
  }
+  
+  @Override
+  protected ModuleScriptExecutionLimits getModuleScriptExecutionLimits() {
+    return new ModuleScriptExecutionLimits("A918E3331C404B889D69AA9BFAFB23AC", new OpenbravoVersion(3,0,22941), 
+        new OpenbravoVersion(3,0,25949));
+  }
 }
\ No newline at end of file
--- a/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/org/openbravo/advpaymentmngt/modulescript/LinkCreditPayments.java	Thu Jan 21 09:06:30 2016 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/org/openbravo/advpaymentmngt/modulescript/LinkCreditPayments.java	Fri Jan 22 08:42:24 2016 +0000
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2011 Openbravo SLU
+ * All portions are Copyright (C) 2011-2015 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  *************************************************************************
@@ -25,6 +25,8 @@
 import org.apache.log4j.Logger;
 import org.openbravo.database.ConnectionProvider;
 import org.openbravo.modulescript.ModuleScript;
+import org.openbravo.modulescript.ModuleScriptExecutionLimits;
+import org.openbravo.modulescript.OpenbravoVersion;
 
 public class LinkCreditPayments extends ModuleScript {
   private static final Logger log4j = Logger.getLogger(LinkCreditPayments.class);
@@ -44,6 +46,12 @@
     }
 
   }
+  
+  @Override
+  protected ModuleScriptExecutionLimits getModuleScriptExecutionLimits() {
+    return new ModuleScriptExecutionLimits("A918E3331C404B889D69AA9BFAFB23AC", null, 
+        new OpenbravoVersion(3,0,15853));
+  }
 
   private void linkCreditPayments(ConnectionProvider cp, String cbPartnerId, String cbPartnerName,
       String isReceipt) throws ServletException {
--- a/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/org/openbravo/advpaymentmngt/modulescript/UpdateCustomerBalance.java	Thu Jan 21 09:06:30 2016 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/org/openbravo/advpaymentmngt/modulescript/UpdateCustomerBalance.java	Fri Jan 22 08:42:24 2016 +0000
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2011-2014 Openbravo SLU
+ * All portions are Copyright (C) 2011-2015 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  *************************************************************************
@@ -20,6 +20,8 @@
 
 import org.openbravo.database.ConnectionProvider;
 import org.openbravo.modulescript.ModuleScript;
+import org.openbravo.modulescript.ModuleScriptExecutionLimits;
+import org.openbravo.modulescript.OpenbravoVersion;
 
 public class UpdateCustomerBalance extends ModuleScript {
 
@@ -53,4 +55,10 @@
       handleError(e);
     }
   }
+  
+  @Override
+  protected ModuleScriptExecutionLimits getModuleScriptExecutionLimits() {
+    return new ModuleScriptExecutionLimits("A918E3331C404B889D69AA9BFAFB23AC", null, 
+        new OpenbravoVersion(3,0,26074));
+  }
 }
--- a/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/org/openbravo/advpaymentmngt/modulescript/UpdateGeneratedUsedCreditColumns.java	Thu Jan 21 09:06:30 2016 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/org/openbravo/advpaymentmngt/modulescript/UpdateGeneratedUsedCreditColumns.java	Fri Jan 22 08:42:24 2016 +0000
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2010-2011 Openbravo SLU
+ * All portions are Copyright (C) 2010-2015 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  *************************************************************************
@@ -27,6 +27,8 @@
 
 import org.openbravo.database.ConnectionProvider;
 import org.openbravo.modulescript.ModuleScript;
+import org.openbravo.modulescript.ModuleScriptExecutionLimits;
+import org.openbravo.modulescript.OpenbravoVersion;
 
 public class UpdateGeneratedUsedCreditColumns extends ModuleScript {
 
@@ -48,4 +50,10 @@
       handleError(e);
     }
   }
+  
+  @Override
+  protected ModuleScriptExecutionLimits getModuleScriptExecutionLimits() {
+    return new ModuleScriptExecutionLimits("A918E3331C404B889D69AA9BFAFB23AC", null, 
+        new OpenbravoVersion(3,0,9091));
+  }
 }
--- a/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/org/openbravo/advpaymentmngt/modulescript/UpdateMatchedDocument.java	Thu Jan 21 09:06:30 2016 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/org/openbravo/advpaymentmngt/modulescript/UpdateMatchedDocument.java	Fri Jan 22 08:42:24 2016 +0000
@@ -11,7 +11,7 @@
  * 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 portions are Copyright (C) 2014-2015 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  *************************************************************************
@@ -20,6 +20,8 @@
 
 import org.openbravo.database.ConnectionProvider;
 import org.openbravo.modulescript.ModuleScript;
+import org.openbravo.modulescript.ModuleScriptExecutionLimits;
+import org.openbravo.modulescript.OpenbravoVersion;
 
 public class UpdateMatchedDocument extends ModuleScript {
 
@@ -45,4 +47,10 @@
       handleError(e);
     }
   }
+  
+  @Override
+  protected ModuleScriptExecutionLimits getModuleScriptExecutionLimits() {
+    return new ModuleScriptExecutionLimits("A918E3331C404B889D69AA9BFAFB23AC", null, 
+        new OpenbravoVersion(3,0,24640));
+  }
 }
--- a/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/org/openbravo/advpaymentmngt/modulescript/UpdatePaymentProcessedValue.java	Thu Jan 21 09:06:30 2016 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/org/openbravo/advpaymentmngt/modulescript/UpdatePaymentProcessedValue.java	Fri Jan 22 08:42:24 2016 +0000
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2012 Openbravo SLU
+ * All portions are Copyright (C) 2012-2015 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  *************************************************************************
@@ -20,6 +20,8 @@
 
 import org.openbravo.database.ConnectionProvider;
 import org.openbravo.modulescript.ModuleScript;
+import org.openbravo.modulescript.ModuleScriptExecutionLimits;
+import org.openbravo.modulescript.OpenbravoVersion;
 
 public class UpdatePaymentProcessedValue extends ModuleScript {
 
@@ -32,4 +34,10 @@
       handleError(e);
     }
   }
+  
+  @Override
+  protected ModuleScriptExecutionLimits getModuleScriptExecutionLimits() {
+    return new ModuleScriptExecutionLimits("A918E3331C404B889D69AA9BFAFB23AC", null, 
+        new OpenbravoVersion(3,0,17906));
+  }
 }
--- a/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/org/openbravo/advpaymentmngt/modulescript/UpdatePaymentScheduledetail.java	Thu Jan 21 09:06:30 2016 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/org/openbravo/advpaymentmngt/modulescript/UpdatePaymentScheduledetail.java	Fri Jan 22 08:42:24 2016 +0000
@@ -11,7 +11,7 @@
  * 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 portions are Copyright (C) 2014-2015 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  *************************************************************************
@@ -20,6 +20,9 @@
 
 import org.openbravo.database.ConnectionProvider;
 import org.openbravo.modulescript.ModuleScript;
+import org.openbravo.modulescript.ModuleScriptExecutionLimits;
+import org.openbravo.modulescript.OpenbravoVersion;
+
 import java.math.BigDecimal;
 
 public class UpdatePaymentScheduledetail extends ModuleScript {
@@ -42,4 +45,10 @@
       handleError(e);
     }
  }
+  
+  @Override
+  protected ModuleScriptExecutionLimits getModuleScriptExecutionLimits() {
+    return new ModuleScriptExecutionLimits("A918E3331C404B889D69AA9BFAFB23AC", null, 
+        new OpenbravoVersion(3,0,22942));
+  }
 }
\ No newline at end of file
--- a/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/org/openbravo/advpaymentmngt/modulescript/UpdateReconciliationProcessButtonValue.java	Thu Jan 21 09:06:30 2016 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/org/openbravo/advpaymentmngt/modulescript/UpdateReconciliationProcessButtonValue.java	Fri Jan 22 08:42:24 2016 +0000
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2011 Openbravo SLU
+ * All portions are Copyright (C) 2011-2015 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  *************************************************************************
@@ -27,6 +27,8 @@
 
 import org.openbravo.database.ConnectionProvider;
 import org.openbravo.modulescript.ModuleScript;
+import org.openbravo.modulescript.ModuleScriptExecutionLimits;
+import org.openbravo.modulescript.OpenbravoVersion;
 
 public class UpdateReconciliationProcessButtonValue extends ModuleScript {
 
@@ -40,4 +42,10 @@
       handleError(e);
     }
   }
+  
+  @Override
+  protected ModuleScriptExecutionLimits getModuleScriptExecutionLimits() {
+    return new ModuleScriptExecutionLimits("A918E3331C404B889D69AA9BFAFB23AC", null, 
+        new OpenbravoVersion(3,0,14201));
+  }
 }
--- a/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/org/openbravo/advpaymentmngt/modulescript/UpdateReconciliationStatementProcessedValue.java	Thu Jan 21 09:06:30 2016 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/org/openbravo/advpaymentmngt/modulescript/UpdateReconciliationStatementProcessedValue.java	Fri Jan 22 08:42:24 2016 +0000
@@ -11,7 +11,7 @@
  * 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 portions are Copyright (C) 2014-2015 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  *************************************************************************
@@ -20,6 +20,8 @@
 
 import org.openbravo.database.ConnectionProvider;
 import org.openbravo.modulescript.ModuleScript;
+import org.openbravo.modulescript.ModuleScriptExecutionLimits;
+import org.openbravo.modulescript.OpenbravoVersion;
 
 public class UpdateReconciliationStatementProcessedValue extends ModuleScript {
   
@@ -36,4 +38,10 @@
       handleError(e);
     }
   }
+  
+  @Override
+  protected ModuleScriptExecutionLimits getModuleScriptExecutionLimits() {
+    return new ModuleScriptExecutionLimits("A918E3331C404B889D69AA9BFAFB23AC", null, 
+        new OpenbravoVersion(3,0,22292));
+  }
 }
--- a/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/org/openbravo/advpaymentmngt/modulescript/UpdateRecordId2Value.java	Thu Jan 21 09:06:30 2016 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/org/openbravo/advpaymentmngt/modulescript/UpdateRecordId2Value.java	Fri Jan 22 08:42:24 2016 +0000
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2012 Openbravo SLU
+ * All portions are Copyright (C) 2012-2015 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  *************************************************************************
@@ -20,6 +20,8 @@
 
 import org.openbravo.database.ConnectionProvider;
 import org.openbravo.modulescript.ModuleScript;
+import org.openbravo.modulescript.ModuleScriptExecutionLimits;
+import org.openbravo.modulescript.OpenbravoVersion;
 
 public class UpdateRecordId2Value extends ModuleScript {
 
@@ -38,4 +40,10 @@
       handleError(e);
     }
   }
+  
+  @Override
+  protected ModuleScriptExecutionLimits getModuleScriptExecutionLimits() {
+    return new ModuleScriptExecutionLimits("A918E3331C404B889D69AA9BFAFB23AC", null, 
+        new OpenbravoVersion(3,0,16524));
+  }
 }
--- a/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/org/openbravo/advpaymentmngt/modulescript/UpdateTransactionBPExchangeRate.java	Thu Jan 21 09:06:30 2016 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/org/openbravo/advpaymentmngt/modulescript/UpdateTransactionBPExchangeRate.java	Fri Jan 22 08:42:24 2016 +0000
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2012 Openbravo SLU
+ * All portions are Copyright (C) 2012-2015 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  *************************************************************************
@@ -20,6 +20,8 @@
 
 import org.openbravo.database.ConnectionProvider;
 import org.openbravo.modulescript.ModuleScript;
+import org.openbravo.modulescript.ModuleScriptExecutionLimits;
+import org.openbravo.modulescript.OpenbravoVersion;
 
 public class UpdateTransactionBPExchangeRate extends ModuleScript {
 
@@ -40,4 +42,10 @@
       handleError(e);
     }
   }
+  
+  @Override
+  protected ModuleScriptExecutionLimits getModuleScriptExecutionLimits() {
+    return new ModuleScriptExecutionLimits("A918E3331C404B889D69AA9BFAFB23AC", null, 
+        new OpenbravoVersion(3,0,22061));
+  }
 }
--- a/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/org/openbravo/advpaymentmngt/modulescript/UpdateTransactionTypeTransactionTab.java	Thu Jan 21 09:06:30 2016 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/org/openbravo/advpaymentmngt/modulescript/UpdateTransactionTypeTransactionTab.java	Fri Jan 22 08:42:24 2016 +0000
@@ -20,6 +20,8 @@
 
 import org.openbravo.database.ConnectionProvider;
 import org.openbravo.modulescript.ModuleScript;
+import org.openbravo.modulescript.ModuleScriptExecutionLimits;
+import org.openbravo.modulescript.OpenbravoVersion;
 
 // This modulescript initializes the colum TRXTYPE (Transaction Type) in FIN_FINACC_TRANSACTION TABLE
 public class UpdateTransactionTypeTransactionTab extends ModuleScript {
@@ -38,4 +40,10 @@
       handleError(e);
     }   
   }
+  
+  @Override
+  protected ModuleScriptExecutionLimits getModuleScriptExecutionLimits() {
+    return new ModuleScriptExecutionLimits("A918E3331C404B889D69AA9BFAFB23AC", null, 
+        new OpenbravoVersion(3,0,26174));
+  }
 }
\ No newline at end of file
--- a/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/org/openbravo/advpaymentmngt/modulescript/WrongPaymentsFromJournalLine.java	Thu Jan 21 09:06:30 2016 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/org/openbravo/advpaymentmngt/modulescript/WrongPaymentsFromJournalLine.java	Fri Jan 22 08:42:24 2016 +0000
@@ -11,7 +11,7 @@
  * 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 portions are Copyright (C) 2014-2015 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  *************************************************************************
@@ -22,6 +22,8 @@
 
 import org.openbravo.database.ConnectionProvider;
 import org.openbravo.modulescript.ModuleScript;
+import org.openbravo.modulescript.ModuleScriptExecutionLimits;
+import org.openbravo.modulescript.OpenbravoVersion;
 
 public class WrongPaymentsFromJournalLine extends ModuleScript {
   
@@ -40,6 +42,12 @@
       handleError(e);
     }
   }
+  
+  @Override
+  protected ModuleScriptExecutionLimits getModuleScriptExecutionLimits() {
+    return new ModuleScriptExecutionLimits("A918E3331C404B889D69AA9BFAFB23AC", null, 
+        new OpenbravoVersion(3,0,24269));
+  }
 
   private void createAlert(ConnectionProvider cp, WrongPaymentsFromJournalLineData wrongPayment)
 	      throws ServletException {
--- a/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/src/org/openbravo/advpaymentmngt/modulescript/AlertsForWrongInvoicesData.java	Thu Jan 21 09:06:30 2016 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,689 +0,0 @@
-//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 AlertsForWrongInvoicesData implements FieldProvider {
-static Logger log4j = Logger.getLogger(AlertsForWrongInvoicesData.class);
-  private String InitRecordNumber="0";
-  public String adClientId;
-  public String invoice;
-  public String cInvoiceId;
-  public String adOrgId;
-  public String issotrx;
-  public String adRoleId;
-  public String adAlertruleId;
-  public String adAlertId;
-
-  public String getInitRecordNumber() {
-    return InitRecordNumber;
-  }
-
-  public String getField(String fieldName) {
-    if (fieldName.equalsIgnoreCase("ad_client_id") || fieldName.equals("adClientId"))
-      return adClientId;
-    else if (fieldName.equalsIgnoreCase("invoice"))
-      return invoice;
-    else if (fieldName.equalsIgnoreCase("c_invoice_id") || fieldName.equals("cInvoiceId"))
-      return cInvoiceId;
-    else if (fieldName.equalsIgnoreCase("ad_org_id") || fieldName.equals("adOrgId"))
-      return adOrgId;
-    else if (fieldName.equalsIgnoreCase("issotrx"))
-      return issotrx;
-    else if (fieldName.equalsIgnoreCase("ad_role_id") || fieldName.equals("adRoleId"))
-      return adRoleId;
-    else if (fieldName.equalsIgnoreCase("ad_alertrule_id") || fieldName.equals("adAlertruleId"))
-      return adAlertruleId;
-    else if (fieldName.equalsIgnoreCase("ad_alert_id") || fieldName.equals("adAlertId"))
-      return adAlertId;
-   else {
-     log4j.debug("Field does not exist: " + fieldName);
-     return null;
-   }
- }
-
-  public static AlertsForWrongInvoicesData[] select(ConnectionProvider connectionProvider)    throws ServletException {
-    return select(connectionProvider, 0, 0);
-  }
-
-  public static AlertsForWrongInvoicesData[] select(ConnectionProvider connectionProvider, int firstRegister, int numberRegisters)    throws ServletException {
-    String strSql = "";
-    strSql = strSql + 
-      "      select distinct fin_payment_schedule.ad_client_id, ad_column_identifier('c_invoice', fin_payment_schedule.c_invoice_id, 'en_US') as invoice, " +
-      "      fin_payment_schedule.c_invoice_id, fin_payment_schedule.ad_org_id, c_invoice.issotrx, '' as ad_role_id, '' as ad_alertrule_id, '' as ad_alert_id" +
-      "      from c_invoice, fin_payment_schedule, fin_payment_scheduledetail" +
-      "      where c_invoice.c_invoice_id = fin_payment_schedule.c_invoice_id " +
-      "      and fin_payment_schedule.fin_payment_schedule_id = fin_payment_scheduledetail.fin_payment_schedule_invoice" +
-      "      and fin_payment_scheduledetail.iscanceled = 'N'" +
-      "      group by fin_payment_schedule.ad_client_id, fin_payment_schedule.ad_org_id, c_invoice.issotrx, fin_payment_schedule.fin_payment_schedule_id, fin_payment_schedule.c_invoice_id, fin_payment_schedule.amount" +
-      "      having fin_payment_schedule.amount <> sum(fin_payment_scheduledetail.amount + coalesce(fin_payment_scheduledetail.writeoffamt,0))" +
-      "      order by 1, 2";
-
-    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++;
-        AlertsForWrongInvoicesData objectAlertsForWrongInvoicesData = new AlertsForWrongInvoicesData();
-        objectAlertsForWrongInvoicesData.adClientId = UtilSql.getValue(result, "ad_client_id");
-        objectAlertsForWrongInvoicesData.invoice = UtilSql.getValue(result, "invoice");
-        objectAlertsForWrongInvoicesData.cInvoiceId = UtilSql.getValue(result, "c_invoice_id");
-        objectAlertsForWrongInvoicesData.adOrgId = UtilSql.getValue(result, "ad_org_id");
-        objectAlertsForWrongInvoicesData.issotrx = UtilSql.getValue(result, "issotrx");
-        objectAlertsForWrongInvoicesData.adRoleId = UtilSql.getValue(result, "ad_role_id");
-        objectAlertsForWrongInvoicesData.adAlertruleId = UtilSql.getValue(result, "ad_alertrule_id");
-        objectAlertsForWrongInvoicesData.adAlertId = UtilSql.getValue(result, "ad_alert_id");
-        objectAlertsForWrongInvoicesData.InitRecordNumber = Integer.toString(firstRegister);
-        vector.addElement(objectAlertsForWrongInvoicesData);
-        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();
-      }
-    }
-    AlertsForWrongInvoicesData objectAlertsForWrongInvoicesData[] = new AlertsForWrongInvoicesData[vector.size()];
-    vector.copyInto(objectAlertsForWrongInvoicesData);
-    return(objectAlertsForWrongInvoicesData);
-  }
-
-/**
-Identify alerts created not taking in account the void payment functionality.
- */
-  public static AlertsForWrongInvoicesData[] selectVoidAlerts(ConnectionProvider connectionProvider, String alertRuleId)    throws ServletException {
-    return selectVoidAlerts(connectionProvider, alertRuleId, 0, 0);
-  }
-
-/**
-Identify alerts created not taking in account the void payment functionality.
- */
-  public static AlertsForWrongInvoicesData[] selectVoidAlerts(ConnectionProvider connectionProvider, String alertRuleId, int firstRegister, int numberRegisters)    throws ServletException {
-    String strSql = "";
-    strSql = strSql + 
-      "      select distinct fin_payment_schedule.c_invoice_id, ad_alert.ad_alert_id" +
-      "      from fin_payment_schedule, fin_payment_scheduledetail, ad_alert" +
-      "      where fin_payment_schedule.fin_payment_schedule_id = fin_payment_scheduledetail.fin_payment_schedule_invoice" +
-      "            and ad_alert.referencekey_id = fin_payment_schedule.c_invoice_id" +
-      "      and exists (select 1" +
-      "                  from fin_payment_scheduledetail psd" +
-      "                  where psd.fin_payment_scheduledetail_id = fin_payment_scheduledetail.fin_payment_scheduledetail_id" +
-      "                        and psd.iscanceled = 'Y')" +
-      "      and ad_alert.ad_alertrule_id = ?" +
-      "      group by fin_payment_schedule.fin_payment_schedule_id, fin_payment_schedule.c_invoice_id, fin_payment_schedule.amount, ad_alert.ad_alert_id" +
-      "      having fin_payment_schedule.amount <> sum(fin_payment_scheduledetail.amount + coalesce(fin_payment_scheduledetail.writeoffamt,0))";
-
-    ResultSet result;
-    Vector<java.lang.Object> vector = new Vector<java.lang.Object>(0);
-    PreparedStatement st = null;
-
-    int iParameter = 0;
-    try {
-    st = connectionProvider.getPreparedStatement(strSql);
-      iParameter++; UtilSql.setValue(st, iParameter, 12, null, alertRuleId);
-
-      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++;
-        AlertsForWrongInvoicesData objectAlertsForWrongInvoicesData = new AlertsForWrongInvoicesData();
-        objectAlertsForWrongInvoicesData.cInvoiceId = UtilSql.getValue(result, "c_invoice_id");
-        objectAlertsForWrongInvoicesData.adAlertId = UtilSql.getValue(result, "ad_alert_id");
-        objectAlertsForWrongInvoicesData.InitRecordNumber = Integer.toString(firstRegister);
-        vector.addElement(objectAlertsForWrongInvoicesData);
-        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();
-      }
-    }
-    AlertsForWrongInvoicesData objectAlertsForWrongInvoicesData[] = new AlertsForWrongInvoicesData[vector.size()];
-    vector.copyInto(objectAlertsForWrongInvoicesData);
-    return(objectAlertsForWrongInvoicesData);
-  }
-
-  public static boolean existsAlertRule(ConnectionProvider connectionProvider, String alertRule, String client)    throws ServletException {
-    String strSql = "";
-    strSql = strSql + 
-      "       SELECT COUNT(*) AS EXISTING" +
-      "       FROM AD_ALERTRULE" +
-      "       WHERE NAME = ?" +
-      "         AND AD_CLIENT_ID = ?";
-
-    ResultSet result;
-    boolean boolReturn = false;
-    PreparedStatement st = null;
-
-    int iParameter = 0;
-    try {
-    st = connectionProvider.getPreparedStatement(strSql);
-      iParameter++; UtilSql.setValue(st, iParameter, 12, null, alertRule);
-      iParameter++; UtilSql.setValue(st, iParameter, 12, null, client);
-
-      result = st.executeQuery();
-      if(result.next()) {
-        boolReturn = !UtilSql.getValue(result, "existing").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 boolean existsAlert(ConnectionProvider connectionProvider, String alertRule, String invoice)    throws ServletException {
-    String strSql = "";
-    strSql = strSql + 
-      "       SELECT COUNT(*) AS EXISTING" +
-      "       FROM AD_ALERT" +
-      "       WHERE AD_ALERTRULE_ID = ?" +
-      "       AND REFERENCEKEY_ID = ?" +
-      "       AND ISFIXED = 'N'";
-
-    ResultSet result;
-    boolean boolReturn = false;
-    PreparedStatement st = null;
-
-    int iParameter = 0;
-    try {
-    st = connectionProvider.getPreparedStatement(strSql);
-      iParameter++; UtilSql.setValue(st, iParameter, 12, null, alertRule);
-      iParameter++; UtilSql.setValue(st, iParameter, 12, null, invoice);
-
-      result = st.executeQuery();
-      if(result.next()) {
-        boolReturn = !UtilSql.getValue(result, "existing").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 String getAlertRuleId(ConnectionProvider connectionProvider, String name, String client)    throws ServletException {
-    String strSql = "";
-    strSql = strSql + 
-      "       SELECT MAX(ad_alertrule_id) AS name" +
-      "       FROM AD_ALERTRULE" +
-      "       WHERE NAME LIKE ?" +
-      "         AND ISACTIVE = 'Y'" +
-      "         AND AD_CLIENT_ID = ?";
-
-    ResultSet result;
-    String strReturn = null;
-    PreparedStatement st = null;
-
-    int iParameter = 0;
-    try {
-    st = connectionProvider.getPreparedStatement(strSql);
-      iParameter++; UtilSql.setValue(st, iParameter, 12, null, name);
-      iParameter++; UtilSql.setValue(st, iParameter, 12, null, client);
-
-      result = st.executeQuery();
-      if(result.next()) {
-        strReturn = UtilSql.getValue(result, "name");
-      }
-      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(strReturn);
-  }
-
-  public static AlertsForWrongInvoicesData[] selectOldAlertRules(ConnectionProvider connectionProvider)    throws ServletException {
-    return selectOldAlertRules(connectionProvider, 0, 0);
-  }
-
-  public static AlertsForWrongInvoicesData[] selectOldAlertRules(ConnectionProvider connectionProvider, int firstRegister, int numberRegisters)    throws ServletException {
-    String strSql = "";
-    strSql = strSql + 
-      "       SELECT ad_alertrule_id" +
-      "       FROM AD_ALERTRULE" +
-      "       WHERE (name = 'Wrong purchase invoice. Wrong amount in payment plan detail' OR" +
-      "              name = 'Wrong sales invoice. Wrong amount in payment plan detail')" +
-      "         AND ISACTIVE = 'Y'" +
-      "         AND lower(SQL) not like '%iscanceled%'";
-
-    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++;
-        AlertsForWrongInvoicesData objectAlertsForWrongInvoicesData = new AlertsForWrongInvoicesData();
-        objectAlertsForWrongInvoicesData.adAlertruleId = UtilSql.getValue(result, "ad_alertrule_id");
-        objectAlertsForWrongInvoicesData.InitRecordNumber = Integer.toString(firstRegister);
-        vector.addElement(objectAlertsForWrongInvoicesData);
-        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();
-      }
-    }
-    AlertsForWrongInvoicesData objectAlertsForWrongInvoicesData[] = new AlertsForWrongInvoicesData[vector.size()];
-    vector.copyInto(objectAlertsForWrongInvoicesData);
-    return(objectAlertsForWrongInvoicesData);
-  }
-
-  public static AlertsForWrongInvoicesData[] getRoleId(ConnectionProvider connectionProvider, String window, String clientId)    throws ServletException {
-    return getRoleId(connectionProvider, window, clientId, 0, 0);
-  }
-
-  public static AlertsForWrongInvoicesData[] getRoleId(ConnectionProvider connectionProvider, String window, String clientId, int firstRegister, int numberRegisters)    throws ServletException {
-    String strSql = "";
-    strSql = strSql + 
-      "       SELECT distinct ad_role_id" +
-      "       FROM ad_window_access" +
-      "       WHERE ad_window_id = ?" +
-      "       AND AD_CLIENT_ID = ?" +
-      "         AND ISACTIVE = 'Y'";
-
-    ResultSet result;
-    Vector<java.lang.Object> vector = new Vector<java.lang.Object>(0);
-    PreparedStatement st = null;
-
-    int iParameter = 0;
-    try {
-    st = connectionProvider.getPreparedStatement(strSql);
-      iParameter++; UtilSql.setValue(st, iParameter, 12, null, window);
-      iParameter++; UtilSql.setValue(st, iParameter, 12, null, clientId);
-
-      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++;
-        AlertsForWrongInvoicesData objectAlertsForWrongInvoicesData = new AlertsForWrongInvoicesData();
-        objectAlertsForWrongInvoicesData.adRoleId = UtilSql.getValue(result, "ad_role_id");
-        objectAlertsForWrongInvoicesData.InitRecordNumber = Integer.toString(firstRegister);
-        vector.addElement(objectAlertsForWrongInvoicesData);
-        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();
-      }
-    }
-    AlertsForWrongInvoicesData objectAlertsForWrongInvoicesData[] = new AlertsForWrongInvoicesData[vector.size()];
-    vector.copyInto(objectAlertsForWrongInvoicesData);
-    return(objectAlertsForWrongInvoicesData);
-  }
-
-  public static int insertAlertRule(ConnectionProvider connectionProvider, String clientId, String name, String tabId, String sql)    throws ServletException {
-    String strSql = "";
-    strSql = strSql + 
-      "      INSERT INTO AD_ALERTRULE (" +
-      "        AD_ALERTRULE_ID, AD_CLIENT_ID, AD_ORG_ID,ISACTIVE," +
-      "        CREATED, CREATEDBY,  UPDATED, UPDATEDBY," +
-      "        NAME, AD_TAB_ID, FILTERCLAUSE, TYPE," +
-      "        SQL" +
-      "      ) VALUES (" +
-      "        get_uuid(), ?, '0', 'Y'," +
-      "        now(), '100', now(), '100'," +
-      "        ?, ?, '', 'D'," +
-      "        ?" +
-      "      )";
-
-    int updateCount = 0;
-    PreparedStatement st = null;
-
-    int iParameter = 0;
-    try {
-    st = connectionProvider.getPreparedStatement(strSql);
-      iParameter++; UtilSql.setValue(st, iParameter, 12, null, clientId);
-      iParameter++; UtilSql.setValue(st, iParameter, 12, null, name);
-      iParameter++; UtilSql.setValue(st, iParameter, 12, null, tabId);
-      iParameter++; UtilSql.setValue(st, iParameter, 12, null, sql);
-
-      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 insertAlert(ConnectionProvider connectionProvider, String client, String org, String description, String adAlertRuleId, String recordId, String referencekey_id)    throws ServletException {
-    String strSql = "";
-    strSql = strSql + 
-      "      INSERT INTO AD_Alert (" +
-      "        AD_Alert_ID, AD_Client_ID, AD_Org_ID, IsActive," +
-      "        Created, CreatedBy, Updated, UpdatedBy," +
-      "        Description, AD_AlertRule_ID, Record_Id, Referencekey_ID" +
-      "      ) VALUES (" +
-      "        get_uuid(), ?, ?, 'Y'," +
-      "        NOW(), '0', NOW(), '0'," +
-      "        ?, ?, ?, ?)";
-
-    int updateCount = 0;
-    PreparedStatement st = null;
-
-    int iParameter = 0;
-    try {
-    st = connectionProvider.getPreparedStatement(strSql);
-      iParameter++; UtilSql.setValue(st, iParameter, 12, null, client);
-      iParameter++; UtilSql.setValue(st, iParameter, 12, null, org);
-      iParameter++; UtilSql.setValue(st, iParameter, 12, null, description);
-      iParameter++; UtilSql.setValue(st, iParameter, 12, null, adAlertRuleId);
-      iParameter++; UtilSql.setValue(st, iParameter, 12, null, recordId);
-      iParameter++; UtilSql.setValue(st, iParameter, 12, null, referencekey_id);
-
-      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 insertAlertRecipient(ConnectionProvider connectionProvider, String client, String org, String adAlertRuleId, String role)    throws ServletException {
-    String strSql = "";
-    strSql = strSql + 
-      "    INSERT INTO ad_alertrecipient(" +
-      "            ad_user_id, ad_client_id, ad_org_id, isactive, created, createdby, " +
-      "            updated, updatedby, ad_alertrecipient_id, ad_alertrule_id, ad_role_id, " +
-      "            sendemail)" +
-      "    VALUES (null, ?, ?, 'Y', now(), '100', " +
-      "            now(), '100', get_uuid(), ?, ?, " +
-      "            'N')";
-
-    int updateCount = 0;
-    PreparedStatement st = null;
-
-    int iParameter = 0;
-    try {
-    st = connectionProvider.getPreparedStatement(strSql);
-      iParameter++; UtilSql.setValue(st, iParameter, 12, null, client);
-      iParameter++; UtilSql.setValue(st, iParameter, 12, null, org);
-      iParameter++; UtilSql.setValue(st, iParameter, 12, null, adAlertRuleId);
-      iParameter++; UtilSql.setValue(st, iParameter, 12, null, role);
-
-      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 updateAlertRuleSql(ConnectionProvider connectionProvider, String sql, String adAlertRuleId)    throws ServletException {
-    String strSql = "";
-    strSql = strSql + 
-      "      UPDATE ad_alertrule SET SQL = ? WHERE ad_alertrule_id = ?";
-
-    int updateCount = 0;
-    PreparedStatement st = null;
-
-    int iParameter = 0;
-    try {
-    st = connectionProvider.getPreparedStatement(strSql);
-      iParameter++; UtilSql.setValue(st, iParameter, 12, null, sql);
-      iParameter++; UtilSql.setValue(st, iParameter, 12, null, adAlertRuleId);
-
-      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 updateAlertStatus(ConnectionProvider connectionProvider, String status, String isfixed, String alertId)    throws ServletException {
-    String strSql = "";
-    strSql = strSql + 
-      "      UPDATE ad_alert SET status = ?, isfixed = ? WHERE ad_alert_id = ?";
-
-    int updateCount = 0;
-    PreparedStatement st = null;
-
-    int iParameter = 0;
-    try {
-    st = connectionProvider.getPreparedStatement(strSql);
-      iParameter++; UtilSql.setValue(st, iParameter, 12, null, status);
-      iParameter++; UtilSql.setValue(st, iParameter, 12, null, isfixed);
-      iParameter++; UtilSql.setValue(st, iParameter, 12, null, alertId);
-
-      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 isAlertsForWrongInvoicesExecuted(ConnectionProvider connectionProvider)    throws ServletException {
-    String strSql = "";
-    strSql = strSql + 
-      "        SELECT count(*) as exist" +
-      "        FROM DUAL" +
-      "        WHERE EXISTS (SELECT 1 FROM ad_preference" +
-      "                      WHERE attribute = 'AlertsForWrongInvoices')";
-
-    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()," +
-      "          'AlertsForWrongInvoices'" +
-      "        )";
-
-    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-util/modulescript/src/src/org/openbravo/advpaymentmngt/modulescript/AlertsForWrongOrdersData.java	Thu Jan 21 09:06:30 2016 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,459 +0,0 @@
-//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 AlertsForWrongOrdersData implements FieldProvider {
-static Logger log4j = Logger.getLogger(AlertsForWrongOrdersData.class);
-  private String InitRecordNumber="0";
-  public String adClientId;
-  public String orderinfo;
-  public String cOrderId;
-  public String adOrgId;
-  public String issotrx;
-  public String adRoleId;
-  public String adAlertruleId;
-  public String adAlertId;
-
-  public String getInitRecordNumber() {
-    return InitRecordNumber;
-  }
-
-  public String getField(String fieldName) {
-    if (fieldName.equalsIgnoreCase("ad_client_id") || fieldName.equals("adClientId"))
-      return adClientId;
-    else if (fieldName.equalsIgnoreCase("orderinfo"))
-      return orderinfo;
-    else if (fieldName.equalsIgnoreCase("c_order_id") || fieldName.equals("cOrderId"))
-      return cOrderId;
-    else if (fieldName.equalsIgnoreCase("ad_org_id") || fieldName.equals("adOrgId"))
-      return adOrgId;
-    else if (fieldName.equalsIgnoreCase("issotrx"))
-      return issotrx;
-    else if (fieldName.equalsIgnoreCase("ad_role_id") || fieldName.equals("adRoleId"))
-      return adRoleId;
-    else if (fieldName.equalsIgnoreCase("ad_alertrule_id") || fieldName.equals("adAlertruleId"))
-      return adAlertruleId;
-    else if (fieldName.equalsIgnoreCase("ad_alert_id") || fieldName.equals("adAlertId"))
-      return adAlertId;
-   else {
-     log4j.debug("Field does not exist: " + fieldName);
-     return null;
-   }
- }
-
-  public static AlertsForWrongOrdersData[] select(ConnectionProvider connectionProvider)    throws ServletException {
-    return select(connectionProvider, 0, 0);
-  }
-
-  public static AlertsForWrongOrdersData[] select(ConnectionProvider connectionProvider, int firstRegister, int numberRegisters)    throws ServletException {
-    String strSql = "";
-    strSql = strSql + 
-      "      select distinct fin_payment_schedule.ad_client_id, ad_column_identifier('C_Order', fin_payment_schedule.c_order_id, 'en_US') as orderinfo, " +
-      "      fin_payment_schedule.c_order_id, fin_payment_schedule.ad_org_id,  c_order.issotrx, '' as ad_role_id, '' as ad_alertrule_id, '' as ad_alert_id" +
-      "      from c_order, fin_payment_schedule, fin_payment_scheduledetail " +
-      "      where c_order.c_order_id = fin_payment_schedule.c_order_id" +
-      "      and fin_payment_schedule.fin_payment_schedule_id = fin_payment_scheduledetail.fin_payment_schedule_order " +
-      "      and fin_payment_scheduledetail.isinvoicepaid = 'Y'" +
-      "      and fin_payment_scheduledetail.fin_payment_detail_id IS NOT NULL " +
-      "      group by fin_payment_schedule.ad_org_id, fin_payment_schedule.ad_client_id, c_order.issotrx, fin_payment_schedule.fin_payment_schedule_id, " +
-      "      fin_payment_schedule.c_order_id, fin_payment_schedule.paidamt " +
-      "      having fin_payment_schedule.paidamt <> sum(fin_payment_scheduledetail.amount + coalesce(fin_payment_scheduledetail.writeoffamt,0)) " +
-      "      order by 1, 2";
-
-    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++;
-        AlertsForWrongOrdersData objectAlertsForWrongOrdersData = new AlertsForWrongOrdersData();
-        objectAlertsForWrongOrdersData.adClientId = UtilSql.getValue(result, "ad_client_id");
-        objectAlertsForWrongOrdersData.orderinfo = UtilSql.getValue(result, "orderinfo");
-        objectAlertsForWrongOrdersData.cOrderId = UtilSql.getValue(result, "c_order_id");
-        objectAlertsForWrongOrdersData.adOrgId = UtilSql.getValue(result, "ad_org_id");
-        objectAlertsForWrongOrdersData.issotrx = UtilSql.getValue(result, "issotrx");
-        objectAlertsForWrongOrdersData.adRoleId = UtilSql.getValue(result, "ad_role_id");
-        objectAlertsForWrongOrdersData.adAlertruleId = UtilSql.getValue(result, "ad_alertrule_id");
-        objectAlertsForWrongOrdersData.adAlertId = UtilSql.getValue(result, "ad_alert_id");
-        objectAlertsForWrongOrdersData.InitRecordNumber = Integer.toString(firstRegister);
-        vector.addElement(objectAlertsForWrongOrdersData);
-        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();
-      }
-    }
-    AlertsForWrongOrdersData objectAlertsForWrongOrdersData[] = new AlertsForWrongOrdersData[vector.size()];
-    vector.copyInto(objectAlertsForWrongOrdersData);
-    return(objectAlertsForWrongOrdersData);
-  }
-
-  public static boolean existsAlertRule(ConnectionProvider connectionProvider, String alertRule, String client)    throws ServletException {
-    String strSql = "";
-    strSql = strSql + 
-      "       SELECT COUNT(*) AS EXISTING" +
-      "       FROM AD_ALERTRULE" +
-      "       WHERE NAME = ?" +
-      "         AND ISACTIVE = 'Y'" +
-      "         AND AD_CLIENT_ID = ?";
-
-    ResultSet result;
-    boolean boolReturn = false;
-    PreparedStatement st = null;
-
-    int iParameter = 0;
-    try {
-    st = connectionProvider.getPreparedStatement(strSql);
-      iParameter++; UtilSql.setValue(st, iParameter, 12, null, alertRule);
-      iParameter++; UtilSql.setValue(st, iParameter, 12, null, client);
-
-      result = st.executeQuery();
-      if(result.next()) {
-        boolReturn = !UtilSql.getValue(result, "existing").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 updateAlertRule(ConnectionProvider connectionProvider, String name, String clientId)    throws ServletException {
-    String strSql = "";
-    strSql = strSql + 
-      "        UPDATE AD_AlertRule" +
-      "        SET SQL='', TYPE='E' WHERE NAME = ? AND AD_Client_ID = ?";
-
-    int updateCount = 0;
-    PreparedStatement st = null;
-
-    int iParameter = 0;
-    try {
-    st = connectionProvider.getPreparedStatement(strSql);
-      iParameter++; UtilSql.setValue(st, iParameter, 12, null, name);
-      iParameter++; UtilSql.setValue(st, iParameter, 12, null, clientId);
-
-      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 existsAlert(ConnectionProvider connectionProvider, String alertRule, String order)    throws ServletException {
-    String strSql = "";
-    strSql = strSql + 
-      "       SELECT COUNT(*) AS EXISTING" +
-      "       FROM AD_ALERT" +
-      "       WHERE AD_ALERTRULE_ID = ?" +
-      "       AND REFERENCEKEY_ID = ?" +
-      "       AND ISFIXED = 'N'";
-
-    ResultSet result;
-    boolean boolReturn = false;
-    PreparedStatement st = null;
-
-    int iParameter = 0;
-    try {
-    st = connectionProvider.getPreparedStatement(strSql);
-      iParameter++; UtilSql.setValue(st, iParameter, 12, null, alertRule);
-      iParameter++; UtilSql.setValue(st, iParameter, 12, null, order);
-
-      result = st.executeQuery();
-      if(result.next()) {
-        boolReturn = !UtilSql.getValue(result, "existing").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 String getAlertRuleId(ConnectionProvider connectionProvider, String name, String client)    throws ServletException {
-    String strSql = "";
-    strSql = strSql + 
-      "       SELECT MAX(ad_alertrule_id) AS name" +
-      "       FROM AD_ALERTRULE" +
-      "       WHERE NAME LIKE ?" +
-      "         AND ISACTIVE = 'Y'" +
-      "         AND AD_CLIENT_ID = ?";
-
-    ResultSet result;
-    String strReturn = null;
-    PreparedStatement st = null;
-
-    int iParameter = 0;
-    try {
-    st = connectionProvider.getPreparedStatement(strSql);
-      iParameter++; UtilSql.setValue(st, iParameter, 12, null, name);
-      iParameter++; UtilSql.setValue(st, iParameter, 12, null, client);
-
-      result = st.executeQuery();
-      if(result.next()) {
-        strReturn = UtilSql.getValue(result, "name");
-      }
-      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(strReturn);
-  }
-
-  public static AlertsForWrongOrdersData[] getRoleId(ConnectionProvider connectionProvider, String window, String clientId)    throws ServletException {
-    return getRoleId(connectionProvider, window, clientId, 0, 0);
-  }
-
-  public static AlertsForWrongOrdersData[] getRoleId(ConnectionProvider connectionProvider, String window, String clientId, int firstRegister, int numberRegisters)    throws ServletException {
-    String strSql = "";
-    strSql = strSql + 
-      "       SELECT distinct ad_role_id" +
-      "       FROM ad_window_access" +
-      "       WHERE ad_window_id = ?" +
-      "       AND AD_CLIENT_ID = ?" +
-      "         AND ISACTIVE = 'Y'";
-
-    ResultSet result;
-    Vector<java.lang.Object> vector = new Vector<java.lang.Object>(0);
-    PreparedStatement st = null;
-
-    int iParameter = 0;
-    try {
-    st = connectionProvider.getPreparedStatement(strSql);
-      iParameter++; UtilSql.setValue(st, iParameter, 12, null, window);
-      iParameter++; UtilSql.setValue(st, iParameter, 12, null, clientId);
-
-      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++;
-        AlertsForWrongOrdersData objectAlertsForWrongOrdersData = new AlertsForWrongOrdersData();
-        objectAlertsForWrongOrdersData.adRoleId = UtilSql.getValue(result, "ad_role_id");
-        objectAlertsForWrongOrdersData.InitRecordNumber = Integer.toString(firstRegister);
-        vector.addElement(objectAlertsForWrongOrdersData);
-        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();
-      }
-    }
-    AlertsForWrongOrdersData objectAlertsForWrongOrdersData[] = new AlertsForWrongOrdersData[vector.size()];
-    vector.copyInto(objectAlertsForWrongOrdersData);
-    return(objectAlertsForWrongOrdersData);
-  }
-
-  public static int insertAlertRule(ConnectionProvider connectionProvider, String clientId, String name, String tabId, String sql)    throws ServletException {
-    String strSql = "";
-    strSql = strSql + 
-      "      INSERT INTO AD_ALERTRULE (" +
-      "        AD_ALERTRULE_ID, AD_CLIENT_ID, AD_ORG_ID,ISACTIVE," +
-      "        CREATED, CREATEDBY,  UPDATED, UPDATEDBY," +
-      "        NAME, AD_TAB_ID, FILTERCLAUSE, TYPE," +
-      "        SQL" +
-      "      ) VALUES (" +
-      "        get_uuid(), ?, '0', 'Y'," +
-      "        now(), '100', now(), '100'," +
-      "        ?, ?, '', 'E'," +
-      "        ?" +
-      "      )";
-
-    int updateCount = 0;
-    PreparedStatement st = null;
-
-    int iParameter = 0;
-    try {
-    st = connectionProvider.getPreparedStatement(strSql);
-      iParameter++; UtilSql.setValue(st, iParameter, 12, null, clientId);
-      iParameter++; UtilSql.setValue(st, iParameter, 12, null, name);
-      iParameter++; UtilSql.setValue(st, iParameter, 12, null, tabId);
-      iParameter++; UtilSql.setValue(st, iParameter, 12, null, sql);
-
-      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 insertAlert(ConnectionProvider connectionProvider, String client, String org, String description, String adAlertRuleId, String recordId, String referencekey_id)    throws ServletException {
-    String strSql = "";
-    strSql = strSql + 
-      "      INSERT INTO AD_Alert (" +
-      "        AD_Alert_ID, AD_Client_ID, AD_Org_ID, IsActive," +
-      "        Created, CreatedBy, Updated, UpdatedBy," +
-      "        Description, AD_AlertRule_ID, Record_Id, Referencekey_ID" +
-      "      ) VALUES (" +
-      "        get_uuid(), ?, ?, 'Y'," +
-      "        NOW(), '0', NOW(), '0'," +
-      "        ?, ?, ?, ?)";
-
-    int updateCount = 0;
-    PreparedStatement st = null;
-
-    int iParameter = 0;
-    try {
-    st = connectionProvider.getPreparedStatement(strSql);
-      iParameter++; UtilSql.setValue(st, iParameter, 12, null, client);
-      iParameter++; UtilSql.setValue(st, iParameter, 12, null, org);
-      iParameter++; UtilSql.setValue(st, iParameter, 12, null, description);
-      iParameter++; UtilSql.setValue(st, iParameter, 12, null, adAlertRuleId);
-      iParameter++; UtilSql.setValue(st, iParameter, 12, null, recordId);
-      iParameter++; UtilSql.setValue(st, iParameter, 12, null, referencekey_id);
-
-      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 insertAlertRecipient(ConnectionProvider connectionProvider, String client, String org, String adAlertRuleId, String role)    throws ServletException {
-    String strSql = "";
-    strSql = strSql + 
-      "    INSERT INTO ad_alertrecipient(" +
-      "            ad_user_id, ad_client_id, ad_org_id, isactive, created, createdby, " +
-      "            updated, updatedby, ad_alertrecipient_id, ad_alertrule_id, ad_role_id, " +
-      "            sendemail)" +
-      "    VALUES (null, ?, ?, 'Y', now(), '100', " +
-      "            now(), '100', get_uuid(), ?, ?, " +
-      "            'N')";
-
-    int updateCount = 0;
-    PreparedStatement st = null;
-
-    int iParameter = 0;
-    try {
-    st = connectionProvider.getPreparedStatement(strSql);
-      iParameter++; UtilSql.setValue(st, iParameter, 12, null, client);
-      iParameter++; UtilSql.setValue(st, iParameter, 12, null, org);
-      iParameter++; UtilSql.setValue(st, iParameter, 12, null, adAlertRuleId);
-      iParameter++; UtilSql.setValue(st, iParameter, 12, null, role);
-
-      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	Thu Jan 21 09:06:30 2016 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/actionHandler/AddPaymentActionHandler.java	Fri Jan 22 08:42:24 2016 +0000
@@ -28,6 +28,7 @@
 
 import javax.servlet.ServletException;
 
+import org.apache.commons.lang.StringUtils;
 import org.codehaus.jettison.json.JSONArray;
 import org.codehaus.jettison.json.JSONException;
 import org.codehaus.jettison.json.JSONObject;
@@ -280,7 +281,8 @@
             strDocBaseType, org.getId(), OBDateUtils.formatDate(paymentDate))
         && orgLegalWithAccounting) {
       String messag = OBMessageUtils.messageBD("PeriodNotAvailable");
-      throw new OBException(messag);
+      log.debug(messag);
+      throw new OBException(messag, false);
     }
 
     String strPaymentAmount = "0";
@@ -523,6 +525,8 @@
           }
         }
 
+        FIN_PaymentProcess.removePaymentProposalLines(psd);
+
         pd.getFINPaymentScheduleDetailList().remove(psd);
         OBDal.getInstance().save(pd);
         OBDal.getInstance().remove(psd);
@@ -580,6 +584,19 @@
     }
     FIN_Payment refundPayment = FIN_AddPayment.createRefundPayment(conn, vars, payment,
         refundAmount.negate(), exchangeRate);
+
+    // If refunded credit is generated in the same payment, add payment id to
+    // strSelectedCreditLinesIds
+    BigDecimal actualPayment = new BigDecimal(jsonparams.getString("actual_payment"));
+    if (actualPayment.compareTo(BigDecimal.ZERO) != 0) {
+      if (!StringUtils.isEmpty(strSelectedCreditLinesIds)) {
+        strSelectedCreditLinesIds = "(" + payment.getId() + ", "
+            + strSelectedCreditLinesIds.substring(1);
+      } else {
+        strSelectedCreditLinesIds = "(" + payment.getId() + ")";
+      }
+    }
+
     OBError auxMessage = FIN_AddPayment.processPayment(vars, conn,
         (strAction.equals("PRP") || strAction.equals("PPP")) ? "P" : "D", refundPayment,
         comingFrom, strSelectedCreditLinesIds);
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/actionHandler/AddPaymentReloadLabelsActionHandler.java	Thu Jan 21 09:06:30 2016 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/actionHandler/AddPaymentReloadLabelsActionHandler.java	Fri Jan 22 08:42:24 2016 +0000
@@ -11,7 +11,7 @@
  * 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 portions are Copyright (C) 2014-2015 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -21,6 +21,7 @@
 
 import java.util.Map;
 
+import org.apache.commons.lang.StringUtils;
 import org.codehaus.jettison.json.JSONObject;
 import org.hibernate.criterion.Restrictions;
 import org.openbravo.client.application.Parameter;
@@ -30,6 +31,7 @@
 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.Element;
 import org.openbravo.model.ad.ui.ElementTrl;
 import org.openbravo.service.db.DbUtility;
 import org.slf4j.Logger;
@@ -50,53 +52,38 @@
       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));
-      obcBP.setMaxResults(1);
-      final ElementTrl elementBP = (ElementTrl) obcBP.uniqueResult();
-      if (elementBP != null) {
-        if (issotrx) {
-          values.put("businessPartner", elementBP.getName());
-        } else {
-          values.put("businessPartner", elementBP.getPurchaseOrderName());
+      final String labelProperty = issotrx ? Element.PROPERTY_NAME
+          : Element.PROPERTY_PURCHASEORDERNAME;
+      final Language lang = OBContext.getOBContext().getLanguage();
+
+      final Element businessPartnerElement = OBDal.getInstance()
+          .get(Parameter.class, strBusinessPartner).getApplicationElement();
+      final Element financialAccountElement = OBDal.getInstance()
+          .get(Parameter.class, strFinancialAccount).getApplicationElement();
+
+      values.put("businessPartner", businessPartnerElement.get(labelProperty));
+      values.put("financialAccount", financialAccountElement.get(labelProperty));
+      if (!StringUtils.equals(lang.getLanguage(), "en_US")) {
+        final OBCriteria<ElementTrl> obcBP = OBDal.getInstance().createCriteria(ElementTrl.class);
+        obcBP.add(Restrictions.eq(ElementTrl.PROPERTY_APPLICATIONELEMENT, businessPartnerElement));
+        obcBP.add(Restrictions.eq(ElementTrl.PROPERTY_LANGUAGE, lang));
+        obcBP.setMaxResults(1);
+        final ElementTrl elementBP = (ElementTrl) obcBP.uniqueResult();
+        if (elementBP != null) {
+          values.put("businessPartner", elementBP.get(labelProperty));
         }
-      } 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_APPLICATIONELEMENT, financialAccountElement));
+        obcFA.add(Restrictions.eq(ElementTrl.PROPERTY_LANGUAGE, lang));
+        obcFA.setMaxResults(1);
+        final ElementTrl elementFA = (ElementTrl) obcFA.uniqueResult();
+        if (elementFA != null) {
+          values.put("financialAccount", elementFA.get(labelProperty));
         }
       }
 
-      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));
-      obcFA.setMaxResults(1);
-      final ElementTrl elementFA = (ElementTrl) obcFA.uniqueResult();
-      if (elementFA != null) {
-        if (issotrx) {
-          values.put("financialAccount", elementFA.getName());
-        } else {
-          values.put("financialAccount", elementFA.getPurchaseOrderName());
-        }
-      } else {
-        if (issotrx) {
-          values.put("financialAccount", financialAccount.getApplicationElement().getName());
-        } else {
-          values.put("financialAccount", financialAccount.getApplicationElement()
-              .getPurchaseOrderName());
-        }
-      }
       result.put("values", values);
     } catch (Exception e) {
       OBDal.getInstance().rollbackAndClose();
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/actionHandler/PaymentMethodMulticurrencyActionHandler.java	Thu Jan 21 09:06:30 2016 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/actionHandler/PaymentMethodMulticurrencyActionHandler.java	Fri Jan 22 08:42:24 2016 +0000
@@ -26,6 +26,7 @@
 import org.hibernate.criterion.Restrictions;
 import org.openbravo.base.exception.OBException;
 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.financial.FinancialUtils;
@@ -119,14 +120,19 @@
 
   private FinAccPaymentMethod getFinancialAccountPaymentMethod(String paymentMethodId,
       String financialAccountId) {
-    OBCriteria<FinAccPaymentMethod> obc = OBDal.getInstance().createCriteria(
-        FinAccPaymentMethod.class);
-    obc.setFilterOnReadableOrganization(false);
-    obc.setMaxResults(1);
-    obc.add(Restrictions.eq(FinAccPaymentMethod.PROPERTY_ACCOUNT,
-        OBDal.getInstance().get(FIN_FinancialAccount.class, financialAccountId)));
-    obc.add(Restrictions.eq(FinAccPaymentMethod.PROPERTY_PAYMENTMETHOD,
-        OBDal.getInstance().get(FIN_PaymentMethod.class, paymentMethodId)));
-    return (FinAccPaymentMethod) obc.uniqueResult();
+    OBContext.setAdminMode(true);
+    try {
+      OBCriteria<FinAccPaymentMethod> obc = OBDal.getInstance().createCriteria(
+          FinAccPaymentMethod.class);
+      obc.setFilterOnReadableOrganization(false);
+      obc.setMaxResults(1);
+      obc.add(Restrictions.eq(FinAccPaymentMethod.PROPERTY_ACCOUNT,
+          OBDal.getInstance().get(FIN_FinancialAccount.class, financialAccountId)));
+      obc.add(Restrictions.eq(FinAccPaymentMethod.PROPERTY_PAYMENTMETHOD,
+          OBDal.getInstance().get(FIN_PaymentMethod.class, paymentMethodId)));
+      return (FinAccPaymentMethod) obc.uniqueResult();
+    } finally {
+      OBContext.restorePreviousMode();
+    }
   }
 }
\ 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/UnMatchSelectedTransactionsActionHandler.java	Fri Jan 22 08:42:24 2016 +0000
@@ -0,0 +1,151 @@
+/*
+ *************************************************************************
+ * 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) 2015 Openbravo SLU
+ * All Rights Reserved.
+ * Contributor(s):  Cleardrop_____________________________.
+ ************************************************************************
+ */
+
+package org.openbravo.advpaymentmngt.actionHandler;
+
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.commons.lang.StringUtils;
+import org.codehaus.jettison.json.JSONArray;
+import org.codehaus.jettison.json.JSONObject;
+import org.openbravo.advpaymentmngt.utility.APRM_MatchingUtility;
+import org.openbravo.client.kernel.BaseActionHandler;
+import org.openbravo.dal.core.OBContext;
+import org.openbravo.dal.service.OBDal;
+import org.openbravo.erpCommon.utility.OBDateUtils;
+import org.openbravo.erpCommon.utility.OBMessageUtils;
+import org.openbravo.model.financialmgmt.payment.FIN_BankStatementLine;
+import org.openbravo.model.financialmgmt.payment.FIN_FinaccTransaction;
+import org.openbravo.service.db.DbUtility;
+import org.openbravo.service.json.JsonUtils;
+import org.openbravo.service.json.OBStaleObjectException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class UnMatchSelectedTransactionsActionHandler extends BaseActionHandler {
+  private static final Logger log = LoggerFactory
+      .getLogger(UnMatchSelectedTransactionsActionHandler.class);
+
+  @Override
+  protected JSONObject execute(Map<String, Object> parameters, String data) {
+    JSONObject result = new JSONObject();
+    JSONObject errorMessage = new JSONObject();
+    try {
+      OBContext.setAdminMode(true);
+      final JSONObject jsonData = new JSONObject(data);
+      SimpleDateFormat xmlDateTimeFormat = JsonUtils.createJSTimeFormat();
+
+      List<String> errorLines = new ArrayList<String>();
+
+      final JSONArray bankStatementLineIds = jsonData.getJSONArray("bankStatementLineIds");
+      int bankStatementLineIdsLength = bankStatementLineIds != null ? bankStatementLineIds.length()
+          : 0;
+      int alreadyCleared = 0;
+      for (int i = 0; i < bankStatementLineIdsLength; i++) {
+        JSONObject bankStatementLine = bankStatementLineIds.getJSONObject(i);
+        if (!bankStatementLine.getBoolean("cleared")) {
+          log.info("Skipping " + bankStatementLine.getString("referenceNo")
+              + " line as it's not matched");
+          alreadyCleared++;
+        } else {
+          try {
+            Date date = xmlDateTimeFormat.parse(bankStatementLine.getString("bslUpdated"));
+            final FIN_BankStatementLine bsline = OBDal.getInstance().get(
+                FIN_BankStatementLine.class, bankStatementLine.getString("id"));
+            Date bbddBSLUpdated = bsline.getUpdated();
+            // Remove milis
+            Calendar calendar = Calendar.getInstance();
+            calendar.setTime(OBDateUtils.convertDateToUTC(bbddBSLUpdated));
+            calendar.setLenient(true);
+            calendar.set(Calendar.MILLISECOND, 0);
+            if (date.getTime() != calendar.getTimeInMillis()) {
+              log.error("The record " + bankStatementLine.getString("referenceNo")
+                  + " is newer in the database. Avoid unmatching it");
+              throw new OBStaleObjectException("@APRM_StaleDate@");
+            }
+            final FIN_FinaccTransaction transaction = bsline.getFinancialAccountTransaction();
+            if (transaction != null) {
+              APRM_MatchingUtility.unmatch(bsline);
+            }
+          } catch (Exception e) {
+            errorLines.add(bankStatementLine.getString("referenceNo"));
+          }
+        }
+      }
+
+      /* Build Message */
+      int totalSuccess = bankStatementLineIdsLength - errorLines.size() - alreadyCleared;
+      String severity = "error";
+      String title = "";
+      String msg = "";
+      if (totalSuccess > 0) {
+        severity = "success";
+        title = OBMessageUtils.messageBD("Success");
+        msg = OBMessageUtils.getI18NMessage("APRM_UnmatchedRecords",
+            new String[] { String.valueOf(totalSuccess) });
+      }
+      if (!errorLines.isEmpty()) {
+        if (totalSuccess > 0) {
+          severity = "warning";
+          title = OBMessageUtils.messageBD("Warning");
+        } else {
+          severity = "error";
+          title = OBMessageUtils.messageBD("Error");
+        }
+
+        if (StringUtils.isNotBlank(msg)) {
+          msg += "<br/>";
+        }
+        msg += OBMessageUtils.getI18NMessage("APRM_ErrorOnUnmatchingRecords",
+            new String[] { String.valueOf(errorLines.size()) });
+        for (String string : errorLines) {
+          msg += string + ", ";
+        }
+        msg = msg.substring(0, msg.length() - 2);
+      }
+      errorMessage.put("severity", severity);
+      errorMessage.put("title", title);
+      errorMessage.put("text", msg);
+      result.put("message", errorMessage);
+
+    } catch (Exception e) {
+      OBDal.getInstance().rollbackAndClose();
+      log.error("Error Unmatching Transaction", e);
+      try {
+        Throwable ex = DbUtility.getUnderlyingSQLException(e);
+        String message = OBMessageUtils.translateError(ex.getMessage()).getMessage();
+        errorMessage = new JSONObject();
+        errorMessage.put("severity", "error");
+        errorMessage.put("title", OBMessageUtils.messageBD("Error"));
+        errorMessage.put("text", message);
+        result.put("message", errorMessage);
+      } catch (Exception e2) {
+        log.error("Message could not be built", e2);
+      }
+    } finally {
+      OBContext.restorePreviousMode();
+    }
+    return result;
+  }
+}
\ No newline at end of file
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/GLItemSelectorFilterExpression.java	Thu Jan 21 09:06:30 2016 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/GLItemSelectorFilterExpression.java	Fri Jan 22 08:42:24 2016 +0000
@@ -11,7 +11,7 @@
  * under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2012 Openbravo SLU 
+ * All portions are Copyright (C) 2012-2015 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -21,11 +21,14 @@
 
 import java.util.Map;
 
+import org.apache.commons.lang.StringUtils;
 import org.openbravo.client.application.FilterExpression;
 import org.openbravo.client.kernel.RequestContext;
 import org.openbravo.dal.core.OBContext;
+
 import org.openbravo.erpCommon.utility.Utility;
 
+
 public class GLItemSelectorFilterExpression implements FilterExpression {
   final static String FINANCIAL_ACCOUNT_WINDOW = "94EAA455D2644E04AB25D93BE5157B6D";
 
@@ -37,6 +40,9 @@
     StringBuilder whereClause = new StringBuilder();
     String orgId = (String) RequestContext.get().getSession()
         .getAttribute(FINANCIAL_ACCOUNT_WINDOW + "|AD_ORG_ID");
+    if(StringUtils.isEmpty(orgId)) {
+    	orgId = requestMap.get("inpadOrgId");
+    }
     String orgList = Utility.getInStrSet(OBContext.getOBContext()
         .getOrganizationStructureProvider().getNaturalTree(orgId));
     if (!orgList.isEmpty()) {
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/ProcessInvoice.java	Thu Jan 21 09:06:30 2016 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/ProcessInvoice.java	Fri Jan 22 08:42:24 2016 +0000
@@ -44,10 +44,13 @@
 import org.openbravo.advpaymentmngt.process.FIN_PaymentProcess;
 import org.openbravo.advpaymentmngt.utility.FIN_Utility;
 import org.openbravo.base.filter.IsIDFilter;
+import org.openbravo.base.provider.OBProvider;
 import org.openbravo.base.secureApp.HttpSecureAppServlet;
 import org.openbravo.base.secureApp.VariablesSecureApp;
 import org.openbravo.base.session.OBPropertiesProvider;
 import org.openbravo.dal.core.OBContext;
+import org.openbravo.dal.security.OrganizationStructureProvider;
+import org.openbravo.dal.service.OBCriteria;
 import org.openbravo.dal.service.OBDal;
 import org.openbravo.dal.service.OBDao;
 import org.openbravo.data.FieldProvider;
@@ -66,8 +69,10 @@
 import org.openbravo.model.common.currency.ConversionRate;
 import org.openbravo.model.common.enterprise.DocumentType;
 import org.openbravo.model.common.invoice.Invoice;
+import org.openbravo.model.common.invoice.ReversedInvoice;
 import org.openbravo.model.financialmgmt.payment.FIN_FinancialAccount;
 import org.openbravo.model.financialmgmt.payment.FIN_Payment;
+import org.openbravo.model.financialmgmt.payment.FIN_PaymentDetail;
 import org.openbravo.model.financialmgmt.payment.FIN_PaymentDetailV;
 import org.openbravo.model.financialmgmt.payment.FIN_PaymentSchedule;
 import org.openbravo.model.financialmgmt.payment.FIN_PaymentScheduleDetail;
@@ -182,10 +187,10 @@
           OBContext.restorePreviousMode();
         }
 
+        Date voidDate = null;
+        Date voidAcctDate = null;
         Map<String, String> parameters = null;
         if (!strVoidInvoiceDate.isEmpty() && !strVoidInvoiceAcctDate.isEmpty()) {
-          Date voidDate = null;
-          Date voidAcctDate = null;
           try {
             voidDate = OBDateUtils.getDate(strVoidInvoiceDate);
             voidAcctDate = OBDateUtils.getDate(strVoidInvoiceAcctDate);
@@ -199,6 +204,107 @@
           parameters.put("voidedDocumentDate", OBDateUtils.formatDate(voidDate, "yyyy-MM-dd"));
           parameters.put("voidedDocumentAcctDate",
               OBDateUtils.formatDate(voidAcctDate, "yyyy-MM-dd"));
+
+        }
+
+        // In case of void a non paid invoice, create a dummy payment related to it with zero amount
+        FIN_Payment dummyPayment = null;
+        if ("RC".equals(strdocaction) && !invoice.isPaymentComplete()
+            && invoice.getTotalPaid().compareTo(BigDecimal.ZERO) == 0) {
+          try {
+            OBContext.setAdminMode(true);
+            final boolean isSOTrx = invoice.isSalesTransaction();
+            final DocumentType docType = FIN_Utility.getDocumentType(invoice.getOrganization(),
+                isSOTrx ? AcctServer.DOCTYPE_ARReceipt : AcctServer.DOCTYPE_APPayment);
+            final String strPaymentDocumentNo = FIN_Utility.getDocumentNo(docType,
+                docType.getTable() != null ? docType.getTable().getDBTableName() : "");
+            final OrganizationStructureProvider osp = OBContext.getOBContext()
+                .getOrganizationStructureProvider(invoice.getClient().getId());
+
+            // Get default Financial Account as it is done in Add Payment
+            FIN_FinancialAccount bpFinAccount = null;
+            if (isSOTrx
+                && invoice.getBusinessPartner().getAccount() != null
+                && FIN_Utility.getFinancialAccountPaymentMethod(invoice.getPaymentMethod().getId(),
+                    invoice.getBusinessPartner().getAccount().getId(), isSOTrx, invoice
+                        .getCurrency().getId()) != null
+                && osp.isInNaturalTree(invoice.getBusinessPartner().getAccount().getOrganization(),
+                    invoice.getOrganization())) {
+              bpFinAccount = invoice.getBusinessPartner().getAccount();
+            } else if (!isSOTrx
+                && invoice.getBusinessPartner().getPOFinancialAccount() != null
+                && FIN_Utility.getFinancialAccountPaymentMethod(invoice.getPaymentMethod().getId(),
+                    invoice.getBusinessPartner().getPOFinancialAccount().getId(), isSOTrx, invoice
+                        .getCurrency().getId()) != null
+                && osp.isInNaturalTree(invoice.getBusinessPartner().getPOFinancialAccount()
+                    .getOrganization(), invoice.getOrganization())) {
+              bpFinAccount = invoice.getBusinessPartner().getPOFinancialAccount();
+            } else {
+              FinAccPaymentMethod fpm = FIN_Utility.getFinancialAccountPaymentMethod(invoice
+                  .getPaymentMethod().getId(), null, isSOTrx, invoice.getCurrency().getId());
+              if (fpm != null
+                  && osp.isInNaturalTree(fpm.getAccount().getOrganization(),
+                      invoice.getOrganization())) {
+                bpFinAccount = fpm.getAccount();
+              }
+            }
+
+            // If no Financial Account exists, show an Error
+            if (bpFinAccount == null) {
+              msg = new OBError();
+              msg.setType("Error");
+              msg.setTitle(Utility.messageBD(this, "Error", vars.getLanguage()));
+              msg.setMessage(OBMessageUtils.messageBD("APRM_NoFinancialAccountAvailable"));
+              vars.setMessage(strTabId, msg);
+              printPageClosePopUp(response, vars, Utility.getTabURL(strTabId, "R", true));
+              return;
+            }
+
+            // Calculate Conversion Rate
+            Date date = voidDate != null ? voidDate : invoice.getInvoiceDate();
+            BigDecimal rate = null;
+            if (!StringUtils.equals(invoice.getCurrency().getId(), bpFinAccount.getCurrency()
+                .getId())) {
+              final ConversionRate conversionRate = FinancialUtils.getConversionRate(date,
+                  invoice.getCurrency(), bpFinAccount.getCurrency(), invoice.getOrganization(),
+                  invoice.getClient());
+              if (conversionRate != null) {
+                rate = conversionRate.getMultipleRateBy();
+              }
+            }
+
+            // Create dummy payment
+            dummyPayment = dao
+                .getNewPayment(isSOTrx, invoice.getOrganization(), docType, strPaymentDocumentNo,
+                    invoice.getBusinessPartner(), invoice.getPaymentMethod(), bpFinAccount, "0",
+                    date, invoice.getDocumentNo(), invoice.getCurrency(), rate, null);
+            OBDal.getInstance().save(dummyPayment);
+
+            List<FIN_PaymentDetail> paymentDetails = new ArrayList<FIN_PaymentDetail>();
+            List<FIN_PaymentScheduleDetail> paymentScheduleDetails = dao
+                .getInvoicePendingScheduledPaymentDetails(invoice);
+            for (FIN_PaymentScheduleDetail psd : paymentScheduleDetails) {
+              FIN_PaymentDetail pd = OBProvider.getInstance().get(FIN_PaymentDetail.class);
+              pd.setFinPayment(dummyPayment);
+              pd.setAmount(psd.getAmount());
+              pd.setRefund(false);
+              OBDal.getInstance().save(pd);
+
+              paymentDetails.add(pd);
+              psd.setPaymentDetails(pd);
+              pd.getFINPaymentScheduleDetailList().add(psd);
+              OBDal.getInstance().save(psd);
+            }
+            dummyPayment.setFINPaymentDetailList(paymentDetails);
+            OBDal.getInstance().save(dummyPayment);
+
+          } catch (final Exception e) {
+            log4j.error("Exception while creating dummy payment for the invoice: "
+                + strC_Invoice_ID);
+            e.printStackTrace();
+          } finally {
+            OBContext.restorePreviousMode();
+          }
         }
 
         final ProcessInstance pinstance = CallProcess.getInstance().call(process, strC_Invoice_ID,
@@ -206,6 +312,56 @@
 
         OBDal.getInstance().getSession().refresh(invoice);
         invoice.setAPRMProcessinvoice(invoice.getDocumentAction());
+
+        if ("RC".equals(strdocaction) && pinstance.getResult() != 0L) {
+          try {
+            OBContext.setAdminMode(true);
+
+            // Get reversed payment
+            OBCriteria<ReversedInvoice> revInvoiceCriteria = OBDal.getInstance().createCriteria(
+                ReversedInvoice.class);
+            revInvoiceCriteria.add(Restrictions.eq(ReversedInvoice.PROPERTY_REVERSEDINVOICE,
+                invoice));
+            revInvoiceCriteria.setMaxResults(1);
+            ReversedInvoice revInvoice = (ReversedInvoice) revInvoiceCriteria.uniqueResult();
+
+            if (revInvoice != null && dummyPayment != null) {
+
+              List<FIN_PaymentDetail> paymentDetails = new ArrayList<FIN_PaymentDetail>();
+              List<FIN_PaymentScheduleDetail> paymentScheduleDetails = dao
+                  .getInvoicePendingScheduledPaymentDetails(revInvoice.getInvoice());
+              for (FIN_PaymentScheduleDetail psd : paymentScheduleDetails) {
+                FIN_PaymentDetail pd = OBProvider.getInstance().get(FIN_PaymentDetail.class);
+                pd.setFinPayment(dummyPayment);
+                pd.setAmount(psd.getAmount());
+                pd.setRefund(false);
+                OBDal.getInstance().save(pd);
+
+                paymentDetails.add(pd);
+                psd.setPaymentDetails(pd);
+                pd.getFINPaymentScheduleDetailList().add(psd);
+                OBDal.getInstance().save(psd);
+              }
+              dummyPayment.getFINPaymentDetailList().addAll(paymentDetails);
+              OBDal.getInstance().save(dummyPayment);
+
+              // Process dummy payment related with both actual invoice and reversed invoice
+              OBError message = FIN_AddPayment.processPayment(vars, this, "P", dummyPayment);
+              if ("Error".equals(message.getType())) {
+                message.setMessage(OBMessageUtils.messageBD("PaymentError") + " "
+                    + message.getMessage());
+                vars.setMessage(strTabId, message);
+              }
+            }
+          } catch (final Exception e) {
+            log4j.error("Exception while creating dummy payment for the invoice: "
+                + strC_Invoice_ID);
+            e.printStackTrace();
+          } finally {
+            OBContext.restorePreviousMode();
+          }
+        }
+
         // Remove invoice's used credit description
         if ("RE".equals(strdocaction) && pinstance.getResult() != 0L) {
           final String invDesc = invoice.getDescription();
@@ -296,14 +452,20 @@
             // If the invoice grand total is ZERO or already has payments (due to
             // payment method automation) or the business partner does not have a default financial
             // account defined or invoice's payment method is not inside BP's financial
-            // account do not cancel credit
+            // account or the business partner's currency is not equal to the invoice's currency do
+            // not cancel credit
             if (BigDecimal.ZERO.compareTo(invoice.getGrandTotalAmount()) != 0
                 && isPaymentMethodConfigured(invoice)
                 && !isInvoiceWithPayments(invoice)
                 && (AcctServer.DOCTYPE_ARInvoice.equals(invoiceDocCategory) || AcctServer.DOCTYPE_APInvoice
-                    .equals(invoiceDocCategory))) {
-              creditPayments = dao.getCustomerPaymentsWithCredit(invoice.getOrganization(),
-                  invoice.getBusinessPartner(), invoice.isSalesTransaction());
+                    .equals(invoiceDocCategory))
+                && (invoice.getBusinessPartner().getCurrency() != null && StringUtils.equals(
+                    invoice.getCurrency().getId(), invoice.getBusinessPartner().getCurrency()
+                        .getId()))) {
+              creditPayments = dao
+                  .getCustomerPaymentsWithCredit(invoice.getOrganization(),
+                      invoice.getBusinessPartner(), invoice.isSalesTransaction(),
+                      invoice.getCurrency());
               if (creditPayments != null && !creditPayments.isEmpty()) {
                 printPageCreditPaymentGrid(response, vars, strC_Invoice_ID, strdocaction, strTabId,
                     strC_Invoice_ID, strdocaction, strWindowId, strTabId, invoice.getInvoiceDate(),
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/Reconciliation.java	Thu Jan 21 09:06:30 2016 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/Reconciliation.java	Fri Jan 22 08:42:24 2016 +0000
@@ -242,8 +242,9 @@
           return;
         }
 
-        boolean orgLegalWithAccounting = FIN_Utility.periodControlOpened(reconciliation.TABLE_NAME,
-            reconciliation.getId(), reconciliation.TABLE_NAME + "_ID", "LE");
+        boolean orgLegalWithAccounting = FIN_Utility.periodControlOpened(
+            FIN_Reconciliation.TABLE_NAME, reconciliation.getId(), FIN_Reconciliation.TABLE_NAME
+                + "_ID", "LE");
         boolean documentEnabled = getDocumentConfirmation(this, reconciliation.getId());
         if (documentEnabled
             && !FIN_Utility.isPeriodOpen(reconciliation.getClient().getId(),
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/dao/AdvPaymentMngtDao.java	Thu Jan 21 09:06:30 2016 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/dao/AdvPaymentMngtDao.java	Fri Jan 22 08:42:24 2016 +0000
@@ -1520,7 +1520,7 @@
     }
   }
 
-  private void addPaymentMethodList(OBCriteria obc, List<String> paymentMethods) {
+  private void addPaymentMethodList(OBCriteria<FIN_PaymentMethod> obc, List<String> paymentMethods) {
     List<String> paymentMethodsToRemove;
     Criterion compoundExp = null;
     while (paymentMethods.size() > 999) {
@@ -1895,8 +1895,14 @@
   }
 
   public BigDecimal getCustomerCredit(BusinessPartner bp, boolean isReceipt, Organization Org) {
+    return getCustomerCredit(bp, isReceipt, Org, null);
+  }
+
+  public BigDecimal getCustomerCredit(BusinessPartner bp, boolean isReceipt, Organization Org,
+      Currency currency) {
     BigDecimal creditAmount = BigDecimal.ZERO;
-    for (FIN_Payment payment : getCustomerPaymentsWithCredit(Org, bp, isReceipt))
+    List<FIN_Payment> paymentList = getCustomerPaymentsWithCredit(Org, bp, isReceipt, currency);
+    for (FIN_Payment payment : paymentList)
       creditAmount = creditAmount.add(payment.getGeneratedCredit()).subtract(
           payment.getUsedCredit());
     return creditAmount;
@@ -1923,6 +1929,15 @@
    */
   public List<FIN_Payment> getCustomerPaymentsWithCredit(Organization org, BusinessPartner bp,
       boolean isReceipt) {
+    return getCustomerPaymentsWithCredit(org, bp, isReceipt, null);
+  }
+
+  /**
+   * Returns the list of credit payments for the selected business partner that belongs to the legal
+   * entity's natural tree of the given organization
+   */
+  public List<FIN_Payment> getCustomerPaymentsWithCredit(Organization org, BusinessPartner bp,
+      boolean isReceipt, Currency currency) {
 
     try {
       OBContext.setAdminMode(true);
@@ -1936,6 +1951,9 @@
       Set<String> orgIds = OBContext.getOBContext().getOrganizationStructureProvider()
           .getChildTree(legalEntity.getId(), true);
       obcPayment.add(Restrictions.in("organization.id", orgIds));
+      if (currency != null) {
+        obcPayment.add(Restrictions.eq(FIN_Payment.PROPERTY_CURRENCY, currency));
+      }
       obcPayment.addOrderBy(FIN_Payment.PROPERTY_PAYMENTDATE, true);
       obcPayment.addOrderBy(FIN_Payment.PROPERTY_DOCUMENTNO, true);
 
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/dao/TransactionsDao.java	Thu Jan 21 09:06:30 2016 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/dao/TransactionsDao.java	Fri Jan 22 08:42:24 2016 +0000
@@ -109,11 +109,13 @@
       newTransaction.setStDimension(payment.getStDimension());
       newTransaction.setNdDimension(payment.getNdDimension());
       newTransaction.setCurrency(payment.getAccount().getCurrency());
-      newTransaction.setDescription(payment
-          .getDescription()
-          .replace("\n", ". ")
-          .substring(0,
-              payment.getDescription().length() > 254 ? 254 : payment.getDescription().length()));
+      String desc = "";
+      if(payment.getDescription()!=null && !payment.getDescription().isEmpty()){
+    	  desc = payment.getDescription()
+    	          .replace("\n", ". ")
+    	          .substring(0, payment.getDescription().length() > 254 ? 254 : payment.getDescription().length());
+      }
+      newTransaction.setDescription(desc);
       newTransaction.setClient(payment.getClient());
       newTransaction.setLineNo(getTransactionMaxLineNo(payment.getAccount()) + 10);
 
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/event/FIN_FinaccTransactionEventListener.java	Thu Jan 21 09:06:30 2016 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/event/FIN_FinaccTransactionEventListener.java	Fri Jan 22 08:42:24 2016 +0000
@@ -11,7 +11,7 @@
  * 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 portions are Copyright (C) 2014-2015 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  *************************************************************************
@@ -22,6 +22,7 @@
 import javax.enterprise.event.Observes;
 
 import org.apache.commons.lang.StringUtils;
+import org.apache.log4j.Logger;
 import org.openbravo.advpaymentmngt.utility.APRMConstants;
 import org.openbravo.base.exception.OBException;
 import org.openbravo.base.model.Entity;
@@ -38,6 +39,7 @@
 
   private static Entity[] entities = { ModelProvider.getInstance().getEntity(
       FIN_FinaccTransaction.ENTITY_NAME) };
+  protected Logger logger = Logger.getLogger(this.getClass());
 
   @Override
   protected Entity[] getObservedEntities() {
@@ -79,7 +81,8 @@
         .equals(transactionType, APRMConstants.TRXTYPE_BPWithdrawal))
         && glItem == null
         && payment == null) {
-      throw new OBException("@APRM_INVALID_TRANSACTION@");
+      logger.debug("@APRM_INVALID_TRANSACTION@");
+      throw new OBException("@APRM_INVALID_TRANSACTION@", false);
     }
   }
 }
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/event/FIN_PaymentEventListener.java	Thu Jan 21 09:06:30 2016 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/event/FIN_PaymentEventListener.java	Fri Jan 22 08:42:24 2016 +0000
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2012 Openbravo SLU
+ * All portions are Copyright (C) 2012-2015 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  *************************************************************************
@@ -22,17 +22,23 @@
 
 import javax.enterprise.event.Observes;
 
+import org.apache.commons.lang.StringUtils;
+import org.hibernate.Query;
+import org.openbravo.advpaymentmngt.dao.AdvPaymentMngtDao;
 import org.openbravo.base.exception.OBException;
 import org.openbravo.base.model.Entity;
 import org.openbravo.base.model.ModelProvider;
+import org.openbravo.base.model.Property;
 import org.openbravo.client.kernel.event.EntityDeleteEvent;
 import org.openbravo.client.kernel.event.EntityPersistenceEventObserver;
+import org.openbravo.client.kernel.event.EntityUpdateEvent;
 import org.openbravo.dal.core.OBContext;
 import org.openbravo.dal.service.OBDal;
 import org.openbravo.database.ConnectionProvider;
 import org.openbravo.erpCommon.utility.Utility;
 import org.openbravo.model.financialmgmt.payment.FIN_Payment;
 import org.openbravo.model.financialmgmt.payment.FIN_PaymentDetail;
+import org.openbravo.model.financialmgmt.payment.PaymentExecutionProcess;
 import org.openbravo.service.db.DalConnectionProvider;
 
 public class FIN_PaymentEventListener extends EntityPersistenceEventObserver {
@@ -44,8 +50,15 @@
     return entities;
   }
 
-  public void onDelete(@Observes
-  EntityDeleteEvent event) {
+  public void onUpdate(@Observes EntityUpdateEvent event) {
+    if (!isValidEvent(event)) {
+      return;
+    }
+
+    manageAPRMPendingPaymentFromInvoiceRecord(event);
+  }
+
+  public void onDelete(@Observes EntityDeleteEvent event) {
     if (!isValidEvent(event)) {
       return;
     }
@@ -57,4 +70,99 @@
       throw new OBException(Utility.messageBD(conn, "ForeignKeyViolation", language));
     }
   }
+
+  /**
+   * Manages the APRMPendingPaymentFromInvoice record linked to the payment:
+   * 
+   * If the current payment status is Awaiting Execution, it updates the Payment Execution Process
+   * Id of the APRMPendingPaymentFromInvoice record to point to the current Payment Execution
+   * Process Id. If the current Payment Execution Process Id is null (because, for example, the
+   * payment is associated to another payment method without payment process), then we delete the
+   * APRMPendingPaymentFromInvoice record.
+   * 
+   * The APRMPendingPaymentFromInvoice record is also deleted when the payment status has evolved
+   * from Awaiting Execution to Awaiting Payment or Voided (i.e. a reactivation has taken place).
+   * This way the behavior is exactly the same as when creating a manual payment in awaiting
+   * execution.
+   * 
+   * Returns the number of records updated or deleted (0 or 1)
+   * 
+   */
+  private int manageAPRMPendingPaymentFromInvoiceRecord(final EntityUpdateEvent event) {
+    try {
+      OBContext.setAdminMode(true);
+
+      int rowCount = 0;
+
+      final FIN_Payment payment = (FIN_Payment) event.getTargetInstance();
+      final Entity paymentEntity = ModelProvider.getInstance().getEntity(FIN_Payment.ENTITY_NAME);
+      final Property paymentStatusProperty = paymentEntity.getProperty(FIN_Payment.PROPERTY_STATUS);
+      final String currentPaymentStatus = (String) event.getCurrentState(paymentStatusProperty);
+      final String oldPaymentStatus = (String) event.getPreviousState(paymentStatusProperty);
+
+      if (StringUtils.equals("RPAE", currentPaymentStatus)) {
+        final PaymentExecutionProcess executionProcess = new AdvPaymentMngtDao()
+            .getExecutionProcess(payment);
+        if (executionProcess == null) {
+          rowCount = deleteAPRMPendingPaymentFromInvoiceRecord(payment);
+        } else {
+          rowCount = updateAPRMPendingPaymentFromInvoiceRecord(payment, executionProcess);
+        }
+      } else if (StringUtils.equals("RPAE", oldPaymentStatus)
+          && (StringUtils.equals(currentPaymentStatus, "RPAP") || StringUtils.equals(
+              currentPaymentStatus, "RPVOID"))) {
+        rowCount = deleteAPRMPendingPaymentFromInvoiceRecord(payment);
+      }
+
+      return rowCount;
+    } finally {
+      OBContext.restorePreviousMode();
+    }
+  }
+
+  /**
+   * Updates the APRMPendingPaymentFromInvoice record setting the given Payment Execution Process Id
+   * 
+   * Returns the number of records updated (0 or 1)
+   */
+  private int updateAPRMPendingPaymentFromInvoiceRecord(final FIN_Payment payment,
+      final PaymentExecutionProcess executionProcess) {
+    if (executionProcess == null || payment == null) {
+      return 0;
+    }
+
+    int rowCount;
+    final StringBuffer hql = new StringBuffer();
+    hql.append("update APRM_PendingPaymentInvoice ");
+    hql.append("set paymentExecutionProcess.id = :paymentExecutionProcessId ");
+    hql.append("where paymentExecutionProcess.id <> :paymentExecutionProcessId ");
+    hql.append("and payment.id = :paymentId ");
+
+    Query updateQry = OBDal.getInstance().getSession().createQuery(hql.toString());
+    updateQry.setString("paymentExecutionProcessId", executionProcess.getId());
+    updateQry.setString("paymentId", payment.getId());
+    rowCount = updateQry.executeUpdate();
+    return rowCount;
+  }
+
+  /**
+   * Updates the APRMPendingPaymentFromInvoice record linked to the given payment
+   * 
+   * Returns the number of records deleted (0 or 1)
+   */
+  private int deleteAPRMPendingPaymentFromInvoiceRecord(final FIN_Payment payment) {
+    if (payment == null) {
+      return 0;
+    }
+
+    int rowCount;
+    final StringBuffer hql = new StringBuffer();
+    hql.append("delete from APRM_PendingPaymentInvoice ");
+    hql.append("where payment.id = :paymentId ");
+
+    Query updateQry = OBDal.getInstance().getSession().createQuery(hql.toString());
+    updateQry.setString("paymentId", payment.getId());
+    rowCount = updateQry.executeUpdate();
+    return rowCount;
+  }
 }
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/AddPaymentDefaultValuesHandler.java	Thu Jan 21 09:06:30 2016 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/AddPaymentDefaultValuesHandler.java	Fri Jan 22 08:42:24 2016 +0000
@@ -27,18 +27,15 @@
 import org.apache.commons.lang.StringUtils;
 import org.codehaus.jettison.json.JSONException;
 import org.codehaus.jettison.json.JSONObject;
-import org.hibernate.criterion.Restrictions;
 import org.openbravo.advpaymentmngt.dao.AdvPaymentMngtDao;
 import org.openbravo.advpaymentmngt.utility.FIN_Utility;
 import org.openbravo.dal.core.OBContext;
 import org.openbravo.dal.security.OrganizationStructureProvider;
-import org.openbravo.dal.service.OBCriteria;
 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_FinancialAccount;
 import org.openbravo.model.financialmgmt.payment.FIN_Payment;
-import org.openbravo.model.financialmgmt.payment.FIN_PaymentMethod;
 import org.openbravo.model.financialmgmt.payment.FIN_PaymentSchedule;
 import org.openbravo.model.financialmgmt.payment.FIN_PaymentScheduleDetail;
 import org.openbravo.model.financialmgmt.payment.FinAccPaymentMethod;
@@ -283,6 +280,12 @@
       return context.getString("Fin_Financial_Account_ID");
     }
 
+    String currencyId = null;
+    if (context.has("inpcCurrencyId") && context.get("inpcCurrencyId") != JSONObject.NULL
+        && StringUtils.isNotEmpty(context.getString("inpcCurrencyId"))) {
+      currencyId = (String) context.get("inpcCurrencyId");
+    }
+
     String paymentMethodId = getDefaultPaymentMethod(requestMap);
     if (StringUtils.isNotEmpty(paymentMethodId) && context.has("inpadClientId")
         && context.has("inpadOrgId")) {
@@ -290,32 +293,30 @@
       final OrganizationStructureProvider osp = OBContext.getOBContext()
           .getOrganizationStructureProvider(context.getString("inpadClientId"));
       String strBPartnerId = getDefaultReceivedFrom(requestMap);
+      boolean isSOTrx = "Y".equals(getDefaultIsSOTrx(requestMap));
       if (StringUtils.isNotEmpty(strBPartnerId)) {
 
         BusinessPartner businessPartner = OBDal.getInstance().get(BusinessPartner.class,
             strBPartnerId);
-        boolean isSOTrx = "Y".equals(getDefaultIsSOTrx(requestMap));
-
         if (isSOTrx
             && businessPartner.getAccount() != null
-            && getFinancialAccountPaymentMethod(paymentMethodId, businessPartner.getAccount()
-                .getId()) != null
+            && FIN_Utility.getFinancialAccountPaymentMethod(paymentMethodId, businessPartner
+                .getAccount().getId(), isSOTrx, currencyId) != null
             && osp.isInNaturalTree(businessPartner.getAccount().getOrganization(), OBDal
                 .getInstance().get(Organization.class, context.getString("inpadOrgId")))) {
           return businessPartner.getAccount().getId();
-        }
-
-        else if (!isSOTrx
+        } else if (!isSOTrx
             && businessPartner.getPOFinancialAccount() != null
-            && getFinancialAccountPaymentMethod(paymentMethodId, businessPartner
-                .getPOFinancialAccount().getId()) != null
+            && FIN_Utility.getFinancialAccountPaymentMethod(paymentMethodId, businessPartner
+                .getPOFinancialAccount().getId(), isSOTrx, currencyId) != null
             && osp.isInNaturalTree(businessPartner.getPOFinancialAccount().getOrganization(), OBDal
                 .getInstance().get(Organization.class, context.getString("inpadOrgId")))) {
           return businessPartner.getPOFinancialAccount().getId();
         }
       }
 
-      FinAccPaymentMethod fpm = getFinancialAccountPaymentMethod(paymentMethodId, null);
+      FinAccPaymentMethod fpm = FIN_Utility.getFinancialAccountPaymentMethod(paymentMethodId, null,
+          isSOTrx, currencyId);
       if (fpm != null
           && osp.isInNaturalTree(fpm.getAccount().getOrganization(),
               OBDal.getInstance().get(Organization.class, context.getString("inpadOrgId")))) {
@@ -364,9 +365,11 @@
       strFinPaymentMethodId = context.getString("inpfinPaymentmethodId");
     }
 
+    boolean isSOTrx = "Y".equals(getDefaultIsSOTrx(requestMap));
     strFinancialAccountId = getContextFinancialAccount(requestMap);
     if (strFinPaymentMethodId != null
-        && getFinancialAccountPaymentMethod(strFinPaymentMethodId, strFinancialAccountId) != null) {
+        && FIN_Utility.getFinancialAccountPaymentMethod(strFinPaymentMethodId,
+            strFinancialAccountId, isSOTrx, null) != null) {
       return strFinPaymentMethodId;
     }
 
@@ -378,12 +381,11 @@
           .getOrganizationStructureProvider(context.getString("inpadClientId"));
       BusinessPartner businessPartner = OBDal.getInstance().get(BusinessPartner.class,
           strBPartnerId);
-      boolean isSOTrx = "Y".equals(getDefaultIsSOTrx(requestMap));
 
       if (isSOTrx
           && businessPartner.getPaymentMethod() != null
-          && getFinancialAccountPaymentMethod(businessPartner.getPaymentMethod().getId(),
-              strFinancialAccountId) != null
+          && FIN_Utility.getFinancialAccountPaymentMethod(businessPartner.getPaymentMethod()
+              .getId(), strFinancialAccountId, isSOTrx, null) != null
           && osp.isInNaturalTree(businessPartner.getPaymentMethod().getOrganization(), OBDal
               .getInstance().get(Organization.class, context.getString("inpadOrgId")))) {
         return businessPartner.getPaymentMethod().getId();
@@ -391,8 +393,8 @@
 
       else if (!isSOTrx
           && businessPartner.getPOPaymentMethod() != null
-          && getFinancialAccountPaymentMethod(businessPartner.getPOPaymentMethod().getId(),
-              strFinancialAccountId) != null
+          && FIN_Utility.getFinancialAccountPaymentMethod(businessPartner.getPOPaymentMethod()
+              .getId(), strFinancialAccountId, isSOTrx, null) != null
           && osp.isInNaturalTree(businessPartner.getPOPaymentMethod().getOrganization(), OBDal
               .getInstance().get(Organization.class, context.getString("inpadOrgId")))) {
         return businessPartner.getPOPaymentMethod().getId();
@@ -465,20 +467,4 @@
       return null;
     }
   }
-
-  private FinAccPaymentMethod getFinancialAccountPaymentMethod(String paymentMethodId,
-      String financialAccountId) {
-    OBCriteria<FinAccPaymentMethod> obc = OBDal.getInstance().createCriteria(
-        FinAccPaymentMethod.class);
-    obc.setFilterOnReadableOrganization(false);
-    obc.setMaxResults(1);
-    if (!StringUtils.isEmpty(financialAccountId)) {
-      obc.add(Restrictions.eq(FinAccPaymentMethod.PROPERTY_ACCOUNT,
-          OBDal.getInstance().get(FIN_FinancialAccount.class, financialAccountId)));
-    }
-    obc.add(Restrictions.eq(FinAccPaymentMethod.PROPERTY_PAYMENTMETHOD,
-        OBDal.getInstance().get(FIN_PaymentMethod.class, paymentMethodId)));
-    return (FinAccPaymentMethod) obc.uniqueResult();
-  }
-
 }
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/PaymentInAddPaymentDisplayLogics.java	Thu Jan 21 09:06:30 2016 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/PaymentInAddPaymentDisplayLogics.java	Fri Jan 22 08:42:24 2016 +0000
@@ -11,7 +11,7 @@
  * 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 portions are Copyright (C) 2014-2015 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -28,6 +28,7 @@
 import org.openbravo.client.kernel.ComponentProvider;
 import org.openbravo.dal.service.OBDal;
 import org.openbravo.model.common.businesspartner.BusinessPartner;
+import org.openbravo.model.common.currency.Currency;
 import org.openbravo.model.common.enterprise.Organization;
 import org.openbravo.model.financialmgmt.payment.FIN_Payment;
 
@@ -59,7 +60,9 @@
     BusinessPartner bpartner = paymentIn.getBusinessPartner();
     if (bpartner != null) {
       Organization org = paymentIn.getOrganization();
-      BigDecimal customerCredit = new AdvPaymentMngtDao().getCustomerCredit(bpartner, true, org);
+      Currency currency = paymentIn.getCurrency();
+      BigDecimal customerCredit = new AdvPaymentMngtDao().getCustomerCredit(bpartner, true, org,
+          currency);
       return customerCredit.signum() > 0;
     } else {
       return false;
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/PaymentOutAddPaymentDisplayLogics.java	Thu Jan 21 09:06:30 2016 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/PaymentOutAddPaymentDisplayLogics.java	Fri Jan 22 08:42:24 2016 +0000
@@ -11,7 +11,7 @@
  * 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 portions are Copyright (C) 2014-2015 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -28,6 +28,7 @@
 import org.openbravo.client.kernel.ComponentProvider;
 import org.openbravo.dal.service.OBDal;
 import org.openbravo.model.common.businesspartner.BusinessPartner;
+import org.openbravo.model.common.currency.Currency;
 import org.openbravo.model.common.enterprise.Organization;
 import org.openbravo.model.financialmgmt.payment.FIN_Payment;
 
@@ -59,7 +60,9 @@
       BusinessPartner bpartner = paymentOut.getBusinessPartner();
       if (bpartner != null) {
         Organization org = paymentOut.getOrganization();
-        BigDecimal customerCredit = new AdvPaymentMngtDao().getCustomerCredit(bpartner, false, org);
+        Currency currency = paymentOut.getCurrency();
+        BigDecimal customerCredit = new AdvPaymentMngtDao().getCustomerCredit(bpartner, false, org,
+            currency);
         return customerCredit.signum() > 0;
       } else {
         return false;
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/PurchaseInvoiceAddPaymentDisplayLogics.java	Thu Jan 21 09:06:30 2016 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/PurchaseInvoiceAddPaymentDisplayLogics.java	Fri Jan 22 08:42:24 2016 +0000
@@ -11,7 +11,7 @@
  * 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 portions are Copyright (C) 2014-2015 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -28,6 +28,7 @@
 import org.openbravo.client.kernel.ComponentProvider;
 import org.openbravo.dal.service.OBDal;
 import org.openbravo.model.common.businesspartner.BusinessPartner;
+import org.openbravo.model.common.currency.Currency;
 import org.openbravo.model.common.enterprise.Organization;
 import org.openbravo.model.common.invoice.Invoice;
 
@@ -60,7 +61,9 @@
       BusinessPartner bpartner = invoice.getBusinessPartner();
       if (bpartner != null) {
         Organization org = invoice.getOrganization();
-        BigDecimal customerCredit = new AdvPaymentMngtDao().getCustomerCredit(bpartner, false, org);
+        Currency currency = invoice.getCurrency();
+        BigDecimal customerCredit = new AdvPaymentMngtDao().getCustomerCredit(bpartner, false, org,
+            currency);
         return customerCredit.signum() > 0;
       } else {
         return false;
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/PurchaseOrderAddPaymentDisplayLogics.java	Thu Jan 21 09:06:30 2016 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/PurchaseOrderAddPaymentDisplayLogics.java	Fri Jan 22 08:42:24 2016 +0000
@@ -11,7 +11,7 @@
  * 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 portions are Copyright (C) 2014-2015 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -28,6 +28,7 @@
 import org.openbravo.client.kernel.ComponentProvider;
 import org.openbravo.dal.service.OBDal;
 import org.openbravo.model.common.businesspartner.BusinessPartner;
+import org.openbravo.model.common.currency.Currency;
 import org.openbravo.model.common.enterprise.Organization;
 import org.openbravo.model.common.order.Order;
 
@@ -60,7 +61,9 @@
       BusinessPartner bpartner = order.getBusinessPartner();
       if (bpartner != null) {
         Organization org = order.getOrganization();
-        BigDecimal customerCredit = new AdvPaymentMngtDao().getCustomerCredit(bpartner, false, org);
+        Currency currency = order.getCurrency();
+        BigDecimal customerCredit = new AdvPaymentMngtDao().getCustomerCredit(bpartner, false, org,
+            currency);
         return (customerCredit.signum() > 0);
       } else {
         return false;
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/SalesInvoiceAddPaymentDisplayLogics.java	Thu Jan 21 09:06:30 2016 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/SalesInvoiceAddPaymentDisplayLogics.java	Fri Jan 22 08:42:24 2016 +0000
@@ -11,7 +11,7 @@
  * 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 portions are Copyright (C) 2014-2015 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -28,6 +28,7 @@
 import org.openbravo.client.kernel.ComponentProvider;
 import org.openbravo.dal.service.OBDal;
 import org.openbravo.model.common.businesspartner.BusinessPartner;
+import org.openbravo.model.common.currency.Currency;
 import org.openbravo.model.common.enterprise.Organization;
 import org.openbravo.model.common.invoice.Invoice;
 
@@ -59,7 +60,9 @@
     BusinessPartner bpartner = invoice.getBusinessPartner();
     if (bpartner != null) {
       Organization org = invoice.getOrganization();
-      BigDecimal customerCredit = new AdvPaymentMngtDao().getCustomerCredit(bpartner, true, org);
+      Currency currency = invoice.getCurrency();
+      BigDecimal customerCredit = new AdvPaymentMngtDao().getCustomerCredit(bpartner, true, org,
+          currency);
       return customerCredit.signum() > 0;
     } else {
       return false;
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/SalesOrderAddPaymentDisplayLogics.java	Thu Jan 21 09:06:30 2016 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/SalesOrderAddPaymentDisplayLogics.java	Fri Jan 22 08:42:24 2016 +0000
@@ -11,7 +11,7 @@
  * 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 portions are Copyright (C) 2014-2015 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -28,6 +28,7 @@
 import org.openbravo.client.kernel.ComponentProvider;
 import org.openbravo.dal.service.OBDal;
 import org.openbravo.model.common.businesspartner.BusinessPartner;
+import org.openbravo.model.common.currency.Currency;
 import org.openbravo.model.common.enterprise.Organization;
 import org.openbravo.model.common.order.Order;
 
@@ -60,7 +61,9 @@
     BusinessPartner bpartner = order.getBusinessPartner();
     if (bpartner != null) {
       Organization org = order.getOrganization();
-      BigDecimal customerCredit = new AdvPaymentMngtDao().getCustomerCredit(bpartner, true, org);
+      Currency currency = order.getCurrency();
+      BigDecimal customerCredit = new AdvPaymentMngtDao().getCustomerCredit(bpartner, true, org,
+          currency);
       return customerCredit.signum() > 0;
     } else {
       return false;
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/TransactionAddPaymentDefaultValues.java	Thu Jan 21 09:06:30 2016 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/TransactionAddPaymentDefaultValues.java	Fri Jan 22 08:42:24 2016 +0000
@@ -20,7 +20,6 @@
 
 import java.math.BigDecimal;
 import java.text.ParseException;
-import java.text.SimpleDateFormat;
 import java.util.Date;
 import java.util.Map;
 
@@ -222,8 +221,7 @@
         strTransactionDate = context.getString("inpstatementdate");
       }
       if (strTransactionDate != null) {
-
-        Date date = new SimpleDateFormat("dd-MM-yyyy").parse(strTransactionDate);
+        Date date = OBDateUtils.getDate(strTransactionDate);
         return OBDateUtils.formatDate(date);
       } else {
         return OBDateUtils.formatDate(new Date());
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/TransactionAddPaymentDisplayLogics.java	Thu Jan 21 09:06:30 2016 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/TransactionAddPaymentDisplayLogics.java	Fri Jan 22 08:42:24 2016 +0000
@@ -28,6 +28,7 @@
 import org.openbravo.client.kernel.ComponentProvider;
 import org.openbravo.dal.service.OBDal;
 import org.openbravo.model.common.businesspartner.BusinessPartner;
+import org.openbravo.model.common.currency.Currency;
 import org.openbravo.model.common.enterprise.Organization;
 import org.openbravo.model.financialmgmt.payment.FIN_FinaccTransaction;
 
@@ -67,8 +68,9 @@
         BusinessPartner bpartner = OBDal.getInstance().get(BusinessPartner.class,
             strBusinessPartner);
         Organization org = OBDal.getInstance().get(Organization.class, context.get("ad_org_id"));
+        Currency currency = OBDal.getInstance().get(Currency.class, context.get("c_currency_id"));
         BigDecimal customerCredit = new AdvPaymentMngtDao().getCustomerCredit(bpartner,
-            "RCIN".equals(document), org);
+            "RCIN".equals(document), org, currency);
         return customerCredit.signum() > 0;
       } else {
         return false;
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/hqlinjections/CreditToUseTransformer.java	Thu Jan 21 09:06:30 2016 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/hqlinjections/CreditToUseTransformer.java	Fri Jan 22 08:42:24 2016 +0000
@@ -36,11 +36,16 @@
     transformedHQL = transformedHQL.replace("@whereClause@",
         getWhereClause(requestParameters, queryNamedParameters));
 
+    // Sets parameters
+    queryNamedParameters.put("currencyId", requestParameters.get("c_currency_id"));
+
     return transformedHQL;
   }
 
   private CharSequence getWhereClause(Map<String, String> requestParameters,
       Map<String, Object> queryNamedParameters) {
-    return " ";
+    StringBuffer whereClause = new StringBuffer();
+    whereClause.append(" and f.currency.id = :currencyId ");
+    return whereClause;
   }
 }
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/ExecutePendingPayments.java	Thu Jan 21 09:06:30 2016 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/ExecutePendingPayments.java	Fri Jan 22 08:42:24 2016 +0000
@@ -1,3 +1,21 @@
+/*
+ *************************************************************************
+ * 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) 2010-2015 Openbravo SLU
+ * All Rights Reserved.
+ * Contributor(s):  ______________________________________.
+ *************************************************************************
+ */
 package org.openbravo.advpaymentmngt.process;
 
 import java.util.ArrayList;
@@ -7,6 +25,7 @@
 import org.openbravo.advpaymentmngt.dao.AdvPaymentMngtDao;
 import org.openbravo.base.secureApp.VariablesSecureApp;
 import org.openbravo.dal.core.OBContext;
+import org.openbravo.dal.service.OBDal;
 import org.openbravo.erpCommon.utility.OBError;
 import org.openbravo.erpCommon.utility.Utility;
 import org.openbravo.model.common.enterprise.Organization;
@@ -36,9 +55,13 @@
       List<APRMPendingPaymentFromInvoice> pendingPayments = dao.getPendingPayments();
       List<FIN_Payment> payments = new ArrayList<FIN_Payment>();
       // If there are no pending payments to process, return and skip this process.
-      if (pendingPayments.size() == 0) {
+      if (pendingPayments.isEmpty()) {
         return;
       }
+      // FIXME: this code is not properly written and it's impossible to understand.
+      // The comparations of objects are wrong (!=), probably they are always false in runtime.
+      // The first time we iterate the for, the executionProcess is null, so it won't enter the if.
+      // Is it right?
       try {
         for (APRMPendingPaymentFromInvoice pendingPayment : pendingPayments) {
           if (executionProcess != null
@@ -58,8 +81,12 @@
           }
           executionProcess = pendingPayment.getPaymentExecutionProcess();
           organization = pendingPayment.getOrganization();
-          payments.add(pendingPayment.getPayment());
-
+          FIN_Payment payment = pendingPayment.getPayment();
+          if (payment.getStatus().equals("RPAE")) {
+            payments.add(pendingPayment.getPayment());
+          } else {
+            OBDal.getInstance().remove(pendingPayment);
+          }
         }
         logger.logln(executionProcess.getIdentifier());
         if (dao.isAutomaticExecutionProcess(executionProcess)) {
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_AddPaymentFromJournal.java	Thu Jan 21 09:06:30 2016 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_AddPaymentFromJournal.java	Fri Jan 22 08:42:24 2016 +0000
@@ -19,9 +19,7 @@
 
 package org.openbravo.advpaymentmngt.process;
 
-import java.text.SimpleDateFormat;
 import java.util.ArrayList;
-import java.util.Date;
 import java.util.HashMap;
 import java.util.List;
 
@@ -29,7 +27,6 @@
 
 import org.openbravo.base.exception.OBException;
 import org.openbravo.base.secureApp.VariablesSecureApp;
-import org.openbravo.base.session.OBPropertiesProvider;
 import org.openbravo.client.kernel.RequestContext;
 import org.openbravo.dal.core.OBContext;
 import org.openbravo.dal.service.OBDal;
@@ -48,10 +45,6 @@
   protected void doExecute(ProcessBundle bundle) throws Exception {
     int cont = 0;
 
-    String dateFormatString = OBPropertiesProvider.getInstance().getOpenbravoProperties()
-        .getProperty("dateFormat.java");
-    SimpleDateFormat dateFormat = new SimpleDateFormat(dateFormatString);
-
     // Recover context and variables
     ConnectionProvider conn = bundle.getConnection();
     VariablesSecureApp varsAux = bundle.getContext().toVars();
@@ -86,11 +79,6 @@
           }
         }
       }
-      if (!"".equals(relatedPayments)) {
-        relatedPayments = relatedPayments.substring(0, relatedPayments.length() - 2);
-        throw new OBException("@FIN_JournalLineRelatedPayments@: " + relatedPayments);
-      }
-
       try {
         // Call GL_Journal_Post method from the database.
         final List<Object> parameters = new ArrayList<Object>();
@@ -107,7 +95,6 @@
       }
 
       OBDal.getInstance().refresh(journal);
-      Date date = journal.getDocumentDate();
 
       // Complete the Journal
       if ("CO".equals(docAction)) {
@@ -146,6 +133,13 @@
       if (cont > 0) {
         msg.setMessage(" @FIN_NumberOfPayments@: " + cont);
       }
+      if (!"".equals(relatedPayments) && "RE".equals(docAction)) {
+        relatedPayments = relatedPayments.substring(0, relatedPayments.length() - 2);
+        msg.setType("Warning");
+        msg.setTitle("@Success@");
+        msg.setMessage("@Warning@: @FIN_JournalLineRelatedPayments@: " + relatedPayments
+            + ". @ModifyGLJournalLine@");
+      }
       bundle.setResult(msg);
       OBDal.getInstance().commitAndClose();
     } catch (final OBException e) {
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_PaymentProcess.java	Thu Jan 21 09:06:30 2016 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_PaymentProcess.java	Fri Jan 22 08:42:24 2016 +0000
@@ -29,6 +29,7 @@
 import java.util.Set;
 import java.util.TreeSet;
 
+import org.apache.commons.lang.StringUtils;
 import org.hibernate.criterion.Restrictions;
 import org.openbravo.advpaymentmngt.dao.AdvPaymentMngtDao;
 import org.openbravo.advpaymentmngt.dao.TransactionsDao;
@@ -216,7 +217,8 @@
           // Show error message when payment has no lines
           if (paymentDetails.size() == 0) {
             msg = OBMessageUtils.messageBD("APRM_PaymentNoLines");
-            throw new OBException(msg);
+            log4j.debug(msg);
+            throw new OBException(msg, false);
           }
           for (FIN_PaymentDetail paymentDetail : paymentDetails) {
             for (FIN_PaymentScheduleDetail paymentScheduleDetail : paymentDetail
@@ -877,7 +879,12 @@
               OBDal.getInstance().getSession().refresh(paymentDetail);
             }
             // If there is any schedule detail with amount zero, those are deleted
+            // Besides it removes the payment proposal lines linked to the PSD when
+            // a) we are removing the PSD and
+            // b) if we are reactivating a payment (deleting lines only) and we don't come from
+            // payment proposal reactivation process
             for (FIN_PaymentScheduleDetail psd : removedPDS) {
+              int proposalLinesRemoved = 0;
               if (BigDecimal.ZERO.compareTo(psd.getAmount()) == 0
                   && BigDecimal.ZERO.compareTo(psd.getWriteoffAmount()) == 0) {
                 paymentDetail.getFINPaymentScheduleDetailList().remove(psd);
@@ -890,8 +897,22 @@
                   psd.getOrderPaymentSchedule()
                       .getFINPaymentScheduleDetailOrderPaymentScheduleList().remove(psd);
                 }
+
+                // Before deleting the PSD, we must delete any payment proposal line linked to it
+                proposalLinesRemoved = removePaymentProposalLines(psd);
+
                 OBDal.getInstance().remove(psd);
               }
+
+              // Delete any payment proposal line linked to the PSD if we are reactivating a payment
+              // (deleting lines only), we haven't removed it in a previous step and we don't come
+              // from payment proposal reactivation process
+              if (strAction.equals("R")
+                  && proposalLinesRemoved == 0
+                  && !StringUtils.equals(comingFrom,
+                      FIN_PaymentProposalProcess.COMINGFROM_PAYMENTPROPOSALPROCESS)) {
+                removePaymentProposalLines(psd);
+              }
             }
             if (paymentDetail.getFINPaymentScheduleDetailList().size() == 0) {
               removedPD.add(paymentDetail);
@@ -955,20 +976,6 @@
           }
           if (strAction.equals("R")) {
             payment.setUsedCredit(BigDecimal.ZERO);
-            for (FIN_PaymentScheduleDetail psd : removedPDS) {
-              List<FIN_PaymentPropDetail> ppds = psd.getFINPaymentPropDetailList();
-              if (ppds.size() > 0) {
-                for (FIN_PaymentPropDetail ppd : ppds) {
-                  FIN_PaymentProposal paymentProposal = OBDal.getInstance().get(
-                      FIN_PaymentProposal.class, ppd.getFinPaymentProposal().getId());
-                  paymentProposal.setProcessed(false);
-                  OBDal.getInstance().save(paymentProposal);
-                  OBDal.getInstance().remove(ppd);
-                  OBDal.getInstance().flush();
-                  paymentProposal.setProcessed(true);
-                }
-              }
-            }
           }
         } finally {
           OBDal.getInstance().flush();
@@ -1408,4 +1415,37 @@
     return exchangeRate;
   }
 
+  /**
+   * Removes the Payment Proposal Lines linked to the Payment Schedule Detail. If the payment
+   * proposal is already processed, the record is unprocessed first, then affected lines are
+   * deleted, and finally it gets back to processed status. This is done to avoid trigger validation
+   * errors.
+   * 
+   * A common scenario where you want to delete a payment proposal line is when the payment schedule
+   * detail has been deleted
+   * 
+   * @param psd
+   *          Payment Schedule Detail
+   * @return number of Payment Proposal Lines removed
+   */
+  public static int removePaymentProposalLines(FIN_PaymentScheduleDetail psd) {
+    int proposalLinesRemoved = 0;
+    for (FIN_PaymentPropDetail ppd : psd.getFINPaymentPropDetailList()) {
+      final FIN_PaymentProposal paymentProposal = ppd.getFinPaymentProposal();
+      if (paymentProposal.isProcessed()) {
+        // Hack to delete Payment Proposal lines when you reactivate a payment linked to
+        // a processed payment proposal.
+        paymentProposal.setProcessed(false);
+        OBDal.getInstance().save(paymentProposal);
+        OBDal.getInstance().remove(ppd);
+        OBDal.getInstance().flush();
+        paymentProposal.setProcessed(true);
+      } else {
+        OBDal.getInstance().remove(ppd);
+      }
+      proposalLinesRemoved++;
+    }
+    return proposalLinesRemoved;
+  }
+
 }
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_PaymentProposalProcess.java	Thu Jan 21 09:06:30 2016 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_PaymentProposalProcess.java	Fri Jan 22 08:42:24 2016 +0000
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2010-2013 Openbravo SLU
+ * All portions are Copyright (C) 2010-2015 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  *************************************************************************
@@ -51,6 +51,8 @@
 public class FIN_PaymentProposalProcess implements org.openbravo.scheduling.Process {
   private static AdvPaymentMngtDao dao;
 
+  public static final String COMINGFROM_PAYMENTPROPOSALPROCESS = "PAYMENT_PROPOSAL";
+
   @Override
   public void execute(ProcessBundle bundle) throws Exception {
     final Logger log4j = Logger.getLogger(this.getClass());
@@ -231,11 +233,13 @@
 
       } else if (strAction.equals("RE")) { // REACTIVATE
         paymentProposal.setProcessNow(true);
+        paymentProposal.setProcessed(false); // Needed to set it here: used by processPayment()
 
         List<String> paymentIdList = FIN_AddPayment.getPaymentFromPaymentProposal(paymentProposal);
         for (String id : paymentIdList) {
           FIN_Payment payment = OBDal.getInstance().get(FIN_Payment.class, id);
-          message = FIN_AddPayment.processPayment(vars, conProvider, "R", payment);
+          message = FIN_AddPayment.processPayment(vars, conProvider, "R", payment,
+              COMINGFROM_PAYMENTPROPOSALPROCESS);
           if (message.getType().equals("Error")) {
             bundle.setResult(message);
             return;
@@ -247,7 +251,6 @@
           OBDal.getInstance().remove(OBDal.getInstance().get(FIN_Payment.class, id));
         }
         paymentProposal.setStatus("RPAP");
-        paymentProposal.setProcessed(false);
         paymentProposal.setAPRMProcessProposal("G");
       }
 
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_ReconciliationProcess.java	Thu Jan 21 09:06:30 2016 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_ReconciliationProcess.java	Fri Jan 22 08:42:24 2016 +0000
@@ -71,10 +71,11 @@
       OBDal.getInstance().flush();
       if (strAction.equals("P")) {
         for (FIN_ReconciliationLine_v recLine : reconciliation.getFINReconciliationLineVList()) {
-          boolean orgLegalWithAccounting = FIN_Utility.periodControlOpened(recLine
-              .getFinancialAccountTransaction().getReconciliation().TABLE_NAME, recLine
-              .getFinancialAccountTransaction().getReconciliation().getId(), recLine
-              .getFinancialAccountTransaction().getReconciliation().TABLE_NAME + "_ID", "LE");
+          recLine.getFinancialAccountTransaction().getReconciliation();
+          recLine.getFinancialAccountTransaction().getReconciliation();
+          boolean orgLegalWithAccounting = FIN_Utility.periodControlOpened(
+              FIN_Reconciliation.TABLE_NAME, recLine.getFinancialAccountTransaction()
+                  .getReconciliation().getId(), FIN_Reconciliation.TABLE_NAME + "_ID", "LE");
           if (!FIN_Utility.isPeriodOpen(recLine.getFinancialAccountTransaction().getClient()
               .getId(), AcctServer.DOCTYPE_Reconciliation, recLine.getFinancialAccountTransaction()
               .getOrganization().getId(),
@@ -131,10 +132,11 @@
           return;
         }
         for (FIN_ReconciliationLine_v recLine : reconciliation.getFINReconciliationLineVList()) {
-          boolean orgLegalWithAccounting = FIN_Utility.periodControlOpened(recLine
-              .getFinancialAccountTransaction().getReconciliation().TABLE_NAME, recLine
-              .getFinancialAccountTransaction().getReconciliation().getId(), recLine
-              .getFinancialAccountTransaction().getReconciliation().TABLE_NAME + "_ID", "LE");
+          recLine.getFinancialAccountTransaction().getReconciliation();
+          recLine.getFinancialAccountTransaction().getReconciliation();
+          boolean orgLegalWithAccounting = FIN_Utility.periodControlOpened(
+              FIN_Reconciliation.TABLE_NAME, recLine.getFinancialAccountTransaction()
+                  .getReconciliation().getId(), FIN_Reconciliation.TABLE_NAME + "_ID", "LE");
           if (!FIN_Utility.isPeriodOpen(recLine.getFinancialAccountTransaction().getClient()
               .getId(), AcctServer.DOCTYPE_Reconciliation, recLine.getFinancialAccountTransaction()
               .getOrganization().getId(),
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/utility/FIN_Utility.java	Thu Jan 21 09:06:30 2016 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/utility/FIN_Utility.java	Fri Jan 22 08:42:24 2016 +0000
@@ -20,7 +20,6 @@
 package org.openbravo.advpaymentmngt.utility;
 
 import java.math.BigDecimal;
-import java.sql.BatchUpdateException;
 import java.text.DecimalFormat;
 import java.text.DecimalFormatSymbols;
 import java.text.ParseException;
@@ -80,6 +79,7 @@
 import org.openbravo.model.financialmgmt.payment.FIN_PaymentScheduleDetail;
 import org.openbravo.model.financialmgmt.payment.FinAccPaymentMethod;
 import org.openbravo.service.db.CallStoredProcedure;
+import org.openbravo.service.db.DbUtility;
 import org.openbravo.utils.Replace;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -260,12 +260,8 @@
    * @return the underlying trigger message.
    */
   public static String getExceptionMessage(Throwable t) {
-    if (t.getCause() instanceof BatchUpdateException
-        && ((BatchUpdateException) t.getCause()).getNextException() != null) {
-      final BatchUpdateException bue = (BatchUpdateException) t.getCause();
-      return bue.getNextException().getMessage();
-    }
-    return t.getMessage();
+    Throwable throwable = DbUtility.getUnderlyingSQLException(t);
+    return throwable.getMessage();
   }
 
   /**
@@ -283,10 +279,6 @@
     DocumentType outDocType = null;
     Client client = null;
 
-    OBCriteria<DocumentType> obcDoc = OBDal.getInstance().createCriteria(DocumentType.class);
-    obcDoc.setFilterOnReadableClients(false);
-    obcDoc.setFilterOnReadableOrganization(false);
-
     if ("0".equals(org.getId())) {
       client = OBContext.getOBContext().getCurrentClient();
       if ("0".equals(client.getId())) {
@@ -295,18 +287,29 @@
     } else {
       client = org.getClient();
     }
-    obcDoc.add(Restrictions.eq(DocumentType.PROPERTY_CLIENT, client));
 
-    obcDoc
-        .add(Restrictions.in("organization.id",
-            OBContext.getOBContext().getOrganizationStructureProvider(org.getClient().getId())
-                .getParentTree(org.getId(), true)));
-    obcDoc.add(Restrictions.eq(DocumentType.PROPERTY_DOCUMENTCATEGORY, docCategory));
-    obcDoc.addOrderBy(DocumentType.PROPERTY_DEFAULT, false);
-    obcDoc.addOrderBy(DocumentType.PROPERTY_ID, false);
-    List<DocumentType> docTypeList = obcDoc.list();
-    if (docTypeList != null && docTypeList.size() > 0) {
-      outDocType = docTypeList.get(0);
+    OBContext.setAdminMode(false);
+    try {
+      StringBuilder whereOrderByClause = new StringBuilder();
+      whereOrderByClause.append(" as dt where dt.organization.id in (");
+      whereOrderByClause.append(Utility.getInStrSet(new OrganizationStructureProvider()
+          .getParentTree(org.getId(), true)));
+      whereOrderByClause.append(") and dt.client.id = '" + client.getId()
+          + "' and dt.documentCategory = '" + docCategory + "' order by ad_isorgincluded('"
+          + org.getId() + "', dt.organization.id, '" + client.getId()
+          + "') , dt.default desc, dt.id desc");
+      OBQuery<DocumentType> dt = OBDal.getInstance().createQuery(DocumentType.class,
+          whereOrderByClause.toString());
+      dt.setFilterOnReadableClients(false);
+      dt.setFilterOnReadableOrganization(false);
+      dt.setMaxResult(1);
+
+      List<DocumentType> dtList = dt.list();
+      if (dtList != null && !dtList.isEmpty()) {
+        outDocType = dtList.get(0);
+      }
+    } finally {
+      OBContext.restorePreviousMode();
     }
     return outDocType;
   }
@@ -1526,6 +1529,62 @@
   }
 
   /**
+   * Get an active FinAccPaymentMethod related to paymentMethodId FIN_PaymentMethod and
+   * financialAccountId FIN_FinancialAccount, if exists. If paymentMethodId is null it will retrieve
+   * any FinAccPaymentMethod related to paymentMethodId FIN_PaymentMethod ordered by default field.
+   * FinAccPaymentMethod must have pay in/out active and must be compatible with currencyId Currency
+   * if currencyId is not null.
+   * 
+   * @param paymentMethodId
+   * @param financialAccountId
+   * @param issotrx
+   * @param currencyId
+   * @return
+   */
+  public static FinAccPaymentMethod getFinancialAccountPaymentMethod(String paymentMethodId,
+      String financialAccountId, boolean issotrx, String currencyId) {
+    StringBuffer where = new StringBuffer();
+    where.append(" as fapm");
+    where.append(" join fapm." + FinAccPaymentMethod.PROPERTY_ACCOUNT + " as fa");
+    where.append(" where fapm." + FinAccPaymentMethod.PROPERTY_PAYMENTMETHOD + " = :paymentMethod");
+    where.append(" and fa." + FIN_FinancialAccount.PROPERTY_ACTIVE + " = true");
+    if (issotrx) {
+      where.append(" and fapm." + FinAccPaymentMethod.PROPERTY_PAYINALLOW + " = true");
+    } else {
+      where.append(" and fapm." + FinAccPaymentMethod.PROPERTY_PAYOUTALLOW + " = true");
+    }
+    if (!StringUtils.isEmpty(financialAccountId)) {
+      where.append(" and fapm." + FinAccPaymentMethod.PROPERTY_ACCOUNT + " = :financialAccount");
+    }
+    if (!StringUtils.isEmpty(currencyId)) {
+      where.append(" and (fa." + FIN_FinancialAccount.PROPERTY_CURRENCY + " = :currency");
+      if (issotrx) {
+        where.append(" or fapm." + FinAccPaymentMethod.PROPERTY_PAYINISMULTICURRENCY + " = true)");
+      } else {
+        where.append(" or fapm." + FinAccPaymentMethod.PROPERTY_PAYOUTISMULTICURRENCY + " = true)");
+      }
+    }
+    where.append(" order by fapm." + FinAccPaymentMethod.PROPERTY_DEFAULT + " desc");
+
+    OBQuery<FinAccPaymentMethod> qry = OBDal.getInstance().createQuery(FinAccPaymentMethod.class,
+        where.toString());
+    qry.setFilterOnReadableOrganization(false);
+    qry.setMaxResult(1);
+
+    qry.setNamedParameter("paymentMethod",
+        OBDal.getInstance().get(FIN_PaymentMethod.class, paymentMethodId));
+    if (!StringUtils.isEmpty(financialAccountId)) {
+      qry.setNamedParameter("financialAccount",
+          OBDal.getInstance().get(FIN_FinancialAccount.class, financialAccountId));
+    }
+    if (!StringUtils.isEmpty(currencyId)) {
+      qry.setNamedParameter("currency", OBDal.getInstance().get(Currency.class, currencyId));
+    }
+
+    return (FinAccPaymentMethod) qry.uniqueResult();
+  }
+
+  /**
    * Appends existing Financial Account Transaction description with either GL Item Description or
    * Payment description in a new line
    * 
--- a/modules/org.openbravo.advpaymentmngt/web/org.openbravo.advpaymentmngt/js/ob-aprm-addPayment.js	Thu Jan 21 09:06:30 2016 +0000
+++ b/modules/org.openbravo.advpaymentmngt/web/org.openbravo.advpaymentmngt/js/ob-aprm-addPayment.js	Fri Jan 22 08:42:24 2016 +0000
@@ -375,99 +375,102 @@
       glitemamt = new BigDecimal(String(form.getItem('amount_gl_items').getValue() || 0)),
       orderInvoiceData = orderInvoice.data.localData,
       total = orderInvoice.data.totalRows,
+      autoDistributeAmt = OB.PropertyStore.get("APRM_AutoDistributeAmt"),
       writeoff, amt, outstandingAmount, i, showMessageProperty, showMessage, message;
 
-  if (orderInvoice.data.cachedRows < (orderInvoice.data.totalRows)) {
-    showMessageProperty = OB.PropertyStore.get('APRM_ShowNoDistributeMsg');
-    showMessage = (showMessageProperty !== 'N' && showMessageProperty !== '"N"');
-    if (showMessage) {
-      orderInvoice.contentView.messageBar.setMessage(isc.OBMessageBar.TYPE_INFO, '<div><div class="' + OB.Styles.MessageBar.leftMsgContainerStyle + '">' + OB.I18N.getLabel('APRM_NoDistributeMsg') + '</div><div class="' + OB.Styles.MessageBar.rightMsgContainerStyle + '"><a href="#" class="' + OB.Styles.MessageBar.rightMsgTextStyle + '" onclick="' + 'window[\'' + orderInvoice.contentView.messageBar.ID + '\'].hide(); OB.PropertyStore.set(\'APRM_ShowNoDistributeMsg\', \'N\');">' + OB.I18N.getLabel('OBUIAPP_NeverShowMessageAgain') + '</a></div></div>', ' ');
-    }
-    return;
-  } else {
-    // hide the message bar if it is still showing the APRM_NoDistributeMsg message and the distribution is about to be done
-    message = orderInvoice.contentView.messageBar.text.contents;
-    if (message.contains(OB.I18N.getLabel('APRM_NoDistributeMsg'))) {
-      orderInvoice.contentView.messageBar.hide();
-    }
-  }
-  // subtract glitem amount
-  amount = amount.subtract(glitemamt);
-  // add credit amount
-  amount = amount.add(creditamt);
-
-  for (i = 0; i < total; i++) {
-    if (isc.isA.Object(orderInvoiceData[i]) && !isc.isA.emptyObject(orderInvoiceData[i])) {
-      outstandingAmount = new BigDecimal(String(orderInvoiceData[i].outstandingAmount));
-      if (outstandingAmount.signum() < 0) {
-        negativeamt = negativeamt.add(new BigDecimal(Math.abs(outstandingAmount).toString()));
+  if (autoDistributeAmt !== 'N' && autoDistributeAmt !== '"N"') {
+    if (orderInvoice.data.cachedRows < (orderInvoice.data.totalRows)) {
+      showMessageProperty = OB.PropertyStore.get('APRM_ShowNoDistributeMsg');
+      showMessage = (showMessageProperty !== 'N' && showMessageProperty !== '"N"');
+      if (showMessage) {
+        orderInvoice.contentView.messageBar.setMessage(isc.OBMessageBar.TYPE_INFO, '<div><div class="' + OB.Styles.MessageBar.leftMsgContainerStyle + '">' + OB.I18N.getLabel('APRM_NoDistributeMsg') + '</div><div class="' + OB.Styles.MessageBar.rightMsgContainerStyle + '"><a href="#" class="' + OB.Styles.MessageBar.rightMsgTextStyle + '" onclick="' + 'window[\'' + orderInvoice.contentView.messageBar.ID + '\'].hide(); OB.PropertyStore.set(\'APRM_ShowNoDistributeMsg\', \'N\');">' + OB.I18N.getLabel('OBUIAPP_NeverShowMessageAgain') + '</a></div></div>', ' ');
+      }
+      return;
+    } else {
+      // hide the message bar if it is still showing the APRM_NoDistributeMsg message and the distribution is about to be done
+      message = orderInvoice.contentView.messageBar.text.contents;
+      if (message.contains(OB.I18N.getLabel('APRM_NoDistributeMsg'))) {
+        orderInvoice.contentView.messageBar.hide();
       }
     }
-  }
+    // subtract glitem amount
+    amount = amount.subtract(glitemamt);
+    // add credit amount
+    amount = amount.add(creditamt);
 
-  if (amount.compareTo(negativeamt.negate()) > 0 && (onActualPaymentChange || payment)) {
-    amount = amount.add(negativeamt);
-  }
+    for (i = 0; i < total; i++) {
+      if (isc.isA.Object(orderInvoiceData[i]) && !isc.isA.emptyObject(orderInvoiceData[i])) {
+        outstandingAmount = new BigDecimal(String(orderInvoiceData[i].outstandingAmount));
+        if (outstandingAmount.signum() < 0) {
+          negativeamt = negativeamt.add(new BigDecimal(Math.abs(outstandingAmount).toString()));
+        }
+      }
+    }
 
-  for (i = 0; i < total; i++) {
-    if (!isc.isA.Object(orderInvoiceData[i]) || isc.isA.emptyObject(orderInvoiceData[i])) {
-      continue;
+    if (amount.compareTo(negativeamt.negate()) > 0 && (onActualPaymentChange || payment)) {
+      amount = amount.add(negativeamt);
     }
-    writeoff = orderInvoice.getEditValues(i).writeoff;
-    amt = new BigDecimal(String(orderInvoice.getEditValues(i).amount || 0));
-    if (writeoff === null || writeoff === undefined) {
-      writeoff = orderInvoice.getRecord(i).writeoff;
-      amt = new BigDecimal(String(orderInvoice.getRecord(i).amount || 0));
-    }
-    if (writeoff && issotrx) {
-      amount = amount.subtract(amt);
-      continue;
-    } else {
-      outstandingAmount = new BigDecimal(String(orderInvoice.getRecord(i).outstandingAmount));
-      if (payment && !onActualPaymentChange && orderInvoice.getRecord(i).obSelected) {
-        outstandingAmount = new BigDecimal(String(orderInvoice.getRecord(i).amount));
-      } else if ((outstandingAmount.signum() < 0) && (amount.signum() < 0)) {
-        if (Math.abs(outstandingAmount) > Math.abs(amount)) {
-          differenceamt = outstandingAmount.subtract(amount);
+
+    for (i = 0; i < total; i++) {
+      if (!isc.isA.Object(orderInvoiceData[i]) || isc.isA.emptyObject(orderInvoiceData[i])) {
+        continue;
+      }
+      writeoff = orderInvoice.getEditValues(i).writeoff;
+      amt = new BigDecimal(String(orderInvoice.getEditValues(i).amount || 0));
+      if (writeoff === null || writeoff === undefined) {
+        writeoff = orderInvoice.getRecord(i).writeoff;
+        amt = new BigDecimal(String(orderInvoice.getRecord(i).amount || 0));
+      }
+      if (writeoff && issotrx) {
+        amount = amount.subtract(amt);
+        continue;
+      } else {
+        outstandingAmount = new BigDecimal(String(orderInvoice.getRecord(i).outstandingAmount));
+        if (payment && !onActualPaymentChange && orderInvoice.getRecord(i).obSelected) {
+          outstandingAmount = new BigDecimal(String(orderInvoice.getRecord(i).amount));
+        } else if ((outstandingAmount.signum() < 0) && (amount.signum() < 0)) {
+          if (Math.abs(outstandingAmount) > Math.abs(amount)) {
+            differenceamt = outstandingAmount.subtract(amount);
+            outstandingAmount = amount;
+            amount = amount.subtract(differenceamt);
+          }
+        } else if (outstandingAmount.signum() > -1 && amount.signum() > -1 && outstandingAmount.compareTo(amount) > 0) {
           outstandingAmount = amount;
-          amount = amount.subtract(differenceamt);
         }
-      } else if (outstandingAmount.signum() > -1 && amount.signum() > -1 && outstandingAmount.compareTo(amount) > 0) {
-        outstandingAmount = amount;
-      }
-      // do not distribute again when the selectionChanged method is invoked
-      orderInvoice.preventDistributingOnSelectionChanged = true;
-      if (amount.signum() === 0) {
-        if (outstandingAmount.signum() < 0 && (onActualPaymentChange || payment)) {
+        // do not distribute again when the selectionChanged method is invoked
+        orderInvoice.preventDistributingOnSelectionChanged = true;
+        if (amount.signum() === 0) {
+          if (outstandingAmount.signum() < 0 && (onActualPaymentChange || payment)) {
+            orderInvoice.setEditValue((i), 'amount', Number(outstandingAmount.toString()));
+            orderInvoice.selectRecord(i);
+          } else {
+            orderInvoice.setEditValue((i), 'amount', Number('0'));
+            orderInvoice.deselectRecord(i);
+          }
+        } else if (amount.signum() === 1) {
           orderInvoice.setEditValue((i), 'amount', Number(outstandingAmount.toString()));
           orderInvoice.selectRecord(i);
-        } else {
-          orderInvoice.setEditValue((i), 'amount', Number('0'));
-          orderInvoice.deselectRecord(i);
-        }
-      } else if (amount.signum() === 1) {
-        orderInvoice.setEditValue((i), 'amount', Number(outstandingAmount.toString()));
-        orderInvoice.selectRecord(i);
-        if (outstandingAmount.signum() >= 0 || amount.signum() <= 0) {
-          amount = amount.subtract(outstandingAmount);
-        }
-      } else {
-        if (outstandingAmount.signum() < 0) {
-          orderInvoice.setEditValue((i), 'amount', Number(outstandingAmount.toString()));
-          orderInvoice.selectRecord(i);
-          if (outstandingAmount.signum() <= 0 || amount.signum() <= 0) {
+          if (outstandingAmount.signum() >= 0 || amount.signum() <= 0) {
             amount = amount.subtract(outstandingAmount);
           }
         } else {
-          orderInvoice.setEditValue((i), 'amount', Number('0'));
-          orderInvoice.deselectRecord(i);
+          if (outstandingAmount.signum() < 0) {
+            orderInvoice.setEditValue((i), 'amount', Number(outstandingAmount.toString()));
+            orderInvoice.selectRecord(i);
+            if (outstandingAmount.signum() <= 0 || amount.signum() <= 0) {
+              amount = amount.subtract(outstandingAmount);
+            }
+          } else {
+            orderInvoice.setEditValue((i), 'amount', Number('0'));
+            orderInvoice.deselectRecord(i);
+          }
         }
+        delete orderInvoice.preventDistributingOnSelectionChanged;
       }
-      delete orderInvoice.preventDistributingOnSelectionChanged;
     }
+    OB.APRM.AddPayment.updateActualExpected(form);
+    OB.APRM.AddPayment.updateInvOrderTotal(form, orderInvoice);
   }
-  OB.APRM.AddPayment.updateActualExpected(form);
-  OB.APRM.AddPayment.updateInvOrderTotal(form, orderInvoice);
 };
 
 OB.APRM.AddPayment.updateTotal = function (form) {
--- a/modules/org.openbravo.advpaymentmngt/web/org.openbravo.advpaymentmngt/js/ob-aprm-findTransaction.js	Thu Jan 21 09:06:30 2016 +0000
+++ b/modules/org.openbravo.advpaymentmngt/web/org.openbravo.advpaymentmngt/js/ob-aprm-findTransaction.js	Fri Jan 22 08:42:24 2016 +0000
@@ -36,7 +36,7 @@
     if (trxSelection && trxSelection[0]) {
       var trxDepositAmt = trxSelection[0].depositAmount,
           trxPaymentAmt = trxSelection[0].paymentAmount,
-          blineAmt = view.callerField.view.getContextInfo().match_statement._selection[0].amount,
+          blineAmt = view.callerField.record.amount,
           trxAmt = trxDepositAmt - trxPaymentAmt,
           hideSplitConfirmation = OB.PropertyStore.get('APRM_MATCHSTATEMENT_HIDE_PARTIALMATCH_POPUP', view.windowId);
 
--- a/modules/org.openbravo.advpaymentmngt/web/org.openbravo.advpaymentmngt/js/ob-aprm-matchStatement.js	Thu Jan 21 09:06:30 2016 +0000
+++ b/modules/org.openbravo.advpaymentmngt/web/org.openbravo.advpaymentmngt/js/ob-aprm-matchStatement.js	Fri Jan 22 08:42:24 2016 +0000
@@ -26,10 +26,37 @@
 };
 
 OB.APRM.MatchStatement.onLoad = function (view) {
-  var execute, grid = view.theForm.getItem('match_statement').canvas.viewGrid;
+  var execute, grid = view.theForm.getItem('match_statement').canvas.viewGrid,
+      buttons = view.popupButtons.members[0].members,
+      i, button, propertyButtonValue = '_buttonValue';
   view.cancelButton.hide();
   view.parentElement.parentElement.closeButton.hide();
 
+  for (i = 0; i < buttons.length; i++) {
+    button = buttons[i];
+    if (button[propertyButtonValue] === 'UN') {
+      view.unmatchButton = button;
+      button.hide();
+      break;
+    }
+  }
+
+  button.action = function () {
+    var callback = function (response, data, request) {
+        view.onRefreshFunction(view);
+        if (data && data.message && data.message.severity === 'error') {
+          view.messageBar.setMessage(isc.OBMessageBar.TYPE_ERROR, data.message.title, data.message.text);
+        } else if (data && data.message && data.message.severity === 'success') {
+          view.messageBar.setMessage(isc.OBMessageBar.TYPE_SUCCESS, data.message.title, data.message.text);
+        } else if (data && data.message && data.message.severity === 'warning') {
+          view.messageBar.setMessage(isc.OBMessageBar.TYPE_WARNING, data.message.title, data.message.text);
+        }
+        };
+    OB.RemoteCallManager.call('org.openbravo.advpaymentmngt.actionHandler.UnMatchSelectedTransactionsActionHandler', {
+      bankStatementLineIds: grid.getSelectedRecords()
+    }, {}, callback);
+  };
+
   grid.dataSourceOrig = grid.dataSource;
   grid.dataSource = null;
   execute = function (ok) {
@@ -73,6 +100,24 @@
   actionHandlerCall();
 };
 
+OB.APRM.MatchStatement.selectionChanged = function (grid, changedRecord, recordList) {
+  if (changedRecord.obSelected && changedRecord.cleared) {
+    grid.view.unmatchButton.show();
+    return;
+  } else {
+    var i, record, selection = grid.getSelectedRecords() || [],
+        len = selection.length;
+    for (i = 0; i < len; i++) {
+      record = grid.getEditedRecord(grid.getRecordIndex(selection[i]));
+      if (record && record.obSelected && record.cleared) {
+        grid.view.unmatchButton.show();
+        return;
+      }
+    }
+  }
+
+  grid.view.unmatchButton.hide();
+};
 
 isc.ClassFactory.defineClass('APRMMatchStatGridButtonsComponent', isc.HLayout);
 
@@ -128,7 +173,9 @@
       }
     });
     // Disable searchButton button if record is linked to a transaction
+    // and update Unmatch All button
     searchButton.setDisabled(me.record.cleared);
+    OB.APRM.MatchStatement.selectionChanged(me.grid, me.record);
 
     addButton = isc.OBGridToolStripIcon.create({
       buttonType: 'add',
@@ -168,7 +215,9 @@
       }
     });
     // Disable addButton button if record is linked to a transaction
+    // and update Unmatch All button
     addButton.setDisabled(me.record.cleared);
+    OB.APRM.MatchStatement.selectionChanged(me.grid, me.record);
 
     clearButton = isc.OBGridToolStripIcon.create({
       buttonType: 'clearRight',
@@ -197,7 +246,9 @@
     buttonSeparator2 = isc.OBGridToolStripSeparator.create({});
 
     // Disable clear button if record is not linked to a transaction
+    // and update Unmatch All button
     clearButton.setDisabled(!me.record.cleared);
+    OB.APRM.MatchStatement.selectionChanged(me.grid, me.record);
 
     this.addMembers([searchButton, buttonSeparator1, addButton, buttonSeparator2, clearButton]);
     this.Super('initWidget', arguments);
--- a/modules/org.openbravo.advpaymentmngt/web/org.openbravo.advpaymentmngt/js/ob-aprm-utilities.js	Thu Jan 21 09:06:30 2016 +0000
+++ b/modules/org.openbravo.advpaymentmngt/web/org.openbravo.advpaymentmngt/js/ob-aprm-utilities.js	Fri Jan 22 08:42:24 2016 +0000
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2011-2012 Openbravo SLU
+ * All portions are Copyright (C) 2011-2015 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -114,7 +114,7 @@
     return false;
   }
 
-  var i, row, allRows = item.grid.data.allRows,
+  var i, row, allRows = item.grid.data.allRows || item.grid.data.localData,
       outstanding = new BigDecimal(String(record.outstanding)),
       paidamount = new BigDecimal(String(record.payment));
 
Binary file modules/org.openbravo.apachejdbcconnectionpool/lib/runtime/tomcat-jdbc.jar has changed
Binary file modules/org.openbravo.apachejdbcconnectionpool/lib/runtime/tomcat-juli.jar has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/org.openbravo.apachejdbcconnectionpool/src-db/database/sourcedata/AD_MODULE.xml	Fri Jan 22 08:42:24 2016 +0000
@@ -0,0 +1,28 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<data>
+<!--8A098711BB324335A19833286BDB093D--><AD_MODULE>
+<!--8A098711BB324335A19833286BDB093D-->  <AD_MODULE_ID><![CDATA[8A098711BB324335A19833286BDB093D]]></AD_MODULE_ID>
+<!--8A098711BB324335A19833286BDB093D-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--8A098711BB324335A19833286BDB093D-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--8A098711BB324335A19833286BDB093D-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--8A098711BB324335A19833286BDB093D-->  <NAME><![CDATA[Apache External Connection Pool]]></NAME>
+<!--8A098711BB324335A19833286BDB093D-->  <VERSION><![CDATA[1.0.28173]]></VERSION>
+<!--8A098711BB324335A19833286BDB093D-->  <DESCRIPTION><![CDATA[Apache External Connection Pool]]></DESCRIPTION>
+<!--8A098711BB324335A19833286BDB093D-->  <HELP><![CDATA[This module implements the Apache JDBC Connection Pool (http://wiki.openbravo.com/wiki/Modules:Apache_JDBC_Connection_Pool).]]></HELP>
+<!--8A098711BB324335A19833286BDB093D-->  <TYPE><![CDATA[M]]></TYPE>
+<!--8A098711BB324335A19833286BDB093D-->  <LICENSE><![CDATA[Licensed under the Openbravo Public License version 1.1.
+You may obtain a copy of the License at http://www.openbravo.com/legal/license.html or in the legal folder of the Openbravo ERP core distribution.]]></LICENSE>
+<!--8A098711BB324335A19833286BDB093D-->  <JAVAPACKAGE><![CDATA[org.openbravo.apachejdbcconnectionpool]]></JAVAPACKAGE>
+<!--8A098711BB324335A19833286BDB093D-->  <LICENSETYPE><![CDATA[OBPL]]></LICENSETYPE>
+<!--8A098711BB324335A19833286BDB093D-->  <AUTHOR><![CDATA[Openbravo S.L.U.]]></AUTHOR>
+<!--8A098711BB324335A19833286BDB093D-->  <ISTRANSLATIONREQUIRED><![CDATA[N]]></ISTRANSLATIONREQUIRED>
+<!--8A098711BB324335A19833286BDB093D-->  <HASCHARTOFACCOUNTS><![CDATA[N]]></HASCHARTOFACCOUNTS>
+<!--8A098711BB324335A19833286BDB093D-->  <ISTRANSLATIONMODULE><![CDATA[N]]></ISTRANSLATIONMODULE>
+<!--8A098711BB324335A19833286BDB093D-->  <HASREFERENCEDATA><![CDATA[N]]></HASREFERENCEDATA>
+<!--8A098711BB324335A19833286BDB093D-->  <UPDATEINFO><![CDATA[fixed issue #26663: configuration is read from servlet context]]></UPDATEINFO>
+<!--8A098711BB324335A19833286BDB093D-->  <VERSION_LABEL><![CDATA[CI]]></VERSION_LABEL>
+<!--8A098711BB324335A19833286BDB093D-->  <ISCOMMERCIAL><![CDATA[N]]></ISCOMMERCIAL>
+<!--8A098711BB324335A19833286BDB093D-->  <ISTRIALALLOWED><![CDATA[N]]></ISTRIALALLOWED>
+<!--8A098711BB324335A19833286BDB093D--></AD_MODULE>
+
+</data>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/org.openbravo.apachejdbcconnectionpool/src-db/database/sourcedata/AD_MODULE_DBPREFIX.xml	Fri Jan 22 08:42:24 2016 +0000
@@ -0,0 +1,12 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<data>
+<!--5717805411944D0298C5670BC6B6F2B6--><AD_MODULE_DBPREFIX>
+<!--5717805411944D0298C5670BC6B6F2B6-->  <AD_MODULE_DBPREFIX_ID><![CDATA[5717805411944D0298C5670BC6B6F2B6]]></AD_MODULE_DBPREFIX_ID>
+<!--5717805411944D0298C5670BC6B6F2B6-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--5717805411944D0298C5670BC6B6F2B6-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--5717805411944D0298C5670BC6B6F2B6-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--5717805411944D0298C5670BC6B6F2B6-->  <AD_MODULE_ID><![CDATA[8A098711BB324335A19833286BDB093D]]></AD_MODULE_ID>
+<!--5717805411944D0298C5670BC6B6F2B6-->  <NAME><![CDATA[JDBCCP]]></NAME>
+<!--5717805411944D0298C5670BC6B6F2B6--></AD_MODULE_DBPREFIX>
+
+</data>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/org.openbravo.apachejdbcconnectionpool/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Fri Jan 22 08:42:24 2016 +0000
@@ -0,0 +1,17 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<data>
+<!--1467C397BC5F4999A5606F39CD6FF8A4--><AD_MODULE_DEPENDENCY>
+<!--1467C397BC5F4999A5606F39CD6FF8A4-->  <AD_MODULE_DEPENDENCY_ID><![CDATA[1467C397BC5F4999A5606F39CD6FF8A4]]></AD_MODULE_DEPENDENCY_ID>
+<!--1467C397BC5F4999A5606F39CD6FF8A4-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--1467C397BC5F4999A5606F39CD6FF8A4-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--1467C397BC5F4999A5606F39CD6FF8A4-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--1467C397BC5F4999A5606F39CD6FF8A4-->  <AD_MODULE_ID><![CDATA[8A098711BB324335A19833286BDB093D]]></AD_MODULE_ID>
+<!--1467C397BC5F4999A5606F39CD6FF8A4-->  <AD_DEPENDENT_MODULE_ID><![CDATA[7E48CDD73B7E493A8BED4F7253E7C989]]></AD_DEPENDENT_MODULE_ID>
+<!--1467C397BC5F4999A5606F39CD6FF8A4-->  <STARTVERSION><![CDATA[2.1.28173]]></STARTVERSION>
+<!--1467C397BC5F4999A5606F39CD6FF8A4-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
+<!--1467C397BC5F4999A5606F39CD6FF8A4-->  <DEPENDANT_MODULE_NAME><![CDATA[Openbravo 3.0 Framework]]></DEPENDANT_MODULE_NAME>
+<!--1467C397BC5F4999A5606F39CD6FF8A4-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
+<!--1467C397BC5F4999A5606F39CD6FF8A4-->  <USER_EDITABLE_ENFORCEMENT><![CDATA[N]]></USER_EDITABLE_ENFORCEMENT>
+<!--1467C397BC5F4999A5606F39CD6FF8A4--></AD_MODULE_DEPENDENCY>
+
+</data>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/org.openbravo.apachejdbcconnectionpool/src/org/openbravo/apachejdbcconnectionpool/ConnectionInitializerInterceptor.java	Fri Jan 22 08:42:24 2016 +0000
@@ -0,0 +1,82 @@
+/*
+ *************************************************************************
+ * 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-2015 Openbravo SLU
+ * All Rights Reserved.
+ * Contributor(s):  ______________________________________.
+ ************************************************************************
+ */
+package org.openbravo.apachejdbcconnectionpool;
+
+import java.sql.PreparedStatement;
+import java.sql.SQLException;
+import java.util.HashMap;
+import java.util.Properties;
+
+import org.apache.tomcat.jdbc.pool.ConnectionPool;
+import org.apache.tomcat.jdbc.pool.JdbcInterceptor;
+import org.apache.tomcat.jdbc.pool.PooledConnection;
+import org.openbravo.base.exception.OBException;
+import org.openbravo.base.session.OBPropertiesProvider;
+import org.openbravo.database.PoolInterceptorProvider;
+import org.openbravo.database.SessionInfo;
+
+/**
+ * This interceptor allows to act whenever a connection is requested from the pool and whenever any
+ * operation is invoked on a connection provided by Apache JDBC Connection Pool.
+ */
+public class ConnectionInitializerInterceptor extends JdbcInterceptor implements
+    PoolInterceptorProvider {
+
+  String rbdms = (String) OBPropertiesProvider.getInstance().getOpenbravoProperties()
+      .get("bbdd.rdbms");
+
+  /**
+   * This method is called each time the connection is borrowed from the pool and it is used to
+   * initialize prepareStatement.
+   */
+  @Override
+  public void reset(ConnectionPool parent, PooledConnection con) {
+    if (con != null) {
+      HashMap<Object, Object> attributes = con.getAttributes();
+      Boolean connectionInitialized = (Boolean) attributes.get("OB_INITIALIZED");
+      if (connectionInitialized == null || connectionInitialized == false) {
+        SessionInfo.setDBSessionInfo(con.getConnection(), rbdms);
+        PreparedStatement pstmt = null;
+        try {
+          final Properties props = OBPropertiesProvider.getInstance().getOpenbravoProperties();
+          final String dbSessionConfig = props.getProperty("bbdd.sessionConfig");
+          pstmt = con.getConnection().prepareStatement(dbSessionConfig);
+          pstmt.executeQuery();
+        } catch (Exception e) {
+          throw new IllegalStateException(e);
+        } finally {
+          try {
+            if (pstmt != null && !pstmt.isClosed()) {
+              pstmt.close();
+            }
+          } catch (SQLException e) {
+            throw new OBException(e);
+          }
+        }
+        attributes.put("OB_INITIALIZED", true);
+      }
+    }
+  }
+
+  @Override
+  public String getPoolInterceptorsClassNames() {
+    String fullClassName = this.getClass().getName();
+    return fullClassName + ";";
+  }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/org.openbravo.apachejdbcconnectionpool/src/org/openbravo/apachejdbcconnectionpool/JdbcExternalConnectionPool.java	Fri Jan 22 08:42:24 2016 +0000
@@ -0,0 +1,254 @@
+/*
+ *************************************************************************
+ * 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-2015 Openbravo SLU
+ * All Rights Reserved.
+ * Contributor(s):  ______________________________________.
+ ************************************************************************
+ */
+package org.openbravo.apachejdbcconnectionpool;
+
+import java.sql.Connection;
+import java.util.List;
+import java.util.Properties;
+
+import javax.naming.Context;
+import javax.naming.InitialContext;
+
+import org.apache.tomcat.jdbc.pool.DataSource;
+import org.apache.tomcat.jdbc.pool.PoolProperties;
+import org.openbravo.base.exception.OBException;
+import org.openbravo.base.session.OBPropertiesProvider;
+import org.openbravo.base.session.SessionFactoryController;
+import org.openbravo.database.ExternalConnectionPool;
+import org.openbravo.database.PoolInterceptorProvider;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * JdbcExternalConnectionPool manages all the functionality of the Apache JDBC Connection Pool. This
+ * class provides convenience methods to get a connection, close the pool and other actions.
+ */
+public class JdbcExternalConnectionPool extends ExternalConnectionPool {
+
+  final static private Logger log = LoggerFactory.getLogger(JdbcExternalConnectionPool.class);
+
+  private DataSource dataSource = null;
+
+  /**
+   * This method loads all the interceptors of apache jdbc connection pool injected with weld.
+   */
+  @Override
+  public void loadInterceptors(List<PoolInterceptorProvider> interceptors) {
+    String currentInterceptors = this.getDataSource().getJdbcInterceptors();
+    for (PoolInterceptorProvider interceptor : interceptors) {
+      currentInterceptors += interceptor.getPoolInterceptorsClassNames();
+    }
+    this.getDataSource().setJdbcInterceptors(currentInterceptors);
+  }
+
+  /**
+   * Gets the data source of apache jdbc connection pool.
+   */
+  public DataSource getDataSource() {
+    return dataSource;
+  }
+
+  /**
+   * This method provided a connection of apache jdbc connection pool. Apache jdbc connection pool
+   * is initialized in the first call to this method.
+   */
+  @Override
+  public Connection getConnection() {
+    if (dataSource == null) {
+      initPool();
+    }
+    Connection connection = null;
+    try {
+      connection = dataSource.getConnection();
+      // All connections are setting autoCommit to true. DAL is taking into account his logical and
+      // DAL is setting autoCommint to false to maintain transactional way of working.
+      connection.setAutoCommit(true);
+    } catch (Exception e) {
+      log.error("Error while retrieving connection: ", e);
+      throw new OBException(e);
+    }
+    return connection;
+  }
+
+  private void initPool() {
+    dataSource = new DataSource();
+    dataSource.setPoolProperties(getPoolProperties());
+  }
+
+  private PoolProperties getPoolProperties() {
+    Properties poolPropertiesConfig = OBPropertiesProvider.getInstance().getOpenbravoProperties();
+
+    PoolProperties poolProperties = new PoolProperties();
+
+    poolProperties.setJdbcInterceptors("org.apache.tomcat.jdbc.pool.interceptor.ConnectionState;"
+        + "org.apache.tomcat.jdbc.pool.interceptor.StatementFinalizer;"
+        + "org.openbravo.apachejdbcconnectionpool.ConnectionInitializerInterceptor;");
+
+    if (SessionFactoryController.isJNDIModeOn(poolPropertiesConfig)) {
+      try {
+        Context initctx = new InitialContext();
+        Context ctx = (Context) initctx.lookup("java:/comp/env");
+        javax.sql.DataSource ds = (javax.sql.DataSource) ctx.lookup(poolPropertiesConfig
+            .getProperty("JNDI.resourceName"));
+        poolProperties.setDataSource(ds);
+        return poolProperties;
+      } catch (Exception e) {
+        log.error("Error trying to get JNDI datasource, trying to get direct DB connection", e);
+        poolProperties = new PoolProperties();
+      }
+    }
+
+    String obUrl = poolPropertiesConfig.getProperty("bbdd.url");
+    String sid = poolPropertiesConfig.getProperty("bbdd.sid");
+    String driver = poolPropertiesConfig.getProperty("bbdd.driver");
+    String username = poolPropertiesConfig.getProperty("bbdd.user");
+    String password = poolPropertiesConfig.getProperty("bbdd.password");
+    String rbdms = poolPropertiesConfig.getProperty("bbdd.rdbms");
+
+    if ("POSTGRE".equals(rbdms)) {
+      poolProperties.setUrl(obUrl + "/" + sid);
+    } else {
+      poolProperties.setUrl(obUrl);
+    }
+    poolProperties.setDriverClassName(driver);
+    poolProperties.setUsername(username);
+    poolProperties.setPassword(password);
+
+    if (poolPropertiesConfig.getProperty("db.pool.initialSize") != null) {
+      poolProperties.setInitialSize(getIntProperty(poolPropertiesConfig, "db.pool.initialSize"));
+    }
+    if (poolPropertiesConfig.getProperty("db.pool.maxActive") != null) {
+      poolProperties.setMaxActive(getIntProperty(poolPropertiesConfig, "db.pool.maxActive"));
+    }
+    if (poolPropertiesConfig.getProperty("db.pool.minIdle") != null) {
+      poolProperties.setMinIdle(getIntProperty(poolPropertiesConfig, "db.pool.minIdle"));
+    }
+    if (poolPropertiesConfig.getProperty("db.pool.timeBetweenEvictionRunsMillis") != null) {
+      poolProperties.setTimeBetweenEvictionRunsMillis(getIntProperty(poolPropertiesConfig,
+          "db.pool.timeBetweenEvictionRunsMillis"));
+    }
+    if (poolPropertiesConfig.getProperty("db.pool.minEvictableIdleTimeMillis") != null) {
+      poolProperties.setMinEvictableIdleTimeMillis(getIntProperty(poolPropertiesConfig,
+          "db.pool.minEvictableIdleTimeMillis"));
+    }
+    if (poolPropertiesConfig.getProperty("db.pool.removeAbandoned") != null) {
+      poolProperties.setRemoveAbandoned(getBooleanProperty(poolPropertiesConfig,
+          "db.pool.removeAbandoned"));
+    }
+    if (poolPropertiesConfig.getProperty("db.pool.testWhileIdle") != null) {
+      poolProperties.setTestWhileIdle(getBooleanProperty(poolPropertiesConfig,
+          "db.pool.testWhileIdle"));
+    }
+    if (poolPropertiesConfig.getProperty("db.pool.testOnBorrow") != null) {
+      poolProperties.setTestOnBorrow(getBooleanProperty(poolPropertiesConfig,
+          "db.pool.testOnBorrow"));
+    }
+    if (poolPropertiesConfig.getProperty("db.pool.testOnReturn") != null) {
+      poolProperties.setTestOnReturn(getBooleanProperty(poolPropertiesConfig,
+          "db.pool.testOnReturn"));
+    }
+    if (poolPropertiesConfig.getProperty("db.pool.validationInterval") != null) {
+      poolProperties.setValidationInterval(getIntProperty(poolPropertiesConfig,
+          "db.pool.validationInterval"));
+    }
+    if (poolPropertiesConfig.getProperty("db.pool.validationQuery") != null) {
+      poolProperties
+          .setValidationQuery(poolPropertiesConfig.getProperty("db.pool.validationQuery"));
+    }
+    if (poolPropertiesConfig.getProperty("db.pool.defaultTransactionIsolation") != null) {
+      poolProperties.setDefaultTransactionIsolation(getIntProperty(poolPropertiesConfig,
+          "db.pool.defaultTransactionIsolation"));
+    }
+    if (poolPropertiesConfig.getProperty("db.pool.maxIdle") != null) {
+      poolProperties.setMaxIdle(getIntProperty(poolPropertiesConfig, "db.pool.maxIdle"));
+    }
+    if (poolPropertiesConfig.getProperty("db.pool.maxWait") != null) {
+      poolProperties.setMaxWait(getIntProperty(poolPropertiesConfig, "db.pool.maxWait"));
+    }
+    if (poolPropertiesConfig.getProperty("db.pool.numTestsPerEvictionRun") != null) {
+      poolProperties.setNumTestsPerEvictionRun(getIntProperty(poolPropertiesConfig,
+          "db.pool.numTestsPerEvictionRun"));
+    }
+    if (poolPropertiesConfig.getProperty("db.pool.removeAbandonedTimeout") != null) {
+      poolProperties.setRemoveAbandonedTimeout(getIntProperty(poolPropertiesConfig,
+          "db.pool.removeAbandonedTimeout"));
+    }
+    if (poolPropertiesConfig.getProperty("db.pool.accessToUnderlyingConnectionAllowed") != null) {
+      poolProperties.setAccessToUnderlyingConnectionAllowed(getBooleanProperty(
+          poolPropertiesConfig, "db.pool.accessToUnderlyingConnectionAllowed"));
+    }
+    if (poolPropertiesConfig.getProperty("db.pool.defaultAutoCommit") != null) {
+      poolProperties.setDefaultAutoCommit(getBooleanProperty(poolPropertiesConfig,
+          "db.pool.defaultAutoCommit"));
+    }
+    if (poolPropertiesConfig.getProperty("db.pool.defaultReadOnly") != null) {
+      poolProperties.setDefaultReadOnly(getBooleanProperty(poolPropertiesConfig,
+          "db.pool.defaultReadOnly"));
+    }
+    if (poolPropertiesConfig.getProperty("db.pool.logAbandoned") != null) {
+      poolProperties.setLogAbandoned(getBooleanProperty(poolPropertiesConfig,
+          "db.pool.logAbandoned"));
+    }
+    if (poolPropertiesConfig.getProperty("db.pool.testOnConnect") != null) {
+      poolProperties.setTestOnConnect(getBooleanProperty(poolPropertiesConfig,
+          "db.pool.testOnConnect"));
+    }
+    if (poolPropertiesConfig.getProperty("db.pool.connectionProperties") != null) {
+      poolProperties.setConnectionProperties(poolPropertiesConfig
+          .getProperty("db.pool.connectionProperties"));
+    }
+    if (poolPropertiesConfig.getProperty("db.pool.defaultCatalog") != null) {
+      poolProperties.setDefaultCatalog(poolPropertiesConfig.getProperty("db.pool.defaultCatalog"));
+    }
+    if (poolPropertiesConfig.getProperty("db.pool.validatorClassName") != null) {
+      poolProperties.setValidatorClassName(poolPropertiesConfig
+          .getProperty("db.pool.validatorClassName"));
+    }
+    if (poolPropertiesConfig.getProperty("db.pool.initSQL") != null) {
+      poolProperties.setInitSQL(poolPropertiesConfig.getProperty("db.pool.initSQL"));
+    }
+    if (poolPropertiesConfig.getProperty("db.pool.name") != null) {
+      poolProperties.setName(poolPropertiesConfig.getProperty("db.pool.name"));
+    }
+
+    return poolProperties;
+  }
+
+  private boolean getBooleanProperty(Properties properties, String propertyName) {
+    return ("true".equals(properties.getProperty(propertyName)));
+  }
+
+  private int getIntProperty(Properties properties, String propertyName) {
+    return Integer.parseInt(properties.getProperty(propertyName).trim());
+  }
+
+  /**
+   * This method closes apache jdbc connection pool.
+   */
+  @Override
+  public void closePool() {
+    DataSource ds = getDataSource();
+    if (ds != null) {
+      // Closes the pool and all idle connections. true parameter is for close the active
+      // connections too.
+      ds.close(true);
+    }
+    super.closePool();
+  }
+}
Binary file modules/org.openbravo.base.weld/lib/test/arquillian-api-1.0.0.Alpha4.jar has changed
Binary file modules/org.openbravo.base.weld/lib/test/arquillian-config-api-1.1.8.Final.jar has changed
Binary file modules/org.openbravo.base.weld/lib/test/arquillian-config-impl-base-1.1.8.Final.jar has changed
Binary file modules/org.openbravo.base.weld/lib/test/arquillian-container-impl-base-1.1.8.Final.jar has changed
Binary file modules/org.openbravo.base.weld/lib/test/arquillian-container-spi-1.1.8.Final.jar has changed
Binary file modules/org.openbravo.base.weld/lib/test/arquillian-container-test-api-1.1.8.Final.jar has changed
Binary file modules/org.openbravo.base.weld/lib/test/arquillian-container-test-impl-base-1.1.8.Final.jar has changed
Binary file modules/org.openbravo.base.weld/lib/test/arquillian-container-test-spi-1.1.8.Final.jar has changed
Binary file modules/org.openbravo.base.weld/lib/test/arquillian-core-api-1.1.8.Final.jar has changed
Binary file modules/org.openbravo.base.weld/lib/test/arquillian-core-impl-base-1.1.8.Final.jar has changed
Binary file modules/org.openbravo.base.weld/lib/test/arquillian-core-spi-1.1.8.Final.jar has changed
Binary file modules/org.openbravo.base.weld/lib/test/arquillian-impl-base-1.0.0.Alpha4.jar has changed
Binary file modules/org.openbravo.base.weld/lib/test/arquillian-junit-1.0.0.Alpha4.jar has changed
Binary file modules/org.openbravo.base.weld/lib/test/arquillian-junit-container-1.1.8.Final.jar has changed
Binary file modules/org.openbravo.base.weld/lib/test/arquillian-junit-core-1.1.8.Final.jar has changed
Binary file modules/org.openbravo.base.weld/lib/test/arquillian-protocol-local-1.0.0.Alpha4.jar has changed
Binary file modules/org.openbravo.base.weld/lib/test/arquillian-spi-1.0.0.Alpha4.jar has changed
Binary file modules/org.openbravo.base.weld/lib/test/arquillian-test-api-1.1.8.Final.jar has changed
Binary file modules/org.openbravo.base.weld/lib/test/arquillian-test-impl-base-1.1.8.Final.jar has changed
Binary file modules/org.openbravo.base.weld/lib/test/arquillian-test-spi-1.1.8.Final.jar has changed
Binary file modules/org.openbravo.base.weld/lib/test/arquillian-testenricher-cdi-1.0.0.Alpha4.jar has changed
Binary file modules/org.openbravo.base.weld/lib/test/arquillian-testenricher-cdi-1.0.2.Final.jar has changed
Binary file modules/org.openbravo.base.weld/lib/test/arquillian-weld-ee-embedded-1.1-1.0.0.Alpha4.jar has changed
Binary file modules/org.openbravo.base.weld/lib/test/arquillian-weld-ee-embedded-1.1-1.0.0.CR8.jar has changed
Binary file modules/org.openbravo.base.weld/lib/test/jboss-el-api_2.2_spec-1.0.0.Final.jar has changed
Binary file modules/org.openbravo.base.weld/lib/test/shrinkwrap-api-1.0.0-alpha-11.jar has changed
Binary file modules/org.openbravo.base.weld/lib/test/shrinkwrap-api-1.2.2.jar has changed
Binary file modules/org.openbravo.base.weld/lib/test/shrinkwrap-descriptors-api-base-2.0.0-alpha-7.jar has changed
Binary file modules/org.openbravo.base.weld/lib/test/shrinkwrap-descriptors-spi-2.0.0-alpha-7.jar has changed
Binary file modules/org.openbravo.base.weld/lib/test/shrinkwrap-extension-classloader-1.0.0-alpha-11.jar has changed
Binary file modules/org.openbravo.base.weld/lib/test/shrinkwrap-impl-base-1.0.0-alpha-11.jar has changed
Binary file modules/org.openbravo.base.weld/lib/test/shrinkwrap-impl-base-1.2.2.jar has changed
Binary file modules/org.openbravo.base.weld/lib/test/shrinkwrap-spi-1.0.0-alpha-11.jar has changed
Binary file modules/org.openbravo.base.weld/lib/test/shrinkwrap-spi-1.2.2.jar has changed
--- a/modules/org.openbravo.base.weld/src-db/database/sourcedata/AD_MODULE.xml	Thu Jan 21 09:06:30 2016 +0000
+++ b/modules/org.openbravo.base.weld/src-db/database/sourcedata/AD_MODULE.xml	Fri Jan 22 08:42:24 2016 +0000
@@ -6,7 +6,7 @@
 <!--C70732EA90A14EC0916078B85CC33D2D-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--C70732EA90A14EC0916078B85CC33D2D-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--C70732EA90A14EC0916078B85CC33D2D-->  <NAME><![CDATA[JBoss Weld]]></NAME>
-<!--C70732EA90A14EC0916078B85CC33D2D-->  <VERSION><![CDATA[1.1.27124]]></VERSION>
+<!--C70732EA90A14EC0916078B85CC33D2D-->  <VERSION><![CDATA[1.1.28173]]></VERSION>
 <!--C70732EA90A14EC0916078B85CC33D2D-->  <DESCRIPTION><![CDATA[JBoss Weld]]></DESCRIPTION>
 <!--C70732EA90A14EC0916078B85CC33D2D-->  <HELP><![CDATA[Provides the JBoss Weld framework: Java Contexts and Dependency Injection for the Java EE platform (CDI). For more information see http://seamframework.org/Weld]]></HELP>
 <!--C70732EA90A14EC0916078B85CC33D2D-->  <URL><![CDATA[http://forge.openbravo.com/projects/weld]]></URL>
@@ -22,7 +22,7 @@
 <!--C70732EA90A14EC0916078B85CC33D2D-->  <ISTRANSLATIONMODULE><![CDATA[N]]></ISTRANSLATIONMODULE>
 <!--C70732EA90A14EC0916078B85CC33D2D-->  <HASREFERENCEDATA><![CDATA[N]]></HASREFERENCEDATA>
 <!--C70732EA90A14EC0916078B85CC33D2D-->  <UPDATEINFO><![CDATA[Bug fixing.]]></UPDATEINFO>
-<!--C70732EA90A14EC0916078B85CC33D2D-->  <VERSION_LABEL><![CDATA[PR15Q3.5]]></VERSION_LABEL>
+<!--C70732EA90A14EC0916078B85CC33D2D-->  <VERSION_LABEL><![CDATA[CI]]></VERSION_LABEL>
 <!--C70732EA90A14EC0916078B85CC33D2D-->  <ISCOMMERCIAL><![CDATA[N]]></ISCOMMERCIAL>
 <!--C70732EA90A14EC0916078B85CC33D2D-->  <ISTRIALALLOWED><![CDATA[N]]></ISTRIALALLOWED>
 <!--C70732EA90A14EC0916078B85CC33D2D--></AD_MODULE>
--- a/modules/org.openbravo.base.weld/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Thu Jan 21 09:06:30 2016 +0000
+++ b/modules/org.openbravo.base.weld/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Fri Jan 22 08:42:24 2016 +0000
@@ -7,7 +7,7 @@
 <!--8BDE81545C1A43EAAC4BA3C5ED754DC8-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--8BDE81545C1A43EAAC4BA3C5ED754DC8-->  <AD_MODULE_ID><![CDATA[C70732EA90A14EC0916078B85CC33D2D]]></AD_MODULE_ID>
 <!--8BDE81545C1A43EAAC4BA3C5ED754DC8-->  <AD_DEPENDENT_MODULE_ID><![CDATA[0]]></AD_DEPENDENT_MODULE_ID>
-<!--8BDE81545C1A43EAAC4BA3C5ED754DC8-->  <STARTVERSION><![CDATA[3.0.27124]]></STARTVERSION>
+<!--8BDE81545C1A43EAAC4BA3C5ED754DC8-->  <STARTVERSION><![CDATA[3.0.28173]]></STARTVERSION>
 <!--8BDE81545C1A43EAAC4BA3C5ED754DC8-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--8BDE81545C1A43EAAC4BA3C5ED754DC8-->  <DEPENDANT_MODULE_NAME><![CDATA[Core]]></DEPENDANT_MODULE_NAME>
 <!--8BDE81545C1A43EAAC4BA3C5ED754DC8-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/org.openbravo.base.weld/src-test/org/openbravo/base/weld/test/ParameterCdiTest.java	Fri Jan 22 08:42:24 2016 +0000
@@ -0,0 +1,39 @@
+/*
+ *************************************************************************
+ * 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) 2015 Openbravo SLU
+ * All Rights Reserved.
+ * Contributor(s):  ______________________________________.
+ ************************************************************************
+ */
+
+package org.openbravo.base.weld.test;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Defines which field in a cdi test class will take the parameter values set by
+ * {@link ParameterCdiTestRule}. There should be a single field with this annotation per class.
+ * 
+ * @see ParameterCdiTestRule
+ * 
+ * @author alostale
+ *
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target({ ElementType.FIELD })
+public @interface ParameterCdiTest {
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/org.openbravo.base.weld/src-test/org/openbravo/base/weld/test/ParameterCdiTestRule.java	Fri Jan 22 08:42:24 2016 +0000
@@ -0,0 +1,103 @@
+/*
+ *************************************************************************
+ * 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) 2015 Openbravo SLU
+ * All Rights Reserved.
+ * Contributor(s):  ______________________________________.
+ ************************************************************************
+ */
+
+package org.openbravo.base.weld.test;
+
+import java.lang.reflect.Field;
+import java.util.List;
+
+import org.junit.rules.MethodRule;
+import org.junit.runners.model.FrameworkMethod;
+import org.junit.runners.model.Statement;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Rule to make possible to run parameterized test cases with Arquillian runner. The Rule field
+ * defines the parameter values which will be taken by the field annotated with @ParameterCdiTest.
+ * 
+ * Based on https://gist.github.com/poolik/8764414
+ * 
+ * @see ParameterCdiTest
+ * 
+ * @author alostale
+ */
+public class ParameterCdiTestRule<T> implements MethodRule {
+  private final List<T> params;
+  private static final Logger log = LoggerFactory.getLogger(ParameterCdiTestRule.class);
+
+  public ParameterCdiTestRule(List<T> params) {
+    if (params == null || params.size() == 0) {
+      throw new IllegalArgumentException(
+          "'params' must be specified and have more than zero length!");
+    }
+    this.params = params;
+  }
+
+  @Override
+  public Statement apply(final Statement base, final FrameworkMethod method, final Object target) {
+    return new Statement() {
+      @Override
+      public void evaluate() throws Throwable {
+        evaluateParamsToTarget(base, target, method);
+      }
+    };
+  }
+
+  private void evaluateParamsToTarget(Statement base, Object target, FrameworkMethod method)
+      throws Throwable {
+    Field targetField = getTargetField(target);
+    if (!targetField.isAccessible()) {
+      targetField.setAccessible(true);
+    }
+
+    for (Object param : params) {
+      targetField.set(target, param);
+
+      log.info(
+          "============================================================================================================");
+      log.info("   Paremeterized test {}.{} ", target.getClass().getName(), method.getName());
+      log.info("       {}: {}", targetField.getName(), param);
+      log.info(
+          "============================================================================================================");
+
+      base.evaluate();
+    }
+  }
+
+  private Field getTargetField(Object target) throws NoSuchFieldException {
+    Field[] allFields = target.getClass().getDeclaredFields();
+    Field paramField = null;
+    for (Field field : allFields) {
+      if (field.getAnnotation(ParameterCdiTest.class) != null) {
+        if (paramField != null) {
+          throw new IllegalStateException(
+              "More than one field with @ParameterCdiTest. There should be a single @ParameterCdiTest field.");
+        }
+
+        paramField = field;
+      }
+    }
+    if (paramField == null) {
+      throw new IllegalStateException(
+          "No field with @ParameterCdiTest annotation found. There should be a single @ParameterCdiTest field.");
+    }
+    return paramField;
+  }
+}
\ No newline at end of file
--- a/modules/org.openbravo.base.weld/src-test/org/openbravo/base/weld/test/WeldBaseTest.java	Thu Jan 21 09:06:30 2016 +0000
+++ b/modules/org.openbravo.base.weld/src-test/org/openbravo/base/weld/test/WeldBaseTest.java	Fri Jan 22 08:42:24 2016 +0000
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2010-2014 Openbravo SLU
+ * All portions are Copyright (C) 2010-2015 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -24,16 +24,23 @@
 import javax.enterprise.util.AnnotationLiteral;
 import javax.inject.Inject;
 
-import org.jboss.arquillian.api.Deployment;
+import org.jboss.arquillian.container.test.api.Deployment;
 import org.jboss.arquillian.junit.Arquillian;
 import org.jboss.shrinkwrap.api.ShrinkWrap;
+import org.jboss.shrinkwrap.api.asset.EmptyAsset;
 import org.jboss.shrinkwrap.api.importer.ExplodedImporter;
 import org.jboss.shrinkwrap.api.spec.JavaArchive;
-import org.junit.After;
+import org.junit.AfterClass;
 import org.junit.Before;
 import org.junit.runner.RunWith;
 import org.openbravo.base.session.OBPropertiesProvider;
+import org.openbravo.base.session.SessionFactoryController;
+import org.openbravo.base.weld.WeldUtils;
+import org.openbravo.client.kernel.KernelInitializer;
+import org.openbravo.dal.core.OBInterceptor;
 import org.openbravo.test.base.OBBaseTest;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Base test for weld, provides access to the weld container.
@@ -42,14 +49,34 @@
  */
 @RunWith(Arquillian.class)
 public class WeldBaseTest extends OBBaseTest {
+  private static final Logger log = LoggerFactory.getLogger(WeldBaseTest.class);
+
+  private static boolean initialized = false;
+  private static JavaArchive archive = null;
 
   @Deployment
   public static JavaArchive createTestArchive() {
-    final String sourcePath = OBPropertiesProvider.getInstance().getOpenbravoProperties()
-        .getProperty("source.path");
-    final JavaArchive archive = ShrinkWrap.create(JavaArchive.class, "test.jar");
-    archive.as(ExplodedImporter.class).importDirectory(sourcePath + "/build/classes");
-    archive.addDirectory(sourcePath + "/WebContent/WEB-INF/lib");
+    if (archive == null) {
+      log.info("Creating cdi archive...");
+      final String sourcePath = OBPropertiesProvider.getInstance().getOpenbravoProperties()
+          .getProperty("source.path");
+      archive = ShrinkWrap.create(JavaArchive.class);
+
+      // add all beans without exclusions so cdi can also be used for *test* packages
+      archive.addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
+
+      // include all classes deployed in webapp container
+      archive.as(ExplodedImporter.class).importDirectory(sourcePath + "/build/classes/");
+
+      // ...and all the jUnit ones
+      archive.as(ExplodedImporter.class).importDirectory(sourcePath + "/src-test/build/classes/");
+
+      // include all libraries deployed in webapp container
+      archive.addAsDirectory(sourcePath + "/WebContent/WEB-INF/lib");
+
+      log.debug(archive.toString(true));
+      log.info("... cdi archive created");
+    }
     return archive;
   }
 
@@ -60,6 +87,39 @@
   @Inject
   private BeanManager beanManager;
 
+  @Inject
+  private KernelInitializer kernelInitializer;
+
+  /**
+   * Sets static instance bean manager in WeldUtils so it is globally accessible and initializes
+   * kernel.
+   * 
+   * Arquillian creates a new cdi container for each test class but keeps existent one for all tests
+   * within same class, let's initialize it once per class but we cannot use @BeforeClass at this
+   * point because we require of beanManager to be injected.
+   */
+  @Before
+  public void setManager() {
+    if (!initialized) {
+      WeldUtils.setStaticInstanceBeanManager(beanManager);
+      kernelInitializer.setInterceptor();
+      initialized = true;
+    }
+  }
+
+  /**
+   * Once we are done with the class execution, OBInterceptor needs to be reset other case when
+   * executing a suite it will reuse the container created for the previous classes instead of the
+   * new one.
+   */
+  @AfterClass
+  public static void resetOBInterceptors() {
+    final OBInterceptor interceptor = (OBInterceptor) SessionFactoryController.getInstance()
+        .getConfiguration().getInterceptor();
+    interceptor.setInterceptorListener(null);
+    initialized = false;
+  }
+
   @SuppressWarnings("unchecked")
   protected <U extends Object> U getWeldComponent(Class<U> clz) {
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/org.openbravo.base.weld/src-test/org/openbravo/base/weld/test/testinfrastructure/ApplicationScopedBean.java	Fri Jan 22 08:42:24 2016 +0000
@@ -0,0 +1,36 @@
+/*
+ *************************************************************************
+ * 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) 2015 Openbravo SLU
+ * All Rights Reserved.
+ * Contributor(s):  ______________________________________.
+ ************************************************************************
+ */
+
+package org.openbravo.base.weld.test.testinfrastructure;
+
+import javax.enterprise.context.ApplicationScoped;
+
+/** Simple application scoped bean */
+@ApplicationScoped
+public class ApplicationScopedBean {
+  private String value;
+
+  public void setValue(String value) {
+    this.value = value;
+  }
+
+  public String getValue() {
+    return value;
+  }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/org.openbravo.base.weld/src-test/org/openbravo/base/weld/test/testinfrastructure/CdiInfrastructure.java	Fri Jan 22 08:42:24 2016 +0000
@@ -0,0 +1,80 @@
+/*
+ *************************************************************************
+ * 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) 2015 Openbravo SLU
+ * All Rights Reserved.
+ * Contributor(s):  ______________________________________.
+ ************************************************************************
+ */
+
+package org.openbravo.base.weld.test.testinfrastructure;
+
+import static org.hamcrest.CoreMatchers.equalTo;
+import static org.hamcrest.CoreMatchers.notNullValue;
+import static org.hamcrest.CoreMatchers.nullValue;
+import static org.junit.Assert.assertThat;
+
+import javax.inject.Inject;
+
+import org.jboss.arquillian.junit.InSequence;
+import org.junit.Test;
+import org.openbravo.base.weld.test.WeldBaseTest;
+
+/**
+ * Test cases for cdi infrastructure. Checking Arquillian works fine and it is possible to inject
+ * beans.
+ * 
+ * @author alostale
+ *
+ */
+public class CdiInfrastructure extends WeldBaseTest {
+
+  @Inject
+  private ApplicationScopedBean applicationBean;
+
+  @Inject
+  private SessionScopedBean sessionBean;
+
+  @Inject
+  private RequestScopedBean requestBean;
+
+  /** beans are correctly injected */
+  @Test
+  public void beansAreInjected() {
+    assertThat("application bean is injected", applicationBean, notNullValue());
+    assertThat("session bean is injected", sessionBean, notNullValue());
+    assertThat("request bean is injected", requestBean, notNullValue());
+  }
+
+  /** starts application and session scopes */
+  @Test
+  @InSequence(1)
+  public void start() {
+    applicationBean.setValue("application");
+    sessionBean.setValue("session");
+    requestBean.setValue("request");
+
+    assertThat(applicationBean.getValue(), equalTo("application"));
+    assertThat(sessionBean.getValue(), equalTo("session"));
+    assertThat(requestBean.getValue(), equalTo("request"));
+  }
+
+  /** application and session scopes are preserved but not request scope */
+  @Test
+  @InSequence(2)
+  public void applicationAndSessionShouldBeKept() {
+    assertThat(applicationBean.getValue(), equalTo("application"));
+    assertThat(sessionBean.getValue(), equalTo("session"));
+    assertThat(requestBean.getValue(), nullValue());
+  }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/org.openbravo.base.weld/src-test/org/openbravo/base/weld/test/testinfrastructure/DalPersistanceEventTest.java	Fri Jan 22 08:42:24 2016 +0000
@@ -0,0 +1,65 @@
+/*
+ *************************************************************************
+ * 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) 2015 Openbravo SLU
+ * All Rights Reserved.
+ * Contributor(s):  ______________________________________.
+ ************************************************************************
+ */
+
+package org.openbravo.base.weld.test.testinfrastructure;
+
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.ExpectedException;
+import org.openbravo.base.exception.OBException;
+import org.openbravo.base.provider.OBProvider;
+import org.openbravo.base.weld.test.WeldBaseTest;
+import org.openbravo.dal.service.OBDal;
+import org.openbravo.erpCommon.utility.OBMessageUtils;
+import org.openbravo.model.common.geography.Country;
+
+/**
+ * Persistance observers require of cdi. Test cases covering observers are executed when using
+ * WeldBaseTest.
+ * 
+ * @author alostale
+ *
+ */
+public class DalPersistanceEventTest extends WeldBaseTest {
+  @Rule
+  public ExpectedException exception = ExpectedException.none();
+
+  @Test
+  public void persisntaceObserversShouldBeExecuted() {
+    try {
+      setSystemAdministratorContext();
+      Country newCountry = OBProvider.getInstance().get(Country.class);
+      newCountry.setName("Wonderland");
+      newCountry.setISOCountryCode("WL");
+      newCountry.setAddressPrintFormat("-");
+
+      newCountry.setDateformat("invalid date format");
+
+      // expecting exception thrown by by persistance observer, it will be thrown only if it is
+      // executed
+      exception.expect(OBException.class);
+      exception.expectMessage(OBMessageUtils.messageBD("InvalidDateFormat"));
+
+      OBDal.getInstance().save(newCountry);
+      OBDal.getInstance().flush();
+    } finally {
+      OBDal.getInstance().rollbackAndClose();
+    }
+  }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/org.openbravo.base.weld/src-test/org/openbravo/base/weld/test/testinfrastructure/ParameterizedCdi.java	Fri Jan 22 08:42:24 2016 +0000
@@ -0,0 +1,88 @@
+/*
+ *************************************************************************
+ * 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) 2015 Openbravo SLU
+ * All Rights Reserved.
+ * Contributor(s):  ______________________________________.
+ ************************************************************************
+ */
+
+package org.openbravo.base.weld.test.testinfrastructure;
+
+import static org.hamcrest.CoreMatchers.equalTo;
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+import java.util.Arrays;
+import java.util.List;
+
+import org.junit.AfterClass;
+import org.junit.Rule;
+import org.junit.Test;
+import org.openbravo.base.weld.test.ParameterCdiTest;
+import org.openbravo.base.weld.test.ParameterCdiTestRule;
+import org.openbravo.base.weld.test.WeldBaseTest;
+
+/**
+ * Test cases checking test case parameterization with cdi.
+ * 
+ * @author alostale
+ *
+ */
+public class ParameterizedCdi extends WeldBaseTest {
+  public static final List<String> PARAMS = Arrays.asList("param1", "param2", "param3");
+
+  /** defines the values the parameter will take. */
+  @Rule
+  public ParameterCdiTestRule<String> parameterValuesRule = new ParameterCdiTestRule<String>(
+      PARAMS);
+
+  /** this field will take the values defined by parameterValuesRule field. */
+  private @ParameterCdiTest String parameter;
+
+  private static int counterTest1 = 0;
+  private static int counterTest2 = 0;
+  private static String test1Execution = "";
+  private static String test2Execution = "";
+
+  /** Test case to be executed once per parameter value */
+  @Test
+  public void test1() {
+    assertThat("parameter value", parameter, equalTo(PARAMS.get(counterTest1)));
+    counterTest1++;
+    test1Execution += parameter;
+  }
+
+  /** Test case to be executed once per parameter value */
+  @Test
+  public void test2() {
+    assertThat("parameter value", parameter, equalTo(PARAMS.get(counterTest2)));
+
+    counterTest2++;
+    test2Execution += parameter;
+  }
+
+  /** Checks the previous test cases were executed as many times as parameter values in the list. */
+  @AfterClass
+  public static void testsShouldBeExecutedOncePerParameter() {
+    String expectedValue = "";
+    for (String paramValue : PARAMS) {
+      expectedValue += paramValue;
+    }
+    assertThat("# of executions for test 1", PARAMS.size(), is(counterTest1));
+    assertThat("# of executions for test 2", PARAMS.size(), is(counterTest2));
+
+    assertThat("test 1 result", test1Execution, equalTo(expectedValue));
+    assertThat("test 2 result", test2Execution, equalTo(expectedValue));
+  }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/org.openbravo.base.weld/src-test/org/openbravo/base/weld/test/testinfrastructure/RequestScopedBean.java	Fri Jan 22 08:42:24 2016 +0000
@@ -0,0 +1,36 @@
+/*
+ *************************************************************************
+ * 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) 2015 Openbravo SLU
+ * All Rights Reserved.
+ * Contributor(s):  ______________________________________.
+ ************************************************************************
+ */
+
+package org.openbravo.base.weld.test.testinfrastructure;
+
+import javax.enterprise.context.RequestScoped;
+
+/** Simple request scoped bean */
+@RequestScoped
+public class RequestScopedBean {
+  private String value;
+
+  public void setValue(String value) {
+    this.value = value;
+  }
+
+  public String getValue() {
+    return value;
+  }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/org.openbravo.base.weld/src-test/org/openbravo/base/weld/test/testinfrastructure/SessionScopedBean.java	Fri Jan 22 08:42:24 2016 +0000
@@ -0,0 +1,40 @@
+/*
+ *************************************************************************
+ * 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) 2015 Openbravo SLU
+ * All Rights Reserved.
+ * Contributor(s):  ______________________________________.
+ ************************************************************************
+ */
+
+package org.openbravo.base.weld.test.testinfrastructure;
+
+import java.io.Serializable;
+
+import javax.enterprise.context.SessionScoped;
+
+/** Simple session scoped bean */
+@SuppressWarnings("serial")
+@SessionScoped
+public class SessionScopedBean implements Serializable {
+  private String value;
+
+  public void setValue(String value) {
+    this.value = value;
+  }
+
+  public String getValue() {
+    return value;
+  }
+
+}
--- a/modules/org.openbravo.client.application/src-db/database/model/functions/OBUIAPP_LANGUAGE_CREATE.xml	Thu Jan 21 09:06:30 2016 +0000
+++ b/modules/org.openbravo.client.application/src-db/database/model/functions/OBUIAPP_LANGUAGE_CREATE.xml	Fri Jan 22 08:42:24 2016 +0000
@@ -16,7 +16,7 @@
 * under the License.
 * The Original Code is Openbravo ERP.
 * The Initial Developer of the Original Code is Openbravo SLU
-* All portions are Copyright (C) 2010 Openbravo SLU
+* All portions are Copyright (C) 2010-2015 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
@@ -47,6 +47,26 @@
 
     v_rowcount:=SQL%ROWCOUNT;
     DBMS_OUTPUT.PUT_LINE('- OBUIAPP_LANGUAGE_CREATE: OBUIAPP_Parameter_Trl ' || v_rowcount);
+    -- Process Definition
+    INSERT
+    INTO OBUIAPP_Process_Trl
+      (
+        OBUIAPP_Process_Trl_ID, OBUIAPP_Process_ID, AD_Language, Name, Description,
+        Help, IsTranslated, Createdby, UpdatedBy,
+        AD_Client_ID, AD_Org_ID
+      )
+    SELECT get_uuid(), OBUIAPP_Process_ID, AD_Language.AD_Language, OBUIAPP_Process.Name, OBUIAPP_Process.Description, OBUIAPP_Process.Help, 'N', '0', '0', '0', '0'
+    FROM OBUIAPP_Process, AD_Language, AD_Module M
+    WHERE AD_Language.IsActive='Y'  
+    AND AD_Language.IsSystemLanguage='Y'  
+    AND M.AD_MODULE_ID = OBUIAPP_Process.AD_MODULE_ID
+    AND M.AD_LANGUAGE != AD_Language.AD_Language
+    AND NOT EXISTS (SELECT 1 FROM OBUIAPP_Process_trl
+                 WHERE OBUIAPP_Process_ID = OBUIAPP_Process.OBUIAPP_Process_ID
+                   AND AD_LANGUAGE = AD_Language.AD_Language);
+
+    v_rowcount:=SQL%ROWCOUNT;
+    DBMS_OUTPUT.PUT_LINE('- OBUIAPP_Process ' || v_rowcount) ;
 END OBUIAPP_LANGUAGE_CREATE
 ]]></body>
     </function>
--- a/modules/org.openbravo.client.application/src-db/database/model/tables/OBUIAPP_GC_FIELD.xml	Thu Jan 21 09:06:30 2016 +0000
+++ b/modules/org.openbravo.client.application/src-db/database/model/tables/OBUIAPP_GC_FIELD.xml	Fri Jan 22 08:42:24 2016 +0000
@@ -65,6 +65,14 @@
         <default><![CDATA[D]]></default>
         <onCreateDefault><![CDATA['D']]></onCreateDefault>
       </column>
+      <column name="ISFKDROPDOWNUNFILTERED" primaryKey="false" required="true" type="VARCHAR" size="60" autoIncrement="false">
+        <default><![CDATA[D]]></default>
+        <onCreateDefault/>
+      </column>
+      <column name="DISABLEFKCOMBO" primaryKey="false" required="true" type="VARCHAR" size="60" autoIncrement="false">
+        <default><![CDATA[D]]></default>
+        <onCreateDefault/>
+      </column>
       <foreign-key foreignTable="AD_CLIENT" name="OBUIAPP_GC_FIELD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
--- a/modules/org.openbravo.client.application/src-db/database/model/tables/OBUIAPP_GC_SYSTEM.xml	Thu Jan 21 09:06:30 2016 +0000
+++ b/modules/org.openbravo.client.application/src-db/database/model/tables/OBUIAPP_GC_SYSTEM.xml	Fri Jan 22 08:42:24 2016 +0000
@@ -61,6 +61,14 @@
         <default><![CDATA[Y]]></default>
         <onCreateDefault><![CDATA['Y']]></onCreateDefault>
       </column>
+      <column name="ISFKDROPDOWNUNFILTERED" primaryKey="false" required="true" type="CHAR" size="1" autoIncrement="false">
+        <default><![CDATA[N]]></default>
+        <onCreateDefault/>
+      </column>
+      <column name="DISABLEFKCOMBO" primaryKey="false" required="true" type="CHAR" size="1" autoIncrement="false">
+        <default><![CDATA[N]]></default>
+        <onCreateDefault/>
+      </column>
       <foreign-key foreignTable="AD_CLIENT" name="OBUIAPP_GC_SYSTEM_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
@@ -70,9 +78,11 @@
       <unique name="OBUIAPP_GC_SYS_UNIQUE_CLIENT">
         <unique-column name="AD_CLIENT_ID"/>
       </unique>
+      <check name="OBUIAPP_GC_SYS_DISCOMBO_CHK"><![CDATA[DISABLEFKCOMBO IN ('Y', 'N')]]></check>
       <check name="OBUIAPP_GC_SYS_ISFILT_CHK"><![CDATA[ISFILTERABLE IN ('Y', 'N')]]></check>
       <check name="OBUIAPP_GC_SYS_ISLAZY_CHK"><![CDATA[ISLAZYFILTERING IN ('Y', 'N')]]></check>
       <check name="OBUIAPP_GC_SYS_ISSORT_CHK"><![CDATA[ISSORTABLE IN ('Y', 'N')]]></check>
       <check name="OBUIAPP_GC_SYS_ONCHNG_CHK"><![CDATA[FILTERONCHANGE IN ('Y', 'N')]]></check>
+      <check name="OBUIAPP_GC_SYS_UNFILTDD_CHK"><![CDATA[ISFKDROPDOWNUNFILTERED IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/modules/org.openbravo.client.application/src-db/database/model/tables/OBUIAPP_GC_TAB.xml	Thu Jan 21 09:06:30 2016 +0000
+++ b/modules/org.openbravo.client.application/src-db/database/model/tables/OBUIAPP_GC_TAB.xml	Fri Jan 22 08:42:24 2016 +0000
@@ -65,6 +65,14 @@
         <default><![CDATA[D]]></default>
         <onCreateDefault><![CDATA['D']]></onCreateDefault>
       </column>
+      <column name="ISFKDROPDOWNUNFILTERED" primaryKey="false" required="true" type="VARCHAR" size="60" autoIncrement="false">
+        <default><![CDATA[D]]></default>
+        <onCreateDefault/>
+      </column>
+      <column name="DISABLEFKCOMBO" primaryKey="false" required="true" type="VARCHAR" size="60" autoIncrement="false">
+        <default><![CDATA[D]]></default>
+        <onCreateDefault/>
+      </column>
       <foreign-key foreignTable="AD_CLIENT" name="OBUIAPP_GC_TAB_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
--- a/modules/org.openbravo.client.application/src-db/database/model/tables/OBUIAPP_PARAMETER.xml	Thu Jan 21 09:06:30 2016 +0000
+++ b/modules/org.openbravo.client.application/src-db/database/model/tables/OBUIAPP_PARAMETER.xml	Fri Jan 22 08:42:24 2016 +0000
@@ -178,6 +178,6 @@
       <check name="OBUIAPP_PARAMETER_ISFIXED_CHK"><![CDATA[ISFIXED IN ('Y', 'N')]]></check>
       <check name="OBUIAPP_PARAMETER_MANDAT_CHK"><![CDATA[ISMANDATORY IN ('Y', 'N')]]></check>
       <check name="OBUIAPP_PARAMETER_NEWLINE_CHK"><![CDATA[STARTINNEWLINE IN ('Y', 'N')]]></check>
-      <check name="OBUIAPP_PARAMETER_NUMCOL_CHK"><![CDATA[(NUMCOLUMN >= 1) AND (NUMCOLUMN <= 4)]]></check>
+      <check name="OBUIAPP_PARAMETER_NUMCOL_CHK"><![CDATA[NUMCOLUMN >= 1 AND NUMCOLUMN <= 4]]></check>
     </table>
   </database>
--- a/modules/org.openbravo.client.application/src-db/database/model/tables/OBUIAPP_PROCESS_ACCESS.xml	Thu Jan 21 09:06:30 2016 +0000
+++ b/modules/org.openbravo.client.application/src-db/database/model/tables/OBUIAPP_PROCESS_ACCESS.xml	Fri Jan 22 08:42:24 2016 +0000
@@ -45,6 +45,13 @@
         <default><![CDATA[Y]]></default>
         <onCreateDefault/>
       </column>
+      <column name="INHERITED_FROM" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
+        <default/>
+        <onCreateDefault/>
+      </column>
+      <foreign-key foreignTable="AD_ROLE" name="OBUIAPP_PROC_ACC_INH_FROM">
+        <reference local="INHERITED_FROM" foreign="AD_ROLE_ID"/>
+      </foreign-key>
       <foreign-key foreignTable="AD_ROLE" name="OBUIAPP_PROC_ACCESS_AD_ROLE" onDelete="cascade">
         <reference local="AD_ROLE_ID" foreign="AD_ROLE_ID"/>
       </foreign-key>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/org.openbravo.client.application/src-db/database/model/tables/OBUIAPP_PROCESS_TRL.xml	Fri Jan 22 08:42:24 2016 +0000
@@ -0,0 +1,79 @@
+<?xml version="1.0"?>
+  <database name="TABLE OBUIAPP_PROCESS_TRL">
+    <table name="OBUIAPP_PROCESS_TRL" primaryKey="OBUIAPP_PROC_TRL_KEY">
+      <column name="OBUIAPP_PROCESS_TRL_ID" primaryKey="true" required="true" type="VARCHAR" size="32" autoIncrement="false">
+        <default/>
+        <onCreateDefault/>
+      </column>
+      <column name="OBUIAPP_PROCESS_ID" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
+        <default/>
+        <onCreateDefault/>
+      </column>
+      <column name="AD_LANGUAGE" primaryKey="false" required="true" type="VARCHAR" size="6" autoIncrement="false">
+        <default/>
+        <onCreateDefault/>
+      </column>
+      <column name="AD_CLIENT_ID" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
+        <default/>
+        <onCreateDefault/>
+      </column>
+      <column name="AD_ORG_ID" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
+        <default/>
+        <onCreateDefault/>
+      </column>
+      <column name="ISACTIVE" primaryKey="false" required="true" type="CHAR" size="1" autoIncrement="false">
+        <default><![CDATA[Y]]></default>
+        <onCreateDefault/>
+      </column>
+      <column name="CREATED" primaryKey="false" required="true" type="TIMESTAMP" size="7" autoIncrement="false">
+        <default><![CDATA[SYSDATE]]></default>
+        <onCreateDefault/>
+      </column>
+      <column name="CREATEDBY" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
+        <default/>
+        <onCreateDefault/>
+      </column>
+      <column name="UPDATED" primaryKey="false" required="true" type="TIMESTAMP" size="7" autoIncrement="false">
+        <default><![CDATA[SYSDATE]]></default>
+        <onCreateDefault/>
+      </column>
+      <column name="UPDATEDBY" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
+        <default/>
+        <onCreateDefault/>
+      </column>
+      <column name="NAME" primaryKey="false" required="true" type="VARCHAR" size="60" autoIncrement="false">
+        <default/>
+        <onCreateDefault/>
+      </column>
+      <column name="DESCRIPTION" primaryKey="false" required="false" type="VARCHAR" size="255" autoIncrement="false">
+        <default/>
+        <onCreateDefault/>
+      </column>
+      <column name="HELP" primaryKey="false" required="false" type="VARCHAR" size="2000" autoIncrement="false">
+        <default/>
+        <onCreateDefault/>
+      </column>
+      <column name="ISTRANSLATED" primaryKey="false" required="true" type="CHAR" size="1" autoIncrement="false">
+        <default><![CDATA[N]]></default>
+        <onCreateDefault/>
+      </column>
+      <foreign-key foreignTable="AD_CLIENT" name="OBUIAPP_PROC_TRL_AD_CLIENT">
+        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_ORG" name="OBUIAPP_PROC_TRL_AD_ORG">
+        <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_LANGUAGE" name="OBUIAPP_PROC_TRL_LANG">
+        <reference local="AD_LANGUAGE" foreign="AD_LANGUAGE"/>
+      </foreign-key>
+      <foreign-key foreignTable="OBUIAPP_PROCESS" name="OBUIAPP_PROCTRL" onDelete="cascade">
+        <reference local="OBUIAPP_PROCESS_ID" foreign="OBUIAPP_PROCESS_ID"/>
+      </foreign-key>
+      <unique name="OBUIAPP_PROC_TRL_PROC_LANG_UN">
+        <unique-column name="OBUIAPP_PROCESS_ID"/>
+        <unique-column name="AD_LANGUAGE"/>
+      </unique>
+      <check name="OBUIAPP_PROC_TRL_ISACTIVE_CHK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
+      <check name="OBUIAPP_PROC_TRL_ISTRANS_CHK"><![CDATA[ISTRANSLATED IN ('Y', 'N')]]></check>
+    </table>
+  </database>
--- a/modules/org.openbravo.client.application/src-db/database/model/tables/OBUIAPP_REPORT.xml	Thu Jan 21 09:06:30 2016 +0000
+++ b/modules/org.openbravo.client.application/src-db/database/model/tables/OBUIAPP_REPORT.xml	Fri Jan 22 08:42:24 2016 +0000
@@ -63,6 +63,6 @@
       </unique>
       <check name="OBUIAPP_REPORT_ISACTIVE_CHK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
       <check name="OBUIAPP_REPORT_PDF_AS_XLS_CHK"><![CDATA[USE_PDF_AS_XLS_TEMPLATE IN ('Y', 'N')]]></check>
-      <check name="OBUIAPP_REPORT_TMP_CHK"><![CDATA[(PDF_TEMPLATE IS NOT NULL) OR (XLS_TEMPLATE IS NOT NULL)]]></check>
+      <check name="OBUIAPP_REPORT_TMP_CHK"><![CDATA[PDF_TEMPLATE IS NOT NULL OR XLS_TEMPLATE IS NOT NULL]]></check>
     </table>
   </database>
--- a/modules/org.openbravo.client.application/src-db/database/model/tables/OBUIAPP_VIEW_ROLE_ACCESS.xml	Thu Jan 21 09:06:30 2016 +0000
+++ b/modules/org.openbravo.client.application/src-db/database/model/tables/OBUIAPP_VIEW_ROLE_ACCESS.xml	Fri Jan 22 08:42:24 2016 +0000
@@ -41,6 +41,10 @@
         <default/>
         <onCreateDefault/>
       </column>
+      <column name="INHERITED_FROM" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
+        <default/>
+        <onCreateDefault/>
+      </column>
       <foreign-key foreignTable="AD_CLIENT" name="OBUIAPP_VIRA_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
@@ -50,6 +54,9 @@
       <foreign-key foreignTable="AD_ROLE" name="OBUIAPP_VIRA_AD_ROLE" onDelete="cascade">
         <reference local="AD_ROLE_ID" foreign="AD_ROLE_ID"/>
       </foreign-key>
+      <foreign-key foreignTable="AD_ROLE" name="OBUIAPP_VIRA_INH_FROM">
+        <reference local="INHERITED_FROM" foreign="AD_ROLE_ID"/>
+      </foreign-key>
       <foreign-key foreignTable="OBUIAPP_VIEW_IMPL" name="OBUIAPP_VIRA_VIEW" onDelete="cascade">
         <reference local="OBUIAPP_VIEW_IMPL_ID" foreign="OBUIAPP_VIEW_IMPL_ID"/>
       </foreign-key>
--- a/modules/org.openbravo.client.application/src-db/database/model/triggers/OBUIAPP_AD_FIELD_MOD_TRG.xml	Thu Jan 21 09:06:30 2016 +0000
+++ b/modules/org.openbravo.client.application/src-db/database/model/triggers/OBUIAPP_AD_FIELD_MOD_TRG.xml	Fri Jan 22 08:42:24 2016 +0000
@@ -22,7 +22,6 @@
   devTemplate NUMBER;
   devModule   CHAR(1);
   cuerrentModuleID  VARCHAR2(32);
-  vAux NUMBER;
     
 BEGIN
     
--- a/modules/org.openbravo.client.application/src-db/database/model/triggers/OBUIAPP_MENU_PARAM_MOD_TRG.xml	Thu Jan 21 09:06:30 2016 +0000
+++ b/modules/org.openbravo.client.application/src-db/database/model/triggers/OBUIAPP_MENU_PARAM_MOD_TRG.xml	Fri Jan 22 08:42:24 2016 +0000
@@ -20,8 +20,6 @@
 * Contributor(s):  ______________________________________.
 ************************************************************************/
   devTemplate NUMBER;
-  fieldCount NUMBER;
-  selectorCount NUMBER;
   devModule   CHAR(1);
   currentModuleID  VARCHAR2(32);
   vAux NUMBER;
--- a/modules/org.openbravo.client.application/src-db/database/model/triggers/OBUIAPP_PARAMETER_MOD_TRG.xml	Thu Jan 21 09:06:30 2016 +0000
+++ b/modules/org.openbravo.client.application/src-db/database/model/triggers/OBUIAPP_PARAMETER_MOD_TRG.xml	Fri Jan 22 08:42:24 2016 +0000
@@ -20,8 +20,6 @@
 * Contributor(s):  ______________________________________.
 ************************************************************************/
   devTemplate NUMBER;
-  fieldCount NUMBER;
-  selectorCount NUMBER;
   devModule   CHAR(1);
   currentModuleID  VARCHAR2(32);
   vAux NUMBER;
--- a/modules/org.openbravo.client.application/src-db/database/model/triggers/OBUIAPP_PROCESS_TRG.xml	Thu Jan 21 09:06:30 2016 +0000
+++ b/modules/org.openbravo.client.application/src-db/database/model/triggers/OBUIAPP_PROCESS_TRG.xml	Fri Jan 22 08:42:24 2016 +0000
@@ -15,7 +15,7 @@
 * under the License.
 * The Original Code is Openbravo ERP.
 * The Initial Developer of the Original Code is Openbravo SLU
-* All portions are Copyright (C) 2012 Openbravo SLU
+* All portions are Copyright (C) 2012-2015 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
@@ -43,8 +43,36 @@
           OR
           (R.USERLEVEL = '  O' AND :new.ACCESSLEVEL IN ('3','1','7'))
         );
+
+	INSERT INTO OBUIAPP_process_trl  
+             (OBUIAPP_PROCESS_TRL_ID, AD_CLIENT_ID, AD_ORG_ID               ,
+              ISACTIVE                , CREATED     , CREATEDBY               ,
+              UPDATED                 , UPDATEDBY   , OBUIAPP_PROCESS_ID    ,
+              NAME                    , DESCRIPTION , HELP                    ,
+              ISTRANSLATED            , AD_LANGUAGE)
+       SELECT get_uuid()              , :new.AD_CLIENT_ID, :new.AD_ORG_ID     ,
+              :new.ISACTIVE           , now()     , :new.CreatedBy           ,
+              now()                   , :new.UpdatedBy, :new.OBUIAPP_PROCESS_ID,
+              :new.NAME               , :new.DESCRIPTION , :new.HELP             ,
+              'N'                     , l.AD_LANGUAGE
+         FROM AD_Language l, AD_Module m
+        WHERE l.isActive = 'Y'
+          AND l.IsSystemLanguage='Y'
+          AND m.AD_Module_ID = :new.AD_Module_ID
+          AND M.AD_Language != l.AD_Language;
   END IF;
 
+    IF UPDATING THEN
+      IF coalesce(:new.NAME,'.') != coalesce(:old.NAME,'.')
+         or coalesce(:new.description, '.') != coalesce(:old.description, '.')
+         or coalesce(:new.help, '.') != coalesce(:old.help, '.') THEN
+         UPDATE OBUIAPP_process_trl
+            SET IsTranslated='N',
+                Updated=now()
+          WHERE OBUIAPP_PROCESS_ID=:new.OBUIAPP_PROCESS_ID;
+      END IF;
+    END IF;
+
 END OBUIAPP_PROCESS_TRG
 ]]></body>
     </trigger>
--- a/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_COLUMN.xml	Thu Jan 21 09:06:30 2016 +0000
+++ b/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_COLUMN.xml	Fri Jan 22 08:42:24 2016 +0000
@@ -180,6 +180,42 @@
 <!--01F2D2DBBDA14758982AA7386FA8FF72-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
 <!--01F2D2DBBDA14758982AA7386FA8FF72--></AD_COLUMN>
 
+<!--02CB84907EA844568D4CE3597E1D6C69--><AD_COLUMN>
+<!--02CB84907EA844568D4CE3597E1D6C69-->  <AD_COLUMN_ID><![CDATA[02CB84907EA844568D4CE3597E1D6C69]]></AD_COLUMN_ID>
+<!--02CB84907EA844568D4CE3597E1D6C69-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--02CB84907EA844568D4CE3597E1D6C69-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--02CB84907EA844568D4CE3597E1D6C69-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--02CB84907EA844568D4CE3597E1D6C69-->  <NAME><![CDATA[DisableFkCombo]]></NAME>
+<!--02CB84907EA844568D4CE3597E1D6C69-->  <DESCRIPTION><![CDATA[If this flag is checked, the foreign key combo will be disabled and the column will be filtered like a standard text column]]></DESCRIPTION>
+<!--02CB84907EA844568D4CE3597E1D6C69-->  <HELP><![CDATA[If this flag is checked, the foreign key combo will be disabled and the column will be filtered like a standard text column]]></HELP>
+<!--02CB84907EA844568D4CE3597E1D6C69-->  <COLUMNNAME><![CDATA[Disablefkcombo]]></COLUMNNAME>
+<!--02CB84907EA844568D4CE3597E1D6C69-->  <AD_TABLE_ID><![CDATA[5D50320222DD4865ADFD50364C84291D]]></AD_TABLE_ID>
+<!--02CB84907EA844568D4CE3597E1D6C69-->  <AD_REFERENCE_ID><![CDATA[20]]></AD_REFERENCE_ID>
+<!--02CB84907EA844568D4CE3597E1D6C69-->  <FIELDLENGTH><![CDATA[1]]></FIELDLENGTH>
+<!--02CB84907EA844568D4CE3597E1D6C69-->  <DEFAULTVALUE><![CDATA[N]]></DEFAULTVALUE>
+<!--02CB84907EA844568D4CE3597E1D6C69-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--02CB84907EA844568D4CE3597E1D6C69-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--02CB84907EA844568D4CE3597E1D6C69-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
+<!--02CB84907EA844568D4CE3597E1D6C69-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--02CB84907EA844568D4CE3597E1D6C69-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--02CB84907EA844568D4CE3597E1D6C69-->  <SEQNO><![CDATA[170]]></SEQNO>
+<!--02CB84907EA844568D4CE3597E1D6C69-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--02CB84907EA844568D4CE3597E1D6C69-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--02CB84907EA844568D4CE3597E1D6C69-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--02CB84907EA844568D4CE3597E1D6C69-->  <AD_ELEMENT_ID><![CDATA[1185A82966EA40ABA990B5DDBD9B8FBA]]></AD_ELEMENT_ID>
+<!--02CB84907EA844568D4CE3597E1D6C69-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--02CB84907EA844568D4CE3597E1D6C69-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--02CB84907EA844568D4CE3597E1D6C69-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--02CB84907EA844568D4CE3597E1D6C69-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--02CB84907EA844568D4CE3597E1D6C69-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--02CB84907EA844568D4CE3597E1D6C69-->  <POSITION><![CDATA[17]]></POSITION>
+<!--02CB84907EA844568D4CE3597E1D6C69-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--02CB84907EA844568D4CE3597E1D6C69-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
+<!--02CB84907EA844568D4CE3597E1D6C69-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
+<!--02CB84907EA844568D4CE3597E1D6C69-->  <IMAGESIZEVALUESACTION><![CDATA[N]]></IMAGESIZEVALUESACTION>
+<!--02CB84907EA844568D4CE3597E1D6C69-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
+<!--02CB84907EA844568D4CE3597E1D6C69--></AD_COLUMN>
+
 <!--03BD4945FDC64CF5AB4CD37BE6A74F81--><AD_COLUMN>
 <!--03BD4945FDC64CF5AB4CD37BE6A74F81-->  <AD_COLUMN_ID><![CDATA[03BD4945FDC64CF5AB4CD37BE6A74F81]]></AD_COLUMN_ID>
 <!--03BD4945FDC64CF5AB4CD37BE6A74F81-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -938,6 +974,7 @@
 <!--10565D81EA4146F7AAE0293D387B6DC2-->  <ISPARENT><![CDATA[Y]]></ISPARENT>
 <!--10565D81EA4146F7AAE0293D387B6DC2-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
 <!--10565D81EA4146F7AAE0293D387B6DC2-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--10565D81EA4146F7AAE0293D387B6DC2-->  <READONLYLOGIC><![CDATA[@Inherited_From@!null & @Inherited_From@!'']]></READONLYLOGIC>
 <!--10565D81EA4146F7AAE0293D387B6DC2-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
 <!--10565D81EA4146F7AAE0293D387B6DC2-->  <SEQNO><![CDATA[20]]></SEQNO>
 <!--10565D81EA4146F7AAE0293D387B6DC2-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
@@ -1229,6 +1266,7 @@
 <!--178D324AD10947149B7F79F140AA6832-->  <ISPARENT><![CDATA[Y]]></ISPARENT>
 <!--178D324AD10947149B7F79F140AA6832-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
 <!--178D324AD10947149B7F79F140AA6832-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--178D324AD10947149B7F79F140AA6832-->  <READONLYLOGIC><![CDATA[@Inherited_From@!null & @Inherited_From@!'']]></READONLYLOGIC>
 <!--178D324AD10947149B7F79F140AA6832-->  <ISIDENTIFIER><![CDATA[Y]]></ISIDENTIFIER>
 <!--178D324AD10947149B7F79F140AA6832-->  <SEQNO><![CDATA[30]]></SEQNO>
 <!--178D324AD10947149B7F79F140AA6832-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
@@ -1283,6 +1321,42 @@
 <!--182023ADC5294B6C87123A6AF98F567D-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
 <!--182023ADC5294B6C87123A6AF98F567D--></AD_COLUMN>
 
+<!--1A77A5644CA147E3BF106CC162287E04--><AD_COLUMN>
+<!--1A77A5644CA147E3BF106CC162287E04-->  <AD_COLUMN_ID><![CDATA[1A77A5644CA147E3BF106CC162287E04]]></AD_COLUMN_ID>
+<!--1A77A5644CA147E3BF106CC162287E04-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--1A77A5644CA147E3BF106CC162287E04-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--1A77A5644CA147E3BF106CC162287E04-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--1A77A5644CA147E3BF106CC162287E04-->  <NAME><![CDATA[Client]]></NAME>
+<!--1A77A5644CA147E3BF106CC162287E04-->  <DESCRIPTION><![CDATA[Client for this installation.]]></DESCRIPTION>
+<!--1A77A5644CA147E3BF106CC162287E04-->  <HELP><![CDATA[A Client is a company or a legal entity. You cannot share data between Clients.]]></HELP>
+<!--1A77A5644CA147E3BF106CC162287E04-->  <COLUMNNAME><![CDATA[AD_Client_ID]]></COLUMNNAME>
+<!--1A77A5644CA147E3BF106CC162287E04-->  <AD_TABLE_ID><![CDATA[0F213FB4B2D24B1D9DA551AC10B20084]]></AD_TABLE_ID>
+<!--1A77A5644CA147E3BF106CC162287E04-->  <AD_REFERENCE_ID><![CDATA[19]]></AD_REFERENCE_ID>
+<!--1A77A5644CA147E3BF106CC162287E04-->  <FIELDLENGTH><![CDATA[32]]></FIELDLENGTH>
+<!--1A77A5644CA147E3BF106CC162287E04-->  <DEFAULTVALUE><![CDATA[@AD_CLIENT_ID@]]></DEFAULTVALUE>
+<!--1A77A5644CA147E3BF106CC162287E04-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--1A77A5644CA147E3BF106CC162287E04-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--1A77A5644CA147E3BF106CC162287E04-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
+<!--1A77A5644CA147E3BF106CC162287E04-->  <ISUPDATEABLE><![CDATA[N]]></ISUPDATEABLE>
+<!--1A77A5644CA147E3BF106CC162287E04-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--1A77A5644CA147E3BF106CC162287E04-->  <SEQNO><![CDATA[40]]></SEQNO>
+<!--1A77A5644CA147E3BF106CC162287E04-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--1A77A5644CA147E3BF106CC162287E04-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--1A77A5644CA147E3BF106CC162287E04-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--1A77A5644CA147E3BF106CC162287E04-->  <AD_ELEMENT_ID><![CDATA[102]]></AD_ELEMENT_ID>
+<!--1A77A5644CA147E3BF106CC162287E04-->  <ISSESSIONATTR><![CDATA[Y]]></ISSESSIONATTR>
+<!--1A77A5644CA147E3BF106CC162287E04-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--1A77A5644CA147E3BF106CC162287E04-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--1A77A5644CA147E3BF106CC162287E04-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--1A77A5644CA147E3BF106CC162287E04-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--1A77A5644CA147E3BF106CC162287E04-->  <POSITION><![CDATA[4]]></POSITION>
+<!--1A77A5644CA147E3BF106CC162287E04-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--1A77A5644CA147E3BF106CC162287E04-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
+<!--1A77A5644CA147E3BF106CC162287E04-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
+<!--1A77A5644CA147E3BF106CC162287E04-->  <IMAGESIZEVALUESACTION><![CDATA[N]]></IMAGESIZEVALUESACTION>
+<!--1A77A5644CA147E3BF106CC162287E04-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
+<!--1A77A5644CA147E3BF106CC162287E04--></AD_COLUMN>
+
 <!--1A96C47A27AC49D7BEA41E57BBD59948--><AD_COLUMN>
 <!--1A96C47A27AC49D7BEA41E57BBD59948-->  <AD_COLUMN_ID><![CDATA[1A96C47A27AC49D7BEA41E57BBD59948]]></AD_COLUMN_ID>
 <!--1A96C47A27AC49D7BEA41E57BBD59948-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -1443,6 +1517,7 @@
 <!--1CDF3C8D2257415EAFD816DB1CEAFE7E-->  <ISPARENT><![CDATA[N]]></ISPARENT>
 <!--1CDF3C8D2257415EAFD816DB1CEAFE7E-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
 <!--1CDF3C8D2257415EAFD816DB1CEAFE7E-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--1CDF3C8D2257415EAFD816DB1CEAFE7E-->  <READONLYLOGIC><![CDATA[@Inherited_From@!null & @Inherited_From@!'']]></READONLYLOGIC>
 <!--1CDF3C8D2257415EAFD816DB1CEAFE7E-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
 <!--1CDF3C8D2257415EAFD816DB1CEAFE7E-->  <SEQNO><![CDATA[110]]></SEQNO>
 <!--1CDF3C8D2257415EAFD816DB1CEAFE7E-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
@@ -1922,6 +1997,42 @@
 <!--2DDCB67302B645219733425DA5964925-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
 <!--2DDCB67302B645219733425DA5964925--></AD_COLUMN>
 
+<!--2E8DBE2C037B4C34B3E84A7301754769--><AD_COLUMN>
+<!--2E8DBE2C037B4C34B3E84A7301754769-->  <AD_COLUMN_ID><![CDATA[2E8DBE2C037B4C34B3E84A7301754769]]></AD_COLUMN_ID>
+<!--2E8DBE2C037B4C34B3E84A7301754769-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--2E8DBE2C037B4C34B3E84A7301754769-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--2E8DBE2C037B4C34B3E84A7301754769-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--2E8DBE2C037B4C34B3E84A7301754769-->  <NAME><![CDATA[Translation]]></NAME>
+<!--2E8DBE2C037B4C34B3E84A7301754769-->  <DESCRIPTION><![CDATA[An indication that an item is translated.]]></DESCRIPTION>
+<!--2E8DBE2C037B4C34B3E84A7301754769-->  <HELP><![CDATA[The Translated checkbox indicates if this column is translated.]]></HELP>
+<!--2E8DBE2C037B4C34B3E84A7301754769-->  <COLUMNNAME><![CDATA[Istranslated]]></COLUMNNAME>
+<!--2E8DBE2C037B4C34B3E84A7301754769-->  <AD_TABLE_ID><![CDATA[0F213FB4B2D24B1D9DA551AC10B20084]]></AD_TABLE_ID>
+<!--2E8DBE2C037B4C34B3E84A7301754769-->  <AD_REFERENCE_ID><![CDATA[20]]></AD_REFERENCE_ID>
+<!--2E8DBE2C037B4C34B3E84A7301754769-->  <FIELDLENGTH><![CDATA[1]]></FIELDLENGTH>
+<!--2E8DBE2C037B4C34B3E84A7301754769-->  <DEFAULTVALUE><![CDATA[N]]></DEFAULTVALUE>
+<!--2E8DBE2C037B4C34B3E84A7301754769-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--2E8DBE2C037B4C34B3E84A7301754769-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--2E8DBE2C037B4C34B3E84A7301754769-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
+<!--2E8DBE2C037B4C34B3E84A7301754769-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--2E8DBE2C037B4C34B3E84A7301754769-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--2E8DBE2C037B4C34B3E84A7301754769-->  <SEQNO><![CDATA[140]]></SEQNO>
+<!--2E8DBE2C037B4C34B3E84A7301754769-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--2E8DBE2C037B4C34B3E84A7301754769-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--2E8DBE2C037B4C34B3E84A7301754769-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--2E8DBE2C037B4C34B3E84A7301754769-->  <AD_ELEMENT_ID><![CDATA[420]]></AD_ELEMENT_ID>
+<!--2E8DBE2C037B4C34B3E84A7301754769-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--2E8DBE2C037B4C34B3E84A7301754769-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--2E8DBE2C037B4C34B3E84A7301754769-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--2E8DBE2C037B4C34B3E84A7301754769-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--2E8DBE2C037B4C34B3E84A7301754769-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--2E8DBE2C037B4C34B3E84A7301754769-->  <POSITION><![CDATA[14]]></POSITION>
+<!--2E8DBE2C037B4C34B3E84A7301754769-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--2E8DBE2C037B4C34B3E84A7301754769-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
+<!--2E8DBE2C037B4C34B3E84A7301754769-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
+<!--2E8DBE2C037B4C34B3E84A7301754769-->  <IMAGESIZEVALUESACTION><![CDATA[N]]></IMAGESIZEVALUESACTION>
+<!--2E8DBE2C037B4C34B3E84A7301754769-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
+<!--2E8DBE2C037B4C34B3E84A7301754769--></AD_COLUMN>
+
 <!--2EEEAD8FA2C64DCDBF4C3E8CFECCCB58--><AD_COLUMN>
 <!--2EEEAD8FA2C64DCDBF4C3E8CFECCCB58-->  <AD_COLUMN_ID><![CDATA[2EEEAD8FA2C64DCDBF4C3E8CFECCCB58]]></AD_COLUMN_ID>
 <!--2EEEAD8FA2C64DCDBF4C3E8CFECCCB58-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -2470,6 +2581,42 @@
 <!--40BF5714171243E0BF9928C4D08E1B17-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
 <!--40BF5714171243E0BF9928C4D08E1B17--></AD_COLUMN>
 
+<!--40C3D2FBF24A4094B5061F1D6F64C8D2--><AD_COLUMN>
+<!--40C3D2FBF24A4094B5061F1D6F64C8D2-->  <AD_COLUMN_ID><![CDATA[40C3D2FBF24A4094B5061F1D6F64C8D2]]></AD_COLUMN_ID>
+<!--40C3D2FBF24A4094B5061F1D6F64C8D2-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--40C3D2FBF24A4094B5061F1D6F64C8D2-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--40C3D2FBF24A4094B5061F1D6F64C8D2-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--40C3D2FBF24A4094B5061F1D6F64C8D2-->  <NAME><![CDATA[IsFkDropDownUnfiltered]]></NAME>
+<!--40C3D2FBF24A4094B5061F1D6F64C8D2-->  <DESCRIPTION><![CDATA[If this flag if checked, the filter drop down will show the rows from the referenced table unfiltered by specific rows being referenced in the referencing table.]]></DESCRIPTION>
+<!--40C3D2FBF24A4094B5061F1D6F64C8D2-->  <HELP><![CDATA[If this flag if checked, the filter drop down will show the rows from the referenced table unfiltered by specific rows being referenced in the referencing table. The filters entered by the user in the grid filter editor will be applied.]]></HELP>
+<!--40C3D2FBF24A4094B5061F1D6F64C8D2-->  <COLUMNNAME><![CDATA[Isfkdropdownunfiltered]]></COLUMNNAME>
+<!--40C3D2FBF24A4094B5061F1D6F64C8D2-->  <AD_TABLE_ID><![CDATA[5D50320222DD4865ADFD50364C84291D]]></AD_TABLE_ID>
+<!--40C3D2FBF24A4094B5061F1D6F64C8D2-->  <AD_REFERENCE_ID><![CDATA[20]]></AD_REFERENCE_ID>
+<!--40C3D2FBF24A4094B5061F1D6F64C8D2-->  <FIELDLENGTH><![CDATA[1]]></FIELDLENGTH>
+<!--40C3D2FBF24A4094B5061F1D6F64C8D2-->  <DEFAULTVALUE><![CDATA[N]]></DEFAULTVALUE>
+<!--40C3D2FBF24A4094B5061F1D6F64C8D2-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--40C3D2FBF24A4094B5061F1D6F64C8D2-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--40C3D2FBF24A4094B5061F1D6F64C8D2-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
+<!--40C3D2FBF24A4094B5061F1D6F64C8D2-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--40C3D2FBF24A4094B5061F1D6F64C8D2-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--40C3D2FBF24A4094B5061F1D6F64C8D2-->  <SEQNO><![CDATA[160]]></SEQNO>
+<!--40C3D2FBF24A4094B5061F1D6F64C8D2-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--40C3D2FBF24A4094B5061F1D6F64C8D2-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--40C3D2FBF24A4094B5061F1D6F64C8D2-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--40C3D2FBF24A4094B5061F1D6F64C8D2-->  <AD_ELEMENT_ID><![CDATA[2D51BCE155184D34A5F38FFE515D5C23]]></AD_ELEMENT_ID>
+<!--40C3D2FBF24A4094B5061F1D6F64C8D2-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--40C3D2FBF24A4094B5061F1D6F64C8D2-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--40C3D2FBF24A4094B5061F1D6F64C8D2-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--40C3D2FBF24A4094B5061F1D6F64C8D2-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--40C3D2FBF24A4094B5061F1D6F64C8D2-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--40C3D2FBF24A4094B5061F1D6F64C8D2-->  <POSITION><![CDATA[16]]></POSITION>
+<!--40C3D2FBF24A4094B5061F1D6F64C8D2-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--40C3D2FBF24A4094B5061F1D6F64C8D2-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
+<!--40C3D2FBF24A4094B5061F1D6F64C8D2-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
+<!--40C3D2FBF24A4094B5061F1D6F64C8D2-->  <IMAGESIZEVALUESACTION><![CDATA[N]]></IMAGESIZEVALUESACTION>
+<!--40C3D2FBF24A4094B5061F1D6F64C8D2-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
+<!--40C3D2FBF24A4094B5061F1D6F64C8D2--></AD_COLUMN>
+
 <!--416B600071A3481FAFF4B9CE6EB2B991--><AD_COLUMN>
 <!--416B600071A3481FAFF4B9CE6EB2B991-->  <AD_COLUMN_ID><![CDATA[416B600071A3481FAFF4B9CE6EB2B991]]></AD_COLUMN_ID>
 <!--416B600071A3481FAFF4B9CE6EB2B991-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -2506,6 +2653,43 @@
 <!--416B600071A3481FAFF4B9CE6EB2B991-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
 <!--416B600071A3481FAFF4B9CE6EB2B991--></AD_COLUMN>
 
+<!--4651E1FC435744898055E3BE4D2F9A88--><AD_COLUMN>
+<!--4651E1FC435744898055E3BE4D2F9A88-->  <AD_COLUMN_ID><![CDATA[4651E1FC435744898055E3BE4D2F9A88]]></AD_COLUMN_ID>
+<!--4651E1FC435744898055E3BE4D2F9A88-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--4651E1FC435744898055E3BE4D2F9A88-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--4651E1FC435744898055E3BE4D2F9A88-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--4651E1FC435744898055E3BE4D2F9A88-->  <NAME><![CDATA[IsFkDropDownUnfiltered]]></NAME>
+<!--4651E1FC435744898055E3BE4D2F9A88-->  <DESCRIPTION><![CDATA[If this flag if checked, the filter drop down will show the rows from the referenced table unfiltered by specific rows being referenced in the referencing table.]]></DESCRIPTION>
+<!--4651E1FC435744898055E3BE4D2F9A88-->  <HELP><![CDATA[If this flag if checked, the filter drop down will show the rows from the referenced table unfiltered by specific rows being referenced in the referencing table. The filters entered by the user in the grid filter editor will be applied.]]></HELP>
+<!--4651E1FC435744898055E3BE4D2F9A88-->  <COLUMNNAME><![CDATA[Isfkdropdownunfiltered]]></COLUMNNAME>
+<!--4651E1FC435744898055E3BE4D2F9A88-->  <AD_TABLE_ID><![CDATA[8A16662B37184121A1EDAA89890E160C]]></AD_TABLE_ID>
+<!--4651E1FC435744898055E3BE4D2F9A88-->  <AD_REFERENCE_ID><![CDATA[17]]></AD_REFERENCE_ID>
+<!--4651E1FC435744898055E3BE4D2F9A88-->  <AD_REFERENCE_VALUE_ID><![CDATA[892231CFE03848758D74B0209B801C14]]></AD_REFERENCE_VALUE_ID>
+<!--4651E1FC435744898055E3BE4D2F9A88-->  <FIELDLENGTH><![CDATA[60]]></FIELDLENGTH>
+<!--4651E1FC435744898055E3BE4D2F9A88-->  <DEFAULTVALUE><![CDATA[D]]></DEFAULTVALUE>
+<!--4651E1FC435744898055E3BE4D2F9A88-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--4651E1FC435744898055E3BE4D2F9A88-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--4651E1FC435744898055E3BE4D2F9A88-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
+<!--4651E1FC435744898055E3BE4D2F9A88-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--4651E1FC435744898055E3BE4D2F9A88-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--4651E1FC435744898055E3BE4D2F9A88-->  <SEQNO><![CDATA[180]]></SEQNO>
+<!--4651E1FC435744898055E3BE4D2F9A88-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--4651E1FC435744898055E3BE4D2F9A88-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--4651E1FC435744898055E3BE4D2F9A88-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--4651E1FC435744898055E3BE4D2F9A88-->  <AD_ELEMENT_ID><![CDATA[2D51BCE155184D34A5F38FFE515D5C23]]></AD_ELEMENT_ID>
+<!--4651E1FC435744898055E3BE4D2F9A88-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--4651E1FC435744898055E3BE4D2F9A88-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--4651E1FC435744898055E3BE4D2F9A88-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--4651E1FC435744898055E3BE4D2F9A88-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--4651E1FC435744898055E3BE4D2F9A88-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--4651E1FC435744898055E3BE4D2F9A88-->  <POSITION><![CDATA[17]]></POSITION>
+<!--4651E1FC435744898055E3BE4D2F9A88-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--4651E1FC435744898055E3BE4D2F9A88-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
+<!--4651E1FC435744898055E3BE4D2F9A88-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
+<!--4651E1FC435744898055E3BE4D2F9A88-->  <IMAGESIZEVALUESACTION><![CDATA[N]]></IMAGESIZEVALUESACTION>
+<!--4651E1FC435744898055E3BE4D2F9A88-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
+<!--4651E1FC435744898055E3BE4D2F9A88--></AD_COLUMN>
+
 <!--4737ABA46AA14ACAB3BF0D8DB72F3EFE--><AD_COLUMN>
 <!--4737ABA46AA14ACAB3BF0D8DB72F3EFE-->  <AD_COLUMN_ID><![CDATA[4737ABA46AA14ACAB3BF0D8DB72F3EFE]]></AD_COLUMN_ID>
 <!--4737ABA46AA14ACAB3BF0D8DB72F3EFE-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -2542,6 +2726,78 @@
 <!--4737ABA46AA14ACAB3BF0D8DB72F3EFE-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
 <!--4737ABA46AA14ACAB3BF0D8DB72F3EFE--></AD_COLUMN>
 
+<!--48A069D3607C4ACEA7ACCBA679A00B75--><AD_COLUMN>
+<!--48A069D3607C4ACEA7ACCBA679A00B75-->  <AD_COLUMN_ID><![CDATA[48A069D3607C4ACEA7ACCBA679A00B75]]></AD_COLUMN_ID>
+<!--48A069D3607C4ACEA7ACCBA679A00B75-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--48A069D3607C4ACEA7ACCBA679A00B75-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--48A069D3607C4ACEA7ACCBA679A00B75-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--48A069D3607C4ACEA7ACCBA679A00B75-->  <NAME><![CDATA[IsFkDropdownUnfiltered]]></NAME>
+<!--48A069D3607C4ACEA7ACCBA679A00B75-->  <DESCRIPTION><![CDATA[If this flag if checked, the filter drop down will show the rows from the referenced table unfiltered by specific rows being referenced in the referencing table.]]></DESCRIPTION>
+<!--48A069D3607C4ACEA7ACCBA679A00B75-->  <HELP><![CDATA[If this flag if checked, the filter drop down will show the rows from the referenced table unfiltered by specific rows being referenced in the referencing table. The filters entered by the user in the grid filter editor will be applied.]]></HELP>
+<!--48A069D3607C4ACEA7ACCBA679A00B75-->  <COLUMNNAME><![CDATA[Isfkdropdownunfiltered]]></COLUMNNAME>
+<!--48A069D3607C4ACEA7ACCBA679A00B75-->  <AD_TABLE_ID><![CDATA[F167EB822B8A4284AC37D5B40B785D51]]></AD_TABLE_ID>
+<!--48A069D3607C4ACEA7ACCBA679A00B75-->  <AD_REFERENCE_ID><![CDATA[17]]></AD_REFERENCE_ID>
+<!--48A069D3607C4ACEA7ACCBA679A00B75-->  <AD_REFERENCE_VALUE_ID><![CDATA[892231CFE03848758D74B0209B801C14]]></AD_REFERENCE_VALUE_ID>
+<!--48A069D3607C4ACEA7ACCBA679A00B75-->  <FIELDLENGTH><![CDATA[60]]></FIELDLENGTH>
+<!--48A069D3607C4ACEA7ACCBA679A00B75-->  <DEFAULTVALUE><![CDATA[D]]></DEFAULTVALUE>
+<!--48A069D3607C4ACEA7ACCBA679A00B75-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--48A069D3607C4ACEA7ACCBA679A00B75-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--48A069D3607C4ACEA7ACCBA679A00B75-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
+<!--48A069D3607C4ACEA7ACCBA679A00B75-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--48A069D3607C4ACEA7ACCBA679A00B75-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--48A069D3607C4ACEA7ACCBA679A00B75-->  <SEQNO><![CDATA[190]]></SEQNO>
+<!--48A069D3607C4ACEA7ACCBA679A00B75-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--48A069D3607C4ACEA7ACCBA679A00B75-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--48A069D3607C4ACEA7ACCBA679A00B75-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--48A069D3607C4ACEA7ACCBA679A00B75-->  <AD_ELEMENT_ID><![CDATA[2D51BCE155184D34A5F38FFE515D5C23]]></AD_ELEMENT_ID>
+<!--48A069D3607C4ACEA7ACCBA679A00B75-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--48A069D3607C4ACEA7ACCBA679A00B75-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--48A069D3607C4ACEA7ACCBA679A00B75-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--48A069D3607C4ACEA7ACCBA679A00B75-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--48A069D3607C4ACEA7ACCBA679A00B75-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--48A069D3607C4ACEA7ACCBA679A00B75-->  <POSITION><![CDATA[17]]></POSITION>
+<!--48A069D3607C4ACEA7ACCBA679A00B75-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--48A069D3607C4ACEA7ACCBA679A00B75-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
+<!--48A069D3607C4ACEA7ACCBA679A00B75-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
+<!--48A069D3607C4ACEA7ACCBA679A00B75-->  <IMAGESIZEVALUESACTION><![CDATA[N]]></IMAGESIZEVALUESACTION>
+<!--48A069D3607C4ACEA7ACCBA679A00B75-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
+<!--48A069D3607C4ACEA7ACCBA679A00B75--></AD_COLUMN>
+
+<!--48F3B55314E1456881111892DD8C7EF4--><AD_COLUMN>
+<!--48F3B55314E1456881111892DD8C7EF4-->  <AD_COLUMN_ID><![CDATA[48F3B55314E1456881111892DD8C7EF4]]></AD_COLUMN_ID>
+<!--48F3B55314E1456881111892DD8C7EF4-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--48F3B55314E1456881111892DD8C7EF4-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--48F3B55314E1456881111892DD8C7EF4-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--48F3B55314E1456881111892DD8C7EF4-->  <NAME><![CDATA[Updated By]]></NAME>
+<!--48F3B55314E1456881111892DD8C7EF4-->  <DESCRIPTION><![CDATA[User who updated this records]]></DESCRIPTION>
+<!--48F3B55314E1456881111892DD8C7EF4-->  <HELP><![CDATA[The Updated By field indicates the user who updated this record.]]></HELP>
+<!--48F3B55314E1456881111892DD8C7EF4-->  <COLUMNNAME><![CDATA[Updatedby]]></COLUMNNAME>
+<!--48F3B55314E1456881111892DD8C7EF4-->  <AD_TABLE_ID><![CDATA[0F213FB4B2D24B1D9DA551AC10B20084]]></AD_TABLE_ID>
+<!--48F3B55314E1456881111892DD8C7EF4-->  <AD_REFERENCE_ID><![CDATA[30]]></AD_REFERENCE_ID>
+<!--48F3B55314E1456881111892DD8C7EF4-->  <FIELDLENGTH><![CDATA[32]]></FIELDLENGTH>
+<!--48F3B55314E1456881111892DD8C7EF4-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--48F3B55314E1456881111892DD8C7EF4-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--48F3B55314E1456881111892DD8C7EF4-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
+<!--48F3B55314E1456881111892DD8C7EF4-->  <ISUPDATEABLE><![CDATA[N]]></ISUPDATEABLE>
+<!--48F3B55314E1456881111892DD8C7EF4-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--48F3B55314E1456881111892DD8C7EF4-->  <SEQNO><![CDATA[100]]></SEQNO>
+<!--48F3B55314E1456881111892DD8C7EF4-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--48F3B55314E1456881111892DD8C7EF4-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--48F3B55314E1456881111892DD8C7EF4-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--48F3B55314E1456881111892DD8C7EF4-->  <AD_ELEMENT_ID><![CDATA[608]]></AD_ELEMENT_ID>
+<!--48F3B55314E1456881111892DD8C7EF4-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--48F3B55314E1456881111892DD8C7EF4-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--48F3B55314E1456881111892DD8C7EF4-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--48F3B55314E1456881111892DD8C7EF4-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--48F3B55314E1456881111892DD8C7EF4-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--48F3B55314E1456881111892DD8C7EF4-->  <POSITION><![CDATA[10]]></POSITION>
+<!--48F3B55314E1456881111892DD8C7EF4-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--48F3B55314E1456881111892DD8C7EF4-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
+<!--48F3B55314E1456881111892DD8C7EF4-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
+<!--48F3B55314E1456881111892DD8C7EF4-->  <IMAGESIZEVALUESACTION><![CDATA[N]]></IMAGESIZEVALUESACTION>
+<!--48F3B55314E1456881111892DD8C7EF4-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
+<!--48F3B55314E1456881111892DD8C7EF4--></AD_COLUMN>
+
 <!--48FAAFCA11A143169FD7517D67531DD1--><AD_COLUMN>
 <!--48FAAFCA11A143169FD7517D67531DD1-->  <AD_COLUMN_ID><![CDATA[48FAAFCA11A143169FD7517D67531DD1]]></AD_COLUMN_ID>
 <!--48FAAFCA11A143169FD7517D67531DD1-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -3153,6 +3409,43 @@
 <!--59E3FEE1ADB04DE9B889A4957BFB0438-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
 <!--59E3FEE1ADB04DE9B889A4957BFB0438--></AD_COLUMN>
 
+<!--5A8AC3A0A48C49A7A7CFD4AEF1E2C3ED--><AD_COLUMN>
+<!--5A8AC3A0A48C49A7A7CFD4AEF1E2C3ED-->  <AD_COLUMN_ID><![CDATA[5A8AC3A0A48C49A7A7CFD4AEF1E2C3ED]]></AD_COLUMN_ID>
+<!--5A8AC3A0A48C49A7A7CFD4AEF1E2C3ED-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--5A8AC3A0A48C49A7A7CFD4AEF1E2C3ED-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--5A8AC3A0A48C49A7A7CFD4AEF1E2C3ED-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--5A8AC3A0A48C49A7A7CFD4AEF1E2C3ED-->  <NAME><![CDATA[DisableFkCombo]]></NAME>
+<!--5A8AC3A0A48C49A7A7CFD4AEF1E2C3ED-->  <DESCRIPTION><![CDATA[If this flag is checked, the foreign key combo will be disabled and the column will be filtered like a standard text column]]></DESCRIPTION>
+<!--5A8AC3A0A48C49A7A7CFD4AEF1E2C3ED-->  <HELP><![CDATA[If this flag is checked, the foreign key combo will be disabled and the column will be filtered like a standard text column]]></HELP>
+<!--5A8AC3A0A48C49A7A7CFD4AEF1E2C3ED-->  <COLUMNNAME><![CDATA[Disablefkcombo]]></COLUMNNAME>
+<!--5A8AC3A0A48C49A7A7CFD4AEF1E2C3ED-->  <AD_TABLE_ID><![CDATA[8A16662B37184121A1EDAA89890E160C]]></AD_TABLE_ID>
+<!--5A8AC3A0A48C49A7A7CFD4AEF1E2C3ED-->  <AD_REFERENCE_ID><![CDATA[17]]></AD_REFERENCE_ID>
+<!--5A8AC3A0A48C49A7A7CFD4AEF1E2C3ED-->  <AD_REFERENCE_VALUE_ID><![CDATA[892231CFE03848758D74B0209B801C14]]></AD_REFERENCE_VALUE_ID>
+<!--5A8AC3A0A48C49A7A7CFD4AEF1E2C3ED-->  <FIELDLENGTH><![CDATA[60]]></FIELDLENGTH>
+<!--5A8AC3A0A48C49A7A7CFD4AEF1E2C3ED-->  <DEFAULTVALUE><![CDATA[D]]></DEFAULTVALUE>
+<!--5A8AC3A0A48C49A7A7CFD4AEF1E2C3ED-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--5A8AC3A0A48C49A7A7CFD4AEF1E2C3ED-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--5A8AC3A0A48C49A7A7CFD4AEF1E2C3ED-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
+<!--5A8AC3A0A48C49A7A7CFD4AEF1E2C3ED-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--5A8AC3A0A48C49A7A7CFD4AEF1E2C3ED-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--5A8AC3A0A48C49A7A7CFD4AEF1E2C3ED-->  <SEQNO><![CDATA[190]]></SEQNO>
+<!--5A8AC3A0A48C49A7A7CFD4AEF1E2C3ED-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--5A8AC3A0A48C49A7A7CFD4AEF1E2C3ED-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--5A8AC3A0A48C49A7A7CFD4AEF1E2C3ED-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--5A8AC3A0A48C49A7A7CFD4AEF1E2C3ED-->  <AD_ELEMENT_ID><![CDATA[1185A82966EA40ABA990B5DDBD9B8FBA]]></AD_ELEMENT_ID>
+<!--5A8AC3A0A48C49A7A7CFD4AEF1E2C3ED-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--5A8AC3A0A48C49A7A7CFD4AEF1E2C3ED-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--5A8AC3A0A48C49A7A7CFD4AEF1E2C3ED-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--5A8AC3A0A48C49A7A7CFD4AEF1E2C3ED-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--5A8AC3A0A48C49A7A7CFD4AEF1E2C3ED-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--5A8AC3A0A48C49A7A7CFD4AEF1E2C3ED-->  <POSITION><![CDATA[18]]></POSITION>
+<!--5A8AC3A0A48C49A7A7CFD4AEF1E2C3ED-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--5A8AC3A0A48C49A7A7CFD4AEF1E2C3ED-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
+<!--5A8AC3A0A48C49A7A7CFD4AEF1E2C3ED-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
+<!--5A8AC3A0A48C49A7A7CFD4AEF1E2C3ED-->  <IMAGESIZEVALUESACTION><![CDATA[N]]></IMAGESIZEVALUESACTION>
+<!--5A8AC3A0A48C49A7A7CFD4AEF1E2C3ED-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
+<!--5A8AC3A0A48C49A7A7CFD4AEF1E2C3ED--></AD_COLUMN>
+
 <!--5A92EE4131964B91857B07942228E4A5--><AD_COLUMN>
 <!--5A92EE4131964B91857B07942228E4A5-->  <AD_COLUMN_ID><![CDATA[5A92EE4131964B91857B07942228E4A5]]></AD_COLUMN_ID>
 <!--5A92EE4131964B91857B07942228E4A5-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -3365,6 +3658,77 @@
 <!--5EC75346F3754EB1A4F920DA617E7AB3-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
 <!--5EC75346F3754EB1A4F920DA617E7AB3--></AD_COLUMN>
 
+<!--5EDD238DFBD84512A7A9BA7653089B89--><AD_COLUMN>
+<!--5EDD238DFBD84512A7A9BA7653089B89-->  <AD_COLUMN_ID><![CDATA[5EDD238DFBD84512A7A9BA7653089B89]]></AD_COLUMN_ID>
+<!--5EDD238DFBD84512A7A9BA7653089B89-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--5EDD238DFBD84512A7A9BA7653089B89-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--5EDD238DFBD84512A7A9BA7653089B89-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--5EDD238DFBD84512A7A9BA7653089B89-->  <NAME><![CDATA[Process Defintion]]></NAME>
+<!--5EDD238DFBD84512A7A9BA7653089B89-->  <DESCRIPTION><![CDATA[Process Defintion]]></DESCRIPTION>
+<!--5EDD238DFBD84512A7A9BA7653089B89-->  <HELP><![CDATA[Process Defintion is a re implementation of Process with 3.0 infrastructure.]]></HELP>
+<!--5EDD238DFBD84512A7A9BA7653089B89-->  <COLUMNNAME><![CDATA[Obuiapp_Process_ID]]></COLUMNNAME>
+<!--5EDD238DFBD84512A7A9BA7653089B89-->  <AD_TABLE_ID><![CDATA[0F213FB4B2D24B1D9DA551AC10B20084]]></AD_TABLE_ID>
+<!--5EDD238DFBD84512A7A9BA7653089B89-->  <AD_REFERENCE_ID><![CDATA[19]]></AD_REFERENCE_ID>
+<!--5EDD238DFBD84512A7A9BA7653089B89-->  <FIELDLENGTH><![CDATA[32]]></FIELDLENGTH>
+<!--5EDD238DFBD84512A7A9BA7653089B89-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--5EDD238DFBD84512A7A9BA7653089B89-->  <ISPARENT><![CDATA[Y]]></ISPARENT>
+<!--5EDD238DFBD84512A7A9BA7653089B89-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
+<!--5EDD238DFBD84512A7A9BA7653089B89-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--5EDD238DFBD84512A7A9BA7653089B89-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--5EDD238DFBD84512A7A9BA7653089B89-->  <SEQNO><![CDATA[20]]></SEQNO>
+<!--5EDD238DFBD84512A7A9BA7653089B89-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--5EDD238DFBD84512A7A9BA7653089B89-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--5EDD238DFBD84512A7A9BA7653089B89-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--5EDD238DFBD84512A7A9BA7653089B89-->  <AD_ELEMENT_ID><![CDATA[557A756A00364FE5AFF9584D2F1C19FF]]></AD_ELEMENT_ID>
+<!--5EDD238DFBD84512A7A9BA7653089B89-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--5EDD238DFBD84512A7A9BA7653089B89-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--5EDD238DFBD84512A7A9BA7653089B89-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--5EDD238DFBD84512A7A9BA7653089B89-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--5EDD238DFBD84512A7A9BA7653089B89-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--5EDD238DFBD84512A7A9BA7653089B89-->  <POSITION><![CDATA[2]]></POSITION>
+<!--5EDD238DFBD84512A7A9BA7653089B89-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--5EDD238DFBD84512A7A9BA7653089B89-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
+<!--5EDD238DFBD84512A7A9BA7653089B89-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
+<!--5EDD238DFBD84512A7A9BA7653089B89-->  <IMAGESIZEVALUESACTION><![CDATA[N]]></IMAGESIZEVALUESACTION>
+<!--5EDD238DFBD84512A7A9BA7653089B89-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
+<!--5EDD238DFBD84512A7A9BA7653089B89--></AD_COLUMN>
+
+<!--5EDFA6128FB84F568358D331003B7166--><AD_COLUMN>
+<!--5EDFA6128FB84F568358D331003B7166-->  <AD_COLUMN_ID><![CDATA[5EDFA6128FB84F568358D331003B7166]]></AD_COLUMN_ID>
+<!--5EDFA6128FB84F568358D331003B7166-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--5EDFA6128FB84F568358D331003B7166-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--5EDFA6128FB84F568358D331003B7166-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--5EDFA6128FB84F568358D331003B7166-->  <NAME><![CDATA[Creation Date]]></NAME>
+<!--5EDFA6128FB84F568358D331003B7166-->  <DESCRIPTION><![CDATA[The date that this record is completed.]]></DESCRIPTION>
+<!--5EDFA6128FB84F568358D331003B7166-->  <HELP><![CDATA[The Created field indicates the date that this record was created.]]></HELP>
+<!--5EDFA6128FB84F568358D331003B7166-->  <COLUMNNAME><![CDATA[Created]]></COLUMNNAME>
+<!--5EDFA6128FB84F568358D331003B7166-->  <AD_TABLE_ID><![CDATA[0F213FB4B2D24B1D9DA551AC10B20084]]></AD_TABLE_ID>
+<!--5EDFA6128FB84F568358D331003B7166-->  <AD_REFERENCE_ID><![CDATA[16]]></AD_REFERENCE_ID>
+<!--5EDFA6128FB84F568358D331003B7166-->  <FIELDLENGTH><![CDATA[19]]></FIELDLENGTH>
+<!--5EDFA6128FB84F568358D331003B7166-->  <DEFAULTVALUE><![CDATA[@#Date@]]></DEFAULTVALUE>
+<!--5EDFA6128FB84F568358D331003B7166-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--5EDFA6128FB84F568358D331003B7166-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--5EDFA6128FB84F568358D331003B7166-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
+<!--5EDFA6128FB84F568358D331003B7166-->  <ISUPDATEABLE><![CDATA[N]]></ISUPDATEABLE>
+<!--5EDFA6128FB84F568358D331003B7166-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--5EDFA6128FB84F568358D331003B7166-->  <SEQNO><![CDATA[70]]></SEQNO>
+<!--5EDFA6128FB84F568358D331003B7166-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--5EDFA6128FB84F568358D331003B7166-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--5EDFA6128FB84F568358D331003B7166-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--5EDFA6128FB84F568358D331003B7166-->  <AD_ELEMENT_ID><![CDATA[245]]></AD_ELEMENT_ID>
+<!--5EDFA6128FB84F568358D331003B7166-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--5EDFA6128FB84F568358D331003B7166-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--5EDFA6128FB84F568358D331003B7166-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--5EDFA6128FB84F568358D331003B7166-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--5EDFA6128FB84F568358D331003B7166-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--5EDFA6128FB84F568358D331003B7166-->  <POSITION><![CDATA[7]]></POSITION>
+<!--5EDFA6128FB84F568358D331003B7166-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--5EDFA6128FB84F568358D331003B7166-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
+<!--5EDFA6128FB84F568358D331003B7166-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
+<!--5EDFA6128FB84F568358D331003B7166-->  <IMAGESIZEVALUESACTION><![CDATA[N]]></IMAGESIZEVALUESACTION>
+<!--5EDFA6128FB84F568358D331003B7166-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
+<!--5EDFA6128FB84F568358D331003B7166--></AD_COLUMN>
+
 <!--5F26651D1F05498F9109026505AF297C--><AD_COLUMN>
 <!--5F26651D1F05498F9109026505AF297C-->  <AD_COLUMN_ID><![CDATA[5F26651D1F05498F9109026505AF297C]]></AD_COLUMN_ID>
 <!--5F26651D1F05498F9109026505AF297C-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -3578,6 +3942,43 @@
 <!--6544F25DBDE74A9CB66C8E27F909556E-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
 <!--6544F25DBDE74A9CB66C8E27F909556E--></AD_COLUMN>
 
+<!--669F7189A86E4EBEB78165527CC81658--><AD_COLUMN>
+<!--669F7189A86E4EBEB78165527CC81658-->  <AD_COLUMN_ID><![CDATA[669F7189A86E4EBEB78165527CC81658]]></AD_COLUMN_ID>
+<!--669F7189A86E4EBEB78165527CC81658-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--669F7189A86E4EBEB78165527CC81658-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--669F7189A86E4EBEB78165527CC81658-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--669F7189A86E4EBEB78165527CC81658-->  <NAME><![CDATA[DisableFkCombo]]></NAME>
+<!--669F7189A86E4EBEB78165527CC81658-->  <DESCRIPTION><![CDATA[If this flag is checked, the foreign key combo will be disabled and the column will be filtered like a standard text column]]></DESCRIPTION>
+<!--669F7189A86E4EBEB78165527CC81658-->  <HELP><![CDATA[If this flag is checked, the foreign key combo will be disabled and the column will be filtered like a standard text column]]></HELP>
+<!--669F7189A86E4EBEB78165527CC81658-->  <COLUMNNAME><![CDATA[Disablefkcombo]]></COLUMNNAME>
+<!--669F7189A86E4EBEB78165527CC81658-->  <AD_TABLE_ID><![CDATA[F167EB822B8A4284AC37D5B40B785D51]]></AD_TABLE_ID>
+<!--669F7189A86E4EBEB78165527CC81658-->  <AD_REFERENCE_ID><![CDATA[17]]></AD_REFERENCE_ID>
+<!--669F7189A86E4EBEB78165527CC81658-->  <AD_REFERENCE_VALUE_ID><![CDATA[892231CFE03848758D74B0209B801C14]]></AD_REFERENCE_VALUE_ID>
+<!--669F7189A86E4EBEB78165527CC81658-->  <FIELDLENGTH><![CDATA[60]]></FIELDLENGTH>
+<!--669F7189A86E4EBEB78165527CC81658-->  <DEFAULTVALUE><![CDATA[D]]></DEFAULTVALUE>
+<!--669F7189A86E4EBEB78165527CC81658-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--669F7189A86E4EBEB78165527CC81658-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--669F7189A86E4EBEB78165527CC81658-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
+<!--669F7189A86E4EBEB78165527CC81658-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--669F7189A86E4EBEB78165527CC81658-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--669F7189A86E4EBEB78165527CC81658-->  <SEQNO><![CDATA[200]]></SEQNO>
+<!--669F7189A86E4EBEB78165527CC81658-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--669F7189A86E4EBEB78165527CC81658-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--669F7189A86E4EBEB78165527CC81658-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--669F7189A86E4EBEB78165527CC81658-->  <AD_ELEMENT_ID><![CDATA[1185A82966EA40ABA990B5DDBD9B8FBA]]></AD_ELEMENT_ID>
+<!--669F7189A86E4EBEB78165527CC81658-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--669F7189A86E4EBEB78165527CC81658-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--669F7189A86E4EBEB78165527CC81658-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--669F7189A86E4EBEB78165527CC81658-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--669F7189A86E4EBEB78165527CC81658-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--669F7189A86E4EBEB78165527CC81658-->  <POSITION><![CDATA[18]]></POSITION>
+<!--669F7189A86E4EBEB78165527CC81658-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--669F7189A86E4EBEB78165527CC81658-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
+<!--669F7189A86E4EBEB78165527CC81658-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
+<!--669F7189A86E4EBEB78165527CC81658-->  <IMAGESIZEVALUESACTION><![CDATA[N]]></IMAGESIZEVALUESACTION>
+<!--669F7189A86E4EBEB78165527CC81658-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
+<!--669F7189A86E4EBEB78165527CC81658--></AD_COLUMN>
+
 <!--6ABD7441749B401D9C0504DDDF8FB7CA--><AD_COLUMN>
 <!--6ABD7441749B401D9C0504DDDF8FB7CA-->  <AD_COLUMN_ID><![CDATA[6ABD7441749B401D9C0504DDDF8FB7CA]]></AD_COLUMN_ID>
 <!--6ABD7441749B401D9C0504DDDF8FB7CA-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -3632,7 +4033,7 @@
 <!--6B89B4DC342B48F989E55D70BB2CC9B0-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
 <!--6B89B4DC342B48F989E55D70BB2CC9B0-->  <ISIDENTIFIER><![CDATA[Y]]></ISIDENTIFIER>
 <!--6B89B4DC342B48F989E55D70BB2CC9B0-->  <SEQNO><![CDATA[100]]></SEQNO>
-<!--6B89B4DC342B48F989E55D70BB2CC9B0-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--6B89B4DC342B48F989E55D70BB2CC9B0-->  <ISTRANSLATED><![CDATA[Y]]></ISTRANSLATED>
 <!--6B89B4DC342B48F989E55D70BB2CC9B0-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
 <!--6B89B4DC342B48F989E55D70BB2CC9B0-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
 <!--6B89B4DC342B48F989E55D70BB2CC9B0-->  <AD_ELEMENT_ID><![CDATA[469]]></AD_ELEMENT_ID>
@@ -3702,7 +4103,7 @@
 <!--6DCC7505E5C04403A7AA24E1A45824DA-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
 <!--6DCC7505E5C04403A7AA24E1A45824DA-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
 <!--6DCC7505E5C04403A7AA24E1A45824DA-->  <SEQNO><![CDATA[110]]></SEQNO>
-<!--6DCC7505E5C04403A7AA24E1A45824DA-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--6DCC7505E5C04403A7AA24E1A45824DA-->  <ISTRANSLATED><![CDATA[Y]]></ISTRANSLATED>
 <!--6DCC7505E5C04403A7AA24E1A45824DA-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
 <!--6DCC7505E5C04403A7AA24E1A45824DA-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
 <!--6DCC7505E5C04403A7AA24E1A45824DA-->  <AD_ELEMENT_ID><![CDATA[275]]></AD_ELEMENT_ID>
@@ -4333,6 +4734,42 @@
 <!--834D1A1BCD6D4606971D15425B1407E4-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
 <!--834D1A1BCD6D4606971D15425B1407E4--></AD_COLUMN>
 
+<!--841E7280C3B246A58E5A194AF41D5796--><AD_COLUMN>
+<!--841E7280C3B246A58E5A194AF41D5796-->  <AD_COLUMN_ID><![CDATA[841E7280C3B246A58E5A194AF41D5796]]></AD_COLUMN_ID>
+<!--841E7280C3B246A58E5A194AF41D5796-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--841E7280C3B246A58E5A194AF41D5796-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--841E7280C3B246A58E5A194AF41D5796-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--841E7280C3B246A58E5A194AF41D5796-->  <NAME><![CDATA[Inherited_From]]></NAME>
+<!--841E7280C3B246A58E5A194AF41D5796-->  <DESCRIPTION><![CDATA[Inherited From]]></DESCRIPTION>
+<!--841E7280C3B246A58E5A194AF41D5796-->  <HELP><![CDATA[The role from which a permission has been inherited. If a permission has this field set it means that this is an inherited permission, an therefore that the role owner of the permission is able to access it because it inherits from the role defined in this field.]]></HELP>
+<!--841E7280C3B246A58E5A194AF41D5796-->  <COLUMNNAME><![CDATA[Inherited_From]]></COLUMNNAME>
+<!--841E7280C3B246A58E5A194AF41D5796-->  <AD_TABLE_ID><![CDATA[E6F29F8A30BC4603B1D1195051C4F3A6]]></AD_TABLE_ID>
+<!--841E7280C3B246A58E5A194AF41D5796-->  <AD_REFERENCE_ID><![CDATA[18]]></AD_REFERENCE_ID>
+<!--841E7280C3B246A58E5A194AF41D5796-->  <AD_REFERENCE_VALUE_ID><![CDATA[800105]]></AD_REFERENCE_VALUE_ID>
+<!--841E7280C3B246A58E5A194AF41D5796-->  <FIELDLENGTH><![CDATA[32]]></FIELDLENGTH>
+<!--841E7280C3B246A58E5A194AF41D5796-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--841E7280C3B246A58E5A194AF41D5796-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--841E7280C3B246A58E5A194AF41D5796-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
+<!--841E7280C3B246A58E5A194AF41D5796-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--841E7280C3B246A58E5A194AF41D5796-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--841E7280C3B246A58E5A194AF41D5796-->  <SEQNO><![CDATA[110]]></SEQNO>
+<!--841E7280C3B246A58E5A194AF41D5796-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--841E7280C3B246A58E5A194AF41D5796-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--841E7280C3B246A58E5A194AF41D5796-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--841E7280C3B246A58E5A194AF41D5796-->  <AD_ELEMENT_ID><![CDATA[0FAB9FAA9D204B8AB9FA36C663842DAF]]></AD_ELEMENT_ID>
+<!--841E7280C3B246A58E5A194AF41D5796-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--841E7280C3B246A58E5A194AF41D5796-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--841E7280C3B246A58E5A194AF41D5796-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--841E7280C3B246A58E5A194AF41D5796-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--841E7280C3B246A58E5A194AF41D5796-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--841E7280C3B246A58E5A194AF41D5796-->  <POSITION><![CDATA[11]]></POSITION>
+<!--841E7280C3B246A58E5A194AF41D5796-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--841E7280C3B246A58E5A194AF41D5796-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
+<!--841E7280C3B246A58E5A194AF41D5796-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
+<!--841E7280C3B246A58E5A194AF41D5796-->  <IMAGESIZEVALUESACTION><![CDATA[N]]></IMAGESIZEVALUESACTION>
+<!--841E7280C3B246A58E5A194AF41D5796-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
+<!--841E7280C3B246A58E5A194AF41D5796--></AD_COLUMN>
+
 <!--84B662BB4E274C16843F33CFE166019E--><AD_COLUMN>
 <!--84B662BB4E274C16843F33CFE166019E-->  <AD_COLUMN_ID><![CDATA[84B662BB4E274C16843F33CFE166019E]]></AD_COLUMN_ID>
 <!--84B662BB4E274C16843F33CFE166019E-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -4908,6 +5345,39 @@
 <!--8D23066BDEAB481CAAC482DD1C262218-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
 <!--8D23066BDEAB481CAAC482DD1C262218--></AD_COLUMN>
 
+<!--8FF8F8D0E5E145558AB1EBDDE5A02EFC--><AD_COLUMN>
+<!--8FF8F8D0E5E145558AB1EBDDE5A02EFC-->  <AD_COLUMN_ID><![CDATA[8FF8F8D0E5E145558AB1EBDDE5A02EFC]]></AD_COLUMN_ID>
+<!--8FF8F8D0E5E145558AB1EBDDE5A02EFC-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--8FF8F8D0E5E145558AB1EBDDE5A02EFC-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--8FF8F8D0E5E145558AB1EBDDE5A02EFC-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--8FF8F8D0E5E145558AB1EBDDE5A02EFC-->  <NAME><![CDATA[Obuiapp_Process_Trl_ID]]></NAME>
+<!--8FF8F8D0E5E145558AB1EBDDE5A02EFC-->  <COLUMNNAME><![CDATA[Obuiapp_Process_Trl_ID]]></COLUMNNAME>
+<!--8FF8F8D0E5E145558AB1EBDDE5A02EFC-->  <AD_TABLE_ID><![CDATA[0F213FB4B2D24B1D9DA551AC10B20084]]></AD_TABLE_ID>
+<!--8FF8F8D0E5E145558AB1EBDDE5A02EFC-->  <AD_REFERENCE_ID><![CDATA[13]]></AD_REFERENCE_ID>
+<!--8FF8F8D0E5E145558AB1EBDDE5A02EFC-->  <FIELDLENGTH><![CDATA[32]]></FIELDLENGTH>
+<!--8FF8F8D0E5E145558AB1EBDDE5A02EFC-->  <ISKEY><![CDATA[Y]]></ISKEY>
+<!--8FF8F8D0E5E145558AB1EBDDE5A02EFC-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--8FF8F8D0E5E145558AB1EBDDE5A02EFC-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
+<!--8FF8F8D0E5E145558AB1EBDDE5A02EFC-->  <ISUPDATEABLE><![CDATA[N]]></ISUPDATEABLE>
+<!--8FF8F8D0E5E145558AB1EBDDE5A02EFC-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--8FF8F8D0E5E145558AB1EBDDE5A02EFC-->  <SEQNO><![CDATA[10]]></SEQNO>
+<!--8FF8F8D0E5E145558AB1EBDDE5A02EFC-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--8FF8F8D0E5E145558AB1EBDDE5A02EFC-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--8FF8F8D0E5E145558AB1EBDDE5A02EFC-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--8FF8F8D0E5E145558AB1EBDDE5A02EFC-->  <AD_ELEMENT_ID><![CDATA[82F94DF2DAF64D0CA93BA0CDC4346972]]></AD_ELEMENT_ID>
+<!--8FF8F8D0E5E145558AB1EBDDE5A02EFC-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--8FF8F8D0E5E145558AB1EBDDE5A02EFC-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--8FF8F8D0E5E145558AB1EBDDE5A02EFC-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--8FF8F8D0E5E145558AB1EBDDE5A02EFC-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--8FF8F8D0E5E145558AB1EBDDE5A02EFC-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--8FF8F8D0E5E145558AB1EBDDE5A02EFC-->  <POSITION><![CDATA[1]]></POSITION>
+<!--8FF8F8D0E5E145558AB1EBDDE5A02EFC-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--8FF8F8D0E5E145558AB1EBDDE5A02EFC-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
+<!--8FF8F8D0E5E145558AB1EBDDE5A02EFC-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
+<!--8FF8F8D0E5E145558AB1EBDDE5A02EFC-->  <IMAGESIZEVALUESACTION><![CDATA[N]]></IMAGESIZEVALUESACTION>
+<!--8FF8F8D0E5E145558AB1EBDDE5A02EFC-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
+<!--8FF8F8D0E5E145558AB1EBDDE5A02EFC--></AD_COLUMN>
+
 <!--927DA01A832A3AFAE040A8C0CF072B85--><AD_COLUMN>
 <!--927DA01A832A3AFAE040A8C0CF072B85-->  <AD_COLUMN_ID><![CDATA[927DA01A832A3AFAE040A8C0CF072B85]]></AD_COLUMN_ID>
 <!--927DA01A832A3AFAE040A8C0CF072B85-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -6692,8 +7162,8 @@
 <!--93DDA487C86244A28FB80B6F09E74385-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--93DDA487C86244A28FB80B6F09E74385-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--93DDA487C86244A28FB80B6F09E74385-->  <NAME><![CDATA[IsLazyFiltering]]></NAME>
-<!--93DDA487C86244A28FB80B6F09E74385-->  <DESCRIPTION><![CDATA[If it is set, the grid won't perform a filter action until a button be pressed.]]></DESCRIPTION>
-<!--93DDA487C86244A28FB80B6F09E74385-->  <HELP><![CDATA[If it is set, the grid won't perform a filter action until the 'Apply Filters' button be pressed.]]></HELP>
+<!--93DDA487C86244A28FB80B6F09E74385-->  <DESCRIPTION><![CDATA[If it is set, the grid won't perform a filter and/or a sorting action until a button be pressed.]]></DESCRIPTION>
+<!--93DDA487C86244A28FB80B6F09E74385-->  <HELP><![CDATA[If it is set, the grid won't perform a filter and/or a sorting action until the 'Apply Filters' button be pressed.]]></HELP>
 <!--93DDA487C86244A28FB80B6F09E74385-->  <COLUMNNAME><![CDATA[IsLazyFiltering]]></COLUMNNAME>
 <!--93DDA487C86244A28FB80B6F09E74385-->  <AD_TABLE_ID><![CDATA[5D50320222DD4865ADFD50364C84291D]]></AD_TABLE_ID>
 <!--93DDA487C86244A28FB80B6F09E74385-->  <AD_REFERENCE_ID><![CDATA[20]]></AD_REFERENCE_ID>
@@ -7286,6 +7756,42 @@
 <!--ABEE9EA6CC8344789ADA2ABC532DA2FF-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
 <!--ABEE9EA6CC8344789ADA2ABC532DA2FF--></AD_COLUMN>
 
+<!--ACE9C929105742E6A68799AA818F54D3--><AD_COLUMN>
+<!--ACE9C929105742E6A68799AA818F54D3-->  <AD_COLUMN_ID><![CDATA[ACE9C929105742E6A68799AA818F54D3]]></AD_COLUMN_ID>
+<!--ACE9C929105742E6A68799AA818F54D3-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--ACE9C929105742E6A68799AA818F54D3-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--ACE9C929105742E6A68799AA818F54D3-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--ACE9C929105742E6A68799AA818F54D3-->  <NAME><![CDATA[Language]]></NAME>
+<!--ACE9C929105742E6A68799AA818F54D3-->  <DESCRIPTION><![CDATA[A method of communication being used.]]></DESCRIPTION>
+<!--ACE9C929105742E6A68799AA818F54D3-->  <HELP><![CDATA[The Language identifies the language to use for display]]></HELP>
+<!--ACE9C929105742E6A68799AA818F54D3-->  <COLUMNNAME><![CDATA[AD_Language]]></COLUMNNAME>
+<!--ACE9C929105742E6A68799AA818F54D3-->  <AD_TABLE_ID><![CDATA[0F213FB4B2D24B1D9DA551AC10B20084]]></AD_TABLE_ID>
+<!--ACE9C929105742E6A68799AA818F54D3-->  <AD_REFERENCE_ID><![CDATA[18]]></AD_REFERENCE_ID>
+<!--ACE9C929105742E6A68799AA818F54D3-->  <AD_REFERENCE_VALUE_ID><![CDATA[106]]></AD_REFERENCE_VALUE_ID>
+<!--ACE9C929105742E6A68799AA818F54D3-->  <FIELDLENGTH><![CDATA[6]]></FIELDLENGTH>
+<!--ACE9C929105742E6A68799AA818F54D3-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--ACE9C929105742E6A68799AA818F54D3-->  <ISPARENT><![CDATA[Y]]></ISPARENT>
+<!--ACE9C929105742E6A68799AA818F54D3-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
+<!--ACE9C929105742E6A68799AA818F54D3-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--ACE9C929105742E6A68799AA818F54D3-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--ACE9C929105742E6A68799AA818F54D3-->  <SEQNO><![CDATA[30]]></SEQNO>
+<!--ACE9C929105742E6A68799AA818F54D3-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--ACE9C929105742E6A68799AA818F54D3-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--ACE9C929105742E6A68799AA818F54D3-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--ACE9C929105742E6A68799AA818F54D3-->  <AD_ELEMENT_ID><![CDATA[109]]></AD_ELEMENT_ID>
+<!--ACE9C929105742E6A68799AA818F54D3-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--ACE9C929105742E6A68799AA818F54D3-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--ACE9C929105742E6A68799AA818F54D3-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--ACE9C929105742E6A68799AA818F54D3-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--ACE9C929105742E6A68799AA818F54D3-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--ACE9C929105742E6A68799AA818F54D3-->  <POSITION><![CDATA[3]]></POSITION>
+<!--ACE9C929105742E6A68799AA818F54D3-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--ACE9C929105742E6A68799AA818F54D3-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
+<!--ACE9C929105742E6A68799AA818F54D3-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
+<!--ACE9C929105742E6A68799AA818F54D3-->  <IMAGESIZEVALUESACTION><![CDATA[N]]></IMAGESIZEVALUESACTION>
+<!--ACE9C929105742E6A68799AA818F54D3-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
+<!--ACE9C929105742E6A68799AA818F54D3--></AD_COLUMN>
+
 <!--ACEF584A3AFB4232B8D0473A0F7F9274--><AD_COLUMN>
 <!--ACEF584A3AFB4232B8D0473A0F7F9274-->  <AD_COLUMN_ID><![CDATA[ACEF584A3AFB4232B8D0473A0F7F9274]]></AD_COLUMN_ID>
 <!--ACEF584A3AFB4232B8D0473A0F7F9274-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -7472,6 +7978,41 @@
 <!--AF57BA1162E94EA49127C3B88B543601-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
 <!--AF57BA1162E94EA49127C3B88B543601--></AD_COLUMN>
 
+<!--B035E89EDED14A6D9BA7908F8D68D559--><AD_COLUMN>
+<!--B035E89EDED14A6D9BA7908F8D68D559-->  <AD_COLUMN_ID><![CDATA[B035E89EDED14A6D9BA7908F8D68D559]]></AD_COLUMN_ID>
+<!--B035E89EDED14A6D9BA7908F8D68D559-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--B035E89EDED14A6D9BA7908F8D68D559-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--B035E89EDED14A6D9BA7908F8D68D559-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--B035E89EDED14A6D9BA7908F8D68D559-->  <NAME><![CDATA[Name]]></NAME>
+<!--B035E89EDED14A6D9BA7908F8D68D559-->  <DESCRIPTION><![CDATA[A non-unique identifier for a record/document often used as a search tool.]]></DESCRIPTION>
+<!--B035E89EDED14A6D9BA7908F8D68D559-->  <HELP><![CDATA[A more descriptive identifier (that does need to be unique) of a record/document that is used as a default search option along with the search key (that is unique and mostly shorter). It is up to 60 characters in length.]]></HELP>
+<!--B035E89EDED14A6D9BA7908F8D68D559-->  <COLUMNNAME><![CDATA[Name]]></COLUMNNAME>
+<!--B035E89EDED14A6D9BA7908F8D68D559-->  <AD_TABLE_ID><![CDATA[0F213FB4B2D24B1D9DA551AC10B20084]]></AD_TABLE_ID>
+<!--B035E89EDED14A6D9BA7908F8D68D559-->  <AD_REFERENCE_ID><![CDATA[10]]></AD_REFERENCE_ID>
+<!--B035E89EDED14A6D9BA7908F8D68D559-->  <FIELDLENGTH><![CDATA[60]]></FIELDLENGTH>
+<!--B035E89EDED14A6D9BA7908F8D68D559-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--B035E89EDED14A6D9BA7908F8D68D559-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--B035E89EDED14A6D9BA7908F8D68D559-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
+<!--B035E89EDED14A6D9BA7908F8D68D559-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--B035E89EDED14A6D9BA7908F8D68D559-->  <ISIDENTIFIER><![CDATA[Y]]></ISIDENTIFIER>
+<!--B035E89EDED14A6D9BA7908F8D68D559-->  <SEQNO><![CDATA[110]]></SEQNO>
+<!--B035E89EDED14A6D9BA7908F8D68D559-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--B035E89EDED14A6D9BA7908F8D68D559-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--B035E89EDED14A6D9BA7908F8D68D559-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--B035E89EDED14A6D9BA7908F8D68D559-->  <AD_ELEMENT_ID><![CDATA[469]]></AD_ELEMENT_ID>
+<!--B035E89EDED14A6D9BA7908F8D68D559-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--B035E89EDED14A6D9BA7908F8D68D559-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--B035E89EDED14A6D9BA7908F8D68D559-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--B035E89EDED14A6D9BA7908F8D68D559-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--B035E89EDED14A6D9BA7908F8D68D559-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--B035E89EDED14A6D9BA7908F8D68D559-->  <POSITION><![CDATA[11]]></POSITION>
+<!--B035E89EDED14A6D9BA7908F8D68D559-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--B035E89EDED14A6D9BA7908F8D68D559-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
+<!--B035E89EDED14A6D9BA7908F8D68D559-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
+<!--B035E89EDED14A6D9BA7908F8D68D559-->  <IMAGESIZEVALUESACTION><![CDATA[N]]></IMAGESIZEVALUESACTION>
+<!--B035E89EDED14A6D9BA7908F8D68D559-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
+<!--B035E89EDED14A6D9BA7908F8D68D559--></AD_COLUMN>
+
 <!--B2DDC4BECBF24431AB1940C2A38F9C54--><AD_COLUMN>
 <!--B2DDC4BECBF24431AB1940C2A38F9C54-->  <AD_COLUMN_ID><![CDATA[B2DDC4BECBF24431AB1940C2A38F9C54]]></AD_COLUMN_ID>
 <!--B2DDC4BECBF24431AB1940C2A38F9C54-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -7526,7 +8067,7 @@
 <!--B2E8F2F6F67A47E2BD78286A1D362AFE-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
 <!--B2E8F2F6F67A47E2BD78286A1D362AFE-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
 <!--B2E8F2F6F67A47E2BD78286A1D362AFE-->  <SEQNO><![CDATA[120]]></SEQNO>
-<!--B2E8F2F6F67A47E2BD78286A1D362AFE-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--B2E8F2F6F67A47E2BD78286A1D362AFE-->  <ISTRANSLATED><![CDATA[Y]]></ISTRANSLATED>
 <!--B2E8F2F6F67A47E2BD78286A1D362AFE-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
 <!--B2E8F2F6F67A47E2BD78286A1D362AFE-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
 <!--B2E8F2F6F67A47E2BD78286A1D362AFE-->  <AD_ELEMENT_ID><![CDATA[326]]></AD_ELEMENT_ID>
@@ -7882,6 +8423,7 @@
 <!--C42A9A71AA1D4DCBA648182611824A21-->  <ISPARENT><![CDATA[N]]></ISPARENT>
 <!--C42A9A71AA1D4DCBA648182611824A21-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
 <!--C42A9A71AA1D4DCBA648182611824A21-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--C42A9A71AA1D4DCBA648182611824A21-->  <READONLYLOGIC><![CDATA[@Inherited_From@!null & @Inherited_From@!'']]></READONLYLOGIC>
 <!--C42A9A71AA1D4DCBA648182611824A21-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
 <!--C42A9A71AA1D4DCBA648182611824A21-->  <SEQNO><![CDATA[60]]></SEQNO>
 <!--C42A9A71AA1D4DCBA648182611824A21-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
@@ -8008,6 +8550,41 @@
 <!--C66C63D031084FEB9A895AB27A650C99-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
 <!--C66C63D031084FEB9A895AB27A650C99--></AD_COLUMN>
 
+<!--C6DC3AB41DCF48678AAAA5135BF9344E--><AD_COLUMN>
+<!--C6DC3AB41DCF48678AAAA5135BF9344E-->  <AD_COLUMN_ID><![CDATA[C6DC3AB41DCF48678AAAA5135BF9344E]]></AD_COLUMN_ID>
+<!--C6DC3AB41DCF48678AAAA5135BF9344E-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--C6DC3AB41DCF48678AAAA5135BF9344E-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--C6DC3AB41DCF48678AAAA5135BF9344E-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--C6DC3AB41DCF48678AAAA5135BF9344E-->  <NAME><![CDATA[Description]]></NAME>
+<!--C6DC3AB41DCF48678AAAA5135BF9344E-->  <DESCRIPTION><![CDATA[A space to write additional related information.]]></DESCRIPTION>
+<!--C6DC3AB41DCF48678AAAA5135BF9344E-->  <HELP><![CDATA[A description is limited to 255 characters.]]></HELP>
+<!--C6DC3AB41DCF48678AAAA5135BF9344E-->  <COLUMNNAME><![CDATA[Description]]></COLUMNNAME>
+<!--C6DC3AB41DCF48678AAAA5135BF9344E-->  <AD_TABLE_ID><![CDATA[0F213FB4B2D24B1D9DA551AC10B20084]]></AD_TABLE_ID>
+<!--C6DC3AB41DCF48678AAAA5135BF9344E-->  <AD_REFERENCE_ID><![CDATA[10]]></AD_REFERENCE_ID>
+<!--C6DC3AB41DCF48678AAAA5135BF9344E-->  <FIELDLENGTH><![CDATA[255]]></FIELDLENGTH>
+<!--C6DC3AB41DCF48678AAAA5135BF9344E-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--C6DC3AB41DCF48678AAAA5135BF9344E-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--C6DC3AB41DCF48678AAAA5135BF9344E-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
+<!--C6DC3AB41DCF48678AAAA5135BF9344E-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--C6DC3AB41DCF48678AAAA5135BF9344E-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--C6DC3AB41DCF48678AAAA5135BF9344E-->  <SEQNO><![CDATA[120]]></SEQNO>
+<!--C6DC3AB41DCF48678AAAA5135BF9344E-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--C6DC3AB41DCF48678AAAA5135BF9344E-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--C6DC3AB41DCF48678AAAA5135BF9344E-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--C6DC3AB41DCF48678AAAA5135BF9344E-->  <AD_ELEMENT_ID><![CDATA[275]]></AD_ELEMENT_ID>
+<!--C6DC3AB41DCF48678AAAA5135BF9344E-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--C6DC3AB41DCF48678AAAA5135BF9344E-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--C6DC3AB41DCF48678AAAA5135BF9344E-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--C6DC3AB41DCF48678AAAA5135BF9344E-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--C6DC3AB41DCF48678AAAA5135BF9344E-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--C6DC3AB41DCF48678AAAA5135BF9344E-->  <POSITION><![CDATA[12]]></POSITION>
+<!--C6DC3AB41DCF48678AAAA5135BF9344E-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--C6DC3AB41DCF48678AAAA5135BF9344E-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
+<!--C6DC3AB41DCF48678AAAA5135BF9344E-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
+<!--C6DC3AB41DCF48678AAAA5135BF9344E-->  <IMAGESIZEVALUESACTION><![CDATA[N]]></IMAGESIZEVALUESACTION>
+<!--C6DC3AB41DCF48678AAAA5135BF9344E-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
+<!--C6DC3AB41DCF48678AAAA5135BF9344E--></AD_COLUMN>
+
 <!--C7D7CF78838A49048B48DBD3CAC16754--><AD_COLUMN>
 <!--C7D7CF78838A49048B48DBD3CAC16754-->  <AD_COLUMN_ID><![CDATA[C7D7CF78838A49048B48DBD3CAC16754]]></AD_COLUMN_ID>
 <!--C7D7CF78838A49048B48DBD3CAC16754-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -8095,6 +8672,7 @@
 <!--C9FF2FB2E71A4BD39716BD627603CB1F-->  <ISPARENT><![CDATA[Y]]></ISPARENT>
 <!--C9FF2FB2E71A4BD39716BD627603CB1F-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
 <!--C9FF2FB2E71A4BD39716BD627603CB1F-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--C9FF2FB2E71A4BD39716BD627603CB1F-->  <READONLYLOGIC><![CDATA[@Inherited_From@!null & @Inherited_From@!'']]></READONLYLOGIC>
 <!--C9FF2FB2E71A4BD39716BD627603CB1F-->  <ISIDENTIFIER><![CDATA[Y]]></ISIDENTIFIER>
 <!--C9FF2FB2E71A4BD39716BD627603CB1F-->  <SEQNO><![CDATA[40]]></SEQNO>
 <!--C9FF2FB2E71A4BD39716BD627603CB1F-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
@@ -8133,6 +8711,7 @@
 <!--CA1D9B9E53C94146A61626E40BC59B43-->  <ISPARENT><![CDATA[N]]></ISPARENT>
 <!--CA1D9B9E53C94146A61626E40BC59B43-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
 <!--CA1D9B9E53C94146A61626E40BC59B43-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--CA1D9B9E53C94146A61626E40BC59B43-->  <READONLYLOGIC><![CDATA[@Inherited_From@!null & @Inherited_From@!'']]></READONLYLOGIC>
 <!--CA1D9B9E53C94146A61626E40BC59B43-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
 <!--CA1D9B9E53C94146A61626E40BC59B43-->  <SEQNO><![CDATA[60]]></SEQNO>
 <!--CA1D9B9E53C94146A61626E40BC59B43-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
@@ -8152,6 +8731,44 @@
 <!--CA1D9B9E53C94146A61626E40BC59B43-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
 <!--CA1D9B9E53C94146A61626E40BC59B43--></AD_COLUMN>
 
+<!--CCAC4B03791D46E691608B625F2BBD19--><AD_COLUMN>
+<!--CCAC4B03791D46E691608B625F2BBD19-->  <AD_COLUMN_ID><![CDATA[CCAC4B03791D46E691608B625F2BBD19]]></AD_COLUMN_ID>
+<!--CCAC4B03791D46E691608B625F2BBD19-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--CCAC4B03791D46E691608B625F2BBD19-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--CCAC4B03791D46E691608B625F2BBD19-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--CCAC4B03791D46E691608B625F2BBD19-->  <NAME><![CDATA[Active]]></NAME>
+<!--CCAC4B03791D46E691608B625F2BBD19-->  <DESCRIPTION><![CDATA[A flag indicating whether this record is available for use or de-activated.]]></DESCRIPTION>
+<!--CCAC4B03791D46E691608B625F2BBD19-->  <HELP><![CDATA[There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reporting. There are two reasons for de-activating and not deleting records: 
+(1) The system requires the record for auditing purposes.
+(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are existing invoices for it. By de-activating the Business Partner you prevent it from being used in future transactions.]]></HELP>
+<!--CCAC4B03791D46E691608B625F2BBD19-->  <COLUMNNAME><![CDATA[Isactive]]></COLUMNNAME>
+<!--CCAC4B03791D46E691608B625F2BBD19-->  <AD_TABLE_ID><![CDATA[0F213FB4B2D24B1D9DA551AC10B20084]]></AD_TABLE_ID>
+<!--CCAC4B03791D46E691608B625F2BBD19-->  <AD_REFERENCE_ID><![CDATA[20]]></AD_REFERENCE_ID>
+<!--CCAC4B03791D46E691608B625F2BBD19-->  <FIELDLENGTH><![CDATA[1]]></FIELDLENGTH>
+<!--CCAC4B03791D46E691608B625F2BBD19-->  <DEFAULTVALUE><![CDATA[Y]]></DEFAULTVALUE>
+<!--CCAC4B03791D46E691608B625F2BBD19-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--CCAC4B03791D46E691608B625F2BBD19-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--CCAC4B03791D46E691608B625F2BBD19-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
+<!--CCAC4B03791D46E691608B625F2BBD19-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--CCAC4B03791D46E691608B625F2BBD19-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--CCAC4B03791D46E691608B625F2BBD19-->  <SEQNO><![CDATA[60]]></SEQNO>
+<!--CCAC4B03791D46E691608B625F2BBD19-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--CCAC4B03791D46E691608B625F2BBD19-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--CCAC4B03791D46E691608B625F2BBD19-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--CCAC4B03791D46E691608B625F2BBD19-->  <AD_ELEMENT_ID><![CDATA[348]]></AD_ELEMENT_ID>
+<!--CCAC4B03791D46E691608B625F2BBD19-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--CCAC4B03791D46E691608B625F2BBD19-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--CCAC4B03791D46E691608B625F2BBD19-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--CCAC4B03791D46E691608B625F2BBD19-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--CCAC4B03791D46E691608B625F2BBD19-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--CCAC4B03791D46E691608B625F2BBD19-->  <POSITION><![CDATA[6]]></POSITION>
+<!--CCAC4B03791D46E691608B625F2BBD19-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--CCAC4B03791D46E691608B625F2BBD19-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
+<!--CCAC4B03791D46E691608B625F2BBD19-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
+<!--CCAC4B03791D46E691608B625F2BBD19-->  <IMAGESIZEVALUESACTION><![CDATA[N]]></IMAGESIZEVALUESACTION>
+<!--CCAC4B03791D46E691608B625F2BBD19-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
+<!--CCAC4B03791D46E691608B625F2BBD19--></AD_COLUMN>
+
 <!--CD3A95C8A05D45A0A2B6D250E9C83170--><AD_COLUMN>
 <!--CD3A95C8A05D45A0A2B6D250E9C83170-->  <AD_COLUMN_ID><![CDATA[CD3A95C8A05D45A0A2B6D250E9C83170]]></AD_COLUMN_ID>
 <!--CD3A95C8A05D45A0A2B6D250E9C83170-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -8263,6 +8880,41 @@
 <!--CF562906BE6342239337F14D04D92759-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
 <!--CF562906BE6342239337F14D04D92759--></AD_COLUMN>
 
+<!--D00EF849A58A4E3A9018D5414882945E--><AD_COLUMN>
+<!--D00EF849A58A4E3A9018D5414882945E-->  <AD_COLUMN_ID><![CDATA[D00EF849A58A4E3A9018D5414882945E]]></AD_COLUMN_ID>
+<!--D00EF849A58A4E3A9018D5414882945E-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--D00EF849A58A4E3A9018D5414882945E-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--D00EF849A58A4E3A9018D5414882945E-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--D00EF849A58A4E3A9018D5414882945E-->  <NAME><![CDATA[Created By]]></NAME>
+<!--D00EF849A58A4E3A9018D5414882945E-->  <DESCRIPTION><![CDATA[User who created this records]]></DESCRIPTION>
+<!--D00EF849A58A4E3A9018D5414882945E-->  <HELP><![CDATA[The Created By field indicates the user who created this record.]]></HELP>
+<!--D00EF849A58A4E3A9018D5414882945E-->  <COLUMNNAME><![CDATA[Createdby]]></COLUMNNAME>
+<!--D00EF849A58A4E3A9018D5414882945E-->  <AD_TABLE_ID><![CDATA[0F213FB4B2D24B1D9DA551AC10B20084]]></AD_TABLE_ID>
+<!--D00EF849A58A4E3A9018D5414882945E-->  <AD_REFERENCE_ID><![CDATA[30]]></AD_REFERENCE_ID>
+<!--D00EF849A58A4E3A9018D5414882945E-->  <FIELDLENGTH><![CDATA[32]]></FIELDLENGTH>
+<!--D00EF849A58A4E3A9018D5414882945E-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--D00EF849A58A4E3A9018D5414882945E-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--D00EF849A58A4E3A9018D5414882945E-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
+<!--D00EF849A58A4E3A9018D5414882945E-->  <ISUPDATEABLE><![CDATA[N]]></ISUPDATEABLE>
+<!--D00EF849A58A4E3A9018D5414882945E-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--D00EF849A58A4E3A9018D5414882945E-->  <SEQNO><![CDATA[80]]></SEQNO>
+<!--D00EF849A58A4E3A9018D5414882945E-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--D00EF849A58A4E3A9018D5414882945E-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--D00EF849A58A4E3A9018D5414882945E-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--D00EF849A58A4E3A9018D5414882945E-->  <AD_ELEMENT_ID><![CDATA[246]]></AD_ELEMENT_ID>
+<!--D00EF849A58A4E3A9018D5414882945E-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--D00EF849A58A4E3A9018D5414882945E-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--D00EF849A58A4E3A9018D5414882945E-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--D00EF849A58A4E3A9018D5414882945E-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--D00EF849A58A4E3A9018D5414882945E-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--D00EF849A58A4E3A9018D5414882945E-->  <POSITION><![CDATA[8]]></POSITION>
+<!--D00EF849A58A4E3A9018D5414882945E-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--D00EF849A58A4E3A9018D5414882945E-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
+<!--D00EF849A58A4E3A9018D5414882945E-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
+<!--D00EF849A58A4E3A9018D5414882945E-->  <IMAGESIZEVALUESACTION><![CDATA[N]]></IMAGESIZEVALUESACTION>
+<!--D00EF849A58A4E3A9018D5414882945E-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
+<!--D00EF849A58A4E3A9018D5414882945E--></AD_COLUMN>
+
 <!--D3F8F1142D914AD0ACAD03B45BEB3E9F--><AD_COLUMN>
 <!--D3F8F1142D914AD0ACAD03B45BEB3E9F-->  <AD_COLUMN_ID><![CDATA[D3F8F1142D914AD0ACAD03B45BEB3E9F]]></AD_COLUMN_ID>
 <!--D3F8F1142D914AD0ACAD03B45BEB3E9F-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -8299,6 +8951,42 @@
 <!--D3F8F1142D914AD0ACAD03B45BEB3E9F-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
 <!--D3F8F1142D914AD0ACAD03B45BEB3E9F--></AD_COLUMN>
 
+<!--D4E406C7318E49A0B6F51B73A01BB687--><AD_COLUMN>
+<!--D4E406C7318E49A0B6F51B73A01BB687-->  <AD_COLUMN_ID><![CDATA[D4E406C7318E49A0B6F51B73A01BB687]]></AD_COLUMN_ID>
+<!--D4E406C7318E49A0B6F51B73A01BB687-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--D4E406C7318E49A0B6F51B73A01BB687-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--D4E406C7318E49A0B6F51B73A01BB687-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--D4E406C7318E49A0B6F51B73A01BB687-->  <NAME><![CDATA[Inherited_From]]></NAME>
+<!--D4E406C7318E49A0B6F51B73A01BB687-->  <DESCRIPTION><![CDATA[Inherited From]]></DESCRIPTION>
+<!--D4E406C7318E49A0B6F51B73A01BB687-->  <HELP><![CDATA[The role from which a permission has been inherited. If a permission has this field set it means that this is an inherited permission, an therefore that the role owner of the permission is able to access it because it inherits from the role defined in this field.]]></HELP>
+<!--D4E406C7318E49A0B6F51B73A01BB687-->  <COLUMNNAME><![CDATA[Inherited_From]]></COLUMNNAME>
+<!--D4E406C7318E49A0B6F51B73A01BB687-->  <AD_TABLE_ID><![CDATA[FF80818132D85DB50132D860924E0004]]></AD_TABLE_ID>
+<!--D4E406C7318E49A0B6F51B73A01BB687-->  <AD_REFERENCE_ID><![CDATA[18]]></AD_REFERENCE_ID>
+<!--D4E406C7318E49A0B6F51B73A01BB687-->  <AD_REFERENCE_VALUE_ID><![CDATA[800105]]></AD_REFERENCE_VALUE_ID>
+<!--D4E406C7318E49A0B6F51B73A01BB687-->  <FIELDLENGTH><![CDATA[32]]></FIELDLENGTH>
+<!--D4E406C7318E49A0B6F51B73A01BB687-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--D4E406C7318E49A0B6F51B73A01BB687-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--D4E406C7318E49A0B6F51B73A01BB687-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
+<!--D4E406C7318E49A0B6F51B73A01BB687-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--D4E406C7318E49A0B6F51B73A01BB687-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--D4E406C7318E49A0B6F51B73A01BB687-->  <SEQNO><![CDATA[120]]></SEQNO>
+<!--D4E406C7318E49A0B6F51B73A01BB687-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--D4E406C7318E49A0B6F51B73A01BB687-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--D4E406C7318E49A0B6F51B73A01BB687-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--D4E406C7318E49A0B6F51B73A01BB687-->  <AD_ELEMENT_ID><![CDATA[0FAB9FAA9D204B8AB9FA36C663842DAF]]></AD_ELEMENT_ID>
+<!--D4E406C7318E49A0B6F51B73A01BB687-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--D4E406C7318E49A0B6F51B73A01BB687-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--D4E406C7318E49A0B6F51B73A01BB687-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--D4E406C7318E49A0B6F51B73A01BB687-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--D4E406C7318E49A0B6F51B73A01BB687-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--D4E406C7318E49A0B6F51B73A01BB687-->  <POSITION><![CDATA[12]]></POSITION>
+<!--D4E406C7318E49A0B6F51B73A01BB687-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--D4E406C7318E49A0B6F51B73A01BB687-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
+<!--D4E406C7318E49A0B6F51B73A01BB687-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
+<!--D4E406C7318E49A0B6F51B73A01BB687-->  <IMAGESIZEVALUESACTION><![CDATA[N]]></IMAGESIZEVALUESACTION>
+<!--D4E406C7318E49A0B6F51B73A01BB687-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
+<!--D4E406C7318E49A0B6F51B73A01BB687--></AD_COLUMN>
+
 <!--D5128BD152A44494A9F60DBF4E33B67F--><AD_COLUMN>
 <!--D5128BD152A44494A9F60DBF4E33B67F-->  <AD_COLUMN_ID><![CDATA[D5128BD152A44494A9F60DBF4E33B67F]]></AD_COLUMN_ID>
 <!--D5128BD152A44494A9F60DBF4E33B67F-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -8583,6 +9271,42 @@
 <!--DE06CD53DAAF4B9CBE82B9605BEA4ED2-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
 <!--DE06CD53DAAF4B9CBE82B9605BEA4ED2--></AD_COLUMN>
 
+<!--DF5636F09E7D4338A8E59B7F332D66A5--><AD_COLUMN>
+<!--DF5636F09E7D4338A8E59B7F332D66A5-->  <AD_COLUMN_ID><![CDATA[DF5636F09E7D4338A8E59B7F332D66A5]]></AD_COLUMN_ID>
+<!--DF5636F09E7D4338A8E59B7F332D66A5-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--DF5636F09E7D4338A8E59B7F332D66A5-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--DF5636F09E7D4338A8E59B7F332D66A5-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--DF5636F09E7D4338A8E59B7F332D66A5-->  <NAME><![CDATA[Organization]]></NAME>
+<!--DF5636F09E7D4338A8E59B7F332D66A5-->  <DESCRIPTION><![CDATA[Organizational entity within client]]></DESCRIPTION>
+<!--DF5636F09E7D4338A8E59B7F332D66A5-->  <HELP><![CDATA[An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.]]></HELP>
+<!--DF5636F09E7D4338A8E59B7F332D66A5-->  <COLUMNNAME><![CDATA[AD_Org_ID]]></COLUMNNAME>
+<!--DF5636F09E7D4338A8E59B7F332D66A5-->  <AD_TABLE_ID><![CDATA[0F213FB4B2D24B1D9DA551AC10B20084]]></AD_TABLE_ID>
+<!--DF5636F09E7D4338A8E59B7F332D66A5-->  <AD_REFERENCE_ID><![CDATA[19]]></AD_REFERENCE_ID>
+<!--DF5636F09E7D4338A8E59B7F332D66A5-->  <FIELDLENGTH><![CDATA[32]]></FIELDLENGTH>
+<!--DF5636F09E7D4338A8E59B7F332D66A5-->  <DEFAULTVALUE><![CDATA[@AD_ORG_ID@]]></DEFAULTVALUE>
+<!--DF5636F09E7D4338A8E59B7F332D66A5-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--DF5636F09E7D4338A8E59B7F332D66A5-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--DF5636F09E7D4338A8E59B7F332D66A5-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
+<!--DF5636F09E7D4338A8E59B7F332D66A5-->  <ISUPDATEABLE><![CDATA[N]]></ISUPDATEABLE>
+<!--DF5636F09E7D4338A8E59B7F332D66A5-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--DF5636F09E7D4338A8E59B7F332D66A5-->  <SEQNO><![CDATA[50]]></SEQNO>
+<!--DF5636F09E7D4338A8E59B7F332D66A5-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--DF5636F09E7D4338A8E59B7F332D66A5-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--DF5636F09E7D4338A8E59B7F332D66A5-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--DF5636F09E7D4338A8E59B7F332D66A5-->  <AD_ELEMENT_ID><![CDATA[113]]></AD_ELEMENT_ID>
+<!--DF5636F09E7D4338A8E59B7F332D66A5-->  <ISSESSIONATTR><![CDATA[Y]]></ISSESSIONATTR>
+<!--DF5636F09E7D4338A8E59B7F332D66A5-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--DF5636F09E7D4338A8E59B7F332D66A5-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--DF5636F09E7D4338A8E59B7F332D66A5-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--DF5636F09E7D4338A8E59B7F332D66A5-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--DF5636F09E7D4338A8E59B7F332D66A5-->  <POSITION><![CDATA[5]]></POSITION>
+<!--DF5636F09E7D4338A8E59B7F332D66A5-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--DF5636F09E7D4338A8E59B7F332D66A5-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
+<!--DF5636F09E7D4338A8E59B7F332D66A5-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
+<!--DF5636F09E7D4338A8E59B7F332D66A5-->  <IMAGESIZEVALUESACTION><![CDATA[N]]></IMAGESIZEVALUESACTION>
+<!--DF5636F09E7D4338A8E59B7F332D66A5-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
+<!--DF5636F09E7D4338A8E59B7F332D66A5--></AD_COLUMN>
+
 <!--DF72F3EFC6074F2E9A7CCD70D60CE7AA--><AD_COLUMN>
 <!--DF72F3EFC6074F2E9A7CCD70D60CE7AA-->  <AD_COLUMN_ID><![CDATA[DF72F3EFC6074F2E9A7CCD70D60CE7AA]]></AD_COLUMN_ID>
 <!--DF72F3EFC6074F2E9A7CCD70D60CE7AA-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -8839,6 +9563,41 @@
 <!--E5831C3A7FB243B78D6C6446D63CAF89-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
 <!--E5831C3A7FB243B78D6C6446D63CAF89--></AD_COLUMN>
 
+<!--E769046B62594D4AB6D2C8004A05BE34--><AD_COLUMN>
+<!--E769046B62594D4AB6D2C8004A05BE34-->  <AD_COLUMN_ID><![CDATA[E769046B62594D4AB6D2C8004A05BE34]]></AD_COLUMN_ID>
+<!--E769046B62594D4AB6D2C8004A05BE34-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--E769046B62594D4AB6D2C8004A05BE34-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--E769046B62594D4AB6D2C8004A05BE34-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--E769046B62594D4AB6D2C8004A05BE34-->  <NAME><![CDATA[Help/Comment]]></NAME>
+<!--E769046B62594D4AB6D2C8004A05BE34-->  <DESCRIPTION><![CDATA[A comment that adds additional information to help users work with fields.]]></DESCRIPTION>
+<!--E769046B62594D4AB6D2C8004A05BE34-->  <HELP><![CDATA[The Help field contains a hint, comment or help about the use of this item.]]></HELP>
+<!--E769046B62594D4AB6D2C8004A05BE34-->  <COLUMNNAME><![CDATA[Help]]></COLUMNNAME>
+<!--E769046B62594D4AB6D2C8004A05BE34-->  <AD_TABLE_ID><![CDATA[0F213FB4B2D24B1D9DA551AC10B20084]]></AD_TABLE_ID>
+<!--E769046B62594D4AB6D2C8004A05BE34-->  <AD_REFERENCE_ID><![CDATA[10]]></AD_REFERENCE_ID>
+<!--E769046B62594D4AB6D2C8004A05BE34-->  <FIELDLENGTH><![CDATA[2000]]></FIELDLENGTH>
+<!--E769046B62594D4AB6D2C8004A05BE34-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--E769046B62594D4AB6D2C8004A05BE34-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--E769046B62594D4AB6D2C8004A05BE34-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
+<!--E769046B62594D4AB6D2C8004A05BE34-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--E769046B62594D4AB6D2C8004A05BE34-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--E769046B62594D4AB6D2C8004A05BE34-->  <SEQNO><![CDATA[130]]></SEQNO>
+<!--E769046B62594D4AB6D2C8004A05BE34-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--E769046B62594D4AB6D2C8004A05BE34-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--E769046B62594D4AB6D2C8004A05BE34-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--E769046B62594D4AB6D2C8004A05BE34-->  <AD_ELEMENT_ID><![CDATA[326]]></AD_ELEMENT_ID>
+<!--E769046B62594D4AB6D2C8004A05BE34-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--E769046B62594D4AB6D2C8004A05BE34-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--E769046B62594D4AB6D2C8004A05BE34-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--E769046B62594D4AB6D2C8004A05BE34-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--E769046B62594D4AB6D2C8004A05BE34-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--E769046B62594D4AB6D2C8004A05BE34-->  <POSITION><![CDATA[13]]></POSITION>
+<!--E769046B62594D4AB6D2C8004A05BE34-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--E769046B62594D4AB6D2C8004A05BE34-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
+<!--E769046B62594D4AB6D2C8004A05BE34-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
+<!--E769046B62594D4AB6D2C8004A05BE34-->  <IMAGESIZEVALUESACTION><![CDATA[N]]></IMAGESIZEVALUESACTION>
+<!--E769046B62594D4AB6D2C8004A05BE34-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
+<!--E769046B62594D4AB6D2C8004A05BE34--></AD_COLUMN>
+
 <!--E8D215F7042A4209BE321D7B83AA163A--><AD_COLUMN>
 <!--E8D215F7042A4209BE321D7B83AA163A-->  <AD_COLUMN_ID><![CDATA[E8D215F7042A4209BE321D7B83AA163A]]></AD_COLUMN_ID>
 <!--E8D215F7042A4209BE321D7B83AA163A-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -9346,6 +10105,42 @@
 <!--F6ABE97E8E6D4E99878ADFF3B09F9249-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
 <!--F6ABE97E8E6D4E99878ADFF3B09F9249--></AD_COLUMN>
 
+<!--F7C07505BA014DE984D5D24364D5C90F--><AD_COLUMN>
+<!--F7C07505BA014DE984D5D24364D5C90F-->  <AD_COLUMN_ID><![CDATA[F7C07505BA014DE984D5D24364D5C90F]]></AD_COLUMN_ID>
+<!--F7C07505BA014DE984D5D24364D5C90F-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--F7C07505BA014DE984D5D24364D5C90F-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--F7C07505BA014DE984D5D24364D5C90F-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--F7C07505BA014DE984D5D24364D5C90F-->  <NAME><![CDATA[Updated]]></NAME>
+<!--F7C07505BA014DE984D5D24364D5C90F-->  <DESCRIPTION><![CDATA[The date that this record was last updated]]></DESCRIPTION>
+<!--F7C07505BA014DE984D5D24364D5C90F-->  <HELP><![CDATA[The Updated field indicates the date that this record was updated.]]></HELP>
+<!--F7C07505BA014DE984D5D24364D5C90F-->  <COLUMNNAME><![CDATA[Updated]]></COLUMNNAME>
+<!--F7C07505BA014DE984D5D24364D5C90F-->  <AD_TABLE_ID><![CDATA[0F213FB4B2D24B1D9DA551AC10B20084]]></AD_TABLE_ID>
+<!--F7C07505BA014DE984D5D24364D5C90F-->  <AD_REFERENCE_ID><![CDATA[16]]></AD_REFERENCE_ID>
+<!--F7C07505BA014DE984D5D24364D5C90F-->  <FIELDLENGTH><![CDATA[19]]></FIELDLENGTH>
+<!--F7C07505BA014DE984D5D24364D5C90F-->  <DEFAULTVALUE><![CDATA[@#Date@]]></DEFAULTVALUE>
+<!--F7C07505BA014DE984D5D24364D5C90F-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--F7C07505BA014DE984D5D24364D5C90F-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--F7C07505BA014DE984D5D24364D5C90F-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
+<!--F7C07505BA014DE984D5D24364D5C90F-->  <ISUPDATEABLE><![CDATA[N]]></ISUPDATEABLE>
+<!--F7C07505BA014DE984D5D24364D5C90F-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--F7C07505BA014DE984D5D24364D5C90F-->  <SEQNO><![CDATA[90]]></SEQNO>
+<!--F7C07505BA014DE984D5D24364D5C90F-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--F7C07505BA014DE984D5D24364D5C90F-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--F7C07505BA014DE984D5D24364D5C90F-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--F7C07505BA014DE984D5D24364D5C90F-->  <AD_ELEMENT_ID><![CDATA[607]]></AD_ELEMENT_ID>
+<!--F7C07505BA014DE984D5D24364D5C90F-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--F7C07505BA014DE984D5D24364D5C90F-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--F7C07505BA014DE984D5D24364D5C90F-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--F7C07505BA014DE984D5D24364D5C90F-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--F7C07505BA014DE984D5D24364D5C90F-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--F7C07505BA014DE984D5D24364D5C90F-->  <POSITION><![CDATA[9]]></POSITION>
+<!--F7C07505BA014DE984D5D24364D5C90F-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--F7C07505BA014DE984D5D24364D5C90F-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
+<!--F7C07505BA014DE984D5D24364D5C90F-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
+<!--F7C07505BA014DE984D5D24364D5C90F-->  <IMAGESIZEVALUESACTION><![CDATA[N]]></IMAGESIZEVALUESACTION>
+<!--F7C07505BA014DE984D5D24364D5C90F-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
+<!--F7C07505BA014DE984D5D24364D5C90F--></AD_COLUMN>
+
 <!--F7DE0BA73FA64A68B898495072729D12--><AD_COLUMN>
 <!--F7DE0BA73FA64A68B898495072729D12-->  <AD_COLUMN_ID><![CDATA[F7DE0BA73FA64A68B898495072729D12]]></AD_COLUMN_ID>
 <!--F7DE0BA73FA64A68B898495072729D12-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -9599,8 +10394,8 @@
 <!--FEEFB3DC943940A08FE7DCF663BFF90F-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--FEEFB3DC943940A08FE7DCF663BFF90F-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--FEEFB3DC943940A08FE7DCF663BFF90F-->  <NAME><![CDATA[IsLazyFiltering]]></NAME>
-<!--FEEFB3DC943940A08FE7DCF663BFF90F-->  <DESCRIPTION><![CDATA[If it is set, the grid won't perform a filter action until a button be pressed.]]></DESCRIPTION>
-<!--FEEFB3DC943940A08FE7DCF663BFF90F-->  <HELP><![CDATA[If it is set, the grid won't perform a filter action until the 'Apply Filters' button be pressed.]]></HELP>
+<!--FEEFB3DC943940A08FE7DCF663BFF90F-->  <DESCRIPTION><![CDATA[If it is set, the grid won't perform a filter and/or a sorting action until a button be pressed.]]></DESCRIPTION>
+<!--FEEFB3DC943940A08FE7DCF663BFF90F-->  <HELP><![CDATA[If it is set, the grid won't perform a filter and/or a sorting action until the 'Apply Filters' button be pressed.]]></HELP>
 <!--FEEFB3DC943940A08FE7DCF663BFF90F-->  <COLUMNNAME><![CDATA[IsLazyFiltering]]></COLUMNNAME>
 <!--FEEFB3DC943940A08FE7DCF663BFF90F-->  <AD_TABLE_ID><![CDATA[8A16662B37184121A1EDAA89890E160C]]></AD_TABLE_ID>
 <!--FEEFB3DC943940A08FE7DCF663BFF90F-->  <AD_REFERENCE_ID><![CDATA[17]]></AD_REFERENCE_ID>
--- a/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_ELEMENT.xml	Thu Jan 21 09:06:30 2016 +0000
+++ b/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_ELEMENT.xml	Fri Jan 22 08:42:24 2016 +0000
@@ -88,12 +88,26 @@
 <!--10922048465547F48765035389E22977-->  <COLUMNNAME><![CDATA[IsLazyFiltering]]></COLUMNNAME>
 <!--10922048465547F48765035389E22977-->  <NAME><![CDATA[Lazy Filtering on Grid]]></NAME>
 <!--10922048465547F48765035389E22977-->  <PRINTNAME><![CDATA[Lazy Filtering on Grid]]></PRINTNAME>
-<!--10922048465547F48765035389E22977-->  <DESCRIPTION><![CDATA[If it is set, the grid won't perform a filter action until a button be pressed.]]></DESCRIPTION>
-<!--10922048465547F48765035389E22977-->  <HELP><![CDATA[If it is set, the grid won't perform a filter action until the 'Apply Filters' button be pressed.]]></HELP>
+<!--10922048465547F48765035389E22977-->  <DESCRIPTION><![CDATA[If it is set, the grid won't perform a filter and/or a sorting action until a button be pressed.]]></DESCRIPTION>
+<!--10922048465547F48765035389E22977-->  <HELP><![CDATA[If it is set, the grid won't perform a filter and/or a sorting action until the 'Apply Filters' button be pressed.]]></HELP>
 <!--10922048465547F48765035389E22977-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
 <!--10922048465547F48765035389E22977-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
 <!--10922048465547F48765035389E22977--></AD_ELEMENT>
 
+<!--1185A82966EA40ABA990B5DDBD9B8FBA--><AD_ELEMENT>
+<!--1185A82966EA40ABA990B5DDBD9B8FBA-->  <AD_ELEMENT_ID><![CDATA[1185A82966EA40ABA990B5DDBD9B8FBA]]></AD_ELEMENT_ID>
+<!--1185A82966EA40ABA990B5DDBD9B8FBA-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--1185A82966EA40ABA990B5DDBD9B8FBA-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--1185A82966EA40ABA990B5DDBD9B8FBA-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--1185A82966EA40ABA990B5DDBD9B8FBA-->  <COLUMNNAME><![CDATA[Disablefkcombo]]></COLUMNNAME>
+<!--1185A82966EA40ABA990B5DDBD9B8FBA-->  <NAME><![CDATA[Disable Foreign Key Combo]]></NAME>
+<!--1185A82966EA40ABA990B5DDBD9B8FBA-->  <PRINTNAME><![CDATA[Disable Foreign Key Filter Combo]]></PRINTNAME>
+<!--1185A82966EA40ABA990B5DDBD9B8FBA-->  <DESCRIPTION><![CDATA[If this flag is checked, the foreign key combo will be disabled and the column will be filtered like a standard text column]]></DESCRIPTION>
+<!--1185A82966EA40ABA990B5DDBD9B8FBA-->  <HELP><![CDATA[If this flag is checked, the foreign key combo will be disabled and the column will be filtered like a standard text column]]></HELP>
+<!--1185A82966EA40ABA990B5DDBD9B8FBA-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--1185A82966EA40ABA990B5DDBD9B8FBA-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
+<!--1185A82966EA40ABA990B5DDBD9B8FBA--></AD_ELEMENT>
+
 <!--18EA6EC150C545AE8C5E0A3BD4BD4871--><AD_ELEMENT>
 <!--18EA6EC150C545AE8C5E0A3BD4BD4871-->  <AD_ELEMENT_ID><![CDATA[18EA6EC150C545AE8C5E0A3BD4BD4871]]></AD_ELEMENT_ID>
 <!--18EA6EC150C545AE8C5E0A3BD4BD4871-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -133,6 +147,20 @@
 <!--1DD68F7AE78B4F0EB010F507D4B7A0D4-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
 <!--1DD68F7AE78B4F0EB010F507D4B7A0D4--></AD_ELEMENT>
 
+<!--2D51BCE155184D34A5F38FFE515D5C23--><AD_ELEMENT>
+<!--2D51BCE155184D34A5F38FFE515D5C23-->  <AD_ELEMENT_ID><![CDATA[2D51BCE155184D34A5F38FFE515D5C23]]></AD_ELEMENT_ID>
+<!--2D51BCE155184D34A5F38FFE515D5C23-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--2D51BCE155184D34A5F38FFE515D5C23-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--2D51BCE155184D34A5F38FFE515D5C23-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--2D51BCE155184D34A5F38FFE515D5C23-->  <COLUMNNAME><![CDATA[IsFkDropDownUnfiltered]]></COLUMNNAME>
+<!--2D51BCE155184D34A5F38FFE515D5C23-->  <NAME><![CDATA[Unfiltered Foreign Key Combo]]></NAME>
+<!--2D51BCE155184D34A5F38FFE515D5C23-->  <PRINTNAME><![CDATA[Is FK Dropdown Unfiltered]]></PRINTNAME>
+<!--2D51BCE155184D34A5F38FFE515D5C23-->  <DESCRIPTION><![CDATA[If this flag if checked, the filter drop down will show the rows from the referenced table unfiltered by specific rows being referenced in the referencing table.]]></DESCRIPTION>
+<!--2D51BCE155184D34A5F38FFE515D5C23-->  <HELP><![CDATA[If this flag if checked, the filter drop down will show the rows from the referenced table unfiltered by specific rows being referenced in the referencing table. The filters entered by the user in the grid filter editor will be applied.]]></HELP>
+<!--2D51BCE155184D34A5F38FFE515D5C23-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--2D51BCE155184D34A5F38FFE515D5C23-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
+<!--2D51BCE155184D34A5F38FFE515D5C23--></AD_ELEMENT>
+
 <!--31DCDECE67A34C418930D50405D8057D--><AD_ELEMENT>
 <!--31DCDECE67A34C418930D50405D8057D-->  <AD_ELEMENT_ID><![CDATA[31DCDECE67A34C418930D50405D8057D]]></AD_ELEMENT_ID>
 <!--31DCDECE67A34C418930D50405D8057D-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -402,6 +430,18 @@
 <!--7FCB281817674667B5E7BA53B464F299-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
 <!--7FCB281817674667B5E7BA53B464F299--></AD_ELEMENT>
 
+<!--82F94DF2DAF64D0CA93BA0CDC4346972--><AD_ELEMENT>
+<!--82F94DF2DAF64D0CA93BA0CDC4346972-->  <AD_ELEMENT_ID><![CDATA[82F94DF2DAF64D0CA93BA0CDC4346972]]></AD_ELEMENT_ID>
+<!--82F94DF2DAF64D0CA93BA0CDC4346972-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--82F94DF2DAF64D0CA93BA0CDC4346972-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--82F94DF2DAF64D0CA93BA0CDC4346972-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--82F94DF2DAF64D0CA93BA0CDC4346972-->  <COLUMNNAME><![CDATA[Obuiapp_Process_Trl_ID]]></COLUMNNAME>
+<!--82F94DF2DAF64D0CA93BA0CDC4346972-->  <NAME><![CDATA[Process Translation]]></NAME>
+<!--82F94DF2DAF64D0CA93BA0CDC4346972-->  <PRINTNAME><![CDATA[Obuiapp_Process_Trl_ID]]></PRINTNAME>
+<!--82F94DF2DAF64D0CA93BA0CDC4346972-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--82F94DF2DAF64D0CA93BA0CDC4346972-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
+<!--82F94DF2DAF64D0CA93BA0CDC4346972--></AD_ELEMENT>
+
 <!--927E4DC3105D1526E040A8C0CF072A46--><AD_ELEMENT>
 <!--927E4DC3105D1526E040A8C0CF072A46-->  <AD_ELEMENT_ID><![CDATA[927E4DC3105D1526E040A8C0CF072A46]]></AD_ELEMENT_ID>
 <!--927E4DC3105D1526E040A8C0CF072A46-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_FIELD.xml	Thu Jan 21 09:06:30 2016 +0000
+++ b/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_FIELD.xml	Fri Jan 22 08:42:24 2016 +0000
@@ -29,6 +29,63 @@
 <!--00E23D2E635C446B8CF23E766B232DB5-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
 <!--00E23D2E635C446B8CF23E766B232DB5--></AD_FIELD>
 
+<!--0218A1424DED490CBC424E03F66B29C9--><AD_FIELD>
+<!--0218A1424DED490CBC424E03F66B29C9-->  <AD_FIELD_ID><![CDATA[0218A1424DED490CBC424E03F66B29C9]]></AD_FIELD_ID>
+<!--0218A1424DED490CBC424E03F66B29C9-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--0218A1424DED490CBC424E03F66B29C9-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--0218A1424DED490CBC424E03F66B29C9-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--0218A1424DED490CBC424E03F66B29C9-->  <NAME><![CDATA[Inherited From]]></NAME>
+<!--0218A1424DED490CBC424E03F66B29C9-->  <DESCRIPTION><![CDATA[Inherited From]]></DESCRIPTION>
+<!--0218A1424DED490CBC424E03F66B29C9-->  <HELP><![CDATA[The role from which a permission has been inherited. If a permission has this field set it means that this is an inherited permission, an therefore that the role owner of the permission is able to access it because it inherits from the role defined in this field.]]></HELP>
+<!--0218A1424DED490CBC424E03F66B29C9-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--0218A1424DED490CBC424E03F66B29C9-->  <AD_TAB_ID><![CDATA[6D732D027FFA4FB1BD0140ED3B606C0E]]></AD_TAB_ID>
+<!--0218A1424DED490CBC424E03F66B29C9-->  <AD_COLUMN_ID><![CDATA[D4E406C7318E49A0B6F51B73A01BB687]]></AD_COLUMN_ID>
+<!--0218A1424DED490CBC424E03F66B29C9-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
+<!--0218A1424DED490CBC424E03F66B29C9-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--0218A1424DED490CBC424E03F66B29C9-->  <DISPLAYLENGTH><![CDATA[32]]></DISPLAYLENGTH>
+<!--0218A1424DED490CBC424E03F66B29C9-->  <ISREADONLY><![CDATA[Y]]></ISREADONLY>
+<!--0218A1424DED490CBC424E03F66B29C9-->  <SEQNO><![CDATA[30]]></SEQNO>
+<!--0218A1424DED490CBC424E03F66B29C9-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--0218A1424DED490CBC424E03F66B29C9-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--0218A1424DED490CBC424E03F66B29C9-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--0218A1424DED490CBC424E03F66B29C9-->  <SHOWINRELATION><![CDATA[Y]]></SHOWINRELATION>
+<!--0218A1424DED490CBC424E03F66B29C9-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--0218A1424DED490CBC424E03F66B29C9-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--0218A1424DED490CBC424E03F66B29C9-->  <GRID_SEQNO><![CDATA[30]]></GRID_SEQNO>
+<!--0218A1424DED490CBC424E03F66B29C9-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--0218A1424DED490CBC424E03F66B29C9-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--0218A1424DED490CBC424E03F66B29C9-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--0218A1424DED490CBC424E03F66B29C9-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
+<!--0218A1424DED490CBC424E03F66B29C9--></AD_FIELD>
+
+<!--027662E0F1424296BAA319DACBBF0CFC--><AD_FIELD>
+<!--027662E0F1424296BAA319DACBBF0CFC-->  <AD_FIELD_ID><![CDATA[027662E0F1424296BAA319DACBBF0CFC]]></AD_FIELD_ID>
+<!--027662E0F1424296BAA319DACBBF0CFC-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--027662E0F1424296BAA319DACBBF0CFC-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--027662E0F1424296BAA319DACBBF0CFC-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--027662E0F1424296BAA319DACBBF0CFC-->  <NAME><![CDATA[Process Defintion]]></NAME>
+<!--027662E0F1424296BAA319DACBBF0CFC-->  <DESCRIPTION><![CDATA[Process Defintion]]></DESCRIPTION>
+<!--027662E0F1424296BAA319DACBBF0CFC-->  <HELP><![CDATA[Process Defintion is a re implementation of Process with 3.0 infrastructure.]]></HELP>
+<!--027662E0F1424296BAA319DACBBF0CFC-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--027662E0F1424296BAA319DACBBF0CFC-->  <AD_TAB_ID><![CDATA[FD25BB2F15814C7C9C5CDE550F50FBFF]]></AD_TAB_ID>
+<!--027662E0F1424296BAA319DACBBF0CFC-->  <AD_COLUMN_ID><![CDATA[5EDD238DFBD84512A7A9BA7653089B89]]></AD_COLUMN_ID>
+<!--027662E0F1424296BAA319DACBBF0CFC-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
+<!--027662E0F1424296BAA319DACBBF0CFC-->  <ISDISPLAYED><![CDATA[N]]></ISDISPLAYED>
+<!--027662E0F1424296BAA319DACBBF0CFC-->  <DISPLAYLENGTH><![CDATA[32]]></DISPLAYLENGTH>
+<!--027662E0F1424296BAA319DACBBF0CFC-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--027662E0F1424296BAA319DACBBF0CFC-->  <SEQNO><![CDATA[50]]></SEQNO>
+<!--027662E0F1424296BAA319DACBBF0CFC-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--027662E0F1424296BAA319DACBBF0CFC-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--027662E0F1424296BAA319DACBBF0CFC-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--027662E0F1424296BAA319DACBBF0CFC-->  <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
+<!--027662E0F1424296BAA319DACBBF0CFC-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--027662E0F1424296BAA319DACBBF0CFC-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--027662E0F1424296BAA319DACBBF0CFC-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--027662E0F1424296BAA319DACBBF0CFC-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--027662E0F1424296BAA319DACBBF0CFC-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--027662E0F1424296BAA319DACBBF0CFC-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
+<!--027662E0F1424296BAA319DACBBF0CFC--></AD_FIELD>
+
 <!--031B7409581E4A5A893D04C057B93CF9--><AD_FIELD>
 <!--031B7409581E4A5A893D04C057B93CF9-->  <AD_FIELD_ID><![CDATA[031B7409581E4A5A893D04C057B93CF9]]></AD_FIELD_ID>
 <!--031B7409581E4A5A893D04C057B93CF9-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -76,6 +133,7 @@
 <!--03724122C8F744FDB387B47B7907E0D3-->  <AD_COLUMN_ID><![CDATA[7E5D4C62298D4310A12AB5F28B9D2C51]]></AD_COLUMN_ID>
 <!--03724122C8F744FDB387B47B7907E0D3-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
 <!--03724122C8F744FDB387B47B7907E0D3-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--03724122C8F744FDB387B47B7907E0D3-->  <DISPLAYLOGIC><![CDATA[(@Filterable@!'N' & @Disablefkcombo@!'Y')]]></DISPLAYLOGIC>
 <!--03724122C8F744FDB387B47B7907E0D3-->  <DISPLAYLENGTH><![CDATA[60]]></DISPLAYLENGTH>
 <!--03724122C8F744FDB387B47B7907E0D3-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--03724122C8F744FDB387B47B7907E0D3-->  <SEQNO><![CDATA[120]]></SEQNO>
@@ -119,6 +177,36 @@
 <!--03743E0195424F98A7FB273DCB1757EF-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
 <!--03743E0195424F98A7FB273DCB1757EF--></AD_FIELD>
 
+<!--04A5FB524C89434AAAB5BD520CE3B15A--><AD_FIELD>
+<!--04A5FB524C89434AAAB5BD520CE3B15A-->  <AD_FIELD_ID><![CDATA[04A5FB524C89434AAAB5BD520CE3B15A]]></AD_FIELD_ID>
+<!--04A5FB524C89434AAAB5BD520CE3B15A-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--04A5FB524C89434AAAB5BD520CE3B15A-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--04A5FB524C89434AAAB5BD520CE3B15A-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--04A5FB524C89434AAAB5BD520CE3B15A-->  <NAME><![CDATA[Active]]></NAME>
+<!--04A5FB524C89434AAAB5BD520CE3B15A-->  <DESCRIPTION><![CDATA[A flag indicating whether this record is available for use or de-activated.]]></DESCRIPTION>
+<!--04A5FB524C89434AAAB5BD520CE3B15A-->  <HELP><![CDATA[There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reporting. There are two reasons for de-activating and not deleting records: 
+(1) The system requires the record for auditing purposes.
+(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are existing invoices for it. By de-activating the Business Partner you prevent it from being used in future transactions.]]></HELP>
+<!--04A5FB524C89434AAAB5BD520CE3B15A-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--04A5FB524C89434AAAB5BD520CE3B15A-->  <AD_TAB_ID><![CDATA[4F5C5D438DAF47D4AE8DD48C44D4FE04]]></AD_TAB_ID>
+<!--04A5FB524C89434AAAB5BD520CE3B15A-->  <AD_COLUMN_ID><![CDATA[927DA01A83443AFAE040A8C0CF072B85]]></AD_COLUMN_ID>
+<!--04A5FB524C89434AAAB5BD520CE3B15A-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
+<!--04A5FB524C89434AAAB5BD520CE3B15A-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--04A5FB524C89434AAAB5BD520CE3B15A-->  <DISPLAYLENGTH><![CDATA[1]]></DISPLAYLENGTH>
+<!--04A5FB524C89434AAAB5BD520CE3B15A-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--04A5FB524C89434AAAB5BD520CE3B15A-->  <SEQNO><![CDATA[20]]></SEQNO>
+<!--04A5FB524C89434AAAB5BD520CE3B15A-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--04A5FB524C89434AAAB5BD520CE3B15A-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--04A5FB524C89434AAAB5BD520CE3B15A-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--04A5FB524C89434AAAB5BD520CE3B15A-->  <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
+<!--04A5FB524C89434AAAB5BD520CE3B15A-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--04A5FB524C89434AAAB5BD520CE3B15A-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--04A5FB524C89434AAAB5BD520CE3B15A-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--04A5FB524C89434AAAB5BD520CE3B15A-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--04A5FB524C89434AAAB5BD520CE3B15A-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--04A5FB524C89434AAAB5BD520CE3B15A-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
+<!--04A5FB524C89434AAAB5BD520CE3B15A--></AD_FIELD>
+
 <!--04F524D80D544FE3BCA06EA3AB09789C--><AD_FIELD>
 <!--04F524D80D544FE3BCA06EA3AB09789C-->  <AD_FIELD_ID><![CDATA[04F524D80D544FE3BCA06EA3AB09789C]]></AD_FIELD_ID>
 <!--04F524D80D544FE3BCA06EA3AB09789C-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -951,6 +1039,35 @@
 <!--18CC8367D729403AAE2E36169D73EDC3-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
 <!--18CC8367D729403AAE2E36169D73EDC3--></AD_FIELD>
 
+<!--1ACE025E4891402BB9CCAE105C144EFF--><AD_FIELD>
+<!--1ACE025E4891402BB9CCAE105C144EFF-->  <AD_FIELD_ID><![CDATA[1ACE025E4891402BB9CCAE105C144EFF]]></AD_FIELD_ID>
+<!--1ACE025E4891402BB9CCAE105C144EFF-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--1ACE025E4891402BB9CCAE105C144EFF-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--1ACE025E4891402BB9CCAE105C144EFF-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--1ACE025E4891402BB9CCAE105C144EFF-->  <NAME><![CDATA[Help/Comment]]></NAME>
+<!--1ACE025E4891402BB9CCAE105C144EFF-->  <DESCRIPTION><![CDATA[A comment that adds additional information to help users work with fields.]]></DESCRIPTION>
+<!--1ACE025E4891402BB9CCAE105C144EFF-->  <HELP><![CDATA[The Help field contains a hint, comment or help about the use of this item.]]></HELP>
+<!--1ACE025E4891402BB9CCAE105C144EFF-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--1ACE025E4891402BB9CCAE105C144EFF-->  <AD_TAB_ID><![CDATA[4F5C5D438DAF47D4AE8DD48C44D4FE04]]></AD_TAB_ID>
+<!--1ACE025E4891402BB9CCAE105C144EFF-->  <AD_COLUMN_ID><![CDATA[927DA01A834C3AFAE040A8C0CF072B85]]></AD_COLUMN_ID>
+<!--1ACE025E4891402BB9CCAE105C144EFF-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
+<!--1ACE025E4891402BB9CCAE105C144EFF-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--1ACE025E4891402BB9CCAE105C144EFF-->  <DISPLAYLENGTH><![CDATA[2000]]></DISPLAYLENGTH>
+<!--1ACE025E4891402BB9CCAE105C144EFF-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--1ACE025E4891402BB9CCAE105C144EFF-->  <SEQNO><![CDATA[60]]></SEQNO>
+<!--1ACE025E4891402BB9CCAE105C144EFF-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--1ACE025E4891402BB9CCAE105C144EFF-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--1ACE025E4891402BB9CCAE105C144EFF-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--1ACE025E4891402BB9CCAE105C144EFF-->  <SHOWINRELATION><![CDATA[Y]]></SHOWINRELATION>
+<!--1ACE025E4891402BB9CCAE105C144EFF-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--1ACE025E4891402BB9CCAE105C144EFF-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--1ACE025E4891402BB9CCAE105C144EFF-->  <GRID_SEQNO><![CDATA[40]]></GRID_SEQNO>
+<!--1ACE025E4891402BB9CCAE105C144EFF-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--1ACE025E4891402BB9CCAE105C144EFF-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--1ACE025E4891402BB9CCAE105C144EFF-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--1ACE025E4891402BB9CCAE105C144EFF-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
+<!--1ACE025E4891402BB9CCAE105C144EFF--></AD_FIELD>
+
 <!--1C35877D26B1432C9867E4F5EAEE17F8--><AD_FIELD>
 <!--1C35877D26B1432C9867E4F5EAEE17F8-->  <AD_FIELD_ID><![CDATA[1C35877D26B1432C9867E4F5EAEE17F8]]></AD_FIELD_ID>
 <!--1C35877D26B1432C9867E4F5EAEE17F8-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -1361,6 +1478,34 @@
 <!--27E751EB37C841EC930FD493AB2CF64B-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
 <!--27E751EB37C841EC930FD493AB2CF64B--></AD_FIELD>
 
+<!--287DDC4447C24C03BCE538328EC5BACE--><AD_FIELD>
+<!--287DDC4447C24C03BCE538328EC5BACE-->  <AD_FIELD_ID><![CDATA[287DDC4447C24C03BCE538328EC5BACE]]></AD_FIELD_ID>
+<!--287DDC4447C24C03BCE538328EC5BACE-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--287DDC4447C24C03BCE538328EC5BACE-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--287DDC4447C24C03BCE538328EC5BACE-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--287DDC4447C24C03BCE538328EC5BACE-->  <NAME><![CDATA[Disable Foreign Key Combo]]></NAME>
+<!--287DDC4447C24C03BCE538328EC5BACE-->  <DESCRIPTION><![CDATA[If this flag is checked, the foreign key combo will be disabled and the column will be filtered like a standard text column]]></DESCRIPTION>
+<!--287DDC4447C24C03BCE538328EC5BACE-->  <HELP><![CDATA[If this flag is checked, the foreign key combo will be disabled and the column will be filtered like a standard text column]]></HELP>
+<!--287DDC4447C24C03BCE538328EC5BACE-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--287DDC4447C24C03BCE538328EC5BACE-->  <AD_TAB_ID><![CDATA[13FE911F7F684A47801DF55525BAD4A1]]></AD_TAB_ID>
+<!--287DDC4447C24C03BCE538328EC5BACE-->  <AD_COLUMN_ID><![CDATA[02CB84907EA844568D4CE3597E1D6C69]]></AD_COLUMN_ID>
+<!--287DDC4447C24C03BCE538328EC5BACE-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
+<!--287DDC4447C24C03BCE538328EC5BACE-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--287DDC4447C24C03BCE538328EC5BACE-->  <DISPLAYLENGTH><![CDATA[1]]></DISPLAYLENGTH>
+<!--287DDC4447C24C03BCE538328EC5BACE-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--287DDC4447C24C03BCE538328EC5BACE-->  <SEQNO><![CDATA[120]]></SEQNO>
+<!--287DDC4447C24C03BCE538328EC5BACE-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--287DDC4447C24C03BCE538328EC5BACE-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--287DDC4447C24C03BCE538328EC5BACE-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--287DDC4447C24C03BCE538328EC5BACE-->  <SHOWINRELATION><![CDATA[Y]]></SHOWINRELATION>
+<!--287DDC4447C24C03BCE538328EC5BACE-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--287DDC4447C24C03BCE538328EC5BACE-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--287DDC4447C24C03BCE538328EC5BACE-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--287DDC4447C24C03BCE538328EC5BACE-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--287DDC4447C24C03BCE538328EC5BACE-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--287DDC4447C24C03BCE538328EC5BACE-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
+<!--287DDC4447C24C03BCE538328EC5BACE--></AD_FIELD>
+
 <!--2C3B28510C0544BC8BDA4461AE88C486--><AD_FIELD>
 <!--2C3B28510C0544BC8BDA4461AE88C486-->  <AD_FIELD_ID><![CDATA[2C3B28510C0544BC8BDA4461AE88C486]]></AD_FIELD_ID>
 <!--2C3B28510C0544BC8BDA4461AE88C486-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -1454,6 +1599,34 @@
 <!--2FF944B417B544C8A8F8757F1C9F3E35-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
 <!--2FF944B417B544C8A8F8757F1C9F3E35--></AD_FIELD>
 
+<!--30F306CF2BCC4E11AFB3E6B8AD901289--><AD_FIELD>
+<!--30F306CF2BCC4E11AFB3E6B8AD901289-->  <AD_FIELD_ID><![CDATA[30F306CF2BCC4E11AFB3E6B8AD901289]]></AD_FIELD_ID>
+<!--30F306CF2BCC4E11AFB3E6B8AD901289-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--30F306CF2BCC4E11AFB3E6B8AD901289-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--30F306CF2BCC4E11AFB3E6B8AD901289-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--30F306CF2BCC4E11AFB3E6B8AD901289-->  <NAME><![CDATA[Disable Foreign Key Combo]]></NAME>
+<!--30F306CF2BCC4E11AFB3E6B8AD901289-->  <DESCRIPTION><![CDATA[If this flag is checked, the foreign key combo will be disabled and the column will be filtered like a standard text column]]></DESCRIPTION>
+<!--30F306CF2BCC4E11AFB3E6B8AD901289-->  <HELP><![CDATA[If this flag is checked, the foreign key combo will be disabled and the column will be filtered like a standard text column]]></HELP>
+<!--30F306CF2BCC4E11AFB3E6B8AD901289-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--30F306CF2BCC4E11AFB3E6B8AD901289-->  <AD_TAB_ID><![CDATA[49B33DC2EDFD45A48EECE139AD5E9AC9]]></AD_TAB_ID>
+<!--30F306CF2BCC4E11AFB3E6B8AD901289-->  <AD_COLUMN_ID><![CDATA[5A8AC3A0A48C49A7A7CFD4AEF1E2C3ED]]></AD_COLUMN_ID>
+<!--30F306CF2BCC4E11AFB3E6B8AD901289-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
+<!--30F306CF2BCC4E11AFB3E6B8AD901289-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--30F306CF2BCC4E11AFB3E6B8AD901289-->  <DISPLAYLENGTH><![CDATA[60]]></DISPLAYLENGTH>
+<!--30F306CF2BCC4E11AFB3E6B8AD901289-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--30F306CF2BCC4E11AFB3E6B8AD901289-->  <SEQNO><![CDATA[130]]></SEQNO>
+<!--30F306CF2BCC4E11AFB3E6B8AD901289-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--30F306CF2BCC4E11AFB3E6B8AD901289-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--30F306CF2BCC4E11AFB3E6B8AD901289-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--30F306CF2BCC4E11AFB3E6B8AD901289-->  <SHOWINRELATION><![CDATA[Y]]></SHOWINRELATION>
+<!--30F306CF2BCC4E11AFB3E6B8AD901289-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--30F306CF2BCC4E11AFB3E6B8AD901289-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--30F306CF2BCC4E11AFB3E6B8AD901289-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--30F306CF2BCC4E11AFB3E6B8AD901289-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--30F306CF2BCC4E11AFB3E6B8AD901289-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--30F306CF2BCC4E11AFB3E6B8AD901289-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
+<!--30F306CF2BCC4E11AFB3E6B8AD901289--></AD_FIELD>
+
 <!--312B596239AF498EBAF36C1B9A54D2A8--><AD_FIELD>
 <!--312B596239AF498EBAF36C1B9A54D2A8-->  <AD_FIELD_ID><![CDATA[312B596239AF498EBAF36C1B9A54D2A8]]></AD_FIELD_ID>
 <!--312B596239AF498EBAF36C1B9A54D2A8-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -1540,6 +1713,35 @@
 <!--36DED25B25E14276AC869C5513586252-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
 <!--36DED25B25E14276AC869C5513586252--></AD_FIELD>
 
+<!--37786992729946669816AC4A5CA3465F--><AD_FIELD>
+<!--37786992729946669816AC4A5CA3465F-->  <AD_FIELD_ID><![CDATA[37786992729946669816AC4A5CA3465F]]></AD_FIELD_ID>
+<!--37786992729946669816AC4A5CA3465F-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--37786992729946669816AC4A5CA3465F-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--37786992729946669816AC4A5CA3465F-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--37786992729946669816AC4A5CA3465F-->  <NAME><![CDATA[Name]]></NAME>
+<!--37786992729946669816AC4A5CA3465F-->  <DESCRIPTION><![CDATA[A non-unique identifier for a record/document often used as a search tool.]]></DESCRIPTION>
+<!--37786992729946669816AC4A5CA3465F-->  <HELP><![CDATA[A more descriptive identifier (that does need to be unique) of a record/document that is used as a default search option along with the search key (that is unique and mostly shorter). It is up to 60 characters in length.]]></HELP>
+<!--37786992729946669816AC4A5CA3465F-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--37786992729946669816AC4A5CA3465F-->  <AD_TAB_ID><![CDATA[4F5C5D438DAF47D4AE8DD48C44D4FE04]]></AD_TAB_ID>
+<!--37786992729946669816AC4A5CA3465F-->  <AD_COLUMN_ID><![CDATA[927DA01A834A3AFAE040A8C0CF072B85]]></AD_COLUMN_ID>
+<!--37786992729946669816AC4A5CA3465F-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
+<!--37786992729946669816AC4A5CA3465F-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--37786992729946669816AC4A5CA3465F-->  <DISPLAYLENGTH><![CDATA[60]]></DISPLAYLENGTH>
+<!--37786992729946669816AC4A5CA3465F-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--37786992729946669816AC4A5CA3465F-->  <SEQNO><![CDATA[40]]></SEQNO>
+<!--37786992729946669816AC4A5CA3465F-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--37786992729946669816AC4A5CA3465F-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--37786992729946669816AC4A5CA3465F-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--37786992729946669816AC4A5CA3465F-->  <SHOWINRELATION><![CDATA[Y]]></SHOWINRELATION>
+<!--37786992729946669816AC4A5CA3465F-->  <ISFIRSTFOCUSEDFIELD><![CDATA[Y]]></ISFIRSTFOCUSEDFIELD>
+<!--37786992729946669816AC4A5CA3465F-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--37786992729946669816AC4A5CA3465F-->  <GRID_SEQNO><![CDATA[20]]></GRID_SEQNO>
+<!--37786992729946669816AC4A5CA3465F-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--37786992729946669816AC4A5CA3465F-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--37786992729946669816AC4A5CA3465F-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--37786992729946669816AC4A5CA3465F-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
+<!--37786992729946669816AC4A5CA3465F--></AD_FIELD>
+
 <!--37CE7009137745BF83BB6BD12D46DB31--><AD_FIELD>
 <!--37CE7009137745BF83BB6BD12D46DB31-->  <AD_FIELD_ID><![CDATA[37CE7009137745BF83BB6BD12D46DB31]]></AD_FIELD_ID>
 <!--37CE7009137745BF83BB6BD12D46DB31-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -1655,6 +1857,35 @@
 <!--39B1D24F46A34049890E6C8D84154231-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
 <!--39B1D24F46A34049890E6C8D84154231--></AD_FIELD>
 
+<!--3A52C6E5429E42B0AA55F20DE0ACF022--><AD_FIELD>
+<!--3A52C6E5429E42B0AA55F20DE0ACF022-->  <AD_FIELD_ID><![CDATA[3A52C6E5429E42B0AA55F20DE0ACF022]]></AD_FIELD_ID>
+<!--3A52C6E5429E42B0AA55F20DE0ACF022-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--3A52C6E5429E42B0AA55F20DE0ACF022-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--3A52C6E5429E42B0AA55F20DE0ACF022-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--3A52C6E5429E42B0AA55F20DE0ACF022-->  <NAME><![CDATA[Language]]></NAME>
+<!--3A52C6E5429E42B0AA55F20DE0ACF022-->  <DESCRIPTION><![CDATA[A method of communication being used.]]></DESCRIPTION>
+<!--3A52C6E5429E42B0AA55F20DE0ACF022-->  <HELP><![CDATA[The Language identifies the language to use for display]]></HELP>
+<!--3A52C6E5429E42B0AA55F20DE0ACF022-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--3A52C6E5429E42B0AA55F20DE0ACF022-->  <AD_TAB_ID><![CDATA[FD25BB2F15814C7C9C5CDE550F50FBFF]]></AD_TAB_ID>
+<!--3A52C6E5429E42B0AA55F20DE0ACF022-->  <AD_COLUMN_ID><![CDATA[ACE9C929105742E6A68799AA818F54D3]]></AD_COLUMN_ID>
+<!--3A52C6E5429E42B0AA55F20DE0ACF022-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
+<!--3A52C6E5429E42B0AA55F20DE0ACF022-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--3A52C6E5429E42B0AA55F20DE0ACF022-->  <DISPLAYLENGTH><![CDATA[6]]></DISPLAYLENGTH>
+<!--3A52C6E5429E42B0AA55F20DE0ACF022-->  <ISREADONLY><![CDATA[Y]]></ISREADONLY>
+<!--3A52C6E5429E42B0AA55F20DE0ACF022-->  <SEQNO><![CDATA[10]]></SEQNO>
+<!--3A52C6E5429E42B0AA55F20DE0ACF022-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--3A52C6E5429E42B0AA55F20DE0ACF022-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--3A52C6E5429E42B0AA55F20DE0ACF022-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--3A52C6E5429E42B0AA55F20DE0ACF022-->  <SHOWINRELATION><![CDATA[Y]]></SHOWINRELATION>
+<!--3A52C6E5429E42B0AA55F20DE0ACF022-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--3A52C6E5429E42B0AA55F20DE0ACF022-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--3A52C6E5429E42B0AA55F20DE0ACF022-->  <GRID_SEQNO><![CDATA[10]]></GRID_SEQNO>
+<!--3A52C6E5429E42B0AA55F20DE0ACF022-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--3A52C6E5429E42B0AA55F20DE0ACF022-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--3A52C6E5429E42B0AA55F20DE0ACF022-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--3A52C6E5429E42B0AA55F20DE0ACF022-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
+<!--3A52C6E5429E42B0AA55F20DE0ACF022--></AD_FIELD>
+
 <!--3C47334AF3154A668BEBF2AB21EA046B--><AD_FIELD>
 <!--3C47334AF3154A668BEBF2AB21EA046B-->  <AD_FIELD_ID><![CDATA[3C47334AF3154A668BEBF2AB21EA046B]]></AD_FIELD_ID>
 <!--3C47334AF3154A668BEBF2AB21EA046B-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -1825,6 +2056,35 @@
 <!--421D1B31477E4B038E4D5A129EEBE399-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
 <!--421D1B31477E4B038E4D5A129EEBE399--></AD_FIELD>
 
+<!--436CEE43C0B5418A9E7BCDEB9C6D5AFF--><AD_FIELD>
+<!--436CEE43C0B5418A9E7BCDEB9C6D5AFF-->  <AD_FIELD_ID><![CDATA[436CEE43C0B5418A9E7BCDEB9C6D5AFF]]></AD_FIELD_ID>
+<!--436CEE43C0B5418A9E7BCDEB9C6D5AFF-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--436CEE43C0B5418A9E7BCDEB9C6D5AFF-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--436CEE43C0B5418A9E7BCDEB9C6D5AFF-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--436CEE43C0B5418A9E7BCDEB9C6D5AFF-->  <NAME><![CDATA[Description]]></NAME>
+<!--436CEE43C0B5418A9E7BCDEB9C6D5AFF-->  <DESCRIPTION><![CDATA[A space to write additional related information.]]></DESCRIPTION>
+<!--436CEE43C0B5418A9E7BCDEB9C6D5AFF-->  <HELP><![CDATA[A description is limited to 255 characters.]]></HELP>
+<!--436CEE43C0B5418A9E7BCDEB9C6D5AFF-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--436CEE43C0B5418A9E7BCDEB9C6D5AFF-->  <AD_TAB_ID><![CDATA[FD25BB2F15814C7C9C5CDE550F50FBFF]]></AD_TAB_ID>
+<!--436CEE43C0B5418A9E7BCDEB9C6D5AFF-->  <AD_COLUMN_ID><![CDATA[C6DC3AB41DCF48678AAAA5135BF9344E]]></AD_COLUMN_ID>
+<!--436CEE43C0B5418A9E7BCDEB9C6D5AFF-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
+<!--436CEE43C0B5418A9E7BCDEB9C6D5AFF-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--436CEE43C0B5418A9E7BCDEB9C6D5AFF-->  <DISPLAYLENGTH><![CDATA[255]]></DISPLAYLENGTH>
+<!--436CEE43C0B5418A9E7BCDEB9C6D5AFF-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--436CEE43C0B5418A9E7BCDEB9C6D5AFF-->  <SEQNO><![CDATA[30]]></SEQNO>
+<!--436CEE43C0B5418A9E7BCDEB9C6D5AFF-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--436CEE43C0B5418A9E7BCDEB9C6D5AFF-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--436CEE43C0B5418A9E7BCDEB9C6D5AFF-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--436CEE43C0B5418A9E7BCDEB9C6D5AFF-->  <SHOWINRELATION><![CDATA[Y]]></SHOWINRELATION>
+<!--436CEE43C0B5418A9E7BCDEB9C6D5AFF-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--436CEE43C0B5418A9E7BCDEB9C6D5AFF-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--436CEE43C0B5418A9E7BCDEB9C6D5AFF-->  <GRID_SEQNO><![CDATA[30]]></GRID_SEQNO>
+<!--436CEE43C0B5418A9E7BCDEB9C6D5AFF-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--436CEE43C0B5418A9E7BCDEB9C6D5AFF-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--436CEE43C0B5418A9E7BCDEB9C6D5AFF-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--436CEE43C0B5418A9E7BCDEB9C6D5AFF-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
+<!--436CEE43C0B5418A9E7BCDEB9C6D5AFF--></AD_FIELD>
+
 <!--44109E9F610A48AEBBB3AEF767C46FDF--><AD_FIELD>
 <!--44109E9F610A48AEBBB3AEF767C46FDF-->  <AD_FIELD_ID><![CDATA[44109E9F610A48AEBBB3AEF767C46FDF]]></AD_FIELD_ID>
 <!--44109E9F610A48AEBBB3AEF767C46FDF-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -1853,6 +2113,36 @@
 <!--44109E9F610A48AEBBB3AEF767C46FDF-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
 <!--44109E9F610A48AEBBB3AEF767C46FDF--></AD_FIELD>
 
+<!--4475A39D6534475CA244AE4C7EE1B4A4--><AD_FIELD>
+<!--4475A39D6534475CA244AE4C7EE1B4A4-->  <AD_FIELD_ID><![CDATA[4475A39D6534475CA244AE4C7EE1B4A4]]></AD_FIELD_ID>
+<!--4475A39D6534475CA244AE4C7EE1B4A4-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--4475A39D6534475CA244AE4C7EE1B4A4-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--4475A39D6534475CA244AE4C7EE1B4A4-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--4475A39D6534475CA244AE4C7EE1B4A4-->  <NAME><![CDATA[Active]]></NAME>
+<!--4475A39D6534475CA244AE4C7EE1B4A4-->  <DESCRIPTION><![CDATA[A flag indicating whether this record is available for use or de-activated.]]></DESCRIPTION>
+<!--4475A39D6534475CA244AE4C7EE1B4A4-->  <HELP><![CDATA[There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reporting. There are two reasons for de-activating and not deleting records: 
+(1) The system requires the record for auditing purposes.
+(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are existing invoices for it. By de-activating the Business Partner you prevent it from being used in future transactions.]]></HELP>
+<!--4475A39D6534475CA244AE4C7EE1B4A4-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--4475A39D6534475CA244AE4C7EE1B4A4-->  <AD_TAB_ID><![CDATA[FD25BB2F15814C7C9C5CDE550F50FBFF]]></AD_TAB_ID>
+<!--4475A39D6534475CA244AE4C7EE1B4A4-->  <AD_COLUMN_ID><![CDATA[CCAC4B03791D46E691608B625F2BBD19]]></AD_COLUMN_ID>
+<!--4475A39D6534475CA244AE4C7EE1B4A4-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
+<!--4475A39D6534475CA244AE4C7EE1B4A4-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--4475A39D6534475CA244AE4C7EE1B4A4-->  <DISPLAYLENGTH><![CDATA[1]]></DISPLAYLENGTH>
+<!--4475A39D6534475CA244AE4C7EE1B4A4-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--4475A39D6534475CA244AE4C7EE1B4A4-->  <SEQNO><![CDATA[60]]></SEQNO>
+<!--4475A39D6534475CA244AE4C7EE1B4A4-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--4475A39D6534475CA244AE4C7EE1B4A4-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--4475A39D6534475CA244AE4C7EE1B4A4-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--4475A39D6534475CA244AE4C7EE1B4A4-->  <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
+<!--4475A39D6534475CA244AE4C7EE1B4A4-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--4475A39D6534475CA244AE4C7EE1B4A4-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--4475A39D6534475CA244AE4C7EE1B4A4-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--4475A39D6534475CA244AE4C7EE1B4A4-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--4475A39D6534475CA244AE4C7EE1B4A4-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--4475A39D6534475CA244AE4C7EE1B4A4-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
+<!--4475A39D6534475CA244AE4C7EE1B4A4--></AD_FIELD>
+
 <!--45276E1273EC4232A573219489176C7F--><AD_FIELD>
 <!--45276E1273EC4232A573219489176C7F-->  <AD_FIELD_ID><![CDATA[45276E1273EC4232A573219489176C7F]]></AD_FIELD_ID>
 <!--45276E1273EC4232A573219489176C7F-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -1965,6 +2255,35 @@
 <!--4C54C83FD0D6411CBF3474C406051B26-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
 <!--4C54C83FD0D6411CBF3474C406051B26--></AD_FIELD>
 
+<!--4CF08C06CD284894801F0279BCE3D3D3--><AD_FIELD>
+<!--4CF08C06CD284894801F0279BCE3D3D3-->  <AD_FIELD_ID><![CDATA[4CF08C06CD284894801F0279BCE3D3D3]]></AD_FIELD_ID>
+<!--4CF08C06CD284894801F0279BCE3D3D3-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--4CF08C06CD284894801F0279BCE3D3D3-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--4CF08C06CD284894801F0279BCE3D3D3-->