Merging 1210493:1305499 to keep updated from trunk

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/branches/20111205EmailHandling@1305581 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/.classpath b/.classpath
index cba1f03..4a624a9 100644
--- a/.classpath
+++ b/.classpath
@@ -1,25 +1,24 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-    <classpathentry kind="con" path="GROOVY_SUPPORT" exported="true"/>
+    <classpathentry exported="true" kind="con" path="GROOVY_SUPPORT"/>
     <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
     <classpathentry kind="lib" path="applications/content/lib/fontbox-1.4.0.jar"/>
     <classpathentry kind="lib" path="applications/content/lib/jempbox-1.4.0.jar"/>
-    <classpathentry kind="lib" path="applications/content/lib/lucene-core-3.0.3.jar"/>
-    <classpathentry kind="lib" path="applications/content/lib/metadata-extractor-2.4.0-beta-1.jar"/>
+    <classpathentry kind="lib" path="applications/content/lib/lucene-core-3.5.0.jar"/>
     <classpathentry kind="lib" path="applications/content/lib/pdfbox-1.4.0.jar"/>
-    <classpathentry kind="lib" path="applications/content/lib/poi-3.7.jar"/>
-    <classpathentry kind="lib" path="applications/content/lib/poi-ooxml-3.7.jar"/>
-    <classpathentry kind="lib" path="applications/content/lib/poi-scratchpad-3.7.jar"/>
-    <classpathentry kind="lib" path="applications/content/lib/tika-core-0.9.jar"/>
-    <classpathentry kind="lib" path="applications/content/lib/tika-parsers-0.9.jar"/>
+    <classpathentry kind="lib" path="applications/content/lib/dom4j-1.6.1.jar"/>
+    <classpathentry kind="lib" path="applications/content/lib/poi-3.8-beta5-20111217.jar"/>
+    <classpathentry kind="lib" path="applications/content/lib/poi-ooxml-3.8-beta5-20111217.jar"/>
+    <classpathentry kind="lib" path="applications/content/lib/poi-ooxml-schemas-3.8-beta5-20111217.jar"/>
+    <classpathentry kind="lib" path="applications/content/lib/poi-scratchpad-3.8-beta5-20111217.jar"/>
     <classpathentry kind="lib" path="applications/product/lib/watermarker-0.0.4.jar"/>
     <classpathentry kind="lib" path="applications/product/lib/dozer-4.2.1.jar"/>
-    <classpathentry kind="lib" path="framework/base/lib/ant-1.7.1.jar"/>
-    <classpathentry kind="lib" path="framework/base/lib/ant-junit-1.7.1.jar"/>
-    <classpathentry kind="lib" path="framework/base/lib/ant-launcher-1.7.1.jar"/>
-    <classpathentry kind="lib" path="framework/base/lib/ant-trax-1.7.1.jar"/>
-    <classpathentry kind="lib" path="framework/base/lib/ant/ant-apache-bsf-1.7.1.jar"/>
-    <classpathentry kind="lib" path="framework/base/lib/ant/ant-nodeps-1.7.1.jar"/>
+    <classpathentry kind="lib" path="framework/base/lib/ant-1.8.2.jar"/>
+    <classpathentry kind="lib" path="framework/base/lib/ant-junit-1.8.2.jar"/>
+    <classpathentry kind="lib" path="framework/base/lib/ant-launcher-1.8.2.jar"/>
+    <classpathentry kind="lib" path="framework/base/lib/ant-trax-1.8.0.jar"/>
+    <classpathentry kind="lib" path="framework/base/lib/ant/ant-apache-bsf-1.8.2.jar"/>
+    <classpathentry kind="lib" path="framework/base/lib/ant/ant-nodeps-1.8.1.jar"/>
     <classpathentry kind="lib" path="framework/base/lib/antisamy-bin.1.2.jar"/>
     <classpathentry kind="lib" path="framework/base/lib/avalon-framework-4.2.0.jar"/>
     <classpathentry kind="lib" path="framework/base/lib/avalon-util-exception-1.0.0.jar"/>
@@ -39,13 +38,14 @@
     <classpathentry kind="lib" path="framework/base/lib/ivy-2.2.0.jar"/>
     <classpathentry kind="lib" path="framework/base/lib/javolution-5.4.3.jar"/>
     <classpathentry kind="lib" path="framework/base/lib/jcip-annotations-1.0.jar"/>
+    <classpathentry kind="lib" path="framework/base/lib/jcl-over-slf4j-1.6.4.jar"/>
     <classpathentry kind="lib" path="framework/base/lib/jdbm-1.0-SNAPSHOT.jar"/>
     <classpathentry kind="lib" path="framework/base/lib/jdom-1.1.jar"/>
     <classpathentry kind="lib" path="framework/base/lib/jpim-0.1.jar"/>
     <classpathentry kind="lib" path="framework/base/lib/juel-2.2.1.jar"/>
     <classpathentry kind="lib" path="framework/base/lib/junit.jar"/>
     <classpathentry kind="lib" path="framework/base/lib/junitperf.jar"/>
-    <classpathentry kind="lib" path="framework/base/lib/log4j-1.2.15.jar"/>
+    <classpathentry kind="lib" path="framework/base/lib/log4j-1.2.16.jar"/>
     <classpathentry kind="lib" path="framework/base/lib/mail.jar"/>
     <classpathentry kind="lib" path="framework/base/lib/mx4j-3.0.1.jar"/>
     <classpathentry kind="lib" path="framework/base/lib/mx4j-remote-3.0.1.jar"/>
@@ -53,6 +53,8 @@
     <classpathentry kind="lib" path="framework/base/lib/owasp-esapi-full-java-1.4.jar"/>
     <classpathentry kind="lib" path="framework/base/lib/resolver-2.9.1.jar"/>
     <classpathentry kind="lib" path="framework/base/lib/serializer-2.9.1.jar"/>
+    <classpathentry kind="lib" path="framework/base/lib/slf4j-api-1.6.4.jar"/>
+    <classpathentry kind="lib" path="framework/base/lib/slf4j-simple-1.6.4.jar"/>
     <classpathentry kind="lib" path="framework/base/lib/Tidy.jar"/>
     <classpathentry kind="lib" path="framework/base/lib/xercesImpl-2.9.1.jar"/>
     <classpathentry kind="lib" path="framework/base/lib/ws-commons-java5-1.0.1.jar"/>
@@ -73,7 +75,7 @@
     <classpathentry kind="lib" path="framework/base/lib/commons/commons-discovery-0.4.jar"/>
     <classpathentry kind="lib" path="framework/base/lib/commons/commons-el-1.0.jar"/>
     <classpathentry kind="lib" path="framework/base/lib/commons/commons-fileupload-1.2.2.jar"/>
-    <classpathentry kind="lib" path="framework/base/lib/commons/commons-io-1.3.1.jar"/>
+    <classpathentry kind="lib" path="framework/base/lib/commons/commons-io-1.4.jar"/>
     <classpathentry kind="lib" path="framework/base/lib/commons/commons-lang-2.4.jar"/>
     <classpathentry kind="lib" path="framework/base/lib/commons/commons-logging-1.1.jar"/>
     <classpathentry kind="lib" path="framework/base/lib/commons/commons-modeler-2.0.jar"/>
@@ -90,10 +92,10 @@
     <classpathentry kind="lib" path="framework/base/lib/j2eespecs/geronimo-jta_1.1_spec-1.1.1.jar"/>
     <classpathentry kind="lib" path="framework/base/lib/j2eespecs/geronimo-qname_1.1_spec-1.0.jar"/>
     <classpathentry kind="lib" path="framework/base/lib/j2eespecs/geronimo-saaj_1.1_spec-1.0.jar"/>
-    <classpathentry kind="lib" path="framework/base/lib/j2eespecs/tomcat-7.0.22.annotations-api.jar"/>
-    <classpathentry kind="lib" path="framework/base/lib/j2eespecs/tomcat-7.0.22.el-api.jar"/>
-    <classpathentry kind="lib" path="framework/base/lib/j2eespecs/tomcat-7.0.22.jsp-api.jar"/>
-    <classpathentry kind="lib" path="framework/base/lib/j2eespecs/tomcat-7.0.22.servlet-api.jar"/>
+    <classpathentry kind="lib" path="framework/base/lib/j2eespecs/tomcat-7.0.26.annotations-api.jar"/>
+    <classpathentry kind="lib" path="framework/base/lib/j2eespecs/tomcat-7.0.26.el-api.jar"/>
+    <classpathentry kind="lib" path="framework/base/lib/j2eespecs/tomcat-7.0.26.jsp-api.jar"/>
+    <classpathentry kind="lib" path="framework/base/lib/j2eespecs/tomcat-7.0.26.servlet-api.jar"/>
     <classpathentry kind="lib" path="framework/base/lib/scripting/antlr-2.7.6.jar"/>
     <classpathentry kind="lib" path="framework/base/lib/scripting/asm-3.2.jar"/>
     <classpathentry kind="lib" path="framework/base/lib/scripting/asm-analysis-3.2.jar"/>
@@ -106,48 +108,51 @@
     <classpathentry kind="lib" path="framework/base/lib/scripting/jython-nooro.jar"/>
     <classpathentry kind="lib" path="framework/base/lib/scripting/jansi-1.2.1.jar"/>
     <classpathentry kind="lib" path="framework/base/lib/scripting/jline-0.9.94.jar"/>
-    <classpathentry kind="lib" path="framework/birt/lib/chartengineapi.jar"/>
-    <classpathentry kind="lib" path="framework/birt/lib/chartitemapi.jar"/>
-    <classpathentry kind="lib" path="framework/birt/lib/coreapi.jar"/>
-    <classpathentry kind="lib" path="framework/birt/lib/crosstabcoreapi.jar"/>
-    <classpathentry kind="lib" path="framework/birt/lib/dataadapterapi.jar"/>
-    <classpathentry kind="lib" path="framework/birt/lib/dataaggregationapi.jar"/>
-    <classpathentry kind="lib" path="framework/birt/lib/dataextraction.jar"/>
-    <classpathentry kind="lib" path="framework/birt/lib/dteapi.jar"/>
-    <classpathentry kind="lib" path="framework/birt/lib/emitterconfig.jar"/>
-    <classpathentry kind="lib" path="framework/birt/lib/engineapi.jar"/>
-    <classpathentry kind="lib" path="framework/birt/lib/jaxrpc.jar"/>
-    <classpathentry kind="lib" path="framework/birt/lib/modelapi.jar"/>
-    <classpathentry kind="lib" path="framework/birt/lib/modelodaapi.jar"/>
-    <classpathentry kind="lib" path="framework/birt/lib/odadesignapi.jar"/>
-    <classpathentry kind="lib" path="framework/birt/lib/saaj.jar"/>
-    <classpathentry kind="lib" path="framework/birt/lib/scriptapi.jar"/>
+    <classpathentry kind="lib" path="framework/birt/lib/org.eclipse.birt.runtime_3.7.2.v20120214-1408.jar"/>
     <classpathentry kind="lib" path="framework/birt/lib/viewservlets.jar"/>
-    <classpathentry kind="lib" path="framework/catalina/lib/ecj-3.7.jar"/>
-    <classpathentry kind="lib" path="framework/catalina/lib/tomcat-7.0.22-tomcat-juli-adapters.jar"/>
-    <classpathentry kind="lib" path="framework/catalina/lib/tomcat-7.0.22-tomcat-juli.jar"/>
-    <classpathentry kind="lib" path="framework/catalina/lib/tomcat-7.0.22.catalina-ant.jar"/>
-    <classpathentry kind="lib" path="framework/catalina/lib/tomcat-7.0.22.catalina-ha.jar"/>
-    <classpathentry kind="lib" path="framework/catalina/lib/tomcat-7.0.22.catalina-tribes.jar"/>
-    <classpathentry kind="lib" path="framework/catalina/lib/tomcat-7.0.22.catalina.jar"/>
-    <classpathentry kind="lib" path="framework/catalina/lib/tomcat-7.0.22.jasper-el.jar"/>
-    <classpathentry kind="lib" path="framework/catalina/lib/tomcat-7.0.22.jasper.jar"/>
-    <classpathentry kind="lib" path="framework/catalina/lib/tomcat-7.0.22.tomcat-coyote.jar"/>
-    <classpathentry kind="lib" path="framework/catalina/lib/tomcat-7.0.22.tomcat-dbcp.jar"/>
-    <classpathentry kind="lib" path="framework/catalina/lib/tomcat-7.0.22.tomcat-api.jar"/>
-    <classpathentry kind="lib" path="framework/catalina/lib/tomcat-7.0.22.tomcat-util.jar"/>
+    <classpathentry kind="lib" path="framework/catalina/lib/ecj-3.7.1.jar"/>
+    <classpathentry kind="lib" path="framework/catalina/lib/tomcat-7.0.26.tomcat-juli-adapters.jar"/>
+    <classpathentry kind="lib" path="framework/catalina/lib/tomcat-7.0.26.tomcat-juli.jar"/>
+    <classpathentry kind="lib" path="framework/catalina/lib/tomcat-7.0.26.catalina-ant.jar"/>
+    <classpathentry kind="lib" path="framework/catalina/lib/tomcat-7.0.26.catalina-ha.jar"/>
+    <classpathentry kind="lib" path="framework/catalina/lib/tomcat-7.0.26.catalina-tribes.jar"/>
+    <classpathentry kind="lib" path="framework/catalina/lib/tomcat-7.0.26.catalina.jar"/>
+    <classpathentry kind="lib" path="framework/catalina/lib/tomcat-7.0.26.jasper-el.jar"/>
+    <classpathentry kind="lib" path="framework/catalina/lib/tomcat-7.0.26.jasper.jar"/>
+    <classpathentry kind="lib" path="framework/catalina/lib/tomcat-7.0.26.tomcat-coyote.jar"/>
+    <classpathentry kind="lib" path="framework/catalina/lib/tomcat-7.0.26.tomcat-dbcp.jar"/>
+    <classpathentry kind="lib" path="framework/catalina/lib/tomcat-7.0.26.tomcat-api.jar"/>
+    <classpathentry kind="lib" path="framework/catalina/lib/tomcat-7.0.26.tomcat-util.jar"/>
     <classpathentry kind="lib" path="framework/entity/lib/commons-dbcp-1.3-20091113-r835956.jar"/>
     <classpathentry kind="lib" path="framework/entity/lib/ofbiz-minerva.jar"/>
     <classpathentry kind="lib" path="framework/geronimo/lib/geronimo-connector-2.1.1.jar"/>
     <classpathentry kind="lib" path="framework/geronimo/lib/geronimo-transaction-2.1.1.jar"/>
     <classpathentry kind="lib" path="framework/guiapp/lib/XuiCoreSwing-v3.2rc2b.jar"/>
     <classpathentry kind="lib" path="framework/guiapp/lib/XuiOptional-v3.2rc2b.jar"/>
-    <classpathentry kind="lib" path="framework/jetty/lib/jasper-compiler-5.5.15.jar"/>
-    <classpathentry kind="lib" path="framework/jetty/lib/jasper-runtime-5.5.15.jar"/>
-    <classpathentry kind="lib" path="framework/jetty/lib/jetty-6.1.11.jar"/>
-    <classpathentry kind="lib" path="framework/jetty/lib/jetty-ajp-6.1.11.jar"/>
-    <classpathentry kind="lib" path="framework/jetty/lib/jetty-sslengine-6.1.11.jar"/>
-    <classpathentry kind="lib" path="framework/jetty/lib/jetty-util-6.1.11.jar"/>
+    <classpathentry kind="lib" path="framework/jcr/lib/concurrent-1.3.4.jar"/>
+    <classpathentry kind="lib" path="framework/jcr/lib/jackrabbit-api-2.3.3.jar"/>
+    <classpathentry kind="lib" path="framework/jcr/lib/jackrabbit-core-2.3.3.jar"/>
+    <classpathentry kind="lib" path="framework/jcr/lib/jackrabbit-jca-2.3.3.jar"/>
+    <classpathentry kind="lib" path="framework/jcr/lib/jackrabbit-jcr-commons-2.3.3.jar"/>
+    <classpathentry kind="lib" path="framework/jcr/lib/jackrabbit-spi-2.3.3.jar"/>
+    <classpathentry kind="lib" path="framework/jcr/lib/jackrabbit-spi-commons-2.3.3.jar"/>
+    <classpathentry kind="lib" path="framework/jcr/lib/jackrabbit-ocm-2.0.jar" sourcepath="/ocm"/>
+    <classpathentry kind="lib" path="framework/jcr/lib/jcr-2.0.jar"/>
+    <classpathentry kind="lib" path="framework/jetty/lib/com.sun.el-2.2.0.v201108011116.jar"/>
+    <classpathentry kind="lib" path="framework/jetty/lib/javax.servlet.jsp.jstl-1.2.0.v201105211821.jar"/>
+    <classpathentry kind="lib" path="framework/jetty/lib/jetty-ajp-8.1.2.v20120308.jar"/>
+    <classpathentry kind="lib" path="framework/jetty/lib/jetty-continuation-8.1.2.v20120308.jar"/>
+    <classpathentry kind="lib" path="framework/jetty/lib/jetty-http-8.1.2.v20120308.jar"/>
+    <classpathentry kind="lib" path="framework/jetty/lib/jetty-io-8.1.2.v20120308.jar"/>
+    <classpathentry kind="lib" path="framework/jetty/lib/jetty-security-8.1.2.v20120308.jar"/>
+    <classpathentry kind="lib" path="framework/jetty/lib/jetty-server-8.1.2.v20120308.jar"/>
+    <classpathentry kind="lib" path="framework/jetty/lib/jetty-servlet-8.1.2.v20120308.jar"/>
+    <classpathentry kind="lib" path="framework/jetty/lib/jetty-util-8.1.2.v20120308.jar"/>
+    <classpathentry kind="lib" path="framework/jetty/lib/jetty-webapp-8.1.2.v20120308.jar"/>
+    <classpathentry kind="lib" path="framework/jetty/lib/jetty-xml-8.1.2.v20120308.jar"/>
+    <classpathentry kind="lib" path="framework/jetty/lib/org.apache.jasper.glassfish-2.2.2.v201112011158.jar"/>
+    <classpathentry kind="lib" path="framework/jetty/lib/org.apache.taglibs.standard.glassfish-1.2.0.v201112081803.jar"/>
+    <classpathentry kind="lib" path="framework/jetty/lib/org.eclipse.jdt.core-3.7.1.jar"/>
     <classpathentry kind="lib" path="framework/service/lib/axis.jar"/>
     <classpathentry kind="lib" path="framework/service/lib/axis-ant.jar"/>
     <classpathentry kind="lib" path="framework/service/lib/wsdl4j.jar"/>
@@ -169,44 +174,6 @@
     <classpathentry kind="lib" path="framework/webapp/lib/json-lib-2.2.3-jdk15.jar"/>
     <classpathentry kind="lib" path="framework/webapp/lib/rome-0.9.jar"/>
     <classpathentry kind="lib" path="framework/webapp/lib/velocity-1.6.1.jar"/>
-    <classpathentry kind="lib" path="framework/base/lib/webslinger-base-invoker-20091211-3897-7ab22baea4b6.jar"/>
-    <classpathentry kind="lib" path="framework/webslinger/lib/webslinger-20091211-3897-7ab22baea4b6.jar"/>
-    <classpathentry kind="lib" path="framework/webslinger/lib/webslinger-base-cache-20091211-3897-7ab22baea4b6.jar"/>
-    <classpathentry kind="lib" path="framework/webslinger/lib/webslinger-base-collections-20091211-3897-7ab22baea4b6.jar"/>
-    <classpathentry kind="lib" path="framework/webslinger/lib/webslinger-base-collections-arrays-20091211-3897-7ab22baea4b6.jar"/>
-    <classpathentry kind="lib" path="framework/webslinger/lib/webslinger-base-concurrent-20091211-3897-7ab22baea4b6.jar"/>
-    <classpathentry kind="lib" path="framework/webslinger/lib/webslinger-base-html-20091211-3897-7ab22baea4b6.jar"/>
-    <classpathentry kind="lib" path="framework/webslinger/lib/webslinger-base-io-20091211-3897-7ab22baea4b6.jar"/>
-    <classpathentry kind="lib" path="framework/webslinger/lib/webslinger-base-javacc-20091211-3897-7ab22baea4b6.jar"/>
-    <classpathentry kind="lib" path="framework/webslinger/lib/webslinger-base-junit-20091211-3897-7ab22baea4b6.jar"/>
-    <classpathentry kind="lib" path="framework/webslinger/lib/webslinger-base-lang-20091211-3897-7ab22baea4b6.jar"/>
-    <classpathentry kind="lib" path="framework/webslinger/lib/webslinger-base-logging-20091211-3897-7ab22baea4b6.jar"/>
-    <classpathentry kind="lib" path="framework/webslinger/lib/webslinger-base-resolver-20091211-3897-7ab22baea4b6.jar"/>
-    <classpathentry kind="lib" path="framework/webslinger/lib/webslinger-base-util-20091211-3897-7ab22baea4b6.jar"/>
-    <classpathentry kind="lib" path="framework/webslinger/lib/webslinger-base-xml-20091211-3897-7ab22baea4b6.jar"/>
-    <classpathentry kind="lib" path="framework/webslinger/lib/webslinger-catalina-20091211-3897-7ab22baea4b6.jar"/>
-    <classpathentry kind="lib" path="framework/webslinger/lib/webslinger-cgi-20091211-3897-7ab22baea4b6.jar"/>
-    <classpathentry kind="lib" path="framework/webslinger/lib/webslinger-embryo-20091211-3897-7ab22baea4b6.jar"/>
-    <classpathentry kind="lib" path="framework/webslinger/lib/webslinger-extension-beanshell-20091211-3897-7ab22baea4b6.jar"/>
-    <classpathentry kind="lib" path="framework/webslinger/lib/webslinger-extension-bsf-20091211-3897-7ab22baea4b6.jar"/>
-    <classpathentry kind="lib" path="framework/webslinger/lib/webslinger-extension-code-20091211-3897-7ab22baea4b6.jar"/>
-    <classpathentry kind="lib" path="framework/webslinger/lib/webslinger-extension-commonsvfs-object-20091211-3897-7ab22baea4b6.jar"/>
-    <classpathentry kind="lib" path="framework/webslinger/lib/webslinger-extension-directory-20091211-3897-7ab22baea4b6.jar"/>
-    <classpathentry kind="lib" path="framework/webslinger/lib/webslinger-extension-freemarker-20091211-3897-7ab22baea4b6.jar"/>
-    <classpathentry kind="lib" path="framework/webslinger/lib/webslinger-extension-groovy-20091211-3897-7ab22baea4b6.jar"/>
-    <classpathentry kind="lib" path="framework/webslinger/lib/webslinger-extension-image-20091211-3897-7ab22baea4b6.jar"/>
-    <classpathentry kind="lib" path="framework/webslinger/lib/webslinger-extension-janino-20091211-3897-7ab22baea4b6.jar"/>
-    <classpathentry kind="lib" path="framework/webslinger/lib/webslinger-extension-jruby-20091211-3897-7ab22baea4b6.jar"/>
-    <classpathentry kind="lib" path="framework/webslinger/lib/webslinger-extension-jython-20091211-3897-7ab22baea4b6.jar"/>
-    <classpathentry kind="lib" path="framework/webslinger/lib/webslinger-extension-nutch-20091211-3897-7ab22baea4b6.jar"/>
-    <classpathentry kind="lib" path="framework/webslinger/lib/webslinger-extension-plan9-20091211-3897-7ab22baea4b6.jar"/>
-    <classpathentry kind="lib" path="framework/webslinger/lib/webslinger-extension-quercus-20091211-3897-7ab22baea4b6.jar"/>
-    <classpathentry kind="lib" path="framework/webslinger/lib/webslinger-extension-rhino-20091211-3897-7ab22baea4b6.jar"/>
-    <classpathentry kind="lib" path="framework/webslinger/lib/webslinger-extension-servlet-20091211-3897-7ab22baea4b6.jar"/>
-    <classpathentry kind="lib" path="framework/webslinger/lib/webslinger-extension-template-20091211-3897-7ab22baea4b6.jar"/>
-    <classpathentry kind="lib" path="framework/webslinger/lib/webslinger-extension-velocity-20091211-3897-7ab22baea4b6.jar"/>
-    <classpathentry kind="lib" path="framework/webslinger/lib/webslinger-extension-wiki-20091211-3897-7ab22baea4b6.jar"/>
-    <classpathentry kind="lib" path="framework/webslinger/lib/webslinger-launcher-20091211-3897-7ab22baea4b6.jar"/>
     <classpathentry kind="lib" path="specialpurpose/googlecheckout/lib/checkout-sdk-0.8.8.jar"/>
     <classpathentry kind="lib" path="specialpurpose/ldap/lib/cas-server-core-3.3.jar"/>
     <classpathentry kind="lib" path="specialpurpose/pos/lib/jcl.jar"/>
@@ -216,29 +183,30 @@
     <classpathentry kind="lib" path="specialpurpose/ebaystore/lib/ebaycalls.jar"/>
     <classpathentry kind="lib" path="specialpurpose/ebaystore/lib/ebaysdkcore.jar"/>
     <classpathentry kind="lib" path="specialpurpose/ebaystore/lib/helper.jar"/>
-    <classpathentry kind="src" path="applications/accounting/src" excluding="org/ofbiz/accounting/thirdparty/cybersource/**|org/ofbiz/accounting/thirdparty/verisign/**|org/ofbiz/accounting/thirdparty/worldpay/**|org/ofbiz/accounting/thirdparty/paypal/PayPalServices.java|org/ofbiz/accounting/thirdparty/orbital/**|org/ofbiz/accounting/thirdparty/securepay/**|org/ofbiz/accounting/thirdparty/ideal/**"/>
-    <classpathentry kind="src" path="applications/content/src" excluding="org/ofbiz/content/openoffice/|org/ofbiz/content/report/"/>
+    <classpathentry excluding="org/ofbiz/accounting/thirdparty/cybersource/**|org/ofbiz/accounting/thirdparty/verisign/**|org/ofbiz/accounting/thirdparty/worldpay/**|org/ofbiz/accounting/thirdparty/paypal/PayPalServices.java|org/ofbiz/accounting/thirdparty/orbital/**|org/ofbiz/accounting/thirdparty/securepay/**|org/ofbiz/accounting/thirdparty/ideal/**" kind="src" path="applications/accounting/src"/>
+    <classpathentry excluding="org/ofbiz/content/openoffice/|org/ofbiz/content/report/" kind="src" path="applications/content/src"/>
     <classpathentry kind="src" path="applications/manufacturing/src"/>
     <classpathentry kind="src" path="applications/marketing/src"/>
-    <classpathentry kind="src" path="applications/order/src" excluding="org/ofbiz/order/thirdparty/taxware/**"/>
+    <classpathentry excluding="org/ofbiz/order/thirdparty/taxware/**" kind="src" path="applications/order/src"/>
     <classpathentry kind="src" path="applications/party/src"/>
-    <classpathentry kind="src" path="applications/product/src" excluding="ShipmentScaleApplet.java"/>
-    <classpathentry kind="src" path="applications/securityext/src" excluding="org/ofbiz/securityext/thirdparty/truition/TruitionCoReg.java"/>
+    <classpathentry excluding="ShipmentScaleApplet.java" kind="src" path="applications/product/src"/>
+    <classpathentry excluding="org/ofbiz/securityext/thirdparty/truition/TruitionCoReg.java" kind="src" path="applications/securityext/src"/>
     <classpathentry kind="src" path="applications/humanres/src"/>
     <classpathentry kind="src" path="applications/workeffort/src"/>
     <classpathentry kind="src" path="framework/appserver/src"/>
     <classpathentry kind="src" path="framework/base/build/gen-src/javacc"/>
-    <classpathentry kind="src" path="framework/base/src" excluding="org/ofbiz/base/config/CoberturaInstrumenter.java"/>
+    <classpathentry excluding="org/ofbiz/base/config/CoberturaInstrumenter.java" kind="src" path="framework/base/src"/>
     <classpathentry kind="src" path="framework/bi/src"/>
     <classpathentry kind="src" path="framework/birt/src"/>
     <classpathentry kind="src" path="framework/catalina/src"/>
     <classpathentry kind="src" path="framework/common/src"/>
     <classpathentry kind="src" path="framework/datafile/src"/>
-    <classpathentry kind="src" path="framework/entity/src" excluding="org/ofbiz/entity/connection/XaPoolConnectionFactory.java"/>
+    <classpathentry excluding="org/ofbiz/entity/connection/XaPoolConnectionFactory.java" kind="src" path="framework/entity/src"/>
     <classpathentry kind="src" path="framework/entityext/src"/>
     <classpathentry kind="src" path="framework/example/src"/>
     <classpathentry kind="src" path="framework/geronimo/src"/>
     <classpathentry kind="src" path="framework/guiapp/src"/>
+    <classpathentry kind="src" path="framework/jcr/src"/>
     <classpathentry kind="src" path="framework/jetty/src"/>
     <classpathentry kind="src" path="framework/minilang/src"/>
     <classpathentry kind="src" path="framework/security/src"/>
@@ -246,9 +214,8 @@
     <classpathentry kind="src" path="framework/sql/src"/>
     <classpathentry kind="src" path="framework/sql/build/gen-src/javacc"/>
     <classpathentry kind="src" path="framework/start/src"/>
-    <classpathentry kind="src" path="framework/testtools/src" excluding="org/ofbiz/testtools/seleniumxml/**"/>
-    <classpathentry kind="src" path="framework/webapp/src" excluding="org/ofbiz/webapp/ftl/FreeMarkerViewRenderer.java|org/ofbiz/webapp/ftl/JpCacheIncludeTransform.java|org/ofbiz/webapp/view/FopPdfViewHandler.java|org/ofbiz/webapp/view/GenericViewRenderer.java|org/ofbiz/webapp/view/JPublishViewHandler.java|org/ofbiz/webapp/view/JPublishWrapper.java|org/ofbiz/webapp/view/JasperReportsPdfViewHandler.java|org/ofbiz/webapp/view/JasperReportsXmlViewHandler.java|org/ofbiz/webapp/view/JasperReportsJXlsViewHandler.java|org/ofbiz/webapp/view/JasperReportsPoiXlsViewHandler.java"/>
-    <classpathentry kind="src" path="framework/webslinger/src"/>
+    <classpathentry excluding="org/ofbiz/testtools/seleniumxml/**" kind="src" path="framework/testtools/src"/>
+    <classpathentry excluding="org/ofbiz/webapp/ftl/FreeMarkerViewRenderer.java|org/ofbiz/webapp/ftl/JpCacheIncludeTransform.java|org/ofbiz/webapp/view/FopPdfViewHandler.java|org/ofbiz/webapp/view/GenericViewRenderer.java|org/ofbiz/webapp/view/JPublishViewHandler.java|org/ofbiz/webapp/view/JPublishWrapper.java|org/ofbiz/webapp/view/JasperReportsPdfViewHandler.java|org/ofbiz/webapp/view/JasperReportsXmlViewHandler.java|org/ofbiz/webapp/view/JasperReportsJXlsViewHandler.java|org/ofbiz/webapp/view/JasperReportsPoiXlsViewHandler.java" kind="src" path="framework/webapp/src"/>
     <classpathentry kind="src" path="framework/webtools/src"/>
     <classpathentry kind="src" path="framework/widget/src"/>
     <classpathentry kind="src" path="specialpurpose/assetmaint/src"/>
@@ -262,8 +229,11 @@
     <classpathentry kind="src" path="specialpurpose/oagis/src"/>
     <classpathentry kind="src" path="specialpurpose/pos/src"/>
     <classpathentry kind="src" path="specialpurpose/projectmgr/src"/>
-    <classpathentry kind="src" path="specialpurpose/shark/src" excluding="org/enhydra/|org/ofbiz/"/>
+    <classpathentry excluding="org/enhydra/|org/ofbiz/" kind="src" path="specialpurpose/shark/src"/>
     <classpathentry kind="src" path="specialpurpose/webpos/src"/>
     <classpathentry kind="src" path="specialpurpose/workflow/src"/>
+    <classpathentry exported="true" kind="con" path="GROOVY_DSL_SUPPORT"/>
+    <classpathentry kind="lib" path="framework/jcr/lib/tika-core-1.0.jar"/>
+    <classpathentry kind="lib" path="framework/jcr/lib/tika-parsers-1.0.jar"/>
     <classpathentry kind="output" path="bin"/>
 </classpath>
diff --git a/.gitignore b/.gitignore
index 3d40ad1..2c57d5a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,57 +1,11 @@
-tools/build
-applications/accounting/build/
-applications/content/build/
-applications/content/index/
-applications/humanres/build/
-applications/manufacturing/build/
-applications/marketing/build/
-applications/order/build/
-applications/party/build/
-applications/product/build/
-applications/securityext/build/
-applications/workeffort/build/
-bin/
-framework/appserver/build/
-framework/base/build/
+applications/*/build
+framework/*/build
 framework/base/lib/cobertura-*.jar
-framework/bi/build/
-framework/birt/build/
-framework/catalina/build/
-framework/common/build/
-framework/datafile/build/
-framework/entity/build/
 framework/entity/lib/jdbc/postgresql-*.jar
-framework/entityext/build/
-framework/example/build/
-framework/geronimo/build/
-framework/guiapp/build/
-framework/jetty/build/
-framework/minilang/build/
-framework/security/build/
-framework/service/build/
-framework/sql/build/
-framework/start/build/
-framework/testtools/build/
-framework/webapp/build/
-framework/webslinger/build/
-framework/webslinger/websites/webslinger/Var/
-framework/webtools/build/
-framework/widget/build/
-specialpurpose/assetmaint/build/
-specialpurpose/crowd/build/
-specialpurpose/ebay/build/
-specialpurpose/ebaystore/build/
-specialpurpose/ecommerce/build/
-specialpurpose/googlebase/build/
-specialpurpose/googlecheckout/build/
-specialpurpose/hhfacility/build/
-specialpurpose/ldap/build/
-specialpurpose/oagis/build/
-specialpurpose/pos/build/
-specialpurpose/projectmgr/build/
-specialpurpose/webpos/build/
-specialpurpose/scrum/build/
-specialpurpose/shark/build/
+hot-deploy/*/build
+specialpurpose/*/build
+applications/content/index/
+bin/
 ofbiz.jar
 changelog
 runtime/svninfo.ftl
@@ -64,6 +18,7 @@
 runtime/logs/*.html*
 runtime/logs/test-results/*
 runtime/data/derby/*
+runtime/data/jcr/*
 runtime/data/utilcache.*
 runtime/catalina/work/*
 runtime/tempfiles/*
@@ -88,3 +43,7 @@
 debian/orig-work
 .pc
 .DS_Store
+.idea
+*.iml
+*~
+*#
diff --git a/LICENSE b/LICENSE
index aa090e2..786a635 100644
--- a/LICENSE
+++ b/LICENSE
@@ -11,12 +11,12 @@
 http://cwiki.apache.org/confluence/display/OFBADMIN/Libraries+Included+in+OFBiz
 =========================================================================
 The following libraries are licensed under the Apache License Version 2.0:
-ofbiz/trunk/framework/base/lib/ant-launcher-1.7.1.jar
-ofbiz/trunk/framework/base/lib/ant-1.7.1.jar
-ofbiz/trunk/framework/base/lib/ant-junit-1.7.1.jar
-ofbiz/trunk/framework/base/lib/ant-trax-1.7.1.jar
-ofbiz/trunk/framework/base/lib/ant/ant-apache-bsf-1.7.1.jar
-ofbiz/trunk/framework/base/lib/ant/ant-nodeps-1.7.1.jar
+ofbiz/trunk/framework/base/lib/ant-launcher-1.8.2.jar
+ofbiz/trunk/framework/base/lib/ant-1.8.2.jar
+ofbiz/trunk/framework/base/lib/ant-junit-1.8.2.jar
+ofbiz/trunk/framework/base/lib/ant-trax-1.8.0.jar
+ofbiz/trunk/framework/base/lib/ant/ant-apache-bsf-1.8.2.jar
+ofbiz/trunk/framework/base/lib/ant/ant-nodeps-1.8.1.jar
 ofbiz/trunk/framework/base/lib/avalon-framework-4.2.0.jar
 ofbiz/trunk/framework/base/lib/avalon-util-exception-1.0.0.jar
 ofbiz/trunk/framework/base/lib/batik-all-1.7.jar
@@ -30,7 +30,6 @@
 ofbiz/trunk/framework/base/lib/jakarta-regexp-1.5.jar
 ofbiz/trunk/framework/base/lib/jpim-0.1.jar
 ofbiz/trunk/framework/base/lib/juel-2.2.1.jar
-ofbiz/trunk/framework/base/lib/log4j-1.2.15.jar
 ofbiz/trunk/framework/base/lib/mx4j-3.0.1.jar
 ofbiz/trunk/framework/base/lib/mx4j-remote-3.0.1.jar
 ofbiz/trunk/framework/base/lib/nekohtml.jar
@@ -65,10 +64,10 @@
 ofbiz/trunk/framework/base/lib/j2eespecs/geronimo-jta_1.1_spec-1.1.1.jar
 ofbiz/trunk/framework/base/lib/j2eespecs/geronimo-qname_1.1_spec-1.0.jar
 ofbiz/trunk/framework/base/lib/j2eespecs/geronimo-saaj_1.1_spec-1.0.jar
-ofbiz/trunk/framework/base/lib/j2eespecs/tomcat-6.0.32-annotations-api.jar
-ofbiz/trunk/framework/base/lib/j2eespecs/tomcat-6.0.32-el-api.jar
-ofbiz/trunk/framework/base/lib/j2eespecs/tomcat-6.0.32-jsp-api.jar
-ofbiz/trunk/framework/base/lib/j2eespecs/tomcat-6.0.32-servlet-api.jar
+ofbiz/trunk/framework/base/lib/j2eespecs/tomcat-7.0.26.annotations-api.jar
+ofbiz/trunk/framework/base/lib/j2eespecs/tomcat-7.0.26.el-api.jar
+ofbiz/trunk/framework/base/lib/j2eespecs/tomcat-7.0.26.jsp-api.jar
+ofbiz/trunk/framework/base/lib/j2eespecs/tomcat-7.0.26.servlet-api.jar
 ofbiz/trunk/framework/base/lib/scripting/bsf-2.4.0.jar
 ofbiz/trunk/framework/base/lib/scripting/jakarta-oro-2.0.8.jar
 ofbiz/trunk/framework/base/lib/scripting/groovy-all-1.7.7.jar
@@ -76,27 +75,24 @@
 ofbiz/trunk/framework/base/lib/xmlrpc-client-3.1.2.jar
 ofbiz/trunk/framework/base/lib/xmlrpc-common-3.1.2.jar
 ofbiz/trunk/framework/base/lib/xmlrpc-server-3.1.2.jar
-ofbiz/trunk/framework/catalina/lib/tomcat-6.0.32-catalina-ha.jar
-ofbiz/trunk/framework/catalina/lib/tomcat-6.0.32-catalina-tribes.jar
-ofbiz/trunk/framework/catalina/lib/tomcat-6.0.32-catalina.jar
-ofbiz/trunk/framework/catalina/lib/tomcat-6.0.32-jasper-el.jar
-ofbiz/trunk/framework/catalina/lib/tomcat-6.0.32-jasper.jar
-ofbiz/trunk/framework/catalina/lib/tomcat-6.0.32-tomcat-coyote.jar
-ofbiz/trunk/framework/catalina/lib/tomcat-6.0.32-tomcat-dbcp.jar
-ofbiz/trunk/framework/catalina/lib/tomcat-6.0.32-tomcat-juli.jar
-ofbiz/trunk/framework/catalina/lib/tomcat-6.0.32-tomcat-juli-adapters.jar
+ofbiz/framework/catalina/lib/tomcat-7.0.26.tomcat-util.jar
+ofbiz/framework/catalina/lib/tomcat-7.0.26.tomcat-i18n-es.jar
+ofbiz/framework/catalina/lib/tomcat-7.0.26.catalina-ant.jar
+ofbiz/framework/catalina/lib/tomcat-7.0.26.catalina.jar
+ofbiz/framework/catalina/lib/tomcat-7.0.26.jasper-el.jar
+ofbiz/framework/catalina/lib/tomcat-7.0.26.tomcat-juli.jar
+ofbiz/framework/catalina/lib/tomcat-7.0.26.tomcat-i18n-ja.jar
+ofbiz/framework/catalina/lib/tomcat-7.0.26.catalina-tribes.jar
+ofbiz/framework/catalina/lib/tomcat-7.0.26.tomcat-dbcp.jar
+ofbiz/framework/catalina/lib/tomcat-7.0.26.tomcat-juli-adapters.jar
+ofbiz/framework/catalina/lib/tomcat-7.0.26.tomcat-i18n-fr.jar
+ofbiz/framework/catalina/lib/tomcat-7.0.26.tomcat-coyote.jar
+ofbiz/framework/catalina/lib/tomcat-7.0.26.catalina-ha.jar
+ofbiz/framework/catalina/lib/tomcat-7.0.26.tomcat-api.jar
+ofbiz/framework/catalina/lib/tomcat-7.0.26.jasper.jar
 ofbiz/trunk/framework/entity/lib/commons-dbcp-1.3-20091113-r835956.jar
 ofbiz/trunk/framework/entity/lib/jdbc/derby-10.8.2.2.jar
 ofbiz/trunk/framework/entity/lib/jdbc/derbytools-10.8.2.2.jar
-ofbiz/trunk/framework/jetty/lib/ant-1.6.5.jar
-ofbiz/trunk/framework/jetty/lib/jasper-compiler-5.5.15.jar
-ofbiz/trunk/framework/jetty/lib/jasper-compiler-jdt-5.5.15.jar
-ofbiz/trunk/framework/jetty/lib/jasper-runtime-5.5.15.jar
-ofbiz/trunk/framework/jetty/lib/jetty-6.1.11.jar
-ofbiz/trunk/framework/jetty/lib/jetty-ajp-6.1.11.jar
-ofbiz/trunk/framework/jetty/lib/jetty-sslengine-6.1.11.jar
-ofbiz/trunk/framework/jetty/lib/jetty-util-6.1.11.jar
-ofbiz/trunk/framework/jetty/lib/xmlParserAPIs-2.6.2.jar
 ofbiz/trunk/framework/service/lib/axis-ant.jar
 ofbiz/trunk/framework/service/lib/axis.jar
 ofbiz/trunk/framework/service/lib/axiom-api-1.2.9.jar
@@ -118,55 +114,19 @@
 ofbiz/trunk/framework/webapp/lib/xalan-2.7.1.jar
 ofbiz/trunk/framework/geronimo/lib/geronimo-connector-2.1.1.jar
 ofbiz/trunk/framework/geronimo/lib/geronimo-transaction-2.1.1.jar
-ofbiz/trunk/framework/base/lib/webslinger-base-invoker-20091211-3897-7ab22baea4b6.jar
-ofbiz/trunk/framework/webslinger/lib/webslinger-20091211-3897-7ab22baea4b6.jar
-ofbiz/trunk/framework/webslinger/lib/webslinger-base-cache-20091211-3897-7ab22baea4b6.jar
-ofbiz/trunk/framework/webslinger/lib/webslinger-base-collections-20091211-3897-7ab22baea4b6.jar
-ofbiz/trunk/framework/webslinger/lib/webslinger-base-collections-arrays-20091211-3897-7ab22baea4b6.jar
-ofbiz/trunk/framework/webslinger/lib/webslinger-base-concurrent-20091211-3897-7ab22baea4b6.jar
-ofbiz/trunk/framework/webslinger/lib/webslinger-base-html-20091211-3897-7ab22baea4b6.jar
-ofbiz/trunk/framework/webslinger/lib/webslinger-base-invoker-20091211-3897-7ab22baea4b6.jar
-ofbiz/trunk/framework/webslinger/lib/webslinger-base-io-20091211-3897-7ab22baea4b6.jar
-ofbiz/trunk/framework/webslinger/lib/webslinger-base-javacc-20091211-3897-7ab22baea4b6.jar
-ofbiz/trunk/framework/webslinger/lib/webslinger-base-junit-20091211-3897-7ab22baea4b6.jar
-ofbiz/trunk/framework/webslinger/lib/webslinger-base-lang-20091211-3897-7ab22baea4b6.jar
-ofbiz/trunk/framework/webslinger/lib/webslinger-base-logging-20091211-3897-7ab22baea4b6.jar
-ofbiz/trunk/framework/webslinger/lib/webslinger-base-resolver-20091211-3897-7ab22baea4b6.jar
-ofbiz/trunk/framework/webslinger/lib/webslinger-base-util-20091211-3897-7ab22baea4b6.jar
-ofbiz/trunk/framework/webslinger/lib/webslinger-base-xml-20091211-3897-7ab22baea4b6.jar
-ofbiz/trunk/framework/webslinger/lib/webslinger-catalina-20091211-3897-7ab22baea4b6.jar
-ofbiz/trunk/framework/webslinger/lib/webslinger-cgi-20091211-3897-7ab22baea4b6.jar
-ofbiz/trunk/framework/webslinger/lib/webslinger-embryo-20091211-3897-7ab22baea4b6.jar
-ofbiz/trunk/framework/webslinger/lib/webslinger-extension-beanshell-20091211-3897-7ab22baea4b6.jar
-ofbiz/trunk/framework/webslinger/lib/webslinger-extension-bsf-20091211-3897-7ab22baea4b6.jar
-ofbiz/trunk/framework/webslinger/lib/webslinger-extension-code-20091211-3897-7ab22baea4b6.jar
-ofbiz/trunk/framework/webslinger/lib/webslinger-extension-commonsvfs-object-20091211-3897-7ab22baea4b6.jar
-ofbiz/trunk/framework/webslinger/lib/webslinger-extension-directory-20091211-3897-7ab22baea4b6.jar
-ofbiz/trunk/framework/webslinger/lib/webslinger-extension-freemarker-20091211-3897-7ab22baea4b6.jar
-ofbiz/trunk/framework/webslinger/lib/webslinger-extension-groovy-20091211-3897-7ab22baea4b6.jar
-ofbiz/trunk/framework/webslinger/lib/webslinger-extension-image-20091211-3897-7ab22baea4b6.jar
-ofbiz/trunk/framework/webslinger/lib/webslinger-extension-janino-20091211-3897-7ab22baea4b6.jar
-ofbiz/trunk/framework/webslinger/lib/webslinger-extension-jruby-20091211-3897-7ab22baea4b6.jar
-ofbiz/trunk/framework/webslinger/lib/webslinger-extension-jython-20091211-3897-7ab22baea4b6.jar
-ofbiz/trunk/framework/webslinger/lib/webslinger-extension-nutch-20091211-3897-7ab22baea4b6.jar
-ofbiz/trunk/framework/webslinger/lib/webslinger-extension-plan9-20091211-3897-7ab22baea4b6.jar
-ofbiz/trunk/framework/webslinger/lib/webslinger-extension-quercus-20091211-3897-7ab22baea4b6.jar
-ofbiz/trunk/framework/webslinger/lib/webslinger-extension-rhino-20091211-3897-7ab22baea4b6.jar
-ofbiz/trunk/framework/webslinger/lib/webslinger-extension-servlet-20091211-3897-7ab22baea4b6.jar
-ofbiz/trunk/framework/webslinger/lib/webslinger-extension-template-20091211-3897-7ab22baea4b6.jar
-ofbiz/trunk/framework/webslinger/lib/webslinger-extension-velocity-20091211-3897-7ab22baea4b6.jar
-ofbiz/trunk/framework/webslinger/lib/webslinger-extension-wiki-20091211-3897-7ab22baea4b6.jar
-ofbiz/trunk/framework/webslinger/lib/webslinger-launcher-20091211-3897-7ab22baea4b6.jar
 ofbiz/trunk/applications/content/lib/fontbox-1.4.0.jar
 ofbiz/trunk/applications/content/lib/jempbox-1.4.0.jar
-ofbiz/trunk/applications/content/lib/lucene-core-3.0.3.jar
-ofbiz/trunk/applications/content/lib/metadata-extractor-2.4.0.jar
+ofbiz/trunk/applications/content/lib/lucene-core-3.5.0.jar
 ofbiz/trunk/applications/content/lib/pdfbox-1.4.0.jar
+ofbiz/trunk/applications/content/lib/poi-3.8-beta5-20111217.jar
+ofbiz/trunk/applications/content/lib/poi-ooxml-3.8-beta5-20111217.jar
+ofbiz/trunk/applications/content/lib/poi-ooxml-schemas-3.8-beta5-20111217.jar
+ofbiz/trunk/applications/content/lib/poi-scratchpad-3.8-beta5-20111217.jar
 ofbiz/trunk/applications/content/lib/poi-3.7.jar
 ofbiz/trunk/applications/content/lib/poi-ooxml-3.7.jar
 ofbiz/trunk/applications/content/lib/poi-scratchpad-3.7.jar
-ofbiz/trunk/applications/content/lib/tika-core-0.9.jar
-ofbiz/trunk/applications/content/lib/tika-parsers-0.9.jar
+ofbiz/trunk/applications/content/lib/tika-core-1.0.jar
+ofbiz/trunk/applications/content/lib/tika-parsers-1.0.jar
 ofbiz/trunk/applications/product/lib/dozer-4.2.1.jar
 ofbiz/trunk/applications/product/lib/watermarker-0.0.4.jar
 ofbiz/trunk/specialpurpose/googlecheckout/lib/checkout-sdk-0.8.8.jar
@@ -495,7 +455,9 @@
 =========================================================================
 The following libraries distributed with Apache OFBiz are licensed under the
 BSD License:
+ofbiz/trunk/applications/content/lib/dom4j-1.6.1.jar
 ofbiz/trunk/framework/base/lib/antisamy-bin.1.2.jar
+ofbiz/trunk/framework/base/lib/bsh-engine-modified.jar
 ofbiz/trunk/framework/base/lib/freemarker-2.3.10.jar
 ofbiz/trunk/framework/base/lib/hamcrest-all-1.2.jar
 ofbiz/trunk/framework/base/lib/httpunit.jar
@@ -1271,10 +1233,10 @@
 The following libraries distributed with Apache OFBiz are licensed under the
 MIT/X License:
 ofbiz/trunk/framework/base/lib/icu4j-4_4.jar
+ofbiz/trunk/framework/base/lib/jcl-over-slf4j-1.6.4.jar
 ofbiz/trunk/framework/entity/lib/ofbiz-minerva.jar
-ofbiz/trunk/framework/jetty/lib/jcl104-over-slf4j-1.3.1.jar
-ofbiz/trunk/framework/jetty/lib/slf4j-api-1.3.1.jar
-ofbiz/trunk/framework/jetty/lib/slf4j-log4j12-1.3.1.jar
+ofbiz/trunk/framework/base/lib/slf4j-api-1.6.4.jar
+ofbiz/trunk/framework/base/lib/slf4j-simple-1.6.4.jar
 ofbiz/trunk/framework/images/webapp/images/jquery/*
 =========================================================================
 The MIT License
@@ -2009,6 +1971,10 @@
 COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL):
 ofbiz/trunk/framework/base/lib/juel-2.1.1.jar (contains the javax.el package)
 ofbiz/trunk/framework/base/lib/mail.jar
+ofbiz/trunk/framework/jetty/lib/com.sun.el-2.2.0.v201108011116.jar
+ofbiz/trunk/framework/jetty/lib/javax.servlet.jsp.jstl-1.2.0.v201105211821.jar
+ofbiz/trunk/framework/jetty/lib/org.apache.jasper.glassfish-2.2.2.v201112011158.jar
+ofbiz/trunk/framework/jetty/lib/org.apache.taglibs.standard.glassfish-1.2.0.v201112081803.jar
 ofbiz/trunk/specialpurpose/ebaystore/lib/attributes.jar
 ofbiz/trunk/specialpurpose/ebaystore/lib/ebaysdkcore.jar
 ofbiz/trunk/specialpurpose/ebaystore/lib/helper.jar
@@ -2356,122 +2322,49 @@
 =========================================================================
 The following libraries distributed with Apache OFBiz are licensed under the
 Eclipse Public License - v 1.0:
-ofbiz/trunk/framework/catalina/lib/tomcat-6.0.16-jasper-jdt.jar
-ofbiz/trunk/framework/birt/lib/chartengineapi.jar
-ofbiz/trunk/framework/birt/lib/coreapi.jar
-ofbiz/trunk/framework/birt/lib/crosstabcoreapi.jar
-ofbiz/trunk/framework/birt/lib/dataadapterapi.jar
-ofbiz/trunk/framework/birt/lib/dataaggregationapi.jar
-ofbiz/trunk/framework/birt/lib/dataextraction.jar
-ofbiz/trunk/framework/birt/lib/dteapi.jar
-ofbiz/trunk/framework/birt/lib/emitterconfig.jar
-ofbiz/trunk/framework/birt/lib/engineapi.jar
+ofbiz/trunk/framework/birt/lib/flute.jar
 ofbiz/trunk/framework/birt/lib/jaxrpc.jar
-ofbiz/trunk/framework/birt/lib/modelapi.jar
-ofbiz/trunk/framework/birt/lib/modelodaapi.jar
-ofbiz/trunk/framework/birt/lib/odadesignapi.jar
+ofbiz/trunk/framework/birt/lib/js.jar
+ofbiz/trunk/framework/birt/lib/org.apache.xml.resolver_1.2.0.v201005080400.jar
+ofbiz/trunk/framework/birt/lib/org.apache.xml.serializer_2.7.1.v201005080400.jar
+ofbiz/trunk/framework/birt/lib/org.eclipse.birt.runtime_3.7.2.v20120214-1408.jar
+ofbiz/trunk/framework/birt/lib/org.eclipse.core.contenttype_3.4.100.v20110423-0524.jar
+ofbiz/trunk/framework/birt/lib/org.eclipse.core.expressions_3.4.300.v20110228.jar
+ofbiz/trunk/framework/birt/lib/org.eclipse.core.filesystem_1.3.100.v20110423-0524.jar
+ofbiz/trunk/framework/birt/lib/org.eclipse.core.jobs_3.5.101.v20120113-1953.jar
+ofbiz/trunk/framework/birt/lib/org.eclipse.core.resources_3.7.101.v20120125-1505.jar
+ofbiz/trunk/framework/birt/lib/org.eclipse.core.runtime_3.7.0.v20110110.jar
+ofbiz/trunk/framework/birt/lib/org.eclipse.datatools.connectivity.oda_3.3.3.v201110130935.jar
+ofbiz/trunk/framework/birt/lib/org.eclipse.emf_2.6.0.v20120123-1045.jar
+ofbiz/trunk/framework/birt/lib/org.eclipse.emf.common_2.7.0.v20120123-0926.jar
+ofbiz/trunk/framework/birt/lib/org.eclipse.emf.ecore_2.7.0.v20120123-0926.jar
+ofbiz/trunk/framework/birt/lib/org.eclipse.emf.ecore.change_2.7.1.v20120123-0926.jar
+ofbiz/trunk/framework/birt/lib/org.eclipse.emf.ecore.xmi_2.7.0.v20120123-0926.jar
+ofbiz/trunk/framework/birt/lib/org.eclipse.equinox.app_1.3.100.v20110321.jar
+ofbiz/trunk/framework/birt/lib/org.eclipse.equinox.common_3.6.0.v20110523.jar
+ofbiz/trunk/framework/birt/lib/org.eclipse.equinox.preferences_3.4.2.v20120111-2020.jar
+ofbiz/trunk/framework/birt/lib/org.eclipse.equinox.registry_3.5.101.R37x_v20110810-1611.jar
+ofbiz/trunk/framework/birt/lib/org.eclipse.osgi_3.7.2.v20120110-1415.jar
+ofbiz/trunk/framework/birt/lib/org.eclipse.osgi.services_3.3.0.v20110513.jar
+ofbiz/trunk/framework/birt/lib/org.eclipse.update.configurator_3.3.100.v20100512.jar
+ofbiz/trunk/framework/birt/lib/org.w3c.css.sac_1.3.0.v200805290154.jar
+ofbiz/trunk/framework/birt/lib/org.w3c.dom.smil_1.0.0.v200806040011.jar
+ofbiz/trunk/framework/birt/lib/org.w3c.dom.svg_1.1.0.v201011041433.jar
 ofbiz/trunk/framework/birt/lib/saaj.jar
-ofbiz/trunk/framework/birt/lib/scriptapi.jar
+ofbiz/trunk/framework/birt/lib/Tidy.jar
 ofbiz/trunk/framework/birt/lib/viewservlets.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.apache.batik.css_1.6.0.v200912221622.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.apache.batik.util_1.6.0.v200805290154.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.apache.batik.transcoder_1.6.0.v200805290154.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.apache.batik.dom.svg_1.6.0.v200805290154.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.apache.batik.bridge_1.6.0.v200912221622.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.apache.batik.dom_1.6.0.v200912221622.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.apache.xml.resolver_1.2.0.v201005080400.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.apache.xml.serializer_2.7.1.v201005080400.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.eclipse.birt.api_1.0.0.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.eclipse.birt.chart.device.extension_2.6.0.v20100521.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.eclipse.birt.chart.device.svg_2.6.0.v20100527.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.eclipse.birt.chart.engine_2.6.0.v20100607.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.eclipse.birt.chart.engine.extension_2.6.0.v20100601.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.eclipse.birt.chart.reportitem_2.6.0.v20100604.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.eclipse.birt.core_2.6.0.v20100526.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.eclipse.birt.core.script.function_2.6.0.v20100524.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.eclipse.birt.data_2.6.0.v20100524.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.eclipse.birt.data.aggregation_2.6.0.v20100524.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.eclipse.birt.report.data.adapter_2.6.0.v20100525.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.eclipse.birt.report.data.oda.jdbc.dbprofile_2.6.0.v20100524.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.eclipse.birt.report.data.oda.jdbc.dbprofile.sampledb_2.6.0.v20100524.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.eclipse.birt.report.data.oda.xml_2.6.0.v20100524.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.eclipse.birt.report.engine_2.6.0.v20100609.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.eclipse.birt.report.engine.dataextraction_2.5.2.v20100115.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.eclipse.birt.report.engine.dataextraction.csv_2.5.2.v20100115.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.eclipse.birt.report.engine.emitter.config_2.6.0.v20100304.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.eclipse.birt.report.engine.emitter.html.config_2.6.0.v20100304.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.eclipse.birt.report.engine.emitter.pdf_2.6.0.v20100513.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.eclipse.birt.report.engine.emitter.postscript_2.6.0.v20100526.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.eclipse.birt.report.engine.emitter.ppt_2.6.0.v20100429.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.eclipse.birt.report.engine.emitter.prototype.excel_2.6.0.v20100601.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.eclipse.birt.report.engine.emitter.wpml_2.6.0.v20100520.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.eclipse.birt.report.item.crosstab.core_2.6.0.v20100531.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.eclipse.birt.report.model_2.6.0.v20100603.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.eclipse.birt.report.model.adapter.oda_2.6.0.v20100528.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.eclipse.core.contenttype_3.4.100.v20100505-1235.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.eclipse.core.expressions_3.4.200.v20100505.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.eclipse.core.filesystem_1.3.0.v20100526-0737.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.eclipse.core.jobs_3.5.0.v20100515.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.eclipse.core.resources_3.6.0.v20100526-0737.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.eclipse.core.runtime_3.6.0.v20100505.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.eclipse.core.runtime.compatibility_3.2.100.v20100505.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.eclipse.core.runtime.compatibility.auth_3.2.200.v20100517.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.eclipse.datatools.connectivity_1.2.0.v201005270426.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.eclipse.datatools.connectivity.apache.derby_1.0.100.v200906020900.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.eclipse.datatools.connectivity.apache.derby.dbdefinition_1.0.2.v200906020900.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.eclipse.datatools.connectivity.console.profile_1.0.0.v200906020553.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.eclipse.datatools.connectivity.dbdefinition.genericJDBC_1.0.1.v200906111145.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.eclipse.datatools.connectivity.db.generic_1.0.1.v200906020900.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.eclipse.datatools.connectivity.oda_3.3.0.v201004270801.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.eclipse.datatools.connectivity.oda.consumer_3.2.3.v201005281018.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.eclipse.datatools.connectivity.oda.design_3.3.0.v201004020648.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.eclipse.datatools.connectivity.oda.flatfile_3.1.1.v201001131420.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.eclipse.datatools.connectivity.oda.profile_3.2.3.v201005281018.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.eclipse.datatools.connectivity.sqm.core_1.2.0.v201005270630.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.eclipse.datatools.enablement.hsqldb_1.0.0.v200906020900.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.eclipse.datatools.enablement.hsqldb.dbdefinition_1.0.0.v200906020900.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.eclipse.datatools.enablement.ibm.db2.iseries_1.0.2.v201005211230.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.eclipse.datatools.enablement.ibm.db2.iseries.dbdefinition_1.0.3.v200906020900.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.eclipse.datatools.enablement.ibm.db2.luw_1.0.2.v201005211230.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.eclipse.datatools.enablement.ibm.db2.luw.dbdefinition_1.0.4.v201005211215.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.eclipse.datatools.enablement.ibm.db2.zseries_1.0.2.v201005211230.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.eclipse.datatools.enablement.ibm.db2.zseries.dbdefinition_1.0.4.v201005211230.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.eclipse.datatools.enablement.ibm.informix_1.0.1.v201005211230.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.eclipse.datatools.enablement.ibm.informix.dbdefinition_1.0.4.v201005211230.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.eclipse.datatools.enablement.msft.sqlserver_1.0.1.v201001180222.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.eclipse.datatools.enablement.msft.sqlserver.dbdefinition_1.0.0.v201004211630.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.eclipse.datatools.enablement.mysql_1.0.2.v201002041100.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.eclipse.datatools.enablement.mysql.dbdefinition_1.0.4.v200906020900.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.eclipse.datatools.enablement.oda.ws_1.2.2.v201001131420.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.eclipse.datatools.enablement.oda.xml_1.2.1.v201001151620.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.eclipse.datatools.enablement.oracle_1.0.0.v200906020900.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.eclipse.datatools.enablement.oracle.dbdefinition_1.0.101.v201004211630.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.eclipse.datatools.enablement.postgresql_1.0.1.v200906020900.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.eclipse.datatools.enablement.postgresql.dbdefinition_1.0.1.v200906020900.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.eclipse.datatools.enablement.sap.maxdb_1.0.0.v200906020900.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.eclipse.datatools.enablement.sap.maxdb.dbdefinition_1.0.0.v200906020900.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.eclipse.datatools.modelbase.dbdefinition_1.0.2.v201002130228.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.eclipse.datatools.modelbase.derby_1.0.0.v201002161452.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.eclipse.datatools.modelbase.sql_1.0.4.v201002250945.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.eclipse.emf_2.6.0.v20100607-0756.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.eclipse.emf.common_2.6.0.v20100607-0756.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.eclipse.emf.ecore_2.6.0.v20100607-0756.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.eclipse.emf.ecore.change_2.5.0.v20100521-1846.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.eclipse.emf.ecore.xmi_2.5.0.v20100521-1846.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.eclipse.equinox.app_1.3.0.v20100512.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.eclipse.equinox.common_3.6.0.v20100503.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.eclipse.equinox.preferences_3.3.0.v20100503.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.eclipse.equinox.registry_3.5.0.v20100503.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.eclipse.osgi_3.6.0.v20100517.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.eclipse.osgi.services_3.2.100.v20100503.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.eclipse.update.configurator_3.3.100.v20100512.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.w3c.css.sac_1.3.0.v200805290154.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.w3c.dom.smil_1.0.0.v200806040011.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.w3c.dom.svg_1.1.0.v200806040011.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.eclipse.core.runtime.compatibility.registry_3.3.0.v20100520-1800/runtime_registry_compatibility.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.mozilla.rhino_1.7.1.v20090608/lib/js.jar
-ofbiz/trunk/framework/birt/lib/platform/plugins/org.w3c.sac_1.3.0.v20090608/lib/flute.jar
-ofbiz/trunk/framework/catalina/lib/ecj-3.3.1.jar
+ofbiz/trunk/framework/catalina/lib/ecj-3.7.1.jar
+ofbiz/trunk/framework/jetty/lib/jetty-ajp-8.1.2.v20120308.jar
+ofbiz/trunk/framework/jetty/lib/jetty-continuation-8.1.2.v20120308.jar
+ofbiz/trunk/framework/jetty/lib/jetty-http-8.1.2.v20120308.jar
+ofbiz/trunk/framework/jetty/lib/jetty-io-8.1.2.v20120308.jar
+ofbiz/trunk/framework/jetty/lib/jetty-security-8.1.2.v20120308.jar
+ofbiz/trunk/framework/jetty/lib/jetty-server-8.1.2.v20120308.jar
+ofbiz/trunk/framework/jetty/lib/jetty-servlet-8.1.2.v20120308.jar
+ofbiz/trunk/framework/jetty/lib/jetty-util-8.1.2.v20120308.jar
+ofbiz/trunk/framework/jetty/lib/jetty-webapp-8.1.2.v20120308.jar
+ofbiz/trunk/framework/jetty/lib/jetty-xml-8.1.2.v20120308.jar
+ofbiz/trunk/framework/jetty/lib/org.eclipse.jdt.core-3.7.1.jar
 =========================================================================
 Eclipse Public License - v 1.0
 
diff --git a/OPTIONAL_LIBRARIES b/OPTIONAL_LIBRARIES
index d6d902e..ff53a30 100644
--- a/OPTIONAL_LIBRARIES
+++ b/OPTIONAL_LIBRARIES
@@ -113,7 +113,6 @@
   TO BUILD comment out excludes:
     framework/webapp/build.xml:org/ofbiz/webapp/view/JasperReportsPdfViewHandler.java,org/ofbiz/webapp/view/JasperReportsXmlViewHandler.java
     applications/content/build.xml:org/ofbiz/content/report/JREntityListIteratorDataSource.java,org/ofbiz/content/report/JRMapCollectionDataSource.java
-  Also upgrade the itext2.0.1.jar to itext.2.1.7.jar (this will however break the birt report generator.)
 
 - JIMI (used by FOP ):
   http://java.sun.com/products/jimi
diff --git a/README b/README
index 1f29885..1141880 100644
--- a/README
+++ b/README
@@ -1,16 +1,18 @@
 
 Welcome to Apache OFBiz!
 
-If you have a release build all you need to run OFBiz is a 
+All you need to run OFBiz is a
 1.6 (version 6) JDK (not just the JRE, the full JDK).
 http://java.sun.com/javase/downloads/index.jsp
 
-However if you have downloaded ofbiz from SVN then you should
-load the demo data (strongly advised) with the following command
-on the command line: (being in the OFbiz directory)
+You can load the demo data (strongly advised) with the following command
+on the command line: (being in the OFBiz directory)
 
-linux: ./ant run-install
-windows: ant run-install 
+linux/unix/osx:
+./ant run-install
+
+windows:
+ant run-install
 
 Once that is properly setup just run the executable jar file
 that comes with OFBiz, which is ofbiz.jar. To do this on the
@@ -18,8 +20,17 @@
 
 java -Xms128M -Xmx512M -XX:MaxPermSize=128m -jar ofbiz.jar
 
-Even better use the startup scripts for Windows and Unix-based
-operating systems, namely startofbiz.bat and startofbiz.sh.
+or
+
+linux/unix/osx:
+./ant run
+
+windows:
+ant run
+
+You will also find several platform dependent startup scripts in the "tools" folder
+(for Windows and Unix-based operating systems, the startup scripts are startofbiz.bat
+and startofbiz.sh).
 
 Once OFBiz starts, you can look at the demo storefront at:
 http://localhost:8080/ecommerce
diff --git a/ant.bat b/ant.bat
index 2413d0f..c1e7c1a 100644
--- a/ant.bat
+++ b/ant.bat
@@ -19,5 +19,5 @@
 REM #####################################################################

 ECHO ON

 

-"%JAVA_HOME%\bin\java" -jar framework/base/lib/ant-launcher-1.7.1.jar -lib framework/base/lib/ant %1 %2 %3 %4 %5 %6

+"%JAVA_HOME%\bin\java" -jar framework/base/lib/ant-launcher-1.8.2.jar -lib framework/base/lib/ant %1 %2 %3 %4 %5 %6

 

diff --git a/applications/accounting/config/AccountingEntityLabels.xml b/applications/accounting/config/AccountingEntityLabels.xml
index 9d564ef..14a7951 100644
--- a/applications/accounting/config/AccountingEntityLabels.xml
+++ b/applications/accounting/config/AccountingEntityLabels.xml
@@ -3919,6 +3919,30 @@
         <value xml:lang="zh">供应商预付款</value>
         <value xml:lang="zh_TW">供應商預付款</value>
     </property>
+    <property key="RateType.description.AVERAGE_PAY_RATE">
+        <value xml:lang="en">Average Pay Rate</value>
+        <value xml:lang="fr">Prix moyen</value>
+    </property>
+    <property key="RateType.description.DISCOUNTED">
+        <value xml:lang="en">Discounted Rate</value>
+        <value xml:lang="fr">Réduit</value>
+    </property>
+    <property key="RateType.description.HIGH_PAY_RATE">
+        <value xml:lang="en">Highest Pay Rate</value>
+        <value xml:lang="fr">Prix haut</value>
+    </property>
+    <property key="RateType.description.LOW_PAY_RATE">
+        <value xml:lang="en">Lowest Pay Rate</value>
+        <value xml:lang="fr">Prix bas</value>
+    </property>
+    <property key="RateType.description.OVERTIME">
+        <value xml:lang="en">Overtime Rate</value>
+        <value xml:lang="fr">Majoré</value>
+    </property>
+    <property key="RateType.description.STANDARD">
+        <value xml:lang="en">Standard Rate</value>
+        <value xml:lang="fr">Standard</value>
+    </property>
     <property key="TaxAuthorityAssocType.description.COLLECT_AGENT">
         <value xml:lang="en">Collection Agent</value>
         <value xml:lang="fr">Agent percepteur</value>
diff --git a/applications/accounting/config/AccountingErrorUiLabels.xml b/applications/accounting/config/AccountingErrorUiLabels.xml
index 4b7752e..f193a76 100644
--- a/applications/accounting/config/AccountingErrorUiLabels.xml
+++ b/applications/accounting/config/AccountingErrorUiLabels.xml
@@ -20,108 +20,126 @@
 -->
 <resource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
     <property key="AccountingDeleteRateAmount">
+        <value xml:lang="de">Kann die zu löschende Raten-Summe nicht finden</value>    
         <value xml:lang="en">Could not find RateAmount record to be deleted</value>
         <value xml:lang="it">Non è possibile trovare un record di RateAmount che deve essere cancellato</value>
         <value xml:lang="pt">Não foi possível localizar o registro a ser excluído RateAmount</value>
         <value xml:lang="zh">找不到要删除的费率金额(RateAmount)记录</value>
     </property>
     <property key="AccountingEftAccountCannotBeCreated">
+        <value xml:lang="de">FEHLER: Kann die Bezahlmethoden-ID nicht anlegen (ID Generierungsfehler)</value>    
         <value xml:lang="en">ERROR: Could not create payment method Id (id generation failure)</value>
         <value xml:lang="it">ERRORE: Non è possibile creare il metodo pagamento (fallimento generazione id)</value>
         <value xml:lang="pt">ERRO: Não foi possível criar Id de étodo de pagamento (falha ao gerar ID)</value>
         <value xml:lang="zh">错误:无法创建支付方法标识(生成标识时失败)</value>
     </property>
     <property key="AccountingEftAccountCannotBeCreatedWriteFailure">
+        <value xml:lang="de">FEHLER: Kann den Elektr. Zahlungsverkehr-Zugang nicht anlegen (Schreib-Fehler): ${errorString}</value>
         <value xml:lang="en">ERROR: Could not create EFT account (write failure): ${errorString}</value>
         <value xml:lang="it">ERRORE: Non è possibile creare il conto EFT (fallita scrittura): ${errorString}</value>
         <value xml:lang="pt">ERRO: Não foi possível criar conta de EFT (falha de escrita): ${errorString}</value>
         <value xml:lang="zh">错误:无法创建电子资金转账账户(写操作失败):${errorString}</value>
     </property>
     <property key="AccountingEftAccountCannotBeUpdated">
+        <value xml:lang="de">FEHLER: Kann den Elektr. Zahlungsverkehr-Zugang nicht ändern (Schreib-Fehler): ${errorString}</value>
         <value xml:lang="en">ERROR: Could not update EFT Account (write failure): ${errorString}</value>
         <value xml:lang="it">ERRORE: Non è possibile aggiornare il conto EFT (scrittura fallita): ${errorString}</value>
         <value xml:lang="pt">ERRO: Não foi possível atualizar Conta EFT (falha de escrita): ${errorString}</value>
         <value xml:lang="zh">错误:无法更新电子资金转账账户(写操作失败):${errorString}</value>
     </property>
     <property key="AccountingEftAccountCannotBeUpdatedReadFailure">
+        <value xml:lang="de">FEHLER: Kann den Elektr. Zahlungsverkehr-Zugang nicht ändern (Lese-Fehler): ${errorString}</value>
         <value xml:lang="en">ERROR: Could not update EFT Account (read error): ${errorString}</value>
         <value xml:lang="it">ERRORE: Non è possibile aggiornare il conto EFT (fallita lettura): ${errorString}</value>
         <value xml:lang="pt">ERRO: Não foi possível atualizar Conta EFT (erro de leitura): ${errorString}</value>
         <value xml:lang="zh">错误:无法更新电子资金转账账户(读取时出错):${errorString}</value>
     </property>
     <property key="AccountingEftPartyNotAuthorized">
+        <value xml:lang="de">Akteur Id ${partyId} ist nicht der Besitzer der Bezahlmethode ${paymentMethodId} und hat keine Berechtigung diese zu ändern.</value>
         <value xml:lang="en">Party Id ${partyId} is not the owner of payment method ${paymentMethodId} and does not have permission to change it.</value>
         <value xml:lang="it">Il soggetto ${partyId} non è il propretario del metodo di pagamento ${paymentMethodId} non hai il permesso per cambiarlo.</value>
         <value xml:lang="pt">Participante com ID ${partyId} não é o proprietário do método de pagamento de US ${paymentMethodId} e não têm permissão para alterá-lo.</value>
         <value xml:lang="zh">会员标识 ${partyId} 不是支付方法 ${paymentMethodId} 的拥有者,无权修改它。</value>
     </property>
     <property key="AccountingFinAccountAuthorizationExpired">
+        <value xml:lang="de">Authroisierungs-Transaktion ${paymentGatewayResponseId} ist seit ${authExpiration} abgelaufen</value>    
         <value xml:lang="en">Authorization transaction ${paymentGatewayResponseId} has expired as of ${authExpiration}</value>
         <value xml:lang="it">Autorizzazione transazione ${paymentGatewayResponseId} ha una scadenza del ${authExpiration}</value>
         <value xml:lang="pt">Autorização de transação de ${paymentGatewayResponseId} expirou como de ${authExpiration}</value>
         <value xml:lang="zh">授权交易 ${paymentGatewayResponseId} 已过期,原因是 ${authExpiration}</value>
     </property>
     <property key="AccountingFinAccountCancelled">
+        <value xml:lang="de">Zugriff wurde storniert</value>
         <value xml:lang="en">Account has been cancelled</value>
         <value xml:lang="it">Il conto è stato cancellato</value>
         <value xml:lang="pt">Conta foi cancelada</value>
         <value xml:lang="zh">账户已被取消了</value>
     </property>
     <property key="AccountingFinAccountCannotBeAuthorized">
+        <value xml:lang="de">Kann die Abrechnung nicht durchführen, wegen: ${errorString}</value>
         <value xml:lang="en">Cannot authorize financial account due to: ${errorString}</value>
         <value xml:lang="it">Non è possibile autorizzare il conto finanziario per: ${errorString}</value>
         <value xml:lang="pt">Não é possível autorizar a conta financeira decorrente de: ${errorString}</value>
         <value xml:lang="zh">无法授权财务账目,原因是:${errorString}</value>
     </property>
     <property key="AccountingFinAccountCannotBeExpired">
+        <value xml:lang="de">Es ist nicht möglich die Abrechnungs-Authorisierung zu stornieren: </value>
         <value xml:lang="en">Unable to expire financial account authorization: </value>
         <value xml:lang="it">Non è possibile cancellare l'autorizzazione per il conto finanziario: </value>
         <value xml:lang="pt">Incapaz de expirar a autorização da conta financeira:</value>
         <value xml:lang="zh">无法过期财务账目授权:</value>
     </property>
     <property key="AccountingFinAccountCannotBeRefunded">
+        <value xml:lang="de">Der verfügbare Betrag ist ungleich dem aktuellen Betrag; Schwebende Authorisierung; Es ist derzeit nicht möglich eine Rückerstattung durchzuführen.</value>    
         <value xml:lang="en">Available balance does not match the actual balance; pending authorizations; cannot refund FinAccount at this time.</value>
         <value xml:lang="it">Bilancio disponibilie non corrisponde all'attuale bilancio; autorizzazioni in attesa; non è possibile rimborsare il conto finanziario in questo momento.</value>
         <value xml:lang="pt">Saldo disponível não corresponde ao saldo real, autorizações pendentes; não é possível reembolsar FinAccount neste momento.</value>
         <value xml:lang="zh">可动用结余与实际结余不一致;暂停授权;本次无法退款到财务账目。</value>
     </property>
     <property key="AccountingFinAccountCannotBeReplenish">
+        <value xml:lang="de">Kann das Produkt-Lager nicht in den vorherigen Absätzen zu finden. Produkt-Lager darf nicht leer sein</value>
         <value xml:lang="en">Cannot locate product store from previous deposits; product store cannot be empty</value>
         <value xml:lang="it">Non è possibile localizzare il negozio dei precedenti depositi; il negozio non può essere vuoto</value>
         <value xml:lang="pt">Não é possível localizar loja de produtos de depósitos anteriores; loja de produtos não pode estar vazia</value>
         <value xml:lang="zh">无法从以前的存款确定产品店铺;产品店铺不能为空</value>
     </property>
     <property key="AccountingFinAccountCannotCapture">
+        <value xml:lang="de">Keine Authorizierungs-Transaktion für die Bestell-Bezahl-Einstellungen gefunden; kann nicht OrderPaymentPreference; keine Erfassung möglich</value>
         <value xml:lang="en">No authorization transaction found for the OrderPaymentPreference; cannot capture</value>
         <value xml:lang="it">Nessuna transazione di autorizzazione trovata per le preferenze pagamento ordine; non è possibile catturare</value>
         <value xml:lang="pt">Nenhuma autorização de transação encontrado para a OrderPaymentPreference; não é possível capturar</value>
         <value xml:lang="zh">找不到用于这个订单支付引用(OrderPaymentPreference)的授权交易;无法捕捉</value>
     </property>
     <property key="AccountingFinAccountCannotCreate">
+        <value xml:lang="de">Es ist nicht möglich ein Finanz-Konto anzulegen; Keine Product-Laden-Id am Bestell-Kopf: ${orderId}</value>
         <value xml:lang="en">Unable to create financial accout; no productStoreId on OrderHeader: ${orderId}</value>
         <value xml:lang="it">Non è possibile creare conto finanziario; nessun negozio impostato sulla testata ordine: ${orderId}</value>
         <value xml:lang="pt">Não é possível criar accout financeira; sem productStoreId em OrderHeader: ${orderId}</value>
         <value xml:lang="zh">无法创建财务账目;订单头(OrderHeader)中没有产品店铺标识(productStoreId),订单编号:${orderId}</value>
     </property>
     <property key="AccountingFinAccountCannotCreateTransaction">
+        <value xml:lang="de">Es ist nicht möglich ein Finanz-Konto Transaktion anzulegen!</value>
         <value xml:lang="en">Unable to create financial account transaction!</value>
         <value xml:lang="it">Non è possibile creare un transazione di un conto finanziario!</value>
         <value xml:lang="pt">Não é possível criar transação na conta de financeiras!</value>
         <value xml:lang="zh">无法执行创建财务账目事务!</value>
     </property>
     <property key="AccountingFinAccountCannotCreditAccount">
+        <value xml:lang="de">Es ist nicht möglich ein Dienste-Kredit-Konto anzulegen oder zu finden</value>
         <value xml:lang="en">Could not find or create a service credit account</value>
         <value xml:lang="it">Non è possibile trovare o creare un servizio di accredito conto</value>
         <value xml:lang="pt">Não foi possível encontrar ou criar um serviço de conta de crédito</value>
         <value xml:lang="zh">无法找到或创建一个服务信用账户</value>
     </property>
     <property key="AccountingFinAccountCannotFindAuthorization">
+        <value xml:lang="de"> Kann keine Authorisierungs-Transaktion finden.</value>
         <value xml:lang="en"> Could not find authorization transaction.</value>
         <value xml:lang="it"> Non è possibile trovare la transazione di autorizzazione.</value>
         <value xml:lang="pt">Não foi possível encontrar autorização para a transação.</value>
         <value xml:lang="zh">无法找到授权事务。</value>
     </property>
     <property key="AccountingFinAccountCannotLocateItFromAccountCode">
+        <value xml:lang="de">Kann kein Finanz-Konto zum Zugangs-Code finden</value>
         <value xml:lang="en">Unable to locate financial account from account code</value>
         <value xml:lang="it">Non è possibile localizzare il conto finanziario dal codice conto</value>
         <value xml:lang="pt">Não foi possível localizar a conta financeira do código de conta</value>
@@ -134,12 +152,14 @@
         <value xml:lang="zh">无法把标识为 ${parameters.finAccountTransId} 的财务账目交易提交到普通日记账中,无法找到 ${creditDebit} ${requiredField}</value>
     </property>
     <property key="AccountingFinAccountExpired">
+        <value xml:lang="de">Konto ist zum ${thruDate} abgelaufen</value>
         <value xml:lang="en">Account has expired as of ${thruDate}</value>
         <value xml:lang="it">Conto scaduto dal ${thruDate}</value>
         <value xml:lang="pt">Conta expirou a partir de ${thruDate}</value>
         <value xml:lang="zh">账目已过期,过期日期为 ${thruDate}</value>
     </property>
     <property key="AccountingFinAccountFrozen">
+        <value xml:lang="de">Konto ist derzeit eingefroren</value>
         <value xml:lang="en">Account is currently frozen</value>
         <value xml:lang="it">Il conto è attualmente congelato</value>
         <value xml:lang="pt">Conta está congelada</value>
@@ -543,6 +563,7 @@
         <value xml:lang="zh">执行从设置创建支付(CreatePaymentFromPreference)这个服务时出错</value>
     </property>
     <property key="worldPayEvents.noValidOrderIdReturned">
+        <value xml:lang="de">Es wurde keine valide BestellId zurückgegeben</value>    
         <value xml:lang="en">No Valid OrderId Returned</value>
         <value xml:lang="fr">Référence commande retournée n'est pas valide</value>
         <value xml:lang="hi_IN">मान्य OrderId वापस नहीं लौटा</value>
@@ -591,6 +612,7 @@
         <value xml:lang="zh">获取商户配置时出错</value>
     </property>
     <property key="worldPayEvents.problemsGettingOrderHeader">
+        <value xml:lang="de">Probleme den Bestellkopf zu ermitteln</value>    
         <value xml:lang="en">Problems Getting OrderHeader</value>
         <value xml:lang="fr">Problème de récupération de la commande</value>
         <value xml:lang="hi_IN">OrderHeader में समस्याएँ हो रही</value>
@@ -606,6 +628,7 @@
         <value xml:lang="zh">执行从设置创建支付(CreatePaymentFromPreference)这个服务时出错</value>
     </property>
     <property key="idealEvents.noValidOrderIdReturned">
+        <value xml:lang="de">Es wurde keine valide BestellId zurückgegeben</value>
         <value xml:lang="en">No Valid OrderId Returned</value>
         <value xml:lang="fr">Référence commande retournée n'est pas valide</value>
         <value xml:lang="hi_IN">मान्य OrderId वापस नहीं लौटा</value>
@@ -613,6 +636,7 @@
         <value xml:lang="zh">返回的订单标识无效</value>
     </property>
     <property key="idealEvents.problemsConnectingWithIdeal">
+        <value xml:lang="de">Probleme bei der Verbindung zu iDEAL</value>    
         <value xml:lang="en">Problems Connecting With iDEAL</value>
         <value xml:lang="fr">Problème rencontré dans la connexion avec iDEAL</value>
         <value xml:lang="hi_IN">iDEAL के साथ जोड़ने में समस्या</value>
@@ -620,6 +644,7 @@
         <value xml:lang="zh">连接 iDEAL 时出错</value>
     </property>
     <property key="idealEvents.problemsGettingAuthenticationUser">
+        <value xml:lang="de">Probleme den berechtigten Benutzer zu ermitteln</value>
         <value xml:lang="en">Problems Getting Authentication User</value>
         <value xml:lang="fr">Problème sur l'authentification de l'utilisateur</value>
         <value xml:lang="hi_IN">उपयोगकर्ता(user) के प्रमाणीकरण में समस्याएँ हो रही</value>
@@ -627,6 +652,7 @@
         <value xml:lang="zh">获取认证用户时出错</value>
     </property>
     <property key="idealEvents.problemsGettingMerchantConfiguration">
+        <value xml:lang="de">Probleme die Verkaufs-Konfiguration zu ermitteln</value>
         <value xml:lang="en">Problems Getting Merchant Configuration</value>
         <value xml:lang="fr">Problème de récupération de la configuration marchand</value>
         <value xml:lang="hi_IN">व्यापारी विन्यास में समस्याएँ हो रही</value>
@@ -634,6 +660,7 @@
         <value xml:lang="zh">获取商户配置时出错</value>
     </property>
     <property key="idealEvents.problemsGettingOrderHeader">
+        <value xml:lang="de">Probleme den Bestellkopf zu ermitteln</value>
         <value xml:lang="en">Problems Getting OrderHeader</value>
         <value xml:lang="fr">Problème de récupération de la commande</value>
         <value xml:lang="hi_IN">OrderHeader में समस्याएँ हो रही</value>
diff --git a/applications/accounting/config/AccountingUiLabels.xml b/applications/accounting/config/AccountingUiLabels.xml
index aec31f6..f9901c0 100644
--- a/applications/accounting/config/AccountingUiLabels.xml
+++ b/applications/accounting/config/AccountingUiLabels.xml
@@ -296,6 +296,7 @@
         <value xml:lang="fr">Ajouter une période de temps</value>
         <value xml:lang="hi_IN">स्वनिर्धारित समय अवधि जोड़ें</value>
         <value xml:lang="it">Aggiungi Periodi di Tempo Personalizzati</value>
+        <value xml:lang="nl">Aangepaste periode toevoegen</value>
         <value xml:lang="pt">Adicionar período personalizado</value>
         <value xml:lang="th">เพิ่มการกำหนดระยะเวลา</value>
         <value xml:lang="zh">添加定制时间段</value>
@@ -303,6 +304,7 @@
     </property>
     <property key="AccountingAddFinAccountReconciliations">
         <value xml:lang="en">Add Financial Account Reconciliations for Financial Account : ${finAccount.finAccountName} [${finAccountId}]</value>
+        <value xml:lang="nl">Toevoegen afstemmingen voor Financiele rekening : ${finAccount.finAccountName} [${finAccountId}]</value>
         <value xml:lang="pt">Adicionar Reconciliação de Conta Financeira para Conta Financeira:  ${finAccount.finAccountName} [${finAccountId}]</value>
         <value xml:lang="zh">为财务账目 ${finAccount.finAccountName} [${finAccountId}] 添加财务账目对账</value>
     </property>
@@ -325,7 +327,7 @@
         <value xml:lang="fr">Ajouter une identification d'immobilisation</value>
         <value xml:lang="hi_IN">अचल संपत्ति की पहचान जोड़ें</value>
         <value xml:lang="it">Nuova identificazione cespite</value>
-        <value xml:lang="nl">Voeg vaste activa-identificatie toe</value>
+        <value xml:lang="nl">Vaste activa-id toevoegen</value>
         <value xml:lang="pt">Adicionar Identificação de Ativos Fixos</value>
         <value xml:lang="ro">Actualizeaza Identitate Mijloc Fix</value>
         <value xml:lang="ru">Редактирование идентификаторов ОС</value>
@@ -339,6 +341,7 @@
         <value xml:lang="fr">Ajouter une commande de maintenance d'immobilisation</value>
         <value xml:lang="hi_IN">अचल संपत्ति रखरखाव के आदेश जोड़ें</value>
         <value xml:lang="it">Nuovo ordine di manutenzione cespite</value>
+        <value xml:lang="nl">Opdracht voor onderhoud op vaste activa toevoegen</value>
         <value xml:lang="pt">Adicionar Pedido de Manutenção de Ativos Fixos</value>
         <value xml:lang="th">แก้ไขรายการบำรุงรักษาทรัพย์สินไม่หมุนเวียน</value>
         <value xml:lang="zh">添加固定资产维修保养订单</value>
@@ -365,7 +368,7 @@
         <value xml:lang="fr">Ajouter une mesure de la maintenance d'immobilisation</value>
         <value xml:lang="hi_IN">अचल संपत्ति मापक रीडिंग जोड़ें</value>
         <value xml:lang="it">Nuova misura contatori cespite</value>
-        <value xml:lang="nl">Voeg meterwaarde vaste activa toe</value>
+        <value xml:lang="nl">Meterwaarde vaste activa toevoegen</value>
         <value xml:lang="pt">Adicionar leitura de medidor de Ativos Fixos</value>
         <value xml:lang="th">Add Fixed Asset Maintenance Meter</value>
         <value xml:lang="zh">添加固定资产仪表读数</value>
@@ -377,6 +380,7 @@
         <value xml:lang="fr">Ajouter une tâche d'un acteur à une immobilisation</value>
         <value xml:lang="hi_IN">अचल संपत्ति में नियत कार्य करने के लिए पार्टी जोड़ें</value>
         <value xml:lang="it">Nuova assegnazione cespite a soggetto</value>
+        <value xml:lang="nl">Taaktoewijzing Vaste Activa toevoegen</value>
         <value xml:lang="pt">Adicionar Atribuição de Ativos Fixos ao participante</value>
         <value xml:lang="th">แก้ไขกลุ่มทรัพย์สินไม่หมุนเวียน</value>
         <value xml:lang="zh">添加会员固定资产分配</value>
@@ -389,6 +393,7 @@
         <value xml:lang="fr">Ajouter l'enregistrement d'immobilisation</value>
         <value xml:lang="hi_IN">अचल संपत्ति के लिए पंजीयन जोड़ें</value>
         <value xml:lang="it">Nuova registrazione cespite</value>
+        <value xml:lang="nl">Registratie ID voor Vaste Activa toevoegen</value>
         <value xml:lang="pt">Adicionar Registro de de Ativo Fixo</value>
         <value xml:lang="ro">Actualizeaza Inregistrare Mijloc Fix</value>
         <value xml:lang="ru">Изменить регистраций ОС</value>
@@ -440,7 +445,7 @@
         <value xml:lang="hi_IN">नया EFT ख़ाता</value>
         <value xml:lang="it">Aggiungi nuovo conto EFT</value>
         <value xml:lang="ja">Add New EFT Account</value>
-        <value xml:lang="nl">Voeg een nieuwe bankrekening toe</value>
+        <value xml:lang="nl">Nieuwe bankrekening toevoegen</value>
         <value xml:lang="pt">Adicionar Nova Conta EFT</value>
         <value xml:lang="pt_PT">Adicionar Nova Conta EFT</value>
         <value xml:lang="ro">Adauga Nou Cont EFT</value>
@@ -458,7 +463,7 @@
         <value xml:lang="hi_IN">नया उपहार ख़ाता</value>
         <value xml:lang="it">Aggiungi nuova carta omaggio</value>
         <value xml:lang="ja">ギフトカードの追加</value>
-        <value xml:lang="nl">Voeg een nieuwe tegoedbon toe</value>
+        <value xml:lang="nl">Tegoedbon toevoegen</value>
         <value xml:lang="pt">Adicionar Novo Cartão de presente</value>
         <value xml:lang="ro">Adauga Noua Carte Omagiu</value>
         <value xml:lang="ru">Добавить новую дисконтную карту</value>
@@ -481,6 +486,7 @@
     <property key="AccountingAddPaymentGroupMember">
         <value xml:lang="en">Add Payment Group Member</value>
         <value xml:lang="hi_IN">भुगतान समूह सदस्य जोड़ें</value>
+        <value xml:lang="nl">Payment Group Member toevoegen</value>
         <value xml:lang="pt">Adicionar Membro do Grupo de Pagamento</value>
         <value xml:lang="zh">添加支付组成员</value>
         <value xml:lang="zh_TW">增加支付群組成員</value>
@@ -488,6 +494,7 @@
     <property key="AccountingAddTax">
         <value xml:lang="en">Add Tax</value>
         <value xml:lang="fr">Ajouter les taxes</value>
+        <value xml:lang="nl">Belastingen toevoegen</value>
         <value xml:lang="zh">添加税项</value>
     </property>
     <property key="AccountingAddTaxAuthorityGlAccount">
@@ -638,6 +645,7 @@
         <value xml:lang="fr">Point de l'accord commercial (articles) pour rapport</value>
         <value xml:lang="hi_IN">अनुबंध वस्तु उत्पाद के लिए ब्यौरेवार विवरण</value>
         <value xml:lang="it">Prodotti riga contratto per i report</value>
+        <value xml:lang="nl">Overeenkomst items producten voor rapport</value>
         <value xml:lang="pt">Itens do acordo para o Relatório</value>
         <value xml:lang="zh">用于报表的合同条款产品</value>
         <value xml:lang="zh_TW">用于報表的合同條款產品</value>
@@ -663,6 +671,7 @@
         <value xml:lang="fr">Point de l'accord commercial (articles/fournisseur) pour rapport</value>
         <value xml:lang="hi_IN">अनुबंध वस्तु प्रदायक के लिए ब्यौरेवार विवरण</value>
         <value xml:lang="it">Prodotti fornitore riga contratto per i report</value>
+        <value xml:lang="nl">Overeenkomst item leverancier producten voor rapport</value>
         <value xml:lang="pt">Fornecedores dos itens do acordo para relatório</value>
         <value xml:lang="zh">用于报表的合同条款供货商产品</value>
         <value xml:lang="zh_TW">用于報表的合同條款供貨商產品</value>
@@ -707,7 +716,7 @@
         <value xml:lang="fr">Points d'accord commercial</value>
         <value xml:lang="hi_IN">अनुबंध मदें</value>
         <value xml:lang="it">Righe Contratto</value>
-        <value xml:lang="nl">Overeenkomst Items</value>
+        <value xml:lang="nl">Overeenkomst items</value>
         <value xml:lang="pt">Itens do acordo</value>
         <value xml:lang="ro">Linii Contract</value>
         <value xml:lang="ru">Элементы договора</value>
@@ -991,6 +1000,7 @@
         <value xml:lang="fr">Modifier le vendeur</value>
         <value xml:lang="hi_IN">विक्रेता को संपादित करें</value>
         <value xml:lang="it">Aggiorna fornitore</value>
+        <value xml:lang="nl">Leverancier wijzigen</value>
         <value xml:lang="pt">Editar fornecedor</value>
         <value xml:lang="zh">编辑供应商</value>
         <value xml:lang="zh_TW">編輯供應商</value>
@@ -1031,6 +1041,7 @@
     <property key="AccountingApPaymentGroupMenu">
         <value xml:lang="en">AP Payment Groups</value>
         <value xml:lang="fr">Groupes de paiement AP</value>
+        <value xml:lang="nl">AP Betalingsgroepen</value>
         <value xml:lang="pt">Grupos de pagamento de contas a pagar</value>
         <value xml:lang="zh">应付支付组</value>
         <value xml:lang="zh_TW">應付支付群組</value>
@@ -1218,6 +1229,7 @@
         <value xml:lang="fr">Page d'accueil de la comptabilité client</value>
         <value xml:lang="hi_IN">मुख्य पृष्ठ प्राप्य खाता</value>
         <value xml:lang="it">Pagina principale conto creditori</value>
+        <value xml:lang="nl">Hoofdpagina Debiteuren</value>
         <value xml:lang="pt">Página principal do contas a receber</value>
         <value xml:lang="zh">应收账户首页</value>
         <value xml:lang="zh_TW">應收賬戶首頁</value>
@@ -1269,6 +1281,7 @@
     <property key="AccountingArPaymentGroupMenu">
         <value xml:lang="en">AR Payment Groups</value>
         <value xml:lang="fr">Groupes de paiement</value>
+        <value xml:lang="nl">AP Betalingsgroepen</value>
         <value xml:lang="pt">Grupos de Pagamento do Contas a receber</value>
         <value xml:lang="zh">应收支付组</value>
         <value xml:lang="zh_TW">應收支付群組</value>
@@ -4332,6 +4345,7 @@
     <property key="AccountingFindArInvoices">
         <value xml:lang="en">Find AR Invoices</value>
         <value xml:lang="hi_IN">लेखा प्राप्य चालान खोजें</value>
+        <value xml:lang="nl">Crediteuren facturen vinden</value>
         <value xml:lang="pt">Encontrar Faturas do contas a receber</value>
         <value xml:lang="zh">查找应收发票</value>
         <value xml:lang="zh_TW">找尋應收發票</value>
@@ -4339,6 +4353,7 @@
     <property key="AccountingFindArPaymentGroups">
         <value xml:lang="en">Find AR Payment Groups</value>
         <value xml:lang="fr">Recherche de groupes de paiement</value>
+        <value xml:lang="nl">AR Betalingsgroepen vinden</value>
         <value xml:lang="pt">Buscar os grupos de pagamento do contas a receber</value>
         <value xml:lang="zh">查找应收支付组</value>
         <value xml:lang="zh_TW">找尋應收支付群組</value>
@@ -4346,6 +4361,7 @@
     <property key="AccountingFindArPayments">
         <value xml:lang="en">Find AR Payments</value>
         <value xml:lang="hi_IN">लेखा प्राप्य भुगतान खोजें</value>
+        <value xml:lang="nl">Crediteuren betalingen vinden</value>
         <value xml:lang="pt">Encontrar Pagamentos do contas a receber</value>
         <value xml:lang="zh">查找应收支付</value>
         <value xml:lang="zh_TW">找尋應收支付</value>
@@ -4358,6 +4374,7 @@
     </property>
     <property key="AccountingFindFinAccountReconciliations">
         <value xml:lang="en">Find Financial Account Reconciliations</value>
+        <value xml:lang="nl">Afstemmingen financiele rekeningen vinden</value>
         <value xml:lang="pt">Encontrar reconciliações de Conta Financeira</value>
         <value xml:lang="zh">查找财务账目对账</value>
     </property>
@@ -4397,6 +4414,7 @@
         <value xml:lang="en">Find Payment Group</value>
         <value xml:lang="fr">Recherche de groupes de paiement</value>
         <value xml:lang="hi_IN">भुगतान समूह खोजें</value>
+        <value xml:lang="nl">Betalingsgroep vinden</value>
         <value xml:lang="pt">Encontrar Grupo de pagamento</value>
         <value xml:lang="zh">查找支付组</value>
         <value xml:lang="zh_TW">找尋支付群組</value>
@@ -4405,6 +4423,7 @@
         <value xml:lang="en">Find Purchase Invoices</value>
         <value xml:lang="fr">Recherche de factures d'achat</value>
         <value xml:lang="hi_IN">खरीद चालान खोजें</value>
+        <value xml:lang="nl">Inkoopfactuur vinden</value>
         <value xml:lang="pt">Encontrar faturas de compra</value>
         <value xml:lang="zh">查找采购发票</value>
         <value xml:lang="zh_TW">找尋採購發票</value>
@@ -4437,6 +4456,7 @@
         <value xml:lang="en">Find Sales Invoices For Commission Run</value>
         <value xml:lang="hi_IN">दलाली भुगतान के लिए बिक्री चालान खोजें</value>
         <value xml:lang="it">Ricerca fatture di vendita per commissione</value>
+        <value xml:lang="nl">Verkoopfactuur voor commissierun vinden</value>
         <value xml:lang="pt">Encontrar faturas de venda por Comissão</value>
         <value xml:lang="zh">为佣金计算查找销售发票</value>
     </property>
@@ -4459,6 +4479,7 @@
     <property key="AccountingFirstNameOnCardMissing">
         <value xml:lang="de">Vorname des Karteninhabers fehlt</value>
         <value xml:lang="en">First Name on Card is missing</value>
+        <value xml:lang="nl">Voornaam van de kaarthouder ontbreekt</value>
         <value xml:lang="pt">Primeiro nome no cartão está faltando</value>
         <value xml:lang="zh">缺少卡上姓名的第一组字母</value>
         <value xml:lang="zh_TW">沒有卡片上的名字</value>
@@ -5750,6 +5771,9 @@
         <value xml:lang="pt">Reconciliação de contabilidade para: ${finAccount.finAccountName} [${finAccountId}]</value>
         <value xml:lang="zh">总账对账:${finAccount.finAccountName} [${finAccountId}]</value>
     </property>
+    <property key="AccountingGlMappings">
+        <value xml:lang="en">GL Mappings</value>
+    </property>
     <property key="AccountingGlobalGLSettings">
         <value xml:lang="de">Hauptbuch-Einstellungen, global</value>
         <value xml:lang="en">Global GL Settings</value>
@@ -5764,6 +5788,7 @@
     </property>
     <property key="AccountingGrossMargin">
         <value xml:lang="en">Gross Margin</value>
+        <value xml:lang="nl">Bruto marge</value>
         <value xml:lang="pt">Margem Bruta</value>
         <value xml:lang="zh">毛利</value>
     </property>
@@ -5851,6 +5876,7 @@
     </property>
     <property key="AccountingIncomeFromOperations">
         <value xml:lang="en">Income From Operations</value>
+        <value xml:lang="nl">Operationele inkomsten</value>
         <value xml:lang="pt">Resultado Operacional</value>
         <value xml:lang="zh">营运收入</value>
     </property>
@@ -8239,6 +8265,7 @@
     </property>
     <property key="AccountingOperatingExpenses">
         <value xml:lang="en">Operating Expenses</value>
+        <value xml:lang="nl">Operationele kosten</value>
         <value xml:lang="pt">Despesas Operacionais</value>
         <value xml:lang="zh">营业费用</value>
     </property>
@@ -8335,6 +8362,7 @@
         <value xml:lang="fr">Réf. d'org.</value>
         <value xml:lang="hi_IN">संगठन पार्टी क्रमांक</value>
         <value xml:lang="it">Organizzazione</value>
+        <value xml:lang="nl">Organisatie ID</value>
         <value xml:lang="pt">ID de organização participante</value>
         <value xml:lang="th">รหัสองค์กรกลุ่มผู้ใช้</value>
         <value xml:lang="zh">组织会员标识</value>
@@ -8642,6 +8670,7 @@
     <property key="AccountingPastDueInvoices">
         <value xml:lang="en">Past Due Invoices</value>
         <value xml:lang="fr">Factures en attente de règlement</value>
+        <value xml:lang="nl">Vervallen facturen</value>
         <value xml:lang="pt">Faturas passdas em débito</value>
         <value xml:lang="zh">过期发票</value>
     </property>
@@ -10481,6 +10510,7 @@
         <value xml:lang="en">Purchase Invoices</value>
         <value xml:lang="fr">Factures d'achat</value>
         <value xml:lang="hi_IN">खरीद चालान</value>
+        <value xml:lang="nl">Inkoopfacturen</value>
         <value xml:lang="pt">Faturas de Compra</value>
         <value xml:lang="zh">采购发票</value>
     </property>
@@ -10520,6 +10550,7 @@
         <value xml:lang="fr">Taux</value>
         <value xml:lang="hi_IN">मूल्य</value>
         <value xml:lang="it">Tassi</value>
+        <value xml:lang="nl">Tarieven</value>
         <value xml:lang="pt">Tarifas</value>
         <value xml:lang="zh">税率</value>
         <value xml:lang="zh_TW">稅率</value>
@@ -10557,6 +10588,7 @@
         <value xml:lang="de">Kontenabstimmung</value>
         <value xml:lang="en">Reconciliation</value>
         <value xml:lang="hi_IN">मिलाप</value>
+        <value xml:lang="nl">Afstemming</value>
         <value xml:lang="pt">Reconciliação</value>
         <value xml:lang="zh">对账</value>
         <value xml:lang="zh_TW">調節</value>
@@ -10772,6 +10804,7 @@
     <property key="AccountingSagePayPaymentError">
         <value xml:lang="en">Problem at SagePay</value>
         <value xml:lang="it">Problemi di SagePay</value>
+        <value xml:lang="nl">Probleem bij SagePay</value>
         <value xml:lang="zh">SagePay出错</value>
     </property>
     <property key="AccountingSagePayPaymentInvalidInformationPassed">
@@ -10792,6 +10825,7 @@
     <property key="AccountingSagePayPaymentRefunded">
         <value xml:lang="en">Payment Refunded</value>
         <value xml:lang="it">Pagamento rimborsato</value>
+        <value xml:lang="nl">Betaling teruggewezen</value>
         <value xml:lang="zh">支付已退</value>
     </property>
     <property key="AccountingSagePayPaymentReleaseRequestMalformed">
@@ -10903,6 +10937,7 @@
         <value xml:lang="de">Vertreter</value>
         <value xml:lang="en">Sales Agents</value>
         <value xml:lang="hi_IN">विक्रय दलाल</value>
+        <value xml:lang="nl">Vertegenwoordiger</value>
         <value xml:lang="pt">Agentes de Vendas</value>
         <value xml:lang="zh">销售代理</value>
         <value xml:lang="zh_TW">銷售代理</value>
@@ -10926,6 +10961,7 @@
         <value xml:lang="de">Verkaufsrechnungen</value>
         <value xml:lang="en">Sales Invoices</value>
         <value xml:lang="hi_IN">विक्रय चालान </value>
+        <value xml:lang="nl">Verkoopfacturen</value>
         <value xml:lang="pt">Faturas</value>
         <value xml:lang="zh">销售发票</value>
         <value xml:lang="zh_TW">銷售發票</value>
@@ -10948,23 +10984,27 @@
     <property key="AccountingSecurityPayNotProperlyConfigurated">
         <value xml:lang="en">ERROR: Getting SecurePay property configuration</value>
         <value xml:lang="it">ERRORE: Ricavando la configurazione di SecurePay</value>
+        <value xml:lang="nl">ERROR: ophalen SecurePay configuratie</value>
         <value xml:lang="zh">错误:获取SecurePay属性设置时</value>
     </property>
     <property key="AccountingSecurityPayPaymentWasNotSent">
         <value xml:lang="en">Payment was not sent to server.</value>
         <value xml:lang="it">Pagamento non è stato inviato al server.</value>
+        <value xml:lang="nl">Betaling is niet naar de server verzonden</value>
         <value xml:lang="zh">支付没有发送到服务器。</value>
     </property>
     <property key="AccountingSelectAction">
         <value xml:lang="en">Select Action</value>
         <value xml:lang="fr">Choisir une action</value>
         <value xml:lang="hi_IN">कार्य चुनें</value>
+        <value xml:lang="nl">Actie selecteren</value>
         <value xml:lang="pt">Selecionar Ação</value>
         <value xml:lang="zh">选择操作</value>
     </property>
     <property key="AccountingSelectPartiesForCommissionInvoice">
         <value xml:lang="en">Select The Parties For Commission Invoice</value>
         <value xml:lang="hi_IN">दलाली चालान के लिए पार्टियों चुनें</value>
+        <value xml:lang="nl">Partijen voor commisiefactuur selecteren</value>
         <value xml:lang="pt">Selecionar participantes para fatura de Comissão</value>
         <value xml:lang="zh">为佣金发票选择会员</value>
     </property>
@@ -11438,6 +11478,7 @@
     <property key="AccountingTaxCannotCalculate">
         <value xml:lang="en">Cannot calculate tax, no shipping or.......</value>
         <value xml:lang="it">Non è possibile calcolare le tasse, nessuna spedizione o.......</value>
+        <value xml:lang="nl">Belasting kan niet berekend worden, geen transport of .....</value>
         <value xml:lang="pt">Não é possível calcular o imposto, não envio ou .......</value>
         <value xml:lang="zh">无法算税,没有运输或......</value>
     </property>
@@ -11477,6 +11518,7 @@
     <property key="AccountingTermAmount">
         <value xml:lang="en">Term Amount</value>
         <value xml:lang="hi_IN">शर्त राशी</value>
+        <value xml:lang="nl">Conditie bedrag</value>
         <value xml:lang="pt">Quantia do prazo</value>
         <value xml:lang="zh">期金额</value>
     </property>
@@ -11512,6 +11554,7 @@
     <property key="AccountingTheBalanceOfLastYear">
         <value xml:lang="en">The balance of last year</value>
         <value xml:lang="hi_IN">पिछले वर्ष का शेष</value>
+        <value xml:lang="nl">Saldo vorig jaar</value>
         <value xml:lang="pt">O saldo do ano passado</value>
         <value xml:lang="zh">上年余额</value>
     </property>
@@ -11626,47 +11669,55 @@
     <property key="AccountingTotalCashBalance">
         <value xml:lang="en">Total Cash Balance</value>
         <value xml:lang="hi_IN">कुल नकदी शेष</value>
+        <value xml:lang="nl">Totaal saldo cash</value>
         <value xml:lang="pt">Saldo Total em caixa</value>
         <value xml:lang="zh">现金余额合计</value>
     </property>
     <property key="AccountingTotalClosingCashBalance">
         <value xml:lang="en">Total Closing Cash Balance</value>
         <value xml:lang="hi_IN">कुल बंद नकदी शेष</value>
+        <value xml:lang="nl">Totaal eindbalans cash</value>
         <value xml:lang="pt">Saldo Total de Caixa de Encerramento</value>
         <value xml:lang="zh">期末现金余额</value>
     </property>
     <property key="AccountingTotalCommissionAmount">
         <value xml:lang="en">Total Commission Amount</value>
         <value xml:lang="hi_IN">कुल दलाली राशी</value>
+        <value xml:lang="nl">Totaal bedrag commissies</value>
         <value xml:lang="pt">Quantia Total da Comissão</value>
         <value xml:lang="zh">佣金合计</value>
     </property>
     <property key="AccountingTotalCostCenterAmount">
         <value xml:lang="en">Cost center amount percentage saved successfully</value>
+        <value xml:lang="nl">Percentage kostenplaats succesvol opgeslagen</value>
         <value xml:lang="pt">Porcentagem da Quantia central de custo salva com sucesso</value>
         <value xml:lang="zh">成功保存了费用中心金额百分比</value>
     </property>
     <property key="AccountingTotalCredit_Disbursement">
         <value xml:lang="en">Total Credit(Disbursement)</value>
         <value xml:lang="hi_IN">कुल जमा</value>
+        <value xml:lang="nl">Totaal Credit (betalingen)</value>
         <value xml:lang="pt">Crédito Total (Desembolso)</value>
         <value xml:lang="zh">贷方合计(支出)</value>
     </property>
     <property key="AccountingTotalCurrentAssetBalance">
         <value xml:lang="en">Total Current Asset Balance</value>
         <value xml:lang="hi_IN">कà¥&#129;ल चालू समà¥&#141;पतà¥&#141;ति राशी</value>
+        <value xml:lang="nl">Totaal vlottende activa</value>
         <value xml:lang="pt">Total do Balanço Patrimonial atual</value>
         <value xml:lang="zh">流动资产余额合计</value>
     </property>
     <property key="AccountingTotalDebit_Receipts">
         <value xml:lang="en">Total Debit(Receipts)</value>
         <value xml:lang="hi_IN">कुल नामे</value>
+        <value xml:lang="nl">Totaal Debet (ontvangsten)</value>
         <value xml:lang="pt">Débito Total (Recibos)</value>
         <value xml:lang="zh">借方合计(收入)</value>
     </property>
     <property key="AccountingTotalEndingCashBalance">
         <value xml:lang="en">Total Ending Cash Balance</value>
         <value xml:lang="hi_IN">कुल अंतिम नकदी शेष</value>
+        <value xml:lang="nl">Totaal eindbalans cash</value>
         <value xml:lang="pt">Saldo Total Final de Caixa</value>
         <value xml:lang="zh">期末现金余额合计</value>
     </property>
@@ -11699,48 +11750,56 @@
     <property key="AccountingTotalNetSales">
         <value xml:lang="en">Total Net Sales</value>
         <value xml:lang="hi_IN">कुल शुद्ध विक्रय</value>
+        <value xml:lang="nl">Totaal netto verkopen</value>
         <value xml:lang="pt">Total das vendas líquidas</value>
         <value xml:lang="zh">净销售合计</value>
     </property>
     <property key="AccountingTotalNumberOfOrders">
         <value xml:lang="en">Total Number of Orders</value>
         <value xml:lang="hi_IN">कुल आदेशों की संख्या</value>
+        <value xml:lang="nl">Totaal aantal orders</value>
         <value xml:lang="pt">Número total de pedidos</value>
         <value xml:lang="zh">订单数量合计</value>
     </property>
     <property key="AccountingTotalOfTheCurrentMonth">
         <value xml:lang="en">Total of the current month</value>
         <value xml:lang="hi_IN">चालू माह के कुल</value>
+        <value xml:lang="nl">Totaal van huidige maand</value>
         <value xml:lang="pt">Total do mês atual</value>
         <value xml:lang="zh">当月合计</value>
     </property>
     <property key="AccountingTotalOfYearToDate">
         <value xml:lang="en">Total of Year To Date</value>
         <value xml:lang="hi_IN">वर्ष से दिनांक का कुल</value>
+        <value xml:lang="nl">Totaal van jaar tot nu</value>
         <value xml:lang="pt">Total do Ano até o momento</value>
         <value xml:lang="zh">当年合计</value>
     </property>
     <property key="AccountingTotalOpeningCashBalance">
         <value xml:lang="en">Total Opening Cash Balance</value>
         <value xml:lang="hi_IN">कुल अथ नकदी शेष</value>
+        <value xml:lang="nl">Totaal openingsbalans cash</value>
         <value xml:lang="pt">Saldo de Abertura de Caixa Total</value>
         <value xml:lang="zh">期初现金余额合计</value>
     </property>
     <property key="AccountingTotalOperationalCashBalance">
         <value xml:lang="en">Total Operational Cash Balance</value>
         <value xml:lang="hi_IN">कà¥&#129;ल कà¥&#141;रियाशील नकदी</value>
+        <value xml:lang="nl">Totaal operationele balans cash</value>
         <value xml:lang="pt">Saldo de Caixa Operacional Total</value>
         <value xml:lang="zh">现金余额合计</value>
     </property>
     <property key="AccountingTotalPeriodCashBalance">
         <value xml:lang="en">Total Period Cash Balance</value>
         <value xml:lang="hi_IN">&#129;कुल अवधि नकदी शेष</value>
+        <value xml:lang="nl">Totaal periode balans cash</value>
         <value xml:lang="pt">Saldo Total do período em caixa</value>
         <value xml:lang="zh">时间段现金余额合计</value>
     </property>
     <property key="AccountingTotalQuantityOnHand">
         <value xml:lang="en">Total Quantity On Hand</value>
         <value xml:lang="hi_IN">कुल मात्रा हाथ पर</value>
+        <value xml:lang="nl">Totaal hoeveelheden onder handen</value>
         <value xml:lang="pt">Total das quantidades disponíveis</value>
         <value xml:lang="zh">现存数量合计</value>
     </property>
@@ -11757,6 +11816,7 @@
     <property key="AccountingTransactionIsAlreadyReconciled">
         <value xml:lang="en">Transaction Is already Reconciled</value>
         <value xml:lang="hi_IN">गतिविधि पहले से ही समझौता है</value>
+        <value xml:lang="nl">Transactie is al afgestemd</value>
         <value xml:lang="pt">Transação já foi reconciliada</value>
         <value xml:lang="zh">交易已经对过账了</value>
     </property>
@@ -11774,6 +11834,7 @@
     <property key="AccountingTransactionTotalsReport">
         <value xml:lang="en">Transaction Totals Report</value>
         <value xml:lang="hi_IN">गतिविधि योग ब्यौरेवार विवरण</value>
+        <value xml:lang="nl">Rapport transatie-totalen</value>
         <value xml:lang="pt">Relatório de Transações totais</value>
         <value xml:lang="zh">交易总额报告</value>
     </property>
@@ -14706,6 +14767,9 @@
         <value xml:lang="pt">Nova categoria de Conta Razão</value>
         <value xml:lang="zh">新建总账账户分类</value>
     </property>
+    <property key="FormFieldTitle_NextDepreciationAmount">
+        <value xml:lang="en">Next depreciation amount</value>
+    </property>
     <property key="FormFieldTitle_notApplied">
         <value xml:lang="en">Not Applied</value>
         <value xml:lang="fr">Non alloué</value>
@@ -15828,6 +15892,7 @@
         <value xml:lang="en">Source Id</value>
         <value xml:lang="hi_IN">स्रोत क्रमांक(SourceId)</value>
         <value xml:lang="it">Id sorgente</value>
+        <value xml:lang="nl">Bron ID</value>
         <value xml:lang="pt">Id da fonte</value>
         <value xml:lang="zh">来源标识</value>
         <value xml:lang="zh_TW">來源編號</value>
@@ -16023,7 +16088,7 @@
         <value xml:lang="fr">Valeur du texte</value>
         <value xml:lang="hi_IN">पाठ्य मान</value>
         <value xml:lang="it">Testo Valore</value>
-        <value xml:lang="nl">Text Value</value>
+        <value xml:lang="nl">Textwaarde</value>
         <value xml:lang="pt">Valor do Texto</value>
         <value xml:lang="ru">Текстовое значение</value>
         <value xml:lang="th">ค่าตัวอักษร</value>
@@ -16043,6 +16108,7 @@
         <value xml:lang="en">Thru Due Date</value>
         <value xml:lang="fr">Jusqu'à la date d'échéance</value>
         <value xml:lang="hi_IN">अन्तिम दिनांक तक</value>
+        <value xml:lang="nl">Tot vervaldatum</value>
         <value xml:lang="pt">Data de Vencimento do débito</value>
         <value xml:lang="zh">截止日期终于</value>
     </property>
@@ -16050,6 +16116,7 @@
         <value xml:lang="en">Thru Invoice Date</value>
         <value xml:lang="fr">Jusqu'à la date de facture</value>
         <value xml:lang="hi_IN">चालान दिनांक तक</value>
+        <value xml:lang="nl">Tot factuurdatum</value>
         <value xml:lang="pt">Data de vencimento da fatura</value>
         <value xml:lang="zh">发票截止日期</value>
     </property>
@@ -16077,6 +16144,7 @@
         <value xml:lang="fr">Réf de feuille d'activité d'un acteur</value>
         <value xml:lang="hi_IN">Timesheet पार्टी क्रमांक</value>
         <value xml:lang="it">Soggetto Timbratura</value>
+        <value xml:lang="nl">Party ID Urenstaat</value>
         <value xml:lang="pt">ID do participante da folha de horas trabalhadas</value>
         <value xml:lang="zh">工时表会员标识</value>
         <value xml:lang="zh_TW">工時表成員ID</value>
@@ -16129,6 +16197,7 @@
         <value xml:lang="fr">Total alloué</value>
         <value xml:lang="hi_IN">कुल एप्लाइड चालान</value>
         <value xml:lang="it">Totale fattura applicato</value>
+        <value xml:lang="nl">Totaal rekening toegepast</value>
         <value xml:lang="pt">Total da fatura Aplicada</value>
         <value xml:lang="zh">全部已开发票</value>
         <value xml:lang="zh_TW">全部已開發票</value>
@@ -16138,6 +16207,7 @@
         <value xml:lang="fr">Montant total</value>
         <value xml:lang="hi_IN">कुल राशि</value>
         <value xml:lang="it">Importo Totale</value>
+        <value xml:lang="nl">Totaal bedrag</value>
         <value xml:lang="pt">Quantia Total</value>
         <value xml:lang="zh">金额合计</value>
         <value xml:lang="zh_TW">金額合計</value>
@@ -16145,6 +16215,7 @@
     <property key="FormFieldTitle_totalOfCurrentFiscalPeriod">
         <value xml:lang="en">Total of Current Fiscal Period</value>
         <value xml:lang="hi_IN">चालू वित्त वर्ष अवधि का कुल</value>
+        <value xml:lang="nl">Totaal van huidige fiscale period</value>
         <value xml:lang="pt">Total do período fiscal atual</value>
         <value xml:lang="zh">本财年合计</value>
     </property>
@@ -16423,6 +16494,9 @@
         <value xml:lang="pt">Pagamentos de Depósito e Criar lote</value>
         <value xml:lang="zh">存款支付并创建批量处理</value>
     </property>
+    <property key="PageTitleFixedAssetDepreciationHistory">
+        <value xml:lang="en">Deprecation history</value>
+    </property>
     <property key="PageTitleEditAgreement">
         <value xml:lang="de">Vereinbarung ändern</value>
         <value xml:lang="en">Edit Agreement</value>
diff --git a/applications/accounting/data/AccountingPortletData.xml b/applications/accounting/data/AccountingPortletData.xml
index 79f2580..4357a60 100644
--- a/applications/accounting/data/AccountingPortletData.xml
+++ b/applications/accounting/data/AccountingPortletData.xml
@@ -74,4 +74,11 @@
         screenLocation="component://accounting/widget/InvoiceScreens.xml"
         description="List Invoices for a certain supplier who is just logged in"/>
     <PortletPortletCategory portalPortletId="ListSupplierInvoices" portletCategoryId="ACCOUNTING"/>
+
+    <PortalPortlet portalPortletId="ListPayments" portletName="List Customer Payments"
+        screenName="ListPayments"
+        screenLocation="component://accounting/widget/PaymentScreens.xml"
+        description="List of Payments"
+        editFormName="EditPaymentAttributes" editFormLocation="component://accounting/widget/PaymentForms.xml"/>
+    <PortletPortletCategory portalPortletId="ListPayments" portletCategoryId="ACCOUNTING"/>
 </entity-engine-xml>
diff --git a/applications/accounting/data/DemoGlSetupData.xml b/applications/accounting/data/DemoGlSetupData.xml
index d8fee7b..82b40ff 100644
--- a/applications/accounting/data/DemoGlSetupData.xml
+++ b/applications/accounting/data/DemoGlSetupData.xml
@@ -398,7 +398,7 @@
     <CustomTimePeriod organizationPartyId="Company" customTimePeriodId="6012" periodTypeId="FISCAL_QUARTER" fromDate="2010-04-01" thruDate="2010-07-01" isClosed="N" periodNum="3" periodName="2010/Q2" parentPeriodId="6010"/>
     <CustomTimePeriod organizationPartyId="Company" customTimePeriodId="6013" periodTypeId="FISCAL_QUARTER" fromDate="2010-07-01" thruDate="2010-10-01" isClosed="N" periodNum="4" periodName="2010/Q3" parentPeriodId="6010"/>
     <CustomTimePeriod organizationPartyId="Company" customTimePeriodId="6014" periodTypeId="FISCAL_QUARTER" fromDate="2010-10-01" thruDate="2011-01-01" isClosed="N" periodNum="5" periodName="2010/Q4" parentPeriodId="6010"/>
-    <CustomTimePeriod organizationPartyId="Company" customTimePeriodId="6015" periodTypeId="FISCAL_YEAR" fromDate="2011-01-01" thruDate="2012-01-01" isClosed="N" periodNum="1" periodName="2011"/>
+    <CustomTimePeriod organizationPartyId="Company" customTimePeriodId="6015" periodTypeId="FISCAL_YEAR" fromDate="2011-01-01" thruDate="2020-01-01" isClosed="N" periodNum="1" periodName="2011-2020"/>
     <CustomTimePeriod organizationPartyId="Company" customTimePeriodId="6016" periodTypeId="FISCAL_QUARTER" fromDate="2011-01-01" thruDate="2011-04-01" isClosed="N" periodNum="2" periodName="2011/Q1" parentPeriodId="6015"/>
     <CustomTimePeriod organizationPartyId="Company" customTimePeriodId="6017" periodTypeId="FISCAL_QUARTER" fromDate="2011-04-01" thruDate="2011-07-01" isClosed="N" periodNum="3" periodName="2011/Q2" parentPeriodId="6015"/>
     <CustomTimePeriod organizationPartyId="Company" customTimePeriodId="6018" periodTypeId="FISCAL_QUARTER" fromDate="2011-07-01" thruDate="2011-10-01" isClosed="N" periodNum="4" periodName="2011/Q3" parentPeriodId="6015"/>
diff --git a/applications/accounting/data/DemoPaymentsInvoices.xml b/applications/accounting/data/DemoPaymentsInvoices.xml
index 3d03dec..a26feb4 100644
--- a/applications/accounting/data/DemoPaymentsInvoices.xml
+++ b/applications/accounting/data/DemoPaymentsInvoices.xml
@@ -159,8 +159,8 @@
     <!-- Demo invoice data for sales invoice with INVOICE_PAID status -->
     <Party partyId="DemoCustAgent"/>
     <PartyRole partyId="DemoCustAgent" roleTypeId="SALES_REP"/>
-    <Product productId="WG-9943"/>
-    <Product productId="WG-9943-B3"/>
+    <Product productId="WG-9943" productTypeId="FINISHED_GOOD"/>
+    <Product productId="WG-9943-B3" productTypeId="FINISHED_GOOD"/>
 
     <Agreement agreementId="8000" partyIdFrom="Company" partyIdTo="DemoCustAgent" agreementTypeId="COMMISSION_AGREEMENT" description="Commission Agreement with DemoCustAgent"/>
     <AgreementItem agreementId="8000" agreementItemSeqId="0001" agreementItemTypeId="AGREEMENT_COMMISSION" currencyUomId="USD" agreementText="Commission in USD"/>
diff --git a/applications/accounting/entitydef/entitymodel.xml b/applications/accounting/entitydef/entitymodel.xml
index b4b6fca..d3a18a5 100644
--- a/applications/accounting/entitydef/entitymodel.xml
+++ b/applications/accounting/entitydef/entitymodel.xml
@@ -3904,7 +3904,7 @@
     </view-entity>
 
   <entity entity-name="RateType" package-name="org.ofbiz.accounting.rate"
-    title="Rate Type Entity">
+    title="Rate Type Entity" default-resource-name="AccountingEntityLabels">
     <field name="rateTypeId" type="id-ne"></field>
     <field name="description" type="description"></field>
     <prim-key field="rateTypeId"/>
diff --git a/applications/accounting/script/org/ofbiz/accounting/finaccount/FinAccountServices.xml b/applications/accounting/script/org/ofbiz/accounting/finaccount/FinAccountServices.xml
index 65e3be3..d72e88c 100644
--- a/applications/accounting/script/org/ofbiz/accounting/finaccount/FinAccountServices.xml
+++ b/applications/accounting/script/org/ofbiz/accounting/finaccount/FinAccountServices.xml
@@ -24,7 +24,7 @@
     <simple-method method-name="getArithmeticSettingsInline" short-description="getArithmeticSettingsInline">
         <property-to-field resource="arithmetic" property="finaccount.decimals" field="roundingDecimals" default="2"/>
         <property-to-field resource="arithmetic" property="finaccount.roundingSimpleMethod" field="roundingMode" default="HalfUp"/>
-        <log level="info" message="Got settings from arithmetic.properties: roundingDecimals=${roundingDecimals}, roundingMode=${roundingMode}"/>
+        <log level="verbose" message="Got settings from arithmetic.properties: roundingDecimals=${roundingDecimals}, roundingMode=${roundingMode}"/>
     </simple-method>
 
     <simple-method method-name="createFinAccount" short-description="Create a Financial Account">
@@ -366,7 +366,7 @@
 
         <!-- Okay, now just store the results -->
         <entity-one entity-name="FinAccount" value-field="finAccount"/>
-        <log level="info" message="In updateFinAccountBalancesFromTrans/Auth updating FinAccount with ID [${finAccountId}] with actualBalance: ${finAccount.actualBalance} -> ${actualBalanceSum}, and availableBalance: ${finAccount.availableBalance} -> ${availableBalanceSum}"/>
+        <log level="verbose" message="In updateFinAccountBalancesFromTrans/Auth updating FinAccount with ID [${finAccountId}] with actualBalance: ${finAccount.actualBalance} -> ${actualBalanceSum}, and availableBalance: ${finAccount.availableBalance} -> ${availableBalanceSum}"/>
         <set field="finAccount.actualBalance" from-field="actualBalanceSum"/>
         <set field="finAccount.availableBalance" from-field="availableBalanceSum"/>
         <store-value value-field="finAccount"/>
diff --git a/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml b/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml
index e36096c..858b73b 100644
--- a/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml
+++ b/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml
@@ -2321,6 +2321,8 @@
             <set field="createAcctgTransAndEntriesInMap.glFiscalTypeId" value="ACTUAL"/>
             <set field="createAcctgTransAndEntriesInMap.acctgTransTypeId" value="SALES_INVOICE"/>
             <set field="createAcctgTransAndEntriesInMap.invoiceId" from-field="parameters.invoiceId"/>
+            <set field="createAcctgTransAndEntriesInMap.partyId" from-field="invoice.partyId"/>
+            <set field="createAcctgTransAndEntriesInMap.roleTypeId" value="BILL_TO_CUSTOMER"/>
             <set field="createAcctgTransAndEntriesInMap.acctgTransEntries" from-field="acctgTransEntries"/>
             <set field="createAcctgTransAndEntriesInMap.transactionDate" from-field="invoice.invoiceDate"/>
             <call-service service-name="createAcctgTransAndEntries" in-map-name="createAcctgTransAndEntriesInMap">
diff --git a/applications/accounting/script/org/ofbiz/accounting/test/AutoAcctgTransTests.xml b/applications/accounting/script/org/ofbiz/accounting/test/AutoAcctgTransTests.xml
deleted file mode 100644
index d27bb4d..0000000
--- a/applications/accounting/script/org/ofbiz/accounting/test/AutoAcctgTransTests.xml
+++ /dev/null
@@ -1,698 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-
-<simple-methods xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-        xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/simple-methods.xsd">
-
-    <!-- Test case for Accounting Transaction on Purchase -->
-    <simple-method method-name="testAcctgTransOnPoReceipts" short-description="Test case for Accounting Transaction on Receipts of Purchase Order." login-required="false">
-        <!-- Precondition : shipment is created from supplier and order items are issued  -->
-        <!-- create a purchase order using following:
-             Supplier : DemoSupplier
-             Item     : WG-1111
-             Quantity : 10 -->
-
-        <!-- Post condition : Credit in account 214000 - UNINVOICED ITEM RECEIPT amount = grand total of order.
-                              Debit in account 140000- INVENTORY amount = grand total of order.  -->
-
-        <!-- set few variables so that they can be changed easily to test with different values -->
-        <set field="orderId" value="DEMO10091"/>
-        <set field="productId" value="GZ-2644"/>
-        <set field="orderItemSeqId" value="00001"/>
-        <set field="shipmentId" value="9999"/>
-
-        <entity-one entity-name="UserLogin" value-field="userLogin">
-            <field-map field-name="userLoginId" value="system"/>
-        </entity-one>
-        <set field="serviceCtx.userLogin" from-field="userLogin"/>
-        <set field="serviceCtx.inventoryItemTypeId" value="NON_SERIAL_INV_ITEM"/>
-        <set field="serviceCtx.productId" from-field="productId"/>
-        <set field="serviceCtx.facilityId" value="WebStoreWarehouse"/>
-        <set field="serviceCtx.quantityAccepted" value="5" type="BigDecimal"/>
-        <set field="serviceCtx.quantityRejected" value="0" type="BigDecimal"/>
-        <set field="serviceCtx.shipmentId" from-field="shipmentId"/>
-        <set field="serviceCtx.orderId" from-field="orderId"/>
-        <set field="serviceCtx.orderItemSeqId" from-field="orderItemSeqId"/>
-
-        <call-service service-name="receiveInventoryProduct" in-map-name="serviceCtx"/>
-
-        <entity-and list="acctgTransList" entity-name="AcctgTrans">
-            <field-map field-name="shipmentId"/>
-        </entity-and>
-        <first-from-list entry="acctgTrans" list="acctgTransList"/>
-
-        <assert><if-compare field="acctgTrans.glJournalId" operator="not-equals" value="ERROR_JOURNAL"/></assert>
-
-        <get-related value-field="acctgTrans" relation-name="AcctgTransEntry" list="acctgTransEntryList"/>
-        <set field="productFilter.productId" from-field="productId"/>
-        <filter-list-by-and list="acctgTransEntryList" map="productFilter" to-list="acctgTransEntryList"/>
-
-        <assert><not><if-empty field="acctgTransEntryList"/></not></assert>
-
-        <call-simple-method method-name="UtilCheckEntriesBalance"/>
-
-        <iterate list="acctgTransEntryList" entry="acctgTransEntry">
-            <if-compare field="acctgTransEntry.debitCreditFlag" operator="equals" value="C">
-                <assert>
-                    <if-compare field="acctgTransEntry.glAccountTypeId" operator="equals" value="UNINVOICED_SHIP_RCPT"/>
-                    <if-compare field="acctgTransEntry.glAccountId" operator="equals" value="214000"/>
-                </assert>
-            <else>
-                <if-compare field="acctgTransEntry.debitCreditFlag" operator="equals" value="D">
-                    <assert>
-                        <if-compare field="acctgTransEntry.glAccountTypeId" operator="equals" value="INVENTORY_ACCOUNT"/>
-                        <if-compare field="acctgTransEntry.glAccountId" operator="equals" value="140000"/>
-                    </assert>
-                </if-compare>
-            </else>
-            </if-compare>
-        </iterate>
-        <check-errors/>
-    </simple-method>
-
-    <simple-method method-name="testAcctgTransOnEditPoInvoice" short-description="Test case for Purchase Invoices: editing, adding taxes and shipping charges and posting to GL" login-required="false">
-        <!-- Precondition: To the Purchase Invoice created add taxes and two different shipping charges
-            1. for taxes: set "Invoice Item Type" = "Invoice Sales Tax" and "Unit Price" = 10$
-            2. for the first shipping charge: set "Invoice Item Type" = "Invoice Shipping And Handling" and "Unit Price" = 5$
-            3. for the second shipping charge: set "Invoice Item Type" = "Invoice Shipping And Handling", set "Override Gl Account Id" = "516100" and "Unit Price" = 5$
-        -->
-        <!-- Post condition: When status is set to ready, an accounting transaction is automatically posted to the GL:
-            * Credit; in account 210000 - "ACCOUNTS PAYABLE"; amount: 290$
-            * Debit; in account 214000 - "UNINVOICED ITEM RECEIPTS"; amount: 270$
-            * Debit; in account 516100 - "PURCHASE ORDER ADJUSTMENTS"; amount: 10$
-            * Debit; in account 510000 - "FREIGHT IN"; amount: 5$
-            * Debit; in account 516100 - "PURCHASE ORDER ADJUSTMENTS"; amount: 5$
-        -->
-
-        <set field="orderId" value="DEMO10091"/>
-        <entity-and list="orderItemBillings" entity-name="OrderItemBilling">
-            <field-map field-name="orderId"/>
-        </entity-and>
-        <first-from-list entry="orderItemBilling" list="orderItemBillings"/>
-        <entity-one entity-name="UserLogin" value-field="userLogin">
-            <field-map field-name="userLoginId" value="system"/>
-        </entity-one>
-        <set field="serviceCtx.userLogin" from-field="userLogin"/>
-        <set field="serviceCtx.statusId" value="INVOICE_READY"/>
-        <set field="serviceCtx.invoiceId" from-field="orderItemBilling.invoiceId"/>
-        <call-service service-name="setInvoiceStatus" in-map-name="serviceCtx"/>
-        <entity-one entity-name="Invoice" value-field="invoice">
-            <field-map field-name="invoiceId" from-field="orderItemBilling.invoiceId"/>
-        </entity-one>
-        <get-related value-field="invoice" relation-name="AcctgTrans" list="acctgTransList"/>
-        <first-from-list list="acctgTransList" entry="acctgTrans"/>
-
-        <assert><if-compare field="acctgTrans.glJournalId" operator="not-equals" value="ERROR_JOURNAL"/></assert>
-
-        <get-related value-field="acctgTrans" relation-name="AcctgTransEntry" list="acctgTransEntryList"/>
-
-        <assert><not><if-empty field="acctgTransEntryList"/></not></assert>
-
-        <call-simple-method method-name="UtilCheckEntriesBalance"/>
-
-        <iterate list="acctgTransEntryList" entry="acctgTransEntry">
-            <if-compare field="acctgTransEntry.debitCreditFlag" operator="equals" value="C">
-                <assert>
-                    <if-compare field="acctgTransEntry.glAccountTypeId" operator="equals" value="ACCOUNTS_PAYABLE"/>
-                    <if-compare field="acctgTransEntry.glAccountId" operator="equals" value="210000"/>
-                </assert>
-            </if-compare>
-        </iterate>
-        <check-errors/>
-    </simple-method>
-
-    <simple-method method-name="testAcctgTransOnPaymentSentToSupplier" short-description="Test case for Payment sent to supplier for purchase invoice." login-required="false">
-        <!--
-            Precondition: New payment is created for: supplierId = "DemoSupplier", "Payment Type ID" = "Vendor Payment" and
-                          a proper "Payment Method Type" (e.g. "Electronic Funds Transfer"), amount = $290
-
-            Post condition: On payment's status is sent: a double-entry accounting transaction is automatically posted to the GL:
-                * Credit; in account 111100 - "GENERAL CHECKING ACCOUNT"; amount: 290$; however this depends on the "Payment method type" selected;
-                * Debit; in account 216000 - "ACCOUNTS PAYABLE - UNAPPLIED PAYMENTS"; amount: 290$
-         -->
-
-        <set field="paymentId" value="9000"/>
-        <entity-one entity-name="UserLogin" value-field="userLogin">
-            <field-map field-name="userLoginId" value="system"/>
-        </entity-one>
-        <set field="serviceCtx.userLogin" from-field="userLogin"/>
-        <set field="serviceCtx.paymentId" from-field="paymentId"/>
-        <set field="serviceCtx.statusId" value="PMNT_SENT"/>
-
-        <call-service service-name="setPaymentStatus" in-map-name="serviceCtx"/>
-        <entity-one entity-name="Payment" value-field="payment">
-            <field-map field-name="paymentId" from-field="paymentId"/>
-        </entity-one>
-        <get-related value-field="payment" relation-name="AcctgTrans" list="acctgTransList"/>
-        <first-from-list list="acctgTransList" entry="acctgTrans"/>
-
-        <assert><if-compare field="acctgTrans.glJournalId" operator="not-equals" value="ERROR_JOURNAL"/></assert>
-
-        <get-related value-field="acctgTrans" relation-name="AcctgTransEntry" list="acctgTransEntryList"/>
-
-        <assert><not><if-empty field="acctgTransEntryList"/></not></assert>
-
-        <call-simple-method method-name="UtilCheckEntriesBalance"/>
-
-        <iterate list="acctgTransEntryList" entry="acctgTransEntry">
-            <if-compare field="acctgTransEntry.debitCreditFlag" operator="equals" value="C">
-                <assert>
-                    <if-compare field="acctgTransEntry.glAccountId" operator="equals" value="111100"/>
-                </assert>
-            <else>
-                <if-compare field="acctgTransEntry.debitCreditFlag" operator="equals" value="D">
-                    <assert>
-                        <if-compare field="acctgTransEntry.glAccountTypeId" operator="equals" value="ACCPAYABLE_UNAPPLIED"/>
-                        <if-compare field="acctgTransEntry.glAccountId" operator="equals" value="216000"/>
-                    </assert>
-                </if-compare>
-            </else>
-            </if-compare>
-        </iterate>
-        <check-errors/>
-    </simple-method>
-
-    <!-- Test case for Accounting Transaction on Sales -->
-    <simple-method method-name="testAcctgTransForSalesOrderShipments" short-description="Creation and Shipments of sales order" login-required="false">
-        <!-- Precondition :
-             1. create a sales order
-             2. from the order view screen, approve the order
-             3. from the order view screen, create a shipment to the customer (click on "New Shipment For Ship Group" and then click on the "Update" button in the next screen)
-        -->
-        <!-- Following process is tested by test case:
-             1. issue (assign) the order items to the shipment: select the "Order Items" tab and then click on "Issue All"; this action will generate and post to the GL the accounting transaction for the items taken from the warehouse and ready to be shipped
-        -->
-        <!-- Post condition: all order items will be issued and it will generate and post to the GL the accounting transaction for the items taken from the warehouse and ready to be shipped
-              * Credit; in account:140000 - Account Type:"INVENTORY_ACCOUNT"
-              * Debit; in account:500000 - Account Type:"COGS_ACCOUNT"
-        -->
-
-        <set field="shipmentId" value="9998"/>
-        <set field="orderId" value="DEMO10090"/>
-        <set field="shipGroupSeqId" value="00001"/>
-        <set field="orderItemSeqId" value="00001"/>
-        <set field="inventoryItemId" value="9001"/>
-        <set field="quantity" value="2" type="BigDecimal"/>
-        <set field="productId" value="GZ-2644"/>
-
-        <entity-one entity-name="UserLogin" value-field="userLogin" auto-field-map="false">
-            <field-map field-name="userLoginId" value="system"/>
-        </entity-one>
-        <set field="serviceCtx.userLogin" from-field="userLogin"/>
-        <set field="serviceCtx.shipmentId" from-field="shipmentId"/>
-        <set field="serviceCtx.orderId" from-field="orderId"/>
-        <set field="serviceCtx.shipGroupSeqId" from-field="shipGroupSeqId"/>
-        <set field="serviceCtx.orderItemSeqId" from-field="orderItemSeqId"/>
-        <set field="serviceCtx.inventoryItemId" from-field="inventoryItemId"/>
-        <set field="serviceCtx.quantity" from-field="quantity"/>
-        <call-service service-name="issueOrderItemShipGrpInvResToShipment" in-map-name="serviceCtx"/>
-
-        <entity-condition list="acctgTransList" entity-name="AcctgTrans">
-            <condition-expr field-name="shipmentId" from-field="shipmentId"/>
-            <order-by field-name="-postedDate"/>
-        </entity-condition>
-        <first-from-list entry="acctgTrans" list="acctgTransList"/>
-
-        <assert><if-compare field="acctgTrans.glJournalId" operator="not-equals" value="ERROR_JOURNAL"/></assert>
-
-        <get-related list="acctgTransEntryList" relation-name="AcctgTransEntry" value-field="acctgTrans"/>
-
-        <assert><not><if-empty field="acctgTransEntryList"/></not></assert>
-
-        <call-simple-method method-name="UtilCheckEntriesBalance"/>
-
-        <iterate list="acctgTransEntryList" entry="acctgTransEntry">
-            <if-compare field="acctgTransEntry.debitCreditFlag" operator="equals" value="C">
-                <assert>
-                    <if-compare field="acctgTransEntry.glAccountTypeId" operator="equals" value="INVENTORY_ACCOUNT"/>
-                    <if-compare field="acctgTransEntry.glAccountId" operator="equals" value="140000"/>
-                </assert>
-            <else>
-                <if-compare field="acctgTransEntry.debitCreditFlag" operator="equals" value="D">
-                    <assert>
-                        <if-compare field="acctgTransEntry.glAccountTypeId" operator="equals" value="COGS_ACCOUNT"/>
-                        <if-compare field="acctgTransEntry.glAccountId" operator="equals" value="500000"/>
-                    </assert>
-                </if-compare>
-            </else>
-            </if-compare>
-        </iterate>
-        <check-errors/>
-    </simple-method>
-
-    <simple-method method-name="testAcctgTransOnSalesInvoice" short-description="Test case for Accounting Transaction for sales invoice" login-required="false">
-        <!-- Precondition:
-            1. Create a sales order
-            2. From the order view screen, approve the order
-            3. From the order view screen, create a shipment to the customer (click on "New Shipment For Ship Group" and then click on the "Update" button in the next screen)
-            4. Issue the order items to the shipment: select the "Order Items" tab and then click on "Issue All."
-            5. From the shipment detail screen of the shipment created in the previous step (there is a link to it from the order detail screen), set the status of the shipment to "pack"(Click on "Edit" and then from statusId drop down select statusId = "Pack" and then click update); this action will generate a sales invoice
-        -->
-        <!-- Following process is tested by test case:
-             1. Go to the invoice detail screen (there is a link to the invoice from the order detail screen) and click on the "set status to ready"; this action will generate and post to the GL the accounting transaction for the sales invoice
-        -->
-        <!-- Post condition: "Set status to ready"; This action will generate and post to the GL the accounting transaction for the sales invoice
-              * Credit; in account=400000 - Account Type="SALES_ACCOUNT"
-              * Debit; in  account=120000 - Account Type="ACCOUNTS_RECEIVABLE"
-        -->
-        <!-- Note: The above notes seem to assume that you are going to manually follow the preconditions above before running this test.
-                   Instead the test will now use order DEMO10090 which currently preconditions 1-4 fulfilled, and we'll then update the
-                   shipment to the packed status (precondition 4).  Additionally it doesn't seem to be necessary to set the invoice status
-                   to ready because the invoice is created in that state.
-        -->
-        
-        <entity-one entity-name="UserLogin" value-field="userLogin">
-            <field-map field-name="userLoginId" value="system"/>
-        </entity-one>
-
-        <set field="serviceCtx.userLogin"  from-field="userLogin"/>
-        <set field="serviceCtx.shipmentId" value="9998"/>
-        <set field="serviceCtx.statusId" value="SHIPMENT_PACKED"/>
-        <call-service service-name="updateShipment" in-map-name="serviceCtx"/>
-
-        <entity-condition list="shipmentItemBillings" entity-name="ShipmentItemBilling">
-            <condition-expr field-name="shipmentId" value="9998"/>
-            <order-by field-name="-createdStamp"/>
-        </entity-condition>
-        <first-from-list entry="shipmentItemBilling" list="shipmentItemBillings"/>
-        <set field="invoiceId" from-field="shipmentItemBilling.invoiceId"/>
-
-        <entity-one entity-name="Invoice" value-field="invoice">
-            <field-map field-name="invoiceId" from-field="invoiceId"/>
-        </entity-one>
-        <get-related value-field="invoice" relation-name="AcctgTrans" list="acctgTransList"/>
-
-        <!-- Check the invoice transaction -->
-        <set field="acctgTransFilter.acctgTransTypeId" value="SALES_INVOICE"/>
-        <filter-list-by-and to-list="salesAcctgTransList" list="acctgTransList" map="acctgTransFilter"/>
-        <first-from-list entry="salesAcctgTrans" list="salesAcctgTransList"/>
-
-        <assert><if-compare field="salesAcctgTrans.glJournalId" operator="not-equals" value="ERROR_JOURNAL"/></assert>
-
-        <get-related value-field="salesAcctgTrans" relation-name="AcctgTransEntry" list="acctgTransEntryList"/>
-
-        <assert><not><if-empty field="acctgTransEntryList"/></not></assert>
-
-        <call-simple-method method-name="UtilCheckEntriesBalance"/>
-
-        <set field="acctgTransEntryFilter.glAccountTypeId" value="ACCOUNTS_RECEIVABLE"/>
-        <set field="acctgTransEntryFilter.glAccountId" value="120000"/>
-        <filter-list-by-and list="acctgTransEntryList" to-list="accountsReceivableEntries" map="acctgTransEntryFilter"/>
-        <assert><not><if-empty field="accountsReceivableEntries"></if-empty></not></assert>
-
-        <clear-field field="acctgTransEntryFilter"/>
-        <set field="acctgTransEntryFilter.glAccountId" value="400000"/>
-        <filter-list-by-and list="acctgTransEntryList" to-list="salesAccountEntries" map="acctgTransEntryFilter"/>
-        <assert><not><if-empty field="salesAccountEntries"></if-empty></not></assert>
-
-        <!-- Check the payment transaction -->
-        <clear-field field="acctgTransEntryFilter"/>
-        <set field="acctgTransFilter.acctgTransTypeId" value="PAYMENT_APPL"/>
-        <filter-list-by-and to-list="paymentAcctgTransList" list="acctgTransList" map="acctgTransFilter"/>
-        <first-from-list entry="paymentAcctgTrans" list="paymentAcctgTransList"/>
-
-        <assert><if-compare field="paymentAcctgTrans.glJournalId" operator="not-equals" value="ERROR_JOURNAL"/></assert>
-
-        <get-related value-field="paymentAcctgTrans" relation-name="AcctgTransEntry" list="acctgTransEntryList"/>
-
-        <assert><not><if-empty field="acctgTransEntryList"/></not></assert>
-
-        <call-simple-method method-name="UtilCheckEntriesBalance"/>
-
-        <set field="acctgTransEntryFilter.glAccountTypeId" value="ACCOUNTS_RECEIVABLE"/>
-        <set field="acctgTransEntryFilter.glAccountId" value="120000"/>
-        <filter-list-by-and list="acctgTransEntryList" to-list="accountsReceivableEntries" map="acctgTransEntryFilter"/>
-        <assert><not><if-empty field="accountsReceivableEntries"></if-empty></not></assert>
-
-        <check-errors/>
-    </simple-method>
-
-    <simple-method method-name="testAcctgTransOnPaymentReceivedFromCustomer" short-description="Test case on Payment Received from customer for Sales Invoice" login-required="false">
-        <!-- Precondition :-
-            1. Click on the Payment top menu in the Accounting application, then click on the "Create New Payment" link.
-            2. In the "New incoming payment" box, set the customer id in the "From Party ID" field; then set "Payment Type ID" = "Customer Payment" and a proper "Payment Method Type" (e.g. "Electronic Funds Transfer"); then set the "amount" and submit the form
-        -->
-        <!-- Following process is tested by test case:
-             1. From the payment detail screen, when you are ready to post the payment to the GL, click on the "Status to Received" link
-        -->
-        <!-- Post condition: "Status to Received", Received Payments. When you are ready to post the payment to the GL this action will generate and post to the GL the accounting transaction for the items taken from the warehouse and ready to be shipped:
-              * Credit; in glAccountId=126000 - glAccountTypeId="ACCOUNTS_RECEIVABLE - UNAPPLIED PAYMENTS"
-              * Debit; in glAccountId=112000 - glAccountTypeId="UNDEPOSITED_RECEIPTS"
-        -->
-
-        <!-- Creating a payment from scratch rather than using the demo data -->
-        
-        <entity-one entity-name="UserLogin" value-field="userLogin">
-            <field-map field-name="userLoginId" value="system"/>
-        </entity-one>
-        <set field="serviceCtx.userLogin" from-field="userLogin"/>
-
-        <!-- Find a customer -->
-        <entity-and list="customerRoles" entity-name="PartyRole">
-            <field-map field-name="roleTypeId" value="CUSTOMER"/>
-        </entity-and>
-        <first-from-list entry="customerRole" list="customerRoles"/>
-        <set field="serviceCtx.partyIdFrom" from-field="customerRole.partyId"/>
-        <set field="serviceCtx.amount" value="100.00" type="BigDecimal"/>
-        <set field="serviceCtx.partyIdTo" value="Company"/>
-        <set field="serviceCtx.paymentMethodTypeId" value="EFT_ACCOUNT"/>
-        <set field="serviceCtx.paymentTypeId" value="CUSTOMER_PAYMENT"/>
-        <set field="serviceCtx.paymentId" from-field="paymentId"/>
-        <set field="serviceCtx.statusId" value="PMNT_RECEIVED"/>
-        <call-service service-name="createPayment" in-map-name="serviceCtx">
-            <result-to-field result-name="paymentId"/>
-        </call-service>
-
-        <entity-and list="acctgTransList" entity-name="AcctgTrans">
-            <field-map field-name="paymentId"/>
-            <field-map field-name="acctgTransTypeId" value="INCOMING_PAYMENT"/>
-        </entity-and>
-        <first-from-list list="acctgTransList" entry="acctgTrans"/>
-
-        <assert><if-compare field="paymentAcctgTrans.glJournalId" operator="not-equals" value="ERROR_JOURNAL"/></assert>
-
-        <get-related value-field="acctgTrans" relation-name="AcctgTransEntry" list="acctgTransEntryList"/>
-
-        <assert><not><if-empty field="acctgTransEntryList"/></not></assert>
-
-        <call-simple-method method-name="UtilCheckEntriesBalance"/>
-
-        <iterate entry="acctgTransEntry" list="acctgTransEntryList">
-            <if-compare field="acctgTransEntry.debitCreditFlag" operator="equals" value="C">
-               <assert>
-                    <if-compare field="acctgTransEntry.glAccountTypeId" operator="equals" value="ACCREC_UNAPPLIED"/>
-                    <if-compare field="acctgTransEntry.glAccountId" operator="equals" value="126000"/>
-                </assert>
-            </if-compare>
-            <if-compare field="acctgTransEntry.debitCreditFlag" operator="equals" value="D">
-                <assert>
-                    <if-compare field="acctgTransEntry.glAccountId" operator="equals" value="111100"/>
-                </assert>
-            </if-compare>
-        </iterate>
-        <check-errors/>
-    </simple-method>
-
-    <!-- Test case for Accounting Transaction on Manufacturing -->
-    <simple-method  method-name="testCalculateProductCosts" short-description="Product cost test case on estimated standard costs calculation" login-required="false">
-        <set field="serviceCtx.productId" value="PROD_MANUF"/>
-        <set field="serviceCtx.currencyUomId" value="USD"/>
-        <set field="serviceCtx.costComponentTypePrefix" value="EST_STD"/>
-        <entity-one entity-name="UserLogin" value-field="serviceCtx.userLogin">
-            <field-map field-name="userLoginId" value="system"/>
-        </entity-one>
-        <call-service service-name="calculateProductCosts" in-map-name="serviceCtx">
-            <result-to-field result-name="totalCost"/>
-        </call-service>
-        <assert>
-            <if-compare field="totalCost" operator="equals" value="84.00" type="BigDecimal"/>
-        </assert>
-        <check-errors/>
-    </simple-method>
-
-    <simple-method method-name="testAcctgTransOnMaterialIssuance" short-description="Production run test case for material issuance from the warehouse" login-required="false">
-        <!-- Precondition: Inventory is received for following products:
-                 productId = MAT_A_COST, quantity = 4, facilityId = Web Store Warehouse
-                 productId = MAT_B_COST, quantity = 6, facilityId = Web Store Warehouse
-             then new production run is created and then started for following product
-                 productId = PROD_MANUF, quantity = 2, facilityId = Web Store Warehouse
-
-            Post condition:- In entity "AcctgTransEntry" at least two entries will be created for MAT_A_COST
-                 * Credit; in account 141000 - "RAW MATERIALS INVENTORY"; amount: 36$
-                 * Debit; in account 142000 - "WORK IN PROGRESS INVENTORY"; amount: 36$
-            similarly for product MAT_B_COST
-                 * Credit; in account 141000 - "RAW MATERIALS INVENTORY"; amount: 42$
-                 * Debit; in account 142000 - "WORK IN PROGRESS INVENTORY"; amount: 42$ -->
-
-        <!-- Create a production run, TODO: move this to test data so we only have to do the issuance -->
-        <entity-one entity-name="UserLogin" value-field="userLogin">
-            <field-map field-name="userLoginId" value="system"/>
-        </entity-one>
-        <set field="serviceCtx.userLogin" from-field="userLogin"/>
-        <set field="serviceCtx.facilityId" value="WebStoreWarehouse"/>
-        <set field="serviceCtx.pRQuantity" value="2" type="BigDecimal"/>
-        <set field="serviceCtx.productId" value="PROD_MANUF"/>
-        <set field="serviceCtx.startDate" value="${date:nowTimestamp()}" type="Timestamp"/>
-        <set field="serviceCtx.workEffortName" value="ACCTG_TEST_PROD_RUN"/>
-        <call-service service-name="createProductionRun" in-map-name="serviceCtx">
-            <result-to-field result-name="productionRunId"/>
-        </call-service>
-    
-        <clear-field field="serviceCtx"/>
-        <set field="serviceCtx.userLogin" from-field="userLogin"/>
-        <set field="serviceCtx.productionRunId" from-field="productionRunId"/>
-        <set field="serviceCtx.statusId" value="PRUN_DOC_PRINTED"/>
-        <call-service service-name="changeProductionRunStatus" in-map-name="serviceCtx"/>
-
-        <entity-and list="prodTasks" entity-name="WorkEffort">
-            <field-map field-name="workEffortParentId" from-field="productionRunId"/>
-        </entity-and>
-        <first-from-list entry="taskWorkEffort" list="prodTasks"/>
-        <set field="workEffortId" from-field="taskWorkEffort.workEffortId"/>
-        <clear-field field="serviceCtx"/>
-        <set field="serviceCtx.workEffortId" from-field="workEffortId"/>
-        <entity-one entity-name="UserLogin" value-field="serviceCtx.userLogin">
-            <field-map field-name="userLoginId" value="system"/>
-        </entity-one>
-        <call-service service-name="issueProductionRunTask" in-map-name="serviceCtx"/>
-
-        <entity-condition entity-name="WorkEffortAndInventoryAssign" list="workEffortAndInventoryAssigns">
-            <condition-expr field-name="workEffortId" operator="equals" from-field="workEffortId"/>
-        </entity-condition>
-
-        <assert><not><if-empty field="workEffortAndInventoryAssigns"/></not></assert>
-
-        <set field="totalIssuedQty_MAT_A_COST" value="0.0" type="BigDecimal"/>
-        <set field="totalIssuedQty_MAT_B_COST" value="0.0" type="BigDecimal"/>
-        <iterate list="workEffortAndInventoryAssigns" entry="workEffortAndInventoryAssign">
-            <if-compare field="workEffortAndInventoryAssign.productId" operator="equals" value="MAT_A_COST">
-                <calculate field="totalIssuedQty_MAT_A_COST">
-                    <calcop operator="add">
-                        <calcop operator="get" field="workEffortAndInventoryAssign.quantity"/>
-                        <calcop operator="get" field="totalIssuedQty_MAT_A_COST"/>
-                    </calcop>
-                </calculate>
-            <else>
-                <if-compare field="workEffortAndInventoryAssign.productId" operator="equals" value="MAT_B_COST">
-                    <calculate field="totalIssuedQty_MAT_B_COST">
-                        <calcop operator="add">
-                            <calcop operator="get" field="workEffortAndInventoryAssign.quantity"/>
-                            <calcop operator="get" field="totalIssuedQty_MAT_B_COST"/>
-                        </calcop>
-                    </calculate>
-                </if-compare>
-            </else>
-            </if-compare>
-        </iterate>
-        <assert>
-            <if-compare field="totalIssuedQty_MAT_A_COST" operator="equals" value="4.0" type="BigDecimal"/>
-            <if-compare field="totalIssuedQty_MAT_B_COST" operator="equals" value="6.0" type="BigDecimal"/>
-        </assert>
-        <entity-condition entity-name="AcctgTrans" list="acctgTransList">
-            <condition-list combine="and">
-                <condition-expr field-name="acctgTransTypeId" operator="equals" value="INVENTORY"/>
-                <condition-expr field-name="workEffortId" operator="equals" from-field="workEffortId"/>
-            </condition-list>
-        </entity-condition>
-        <assert><not><if-empty field="acctgTransList"/></not></assert>
-
-        <iterate list="acctgTransList" entry="acctgTrans">
-            <assert><if-compare field="acctgTrans.glJournalId" operator="not-equals" value="ERROR_JOURNAL"/></assert>
-
-            <get-related list="acctgTransEntryList" relation-name="AcctgTransEntry" value-field="acctgTrans"/>
-            <assert><not><if-empty field="acctgTransEntryList"/></not></assert>
-            <iterate list="acctgTransEntryList" entry="acctgTransEntry">
-                <if-compare field="acctgTransEntry.debitCreditFlag" operator="equals" value="C">
-                    <assert>
-                        <or>
-                            <if-compare field="acctgTransEntry.productId" operator="equals" value="MAT_A_COST"/>
-                            <if-compare field="acctgTransEntry.productId" operator="equals" value="MAT_B_COST"/>
-                        </or>
-                        <if-compare field="acctgTransEntry.glAccountTypeId" operator="equals" value="RAWMAT_INVENTORY"/>
-                        <if-compare field="acctgTransEntry.glAccountId" operator="equals" value="141000"/>
-                    </assert>
-                <else>
-                    <if-compare field="acctgTransEntry.debitCreditFlag" operator="equals" value="D">
-                        <assert>
-                            <if-compare field="acctgTransEntry.productId" operator="equals" value="PROD_MANUF"/>
-                            <if-compare field="acctgTransEntry.glAccountTypeId" operator="equals" value="WIP_INVENTORY"/>
-                            <if-compare field="acctgTransEntry.glAccountId" operator="equals" value="142000"/>
-                        </assert>
-                    </if-compare>
-                </else>
-                </if-compare>
-            </iterate>
-        </iterate>
-        <check-errors/>
-    </simple-method>
-
-    <simple-method method-name="testAcctgTransForActualManufacturingCost" short-description="Production run test case for actual manufacturing costs" login-required="false">
-        <!-- Precondition: Inventory is received for the following products:
-                (1) productId = MAT_A_COST, quantity = 4, facilityId = Web Store Warehouse
-                (2) productId = MAT_B_COST, quantity = 6, facilityId = Web Store Warehouse
-             then new production run is created, issued components for following product
-                (1) productId = PROD_MANUF,  quantity = 2, facilityId = Web Store Warehouse
-             Post condition: In entity "AcctgTransEntry" two entries will be created:
-                    * Credit: in account 600000 - "EXPENSE"; amount: 250$
-                    * Debit: in account 142000 - "WORK IN PROGRESS INVENTORY", amount: 250$  -->
-
-        <!-- Find the production run created in the last test -->
-        <entity-and list="productionRuns" entity-name="WorkEffort">
-            <field-map field-name="workEffortName" value="ACCTG_TEST_PROD_RUN"/>
-            <field-map field-name="workEffortTypeId" value="PROD_ORDER_HEADER"/>
-            <field-map field-name="workEffortPurposeTypeId" value="WEPT_PRODUCTION_RUN"/>
-        </entity-and>
-        <first-from-list entry="productionRun" list="productionRuns"/>
-        <set field="productionRunId" from-field="productionRun.workEffortId"/>
-
-        <entity-and list="prodTasks" entity-name="WorkEffort">
-            <field-map field-name="workEffortParentId" from-field="productionRunId"/>
-        </entity-and>
-        <first-from-list entry="taskWorkEffort" list="prodTasks"/>
-        <set field="workEffortId" from-field="taskWorkEffort.workEffortId"/>
-
-        <set field="serviceCtx.productionRunId" from-field="productionRunId"/>
-        <set field="serviceCtx.workEffortId" from-field="workEffortId"/>
-        <set field="serviceCtx.statusId" value="PRUN_RUNNING"/>
-        <entity-one entity-name="UserLogin" value-field="serviceCtx.userLogin">
-            <field-map field-name="userLoginId" value="system"/>
-        </entity-one>
-        <call-service service-name="changeProductionRunTaskStatus" in-map-name="serviceCtx"/>
-        <set field="serviceCtx.statusId" value="PRUN_COMPLETED"/>
-        <call-service service-name="changeProductionRunTaskStatus" in-map-name="serviceCtx"/>
-
-        <entity-condition entity-name="AcctgTrans" list="acctgTransList">
-            <condition-list combine="and">
-                <condition-expr field-name="workEffortId" operator="equals" from-field="workEffortId"/>
-                <condition-expr field-name="acctgTransTypeId" operator="equals" value="MANUFACTURING"/>
-            </condition-list>
-        </entity-condition>
-        <assert><not><if-empty field="acctgTransList"></if-empty></not></assert>
-        <iterate list="acctgTransList" entry="acctgTrans">
-            <assert><if-compare field="acctgTrans.glJournalId" operator="not-equals" value="ERROR_JOURNAL"/></assert>
-
-            <get-related value-field="acctgTrans" relation-name="AcctgTransEntry" list="acctgTransEntryList"/>
-            <iterate list="acctgTransEntryList" entry="acctgTransEntry">
-                <if-compare field="acctgTransEntry.debitCreditFlag" operator="equals" value="C">
-                    <assert>
-                        <if-compare field="acctgTransEntry.productId" operator="equals" value="PROD_MANUF"/>
-                        <if-compare field="acctgTransEntry.glAccountTypeId" operator="equals" value="OPERATING_EXPENSE"/>
-                        <if-compare field="acctgTransEntry.glAccountId" operator="equals" value="600000"/>
-                    </assert>
-                <else>
-                    <if-compare field="acctgTransEntry.debitCreditFlag" operator="equals" value="D">
-                        <assert>
-                            <if-compare field="acctgTransEntry.productId" operator="equals" value="PROD_MANUF"/>
-                            <if-compare field="acctgTransEntry.glAccountTypeId" operator="equals" value="WIP_INVENTORY"/>
-                            <if-compare field="acctgTransEntry.glAccountId" operator="equals" value="142000"/>
-                        </assert>
-                    </if-compare>
-                </else>
-                </if-compare>
-            </iterate>
-        </iterate>
-        <check-errors/>
-    </simple-method>
-
-    <simple-method  method-name="testAcctgTransOnAddFinishedProductsIntoWarehouse" short-description="Production run test case on add finished product into warehouse" login-required="false">
-        <!-- Precondition: Inventory is received for following products:
-                 productId = MAT_A_COST, quantity = 4, facilityId = Web Store Warehouse
-                 productId = MAT_B_COST, quantity = 6, facilityId = Web Store Warehouse
-             then new production run is created and started for following product:
-                 productId = PROD_MANUF, quantity = 2, facilityId = Web Store Warehouse
-             then issue components and complete the product issuance and at last put 2 quantities into "Stock in" field
-             Post condition: In entity "AcctgTransEntry" two entries will be created:
-                * Debit, in account 140000 - "INVENTORY"; amount: 168.00$
-                * Credit, in account 142000 - "WORK IN PROGRESS INVENTORY", amount: 168.00$ -->
-
-        <entity-and list="productionRuns" entity-name="WorkEffort">
-            <field-map field-name="workEffortName" value="ACCTG_TEST_PROD_RUN"/>
-            <field-map field-name="workEffortTypeId" value="PROD_ORDER_HEADER"/>
-            <field-map field-name="workEffortPurposeTypeId" value="WEPT_PRODUCTION_RUN"/>
-        </entity-and>
-        <first-from-list entry="productionRun" list="productionRuns"/>
-
-        <set field="serviceCtx.workEffortId" from-field="productionRun.workEffortId"/>
-        <set field="serviceCtx.workEffortId" from-field="workEffortId"/>
-        <entity-one entity-name="UserLogin" value-field="serviceCtx.userLogin">
-            <field-map field-name="userLoginId" value="system"/>
-        </entity-one>
-        <call-service service-name="productionRunProduce" in-map-name="serviceCtx"/>
-
-        <!-- For credit entry -->
-        <entity-and entity-name="AcctgTransEntry" list="acctgTransEntryList">
-            <field-map field-name="productId" value="PROD_MANUF"/>
-            <field-map field-name="glAccountTypeId" value="WIP_INVENTORY"/>
-            <field-map field-name="glAccountId" value="142000"/>
-            <order-by field-name="-createdStamp"/>
-        </entity-and>
-        <first-from-list list="acctgTransEntryList" entry="acctgTransEntry"/>
-        <assert>
-            <if-compare field="acctgTransEntry.debitCreditFlag" operator="equals" value="C"/>
-            <if-compare field="acctgTransEntry.origAmount" operator="equals" value="168.00" type="BigDecimal"/>
-        </assert>
-
-        <!-- Check the AcctgTrans itself -->
-        <get-related-one to-value-field="acctgTrans" relation-name="AcctgTrans" value-field="acctgTransEntry"/>
-        <assert><if-compare field="acctgTrans.glJournalId" operator="not-equals" value="ERROR_JOURNAL"/></assert>
-
-        <!-- For debit entry -->
-        <entity-and entity-name="AcctgTransEntry" list="acctgTransEntryList">
-            <field-map field-name="productId" value="PROD_MANUF"/>
-            <field-map field-name="glAccountTypeId" value="INVENTORY_ACCOUNT"/>
-            <field-map field-name="glAccountId" value="140000"/>
-            <order-by field-name="-createdStamp"/>
-        </entity-and>
-        <first-from-list list="acctgTransEntryList" entry="acctgTransEntry"/>
-        <assert>
-            <if-compare field="acctgTransEntry.debitCreditFlag" operator="equals" value="D"/>
-            <if-compare field="acctgTransEntry.origAmount" operator="equals" value="168.00" type="BigDecimal"/>
-        </assert>
-        <check-errors/>
-    </simple-method>
-
-    <simple-method method-name="UtilCheckEntriesBalance" login-required="false"
-            short-description="Short util method that takes a list of AcctgTransEntry values (acctgTransEntryList) and checks that the debit and credit totals balance.">
-        <set field="debitTotal" type="BigDecimal" value="0.0"/>
-        <set field="creditTotal" type="BigDecimal" value="0.0"/>
-
-        <assert><not><if-empty field="acctgTransEntryList"/></not></assert>
-        <iterate list="acctgTransEntryList" entry="acctgTransEntry">
-            <if-compare field="acctgTransEntry.debitCreditFlag" operator="equals" value="C">
-                <calculate field="creditTotal">
-                    <calcop operator="get" field="creditTotal"/>
-                    <calcop operator="add" field="acctgTransEntry.origAmount"/>
-                </calculate>
-            <else>
-                <if-compare field="acctgTransEntry.debitCreditFlag" operator="equals" value="D">
-                    <calculate field="debitTotal">
-                        <calcop operator="get" field="debitTotal"/>
-                        <calcop operator="add" field="acctgTransEntry.origAmount"/>
-                    </calculate>
-                </if-compare>
-            </else>
-            </if-compare>
-        </iterate>
-        <assert>
-            <if-compare-field field="debitTotal" operator="equals" to-field="creditTotal" type="BigDecimal"/>
-        </assert>
-    </simple-method>
-
-</simple-methods>
diff --git a/applications/accounting/script/org/ofbiz/accounting/test/AutoAcctgTransTestsPurchase.xml b/applications/accounting/script/org/ofbiz/accounting/test/AutoAcctgTransTestsPurchase.xml
new file mode 100644
index 0000000..c58a372
--- /dev/null
+++ b/applications/accounting/script/org/ofbiz/accounting/test/AutoAcctgTransTestsPurchase.xml
@@ -0,0 +1,228 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<simple-methods xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+        xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/simple-methods.xsd">
+
+    <!-- Test case for Accounting Transaction on Purchase -->
+    <simple-method method-name="testAcctgTransOnPoReceipts" short-description="Test case for Accounting Transaction on Receipts of Purchase Order." login-required="false">
+        <!-- Precondition : shipment is created from supplier and order items are issued  -->
+        <!-- create a purchase order using following:
+             Supplier : DemoSupplier
+             Item     : WG-1111
+             Quantity : 10 -->
+
+        <!-- Post condition : Credit in account 214000 - UNINVOICED ITEM RECEIPT amount = grand total of order.
+                              Debit in account 140000- INVENTORY amount = grand total of order.  -->
+
+        <!-- set few variables so that they can be changed easily to test with different values -->
+        <set field="orderId" value="DEMO10091"/>
+        <set field="productId" value="GZ-2644"/>
+        <set field="orderItemSeqId" value="00001"/>
+        <set field="shipmentId" value="9999"/>
+
+        <entity-one entity-name="UserLogin" value-field="userLogin">
+            <field-map field-name="userLoginId" value="system"/>
+        </entity-one>
+        <set field="serviceCtx.userLogin" from-field="userLogin"/>
+        <set field="serviceCtx.inventoryItemTypeId" value="NON_SERIAL_INV_ITEM"/>
+        <set field="serviceCtx.productId" from-field="productId"/>
+        <set field="serviceCtx.facilityId" value="WebStoreWarehouse"/>
+        <set field="serviceCtx.quantityAccepted" value="5" type="BigDecimal"/>
+        <set field="serviceCtx.quantityRejected" value="0" type="BigDecimal"/>
+        <set field="serviceCtx.shipmentId" from-field="shipmentId"/>
+        <set field="serviceCtx.orderId" from-field="orderId"/>
+        <set field="serviceCtx.orderItemSeqId" from-field="orderItemSeqId"/>
+
+        <call-service service-name="receiveInventoryProduct" in-map-name="serviceCtx"/>
+
+        <entity-and list="acctgTransList" entity-name="AcctgTrans">
+            <field-map field-name="shipmentId"/>
+        </entity-and>
+        <assert><not><if-empty field="acctgTransList"/></not></assert>
+        <first-from-list entry="acctgTrans" list="acctgTransList"/>
+
+        <assert><if-compare field="acctgTrans.glJournalId" operator="not-equals" value="ERROR_JOURNAL"/></assert>
+
+        <get-related value-field="acctgTrans" relation-name="AcctgTransEntry" list="acctgTransEntryList"/>
+        <set field="productFilter.productId" from-field="productId"/>
+        <filter-list-by-and list="acctgTransEntryList" map="productFilter" to-list="acctgTransEntryList"/>
+
+        <assert><not><if-empty field="acctgTransEntryList"/></not></assert>
+
+        <call-simple-method method-name="UtilCheckEntriesBalance"/>
+
+        <iterate list="acctgTransEntryList" entry="acctgTransEntry">
+            <if-compare field="acctgTransEntry.debitCreditFlag" operator="equals" value="C">
+                <assert>
+                    <if-compare field="acctgTransEntry.glAccountTypeId" operator="equals" value="UNINVOICED_SHIP_RCPT"/>
+                    <if-compare field="acctgTransEntry.glAccountId" operator="equals" value="214000"/>
+                </assert>
+            <else>
+                <if-compare field="acctgTransEntry.debitCreditFlag" operator="equals" value="D">
+                    <assert>
+                        <if-compare field="acctgTransEntry.glAccountTypeId" operator="equals" value="INVENTORY_ACCOUNT"/>
+                        <if-compare field="acctgTransEntry.glAccountId" operator="equals" value="140000"/>
+                    </assert>
+                </if-compare>
+            </else>
+            </if-compare>
+        </iterate>
+        <!-- check if invoice created -->
+        <entity-and list="orderItemBillings" entity-name="OrderItemBilling">
+            <field-map field-name="orderId"/>
+        </entity-and>
+        <assert>
+            <not><if-empty field="orderItemBillings"/></not>
+        </assert>
+        <check-errors/>
+    </simple-method>
+
+    <simple-method method-name="testAcctgTransOnEditPoInvoice" short-description="Test case for Purchase Invoices: editing, adding taxes and shipping charges and posting to GL" login-required="false">
+        <!-- Precondition: To the Purchase Invoice created add taxes and two different shipping charges
+            1. for taxes: set "Invoice Item Type" = "Invoice Sales Tax" and "Unit Price" = 10$
+            2. for the first shipping charge: set "Invoice Item Type" = "Invoice Shipping And Handling" and "Unit Price" = 5$
+            3. for the second shipping charge: set "Invoice Item Type" = "Invoice Shipping And Handling", set "Override Gl Account Id" = "516100" and "Unit Price" = 5$
+        -->
+        <!-- Post condition: When status is set to ready, an accounting transaction is automatically posted to the GL:
+            * Credit; in account 210000 - "ACCOUNTS PAYABLE"; amount: 290$
+            * Debit; in account 214000 - "UNINVOICED ITEM RECEIPTS"; amount: 270$
+            * Debit; in account 516100 - "PURCHASE ORDER ADJUSTMENTS"; amount: 10$
+            * Debit; in account 510000 - "FREIGHT IN"; amount: 5$
+            * Debit; in account 516100 - "PURCHASE ORDER ADJUSTMENTS"; amount: 5$
+        -->
+
+        <set field="orderId" value="DEMO10091"/>
+        <entity-and list="orderItemBillings" entity-name="OrderItemBilling">
+            <field-map field-name="orderId"/>
+        </entity-and>
+        <first-from-list entry="orderItemBilling" list="orderItemBillings"/>
+        <entity-one entity-name="UserLogin" value-field="userLogin">
+            <field-map field-name="userLoginId" value="system"/>
+        </entity-one>
+        <set field="serviceCtx.userLogin" from-field="userLogin"/>
+        <set field="serviceCtx.statusId" value="INVOICE_READY"/>
+        <set field="serviceCtx.invoiceId" from-field="orderItemBilling.invoiceId"/>
+        <call-service service-name="setInvoiceStatus" in-map-name="serviceCtx"/>
+        <entity-one entity-name="Invoice" value-field="invoice">
+            <field-map field-name="invoiceId" from-field="orderItemBilling.invoiceId"/>
+        </entity-one>
+        <get-related value-field="invoice" relation-name="AcctgTrans" list="acctgTransList"/>
+        <first-from-list list="acctgTransList" entry="acctgTrans"/>
+
+        <assert><if-compare field="acctgTrans.glJournalId" operator="not-equals" value="ERROR_JOURNAL"/></assert>
+
+        <get-related value-field="acctgTrans" relation-name="AcctgTransEntry" list="acctgTransEntryList"/>
+
+        <assert><not><if-empty field="acctgTransEntryList"/></not></assert>
+
+        <call-simple-method method-name="UtilCheckEntriesBalance"/>
+
+        <iterate list="acctgTransEntryList" entry="acctgTransEntry">
+            <if-compare field="acctgTransEntry.debitCreditFlag" operator="equals" value="C">
+                <assert>
+                    <if-compare field="acctgTransEntry.glAccountTypeId" operator="equals" value="ACCOUNTS_PAYABLE"/>
+                    <if-compare field="acctgTransEntry.glAccountId" operator="equals" value="210000"/>
+                </assert>
+            </if-compare>
+        </iterate>
+        <check-errors/>
+    </simple-method>
+
+    <simple-method method-name="testAcctgTransOnPaymentSentToSupplier" short-description="Test case for Payment sent to supplier for purchase invoice." login-required="false">
+        <!--
+            Precondition: New payment is created for: supplierId = "DemoSupplier", "Payment Type ID" = "Vendor Payment" and
+                          a proper "Payment Method Type" (e.g. "Electronic Funds Transfer"), amount = $290
+
+            Post condition: On payment's status is sent: a double-entry accounting transaction is automatically posted to the GL:
+                * Credit; in account 111100 - "GENERAL CHECKING ACCOUNT"; amount: 290$; however this depends on the "Payment method type" selected;
+                * Debit; in account 216000 - "ACCOUNTS PAYABLE - UNAPPLIED PAYMENTS"; amount: 290$
+         -->
+
+        <set field="paymentId" value="9000"/>
+        <entity-one entity-name="UserLogin" value-field="userLogin">
+            <field-map field-name="userLoginId" value="system"/>
+        </entity-one>
+        <set field="serviceCtx.userLogin" from-field="userLogin"/>
+        <set field="serviceCtx.paymentId" from-field="paymentId"/>
+        <set field="serviceCtx.statusId" value="PMNT_SENT"/>
+
+        <call-service service-name="setPaymentStatus" in-map-name="serviceCtx"/>
+        <entity-one entity-name="Payment" value-field="payment">
+            <field-map field-name="paymentId" from-field="paymentId"/>
+        </entity-one>
+        <get-related value-field="payment" relation-name="AcctgTrans" list="acctgTransList"/>
+        <first-from-list list="acctgTransList" entry="acctgTrans"/>
+
+        <assert><if-compare field="acctgTrans.glJournalId" operator="not-equals" value="ERROR_JOURNAL"/></assert>
+
+        <get-related value-field="acctgTrans" relation-name="AcctgTransEntry" list="acctgTransEntryList"/>
+
+        <assert><not><if-empty field="acctgTransEntryList"/></not></assert>
+
+        <call-simple-method method-name="UtilCheckEntriesBalance"/>
+
+        <iterate list="acctgTransEntryList" entry="acctgTransEntry">
+            <if-compare field="acctgTransEntry.debitCreditFlag" operator="equals" value="C">
+                <assert>
+                    <if-compare field="acctgTransEntry.glAccountId" operator="equals" value="111100"/>
+                </assert>
+            <else>
+                <if-compare field="acctgTransEntry.debitCreditFlag" operator="equals" value="D">
+                    <assert>
+                        <if-compare field="acctgTransEntry.glAccountTypeId" operator="equals" value="ACCPAYABLE_UNAPPLIED"/>
+                        <if-compare field="acctgTransEntry.glAccountId" operator="equals" value="216000"/>
+                    </assert>
+                </if-compare>
+            </else>
+            </if-compare>
+        </iterate>
+        <check-errors/>
+    </simple-method>
+
+
+    <simple-method method-name="UtilCheckEntriesBalance" login-required="false"
+            short-description="Short util method that takes a list of AcctgTransEntry values (acctgTransEntryList) and checks that the debit and credit totals balance.">
+        <set field="debitTotal" type="BigDecimal" value="0.0"/>
+        <set field="creditTotal" type="BigDecimal" value="0.0"/>
+
+        <assert><not><if-empty field="acctgTransEntryList"/></not></assert>
+        <iterate list="acctgTransEntryList" entry="acctgTransEntry">
+            <if-compare field="acctgTransEntry.debitCreditFlag" operator="equals" value="C">
+                <calculate field="creditTotal">
+                    <calcop operator="get" field="creditTotal"/>
+                    <calcop operator="add" field="acctgTransEntry.origAmount"/>
+                </calculate>
+            <else>
+                <if-compare field="acctgTransEntry.debitCreditFlag" operator="equals" value="D">
+                    <calculate field="debitTotal">
+                        <calcop operator="get" field="debitTotal"/>
+                        <calcop operator="add" field="acctgTransEntry.origAmount"/>
+                    </calculate>
+                </if-compare>
+            </else>
+            </if-compare>
+        </iterate>
+        <assert>
+            <if-compare-field field="debitTotal" operator="equals" to-field="creditTotal" type="BigDecimal"/>
+        </assert>
+    </simple-method>
+
+</simple-methods>
diff --git a/applications/accounting/script/org/ofbiz/accounting/test/AutoAcctgTransTestsSales.xml b/applications/accounting/script/org/ofbiz/accounting/test/AutoAcctgTransTestsSales.xml
new file mode 100644
index 0000000..f4e7274
--- /dev/null
+++ b/applications/accounting/script/org/ofbiz/accounting/test/AutoAcctgTransTestsSales.xml
@@ -0,0 +1,247 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<simple-methods xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+        xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/simple-methods.xsd">
+
+    <!-- Test case for Accounting Transaction on Sales -->
+    <simple-method method-name="testAcctgTransForSalesOrderShipments" short-description="Creation and Shipments of sales order" login-required="false">
+        <!-- Precondition :
+             1. create a sales order
+             2. from the order view screen, approve the order
+             3. from the order view screen, create a shipment to the customer (click on "New Shipment For Ship Group" and then click on the "Update" button in the next screen)
+        -->
+        <!-- Following process is tested by test case:
+             1. issue (assign) the order items to the shipment: select the "Order Items" tab and then click on "Issue All"; this action will generate and post to the GL the accounting transaction for the items taken from the warehouse and ready to be shipped
+        -->
+        <!-- Post condition: all order items will be issued and it will generate and post to the GL the accounting transaction for the items taken from the warehouse and ready to be shipped
+              * Credit; in account:140000 - Account Type:"INVENTORY_ACCOUNT"
+              * Debit; in account:500000 - Account Type:"COGS_ACCOUNT"
+        -->
+
+        <set field="shipmentId" value="9998"/>
+        <set field="orderId" value="DEMO10090"/>
+        <set field="shipGroupSeqId" value="00001"/>
+        <set field="orderItemSeqId" value="00001"/>
+        <set field="inventoryItemId" value="9001"/>
+        <set field="quantity" value="2" type="BigDecimal"/>
+        <set field="productId" value="GZ-2644"/>
+
+        <entity-one entity-name="UserLogin" value-field="userLogin" auto-field-map="false">
+            <field-map field-name="userLoginId" value="system"/>
+        </entity-one>
+        <set field="serviceCtx.userLogin" from-field="userLogin"/>
+        <set field="serviceCtx.shipmentId" from-field="shipmentId"/>
+        <set field="serviceCtx.orderId" from-field="orderId"/>
+        <set field="serviceCtx.shipGroupSeqId" from-field="shipGroupSeqId"/>
+        <set field="serviceCtx.orderItemSeqId" from-field="orderItemSeqId"/>
+        <set field="serviceCtx.inventoryItemId" from-field="inventoryItemId"/>
+        <set field="serviceCtx.quantity" from-field="quantity"/>
+        <call-service service-name="issueOrderItemShipGrpInvResToShipment" in-map-name="serviceCtx"/>
+
+        <entity-condition list="acctgTransList" entity-name="AcctgTrans">
+            <condition-expr field-name="shipmentId" from-field="shipmentId"/>
+            <order-by field-name="-postedDate"/>
+        </entity-condition>
+        <assert><not><if-empty field="acctgTransList"/></not></assert>
+        <first-from-list entry="acctgTrans" list="acctgTransList"/>
+
+        <assert><if-compare field="acctgTrans.glJournalId" operator="not-equals" value="ERROR_JOURNAL"/></assert>
+
+        <get-related list="acctgTransEntryList" relation-name="AcctgTransEntry" value-field="acctgTrans"/>
+        <assert><not><if-empty field="acctgTransEntryList"/></not></assert>
+
+        <call-simple-method method-name="UtilCheckEntriesBalance" xml-resource="component://accounting/script/org/ofbiz/accounting/test/AutoAcctgTransTestsPurchase.xml"/>
+
+        <iterate list="acctgTransEntryList" entry="acctgTransEntry">
+            <if-compare field="acctgTransEntry.debitCreditFlag" operator="equals" value="C">
+                <assert>
+                    <if-compare field="acctgTransEntry.glAccountTypeId" operator="equals" value="INVENTORY_ACCOUNT"/>
+                    <if-compare field="acctgTransEntry.glAccountId" operator="equals" value="140000"/>
+                </assert>
+            <else>
+                <if-compare field="acctgTransEntry.debitCreditFlag" operator="equals" value="D">
+                    <assert>
+                        <if-compare field="acctgTransEntry.glAccountTypeId" operator="equals" value="COGS_ACCOUNT"/>
+                        <if-compare field="acctgTransEntry.glAccountId" operator="equals" value="500000"/>
+                    </assert>
+                </if-compare>
+            </else>
+            </if-compare>
+        </iterate>
+        <check-errors/>
+    </simple-method>
+
+    <simple-method method-name="testAcctgTransOnSalesInvoice" short-description="Test case for Accounting Transaction for sales invoice" login-required="false">
+        <!-- Precondition:
+            1. Create a sales order
+            2. From the order view screen, approve the order
+            3. From the order view screen, create a shipment to the customer (click on "New Shipment For Ship Group" and then click on the "Update" button in the next screen)
+            4. Issue the order items to the shipment: select the "Order Items" tab and then click on "Issue All."
+            5. From the shipment detail screen of the shipment created in the previous step (there is a link to it from the order detail screen), set the status of the shipment to "pack"(Click on "Edit" and then from statusId drop down select statusId = "Pack" and then click update); this action will generate a sales invoice
+        -->
+        <!-- Following process is tested by test case:
+             1. Go to the invoice detail screen (there is a link to the invoice from the order detail screen) and click on the "set status to ready"; this action will generate and post to the GL the accounting transaction for the sales invoice
+        -->
+        <!-- Post condition: "Set status to ready"; This action will generate and post to the GL the accounting transaction for the sales invoice
+              * Credit; in account=400000 - Account Type="SALES_ACCOUNT"
+              * Debit; in  account=120000 - Account Type="ACCOUNTS_RECEIVABLE"
+        -->
+        <!-- Note: The above notes seem to assume that you are going to manually follow the preconditions above before running this test.
+                   Instead the test will now use order DEMO10090 which currently preconditions 1-4 fulfilled, and we'll then update the
+                   shipment to the packed status (precondition 4).  Additionally it doesn't seem to be necessary to set the invoice status
+                   to ready because the invoice is created in that state.
+        -->
+        
+        <entity-one entity-name="UserLogin" value-field="userLogin">
+            <field-map field-name="userLoginId" value="system"/>
+        </entity-one>
+
+        <set field="serviceCtx.userLogin"  from-field="userLogin"/>
+        <set field="serviceCtx.shipmentId" value="9998"/>
+        <set field="serviceCtx.statusId" value="SHIPMENT_PACKED"/>
+        <call-service service-name="updateShipment" in-map-name="serviceCtx"/>
+
+        <entity-condition list="shipmentItemBillings" entity-name="ShipmentItemBilling">
+            <condition-expr field-name="shipmentId" value="9998"/>
+            <order-by field-name="-createdStamp"/>
+        </entity-condition>
+        <assert><not><if-empty field="shipmentItemBillings"/></not></assert>
+        <first-from-list entry="shipmentItemBilling" list="shipmentItemBillings"/>
+        <set field="invoiceId" from-field="shipmentItemBilling.invoiceId"/>
+
+        <entity-one entity-name="Invoice" value-field="invoice">
+            <field-map field-name="invoiceId" from-field="invoiceId"/>
+        </entity-one>
+        <get-related value-field="invoice" relation-name="AcctgTrans" list="acctgTransList"/>
+        <assert><not><if-empty field="acctgTransList"/></not></assert>
+
+        <!-- Check the invoice transaction -->
+        <set field="acctgTransFilter.acctgTransTypeId" value="SALES_INVOICE"/>
+        <filter-list-by-and to-list="salesAcctgTransList" list="acctgTransList" map="acctgTransFilter"/>
+        <first-from-list entry="salesAcctgTrans" list="salesAcctgTransList"/>
+
+        <assert><if-compare field="salesAcctgTrans.glJournalId" operator="not-equals" value="ERROR_JOURNAL"/></assert>
+
+        <get-related value-field="salesAcctgTrans" relation-name="AcctgTransEntry" list="acctgTransEntryList"/>
+
+        <assert><not><if-empty field="acctgTransEntryList"/></not></assert>
+
+        <call-simple-method method-name="UtilCheckEntriesBalance" xml-resource="component://accounting/script/org/ofbiz/accounting/test/AutoAcctgTransTestsPurchase.xml"/>
+
+        <set field="acctgTransEntryFilter.glAccountTypeId" value="ACCOUNTS_RECEIVABLE"/>
+        <set field="acctgTransEntryFilter.glAccountId" value="120000"/>
+        <filter-list-by-and list="acctgTransEntryList" to-list="accountsReceivableEntries" map="acctgTransEntryFilter"/>
+        <assert><not><if-empty field="accountsReceivableEntries"></if-empty></not></assert>
+
+        <clear-field field="acctgTransEntryFilter"/>
+        <set field="acctgTransEntryFilter.glAccountId" value="400000"/>
+        <filter-list-by-and list="acctgTransEntryList" to-list="salesAccountEntries" map="acctgTransEntryFilter"/>
+        <assert><not><if-empty field="salesAccountEntries"></if-empty></not></assert>
+
+        <!-- Check the payment transaction -->
+        <clear-field field="acctgTransEntryFilter"/>
+        <set field="acctgTransFilter.acctgTransTypeId" value="PAYMENT_APPL"/>
+        <filter-list-by-and to-list="paymentAcctgTransList" list="acctgTransList" map="acctgTransFilter"/>
+        <first-from-list entry="paymentAcctgTrans" list="paymentAcctgTransList"/>
+
+        <assert><if-compare field="paymentAcctgTrans.glJournalId" operator="not-equals" value="ERROR_JOURNAL"/></assert>
+
+        <get-related value-field="paymentAcctgTrans" relation-name="AcctgTransEntry" list="acctgTransEntryList"/>
+
+        <assert><not><if-empty field="acctgTransEntryList"/></not></assert>
+
+        <call-simple-method method-name="UtilCheckEntriesBalance" xml-resource="component://accounting/script/org/ofbiz/accounting/test/AutoAcctgTransTestsPurchase.xml"/>
+
+        <set field="acctgTransEntryFilter.glAccountTypeId" value="ACCOUNTS_RECEIVABLE"/>
+        <set field="acctgTransEntryFilter.glAccountId" value="120000"/>
+        <filter-list-by-and list="acctgTransEntryList" to-list="accountsReceivableEntries" map="acctgTransEntryFilter"/>
+        <assert><not><if-empty field="accountsReceivableEntries"></if-empty></not></assert>
+
+        <check-errors/>
+    </simple-method>
+
+    <simple-method method-name="testAcctgTransOnPaymentReceivedFromCustomer" short-description="Test case on Payment Received from customer for Sales Invoice" login-required="false">
+        <!-- Precondition :-
+            1. Click on the Payment top menu in the Accounting application, then click on the "Create New Payment" link.
+            2. In the "New incoming payment" box, set the customer id in the "From Party ID" field; then set "Payment Type ID" = "Customer Payment" and a proper "Payment Method Type" (e.g. "Electronic Funds Transfer"); then set the "amount" and submit the form
+        -->
+        <!-- Following process is tested by test case:
+             1. From the payment detail screen, when you are ready to post the payment to the GL, click on the "Status to Received" link
+        -->
+        <!-- Post condition: "Status to Received", Received Payments. When you are ready to post the payment to the GL this action will generate and post to the GL the accounting transaction for the items taken from the warehouse and ready to be shipped:
+              * Credit; in glAccountId=126000 - glAccountTypeId="ACCOUNTS_RECEIVABLE - UNAPPLIED PAYMENTS"
+              * Debit; in glAccountId=112000 - glAccountTypeId="UNDEPOSITED_RECEIPTS"
+        -->
+
+        <!-- Creating a payment from scratch rather than using the demo data -->
+        
+        <entity-one entity-name="UserLogin" value-field="userLogin">
+            <field-map field-name="userLoginId" value="system"/>
+        </entity-one>
+        <set field="serviceCtx.userLogin" from-field="userLogin"/>
+
+        <!-- Find a customer -->
+        <entity-and list="customerRoles" entity-name="PartyRole">
+            <field-map field-name="roleTypeId" value="CUSTOMER"/>
+        </entity-and>
+        <first-from-list entry="customerRole" list="customerRoles"/>
+        <set field="serviceCtx.partyIdFrom" from-field="customerRole.partyId"/>
+        <set field="serviceCtx.amount" value="100.00" type="BigDecimal"/>
+        <set field="serviceCtx.partyIdTo" value="Company"/>
+        <set field="serviceCtx.paymentMethodTypeId" value="EFT_ACCOUNT"/>
+        <set field="serviceCtx.paymentTypeId" value="CUSTOMER_PAYMENT"/>
+        <set field="serviceCtx.paymentId" from-field="paymentId"/>
+        <set field="serviceCtx.statusId" value="PMNT_RECEIVED"/>
+        <call-service service-name="createPayment" in-map-name="serviceCtx">
+            <result-to-field result-name="paymentId"/>
+        </call-service>
+
+        <entity-and list="acctgTransList" entity-name="AcctgTrans">
+            <field-map field-name="paymentId"/>
+            <field-map field-name="acctgTransTypeId" value="INCOMING_PAYMENT"/>
+        </entity-and>
+        <first-from-list list="acctgTransList" entry="acctgTrans"/>
+
+        <assert><if-compare field="paymentAcctgTrans.glJournalId" operator="not-equals" value="ERROR_JOURNAL"/></assert>
+
+        <get-related value-field="acctgTrans" relation-name="AcctgTransEntry" list="acctgTransEntryList"/>
+
+        <assert><not><if-empty field="acctgTransEntryList"/></not></assert>
+
+        <call-simple-method method-name="UtilCheckEntriesBalance" xml-resource="component://accounting/script/org/ofbiz/accounting/test/AutoAcctgTransTestsPurchase.xml"/>
+
+        <iterate entry="acctgTransEntry" list="acctgTransEntryList">
+            <if-compare field="acctgTransEntry.debitCreditFlag" operator="equals" value="C">
+               <assert>
+                    <if-compare field="acctgTransEntry.glAccountTypeId" operator="equals" value="ACCREC_UNAPPLIED"/>
+                    <if-compare field="acctgTransEntry.glAccountId" operator="equals" value="126000"/>
+                </assert>
+            </if-compare>
+            <if-compare field="acctgTransEntry.debitCreditFlag" operator="equals" value="D">
+                <assert>
+                    <if-compare field="acctgTransEntry.glAccountId" operator="equals" value="111100"/>
+                </assert>
+            </if-compare>
+        </iterate>
+        <check-errors/>
+    </simple-method>
+
+</simple-methods>
diff --git a/applications/accounting/script/org/ofbiz/accounting/test/AutoInvoiceTests.xml b/applications/accounting/script/org/ofbiz/accounting/test/AutoInvoiceTests.xml
index a465b0d..a8d1090 100644
--- a/applications/accounting/script/org/ofbiz/accounting/test/AutoInvoiceTests.xml
+++ b/applications/accounting/script/org/ofbiz/accounting/test/AutoInvoiceTests.xml
@@ -176,10 +176,20 @@
         <entity-one entity-name="UserLogin" value-field="userLogin">
             <field-map field-name="userLoginId" value="system"/>
         </entity-one>
+
+        <now-timestamp field="nowTimestamp"/>
+        <set field="findCustomTimePeriodsMap.userLogin" from-field="userLogin"/>
+        <set field="findCustomTimePeriodsMap.findDate" from-field="nowTimestamp" type="Timestamp"/>
+        <set field="findCustomTimePeriodsMap.organizationPartyId" value="Company"/>
+        <call-service service-name="findCustomTimePeriods" in-map-name="findCustomTimePeriodsMap">
+            <result-to-field result-name="customTimePeriodList"/>
+        </call-service>
+        <first-from-list list="customTimePeriodList" entry="customTimePeriod"/>
+
         <set field="getAcctgTransEntriesAndTransTotalMap.userLogin" from-field="userLogin"/>
         <set field="getAcctgTransEntriesAndTransTotalMap.organizationPartyId" value="Company"/>
-        <set field="getAcctgTransEntriesAndTransTotalMap.customTimePeriodStartDate" value="2011-01-01 16:55:01.0" type="Timestamp"/>
-        <set field="getAcctgTransEntriesAndTransTotalMap.customTimePeriodEndDate" value="2011-12-31 16:55:01.0" type="Timestamp"/>
+        <set field="getAcctgTransEntriesAndTransTotalMap.customTimePeriodStartDate" from-field="customTimePeriod.fromDate" type="Timestamp"/>
+        <set field="getAcctgTransEntriesAndTransTotalMap.customTimePeriodEndDate" from-field="customTimePeriod.thruDate" type="Timestamp"/>
         <set field="getAcctgTransEntriesAndTransTotalMap.glAccountId" value="210000"/>
         <call-service service-name="getAcctgTransEntriesAndTransTotal" in-map-name="getAcctgTransEntriesAndTransTotalMap">
             <result-to-field result-name="debitTotal" field="payableDebitTotal"/>
@@ -244,10 +254,20 @@
         <entity-one entity-name="UserLogin" value-field="userLogin">
             <field-map field-name="userLoginId" value="system"/>
         </entity-one>
+
+        <now-timestamp field="nowTimestamp"/>
+        <set field="findCustomTimePeriodsMap.userLogin" from-field="userLogin"/>
+        <set field="findCustomTimePeriodsMap.findDate" from-field="nowTimestamp" type="Timestamp"/>
+        <set field="findCustomTimePeriodsMap.organizationPartyId" value="Company"/>
+        <call-service service-name="findCustomTimePeriods" in-map-name="findCustomTimePeriodsMap">
+            <result-to-field result-name="customTimePeriodList"/>
+        </call-service>
+        <first-from-list list="customTimePeriodList" entry="customTimePeriod"/>
+
         <set field="getAcctgTransEntriesAndTransTotalMap.userLogin" from-field="userLogin"/>
         <set field="getAcctgTransEntriesAndTransTotalMap.organizationPartyId" value="Company"/>
-        <set field="getAcctgTransEntriesAndTransTotalMap.customTimePeriodStartDate" value="2011-01-01 16:55:01.0" type="Timestamp"/>
-        <set field="getAcctgTransEntriesAndTransTotalMap.customTimePeriodEndDate" value="2011-12-31 16:55:01.0" type="Timestamp"/>
+        <set field="getAcctgTransEntriesAndTransTotalMap.customTimePeriodStartDate" from-field="customTimePeriod.fromDate" type="Timestamp"/>
+        <set field="getAcctgTransEntriesAndTransTotalMap.customTimePeriodEndDate" from-field="customTimePeriod.thruDate" type="Timestamp"/>
         <set field="getAcctgTransEntriesAndTransTotalMap.glAccountId" value="210000"/>
         <call-service service-name="getAcctgTransEntriesAndTransTotal" in-map-name="getAcctgTransEntriesAndTransTotalMap">
             <result-to-field result-name="debitTotal" field="payableDebitTotal"/>
diff --git a/applications/accounting/script/org/ofbiz/accounting/test/AutoPaymentTests.xml b/applications/accounting/script/org/ofbiz/accounting/test/AutoPaymentTests.xml
index 6e57ed2..f2dd52c 100644
--- a/applications/accounting/script/org/ofbiz/accounting/test/AutoPaymentTests.xml
+++ b/applications/accounting/script/org/ofbiz/accounting/test/AutoPaymentTests.xml
@@ -348,10 +348,20 @@
         <entity-one entity-name="UserLogin" value-field="userLogin">
             <field-map field-name="userLoginId" value="system"/>
         </entity-one>
+
+        <now-timestamp field="nowTimestamp"/>
+        <set field="findCustomTimePeriodsMap.userLogin" from-field="userLogin"/>
+        <set field="findCustomTimePeriodsMap.findDate" from-field="nowTimestamp" type="Timestamp"/>
+        <set field="findCustomTimePeriodsMap.organizationPartyId" value="Company"/>
+        <call-service service-name="findCustomTimePeriods" in-map-name="findCustomTimePeriodsMap">
+            <result-to-field result-name="customTimePeriodList"/>
+        </call-service>
+        <first-from-list list="customTimePeriodList" entry="customTimePeriod"/>
+
         <set field="getAcctgTransEntriesAndTransTotalMap.userLogin" from-field="userLogin"/>
         <set field="getAcctgTransEntriesAndTransTotalMap.organizationPartyId" value="Company"/>
-        <set field="getAcctgTransEntriesAndTransTotalMap.customTimePeriodStartDate" value="2011-01-01 16:55:01.0" type="Timestamp"/>
-        <set field="getAcctgTransEntriesAndTransTotalMap.customTimePeriodEndDate" value="2011-12-31 16:55:01.0" type="Timestamp"/>
+        <set field="getAcctgTransEntriesAndTransTotalMap.customTimePeriodStartDate" from-field="customTimePeriod.fromDate" type="Timestamp"/>
+        <set field="getAcctgTransEntriesAndTransTotalMap.customTimePeriodEndDate" from-field="customTimePeriod.thruDate" type="Timestamp"/>
         <set field="getAcctgTransEntriesAndTransTotalMap.glAccountId" value="120000"/>
         <call-service service-name="getAcctgTransEntriesAndTransTotal" in-map-name="getAcctgTransEntriesAndTransTotalMap">
             <result-to-field result-name="debitTotal" field="receivableDebitTotal"/>
@@ -420,10 +430,20 @@
         <entity-one entity-name="UserLogin" value-field="userLogin">
             <field-map field-name="userLoginId" value="system"/>
         </entity-one>
+
+        <now-timestamp field="nowTimestamp"/>
+        <set field="findCustomTimePeriodsMap.userLogin" from-field="userLogin"/>
+        <set field="findCustomTimePeriodsMap.findDate" from-field="nowTimestamp" type="Timestamp"/>
+        <set field="findCustomTimePeriodsMap.organizationPartyId" value="Company"/>
+        <call-service service-name="findCustomTimePeriods" in-map-name="findCustomTimePeriodsMap">
+            <result-to-field result-name="customTimePeriodList"/>
+        </call-service>
+        <first-from-list list="customTimePeriodList" entry="customTimePeriod"/>
+
         <set field="getAcctgTransEntriesAndTransTotalMap.userLogin" from-field="userLogin"/>
         <set field="getAcctgTransEntriesAndTransTotalMap.organizationPartyId" value="Company"/>
-        <set field="getAcctgTransEntriesAndTransTotalMap.customTimePeriodStartDate" value="2011-01-01 16:55:01.0" type="Timestamp"/>
-        <set field="getAcctgTransEntriesAndTransTotalMap.customTimePeriodEndDate" value="2011-12-31 16:55:01.0" type="Timestamp"/>
+        <set field="getAcctgTransEntriesAndTransTotalMap.customTimePeriodStartDate" from-field="customTimePeriod.fromDate" type="Timestamp"/>
+        <set field="getAcctgTransEntriesAndTransTotalMap.customTimePeriodEndDate" from-field="customTimePeriod.thruDate" type="Timestamp"/>
         <set field="getAcctgTransEntriesAndTransTotalMap.glAccountId" value="210000"/>
         <call-service service-name="getAcctgTransEntriesAndTransTotal" in-map-name="getAcctgTransEntriesAndTransTotalMap">
             <result-to-field result-name="debitTotal" field="payableDebitTotal"/>
diff --git a/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountPaymentServices.java b/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountPaymentServices.java
index f84f220..c500595 100644
--- a/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountPaymentServices.java
+++ b/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountPaymentServices.java
@@ -43,6 +43,7 @@
 import org.ofbiz.entity.condition.EntityOperator;
 import org.ofbiz.entity.util.EntityFindOptions;
 import org.ofbiz.entity.util.EntityUtil;
+import org.ofbiz.entity.util.EntityUtilProperties;
 import org.ofbiz.order.finaccount.FinAccountHelper;
 import org.ofbiz.order.order.OrderReadHelper;
 import org.ofbiz.product.store.ProductStoreWorker;
@@ -541,7 +542,7 @@
         }
         String currencyUom = (String) context.get("currency");
         if (UtilValidate.isEmpty(currencyUom)) {
-            currencyUom = UtilProperties.getPropertyValue("general.properties", "currency.uom.id.default", "USD");
+            currencyUom = EntityUtilProperties.getPropertyValue("general.properties", "currency.uom.id.default", "USD", delegator);
         }
 
         // validate the amount
@@ -634,7 +635,7 @@
         }
         String currencyUom = (String) context.get("currency");
         if (UtilValidate.isEmpty(currencyUom)) {
-            currencyUom = UtilProperties.getPropertyValue("general.properties", "currency.uom.id.default", "USD");
+            currencyUom = EntityUtilProperties.getPropertyValue("general.properties", "currency.uom.id.default", "USD", delegator);
         }
 
         GenericValue finAccount;
@@ -658,7 +659,7 @@
                     "AccountingFinAccountExpired", 
                     UtilMisc.toMap("thruDate", finAccount.getTimestamp("thruDate")), locale));
         }
-        Debug.log("Deposit into financial account #" + finAccountId + " [" + amount + "]", module);
+        Debug.logInfo("Deposit into financial account #" + finAccountId + " [" + amount + "]", module);
 
         // get the previous balance
         BigDecimal previousBalance = finAccount.getBigDecimal("actualBalance");
diff --git a/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountProductServices.java b/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountProductServices.java
index 34f918d..228ba3d 100644
--- a/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountProductServices.java
+++ b/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountProductServices.java
@@ -27,6 +27,7 @@
 import org.ofbiz.entity.GenericValue;
 import org.ofbiz.entity.GenericEntityException;
 import org.ofbiz.entity.util.EntityUtil;
+import org.ofbiz.entity.util.EntityUtilProperties;
 import org.ofbiz.base.util.*;
 import org.ofbiz.base.util.string.FlexibleStringExpander;
 import org.ofbiz.order.order.OrderReadHelper;
@@ -110,7 +111,7 @@
 
         // make sure we have a currency
         if (currency == null) {
-            currency = UtilProperties.getPropertyValue("general.properties", "currency.uom.id.default", "USD");
+            currency = EntityUtilProperties.getPropertyValue("general.properties", "currency.uom.id.default", "USD", delegator);
         }
 
         // get the product store
diff --git a/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountServices.java b/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountServices.java
index 3d73b6c..6585a8c 100644
--- a/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountServices.java
+++ b/applications/accounting/src/org/ofbiz/accounting/finaccount/FinAccountServices.java
@@ -282,7 +282,7 @@
         }
 
         String statusId = finAccount.getString("statusId");
-        Debug.log("FinAccount Balance [" + balance + "] Available [" + availableBalance + "] - Status: " + statusId, module);
+        Debug.logInfo("FinAccount Balance [" + balance + "] Available [" + availableBalance + "] - Status: " + statusId, module);
 
         Map<String, Object> result = ServiceUtil.returnSuccess();
         result.put("availableBalance", availableBalance);
diff --git a/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java b/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java
index db55bde..55ba94f 100644
--- a/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java
+++ b/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceServices.java
@@ -2207,7 +2207,7 @@
                 }
             }
         } else {
-            Debug.log("No payments found for Invoice #" + invoiceId, module);
+            Debug.logInfo("No payments found for Invoice #" + invoiceId, module);
         }
 
         return ServiceUtil.returnSuccess();
diff --git a/applications/accounting/src/org/ofbiz/accounting/payment/BillingAccountWorker.java b/applications/accounting/src/org/ofbiz/accounting/payment/BillingAccountWorker.java
index c216f8b..6d31322 100644
--- a/applications/accounting/src/org/ofbiz/accounting/payment/BillingAccountWorker.java
+++ b/applications/accounting/src/org/ofbiz/accounting/payment/BillingAccountWorker.java
@@ -84,9 +84,7 @@
 
         if (billingAccountRoleList.size() > 0) {
             BigDecimal totalAvailable = BigDecimal.ZERO;
-            Iterator<GenericValue> billingAcctIter = billingAccountRoleList.iterator();
-            while (billingAcctIter.hasNext()) {
-                GenericValue billingAccountRole = billingAcctIter.next();
+            for(GenericValue billingAccountRole : billingAccountRoleList) {
                 GenericValue billingAccountVO = billingAccountRole.getRelatedOne("BillingAccount");
 
                 // skip accounts that have thruDate < nowTimestamp
diff --git a/applications/accounting/src/org/ofbiz/accounting/payment/GiftCertificateServices.java b/applications/accounting/src/org/ofbiz/accounting/payment/GiftCertificateServices.java
index eed4205..8a99ff3 100644
--- a/applications/accounting/src/org/ofbiz/accounting/payment/GiftCertificateServices.java
+++ b/applications/accounting/src/org/ofbiz/accounting/payment/GiftCertificateServices.java
@@ -39,6 +39,7 @@
 import org.ofbiz.entity.GenericEntityException;
 import org.ofbiz.entity.GenericValue;
 import org.ofbiz.entity.util.EntityUtil;
+import org.ofbiz.entity.util.EntityUtilProperties;
 import org.ofbiz.order.finaccount.FinAccountHelper;
 import org.ofbiz.order.order.OrderReadHelper;
 import org.ofbiz.product.store.ProductStoreWorker;
@@ -74,7 +75,7 @@
         }
         String currencyUom = (String) context.get("currency");
         if (UtilValidate.isEmpty(currencyUom)) {
-            currencyUom = UtilProperties.getPropertyValue("general.properties", "currency.uom.id.default", "USD");
+            currencyUom = EntityUtilProperties.getPropertyValue("general.properties", "currency.uom.id.default", "USD", delegator);
         }
 
         String cardNumber = null;
@@ -153,7 +154,7 @@
         result.put("processResult", Boolean.TRUE);
         result.put("responseCode", "1");
         result.put("referenceNum", refNum);
-        Debug.log("Create GC Result - " + result, module);
+        Debug.logInfo("Create GC Result - " + result, module);
         return result;
     }
 
@@ -175,7 +176,7 @@
         }
         String currencyUom = (String) context.get("currency");
         if (UtilValidate.isEmpty(currencyUom)) {
-            currencyUom = UtilProperties.getPropertyValue("general.properties", "currency.uom.id.default", "USD");
+            currencyUom = EntityUtilProperties.getPropertyValue("general.properties", "currency.uom.id.default", "USD", delegator);
         }
 
         String finAccountId = null;
@@ -242,7 +243,7 @@
         result.put("processResult", Boolean.TRUE);
         result.put("responseCode", "1");
         result.put("referenceNum", refNum);
-        Debug.log("Add Funds GC Result - " + result, module);
+        Debug.logInfo("Add Funds GC Result - " + result, module);
         return result;
     }
 
@@ -263,7 +264,7 @@
         }
         String currencyUom = (String) context.get("currency");
         if (UtilValidate.isEmpty(currencyUom)) {
-            currencyUom = UtilProperties.getPropertyValue("general.properties", "currency.uom.id.default", "USD");
+            currencyUom = EntityUtilProperties.getPropertyValue("general.properties", "currency.uom.id.default", "USD", delegator);
         }
 
         // validate the amount
@@ -325,7 +326,7 @@
         result.put("processResult", procResult);
         result.put("responseCode", "2");
         result.put("referenceNum", refNum);
-        Debug.log("Redeem GC Result - " + result, module);
+        Debug.logInfo("Redeem GC Result - " + result, module);
         return result;
     }
 
@@ -350,13 +351,13 @@
         }
 
         // TODO: get the real currency from context
-        //String currencyUom = UtilProperties.getPropertyValue("general.properties", "currency.uom.id.default", "USD");
+        //String currencyUom = EntityUtilProperties.getPropertyValue("general.properties", "currency.uom.id.default", "USD", delegator);
         // get the balance
         BigDecimal balance = finAccount.get("availableBalance") == null ? BigDecimal.ZERO : finAccount.getBigDecimal("availableBalance");
 
         Map<String, Object> result = ServiceUtil.returnSuccess();
         result.put("balance", balance);
-        Debug.log("GC Balance Result - " + result, module);
+        Debug.logInfo("GC Balance Result - " + result, module);
         return result;
     }
 
@@ -370,7 +371,7 @@
         String currency = (String) context.get("currency");
         // make sure we have a currency
         if (currency == null) {
-            currency = UtilProperties.getPropertyValue("general.properties", "currency.uom.id.default", "USD");
+            currency = EntityUtilProperties.getPropertyValue("general.properties", "currency.uom.id.default", "USD", delegator);
         }
 
         // get the authorizations
@@ -469,7 +470,7 @@
 
         // make sure we have a currency
         if (currency == null) {
-            currency = UtilProperties.getPropertyValue("general.properties", "currency.uom.id.default", "USD");
+            currency = EntityUtilProperties.getPropertyValue("general.properties", "currency.uom.id.default", "USD", delegator);
         }
 
         // obtain the order information
@@ -647,7 +648,7 @@
 
         // make sure we have a currency
         if (currency == null) {
-            currency = UtilProperties.getPropertyValue("general.properties", "currency.uom.id.default", "USD");
+            currency = EntityUtilProperties.getPropertyValue("general.properties", "currency.uom.id.default", "USD", delegator);
         }
 
         Map<String, Object> refundCtx = FastMap.newInstance();
@@ -714,7 +715,7 @@
 
         // make sure we have a currency
         if (currency == null) {
-            currency = UtilProperties.getPropertyValue("general.properties", "currency.uom.id.default", "USD");
+            currency = EntityUtilProperties.getPropertyValue("general.properties", "currency.uom.id.default", "USD", delegator);
         }
 
         // get the product store
@@ -798,9 +799,7 @@
         // make a map of answer info
         Map<String, Object> answerMap = FastMap.newInstance();
         if (responseAnswers != null) {
-            Iterator<GenericValue> rai = responseAnswers.iterator();
-            while (rai.hasNext()) {
-                GenericValue answer = rai.next();
+            for(GenericValue answer : responseAnswers) {
                 GenericValue question = null;
                 try {
                     question = answer.getRelatedOne("SurveyQuestion");
@@ -971,7 +970,7 @@
 
         // make sure we have a currency
         if (currency == null) {
-            currency = UtilProperties.getPropertyValue("general.properties", "currency.uom.id.default", "USD");
+            currency = EntityUtilProperties.getPropertyValue("general.properties", "currency.uom.id.default", "USD", delegator);
         }
 
         // get the product store
@@ -1036,9 +1035,7 @@
         // make a map of answer info
         Map<String, Object> answerMap = FastMap.newInstance();
         if (responseAnswers != null) {
-            Iterator<GenericValue> rai = responseAnswers.iterator();
-            while (rai.hasNext()) {
-                GenericValue answer = rai.next();
+            for(GenericValue answer : responseAnswers) {
                 GenericValue question = null;
                 try {
                     question = answer.getRelatedOne("SurveyQuestion");
@@ -1355,7 +1352,7 @@
         }
         if (finAccount != null) {
             String dbPin = finAccount.getString("finAccountCode");
-            Debug.log("GC Pin Validation: [Sent: " + pinNumber + "] [Actual: " + dbPin + "]", module);
+            Debug.logInfo("GC Pin Validation: [Sent: " + pinNumber + "] [Actual: " + dbPin + "]", module);
             if (dbPin != null && dbPin.equals(pinNumber)) {
                 return true;
             }
diff --git a/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java b/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java
index 914ec9a..c90206f 100644
--- a/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java
+++ b/applications/accounting/src/org/ofbiz/accounting/payment/PaymentGatewayServices.java
@@ -53,6 +53,7 @@
 import org.ofbiz.entity.model.ModelEntity;
 import org.ofbiz.entity.util.EntityListIterator;
 import org.ofbiz.entity.util.EntityUtil;
+import org.ofbiz.entity.util.EntityUtilProperties;
 import org.ofbiz.order.order.OrderChangeHelper;
 import org.ofbiz.order.order.OrderReadHelper;
 import org.ofbiz.party.contact.ContactHelper;
@@ -236,10 +237,7 @@
                                     }
 
                                     if (UtilValidate.isNotEmpty(otherPaymentMethodAndCreditCardList)) {
-                                        Iterator<GenericValue> otherPaymentMethodAndCreditCardIter = otherPaymentMethodAndCreditCardList.iterator();
-                                        while (otherPaymentMethodAndCreditCardIter.hasNext()) {
-                                            GenericValue otherPaymentMethodAndCreditCard = otherPaymentMethodAndCreditCardIter.next();
-
+                                        for (GenericValue otherPaymentMethodAndCreditCard : otherPaymentMethodAndCreditCardList) {
                                             // change OrderPaymentPreference in memory only and call auth service
                                             orderPaymentPreference.set("paymentMethodId", otherPaymentMethodAndCreditCard.getString("paymentMethodId"));
                                             Map<String, Object> authRetryResult = authPayment(dispatcher, userLogin, orh, orderPaymentPreference, totalRemaining, reAuth, transAmount);
@@ -367,9 +365,7 @@
         int finished = 0;
         int hadError = 0;
         List<String> messages = FastList.newInstance();
-        Iterator<GenericValue> payments = paymentPrefs.iterator();
-        while (payments.hasNext()) {
-            GenericValue paymentPref = payments.next();
+        for(GenericValue paymentPref : paymentPrefs) {
             if (reAuth && "PAYMENT_AUTHORIZED".equals(paymentPref.getString("statusId"))) {
                 String paymentConfig = null;
                 // get the payment settings i.e. serviceName and config properties file name
@@ -765,10 +761,8 @@
 
         // iterate over the prefs and release each one
         List<GenericValue> finished = FastList.newInstance();
-        Iterator<GenericValue> payments = paymentPrefs.iterator();
-        while (payments.hasNext()) {
-            paymentPref = payments.next();
-            Map<String, Object> releaseContext = UtilMisc.toMap("userLogin", userLogin, "orderPaymentPreferenceId", paymentPref.getString("orderPaymentPreferenceId"));
+        for(GenericValue pPref : paymentPrefs) {
+            Map<String, Object> releaseContext = UtilMisc.toMap("userLogin", userLogin, "orderPaymentPreferenceId", pPref.getString("orderPaymentPreferenceId"));
             Map<String, Object> releaseResult = null;
             try {
                 releaseResult = dispatcher.runSync("releaseOrderPaymentPreference", releaseContext);
@@ -826,11 +820,9 @@
         List<GenericValue> messageEntities = FastList.newInstance();
         List<String> messages = UtilGenerics.cast(context.get("internalRespMsgs"));
         if (UtilValidate.isNotEmpty(messages)) {
-            Iterator<String> i = messages.iterator();
-            while (i.hasNext()) {
+            for(String message : messages) {
                 GenericValue respMsg = delegator.makeValue("PaymentGatewayRespMsg");
                 String respMsgId = delegator.getNextSeqId("PaymentGatewayRespMsg");
-                String message = i.next();
                 respMsg.set("paymentGatewayRespMsgId", respMsgId);
                 respMsg.set("paymentGatewayResponseId", responseId);
                 respMsg.set("pgrMessage", message);
@@ -2158,9 +2150,9 @@
         }
         if (amount.compareTo(ZERO) == 0) {
             amount = paymentPreference.getBigDecimal("maxAmount");
-            Debug.log("resetting payment amount from 0.00 to correctMax amount", module);
+            Debug.logInfo("resetting payment amount from 0.00 to correctMax amount", module);
         }
-        Debug.log("reauth with amount: " + amount, module);
+        Debug.logInfo("reauth with amount: " + amount, module);
 
         // first re-auth the card
         Map<String, Object> authPayRes = authPayment(dispatcher, userLogin, orh, paymentPreference, amount, true, null);
@@ -2620,7 +2612,7 @@
                 return ServiceUtil.returnError(UtilProperties.getMessage(resource, 
                         "AccountingPaymentCreationError", locale));
             }
-            //Debug.log("Payment created : " + paymentId, module);
+            //Debug.logInfo("Payment created : " + paymentId, module);
 
             if (paymentId == null) {
                 return ServiceUtil.returnError(UtilProperties.getMessage(resource, 
@@ -3089,7 +3081,7 @@
         // this record is not to be stored, just passed to the service for use
 
         // get the default currency
-        String currency = UtilProperties.getPropertyValue("general.properties", "currency.uom.id.default", "USD");
+        String currency = EntityUtilProperties.getPropertyValue("general.properties", "currency.uom.id.default", "USD", delegator);
 
         // prepare the auth context
         Map<String, Object> authContext = FastMap.newInstance();
@@ -3254,7 +3246,7 @@
             requestContext.put("billToParty", orh.getBillToParty());
             requestContext.put("billToEmail", billToEmail);
             requestContext.put("referenceCode", referenceCode);
-            String currency = UtilProperties.getPropertyValue("general.properties", "currency.uom.id.default", "USD");
+            String currency = EntityUtilProperties.getPropertyValue("general.properties", "currency.uom.id.default", "USD", delegator);
             requestContext.put("currency", currency);
             requestContext.put("creditAmount", context.get("amount"));
         } else {
@@ -3693,7 +3685,7 @@
         cal.setTimeInMillis(txStamp.getTime());
         cal.add(Calendar.MINUTE, 2);
         Timestamp twoMinAfter = new Timestamp(cal.getTimeInMillis());
-        Debug.log("Re-Auth Capture Test : Tx Date - " + txStamp + " : 2 Min - " + twoMinAfter + " : Now - " + nowStamp, module);
+        Debug.logInfo("Re-Auth Capture Test : Tx Date - " + txStamp + " : 2 Min - " + twoMinAfter + " : Now - " + nowStamp, module);
 
         if (nowStamp.after(twoMinAfter)) {
             result.put("captureResult", Boolean.FALSE);
diff --git a/applications/accounting/src/org/ofbiz/accounting/payment/PaymentWorker.java b/applications/accounting/src/org/ofbiz/accounting/payment/PaymentWorker.java
index 9eec4a5..08c5370 100644
--- a/applications/accounting/src/org/ofbiz/accounting/payment/PaymentWorker.java
+++ b/applications/accounting/src/org/ofbiz/accounting/payment/PaymentWorker.java
@@ -263,7 +263,7 @@
     }
 
     /**
-     * Method to return the total amount of an payment which is applied to a payment
+     * Method to return the total amount of a payment which is applied to a payment
      * @param payment GenericValue object of the Payment
      * @param actual false for currency of the payment, true for the actual currency
      * @return the applied total as BigDecimal in the currency of the payment
@@ -298,7 +298,10 @@
     }
 
     public static BigDecimal getPaymentNotApplied(GenericValue payment) {
-        return payment.getBigDecimal("amount").subtract(getPaymentApplied(payment)).setScale(decimals,rounding);
+        if (payment != null) { 
+            return payment.getBigDecimal("amount").subtract(getPaymentApplied(payment)).setScale(decimals,rounding);
+        } 
+        return BigDecimal.ZERO;
     }
 
     public static BigDecimal getPaymentNotApplied(GenericValue payment, Boolean actual) {
diff --git a/applications/accounting/src/org/ofbiz/accounting/tax/TaxAuthorityServices.java b/applications/accounting/src/org/ofbiz/accounting/tax/TaxAuthorityServices.java
index 9d1188f..bdfa372 100644
--- a/applications/accounting/src/org/ofbiz/accounting/tax/TaxAuthorityServices.java
+++ b/applications/accounting/src/org/ofbiz/accounting/tax/TaxAuthorityServices.java
@@ -110,9 +110,7 @@
                 }
 
                 // add up amounts from adjustments (amount OR exemptAmount, sourcePercentage)
-                Iterator<GenericValue> taxAdustmentIter = taxAdustmentList.iterator();
-                while (taxAdustmentIter.hasNext()) {
-                    GenericValue taxAdjustment = taxAdustmentIter.next();
+                for(GenericValue taxAdjustment : taxAdustmentList) {
                     if ("SALES_TAX".equals(taxAdjustment.getString("orderAdjustmentTypeId"))) {
                         taxPercentage = taxPercentage.add(taxAdjustment.getBigDecimal("sourcePercentage"));
                         BigDecimal adjAmount = taxAdjustment.getBigDecimal("amount");
@@ -298,9 +296,7 @@
                 EntityOperator.AND,
                 EntityCondition.makeCondition("taxAuthGeoId", EntityOperator.EQUALS, "_NA_")));
 
-        Iterator<GenericValue> taxAuthorityIter = taxAuthoritySet.iterator();
-        while (taxAuthorityIter.hasNext()) {
-            GenericValue taxAuthority = taxAuthorityIter.next();
+        for(GenericValue taxAuthority : taxAuthoritySet) {
             EntityCondition taxAuthCond = EntityCondition.makeCondition(
                     EntityCondition.makeCondition("taxAuthPartyId", EntityOperator.EQUALS, taxAuthority.getString("taxAuthPartyId")),
                     EntityOperator.AND,
@@ -332,9 +328,7 @@
                 }
                 List<GenericValue> pcmList = delegator.findList("ProductCategoryMember", productIdCond, UtilMisc.toSet("productCategoryId"), null, null, true);
                 pcmList = EntityUtil.filterByDate(pcmList, true);
-                Iterator<GenericValue> pcmIter = pcmList.iterator();
-                while (pcmIter.hasNext()) {
-                    GenericValue pcm = pcmIter.next();
+                for(GenericValue pcm : pcmList) {
                     productCategoryIdSet.add(pcm.getString("productCategoryId"));
                 }
 
@@ -396,9 +390,7 @@
             }
 
             // find the right entry(s) based on purchase amount
-            Iterator<GenericValue> flIt = filteredList.iterator();
-            while (flIt.hasNext()) {
-                GenericValue taxAuthorityRateProduct = flIt.next();
+            for(GenericValue taxAuthorityRateProduct : filteredList) {
                 BigDecimal taxRate = taxAuthorityRateProduct.get("taxPercentage") != null ? taxAuthorityRateProduct.getBigDecimal("taxPercentage") : ZERO_BASE;
                 BigDecimal taxable = ZERO_BASE;
 
@@ -478,9 +470,7 @@
                     Set<String> billToPartyIdSet = FastSet.newInstance();
                     billToPartyIdSet.add(billToPartyId);
                     List<GenericValue> partyRelationshipList = EntityUtil.filterByDate(delegator.findByAndCache("PartyRelationship", UtilMisc.toMap("partyIdTo", billToPartyId, "partyRelationshipTypeId", "GROUP_ROLLUP")), true);
-                    Iterator<GenericValue> partyRelationshipIter = partyRelationshipList.iterator();
-                    while (partyRelationshipIter.hasNext()) {
-                        GenericValue partyRelationship = partyRelationshipIter.next();
+                    for(GenericValue partyRelationship : partyRelationshipList) {
                         billToPartyIdSet.add(partyRelationship.getString("partyIdFrom"));
                     }
                     handlePartyTaxExempt(taxAdjValue, billToPartyIdSet, taxAuthGeoId, taxAuthPartyId, taxAmount, nowTimestamp, delegator);
@@ -575,7 +565,7 @@
                     UtilMisc.toList("-fromDate"));
             taxAuthorityAssocList = EntityUtil.filterByDate(taxAuthorityAssocList, true);
             GenericValue taxAuthorityAssoc = EntityUtil.getFirst(taxAuthorityAssocList);
-            // Debug.log("Parent assoc to " + taxAuthGeoId + " : " + taxAuthorityAssoc, module);
+            // Debug.logInfo("Parent assoc to " + taxAuthGeoId + " : " + taxAuthorityAssoc, module);
             if (taxAuthorityAssoc != null) {
                 handlePartyTaxExempt(adjValue, billToPartyIdSet, taxAuthorityAssoc.getString("taxAuthGeoId"), taxAuthorityAssoc.getString("taxAuthPartyId"), taxAmount, nowTimestamp, delegator);
             }
diff --git a/applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/AIMPaymentServices.java b/applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/AIMPaymentServices.java
index 27cc078..d1a60a1 100644
--- a/applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/AIMPaymentServices.java
+++ b/applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/AIMPaymentServices.java
@@ -651,7 +651,7 @@
             results.put("authRefNum", ar.getTransactionId());
             results.put("cvCode", ar.getCvResult());
             results.put("avsCode", ar.getAvsResult());
-            if (ar.getAmount() == BigDecimal.ZERO) {
+            if (BigDecimal.ZERO.compareTo(ar.getAmount()) == 0) {
                 results.put("processAmount", getXAmount(request));
             } else {
                 results.put("processAmount", ar.getAmount());
@@ -673,7 +673,7 @@
         results.put("captureRefNum", ar.getTransactionId());
         if (captureResult.booleanValue()) { //passed
             results.put("captureCode", ar.getAuthorizationCode());
-            if (ar.getAmount() == BigDecimal.ZERO) {
+            if (BigDecimal.ZERO.compareTo(ar.getAmount()) == 0) {
                 results.put("captureAmount", getXAmount(request));
             } else {
                 results.put("captureAmount", ar.getAmount());
@@ -694,7 +694,7 @@
         results.put("refundRefNum", ar.getTransactionId());
         if (captureResult.booleanValue()) { //passed
             results.put("refundCode", ar.getAuthorizationCode());
-            if (ar.getAmount() == BigDecimal.ZERO) {
+            if (BigDecimal.ZERO.compareTo(ar.getAmount()) == 0) {
                 results.put("refundAmount", getXAmount(request));
             } else {
                 results.put("refundAmount", ar.getAmount());
@@ -716,7 +716,7 @@
         results.put("releaseRefNum", ar.getTransactionId());
         if (captureResult.booleanValue()) { //passed
             results.put("releaseCode", ar.getAuthorizationCode());
-            if (ar.getAmount() == BigDecimal.ZERO) {
+            if (BigDecimal.ZERO.compareTo(ar.getAmount()) == 0) {
                 results.put("releaseAmount", getXAmount(request));
             } else {
                 results.put("releaseAmount", ar.getAmount());
@@ -743,7 +743,7 @@
             results.put("authRefNum", ar.getTransactionId());
             results.put("cvCode", ar.getCvResult());
             results.put("avsCode", ar.getAvsResult());
-            if (ar.getAmount() == BigDecimal.ZERO) {
+            if (BigDecimal.ZERO.compareTo(ar.getAmount()) == 0) {
                 results.put("processAmount", getXAmount(request));
             } else {
                 results.put("processAmount", ar.getAmount());
@@ -793,8 +793,9 @@
     private static BigDecimal getXAmount(Map<String, Object> request) {
         BigDecimal amt = BigDecimal.ZERO;
         if (request.get("x_Amount") != null) {
+            BigDecimal amount = (BigDecimal) request.get("x_Amount");
             try {
-                amt = new BigDecimal((String) request.get("x_Amount"));
+                amt = amount;
             } catch (NumberFormatException e) {
                 Debug.logWarning(e, e.getMessage(), module);
             }
diff --git a/applications/accounting/src/org/ofbiz/accounting/thirdparty/clearcommerce/CCPaymentServices.java b/applications/accounting/src/org/ofbiz/accounting/thirdparty/clearcommerce/CCPaymentServices.java
index fc2bedb..065540c 100644
--- a/applications/accounting/src/org/ofbiz/accounting/thirdparty/clearcommerce/CCPaymentServices.java
+++ b/applications/accounting/src/org/ofbiz/accounting/thirdparty/clearcommerce/CCPaymentServices.java
@@ -795,7 +795,7 @@
                 GenericValue countryGeo = address.getRelatedOneCache("CountryGeo");
                 UtilXml.addChildElementValue(addressElement, "Country", countryGeo.getString("geoSecCode"), document);
             } catch (GenericEntityException gee) {
-                Debug.log(gee, "Error finding related Geo for countryGeoId: " + countryGeoId, module);
+                Debug.logInfo(gee, "Error finding related Geo for countryGeoId: " + countryGeoId, module);
             }
         }
     }
@@ -909,7 +909,7 @@
         try {
             response = http.post();
         } catch (HttpClientException hce) {
-            Debug.log(hce, module);
+            Debug.logInfo(hce, module);
             throw new ClearCommerceException("ClearCommerce connection problem", hce);
         }
 
diff --git a/applications/accounting/src/org/ofbiz/accounting/thirdparty/cybersource/IcsPaymentServices.java b/applications/accounting/src/org/ofbiz/accounting/thirdparty/cybersource/IcsPaymentServices.java
index 2d4e084..38eb7be 100644
--- a/applications/accounting/src/org/ofbiz/accounting/thirdparty/cybersource/IcsPaymentServices.java
+++ b/applications/accounting/src/org/ofbiz/accounting/thirdparty/cybersource/IcsPaymentServices.java
@@ -289,7 +289,7 @@
         if (UtilValidate.isNotEmpty(keysFile)) {
             props.put("alternateKeyFilename", keysFile);
         }
-        Debug.log("Created CyberSource Properties : " + props, module);
+        Debug.logInfo("Created CyberSource Properties : " + props, module);
         return props;
     }
 
diff --git a/applications/accounting/src/org/ofbiz/accounting/thirdparty/gosoftware/PcChargeServices.java b/applications/accounting/src/org/ofbiz/accounting/thirdparty/gosoftware/PcChargeServices.java
index bc4bb95..5126ad3 100644
--- a/applications/accounting/src/org/ofbiz/accounting/thirdparty/gosoftware/PcChargeServices.java
+++ b/applications/accounting/src/org/ofbiz/accounting/thirdparty/gosoftware/PcChargeServices.java
@@ -438,7 +438,7 @@
         props.put("host", host);
         props.put("port", port);
         props.put("autoBill", autoBill);
-        Debug.log("Returning properties - " + props, module);
+        Debug.logInfo("Returning properties - " + props, module);
 
         return props;
     }
diff --git a/applications/accounting/src/org/ofbiz/accounting/thirdparty/gosoftware/RitaApi.java b/applications/accounting/src/org/ofbiz/accounting/thirdparty/gosoftware/RitaApi.java
index 2647057..66f5c02 100644
--- a/applications/accounting/src/org/ofbiz/accounting/thirdparty/gosoftware/RitaApi.java
+++ b/applications/accounting/src/org/ofbiz/accounting/thirdparty/gosoftware/RitaApi.java
@@ -175,7 +175,7 @@
 
         if (mode == MODE_IN) {
             String stream = this.toString() + "..\r\n";
-            Debug.log("Sending - \n" + stream, module);
+            Debug.logInfo("Sending - \n" + stream, module);
             String urlString = "http://" + host + ":" + port;
             HttpClient http = new HttpClient(urlString);
             http.setDebug(true);
@@ -203,7 +203,7 @@
 
             // read the response
             while ((line = br.readLine()) != null) {
-                Debug.log(line, module);
+                Debug.logInfo(line, module);
                 if (!line.trim().equals(".")) {
                     String[] lineSplit = line.trim().split(" ");
                     if (lineSplit != null && lineSplit.length == 2) {
@@ -215,7 +215,7 @@
                     break;
                 }
             }
-            Debug.log("Reading finished.", module);
+            Debug.logInfo("Reading finished.", module);
 
             // send session finished signal
             ps.print("..\r\n");
@@ -237,7 +237,7 @@
 
             String[] lines = resp.split("\n");
             for (int i = 0; i < lines.length; i++) {
-                Debug.log(lines[i], module);
+                Debug.logInfo(lines[i], module);
                 if (!lines[i].trim().equals(".")) {
                     String[] lineSplit = lines[i].trim().split(" ", 2);
                     if (lineSplit != null && lineSplit.length == 2) {
diff --git a/applications/accounting/src/org/ofbiz/accounting/thirdparty/gosoftware/RitaServices.java b/applications/accounting/src/org/ofbiz/accounting/thirdparty/gosoftware/RitaServices.java
index dcf670d..abc1486 100644
--- a/applications/accounting/src/org/ofbiz/accounting/thirdparty/gosoftware/RitaServices.java
+++ b/applications/accounting/src/org/ofbiz/accounting/thirdparty/gosoftware/RitaServices.java
@@ -84,7 +84,7 @@
         // send the transaction
         RitaApi out = null;
         try {
-            Debug.log("Sending request to RiTA", module);
+            Debug.logInfo("Sending request to RiTA", module);
             out = api.send();
         } catch (IOException e) {
             Debug.logError(e, module);
@@ -544,7 +544,7 @@
         props.put("ssl", ssl);
         props.put("autoBill", autoBill);
         props.put("forceTx", forceTx);
-        Debug.log("Returning properties - " + props, module);
+        Debug.logInfo("Returning properties - " + props, module);
 
         return props;
     }
diff --git a/applications/accounting/src/org/ofbiz/accounting/thirdparty/ideal/IdealEvents.java b/applications/accounting/src/org/ofbiz/accounting/thirdparty/ideal/IdealEvents.java
index b01cd11..3693aec 100644
--- a/applications/accounting/src/org/ofbiz/accounting/thirdparty/ideal/IdealEvents.java
+++ b/applications/accounting/src/org/ofbiz/accounting/thirdparty/ideal/IdealEvents.java
@@ -193,10 +193,7 @@
         GenericValue userLogin = (GenericValue) request.getSession().getAttribute("userLogin");
         Map <String, Object> parametersMap = UtilHttp.getParameterMap(request);
         String transactionId = request.getParameter("trxid");
-        Set<String> keySet = parametersMap.keySet();
-        Iterator<String> i = keySet.iterator();
-        while (i.hasNext()) {
-            String name = (String) i.next();
+        for(String name : parametersMap.keySet()) {
             String value = request.getParameter(name);
             Debug.logError("### Param: " + name + " => " + value, module);
         }
@@ -321,9 +318,7 @@
             return false;
         }
         if (paymentPrefs.size() > 0) {
-            Iterator <GenericValue> i = paymentPrefs.iterator();
-            while (i.hasNext()) {
-                GenericValue pref = i.next();
+            for(GenericValue pref : paymentPrefs) {
                 boolean okay = setPaymentPreference(dispatcher, userLogin, pref, request);
                 if (!okay)
                     return false;
diff --git a/applications/accounting/src/org/ofbiz/accounting/thirdparty/orbital/OrbitalPaymentServices.java b/applications/accounting/src/org/ofbiz/accounting/thirdparty/orbital/OrbitalPaymentServices.java
index 1962a66..8f88739 100644
--- a/applications/accounting/src/org/ofbiz/accounting/thirdparty/orbital/OrbitalPaymentServices.java
+++ b/applications/accounting/src/org/ofbiz/accounting/thirdparty/orbital/OrbitalPaymentServices.java
@@ -372,9 +372,9 @@
 
             //Display the request
             if ("AUTH_ONLY".equals(transType)) {
-                Debug.log("\nAuth Request:\n ======== " + request.getXML());
+                Debug.logInfo("\nAuth Request:\n ======== " + request.getXML());
             } else if ("AUTH_CAPTURE".equals(transType)) {
-                Debug.log("\nAuth Capture Request:\n ======== " + request.getXML());
+                Debug.logInfo("\nAuth Capture Request:\n ======== " + request.getXML());
             }
             results.put("processAmount", amount);
         } catch (InitializationException ie) {
@@ -414,7 +414,7 @@
                 }
             }
             //Display the request
-            Debug.log("\nCapture Request:\n ======== " + request.getXML());
+            Debug.logInfo("\nCapture Request:\n ======== " + request.getXML());
             results.put("captureAmount", amount);
         } catch (InitializationException ie) {
             Debug.logInfo("Unable to initialize request object", module);
@@ -446,7 +446,7 @@
             request.setFieldValue("Exp", UtilFormatOut.checkNull(expDate));
             request.setFieldValue("Comments", "This is a credit card refund");
 
-            Debug.log("\nRefund Request:\n ======== " + request.getXML());
+            Debug.logInfo("\nRefund Request:\n ======== " + request.getXML());
             results.put("refundAmount", amount);
         } catch (InitializationException ie) {
             Debug.logInfo("Unable to initialize request object", module);
@@ -470,7 +470,7 @@
             request.setFieldValue("OrderID", UtilFormatOut.checkNull(orderId));
 
             //Display the request
-            Debug.log("\nRelease Request:\n ======== " + request.getXML());
+            Debug.logInfo("\nRelease Request:\n ======== " + request.getXML());
             results.put("releaseAmount", amount);
         } catch (InitializationException ie) {
             Debug.logInfo("Unable to initialize request object", module);
diff --git a/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalEvents.java b/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalEvents.java
index 7cb9939..e1b5892 100644
--- a/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalEvents.java
+++ b/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalEvents.java
@@ -247,10 +247,7 @@
 
         Debug.logInfo("Got verification from PayPal, processing..", module);
         boolean verified = false;
-        Set <String> keySet = parametersMap.keySet();
-        Iterator <String> i = keySet.iterator();
-        while (i.hasNext()) {
-            String name = i.next();
+        for(String name : parametersMap.keySet()) {
             String value = request.getParameter(name);
             Debug.logError("### Param: " + name + " => " + value, module);
             if (UtilValidate.isNotEmpty(name) && "payer_status".equalsIgnoreCase(name) &&
@@ -417,9 +414,7 @@
             return false;
         }
         if (paymentPrefs.size() > 0) {
-            Iterator <GenericValue> i = paymentPrefs.iterator();
-            while (i.hasNext()) {
-                GenericValue pref = i.next();
+            for(GenericValue pref : paymentPrefs) {
                 boolean okay = setPaymentPreference(dispatcher, userLogin, pref, request);
                 if (!okay)
                     return false;
diff --git a/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalServices.java b/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalServices.java
index 542aa96..8da912b 100644
--- a/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalServices.java
+++ b/applications/accounting/src/org/ofbiz/accounting/thirdparty/paypal/PayPalServices.java
@@ -586,7 +586,7 @@
                 }
             } catch (GenericServiceException e) {
                 // Not the end of the world, we'll carry on
-                Debug.log(e.getMessage());
+                Debug.logInfo(e.getMessage(), module);
             }
         }
 
diff --git a/applications/accounting/src/org/ofbiz/accounting/thirdparty/sagepay/SagePayUtil.java b/applications/accounting/src/org/ofbiz/accounting/thirdparty/sagepay/SagePayUtil.java
index ad18c85..8b8b930 100644
--- a/applications/accounting/src/org/ofbiz/accounting/thirdparty/sagepay/SagePayUtil.java
+++ b/applications/accounting/src/org/ofbiz/accounting/thirdparty/sagepay/SagePayUtil.java
@@ -152,7 +152,7 @@
                 }
             }
         }
-        Debug.log("SagePay Response Data : " + responseData);
+        Debug.logInfo("SagePay Response Data : " + responseData, module);
         return responseData;
     }
 
@@ -173,7 +173,7 @@
             postParameters.add(new BasicNameValuePair(key, value));
         }
 
-        Debug.log("SagePay PostParameters - " + postParameters);
+        Debug.logInfo("SagePay PostParameters - " + postParameters, module);
 
         HttpEntity postEntity = new UrlEncodedFormEntity(postParameters);
         httpPost.setEntity(postEntity);
diff --git a/applications/accounting/src/org/ofbiz/accounting/thirdparty/valuelink/ValueLinkApi.java b/applications/accounting/src/org/ofbiz/accounting/thirdparty/valuelink/ValueLinkApi.java
index 0ea60a9..ddef4f5 100644
--- a/applications/accounting/src/org/ofbiz/accounting/thirdparty/valuelink/ValueLinkApi.java
+++ b/applications/accounting/src/org/ofbiz/accounting/thirdparty/valuelink/ValueLinkApi.java
@@ -100,9 +100,9 @@
         }
 
         if (debug) {
-            Debug.log("New ValueLinkApi instance created", module);
-            Debug.log("Merchant ID : " + merchantId, module);
-            Debug.log("Terminal ID : " + terminalId, module);
+            Debug.logInfo("New ValueLinkApi instance created", module);
+            Debug.logInfo("Merchant ID : " + merchantId, module);
+            Debug.logInfo("Terminal ID : " + terminalId, module);
         }
     }
 
@@ -190,7 +190,7 @@
         }
 
         if (debug) {
-            Debug.log("encryptPin : " + pin + " / " + encryptedEanHex, module);
+            Debug.logInfo("encryptPin : " + pin + " / " + encryptedEanHex, module);
         }
 
         return encryptedEanHex;
@@ -220,7 +220,7 @@
         }
 
         if (debug) {
-            Debug.log("decryptPin : " + pin + " / " + decryptedPinString, module);
+            Debug.logInfo("decryptPin : " + pin + " / " + decryptedPinString, module);
         }
 
         return decryptedPinString;
@@ -245,7 +245,7 @@
      */
     public Map<String, Object> send(String url, Map<String, Object> request) throws HttpClientException {
         if (debug) {
-            Debug.log("Request : " + url + " / " + request, module);
+            Debug.logInfo("Request : " + url + " / " + request, module);
         }
 
         // read the timeout value
@@ -310,7 +310,7 @@
                     return this.outputKeyCreation(loop, kekOnly, kekTest);
                 }
             } else {
-                Debug.log("Returned a null KeyPair", module);
+                Debug.logInfo("Returned a null KeyPair", module);
                 return this.outputKeyCreation(loop, kekOnly, kekTest);
             }
         } else {
@@ -407,7 +407,7 @@
         // initialize the parameter spec
         DHPublicKey publicKey = (DHPublicKey) this.getValueLinkPublicKey();
         DHParameterSpec dhParamSpec = publicKey.getParams();
-        //Debug.log(dhParamSpec.getP().toString() + " / " + dhParamSpec.getG().toString(), module);
+        //Debug.logInfo(dhParamSpec.getP().toString() + " / " + dhParamSpec.getG().toString(), module);
 
         // create the public/private key pair using parameters defined by valuelink
         KeyPairGenerator keyGen = KeyPairGenerator.getInstance("DH");
@@ -436,7 +436,7 @@
         byte[] secretKey = ka.generateSecret();
 
         if (debug) {
-            Debug.log("Secret Key : " + StringUtil.toHexString(secretKey) + " / " + secretKey.length,  module);
+            Debug.logInfo("Secret Key : " + StringUtil.toHexString(secretKey) + " / " + secretKey.length,  module);
         }
 
         // generate 3DES from secret key using VL algorithm (KEK)
@@ -447,7 +447,7 @@
         byte[] kek = copyBytes(des2, first8, 0);
 
         if (debug) {
-            Debug.log("Generated KEK : " + StringUtil.toHexString(kek) + " / " + kek.length, module);
+            Debug.logInfo("Generated KEK : " + StringUtil.toHexString(kek) + " / " + kek.length, module);
         }
 
         return kek;
@@ -528,7 +528,7 @@
             byte[] des3 = copyBytes(desByte1, copyBytes(desByte2, desByte3, 0), 0);
             return generateMwk(des3);
         } else {
-            Debug.log("Null DES keys returned", module);
+            Debug.logInfo("Null DES keys returned", module);
         }
 
         return null;
@@ -541,7 +541,7 @@
      */
     public byte[] generateMwk(byte[] desBytes) {
         if (debug) {
-            Debug.log("DES Key : " + StringUtil.toHexString(desBytes) + " / " + desBytes.length, module);
+            Debug.logInfo("DES Key : " + StringUtil.toHexString(desBytes) + " / " + desBytes.length, module);
         }
         SecretKeyFactory skf1 = null;
         SecretKey mwk = null;
@@ -605,10 +605,10 @@
         newMwk = copyBytes(random, newMwk, 0);
 
         if (debug) {
-            Debug.log("Random 8 byte : " + StringUtil.toHexString(random), module);
-            Debug.log("Encrypted 0's : " + StringUtil.toHexString(encryptedZeros), module);
-            Debug.log("Decrypted MWK : " + StringUtil.toHexString(mwkdes3.getEncoded()) + " / " + mwkdes3.getEncoded().length, module);
-            Debug.log("Encrypted MWK : " + StringUtil.toHexString(newMwk) + " / " + newMwk.length, module);
+            Debug.logInfo("Random 8 byte : " + StringUtil.toHexString(random), module);
+            Debug.logInfo("Encrypted 0's : " + StringUtil.toHexString(encryptedZeros), module);
+            Debug.logInfo("Decrypted MWK : " + StringUtil.toHexString(mwkdes3.getEncoded()) + " / " + mwkdes3.getEncoded().length, module);
+            Debug.logInfo("Encrypted MWK : " + StringUtil.toHexString(newMwk) + " / " + newMwk.length, module);
         }
 
         return newMwk;
@@ -656,7 +656,7 @@
         }
 
         if (debug) {
-            Debug.log("Current Working Key Index : " + this.mwkIndex, module);
+            Debug.logInfo("Current Working Key Index : " + this.mwkIndex, module);
         }
 
         return this.mwkIndex;
@@ -727,7 +727,7 @@
         request.put("EncryptID", this.getWorkingKeyIndex());
 
         if (debug) {
-            Debug.log("Created Initial Request Map : " + request, module);
+            Debug.logInfo("Created Initial Request Map : " + request, module);
         }
 
         return request;
@@ -839,8 +839,8 @@
         }
 
         if (debug) {
-            Debug.log("Raw MWK : " + StringUtil.toHexString(getMwk()), module);
-            Debug.log("MWK : " + StringUtil.toHexString(mwk.getEncoded()), module);
+            Debug.logInfo("Raw MWK : " + StringUtil.toHexString(getMwk()), module);
+            Debug.logInfo("MWK : " + StringUtil.toHexString(mwk.getEncoded()), module);
         }
 
         return mwk;
@@ -852,8 +852,8 @@
         }
 
         if (debug) {
-            Debug.log("Raw KEK : " + StringUtil.toHexString(getKek()), module);
-            Debug.log("KEK : " + StringUtil.toHexString(kek.getEncoded()), module);
+            Debug.logInfo("Raw KEK : " + StringUtil.toHexString(getKek()), module);
+            Debug.logInfo("KEK : " + StringUtil.toHexString(kek.getEncoded()), module);
         }
 
         return kek;
@@ -906,7 +906,7 @@
 
     protected Map<String, Object> parseResponse(String response) {
         if (debug) {
-            Debug.log("Raw Response : " + response, module);
+            Debug.logInfo("Raw Response : " + response, module);
         }
 
         // covert to all lowercase and trim off the html header
@@ -955,7 +955,7 @@
         }
 
         if (debug) {
-            Debug.log("Response Map : " + responseMap, module);
+            Debug.logInfo("Response Map : " + responseMap, module);
         }
 
         return responseMap;
@@ -963,7 +963,7 @@
 
     private List<Map<String, String>> parseHistoryResponse(String response) {
         if (debug) {
-            Debug.log("Raw History : " + response, module);
+            Debug.logInfo("Raw History : " + response, module);
         }
 
         // covert to all lowercase and trim off the html header
@@ -983,7 +983,7 @@
         testResponse = testResponse.trim();
         if (testResponse.length() == 0) {
             if (debug) {
-                Debug.log("History did not contain any fields, returning null", module);
+                Debug.logInfo("History did not contain any fields, returning null", module);
             }
             return null;
         }
@@ -1004,7 +1004,7 @@
         }
 
         if (debug) {
-            Debug.log("History Map : " + valueMap, module);
+            Debug.logInfo("History Map : " + valueMap, module);
         }
 
         return valueMap;
diff --git a/applications/accounting/src/org/ofbiz/accounting/thirdparty/valuelink/ValueLinkServices.java b/applications/accounting/src/org/ofbiz/accounting/thirdparty/valuelink/ValueLinkServices.java
index 18b2972..06f9559 100644
--- a/applications/accounting/src/org/ofbiz/accounting/thirdparty/valuelink/ValueLinkServices.java
+++ b/applications/accounting/src/org/ofbiz/accounting/thirdparty/valuelink/ValueLinkServices.java
@@ -41,6 +41,7 @@
 import org.ofbiz.entity.GenericEntityException;
 import org.ofbiz.entity.GenericValue;
 import org.ofbiz.entity.util.EntityUtil;
+import org.ofbiz.entity.util.EntityUtilProperties;
 import org.ofbiz.order.order.OrderReadHelper;
 import org.ofbiz.product.store.ProductStoreWorker;
 import org.ofbiz.service.DispatchContext;
@@ -69,11 +70,11 @@
 
         Boolean kekOnly = context.get("kekOnly") != null ? (Boolean) context.get("kekOnly") : Boolean.FALSE;
         String kekTest = (String) context.get("kekTest");
-        Debug.log("KEK Only : " + kekOnly.booleanValue(), module);
+        Debug.logInfo("KEK Only : " + kekOnly.booleanValue(), module);
 
         StringBuffer buf = vl.outputKeyCreation(kekOnly.booleanValue(), kekTest);
         String output = buf.toString();
-        Debug.log(":: Key Generation Output ::\n\n" + output, module);
+        Debug.logInfo(":: Key Generation Output ::\n\n" + output, module);
 
         Map<String, Object> result = ServiceUtil.returnSuccess();
         result.put("output", output);
@@ -123,7 +124,7 @@
         buf.append("======== End Test Bytes ").append(desc).append(" ========\n\n");
 
         String output = buf.toString();
-        Debug.log(":: KEK Test Output ::\n\n" + output, module);
+        Debug.logInfo(":: KEK Test Output ::\n\n" + output, module);
 
         Map<String, Object> result = ServiceUtil.returnSuccess();
         result.put("output", output);
@@ -170,7 +171,7 @@
             return ServiceUtil.returnError(UtilProperties.getMessage(resource, 
                     "AccountingValueLinkCannotUpdateWorkingKey", locale));
         }
-        Debug.log("Response : " + response, module);
+        Debug.logInfo("Response : " + response, module);
 
         // on success update the database / reload the cached api
         if (response != null) {
@@ -274,7 +275,7 @@
             result.put("expireDate", response.get("expiredate"));
             result.put("cardClass", response.get("cardclass"));
             result.put("referenceNum", response.get("traceno"));
-            Debug.log("Activate Result : " + result, module);
+            Debug.logInfo("Activate Result : " + result, module);
             return result;
         } else {
             return ServiceUtil.returnError(UtilProperties.getMessage(resource, 
@@ -333,7 +334,7 @@
             result.put("expireDate", response.get("expiredate"));
             result.put("cardClass", response.get("cardclass"));
             result.put("referenceNum", response.get("traceno"));
-            Debug.log("Link Result : " + result, module);
+            Debug.logInfo("Link Result : " + result, module);
             return result;
         } else {
             return ServiceUtil.returnError(UtilProperties.getMessage(resource, 
@@ -393,7 +394,7 @@
             result.put("expireDate", response.get("expiredate"));
             result.put("cardClass", response.get("cardclass"));
             result.put("referenceNum", response.get("traceno"));
-            Debug.log("Disable Result : " + result, module);
+            Debug.logInfo("Disable Result : " + result, module);
             return result;
         } else {
             return ServiceUtil.returnError(UtilProperties.getMessage(resource, 
@@ -463,7 +464,7 @@
             result.put("cardClass", response.get("cardclass"));
             result.put("cashBack", vl.getAmount((String) response.get("cashback")));
             result.put("referenceNum", response.get("traceno"));
-            Debug.log("Redeem Result : " + result, module);
+            Debug.logInfo("Redeem Result : " + result, module);
             return result;
         } else {
             return ServiceUtil.returnError(UtilProperties.getMessage(resource, 
@@ -532,7 +533,7 @@
             result.put("expireDate", response.get("expiredate"));
             result.put("cardClass", response.get("cardclass"));
             result.put("referenceNum", response.get("traceno"));
-            Debug.log("Reload Result : " + result, module);
+            Debug.logInfo("Reload Result : " + result, module);
             return result;
         } else {
             return ServiceUtil.returnError(UtilProperties.getMessage(resource, 
@@ -591,7 +592,7 @@
             result.put("expireDate", response.get("expiredate"));
             result.put("cardClass", response.get("cardclass"));
             result.put("referenceNum", response.get("traceno"));
-            Debug.log("Balance Result : " + result, module);
+            Debug.logInfo("Balance Result : " + result, module);
             return result;
         } else {
             return ServiceUtil.returnError(UtilProperties.getMessage(resource, 
@@ -649,7 +650,7 @@
             result.put("expireDate", response.get("expiredate"));
             result.put("cardClass", response.get("cardclass"));
             result.put("referenceNum", response.get("traceno"));
-            Debug.log("History Result : " + result, module);
+            Debug.logInfo("History Result : " + result, module);
             return result;
         } else {
             return ServiceUtil.returnError(UtilProperties.getMessage(resource, 
@@ -718,7 +719,7 @@
             result.put("expireDate", response.get("expiredate"));
             result.put("cardClass", response.get("cardclass"));
             result.put("referenceNum", response.get("traceno"));
-            Debug.log("Refund Result : " + result, module);
+            Debug.logInfo("Refund Result : " + result, module);
             return result;
         } else {
             return ServiceUtil.returnError(UtilProperties.getMessage(resource, 
@@ -749,7 +750,7 @@
     public static Map<String, Object> timeOutReversal(DispatchContext dctx, Map<String, Object> context) {
         String vlInterface = (String) context.get("Interface");
         Locale locale = (Locale) context.get("locale");
-        Debug.log("704 Interface : " + vlInterface, module);
+        Debug.logInfo("704 Interface : " + vlInterface, module);
         if (vlInterface != null) {
             if (vlInterface.startsWith("Activate")) {
                 if (vlInterface.equals("Activate/Rollback")) {
@@ -795,7 +796,7 @@
             ServiceXaWrapper xaw = new ServiceXaWrapper(dctx);
             xaw.setRollbackService("vlTimeOutReversal", context);
             //xaw.setCommitService("vlTimeOutReversal", context);
-            Debug.log("Set 704 context : " + context, module);
+            Debug.logInfo("Set 704 context : " + context, module);
             try {
                 xaw.enlist();
             } catch (XAException e) {
@@ -816,6 +817,7 @@
     // payment processing wrappers (process/release/refund)
 
     public static Map<String, Object> giftCardProcessor(DispatchContext dctx, Map<String, Object> context) {
+        Delegator delegator = dctx.getDelegator();
         LocalDispatcher dispatcher = dctx.getDispatcher();
         GenericValue userLogin = (GenericValue) context.get("userLogin");
         Locale locale = (Locale) context.get("locale");
@@ -828,7 +830,7 @@
 
         // make sure we have a currency
         if (currency == null) {
-            currency = UtilProperties.getPropertyValue("general.properties", "currency.uom.id.default", "USD");
+            currency = EntityUtilProperties.getPropertyValue("general.properties", "currency.uom.id.default", "USD", delegator);
         }
 
         Map<String, Object> redeemCtx = FastMap.newInstance();
@@ -892,6 +894,7 @@
     }
 
     public static Map<String, Object> giftCardRelease(DispatchContext dctx, Map<String, Object> context) {
+        Delegator delegator = dctx.getDelegator();
         LocalDispatcher dispatcher = dctx.getDispatcher();
         GenericValue userLogin = (GenericValue) context.get("userLogin");
         Locale locale = (Locale) context.get("locale");
@@ -920,7 +923,7 @@
 
         // make sure we have a currency
         if (currency == null) {
-            currency = UtilProperties.getPropertyValue("general.properties", "currency.uom.id.default", "USD");
+            currency = EntityUtilProperties.getPropertyValue("general.properties", "currency.uom.id.default", "USD", delegator);
         }
 
         Map<String, Object> redeemCtx = FastMap.newInstance();
@@ -956,6 +959,7 @@
     }
 
     public static Map<String, Object> giftCardRefund(DispatchContext dctx, Map<String, Object> context) {
+        Delegator delegator = dctx.getDelegator();
         LocalDispatcher dispatcher = dctx.getDispatcher();
         GenericValue userLogin = (GenericValue) context.get("userLogin");
         Locale locale = (Locale) context.get("locale");
@@ -984,7 +988,7 @@
 
         // make sure we have a currency
         if (currency == null) {
-            currency = UtilProperties.getPropertyValue("general.properties", "currency.uom.id.default", "USD");
+            currency = EntityUtilProperties.getPropertyValue("general.properties", "currency.uom.id.default", "USD", delegator);
         }
 
         Map<String, Object> refundCtx = FastMap.newInstance();
@@ -1050,7 +1054,7 @@
 
         // make sure we have a currency
         if (currency == null) {
-            currency = UtilProperties.getPropertyValue("general.properties", "currency.uom.id.default", "USD");
+            currency = EntityUtilProperties.getPropertyValue("general.properties", "currency.uom.id.default", "USD", delegator);
         }
 
         // get the product store
@@ -1155,9 +1159,7 @@
         // make a map of answer info
         Map<String, Object> answerMap = FastMap.newInstance();
         if (responseAnswers != null) {
-            Iterator<GenericValue> rai = responseAnswers.iterator();
-            while (rai.hasNext()) {
-                GenericValue answer = rai.next();
+            for(GenericValue answer : responseAnswers) {
                 GenericValue question = null;
                 try {
                     question = answer.getRelatedOne("SurveyQuestion");
@@ -1346,7 +1348,7 @@
 
         // make sure we have a currency
         if (currency == null) {
-            currency = UtilProperties.getPropertyValue("general.properties", "currency.uom.id.default", "USD");
+            currency = EntityUtilProperties.getPropertyValue("general.properties", "currency.uom.id.default", "USD", delegator);
         }
 
         // get the product store
@@ -1412,9 +1414,7 @@
         // make a map of answer info
         Map<String, Object> answerMap = FastMap.newInstance();
         if (responseAnswers != null) {
-            Iterator<GenericValue> rai = responseAnswers.iterator();
-            while (rai.hasNext()) {
-                GenericValue answer = rai.next();
+            for(GenericValue answer : responseAnswers) {
                 GenericValue question = null;
                 try {
                     question = answer.getRelatedOne("SurveyQuestion");
diff --git a/applications/accounting/src/org/ofbiz/accounting/thirdparty/verisign/PayflowPro.java b/applications/accounting/src/org/ofbiz/accounting/thirdparty/verisign/PayflowPro.java
index a9c2e3f..2f36d0c 100644
--- a/applications/accounting/src/org/ofbiz/accounting/thirdparty/verisign/PayflowPro.java
+++ b/applications/accounting/src/org/ofbiz/accounting/thirdparty/verisign/PayflowPro.java
@@ -163,7 +163,7 @@
         params.append("&").append(parseContext(data));
 
         // transmit the request
-        if (Debug.verboseOn()) Debug.logVerbose("Sending to Verisign: " + params.toString(), module);
+        //if (Debug.verboseOn()) Debug.logVerbose("Sending to Verisign: " + params.toString(), module);
         String resp;
         if (!comparePaymentGatewayConfigValue(delegator, paymentGatewayConfigId, "enableTransmit", configString, "payment.verisign.enable_transmit",  "false")) {
             resp = pfp.submitTransaction(params.toString(), pfp.generateRequestId());
@@ -671,11 +671,7 @@
         Debug.logInfo("Verisign response string: " + resp, module);
         Map<String, String> parameters = FastMap.newInstance();
         List<String> params = StringUtil.split(resp, "&");
-        Iterator<String> i = params.iterator();
-
-        while (i.hasNext()) {
-            String str = (String) i.next();
-
+        for(String str : params) {
             if (str.length() > 0) {
                 List<String> kv = StringUtil.split(str, "=");
                 String k = kv.get(0);
diff --git a/applications/accounting/src/org/ofbiz/accounting/thirdparty/worldpay/WorldPayEvents.java b/applications/accounting/src/org/ofbiz/accounting/thirdparty/worldpay/WorldPayEvents.java
index 0a00722..bdd3780 100644
--- a/applications/accounting/src/org/ofbiz/accounting/thirdparty/worldpay/WorldPayEvents.java
+++ b/applications/accounting/src/org/ofbiz/accounting/thirdparty/worldpay/WorldPayEvents.java
@@ -316,10 +316,7 @@
         GenericValue userLogin = (GenericValue) request.getSession().getAttribute("userLogin");
         Map <String, Object> parametersMap = UtilHttp.getParameterMap(request);
         String orderId = request.getParameter("cartId");
-        Set<String> keySet = parametersMap.keySet();
-        Iterator<String> i = keySet.iterator();
-        while (i.hasNext()) {
-            String name = i.next();
+        for(String name : parametersMap.keySet()) {
             String value = request.getParameter(name);
             Debug.logError("### Param: " + name + " => " + value, module);
         }
@@ -399,7 +396,7 @@
             // attempt to release the offline hold on the order (workflow)
             OrderChangeHelper.releaseInitialOrderHold(dispatcher, orderId);
             // call the email confirm service
-            Map<String, String> emailContext = UtilMisc.toMap("orderId", orderId, "userLogin", userLogin);
+            Map<String, Object> emailContext = UtilMisc.toMap("orderId", orderId, "userLogin", userLogin);
             try {
                 dispatcher.runSync("sendOrderConfirmation", emailContext);
             } catch (GenericServiceException e) {
@@ -420,9 +417,7 @@
             return false;
         }
         if (paymentPrefs.size() > 0) {
-            Iterator<GenericValue> i = paymentPrefs.iterator();
-            while (i.hasNext()) {
-                GenericValue pref = i.next();
+            for(GenericValue pref : paymentPrefs) {
                 boolean okay = setPaymentPreference(dispatcher, userLogin, pref, request);
                 if (!okay) {
                     return false;
diff --git a/applications/accounting/src/org/ofbiz/accounting/util/UtilAccounting.java b/applications/accounting/src/org/ofbiz/accounting/util/UtilAccounting.java
index 6ac86bc..1450a55 100644
--- a/applications/accounting/src/org/ofbiz/accounting/util/UtilAccounting.java
+++ b/applications/accounting/src/org/ofbiz/accounting/util/UtilAccounting.java
@@ -125,9 +125,7 @@
     private static void getGlAccountClassChildren(GenericValue glAccountClass, List<String> glAccountClassIds) throws GenericEntityException {
         glAccountClassIds.add(glAccountClass.getString("glAccountClassId"));
         List<GenericValue> glAccountClassChildren = glAccountClass.getRelatedCache("ChildGlAccountClass");
-        Iterator<GenericValue> glAccountClassChildrenIt = glAccountClassChildren.iterator();
-        while (glAccountClassChildrenIt.hasNext()) {
-            GenericValue glAccountClassChild = glAccountClassChildrenIt.next();
+        for(GenericValue glAccountClassChild : glAccountClassChildren) {
             getGlAccountClassChildren(glAccountClassChild, glAccountClassIds);
         }
     }
diff --git a/applications/accounting/testdef/accountingtests.xml b/applications/accounting/testdef/accountingtests.xml
index 2c59656..c3c5e8a 100644
--- a/applications/accounting/testdef/accountingtests.xml
+++ b/applications/accounting/testdef/accountingtests.xml
@@ -27,9 +27,14 @@
     </test-case>
 
 
-    <test-case case-name="accounting-tests"><junit-test-suite class-name="org.ofbiz.accounting.test.FinAccountTests"/></test-case>
+    <test-case case-name="accounting-tests">
+        <junit-test-suite class-name="org.ofbiz.accounting.test.FinAccountTests"/>
+    </test-case>
 
-    <test-case case-name="auto-accounting-transaction-tests">
-        <simple-method-test location="component://accounting/script/org/ofbiz/accounting/test/AutoAcctgTransTests.xml"/>
+    <test-case case-name="auto-accounting-transaction-tests-sales">
+        <simple-method-test location="component://accounting/script/org/ofbiz/accounting/test/AutoAcctgTransTestsSales.xml"/>
+    </test-case>
+    <test-case case-name="auto-accounting-transaction-tests-purchase">
+        <simple-method-test location="component://accounting/script/org/ofbiz/accounting/test/AutoAcctgTransTestsPurchase.xml"/>
     </test-case>
 </test-suite>
diff --git a/applications/accounting/webapp/accounting/WEB-INF/controller.xml b/applications/accounting/webapp/accounting/WEB-INF/controller.xml
index ec1646a..b0a1061 100644
--- a/applications/accounting/webapp/accounting/WEB-INF/controller.xml
+++ b/applications/accounting/webapp/accounting/WEB-INF/controller.xml
@@ -2574,12 +2574,12 @@
     </request-map>
     <request-map uri="paymentReportHtml">
         <security https="true" auth="true"/>
-        <event type="groovy" path="component://accounting/webapp/accounting/WEB-INF/actions/payment/" invoke="PaymentReport.groovy"/>
+        <event type="groovy" path="component://accounting/webapp/accounting/WEB-INF/actions/payment/PaymentReport.groovy"/>
         <response name="success" type="view" value="ViewPaymentReportHtml"/>
     </request-map>
     <request-map uri="paymentReportPdf">
         <security https="true" auth="true"/>
-        <event type="groovy" path="component://accounting/webapp/accounting/WEB-INF/actions/payment/" invoke="PaymentReport.groovy"/>
+        <event type="groovy" path="component://accounting/webapp/accounting/WEB-INF/actions/payment/PaymentReport.groovy"/>
         <response name="success" type="view" value="ViewPaymentReportPdf"/>
     </request-map>
 
diff --git a/applications/accounting/webapp/accounting/finaccounttrans/FinAccountTrans.ftl b/applications/accounting/webapp/accounting/finaccounttrans/FinAccountTrans.ftl
index 8570cfc..9ea3d81 100644
--- a/applications/accounting/webapp/accounting/finaccounttrans/FinAccountTrans.ftl
+++ b/applications/accounting/webapp/accounting/finaccounttrans/FinAccountTrans.ftl
@@ -74,7 +74,7 @@
             jQuery('#endingBalance').html(jQuery('#endingBalanceInput').val());
 
         }
-        jQuery('#submitButton').attr('disabled', 'disabled');
+        jQuery('#submitButton').attr('disabled', true);
     }
 }
 </script>
diff --git a/applications/accounting/webapp/accounting/payment/depositWithdrawPayments.ftl b/applications/accounting/webapp/accounting/payment/depositWithdrawPayments.ftl
index bbd2efb..ee242ed 100644
--- a/applications/accounting/webapp/accounting/payment/depositWithdrawPayments.ftl
+++ b/applications/accounting/webapp/accounting/payment/depositWithdrawPayments.ftl
@@ -63,7 +63,7 @@
         });
     } else {
         jQuery('#showPaymentRunningTotal').html("");
-        jQuery('#submitButton').attr('disabled', 'disabled');
+        jQuery('#submitButton').attr('disabled', true);
     }
 }
 
diff --git a/applications/accounting/webapp/accounting/payment/report/PaymentReport.rptdesign b/applications/accounting/webapp/accounting/payment/report/PaymentReport.rptdesign
index 769b1ed..a970fce 100644
--- a/applications/accounting/webapp/accounting/payment/report/PaymentReport.rptdesign
+++ b/applications/accounting/webapp/accounting/payment/report/PaymentReport.rptdesign
@@ -1,4 +1,23 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
 <report xmlns="http://www.eclipse.org/birt/2005/design" version="3.2.21" id="1">
     <property name="createdBy">Eclipse BIRT Designer Version 2.6.0.v20100531 Build &lt;2.6.0.v20100609-1613></property>
     <list-property name="userProperties">
diff --git a/applications/accounting/webapp/ap/invoices/CommissionRun.ftl b/applications/accounting/webapp/ap/invoices/CommissionRun.ftl
index 4fbeec6..387f26e 100644
--- a/applications/accounting/webapp/ap/invoices/CommissionRun.ftl
+++ b/applications/accounting/webapp/ap/invoices/CommissionRun.ftl
@@ -68,7 +68,7 @@
     if (!isSingle && jQuery('#serviceName').val() != "") {
         jQuery('#submitButton').removeAttr("disabled"); 
     } else {
-        jQuery('#submitButton').attr('disabled', 'disabled');
+        jQuery('#submitButton').attr('disabled', true);
     }
 }
 
diff --git a/applications/accounting/webapp/ap/invoices/PurchaseInvoices.ftl b/applications/accounting/webapp/ap/invoices/PurchaseInvoices.ftl
index 0d6203c..8e9b538 100644
--- a/applications/accounting/webapp/ap/invoices/PurchaseInvoices.ftl
+++ b/applications/accounting/webapp/ap/invoices/PurchaseInvoices.ftl
@@ -61,7 +61,7 @@
             type: 'POST',
             data: jQuery('#listPurchaseInvoices').serialize(),
             async: false,
-            succes: function(data) {
+            success: function(data) {
                 jQuery('#showInvoiceRunningTotal').html(data.invoiceRunningTotal);
             }
         });
@@ -71,7 +71,7 @@
         }
 
     } else {
-        jQuery('#submitButton').attr('disabled', 'disabled');
+        jQuery('#submitButton').attr('disabled', true);
         jQuery('#showInvoiceRunningTotal').html("");
     }
 }
diff --git a/applications/accounting/webapp/ar/invoice/ListInvoices.ftl b/applications/accounting/webapp/ar/invoice/ListInvoices.ftl
index d097d71..49ce28a 100644
--- a/applications/accounting/webapp/ar/invoice/ListInvoices.ftl
+++ b/applications/accounting/webapp/ar/invoice/ListInvoices.ftl
@@ -64,11 +64,11 @@
             });
 
             if(jQuery('#serviceName').val() != "") {
-                jQuery('#submitButton').attr('disabled', '');
+                jQuery('#submitButton').removeAttr('disabled');
             }
 
         } else {
-            jQuery('#submitButton').attr('disabled', 'disabled');
+            jQuery('#submitButton').attr('disabled', true);
             jQuery('#showInvoiceRunningTotal').html("");
         }
     }
@@ -104,7 +104,9 @@
         });
 
         if(anyChecked && (jQuery('#serviceName').val() != "")) {
-            jQuery('#submitButton').attr('disabled' , '');
+            jQuery('#submitButton').removeAttr('disabled');
+        } else {
+            jQuery('#submitButton').attr('disabled', true);
         }
     }
 //]]>
diff --git a/applications/accounting/webapp/ar/payment/batchPayments.ftl b/applications/accounting/webapp/ar/payment/batchPayments.ftl
index 7c31d38..be76ac1 100644
--- a/applications/accounting/webapp/ar/payment/batchPayments.ftl
+++ b/applications/accounting/webapp/ar/payment/batchPayments.ftl
@@ -65,11 +65,13 @@
         });
 
         if(jQuery('#serviceName').val() != "") {
-            jQuery('#submitButton').attr('disabled', '');
+            jQuery('#submitButton').removeAttr('disabled');
+        } else {
+            jQuery('#submitButton').attr('disabled', true);
         }
 
     } else {
-        jQuery('#submitButton').attr('disabled', 'disabled');
+        jQuery('#submitButton').attr('disabled', true);
         jQuery('#showPaymentRunningTotal').html("");
     }
 }
@@ -108,9 +110,9 @@
     });
 
     if(anyChecked && (jQuery('#serviceName').val() != "")) {
-        jQuery('#submitButton').attr('disabled' , '');
+        jQuery('#submitButton').removeAttr('disabled');
     } else {
-       jQuery('#submitButton').attr('disabled' , 'disabled');
+       jQuery('#submitButton').attr('disabled' , true);
     }
 
 }
diff --git a/applications/accounting/widget/FixedAssetForms.xml b/applications/accounting/widget/FixedAssetForms.xml
index 7940fcd..3e40e96 100644
--- a/applications/accounting/widget/FixedAssetForms.xml
+++ b/applications/accounting/widget/FixedAssetForms.xml
@@ -731,7 +731,7 @@
         </field>
         <field name="submitButton" title="${uiLabelMap.CommonAdd}" widget-style="smallSubmit"><submit button-type="button"/></field>
     </form>
-    <form name="GlobalFixedAssetTypeGlAccounts" type="list"
+    <form name="GlobalFixedAssetTypeGlAccounts" type="list" list-name="globalFixedAssetTypeGlAccounts"
         odd-row-style="alternate-row" header-row-style="header-row-2" default-table-style="basic-table hover-bar">
         <actions>
             <entity-condition entity-name="FixedAssetTypeGlAccount" list="globalFixedAssetTypeGlAccounts">
@@ -751,7 +751,7 @@
         <field name="profitGlAccountId"><display-entity entity-name="GlAccount" key-field-name="glAccountId" description="${accountCode} - ${accountName} [${glAccountId}]"/></field>
         <field name="lossGlAccountId"><display-entity entity-name="GlAccount" key-field-name="glAccountId" description="${accountCode} - ${accountName} [${glAccountId}]"/></field>
     </form>
-    <form name="FixedAssetTypeGlAccounts" type="list"
+    <form name="FixedAssetTypeGlAccounts" type="list" list-name="fixedAssetTypeGlAccounts"
         odd-row-style="alternate-row" header-row-style="header-row-2" default-table-style="basic-table hover-bar">
         <actions>
             <entity-condition entity-name="FixedAssetTypeGlAccount" list="fixedAssetTypeGlAccounts">
diff --git a/applications/accounting/widget/FixedAssetScreens.xml b/applications/accounting/widget/FixedAssetScreens.xml
index 3a333e7..5647716 100644
--- a/applications/accounting/widget/FixedAssetScreens.xml
+++ b/applications/accounting/widget/FixedAssetScreens.xml
@@ -529,12 +529,12 @@
                         <section>
                             <widgets>
                                 <screenlet title="${uiLabelMap.PageTitleFixedAssetDepreciationHistory}">
-                                    <label style="h3">${uiLabelMap.FixedAssetPurchaseCost}: ${fixedAsset.purchaseCost}</label>
-                                    <label style="h3">${uiLabelMap.FixedAssetDepreciation}: ${depreciation}</label>
-                                    <label style="h3">${uiLabelMap.FixedAssetSalvageValue}: ${fixedAsset.salvageValue}</label>
-                                    <label style="h3">${uiLabelMap.FixedAssetDateAcquired}: ${fixedAsset.dateAcquired}</label>
-                                    <label style="h3">${uiLabelMap.FixedAssetExpectedEndOfLife}: ${fixedAsset.expectedEndOfLife}</label>
-                                    <label style="h3">${uiLabelMap.FixedAssetNextDepreciationAmount}: ${assetDepreciationResultMap.nextDepreciationAmount}</label>
+                                    <label style="h3">${uiLabelMap.FormFieldTitle_purchaseCost}: ${fixedAsset.purchaseCost}</label>
+                                    <label style="h3">${uiLabelMap.FormFieldTitle_depreciation}: ${depreciation}</label>
+                                    <label style="h3">${uiLabelMap.FormFieldTitle_salvageValue}: ${fixedAsset.salvageValue}</label>
+                                    <label style="h3">${uiLabelMap.FormFieldTitle_dateAcquired}: ${fixedAsset.dateAcquired}</label>
+                                    <label style="h3">${uiLabelMap.FormFieldTitle_expectedEndOfLife}: ${fixedAsset.expectedEndOfLife}</label>
+                                    <label style="h3">${uiLabelMap.FormFieldTitle_NextDepreciationAmount}: ${assetDepreciationResultMap.nextDepreciationAmount}</label>
                                     <section>
                                         <condition>
                                             <and>
@@ -577,7 +577,7 @@
                                     <include-form name="AddFixedAssetDepMethod" location="component://accounting/widget/FixedAssetForms.xml"/>
                                     <include-form name="ListFixedAssetDepMethods" location="component://accounting/widget/FixedAssetForms.xml"/>
                                 </screenlet>
-                                <screenlet title="GL Mappings">
+                                <screenlet title="${uiLabelMap.AccountingGlMappings}">
                                     <include-form name="AddFixedAssetTypeGlAccount" location="component://accounting/widget/FixedAssetForms.xml"/>
                                     <label style="h3">${uiLabelMap.PageTitleFixedAssetMappings}</label>
                                     <include-form name="FixedAssetTypeGlAccounts" location="component://accounting/widget/FixedAssetForms.xml"/>
diff --git a/applications/accounting/widget/GlForms.xml b/applications/accounting/widget/GlForms.xml
index a820b09..26e1980 100644
--- a/applications/accounting/widget/GlForms.xml
+++ b/applications/accounting/widget/GlForms.xml
@@ -275,7 +275,7 @@
             </entity-condition>
         </actions>
         <row-actions>
-            <set field="showPosition1" value="${bsh:String prev=(String)previousItem.get(&quot;glAccountId&quot;);return new Boolean(!(prev!=null&amp;&amp;prev.equals(glAccountId)));}" type="Boolean"/>
+            <set field="showPosition1" value="${groovy:String prev=(String)previousItem.get(&quot;glAccountId&quot;);return new Boolean(!(prev!=null&amp;&amp;prev.equals(glAccountId)));}" type="Boolean"/>
         </row-actions>
         <field name="glAccountId" position="1" use-when="showPosition1"><display/></field>
         <field name="glAccountDescription" title="${uiLabelMap.CommonDescription}" position="1" use-when="showPosition1">
diff --git a/applications/accounting/widget/GlSetupForms.xml b/applications/accounting/widget/GlSetupForms.xml
index fbdcc67..28e983d 100644
--- a/applications/accounting/widget/GlSetupForms.xml
+++ b/applications/accounting/widget/GlSetupForms.xml
@@ -1192,7 +1192,7 @@
         </field>
         <field name="submitButton" title="${uiLabelMap.CommonAdd}" widget-style="smallSubmit"><submit button-type="button"/></field>
     </form>
-    <form name="FixedAssetTypeGlAccounts" type="list"
+    <form name="FixedAssetTypeGlAccounts" type="list" list-name="fixedAssetTypeGlAccounts"
         odd-row-style="alternate-row" header-row-style="header-row-2" default-table-style="basic-table hover-bar">
         <actions>
             <entity-condition entity-name="FixedAssetTypeGlAccount" list="fixedAssetTypeGlAccounts">
diff --git a/applications/accounting/widget/PaymentForms.xml b/applications/accounting/widget/PaymentForms.xml
index 7093cf8..835e8e1 100644
--- a/applications/accounting/widget/PaymentForms.xml
+++ b/applications/accounting/widget/PaymentForms.xml
@@ -90,6 +90,20 @@
         <field name="amountToApply"><display also-hidden="false" type="currency" currency="${currencyUomId}"/></field>
     </form>
 
+    <form name="EditPaymentAttributes" extends="CommonPortletEdit" extends-resource="component://common/widget/PortletEditForms.xml">
+        <field name="partyIdFrom"><lookup target-form-name="LookupPartyName"/></field>
+        <field name="partyIdTo"><lookup target-form-name="LookupPartyName"/></field>
+        <field name="statusId" entry-name="attributeMap.statusId">
+            <drop-down allow-empty="true">
+                <entity-options description="${description}" entity-name="StatusItem" key-field-name="statusId">
+                    <entity-constraint name="statusTypeId" operator="equals" value="PMNT_STATUS"/>
+                    <entity-order-by field-name="description"/>
+                </entity-options>
+            </drop-down>
+        </field>
+        <field name="saveButton"><submit/></field>
+    </form>
+
     <form name="NewPaymentOut" type="single" target="createPayment" default-map-name="payment"
         header-row-style="header-row" default-table-style="basic-table">
         <actions>
diff --git a/applications/accounting/widget/PaymentScreens.xml b/applications/accounting/widget/PaymentScreens.xml
index ed46eed..6064852 100644
--- a/applications/accounting/widget/PaymentScreens.xml
+++ b/applications/accounting/widget/PaymentScreens.xml
@@ -94,6 +94,21 @@
             </widgets>
         </section>
     </screen>
+
+    <screen name="ListPayments">
+        <section>
+            <actions>
+                <set field="noConditionFind" value="Y"/>
+                <set field="parameters.statusId" from-field="statusId"/>
+            </actions>
+            <widgets>
+                <screenlet title="${uiLabelMap.AccountingInvoicePayments}">
+                    <include-form name="ListPayments"  location="component://accounting/widget/PaymentForms.xml"/>
+                </screenlet>
+            </widgets>
+        </section>
+    </screen>
+
     <screen name="NewPayment">
         <section>
             <actions>
diff --git a/applications/commonext/config/CommonExtUiLabels.xml b/applications/commonext/config/CommonExtUiLabels.xml
index f3fc1f7..bba7e9d 100644
--- a/applications/commonext/config/CommonExtUiLabels.xml
+++ b/applications/commonext/config/CommonExtUiLabels.xml
@@ -20,6 +20,7 @@
 -->
 <resource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
     <property key="CommonExtCreatePublicMessage">
+        <value xml:lang="de">Erzeuge öffentliche Nachricht</value>
         <value xml:lang="en">Create Public Message</value>
         <value xml:lang="fr">Créer un message public</value>
         <value xml:lang="it">Crea messaggio pubblico</value>
@@ -27,6 +28,7 @@
         <value xml:lang="zh">新建公共消息</value>
     </property>
     <property key="CommonExtDateInfoCreated">
+        <value xml:lang="de">Datum Info erzeugt</value>
         <value xml:lang="en">Date info created</value>
         <value xml:lang="fr">Date de création</value>
         <value xml:lang="it">Data di creazione</value>
@@ -34,6 +36,7 @@
         <value xml:lang="zh">已创建日期信息</value>
     </property>
     <property key="CommonExtDateLastChanged">
+        <value xml:lang="de">Datum Letzte Änderung</value>    
         <value xml:lang="en">Date Last Changed</value>
         <value xml:lang="fr">Dernière date de changement</value>
         <value xml:lang="it">Data ultimo cambiamento</value>
@@ -41,6 +44,7 @@
         <value xml:lang="zh">最后修改日期</value>
     </property>
     <property key="CommonExtSystemInfoNote">
+        <value xml:lang="de">Systemnachricht</value>
         <value xml:lang="en">System Info Note</value>
         <value xml:lang="fr">Message d'information système</value>
         <value xml:lang="it">Messaggio di sistema</value>
@@ -48,6 +52,7 @@
         <value xml:lang="zh">系统信息便笺</value>
     </property>
     <property key="CommonExtSystemInfoNoteForUser">
+        <value xml:lang="de">Systemnachricht für Benutzer:</value>    
         <value xml:lang="en">System Info note for user:</value>
         <value xml:lang="fr">Message d'information système pour l'utilisateur :</value>
         <value xml:lang="it">Messaggio di sistema per l'utente:</value>
@@ -55,6 +60,7 @@
         <value xml:lang="zh">系统信息便笺致用户:</value>
     </property>
     <property key="CommonExtSystemInfoStatus">
+        <value xml:lang="de">System Information Status</value>    
         <value xml:lang="en">System Info Status</value>
         <value xml:lang="fr">Message d'information d'état</value>
         <value xml:lang="it">Stato messaggi di sistema</value>
@@ -62,6 +68,7 @@
         <value xml:lang="zh">系统信息状态</value>
     </property>
     <property key="CommonExtSystemInfoStatusForUser">
+        <value xml:lang="de">System Information Status für Benutzer:</value>    
         <value xml:lang="en">System Info status for user:</value>
         <value xml:lang="fr">Message d'information d'état pour l'utilisateur :</value>
         <value xml:lang="it">Stato messaggi di sistema per l'utente:</value>
diff --git a/applications/commonext/data/ProductStoreData.xml b/applications/commonext/data/ProductStoreData.xml
index 814b8b5..deffb7f 100644
--- a/applications/commonext/data/ProductStoreData.xml
+++ b/applications/commonext/data/ProductStoreData.xml
@@ -19,6 +19,15 @@
 -->
 
 <entity-engine-xml>
+    <!-- Payment Gateway Config -->
+    <PaymentGatewayConfigType paymentGatewayConfigTypeId="PAYPAL" hasTable="N" description="PayPal Payment Gateway"/>
+    <PaymentGatewayConfig paymentGatewayConfigId="PAYPAL_CONFIG" paymentGatewayConfigTypeId="PAYPAL" description="PayPal Config"/>
+    <PaymentGatewayPayPal paymentGatewayConfigId="PAYPAL_CONFIG" businessEmail="" apiUserName="" apiPassword="" apiSignature="" apiEnvironment="" notifyUrl="" returnUrl="" cancelReturnUrl="" imageUrl="" confirmTemplate="/order/emailconfirmation.ftl" redirectUrl="https://www.sandbox.paypal.com/webscr" confirmUrl="https://www.sandbox.paypal.com/us/cgi-bin/webscr" shippingCallbackUrl="" requireConfirmedShipping="N"/>
+    
+    <PaymentGatewayConfigType paymentGatewayConfigTypeId="WORLDPAY" hasTable="N" description="RBS WorldPay Payment Gateway"/>
+    <PaymentGatewayConfig paymentGatewayConfigId="WORLDPAY_CONFIG" paymentGatewayConfigTypeId="WORLDPAY" description="RBS WorldPay Config"/>
+    <PaymentGatewayWorldPay paymentGatewayConfigId="WORLDPAY_CONFIG" redirectUrl="https://select-test.worldpay.com/wcc/purchase" instId="" authMode="A" fixContact="N" hideContact="N" hideCurrency="N" langId="" noLanguageMenu="N" withDelivery="N" testMode="100"/>
+    
     <ProductStorePaymentSetting productStoreId="PRODUCTSTOREID" paymentMethodTypeId="CREDIT_CARD" paymentServiceTypeEnumId="PRDS_PAY_AUTH" paymentService="alwaysApproveCCProcessor" paymentCustomMethodId="CC_AUTH_ALWAYSAPPROV"/>
     <ProductStorePaymentSetting productStoreId="PRODUCTSTOREID" paymentMethodTypeId="CREDIT_CARD" paymentServiceTypeEnumId="PRDS_PAY_RELEASE" paymentService="testCCRelease" paymentCustomMethodId="CC_RELEASE_TEST"/>
     <ProductStorePaymentSetting productStoreId="PRODUCTSTOREID" paymentMethodTypeId="CREDIT_CARD" paymentServiceTypeEnumId="PRDS_PAY_CAPTURE" paymentService="testCCCapture" paymentCustomMethodId="CC_CAPTURE_TEST"/>
diff --git a/applications/commonext/data/helpdata/HELP_SETUP.xml b/applications/commonext/data/helpdata/HELP_SETUP.xml
index 057fbf2..1492bef 100644
--- a/applications/commonext/data/helpdata/HELP_SETUP.xml
+++ b/applications/commonext/data/helpdata/HELP_SETUP.xml
@@ -44,7 +44,7 @@
         <para>1. Open a new terminal.</para>
         <para>2. Go to your ofbiz directory.</para>
         <para>3. Clean out all built classes with : ./ant clean-all </para>
-        <para>4. Load the seed data with : ant run-install-extseed</para>
+        <para>4. Load the seed data with : ./ant run-install-extseed </para>
         <para>5. Create the admin user with : ./ant create-admin-user-login , then enter a user login id that will be created for you (the initial temporary password is "ofbiz")</para>
         <para>6. Start ofbiz with : ./startofbiz.sh </para>
         <para>7. Connect to the OFBiz Setup application with your browser at https://localhost:8443/ofbizsetup.</para>
diff --git a/applications/commonext/entitydef/entitymodel.xml b/applications/commonext/entitydef/entitymodel.xml
index a376b88..44e60d3 100644
--- a/applications/commonext/entitydef/entitymodel.xml
+++ b/applications/commonext/entitydef/entitymodel.xml
@@ -26,8 +26,9 @@
 
 <!-- not sure if we should use the NoteData entity for this however at the moment it is doing fine... -->
   <extend-entity entity-name="NoteData">
-    <field name="moreInfoPortletId" type="value"><description>url to go to the related portlet screen in the system</description></field>
+    <field name="moreInfoUrl" type="value"><description>url to go to the related screen in the system</description></field>
     <field name="moreInfoItemId" type="value"><description>The id of the item to be displayed i.e. custRequestId, commEventId etc</description></field>
+    <field name="moreInfoItemName" type="value"><description>The name of the item to be displayed i.e. custRequestId, commEventId etc</description></field>
     <index name="systemInfo" unique="false"><!-- to be able to select the SYSTEMNOTE records quickly -->
       <index-field name="noteName"/>
     </index>
diff --git a/applications/commonext/ofbiz-component.xml b/applications/commonext/ofbiz-component.xml
index ca529f8..1b8798e 100644
--- a/applications/commonext/ofbiz-component.xml
+++ b/applications/commonext/ofbiz-component.xml
@@ -30,11 +30,9 @@
     <entity-resource type="data" reader-name="seed" loader="main" location="data/CommonExtHelpData.xml"/>
     <entity-resource type="data" reader-name="seed" loader="main" location="data/SystemInfoPortletData.xml"/>
     <entity-resource type="data" reader-name="seed" loader="main" location="data/SetupData.xml"/>
-    <entity-resource type="data" reader-name="seed" loader="main" location="data/ShippingData.xml"/>
     <entity-resource type="data" reader-name="seed" loader="main" location="data/OfbizSetupSecurityData.xml"/>
     
     <entity-resource type="model" reader-name="main" loader="main" location="entitydef/entitymodel.xml"/>
-    <entity-resource type="eca" reader-name="main" loader="main" location="entitydef/eecas.xml"/>
     
     <service-resource type="model" loader="main" location="servicedef/services.xml"/>
     <service-resource type="eca" loader="main" location="servicedef/secas.xml"/>
diff --git a/applications/commonext/script/org/ofbiz/SystemInfoServices.xml b/applications/commonext/script/org/ofbiz/SystemInfoServices.xml
index 09dbefc..83bbde3 100644
--- a/applications/commonext/script/org/ofbiz/SystemInfoServices.xml
+++ b/applications/commonext/script/org/ofbiz/SystemInfoServices.xml
@@ -22,148 +22,13 @@
        xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/simple-methods.xsd">
 
     <simple-method method-name="createSystemInfoNote" short-description="Create a system to to a specific party">
-        <set field="partyId" from-field="parameters.partyId" default-value="userLogin.partyId"/>
-        <!-- new communication events -->
-        <if-compare field="parameters.entityName" value="CommunicationEvent" operator="equals">
-            <entity-one entity-name="CommunicationEvent" value-field="comm">
-                <field-map field-name="communicationEventId" from-field="parameters.entityNameId"/>
-            </entity-one>
-            <entity-and entity-name="CommunicationEventRole" list="roles">
-                <field-map field-name="communicationEventId" from-field="parameters.entityNameId"/>
-            </entity-and>
-            <if-not-empty field="roles">
-                <make-value value-field="noteData" entity-name="NoteData"/>
-                <now-timestamp field="noteData.noteDateTime"/>
-                <set field="noteData.noteName" value="SYSTEMNOTE"/>
-                <set field="noteData.noteInfo" value="New incoming communication event: ${comm.subject} from ${comm.partyIdFrom}"/>
-                <set field="noteData.moreInfoPortletId" value="MyCommunications"/>
-                <iterate entry="role" list="roles">
-                    <if-compare field="role.statusId" value="COM_ROLE_CREATED" operator="equals">
-                        <set field="partyId" from-field="role.partyId"/>
-                        <call-simple-method method-name="getPortletAttributeMap"/>
-                        <if>
-                            <condition>
-                                <and><!-- check for 'all' notifications flag off -->
-                                    <if-compare field="haveUserLogin" value="true" operator="equals"/>
-                                    <if-compare field="attributeMap.allNotifications" value="Y" operator="not-equals"/>
-                                    <or>
-                                        <and><!-- incoming email for known parties, no notifications for unknown parties -->
-                                            <if-compare field="attributeMap.incomingEmail" value="Y" operator="not-equals"/>
-                                            <if-compare field="comm.communicationEventTypeId" value="AUTO_EMAIL_COM" operator="equals"/>
-                                        </and>
-                                        <and><!-- internal sent email -->
-                                            <if-compare field="attributeMap.email" value="Y" operator="not-equals"/>
-                                            <or>
-                                                <if-compare field="comm.communicationEventTypeId" value="AUTO_EMAIL_COMM" operator="equals"/>
-                                                <if-compare field="comm.communicationEventTypeId" value="EMAIL_COMMUNICATION" operator="equals"/>
-                                            </or>
-                                        </and>
-                                        <and><!-- internal notes -->
-                                            <if-compare field="attributeMap.internalNotes" value="Y" operator="not-equals"/>
-                                            <if-compare field="comm.communicationEventTypeId" value="COMMENT_NOTE" operator="equals"/>
-                                        </and>
-                                    </or>
-                                </and>    
-                            </condition>
-                            <then>
-                                <sequenced-id sequence-name="NoteData" field="noteData.noteId"/>
-                                <set field="noteData.noteParty" from-field="role.partyId"/>
-                                <create-value value-field="noteData"/>
-                            </then>
-                        </if>
-                    </if-compare>                        
-                </iterate>
-            </if-not-empty>
-        </if-compare>
-        
-        <!-- new task assignments for the logged on user -->
-        <if-compare field="parameters.entityName" value="WorkEffortPartyAssignment" operator="equals">
-            <entity-one entity-name="WorkEffort" value-field="workEffort">
-                <field-map field-name="workEffortId" from-field="parameters.entityNameId"/>
-            </entity-one>
-            <if-compare field="workEffort.workEffortTypeId" value="TASK" operator="equals">
-                <call-simple-method method-name="getPortletAttributeMap"/>
-                <if-compare field="haveUserLogin" value="true" operator="equals">
-                    <if-compare field="attributeMap.taskAssignment" value="Y" operator="not-equals">
-                        <entity-and entity-name="WorkEffortPartyAssignment" list="assigns" filter-by-date="true">
-                            <field-map field-name="workEffortId" from-field="parameters.entityNameId"/>
-                            <order-by field-name="-fromDate"/>
-                        </entity-and>
-                        <first-from-list entry="assign" list="assigns"/>
-                        <make-value value-field="noteData" entity-name="NoteData"/>
-                        <now-timestamp field="noteData.noteDateTime"/>
-                        <sequenced-id sequence-name="NoteData" field="noteData.noteId"/>
-                        <set field="noteData.noteParty" from-field="assign.partyId"/>
-                        <set field="noteData.noteName" value="SYSTEMNOTE"/>
-                        <set field="noteData.noteInfo" value="New task assignment '${workEffort.workEffortName}' [${workEffort.workEffortId}]"/>
-                        <set field="noteData.moreInfoPortletId" value="ViewProjectTask"/>
-                        <set field="noteData.moreInfoItemId" from-field="workEffort.workEffortId"/>
-                        <create-value value-field="noteData"/>
-                    </if-compare>
-                </if-compare>
-            </if-compare>
-        </if-compare>
-        
-        <!-- Create a system info note to all customer request participants if a note was added to the customer request
-            the originator of the customer request will get already a email so does not need to be notified-->
-        <if-compare field="parameters.entityName" value="CustRequestItemNote" operator="equals">
-            <!-- find related customer request originator -->
-            <entity-and entity-name="CustRequestItemNoteView" list="custRequesItems">
-                <field-map field-name="noteId" from-field="parameters.entityNameId"/>
-            </entity-and>
-            <first-from-list entry="custRequesItem" list="custRequesItems"/>
-            <entity-one entity-name="CustRequest" value-field="custRequest">
-                <field-map field-name="custRequestId" from-field="custRequesItem.custRequestId"/>
-                <select-field field-name="fromPartyId"/>
-                <select-field field-name="custRequestName"/>
-            </entity-one>
-            <!-- find all parties who have added a note to this request item excluding the originator (he already gets email)-->
-            <entity-condition entity-name="CustRequestItemNoteView" list="custRequestParties" distinct="true">
-                <condition-list combine="and">
-                    <condition-expr field-name="partyId" operator="not-equals" from-field="custRequest.fromPartyId"/>
-                    <condition-expr field-name="custRequestId" from-field="custRequesItem.custRequestId"/>
-                    <condition-expr field-name="custRequestItemSeqId" from-field="custRequesItem.custRequestItemSeqId"/>
-                </condition-list>
-                <select-field field-name="partyId"/>
-                <select-field field-name="custRequestId"/>
-                <select-field field-name="custRequestItemSeqId"/>
-            </entity-condition>
-            <make-value value-field="noteData" entity-name="NoteData"/>
-            <now-timestamp field="noteData.noteDateTime"/>
-            <set field="noteData.noteName" value="SYSTEMNOTE"/>
-            <set field="noteData.moreInfoPortletId" value="ViewCustRequest"/>
-            <set field="noteData.moreInfoItemId" from-field="custRequest.custRequestId"/>
-            <set field="noteData.noteInfo" value="A note has been added to customer request ${custRequest.custRequestName} [${custRequest.custRequestId}]"/>
-            <iterate entry="custRequestParty" list="custRequestParties">
-                <sequenced-id sequence-name="NoteData" field="noteData.noteId"/>
-                <set field="noteData.noteParty" from-field="custRequestParty.partyId"/>
-                <create-value value-field="noteData"/>
-            </iterate>
-        </if-compare>
-        
-        <!-- public message -->
-        <if-compare field="parameters.entityName" value="PublicMessage" operator="equals">
-            <if-has-permission permission="COMMONEXT_PUBLMSG">
-                <!-- get all recent visitors logged on the last 3 weeks -->
-                <set field="lastDate" value="${groovy:org.ofbiz.base.util.UtilDateTime.addDaysToTimestamp(org.ofbiz.base.util.UtilDateTime.nowTimestamp(), -21)}" type="Timestamp"/>
-                <entity-condition list="parties" entity-name="PartyNameVisitView" distinct="true">
-                    <condition-expr field-name="fromDate" operator="greater" from-field="lastDate"/>
-                    <select-field field-name="partyId"/>
-                </entity-condition>
-                <iterate entry="party" list="parties">            
-                    <make-value value-field="noteData" entity-name="NoteData"/>
-                    <now-timestamp field="noteData.noteDateTime"/>
-                    <sequenced-id sequence-name="NoteData" field="noteData.noteId"/>
-                    <set field="noteData.noteParty" from-field="party.partyId"/>
-                    <set field="noteData.noteName" value="SYSTEMNOTE"/>
-                    <set field="noteData.noteInfo" from-field="parameters.noteInfo"/>
-                    <create-value value-field="noteData"/>
-                </iterate>
-                <set field="noteData.noteParty" value="_NA_"/><!-- message for not logged in users -->
-                <sequenced-id sequence-name="NoteData" field="noteData.noteId"/>
-                <create-value value-field="noteData"/>
-            </if-has-permission>
-        </if-compare>
+        <set field="parameters.partyId" from-field="parameters.partyId" default-value="userLogin.partyId"/>
+        <make-value value-field="noteData" entity-name="NoteData"/>
+        <set-nonpk-fields value-field="noteData" map="parameters"/>
+        <now-timestamp field="noteData.noteDateTime"/>
+        <sequenced-id sequence-name="NoteData" field="noteData.noteId"/>
+        <set field="noteData.noteName" value="SYSTEMNOTE"/>
+        <create-value value-field="noteData"/>
     </simple-method>
 
     <simple-method method-name="getPortletAttributeMap" short-description="get the attributes of the SystemInfoNotes portlet for a userlogin">
@@ -182,6 +47,19 @@
         </if-not-empty>
     </simple-method>
 
+    <simple-method method-name="deleteSystemInfoNote" short-description="Delete SystemInfo Note">
+        <entity-one value-field="noteData" entity-name="NoteData"/>
+        <remove-related relation-name="ContentNote" value-field="noteData"/>
+        <remove-related relation-name="CustRequestItemNote" value-field="noteData"/>
+        <remove-related relation-name="CustRequestNote" value-field="noteData"/>
+        <remove-related relation-name="MarketingCampaignNote" value-field="noteData"/>
+        <remove-related relation-name="OrderHeaderNote" value-field="noteData"/>
+        <remove-related relation-name="PartyNote" value-field="noteData"/>
+        <remove-related relation-name="QuoteNote" value-field="noteData"/>
+        <remove-related relation-name="WorkEffortNote" value-field="noteData"/>
+        <remove-value value-field="noteData"/>
+    </simple-method>
+
     <simple-method method-name="deleteAllSystemNotes" short-description="delete all system notes from a particular user">
         <set field="removeData.noteParty" from-field="parameters.userLogin.partyId"/>
         <set field="removeData.noteName" value="SYSTEMNOTE"/>
@@ -207,7 +85,6 @@
             <set field="status.noteInfo" value="Open communication events: ${comCount}"/>
             <first-from-list entry="comm" list="comms"/>
             <set field="status.noteDateTime" from-field="comm.entryDate"/>
-            <set field="status.moreInfoPortletId" value="MyCommunications"/>
             <field-to-list field="status" list="systemInfoStatus"/>
             <clear-field field="status"/>
         </if-compare>
@@ -229,7 +106,6 @@
             <set field="status.noteInfo" value="Assigned and not completed tasks: ${assignCount}"/>
             <first-from-list entry="assign" list="assigns"/>
             <set field="status.noteDateTime" from-field="assign.fromDate"/>
-            <set field="status.moreInfoPortletId" value="mytasks"/>
             <field-to-list field="status" list="systemInfoStatus"/>
         </if-compare>
         
@@ -281,5 +157,4 @@
             </if-not-empty>
         </if-not-empty>
     </simple-method>
-   
 </simple-methods>
diff --git a/applications/commonext/servicedef/secas.xml b/applications/commonext/servicedef/secas.xml
index 9c60336..11dcb66 100644
--- a/applications/commonext/servicedef/secas.xml
+++ b/applications/commonext/servicedef/secas.xml
@@ -20,27 +20,5 @@
 
 <service-eca xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/service-eca.xsd">
-    <!-- send a note when a communicationevent is created for a certain loginId when an 
-        existing comm event's status changes into status: entered-->
-    <eca service="setCommunicationEventStatus" event="commit">
-        <condition field-name="statusId" operator="equals" value="COM_ENTERED"/>
-        <set field-name="entityName" value="CommunicationEvent"/>
-        <set field-name="entityNameId" env-name="communicationEventId"/>
-        <action service="createSystemInfoNote" mode="sync"/>
-    </eca>
-    <!-- send a note when a communicationevent is created for a certain loginId 
-        with the status entered -->
-    <eca service="createCommunicationEvent" event="commit">
-        <condition field-name="statusId" operator="equals" value="COM_ENTERED"/>
-        <set field-name="entityName" value="CommunicationEvent"/>
-        <set field-name="entityNameId" env-name="communicationEventId"/>
-        <action service="createSystemInfoNote" mode="sync"/>
-    </eca>
-    <!-- send a system note to all Customer request participants (excluding the originator) 
-        when a note is added to a particular customer request.-->
-    <eca service="createCustRequestItemNote" event="commit">
-        <set field-name="entityName" value="CustRequestItemNote"/>
-        <set field-name="entityNameId" env-name="noteId"/>
-        <action service="createSystemInfoNote" mode="sync"/>
-    </eca>
+        
 </service-eca>
diff --git a/applications/commonext/servicedef/services.xml b/applications/commonext/servicedef/services.xml
index 0268025..08ccc6b 100644
--- a/applications/commonext/servicedef/services.xml
+++ b/applications/commonext/servicedef/services.xml
@@ -26,11 +26,13 @@
 
     <service name="createSystemInfoNote" engine="simple" default-entity-name="NoteData"
         location="component://commonext/script/org/ofbiz/SystemInfoServices.xml" invoke="createSystemInfoNote">
-        <description>Create a system info note realted to a certain entityId</description>        
-        <auto-attributes mode="IN" optional="true"/>
-        <attribute name="partyId" type="String" mode="IN" optional="true"/><!-- userLogin.partyId is default -->
-        <attribute name="entityName" type="String" mode="IN"/>
-        <attribute name="entityNameId" type="String" mode="IN"/>
+        <description>Create a system info note</description>
+        <auto-attributes include="nonpk" mode="IN" optional="true"/>
+    </service>
+    <service name="deleteSystemInfoNote" engine="simple" default-entity-name="NoteData"
+        location="component://commonext/script/org/ofbiz/SystemInfoServices.xml" invoke="deleteSystemInfoNote">
+        <description>Delete a system info note</description>
+        <auto-attributes include="pk" mode="IN" optional="false"/>
     </service>
     <service name="deleteAllSystemNotes" engine="simple" auth="true"
         location="component://commonext/script/org/ofbiz/SystemInfoServices.xml" invoke="deleteAllSystemNotes">
diff --git a/applications/commonext/webapp/WEB-INF/controller.xml b/applications/commonext/webapp/WEB-INF/controller.xml
index 67978b8..d778789 100644
--- a/applications/commonext/webapp/WEB-INF/controller.xml
+++ b/applications/commonext/webapp/WEB-INF/controller.xml
@@ -23,6 +23,13 @@
     <description>General Application CommonExt Configuration File</description>
     
     <!-- Request Mappings -->
+    
+    <request-map uri="deleteSystemInfoNote">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="deleteSystemInfoNote"/>
+        <response name="success" type="view-last"/>
+    </request-map>
+    
     <request-map uri="deleteAllSystemNotes">
         <security https="true" auth="true"/>
         <event type="service" invoke="deleteAllSystemNotes"/>
diff --git a/applications/commonext/webapp/ofbizsetup/WEB-INF/controller.xml b/applications/commonext/webapp/ofbizsetup/WEB-INF/controller.xml
index daf7116..1f5e480 100644
--- a/applications/commonext/webapp/ofbizsetup/WEB-INF/controller.xml
+++ b/applications/commonext/webapp/ofbizsetup/WEB-INF/controller.xml
@@ -38,7 +38,7 @@
         <response name="success" type="view" value="showMessage"/>
     </request-map>
 
-	<!-- party requests -->
+    <!-- party requests -->
     <request-map uri="updatePartyGroup">
         <security https="true" auth="true"/>
         <event type="service" path="" invoke="updatePartyGroup"/>
diff --git a/applications/commonext/widget/CommonScreens.xml b/applications/commonext/widget/CommonScreens.xml
index ee13643..46dcbf2 100644
--- a/applications/commonext/widget/CommonScreens.xml
+++ b/applications/commonext/widget/CommonScreens.xml
@@ -35,14 +35,16 @@
                 <set field="layoutSettings.suppressTab" value="ofbizsetup"/><!-- diseable ofbiz setup by default -->
                 <!-- system info notes -->
                 <service service-name="getLastSystemInfoNote" result-map="resultNote"/>
-                <set field="linkStart" value="/myportal/control/showPortletMainDecorator?portalPortletId="/>
+                <set field="lastSystemInfoNote1" from-field="resultNote.lastSystemInfoNote1"/>
+                <set field="lastSystemInfoNote2" from-field="resultNote.lastSystemInfoNote2"/>
+                <set field="lastSystemInfoNote3" from-field="resultNote.lastSystemInfoNote3"/>
                 <set field="layoutSettings.middleTopHeader" value="---------- ${uiLabelMap.CommonLastSytemNotes} ----------"/>
-                <set field="layoutSettings.middleTopMessage1" value="${groovy:resultNote.lastSystemInfoNote1!=null?resultNote.lastSystemInfoNote1.noteDateTime.toString().substring(0,16) + &quot; &quot; + resultNote.lastSystemInfoNote1.noteInfo:&quot;&quot;}"/>
-                <set field="layoutSettings.middleTopLink1" value="${linkStart}${resultNote.lastSystemInfoNote1.moreInfoPortletId}&amp;amp;id=${resultNote.lastSystemInfoNote1.moreInfoItemId}"/>
-                <set field="layoutSettings.middleTopMessage2" value="${groovy:resultNote.lastSystemInfoNote2!=null?resultNote.lastSystemInfoNote2.noteDateTime.toString().substring(0,16) + &quot; &quot; + resultNote.lastSystemInfoNote2.noteInfo:&quot;&quot;}"/>
-                <set field="layoutSettings.middleTopLink2" value="${linkStart}${resultNote.lastSystemInfoNote2.moreInfoPortletId}&amp;amp;id=${resultNote.lastSystemInfoNote2.moreInfoItemId}"/>
-                <set field="layoutSettings.middleTopMessage3" value="${groovy:resultNote.lastSystemInfoNote3!=null?resultNote.lastSystemInfoNote3.noteDateTime.toString().substring(0,16) + &quot; &quot; + resultNote.lastSystemInfoNote3.noteInfo:&quot;&quot;}"/>
-                <set field="layoutSettings.middleTopLink3" value="${linkStart}${resultNote.lastSystemInfoNote3.moreInfoPortletId}&amp;amp;id=${resultNote.lastSystemInfoNote3.moreInfoItemId}"/>
+                <set field="layoutSettings.middleTopMessage1" value="${groovy:lastSystemInfoNote1!=null?lastSystemInfoNote1.noteDateTime.toString().substring(0,16) + &quot; &quot; + lastSystemInfoNote1.noteInfo:&quot;&quot;}"/>
+                <set field="layoutSettings.middleTopMessage2" value="${groovy:lastSystemInfoNote2!=null?lastSystemInfoNote2.noteDateTime.toString().substring(0,16) + &quot; &quot; + lastSystemInfoNote2.noteInfo:&quot;&quot;}"/>
+                <set field="layoutSettings.middleTopMessage3" value="${groovy:lastSystemInfoNote3!=null?lastSystemInfoNote3.noteDateTime.toString().substring(0,16) + &quot; &quot; + lastSystemInfoNote3.noteInfo:&quot;&quot;}"/>
+                <set field="layoutSettings.middleTopLink1" value="${lastSystemInfoNote1.moreInfoUrl}${groovy: if (lastSystemInfoNote1&amp;&amp;lastSystemInfoNote1.moreInfoItemName&amp;&amp;lastSystemInfoNote1.moreInfoItemId)&quot;?&quot; + lastSystemInfoNote1.moreInfoItemName + &quot;=&quot; + lastSystemInfoNote1.moreInfoItemId + &quot;&amp;id=&quot; + lastSystemInfoNote1.moreInfoItemId;}"/>
+                <set field="layoutSettings.middleTopLink2" value="${lastSystemInfoNote2.moreInfoUrl}${groovy: if (lastSystemInfoNote2&amp;&amp;lastSystemInfoNote2.moreInfoItemName&amp;&amp;lastSystemInfoNote2.moreInfoItemId)&quot;?&quot; + lastSystemInfoNote2.moreInfoItemName + &quot;=&quot; + lastSystemInfoNote2.moreInfoItemId + &quot;&amp;id=&quot; + lastSystemInfoNote2.moreInfoItemId;}"/>
+                <set field="layoutSettings.middleTopLink3" value="${lastSystemInfoNote3.moreInfoUrl}${groovy: if (lastSystemInfoNote3&amp;&amp;lastSystemInfoNote3.moreInfoItemName&amp;&amp;lastSystemInfoNote3.moreInfoItemId)&quot;?&quot; + lastSystemInfoNote3.moreInfoItemName + &quot;=&quot; + lastSystemInfoNote3.moreInfoItemId + &quot;&amp;id=&quot; + lastSystemInfoNote3.moreInfoItemId;}"/>
                 <!-- Help link actions -->
                 <!--<set field="helpTopic" value="${groovy: webSiteId + '_' + requestAttributes._CURRENT_VIEW_}"/>-->
                 <set field="helpTopic" value="${groovy: parameters.componentName.toUpperCase() + '_' + requestAttributes._CURRENT_VIEW_}"/>
diff --git a/applications/commonext/widget/SystemInfoForms.xml b/applications/commonext/widget/SystemInfoForms.xml
index dcdc0ba..8af877d 100644
--- a/applications/commonext/widget/SystemInfoForms.xml
+++ b/applications/commonext/widget/SystemInfoForms.xml
@@ -24,7 +24,13 @@
     <form name="SystemInfoNotes" type="list" list-name="systemInfoNotes" 
         odd-row-style="alternate-row" header-row-style="header-row-2" default-table-style="basic-table hover-bar">
         <field name="noteDateTime" title="${uiLabelMap.CommonExtDateInfoCreated}"><display type="date-time"/></field>
-        <field name="noteInfo" title="${uiLabelMap.CommonExtSystemInfoNote}"><hyperlink target="/myportal/control/showPortletMainDecorator?portalPortletId=${moreInfoPortletId}&amp;id=${moreInfoItemId}" target-type="inter-app" description="${noteInfo}"></hyperlink></field>
+        <field name="noteInfo" title="${uiLabelMap.CommonExtSystemInfoNote}"><hyperlink target="${moreInfoUrl}${groovy: if (moreInfoItemName &amp;&amp;moreInfoItemId)&quot;?&quot; + moreInfoItemName + &quot;=&quot; + moreInfoItemId + &quot;&amp;id=&quot; + moreInfoItemId;}" target-type="inter-app" description="${noteInfo}"></hyperlink></field>
+        <field name="deleteLink" title="${uiLabelMap.CommonEmptyHeader}" widget-style="buttontext" >
+            <hyperlink target="deleteSystemInfoNote" description="${uiLabelMap.CommonDelete}">
+                <parameter param-name="noteId"/>
+                <parameter param-name="portalPageId" from-field="parameters.portalPageId"/>
+            </hyperlink>
+        </field>
     </form>
     
     <form name="EditSysInfoPortletParams" extends="CommonPortletEdit" extends-resource="component://common/widget/PortletEditForms.xml">
@@ -40,12 +46,12 @@
     <form name="SystemInfoStatus" type="list" list-name="systemInfoStatus"
         odd-row-style="alternate-row" header-row-style="header-row-2" default-table-style="basic-table hover-bar">
         <field name="noteDateTime" title="${uiLabelMap.CommonExtDateLastChanged}"><display type="date-time"/></field>
-        <field name="noteInfo" title="${uiLabelMap.CommonExtSystemInfoStatus}"><hyperlink target="/myportal/control/showPortletMainDecorator?portalPortletId=${moreInfoPortletId}" target-type="inter-app" description="${noteInfo}"></hyperlink></field>
+        <field name="noteInfo" title="${uiLabelMap.CommonExtSystemInfoStatus}"><hyperlink target="${moreInfoUrl}" target-type="inter-app" description="${noteInfo}"></hyperlink></field>
     </form>
     
     <form name="CreateSystemInfoNote" type="single" target="createSystemInfoNote">
-        <field name="entityName"><hidden value="PublicMessage"/></field>
-        <field name="entityNameId"><hidden value="dummy"/></field>
+        <field name="noteParty"><text/></field>
+        <field name="moreInfoUrl"><text size="50"/></field>
         <field name="noteInfo"><text size="50"/></field>
         <field name="createButton"><submit/></field>
     </form>
diff --git a/applications/commonext/widget/ofbizsetup/CommonScreens.xml b/applications/commonext/widget/ofbizsetup/CommonScreens.xml
index 733cdab..61908ef 100644
--- a/applications/commonext/widget/ofbizsetup/CommonScreens.xml
+++ b/applications/commonext/widget/ofbizsetup/CommonScreens.xml
@@ -52,11 +52,11 @@
     </screen>
     
     <screen name="CommonPartyDecorator">
-    	<section>
-    		<widgets>
+        <section>
+            <widgets>
                 <include-screen name="CommonSetupDecorator"/>
-    		</widgets>
-    	</section>
+            </widgets>
+        </section>
     </screen>
     
     <screen name="CommonSetupDecorator">
diff --git a/applications/commonext/widget/ofbizsetup/SetupForms.xml b/applications/commonext/widget/ofbizsetup/SetupForms.xml
index 8830d1d..46ac70c 100644
--- a/applications/commonext/widget/ofbizsetup/SetupForms.xml
+++ b/applications/commonext/widget/ofbizsetup/SetupForms.xml
@@ -207,7 +207,7 @@
     
     <form name="EditProdCatalog" extends="EditProdCatalog" extends-resource="component://product/widget/catalog/ProdCatalogForms.xml">
         <field use-when="prodCatalog==null&amp;&amp;prodCatalogId==null" name="prodCatalogId" tooltip="${uiLabelMap.CommonRequired}" widget-style="required"><text default-value="${partyId}"/></field>
-        <field name="catalogName" title="${uiLabelMap.ProductCatalogName}" tooltip="${uiLabelMap.CommonRequired}" widget-style="required"><text size="30" maxlength="60"/></field>
+        <field name="catalogName" title="${uiLabelMap.FormFieldTitle_prodCatalogName}" tooltip="${uiLabelMap.CommonRequired}" widget-style="required"><text size="30" maxlength="60"/></field>
         <field name="partyId"><hidden value="${partyId}"/></field>
         <field name="productStoreId"><hidden value="${productStoreId}"/></field>
         <field name="useQuickAdd"><hidden value="Y"/></field>
@@ -230,7 +230,7 @@
         <field name="prodCatalogId"><hidden value="${prodCatalogId}"/></field>
         <field name="productCategoryTypeId"><hidden value="CATALOG_CATEGORY"/></field>
         <field name="categoryName" tooltip="${uiLabelMap.CommonRequired}" widget-style="required"><text size="30" maxlength="60"/></field>
-        <field name="description" title="${uiLabelMap.ProductProductDescription}"><textarea cols="60" rows="2"/></field>
+        <field name="description" title="${uiLabelMap.ProductCategoryDescription}"><textarea cols="60" rows="2"/></field>
         <field name="submitButton" title="${uiLabelMap.CommonUpdate}" widget-style="smallSubmit"><submit button-type="button"/></field>
     </form>  
     
diff --git a/applications/content/build.xml b/applications/content/build.xml
index b295c33..4e8286d 100644
--- a/applications/content/build.xml
+++ b/applications/content/build.xml
@@ -47,6 +47,7 @@
         <fileset dir="../../framework/webapp/build/lib" includes="*.jar"/>
         <fileset dir="../../framework/widget/build/lib" includes="*.jar"/>
         <fileset dir="../../framework/common/build/lib" includes="*.jar"/>
+        <fileset dir="../../framework/jcr/lib" includes="*.jar"/>
     </path>
 
     <patternset id="src.exc.set">
diff --git a/applications/content/data/DemoBlogEntryData.xml b/applications/content/data/DemoBlogEntryData.xml
index 1fe6172..724c877 100644
--- a/applications/content/data/DemoBlogEntryData.xml
+++ b/applications/content/data/DemoBlogEntryData.xml
@@ -18,7 +18,7 @@
     under the License.
 -->
 <entity-engine-xml>
-	<DataResource dataResourceId="BLG10000" dataResourceTypeId="ELECTRONIC_TEXT" dataTemplateTypeId="NONE" isPublic="Y" createdByUserLogin="admin" createdDate="2004-01-16 01:24:06.522" createdStamp="2007-01-23 16:46:22.421" createdTxStamp="2007-01-23 16:46:21.406" lastModifiedByUserLogin="admin" lastModifiedDate="2010-09-26 13:13:32.482" lastUpdatedStamp="2010-09-26 13:13:32.483" lastUpdatedTxStamp="2010-09-26 13:13:32.429" mimeTypeId="application/octet-stream" statusId="CTNT_PUBLISHED"/>
+    <DataResource dataResourceId="BLG10000" dataResourceTypeId="ELECTRONIC_TEXT" dataTemplateTypeId="NONE" isPublic="Y" createdByUserLogin="admin" createdDate="2004-01-16 01:24:06.522" createdStamp="2007-01-23 16:46:22.421" createdTxStamp="2007-01-23 16:46:21.406" lastModifiedByUserLogin="admin" lastModifiedDate="2010-09-26 13:13:32.482" lastUpdatedStamp="2010-09-26 13:13:32.483" lastUpdatedTxStamp="2010-09-26 13:13:32.429" mimeTypeId="application/octet-stream" statusId="CTNT_PUBLISHED"/>
     <DataResource dataResourceId="BLG10001" dataResourceTypeId="OFBIZ_FILE_BIN" dataTemplateTypeId="NONE" statusId="CTNT_PUBLISHED" mimeTypeId="image/jpeg" objectInfo="specialpurpose/ecommerce/data/cutekid.jpg" isPublic="Y" createdDate="2007-01-23 16:46:22.843" createdByUserLogin="bigal" lastModifiedDate="2007-01-23 16:46:22.843" lastModifiedByUserLogin="bigal" lastUpdatedStamp="2007-01-23 16:46:22.843" lastUpdatedTxStamp="2007-01-23 16:46:21.406" createdStamp="2007-01-23 16:46:22.843" createdTxStamp="2007-01-23 16:46:21.406"/>
     <DataResource dataResourceId="BLG10002" dataResourceTypeId="ELECTRONIC_TEXT" dataTemplateTypeId="NONE" statusId="CTNT_PUBLISHED" createdDate="2007-01-23 16:46:22.984" createdByUserLogin="bigal" lastModifiedDate="2007-01-23 16:46:38.671" lastModifiedByUserLogin="bigal" lastUpdatedStamp="2007-01-23 16:46:38.671" lastUpdatedTxStamp="2007-01-23 16:46:37.359" createdStamp="2007-01-23 16:46:22.984" createdTxStamp="2007-01-23 16:46:21.406"/>
     <DataResource dataResourceId="BLG10003" dataResourceTypeId="ELECTRONIC_TEXT" dataTemplateTypeId="NONE" statusId="CTNT_PUBLISHED" createdDate="2007-01-23 16:47:49.343" createdByUserLogin="bigal" lastModifiedDate="2007-01-23 16:47:49.343" lastModifiedByUserLogin="bigal" lastUpdatedStamp="2007-01-23 16:47:49.343" lastUpdatedTxStamp="2007-01-23 16:47:49.328" createdStamp="2007-01-23 16:47:49.343" createdTxStamp="2007-01-23 16:47:49.328"/>
diff --git a/applications/content/lib/dom4j-1.6.1.jar b/applications/content/lib/dom4j-1.6.1.jar
new file mode 100644
index 0000000..c8c4dbb
--- /dev/null
+++ b/applications/content/lib/dom4j-1.6.1.jar
Binary files differ
diff --git a/applications/content/lib/lucene-core-3.0.3.jar b/applications/content/lib/lucene-core-3.0.3.jar
deleted file mode 100644
index 97dd3dd..0000000
--- a/applications/content/lib/lucene-core-3.0.3.jar
+++ /dev/null
Binary files differ
diff --git a/applications/content/lib/lucene-core-3.5.0.jar b/applications/content/lib/lucene-core-3.5.0.jar
new file mode 100644
index 0000000..498a599
--- /dev/null
+++ b/applications/content/lib/lucene-core-3.5.0.jar
Binary files differ
diff --git a/applications/content/lib/metadata-extractor-2.4.0-beta-1.jar b/applications/content/lib/metadata-extractor-2.4.0-beta-1.jar
deleted file mode 100644
index 3720d64..0000000
--- a/applications/content/lib/metadata-extractor-2.4.0-beta-1.jar
+++ /dev/null
Binary files differ
diff --git a/applications/content/lib/poi-3.7.jar b/applications/content/lib/poi-3.7.jar
deleted file mode 100644
index a08d953..0000000
--- a/applications/content/lib/poi-3.7.jar
+++ /dev/null
Binary files differ
diff --git a/applications/content/lib/poi-3.8-beta5-20111217.jar b/applications/content/lib/poi-3.8-beta5-20111217.jar
new file mode 100644
index 0000000..24bf083
--- /dev/null
+++ b/applications/content/lib/poi-3.8-beta5-20111217.jar
Binary files differ
diff --git a/applications/content/lib/poi-ooxml-3.7.jar b/applications/content/lib/poi-ooxml-3.7.jar
deleted file mode 100644
index 5f36eb4..0000000
--- a/applications/content/lib/poi-ooxml-3.7.jar
+++ /dev/null
Binary files differ
diff --git a/applications/content/lib/poi-ooxml-3.8-beta5-20111217.jar b/applications/content/lib/poi-ooxml-3.8-beta5-20111217.jar
new file mode 100644
index 0000000..d447010
--- /dev/null
+++ b/applications/content/lib/poi-ooxml-3.8-beta5-20111217.jar
Binary files differ
diff --git a/applications/content/lib/poi-ooxml-schemas-3.7.jar b/applications/content/lib/poi-ooxml-schemas-3.8-beta5-20111217.jar
similarity index 72%
rename from applications/content/lib/poi-ooxml-schemas-3.7.jar
rename to applications/content/lib/poi-ooxml-schemas-3.8-beta5-20111217.jar
index 82282b5..049bf19 100644
--- a/applications/content/lib/poi-ooxml-schemas-3.7.jar
+++ b/applications/content/lib/poi-ooxml-schemas-3.8-beta5-20111217.jar
Binary files differ
diff --git a/applications/content/lib/poi-scratchpad-3.7.jar b/applications/content/lib/poi-scratchpad-3.7.jar
deleted file mode 100644
index 6fd02d4..0000000
--- a/applications/content/lib/poi-scratchpad-3.7.jar
+++ /dev/null
Binary files differ
diff --git a/applications/content/lib/poi-scratchpad-3.8-beta5-20111217.jar b/applications/content/lib/poi-scratchpad-3.8-beta5-20111217.jar
new file mode 100644
index 0000000..c079036
--- /dev/null
+++ b/applications/content/lib/poi-scratchpad-3.8-beta5-20111217.jar
Binary files differ
diff --git a/applications/content/lib/tika-core-0.9.jar b/applications/content/lib/tika-core-0.9.jar
deleted file mode 100644
index 1c704d6..0000000
--- a/applications/content/lib/tika-core-0.9.jar
+++ /dev/null
Binary files differ
diff --git a/applications/content/lib/tika-parsers-0.9.jar b/applications/content/lib/tika-parsers-0.9.jar
deleted file mode 100644
index 93690d3..0000000
--- a/applications/content/lib/tika-parsers-0.9.jar
+++ /dev/null
Binary files differ
diff --git a/applications/content/src/org/ofbiz/content/ContentManagementEvents.java b/applications/content/src/org/ofbiz/content/ContentManagementEvents.java
index a95cdfe..6681481 100644
--- a/applications/content/src/org/ofbiz/content/ContentManagementEvents.java
+++ b/applications/content/src/org/ofbiz/content/ContentManagementEvents.java
@@ -99,16 +99,12 @@
         }
 */
 
-        Iterator<Map<String, Object>> it = valueList.iterator();
         int counter = 0;
-        while (it.hasNext()) {
-            Map<String, Object> map = it.next();
+        for(Map<String, Object> map : valueList) {
             String contentId = (String)map.get("contentId");
             //Integer idxObj = (Integer)contentIdLookup.get(contentId);
             //int idx = idxObj.intValue();
-            Iterator<String []> itPubPt = permittedPublishPointList.iterator();
-            while (itPubPt.hasNext()) {
-                String [] pubArr = itPubPt.next();
+            for(String [] pubArr : permittedPublishPointList) {
                 String pubContentId = pubArr[0];
                 String pubValue = (String)map.get(pubContentId);
                 String paramName = Integer.toString(counter)  + "_" + pubContentId;
@@ -212,11 +208,8 @@
 
         // make a map of the values that are passed in using the top subSite as the key.
         // Content can only be linked to one subsite under a top site (ends with "_MASTER")
-        Set<String> keySet = paramMap.keySet();
-        Iterator<String> itKeySet = keySet.iterator();
         Map<String, String> siteIdLookup = FastMap.newInstance();
-        while (itKeySet.hasNext()) {
-            String param = itKeySet.next();
+        for(String param : paramMap.keySet()) {
             int pos = param.indexOf("select_");
                 //if (Debug.infoOn()) Debug.logInfo("in updatePublishLinks, param:" + param + " pos:" + pos , module);
             if (pos >= 0) {
@@ -228,7 +221,6 @@
         //if (Debug.infoOn()) Debug.logInfo("in updatePublishLinks, siteIdLookup:" + siteIdLookup , module);
 
         // Loop thru all the possible subsites
-        Iterator<Object []> it = origPublishedLinkList.iterator();
         Timestamp nowTimestamp = UtilDateTime.nowTimestamp();
         // int counter = 0;
         String responseMessage = null;
@@ -236,18 +228,15 @@
         // String permissionMessage = null;
         boolean statusIdUpdated = false;
         Map<String, Object> results = null;
-        while (it.hasNext()) {
-            Object [] arr = it.next();
+        for(Object [] arr : origPublishedLinkList) {
             //if (Debug.infoOn()) Debug.logInfo("in updatePublishLinks, arr:" + Arrays.asList(arr) , module);
             String contentId = (String)arr[0]; // main (2nd level) site id
             String origSubContentId = null;
             List<Object []> origSubList = UtilGenerics.checkList(arr[1]);
             // Timestamp topFromDate = (Timestamp)arr[3];
             Timestamp origFromDate = null;
-            Iterator<Object []> itOrigSubPt = origSubList.iterator();
+            for(Object [] pubArr : origSubList) {
             // see if a link already exists by looking for non-null fromDate
-            while (itOrigSubPt.hasNext()) {
-                Object [] pubArr = itOrigSubPt.next();
                 //if (Debug.infoOn()) Debug.logInfo("in updatePublishLinks, pubArr:" + Arrays.asList(pubArr) , module);
                 Timestamp fromDate = (Timestamp)pubArr[2];
                 origSubContentId = null;
@@ -267,9 +256,7 @@
                         // disable existing link
                         if (UtilValidate.isNotEmpty(origSubContentId) && origFromDate != null) {
                             List<GenericValue> oldActiveValues = delegator.findByAnd("ContentAssoc", UtilMisc.toMap("contentId", targContentId, "contentIdTo", origSubContentId, "contentAssocTypeId", "PUBLISH_LINK", "thruDate", null));
-                            Iterator<GenericValue> iterOldActive = oldActiveValues.iterator();
-                            while (iterOldActive.hasNext()) {
-                                GenericValue cAssoc = iterOldActive.next();
+                            for(GenericValue cAssoc : oldActiveValues) {
                                 cAssoc.set("thruDate", nowTimestamp);
                                 cAssoc.store();
                                 //if (Debug.infoOn()) Debug.logInfo("in updatePublishLinks, deactivating:" + cAssoc , module);
@@ -323,16 +310,12 @@
                 } else if (UtilValidate.isNotEmpty(origSubContentId)) {
                     // if no current link is passed in, look to see if there is an existing link(s) that must be disabled
                     List<GenericValue> oldActiveValues = delegator.findByAnd("ContentAssoc", UtilMisc.toMap("contentId", targContentId, "contentIdTo", origSubContentId, "contentAssocTypeId", "PUBLISH_LINK", "thruDate", null));
-                    Iterator<GenericValue> iterOldActive = oldActiveValues.iterator();
-                    while (iterOldActive.hasNext()) {
-                        GenericValue cAssoc = iterOldActive.next();
+                    for(GenericValue cAssoc : oldActiveValues) {
                         cAssoc.set("thruDate", nowTimestamp);
                         cAssoc.store();
                     }
                     oldActiveValues = delegator.findByAnd("ContentAssoc", UtilMisc.toMap("contentId", targContentId, "contentIdTo", contentId, "contentAssocTypeId", "PUBLISH_LINK", "thruDate", null));
-                    iterOldActive = oldActiveValues.iterator();
-                    while (iterOldActive.hasNext()) {
-                        GenericValue cAssoc = iterOldActive.next();
+                    for(GenericValue cAssoc : oldActiveValues) {
                         cAssoc.set("thruDate", nowTimestamp);
                         cAssoc.store();
                     }
diff --git a/applications/content/src/org/ofbiz/content/ContentManagementServices.java b/applications/content/src/org/ofbiz/content/ContentManagementServices.java
index 1f82f0a..3b224bf 100644
--- a/applications/content/src/org/ofbiz/content/ContentManagementServices.java
+++ b/applications/content/src/org/ofbiz/content/ContentManagementServices.java
@@ -367,9 +367,7 @@
                 try {
                     if (contentPurposeList != null) {
                         Set<String> contentPurposeSet = UtilMisc.makeSetWritable(contentPurposeList);
-                        Iterator<String> iter = contentPurposeSet.iterator();
-                        while (iter.hasNext()) {
-                            String contentPurposeTypeId = iter.next();
+                        for(String contentPurposeTypeId : contentPurposeSet) {
                             GenericValue contentPurpose = delegator.makeValue("ContentPurpose", UtilMisc.toMap("contentId", contentId, "contentPurposeTypeId", contentPurposeTypeId));
                             contentPurpose.create();
                         }
@@ -497,14 +495,12 @@
           return ServiceUtil.returnError(e.toString());
       }
 
-      Iterator<GenericValue> siteRoleIter = siteRoles.iterator();
-      while (siteRoleIter.hasNext()) {
+      for(GenericValue roleType : siteRoles) {
           Map<String, Object> serviceContext = FastMap.newInstance();
           serviceContext.put("partyId", partyId);
           serviceContext.put("contentId", siteContentId);
           serviceContext.put("userLogin", userLogin);
           Debug.logInfo("updateSiteRoles, serviceContext(0):" + serviceContext, module);
-            GenericValue roleType = siteRoleIter.next();
           String siteRole = (String)roleType.get("roleTypeId"); // BLOG_EDITOR, BLOG_ADMIN, etc.
           String cappedSiteRole = ModelUtil.dbNameToVarName(siteRole);
           if (Debug.infoOn()) {
@@ -797,9 +793,7 @@
         String partyId = (String)serviceContext.get("partyId");
         Map<String, Object> findMap = UtilMisc.<String, Object>toMap("partyId", partyId);
         List<GenericValue> userLoginList = delegator.findByAnd("UserLogin", findMap);
-        Iterator<GenericValue> iter = userLoginList.iterator();
-        while (iter.hasNext()) {
-            GenericValue partyUserLogin = iter.next();
+        for(GenericValue partyUserLogin : userLoginList) {
             String partyUserLoginId = partyUserLogin.getString("userLoginId");
             serviceContext.put("contentId", partyUserLoginId); // author contentId
             dispatcher.runSync("createContentRole", serviceContext);
@@ -829,9 +823,7 @@
         } catch (GenericEntityException e) {
           return ServiceUtil.returnError(e.toString());
         }
-        Iterator<GenericValue> siteRoleIter = siteRoles.iterator();
-        while (siteRoleIter.hasNext()) {
-            GenericValue roleType = siteRoleIter.next();
+        for(GenericValue roleType : siteRoles) {
             String siteRole = (String)roleType.get("roleTypeId"); // BLOG_EDITOR, BLOG_ADMIN, etc.
             String cappedSiteRole = ModelUtil.dbNameToVarName(siteRole);
             //if (Debug.infoOn()) Debug.logInfo("updateSiteRoles, cappediteRole(1):" + cappedSiteRole, module);
@@ -1186,9 +1178,7 @@
             thisContent.set("contentTypeId", contentTypeId);
             thisContent.store();
             List<GenericValue> kids = ContentWorker.getAssociatedContent(thisContent, "from", UtilMisc.toList("SUB_CONTENT"), null, null, null);
-            Iterator<GenericValue> iter = kids.iterator();
-            while (iter.hasNext()) {
-                GenericValue kidContent = iter.next();
+            for(GenericValue kidContent : kids) {
                 if (contentTypeId.equals("OUTLINE_NODE")) {
                     updateOutlineNodeChildren(kidContent, false, context);
                 } else {
@@ -1229,18 +1219,14 @@
             thisContent.set("contentTypeId", "OUTLINE_NODE");
             thisContent.store();
             List<GenericValue> kids = ContentWorker.getAssociatedContent(thisContent, "from", UtilMisc.toList("SUB_CONTENT"), null, null, null);
-            Iterator<GenericValue> iter = kids.iterator();
-            while (iter.hasNext()) {
-                GenericValue kidContent = iter.next();
+            for(GenericValue kidContent : kids) {
                 if (contentTypeId.equals("OUTLINE_NODE")) {
                     updateOutlineNodeChildren(kidContent, true, context);
                 } else {
                     kidContent.put("contentTypeId", "PAGE_NODE");
                     kidContent.store();
                     List<GenericValue> kids2 = ContentWorker.getAssociatedContent(kidContent, "from", UtilMisc.toList("SUB_CONTENT"), null, null, null);
-                    Iterator<GenericValue> iter2 = kids2.iterator();
-                    while (iter2.hasNext()) {
-                        GenericValue kidContent2 = iter2.next();
+                    for(GenericValue kidContent2 : kids2) {
                         updatePageNodeChildren(kidContent2, context);
                     }
                 }
@@ -1311,9 +1297,7 @@
 
         //if (contentTypeId == null || contentTypeId.equals("OUTLINE_DOCUMENT") || contentTypeId.equals("DOCUMENT")) {
         List<GenericValue> kids = ContentWorker.getAssociatedContent(content, "from", UtilMisc.toList("SUB_CONTENT"), null, null, null);
-        Iterator<GenericValue> iter = kids.iterator();
-        while (iter.hasNext()) {
-            GenericValue kidContent = iter.next();
+        for(GenericValue kidContent : kids) {
             updatePageNodeChildren(kidContent, context);
         }
         //}
@@ -1355,9 +1339,7 @@
         if (contentTypeId == null || contentTypeId.equals("DOCUMENT") || contentTypeId.equals("OUTLINE_NODE")) {
         //if (contentTypeId == null || contentTypeId.equals("DOCUMENT")) {
             List<GenericValue> kids = ContentWorker.getAssociatedContent(content, "from", UtilMisc.toList("SUB_CONTENT"), null, null, null);
-            Iterator<GenericValue> iter = kids.iterator();
-            while (iter.hasNext()) {
-                GenericValue kidContent = iter.next();
+            for(GenericValue kidContent : kids) {
                 updateOutlineNodeChildren(kidContent, forceOutline, context);
             }
         }
@@ -1609,8 +1591,11 @@
             Debug.logError(msg, module);
             return ServiceUtil.returnError(msg);
         }
-        Long useTime = (Long)productContent.get("useTime");
-        Integer newUseTime = Integer.valueOf(useTime.intValue() * qty.intValue());
+        Long useTime = (Long) productContent.get("useTime");
+        Integer newUseTime = null;
+        if (UtilValidate.isNotEmpty(useTime)) {
+            newUseTime = Integer.valueOf(useTime.intValue() * qty.intValue());
+        }
         context.put("useTime", newUseTime);
         context.put("useTimeUomId", productContent.get("useTimeUomId"));
         context.put("useRoleTypeId", productContent.get("useRoleTypeId"));
@@ -1650,10 +1635,8 @@
             Timestamp orderCreatedDate = (Timestamp) orderHeader.get("orderDate");
             context.put("orderCreatedDate", orderCreatedDate);
             List<GenericValue> orderItemList = orderHeader.getRelated("OrderItem");
-            Iterator<GenericValue> orderItemIter = orderItemList.iterator();
             ModelService subscriptionModel = dispatcher.getDispatchContext().getModelService("updateContentSubscriptionByProduct");
-            while (orderItemIter.hasNext()) {
-                GenericValue orderItem = orderItemIter.next();
+            for(GenericValue orderItem : orderItemList) {
                 BigDecimal qty = orderItem.getBigDecimal("quantity");
                 String productId = (String) orderItem.get("productId");
                 List<GenericValue> productContentList = delegator.findByAnd("ProductContent", UtilMisc.toMap("productId", productId, "productContentTypeId", "ONLINE_ACCESS"));
@@ -1727,9 +1710,7 @@
         result = dispatcher.runSync(serviceName, UtilMisc.toMap("content", content, "userLogin", userLogin));
 
         List<GenericValue> kids = ContentWorker.getAssociatedContent(content, "from", contentAssocTypeIdList, null, null, null);
-        Iterator<GenericValue> iter = kids.iterator();
-        while (iter.hasNext()) {
-            GenericValue kidContent = iter.next();
+        for(GenericValue kidContent : kids) {
             followNodeChildrenMethod(kidContent, dispatcher, serviceName, context);
         }
         return result;
diff --git a/applications/content/src/org/ofbiz/content/ContentManagementWorker.java b/applications/content/src/org/ofbiz/content/ContentManagementWorker.java
index 711d5ec..3bb3401 100644
--- a/applications/content/src/org/ofbiz/content/ContentManagementWorker.java
+++ b/applications/content/src/org/ofbiz/content/ContentManagementWorker.java
@@ -130,9 +130,7 @@
         Collection<String> keyColl = pk.getPrimaryKey().getAllKeys();
         List<String> keyList = UtilMisc.makeListWritable(keyColl);
         Collections.sort(keyList);
-        Iterator<String> it = keyList.iterator();
-        while (it.hasNext()) {
-            String ky = it.next();
+        for(String ky : keyList) {
             String val = (String)pk.get(ky);
             if (UtilValidate.isNotEmpty(val)) {
                 if (sig.length() > 0) sig.append("_");
@@ -229,9 +227,7 @@
         GenericValue v = delegator.makeValue(entityName);
         GenericPK passedPK = v.getPrimaryKey();
         Collection<String> keyColl = passedPK.getAllKeys();
-        Iterator<String> keyIt = keyColl.iterator();
-        while (keyIt.hasNext()) {
-            String attrName = keyIt.next();
+        for(String attrName : keyColl) {
             String attrVal = (String)request.getAttribute(attrName);
             if (UtilValidate.isEmpty(attrVal)) {
                 attrVal = (String)paramMap.get(attrName);
@@ -249,13 +245,11 @@
         if (cachedPK != null) {
             useCached = true;
             keyColl = cachedPK.getPrimaryKey().getAllKeys();
-            keyIt = keyColl.iterator();
-            while (keyIt.hasNext()) {
+            for(String ky : keyColl) {
                 String sCached = null;
                 String sPassed = null;
                 Object oPassed = null;
                 Object oCached = null;
-                String ky = keyIt.next();
                 oPassed = passedPK.get(ky);
                 if (oPassed != null) {
                     sPassed = oPassed.toString();
@@ -306,9 +300,7 @@
         List<String []> permittedPublishPointList = FastList.newInstance();
 
         // Check that user has permission to admin sites
-        Iterator<GenericValue> it = allPublishPoints.iterator();
-        while (it.hasNext()) {
-            GenericValue webSitePP = it.next();
+        for(GenericValue webSitePP : allPublishPoints) {
             String contentId = (String)webSitePP.get("contentId");
             String templateTitle = (String)webSitePP.get("templateTitle");
             GenericValue content = delegator.makeValue("Content", UtilMisc.toMap("contentId", contentId));
@@ -352,10 +344,7 @@
         }
         List<GenericValue> allPublishPoints = FastList.newInstance();
         GenericValue webSitePublishPoint = null;
-        GenericValue contentAssoc = null;
-        Iterator<GenericValue> it = relatedPubPts.iterator();
-        while (it.hasNext()) {
-           contentAssoc = it.next();
+        for(GenericValue contentAssoc : relatedPubPts) {
            String pub = (String)contentAssoc.get("contentId");
            //webSitePublishPoint = delegator.findByPrimaryKeyCache("WebSitePublishPoint", UtilMisc.toMap("contentId", pub));
            webSitePublishPoint = getWebSitePublishPoint(delegator, pub, false);
@@ -367,9 +356,7 @@
     public static Map<String, GenericValue> getPublishPointMap(Delegator delegator, String pubPtId) throws GeneralException {
         List<GenericValue> publishPointList = getAllPublishPoints(delegator, pubPtId);
         Map<String, GenericValue> publishPointMap = FastMap.newInstance();
-        Iterator<GenericValue> it = publishPointList.iterator();
-        while (it.hasNext()) {
-           GenericValue webSitePublishPoint = it.next();
+        for(GenericValue webSitePublishPoint : publishPointList) {
            String pub = (String)webSitePublishPoint.get("contentId");
            publishPointMap.put(pub, webSitePublishPoint);
         }
@@ -379,9 +366,7 @@
 
     public static void getAllPublishPointMap(Delegator delegator, String pubPtId, Map<String, GenericValue> publishPointMap) throws GeneralException {
         List<GenericValue> publishPointList = getAllPublishPoints(delegator, pubPtId);
-        Iterator<GenericValue> it = publishPointList.iterator();
-        while (it.hasNext()) {
-           GenericValue webSitePublishPoint = it.next();
+        for(GenericValue webSitePublishPoint : publishPointList) {
            String pub = (String)webSitePublishPoint.get("contentId");
            publishPointMap.put(pub, webSitePublishPoint);
            getAllPublishPointMap(delegator, pub, publishPointMap);
@@ -390,9 +375,7 @@
 
     public static Map<String, GenericValue> getPublishPointMap(Delegator delegator, List<GenericValue> publishPointList) {
         Map<String, GenericValue> publishPointMap = FastMap.newInstance();
-        Iterator<GenericValue> it = publishPointList.iterator();
-        while (it.hasNext()) {
-           GenericValue webSitePublishPoint = it.next();
+        for(GenericValue webSitePublishPoint : publishPointList) {
            String pub = (String)webSitePublishPoint.get("contentId");
            publishPointMap.put(pub, webSitePublishPoint);
         }
@@ -408,10 +391,8 @@
         }
 
         List<Map<String, Object>> staticValueList = FastList.newInstance();
-        Iterator<GenericValue> it = assocValueList.iterator();
         int counter = 0;
-        while (it.hasNext()) {
-            GenericValue content = it.next();
+        for(GenericValue content : assocValueList) {
             String contentId = (String)content.get("contentId");
             String contentName = (String)content.get("contentName");
             String description = (String)content.get("description");
@@ -419,21 +400,17 @@
             map.put("contentId", contentId);
             map.put("contentName", contentName);
             map.put("description", description);
-            Iterator<String []> it2 = permittedPublishPointList.iterator();
-            while (it2.hasNext()) {
-                String [] publishPointArray = it2.next();
+            for(String [] publishPointArray : permittedPublishPointList) {
                 String publishPointId = publishPointArray[0];
-                //fieldName = "_" + Integer.toString(counter) + "_" + publishPointId;
-                String fieldName = publishPointId;
                 List<GenericValue> contentAssocList = content.getRelatedByAnd("ToContentAssoc", UtilMisc.toMap("contentId", publishPointId));
                 List<GenericValue> filteredList = EntityUtil.filterByDate(contentAssocList);
                 if (filteredList.size() > 0) {
-                    map.put(fieldName, "Y");
+                    map.put(publishPointId, "Y");
                     GenericValue assoc = filteredList.get(0);
                     Timestamp fromDate = (Timestamp)assoc.get("fromDate");
-                    map.put(fieldName + "FromDate", fromDate);
+                    map.put(publishPointId + "FromDate", fromDate);
                 } else {
-                    map.put(fieldName, "N");
+                    map.put(publishPointId, "N");
                 }
             }
             staticValueList.add(map);
@@ -536,12 +513,10 @@
         List<String []> publishPointList = getPermittedPublishPoints(delegator, allPublishPointList, userLogin, security , permittedAction, permittedOperations, passedRoles);
         Map<String, Object> publishPointMap = FastMap.newInstance();
         Map<String, Object> publishPointMapAll = FastMap.newInstance();
-        Iterator<String []> it = publishPointList.iterator();
-        while (it.hasNext()) {
+        for(String [] arr : publishPointList) {
             //GenericValue webSitePublishPoint = (GenericValue)it.next();
             //String contentId = (String)webSitePublishPoint.get("contentId");
             //String description = (String)webSitePublishPoint.get("description");
-            String [] arr = it.next();
             String contentId = arr[0];
             String description = arr[1];
             List<Object []> subPointList = FastList.newInstance();
@@ -550,12 +525,10 @@
             publishPointMap.put(contentId, subArr);
             publishPointMapAll.put(contentId, contentId);
             List<GenericValue> subPublishPointList = getAllPublishPoints(delegator, contentId);
-            Iterator<GenericValue> it2 = subPublishPointList.iterator();
-            while (it2.hasNext()) {
+            for(GenericValue webSitePublishPoint2 : subPublishPointList) {
                 //String [] arr2 = (String [])it2.next();
                 //String contentId2 = (String)arr2[0];
                 //String description2 = (String)arr2[1];
-                GenericValue webSitePublishPoint2 = it2.next();
                 String contentId2 = (String)webSitePublishPoint2.get("contentId");
                 String description2 = (String)webSitePublishPoint2.get("templateTitle");
                 publishPointMapAll.put(contentId2, contentId);
@@ -572,9 +545,7 @@
         } catch (GenericEntityException e) {
             throw new GeneralException(e.getMessage());
         }
-        Iterator<GenericValue> it4 = assocValueList.iterator();
-        while (it4.hasNext()) {
-            GenericValue contentAssoc = it4.next();
+        for(GenericValue contentAssoc : assocValueList) {
             String contentIdTo = contentAssoc.getString("contentIdTo");
             String topContentId = (String)publishPointMapAll.get(contentIdTo);
             Object [] subArr = (Object [])publishPointMap.get(topContentId);
@@ -598,10 +569,7 @@
         }
 
         List<Object []> publishedLinkList = FastList.newInstance();
-        Set<String> keySet = publishPointMap.keySet();
-        Iterator<String> it3 = keySet.iterator();
-        while (it3.hasNext()) {
-            String contentId = it3.next();
+        for(String contentId : publishPointMap.keySet()) {
             Object [] subPointArr = (Object [])publishPointMap.get(contentId);
             publishedLinkList.add(subPointArr);
         }
@@ -635,9 +603,7 @@
         List<String []> permittedDepartmentPointList = FastList.newInstance();
 
         // Check that user has permission to admin sites
-        Iterator<GenericValue> it = allDepartmentPoints.iterator();
-        while (it.hasNext()) {
-            GenericValue content = it.next();
+        for(GenericValue content : allDepartmentPoints) {
             String contentId = (String)content.get("contentId");
             String contentName = (String)content.get("contentName");
             String statusId = null;
@@ -680,10 +646,7 @@
         }
         List<GenericValue> allDepartmentPoints = FastList.newInstance();
         GenericValue departmentContent = null;
-        GenericValue contentAssoc = null;
-        Iterator<GenericValue> it = relatedPubPts.iterator();
-        while (it.hasNext()) {
-           contentAssoc = it.next();
+        for(GenericValue contentAssoc : relatedPubPts) {
            String pub = (String)contentAssoc.get("contentId");
            departmentContent = delegator.findByPrimaryKeyCache("Content", UtilMisc.toMap("contentId", pub));
            allDepartmentPoints.add(departmentContent);
@@ -715,9 +678,7 @@
        }
         List<GenericValue> listAll = delegator.findList("ContentAssoc", conditionMain, null, null, null, true);
         List<GenericValue> listFiltered = EntityUtil.filterByDate(listAll);
-        Iterator<GenericValue> iter = listFiltered.iterator();
-        while (iter.hasNext()) {
-            GenericValue contentAssoc = iter.next();
+        for(GenericValue contentAssoc : listFiltered) {
             String subContentId = contentAssoc.getString("contentId");
             subLeafCount += updateStatsTopDown(delegator, subContentId, typeList);
         }
@@ -741,9 +702,7 @@
         EntityCondition conditionMain = EntityCondition.makeCondition(UtilMisc.toList(EntityCondition.makeCondition("contentId", EntityOperator.EQUALS, contentId), conditionType), EntityOperator.AND);
         List<GenericValue> listAll = delegator.findList("ContentAssoc", conditionMain, null, null, null, true);
         List<GenericValue> listFiltered = EntityUtil.filterByDate(listAll);
-        Iterator<GenericValue> iter = listFiltered.iterator();
-        while (iter.hasNext()) {
-            GenericValue contentAssoc = iter.next();
+        for(GenericValue contentAssoc : listFiltered) {
             String contentIdTo = contentAssoc.getString("contentIdTo");
             GenericValue contentTo = delegator.findByPrimaryKey("Content", UtilMisc.toMap("contentId", contentIdTo));
             int intLeafCount = 0;
diff --git a/applications/content/src/org/ofbiz/content/ConvertTree.java b/applications/content/src/org/ofbiz/content/ConvertTree.java
index 6bfcf52..d10f514 100644
--- a/applications/content/src/org/ofbiz/content/ConvertTree.java
+++ b/applications/content/src/org/ofbiz/content/ConvertTree.java
@@ -129,7 +129,7 @@
                                 contentName = "",
                                 contentNameInprogress = "",
                                 data = line.substring(3,size);
-                                //Debug.log("======Data======"+data);
+                                //Debug.logInfo("======Data======"+data);
                                 size = data.length();
                                 List<GenericValue> contents = null;
 
@@ -190,7 +190,7 @@
                                             delegator.create(Entity);
                                             hasFolder = false;
                                         } else {
-                                            //Debug.log("Content Name = [ "+contentId+"] already exist.");//ShoW log file
+                                            //Debug.logInfo("Content Name = [ "+contentId+"] already exist.");//ShoW log file
                                             hasFolder = true;
                                         }
                                         //Relation Content
@@ -208,7 +208,7 @@
                                                 dispatcher.runSync("createContentAssoc", contentAssoc);
                                                 rootContent=contentId;
                                             } else {
-                                                //Debug.log("ContentAssoc [contentId= "+contentId+",contentIdTo="+rootContent+"] already exist.");//ShoW log file
+                                                //Debug.logInfo("ContentAssoc [contentId= "+contentId+",contentIdTo="+rootContent+"] already exist.");//ShoW log file
                                                 rootContent=contentId;
                                             }
                                         contentName = "";
@@ -277,7 +277,7 @@
                 boolean contentNameMatch = false;
                 if (subContents.charAt(index) == check.charAt(0)) {//store data
                     contentName = contentName + contentNameInprogress;
-                    //Debug.log("subcontentName---->"+contentName);
+                    //Debug.logInfo("subcontentName---->"+contentName);
                     if (contentName.length()>100) {
                         contentName = contentName.substring(0,100);
                     }
@@ -300,7 +300,7 @@
                         Map<String,Object> data = FastMap.newInstance();
                         data.put("userLogin", userLogin);
                         String dataResourceId = (dispatcher.runSync("createDataResource",data)).get("dataResourceId").toString();
-                        //Debug.log("==dataResourceId"+dataResourceId);
+                        //Debug.logInfo("==dataResourceId"+dataResourceId);
 
                         //create Content
                         contentId = delegator.getNextSeqId("Content");
@@ -360,7 +360,7 @@
                         Map<String,Object> data = FastMap.newInstance();
                         data.put("userLogin", userLogin);
                         String dataResourceId = (dispatcher.runSync("createDataResource",data)).get("dataResourceId").toString();
-                        //Debug.log("==dataResourceId"+dataResourceId);
+                        //Debug.logInfo("==dataResourceId"+dataResourceId);
 
                         //create Content
                         contentId = delegator.getNextSeqId("Content");
diff --git a/applications/content/src/org/ofbiz/content/blog/BlogRssServices.java b/applications/content/src/org/ofbiz/content/blog/BlogRssServices.java
index a278b53..ef5eaf7 100644
--- a/applications/content/src/org/ofbiz/content/blog/BlogRssServices.java
+++ b/applications/content/src/org/ofbiz/content/blog/BlogRssServices.java
@@ -115,9 +115,7 @@
         }
 
         if (contentRecs != null) {
-            Iterator<GenericValue> i = contentRecs.iterator();
-            while (i.hasNext()) {
-                GenericValue v = i.next();
+            for(GenericValue v : contentRecs) {
                 String sub = null;
                 try {
                     Map<String, Object> dummy = FastMap.newInstance();
diff --git a/applications/content/src/org/ofbiz/content/cms/CmsEvents.java b/applications/content/src/org/ofbiz/content/cms/CmsEvents.java
index 39d066d..6c8233b 100644
--- a/applications/content/src/org/ofbiz/content/cms/CmsEvents.java
+++ b/applications/content/src/org/ofbiz/content/cms/CmsEvents.java
@@ -142,7 +142,7 @@
             if (pathInfo.endsWith("/")) {
                 pathInfo = pathInfo.substring(0, pathInfo.length() - 1);
             }
-            Debug.log("Path INFO for Alias: " + pathInfo, module);
+            Debug.logInfo("Path INFO for Alias: " + pathInfo, module);
 
             GenericValue pathAlias = null;
             try {
@@ -284,8 +284,14 @@
                     templateMap.put("formStringRenderer", formStringRenderer);
                     //include DOCTYPE for cms screens
                     writer.append("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">");
+                    
+                    // if use web analytics
+                    List<GenericValue> webAnalytics = delegator.findByAnd("WebAnalyticsConfig", UtilMisc.toMap("webSiteId", webSiteId));
+                    
                     // render
-                    if (UtilValidate.isEmpty(mapKey)) {
+                    if (UtilValidate.isNotEmpty(webAnalytics) && hasErrorPage) {
+                        ContentWorker.renderContentAsText(dispatcher, delegator, contentId, writer, templateMap, locale, "text/html", null, null, true, webAnalytics);
+                    } else if (UtilValidate.isEmpty(mapKey)) {
                         ContentWorker.renderContentAsText(dispatcher, delegator, contentId, writer, templateMap, locale, "text/html", null, null, true);
                     } else {
                         ContentWorker.renderSubContentAsText(dispatcher, delegator, contentId, writer, mapKey, templateMap, locale, "text/html", true);
diff --git a/applications/content/src/org/ofbiz/content/compdoc/CompDocEvents.java b/applications/content/src/org/ofbiz/content/compdoc/CompDocEvents.java
index 19d5583..468dac3 100644
--- a/applications/content/src/org/ofbiz/content/compdoc/CompDocEvents.java
+++ b/applications/content/src/org/ofbiz/content/compdoc/CompDocEvents.java
@@ -104,10 +104,7 @@
             Map<String, Object> persistResult = dispatcher.runSync("persistContentAndAssoc", persistMap);
             contentId = (String)persistResult.get("contentId");
             //request.setAttribute("contentId", contentId);
-            Set<String> keySet = persistResult.keySet();
-            Iterator<String> iter = keySet.iterator();
-            while (iter.hasNext()) {
-                Object obj = iter.next();
+            for(Object obj : persistResult.keySet()) {
                 Object val = persistResult.get(obj);
                 request.setAttribute(obj.toString(), val);
             }
@@ -117,10 +114,7 @@
             contentRevisionMap.put("contentId", contentId);
             contentRevisionMap.put("userLogin", userLogin);
             Map<String, Object> result = dispatcher.runSync("persistContentRevisionAndItem", contentRevisionMap);
-            keySet = result.keySet();
-            iter = keySet.iterator();
-            while (iter.hasNext()) {
-                Object obj = iter.next();
+            for(Object obj : result.keySet()) {
                 Object val = result.get(obj);
                 request.setAttribute(obj.toString(), val);
             }
diff --git a/applications/content/src/org/ofbiz/content/compdoc/CompDocServices.java b/applications/content/src/org/ofbiz/content/compdoc/CompDocServices.java
index 39537ca..94d6b35 100644
--- a/applications/content/src/org/ofbiz/content/compdoc/CompDocServices.java
+++ b/applications/content/src/org/ofbiz/content/compdoc/CompDocServices.java
@@ -177,10 +177,8 @@
             //PdfWriter writer = PdfWriter.getInstance(document, baos);
             PdfCopy writer = new PdfCopy(document, baos);
             document.open();
-            Iterator<GenericValue> iter = compDocParts.iterator();
             int pgCnt =0;
-            while (iter.hasNext()) {
-                GenericValue contentAssocRevisionItemView = iter.next();
+            for(GenericValue contentAssocRevisionItemView : compDocParts) {
                 //String thisContentId = contentAssocRevisionItemView.getString("contentId");
                 //String thisContentRevisionSeqId = contentAssocRevisionItemView.getString("maxRevisionSeqId");
                 String thisDataResourceId = contentAssocRevisionItemView.getString("dataResourceId");
diff --git a/applications/content/src/org/ofbiz/content/content/ContentSearch.java b/applications/content/src/org/ofbiz/content/content/ContentSearch.java
index e094f23..467f9ba 100644
--- a/applications/content/src/org/ofbiz/content/content/ContentSearch.java
+++ b/applications/content/src/org/ofbiz/content/content/ContentSearch.java
@@ -460,7 +460,7 @@
     // ======================================================================
 
     @SuppressWarnings("serial")
-	public static abstract class ContentSearchConstraint implements java.io.Serializable {
+    public static abstract class ContentSearchConstraint implements java.io.Serializable {
         public ContentSearchConstraint() { }
 
         public abstract void addConstraint(ContentSearchContext contentSearchContext);
@@ -470,7 +470,7 @@
 
 
     @SuppressWarnings("serial")
-	public static class ContentAssocConstraint extends ContentSearchConstraint {
+    public static class ContentAssocConstraint extends ContentSearchConstraint {
         public static final String constraintName = "ContentAssoc";
         protected String contentId;
         protected String contentAssocTypeId;
diff --git a/applications/content/src/org/ofbiz/content/content/ContentSearchSession.java b/applications/content/src/org/ofbiz/content/content/ContentSearchSession.java
index c6327ce..8a8e8f1 100644
--- a/applications/content/src/org/ofbiz/content/content/ContentSearchSession.java
+++ b/applications/content/src/org/ofbiz/content/content/ContentSearchSession.java
@@ -43,7 +43,7 @@
     public static final String module = ContentSearchSession.class.getName();
     
     @SuppressWarnings("serial")
-	public static class ContentSearchOptions implements java.io.Serializable {
+    public static class ContentSearchOptions implements java.io.Serializable {
         protected List<ContentSearchConstraint> constraintList = null;
         protected ResultSortOrder resultSortOrder = null;
         protected Integer viewIndex = null;
diff --git a/applications/content/src/org/ofbiz/content/content/ContentServices.java b/applications/content/src/org/ofbiz/content/content/ContentServices.java
index e4af9da..4e99240 100644
--- a/applications/content/src/org/ofbiz/content/content/ContentServices.java
+++ b/applications/content/src/org/ofbiz/content/content/ContentServices.java
@@ -102,10 +102,8 @@
         serviceInMap.put("entityOperation", context.get("entityOperation"));
 
         List<GenericValue> permittedList = FastList.newInstance();
-        Iterator<GenericValue> it = contentList.iterator();
         Map<String, Object> permResults = null;
-        while (it.hasNext()) {
-            GenericValue content = it.next();
+        for(GenericValue content : contentList) {
             serviceInMap.put("currentContent", content);
             try {
                 permResults = dispatcher.runSync("checkContentPermission", serviceInMap);
@@ -162,9 +160,7 @@
         if (UtilValidate.isEmpty(kids)) {
             parentList.add(nodeMap.get("contentId"));
         } else {
-            Iterator<Map<String, Object>> iter = kids.iterator();
-            while (iter.hasNext()) {
-                Map<String, Object> node = iter.next();
+            for(Map<String, Object> node : kids) {
                 walkParentTree(node, parentList);
             }
         }
@@ -843,9 +839,7 @@
             List<GenericValue> filteredAssocs = EntityUtil.filterByDate(relatedAssocs);
             //if (Debug.infoOn()) Debug.logInfo("in deactivateAssocs, filteredAssocs:" + filteredAssocs, module);
 
-            Iterator<GenericValue> it = filteredAssocs.iterator();
-            while (it.hasNext()) {
-                GenericValue val = it.next();
+            for(GenericValue val : filteredAssocs) {
                 val.set("thruDate", nowTimestamp);
                 val.store();
                 //if (Debug.infoOn()) Debug.logInfo("in deactivateAssocs, val:" + val, module);
diff --git a/applications/content/src/org/ofbiz/content/content/ContentServicesComplex.java b/applications/content/src/org/ofbiz/content/content/ContentServicesComplex.java
index d43a6fa..9190084 100644
--- a/applications/content/src/org/ofbiz/content/content/ContentServicesComplex.java
+++ b/applications/content/src/org/ofbiz/content/content/ContentServicesComplex.java
@@ -210,7 +210,6 @@
         //EntityExpr joinExpr = null;
         //EntityExpr expr = null;
         String viewName = null;
-        GenericValue contentAssoc = null;
         String contentFieldName = null;
         if (direction != null && direction.equalsIgnoreCase("From")) {
             contentFieldName = "contentIdTo";
@@ -257,9 +256,7 @@
         String contentAssocTypeId = null;
         List<GenericValue> contentAssocsTypeFiltered = FastList.newInstance();
         if (assocTypes != null && assocTypes.size() > 1) {
-            Iterator<GenericValue> it = contentAssocsDateFiltered.iterator();
-            while (it.hasNext()) {
-                contentAssoc = it.next();
+            for(GenericValue contentAssoc : contentAssocsDateFiltered) {
                 contentAssocTypeId = (String)contentAssoc.get("contentAssocTypeId");
                 if (assocTypes.contains(contentAssocTypeId)) {
                     contentAssocsTypeFiltered.add(contentAssoc);
@@ -281,9 +278,7 @@
         GenericValue dataResource = null;
         List<GenericValue> contentAssocDataResourceList = FastList.newInstance();
         Locale locale = Locale.getDefault(); // TODO: this needs to be passed in
-        Iterator<GenericValue> it = contentAssocsTypeFiltered.iterator();
-        while (it.hasNext()) {
-            contentAssoc = it.next();
+        for(GenericValue contentAssoc : contentAssocsTypeFiltered) {
             content = contentAssoc.getRelatedOneCache(assocRelationName);
             if (UtilValidate.isNotEmpty(contentTypes)) {
                 String contentTypeId = (String)content.get("contentTypeId");
diff --git a/applications/content/src/org/ofbiz/content/content/ContentWorker.java b/applications/content/src/org/ofbiz/content/content/ContentWorker.java
index 86c370e..4fc6fa5 100644
--- a/applications/content/src/org/ofbiz/content/content/ContentWorker.java
+++ b/applications/content/src/org/ofbiz/content/content/ContentWorker.java
@@ -163,9 +163,7 @@
             }
 
             alternateViews = EntityUtil.filterByDate(alternateViews, UtilDateTime.nowTimestamp(), "caFromDate", "caThruDate", true);
-            Iterator<GenericValue> alternateViewIter = alternateViews.iterator();
-            while (alternateViewIter.hasNext()) {
-                GenericValue thisView = alternateViewIter.next();
+            for(GenericValue thisView : alternateViews) {
                 GenericValue altContentRole = EntityUtil.getFirst(EntityUtil.filterByDate(thisView.getRelatedByAndCache("ContentRole", UtilMisc.toMap("partyId", partyId, "roleTypeId", roleTypeId))));
                 GenericValue altContent = null;
                 if (UtilValidate.isNotEmpty(altContentRole)) {
@@ -180,7 +178,7 @@
     }
 
     public static void renderContentAsText(LocalDispatcher dispatcher, Delegator delegator, GenericValue content, Appendable out,
-            Map<String,Object>templateContext, Locale locale, String mimeTypeId, boolean cache) throws GeneralException, IOException {
+            Map<String,Object>templateContext, Locale locale, String mimeTypeId, boolean cache, List<GenericValue> webAnalytics) throws GeneralException, IOException {
         // if the content has a service attached run the service
 
         String serviceName = content.getString("serviceName");
@@ -266,7 +264,12 @@
                     Debug.logError("No content ID found.", module);
                     return;
                 }
-                DataResourceWorker.renderDataResourceAsText(delegator, dataResourceId, out, templateContext, locale, mimeTypeId, cache);
+                
+                if (UtilValidate.isNotEmpty(webAnalytics)) {
+                    DataResourceWorker.renderDataResourceAsText(delegator, dataResourceId, out, templateContext, locale, mimeTypeId, cache, webAnalytics);
+                } else {
+                    DataResourceWorker.renderDataResourceAsText(delegator, dataResourceId, out, templateContext, locale, mimeTypeId, cache);
+                }
 
             // there is a template; render the data and then the template
             } else {
@@ -325,10 +328,17 @@
         return writer.toString();
     }
 
+    public static String renderContentAsText(LocalDispatcher dispatcher, Delegator delegator, String contentId, Appendable out,
+            Map<String, Object> templateContext, Locale locale, String mimeTypeId, String partyId, String roleTypeId, boolean cache, List<GenericValue> webAnalytics) throws GeneralException, IOException {
+        GenericValue content = ContentWorker.findContentForRendering(delegator, contentId, locale, partyId, roleTypeId, cache);
+        ContentWorker.renderContentAsText(dispatcher, delegator, content, out, templateContext, locale, mimeTypeId, cache, webAnalytics);
+        return out.toString();
+    }
+
     public static void renderContentAsText(LocalDispatcher dispatcher, Delegator delegator, String contentId, Appendable out,
             Map<String, Object> templateContext, Locale locale, String mimeTypeId, String partyId, String roleTypeId, boolean cache) throws GeneralException, IOException {
         GenericValue content = ContentWorker.findContentForRendering(delegator, contentId, locale, partyId, roleTypeId, cache);
-        ContentWorker.renderContentAsText(dispatcher, delegator, content, out, templateContext, locale, mimeTypeId, cache);
+        ContentWorker.renderContentAsText(dispatcher, delegator, content, out, templateContext, locale, mimeTypeId, cache, null);
     }
 
     public static String renderSubContentAsText(LocalDispatcher dispatcher, Delegator delegator, String contentId, String mapKey, Map<String, Object> templateContext,
@@ -381,9 +391,7 @@
         }
 
         alternateViews = EntityUtil.filterByDate(alternateViews, UtilDateTime.nowTimestamp(), "caFromDate", "caThruDate", true);
-        Iterator<GenericValue> alternateViewIter = alternateViews.iterator();
-        while (alternateViewIter.hasNext()) {
-            GenericValue thisView = alternateViewIter.next();
+        for(GenericValue thisView : alternateViews) {
             String currentLocaleString = thisView.getString("localeString");
             if (UtilValidate.isEmpty(currentLocaleString)) {
                 continue;
@@ -486,11 +494,9 @@
             if (!isReturnAfter) {
                 List<String> assocTypes = FastList.newInstance();
                 List<GenericValue> relatedAssocs = getContentAssocsWithId(delegator, contentId, fromDate, thruDate, direction, assocTypes);
-                Iterator<GenericValue> it = relatedAssocs.iterator();
                 Map<String, Object> assocContext = FastMap.newInstance();
                 assocContext.put("related", relatedAssocs);
-                while (it.hasNext()) {
-                    GenericValue assocValue = it.next();
+                for(GenericValue assocValue : relatedAssocs) {
                     contentAssocTypeId = (String) assocValue.get("contentAssocTypeId");
                     assocContext.put("contentAssocTypeId", contentAssocTypeId);
                     //assocContext.put("contentTypeId", assocValue.get("contentTypeId"));
@@ -687,9 +693,7 @@
         }
         List<GenericValue> relatedViews = UtilGenerics.checkList(results.get("entityList"));
         //if (Debug.infoOn()) Debug.logInfo("traverse, relatedViews:" + relatedViews,null);
-        Iterator<GenericValue> it = relatedViews.iterator();
-        while (it.hasNext()) {
-            GenericValue assocValue = it.next();
+        for(GenericValue assocValue : relatedViews) {
             Map<String, Object> thisNode = ContentWorker.makeNode(assocValue);
             checkConditions(delegator, thisNode, null, whenMap);
             // boolean isReturnBeforePick = booleanDataType(thisNode.get("isReturnBeforePick"));
@@ -759,12 +763,9 @@
         if (linkDir != null && linkDir.equalsIgnoreCase("TO")) {
             contentIdName = contentIdName.concat("To");
         }
-        GenericValue assoc = null;
         GenericValue content = null;
         String contentTypeId = null;
-        Iterator<GenericValue> assocIt = assocList.iterator();
-        while (assocIt.hasNext()) {
-            assoc = assocIt.next();
+        for(GenericValue assoc : assocList) {
             String contentId = (String) assoc.get(contentIdName);
             if (Debug.infoOn()) Debug.logInfo("contentId:" + contentId, "");
             content = delegator.findByPrimaryKey("Content", UtilMisc.toMap("contentId", contentId));
@@ -850,9 +851,7 @@
         exprList.add(joinExpr);
         if (UtilValidate.isNotEmpty(assocTypes)) {
             List<EntityExpr> exprListOr = FastList.newInstance();
-            Iterator<String> it = assocTypes.iterator();
-            while (it.hasNext()) {
-                String assocType = it.next();
+            for(String assocType : assocTypes) {
                 expr = EntityCondition.makeCondition("contentAssocTypeId", EntityOperator.EQUALS, assocType);
                 exprListOr.add(expr);
             }
@@ -962,9 +961,7 @@
             //if (Debug.infoOn()) Debug.logInfo("getContentAncestry, lst:" + lst, "");
             List<GenericValue> lst2 = EntityUtil.filterByDate(lst);
             //if (Debug.infoOn()) Debug.logInfo("getContentAncestry, lst2:" + lst2, "");
-            Iterator<GenericValue> iter = lst2.iterator();
-            while (iter.hasNext()) {
-                GenericValue contentAssoc = iter.next();
+            for(GenericValue contentAssoc : lst2) {
                 String contentIdOther = contentAssoc.getString(contentIdOtherField);
                 if (!contentAncestorList.contains(contentIdOther)) {
                     getContentAncestryAll(delegator, contentIdOther, passedContentTypeId, direction, contentAncestorList);
@@ -986,9 +983,7 @@
          List<GenericValue> contentAncestorList = FastList.newInstance();
          List<Map<String, Object>> nodeTrail = FastList.newInstance();
          getContentAncestry(delegator, contentId, contentAssocTypeId, direction, contentAncestorList);
-         Iterator<GenericValue> contentAncestorListIter = contentAncestorList.iterator();
-         while (contentAncestorListIter.hasNext()) {
-             GenericValue value = contentAncestorListIter.next();
+         for(GenericValue value : contentAncestorList) {
              Map<String, Object> thisNode = ContentWorker.makeNode(value);
              nodeTrail.add(thisNode);
          }
@@ -1435,13 +1430,10 @@
         thisNode.put("isReturnAfterPick", Boolean.FALSE);
         thisNode.put("isPick", Boolean.TRUE);
         thisNode.put("isFollow", Boolean.TRUE);
-        try {
+        if (thisContent.getModelEntity().getField("caContentAssocTypeId") != null) {
             thisNode.put("contentAssocTypeId", thisContent.get("caContentAssocTypeId"));
             thisNode.put("mapKey", thisContent.get("caMapKey"));
             thisNode.put("fromDate", thisContent.get("caFromDate"));
-            thisNode.put("contentAssocTypeId", thisContent.get("caContentAssocTypeId"));
-        } catch (Exception e) {
-            // This ignores the case when thisContent does not have ContentAssoc values
         }
         return thisNode;
     }
@@ -1451,12 +1443,10 @@
             return "";
         }
         StringBuilder csv = new StringBuilder();
-        Iterator<Map<String, ? extends Object>> it = nodeTrail.iterator();
-        while (it.hasNext()) {
+        for(Map<String, ? extends Object> node : nodeTrail) {
             if (csv.length() > 0) {
                 csv.append(",");
             }
-            Map<String, ? extends Object> node = it.next();
             if (node == null) {
                 break;
             }
@@ -1470,12 +1460,9 @@
         List<List<String>> outList = FastList.newInstance();
         List<String> contentIdList = StringUtil.split(csv, ",");
         GenericValue content = null;
-        String contentId = null;
         String contentName = null;
         List<String> values = null;
-        Iterator<String> it = contentIdList.iterator();
-        while (it.hasNext()) {
-            contentId = it.next();
+        for(String contentId : contentIdList) {
             try {
                 content = delegator.findByPrimaryKeyCache("Content", UtilMisc.toMap("contentId", contentId));
             } catch (GenericEntityException e) {
@@ -1498,10 +1485,7 @@
         }
         List<String> contentIdList = StringUtil.split(csv, ",");
         GenericValue content = null;
-        String contentId = null;
-        Iterator<String> it = contentIdList.iterator();
-        while (it.hasNext()) {
-            contentId = it.next();
+        for(String contentId : contentIdList) {
             try {
                 content = delegator.findByPrimaryKeyCache("Content", UtilMisc.toMap("contentId", contentId));
             } catch (GenericEntityException e) {
@@ -1519,10 +1503,7 @@
             return trail;
         }
         List<GenericValue> contentList = csvToContentList(csv, delegator);
-        GenericValue content = null;
-        Iterator<GenericValue> it = contentList.iterator();
-        while (it.hasNext()) {
-            content = it.next();
+        for(GenericValue content : contentList) {
             Map<String, Object> node = makeNode(content);
             trail.add(node);
         }
@@ -1618,10 +1599,7 @@
             s.append(lbl);
         }
         s.append("=").append(indent).append("==>").append(eol);
-        Set<String> keySet = map.keySet();
-        Iterator<String> it = keySet.iterator();
-        while (it.hasNext()) {
-            String key = it.next();
+        for(String key : map.keySet()) {
             if ("request response session".indexOf(key) < 0) {
                 Object obj = map.get(key);
                 s.append(spc).append(key).append(sep);
@@ -1667,9 +1645,7 @@
         int sz = lst.size();
         if (lbl != null) s.append(lbl);
         s.append("=").append(indent).append("==> sz:").append(sz).append(eol);
-        Iterator<Object> it = lst.iterator();
-        while (it.hasNext()) {
-            Object obj = it.next();
+        for(Object obj : lst) {
             s.append(spc);
             if (obj instanceof GenericValue) {
                 GenericValue gv = (GenericValue)obj;
diff --git a/applications/content/src/org/ofbiz/content/content/PermissionRecorder.java b/applications/content/src/org/ofbiz/content/content/PermissionRecorder.java
index 6cc1eb6..51b1a35 100644
--- a/applications/content/src/org/ofbiz/content/content/PermissionRecorder.java
+++ b/applications/content/src/org/ofbiz/content/content/PermissionRecorder.java
@@ -236,9 +236,7 @@
         sb.append("<td class=\"headr\" >Pass/Fail</td>");
         sb.append("</tr>");
 
-        Iterator<Map<String, Object>> iter = permCheckResults.iterator();
-        while (iter.hasNext()) {
-            Map<String, Object> cMap = iter.next();
+        for(Map<String, Object> cMap : permCheckResults) {
             sb.append(renderCurrentContentMapHtml(cMap));
         }
         sb.append("</table>");
@@ -248,9 +246,7 @@
     public String renderCurrentContentMapHtml(Map<String, Object> cMap) {
         StringBuilder sb = new StringBuilder();
         List<Map<String, Object>> resultList = UtilGenerics.checkList(cMap.get("checkResultList"));
-        Iterator<Map<String, Object>> iter = resultList.iterator();
-        while (iter.hasNext()) {
-            Map<String, Object> rMap = iter.next();
+        for(Map<String, Object> rMap : resultList) {
             //if (Debug.infoOn()) Debug.logInfo("renderCCMapHtml, (1):" + rMap, module);
             sb.append(renderResultRowHtml(rMap, cMap));
         }
diff --git a/applications/content/src/org/ofbiz/content/content/UploadContentAndImage.java b/applications/content/src/org/ofbiz/content/content/UploadContentAndImage.java
index 49578d8..351b845 100644
--- a/applications/content/src/org/ofbiz/content/content/UploadContentAndImage.java
+++ b/applications/content/src/org/ofbiz/content/content/UploadContentAndImage.java
@@ -463,11 +463,9 @@
 
         ModelEntity modelEntity = delegator.getModelEntity("ContentAssocDataResourceViewFrom");
         List<String> fieldNames = modelEntity.getAllFieldNames();
-        Iterator<String> iter = fieldNames.iterator();
         Map<String, Object> ftlContext2 = FastMap.newInstance();
         Map<String, Object> ftlContext3 = FastMap.newInstance();
-        while (iter.hasNext()) {
-            String keyName = iter.next();
+        for(String keyName : fieldNames) {
             Object obj = passedParams.get(keyName + suffix);
             ftlContext2.put(keyName, obj);
         }
diff --git a/applications/content/src/org/ofbiz/content/data/DataEvents.java b/applications/content/src/org/ofbiz/content/data/DataEvents.java
index 193cfb6..d4c3080 100644
--- a/applications/content/src/org/ofbiz/content/data/DataEvents.java
+++ b/applications/content/src/org/ofbiz/content/data/DataEvents.java
@@ -167,7 +167,7 @@
 
         // hack for IE and mime types
         if (userAgent.indexOf("MSIE") > -1) {
-            Debug.log("Found MSIE changing mime type from - " + mimeType, module);
+            Debug.logInfo("Found MSIE changing mime type from - " + mimeType, module);
             mimeType = "application/octet-stream";
         }
 
@@ -200,7 +200,7 @@
             stream = (InputStream) resourceData.get("stream");
             length = (Long) resourceData.get("length");
         }
-        Debug.log("Got resource data stream: " + length + " bytes", module);
+        Debug.logInfo("Got resource data stream: " + length + " bytes", module);
 
         // stream the content to the browser
         if (stream != null && length != null) {
@@ -230,7 +230,7 @@
         Delegator delegator = (Delegator) request.getAttribute("delegator");
         Map<String, Object> parameters = UtilHttp.getParameterMap(request);
 
-        Debug.log("Img UserAgent - " + request.getHeader("User-Agent"), module);
+        Debug.logInfo("Img UserAgent - " + request.getHeader("User-Agent"), module);
 
         String dataResourceId = (String) parameters.get("imgId");
         if (UtilValidate.isEmpty(dataResourceId)) {
@@ -269,7 +269,7 @@
             // hack for IE and mime types
             String userAgent = request.getHeader("User-Agent");
             if (userAgent.indexOf("MSIE") > -1) {
-                Debug.log("Found MSIE changing mime type from - " + mimeType, module);
+                Debug.logInfo("Found MSIE changing mime type from - " + mimeType, module);
                 mimeType = "application/octet-stream";
             }
 
diff --git a/applications/content/src/org/ofbiz/content/data/DataResourceWorker.java b/applications/content/src/org/ofbiz/content/data/DataResourceWorker.java
index 242f650..1cddf25 100644
--- a/applications/content/src/org/ofbiz/content/data/DataResourceWorker.java
+++ b/applications/content/src/org/ofbiz/content/data/DataResourceWorker.java
@@ -55,6 +55,7 @@
 import org.ofbiz.base.util.Debug;
 import org.ofbiz.base.util.FileUtil;
 import org.ofbiz.base.util.GeneralException;
+import org.ofbiz.base.util.StringUtil;
 import org.ofbiz.base.util.UtilGenerics;
 import org.ofbiz.base.util.UtilHttp;
 import org.ofbiz.base.util.UtilIO;
@@ -62,6 +63,7 @@
 import org.ofbiz.base.util.UtilProperties;
 import org.ofbiz.base.util.UtilValidate;
 import org.ofbiz.base.util.UtilXml;
+import org.ofbiz.base.util.StringUtil.StringWrapper;
 import org.ofbiz.base.util.collections.MapStack;
 import org.ofbiz.base.util.template.FreeMarkerWorker;
 import org.ofbiz.base.util.template.XslTransform;
@@ -70,6 +72,7 @@
 import org.ofbiz.entity.Delegator;
 import org.ofbiz.entity.GenericEntityException;
 import org.ofbiz.entity.GenericValue;
+import org.ofbiz.entity.util.EntityUtilProperties;
 import org.ofbiz.service.GenericServiceException;
 import org.ofbiz.service.LocalDispatcher;
 import org.ofbiz.widget.screen.MacroScreenRenderer;
@@ -542,7 +545,7 @@
             latestDir = makeNewDirectory(parent);
         }
 
-        Debug.log("Directory Name : " + latestDir.getName(), module);
+        Debug.logInfo("Directory Name : " + latestDir.getName(), module);
         if (absolute) {
             return latestDir.getAbsolutePath().replace('\\','/');
         } else {
@@ -585,12 +588,18 @@
     public static String renderDataResourceAsText(Delegator delegator, String dataResourceId, Map<String, Object> templateContext,
              Locale locale, String targetMimeTypeId, boolean cache) throws GeneralException, IOException {
         Writer writer = new StringWriter();
-        renderDataResourceAsText(delegator, dataResourceId, writer, templateContext, locale, targetMimeTypeId, cache);
+        renderDataResourceAsText(delegator, dataResourceId, writer, templateContext, locale, targetMimeTypeId, cache, null);
         return writer.toString();
     }
 
-    public static void renderDataResourceAsText(Delegator delegator, String dataResourceId, Appendable out,
+    public static String renderDataResourceAsText(Delegator delegator, String dataResourceId, Appendable out,
             Map<String, Object> templateContext, Locale locale, String targetMimeTypeId, boolean cache) throws GeneralException, IOException {
+       renderDataResourceAsText(delegator, dataResourceId, out, templateContext, locale, targetMimeTypeId, cache, null);
+       return out.toString();
+   }
+
+    public static void renderDataResourceAsText(Delegator delegator, String dataResourceId, Appendable out,
+            Map<String, Object> templateContext, Locale locale, String targetMimeTypeId, boolean cache, List<GenericValue> webAnalytics) throws GeneralException, IOException {
         if (dataResourceId == null) {
             throw new GeneralException("Cannot lookup data resource with for a null dataResourceId");
         }
@@ -655,6 +664,19 @@
                     // get the template data for rendering
                     String templateText = getDataResourceText(dataResource, targetMimeTypeId, locale, templateContext, delegator, cache);
 
+                    // if use web analytics.
+                    if (UtilValidate.isNotEmpty(webAnalytics)) {
+                        StringBuffer newTemplateText = new StringBuffer(templateText);
+                        String webAnalyticsCode = "<script language=\"JavaScript\" type=\"text/javascript\">";
+                        for (GenericValue webAnalytic : webAnalytics) {
+                            StringWrapper wrapString = StringUtil.wrapString((String) webAnalytic.get("webAnalyticsCode"));
+                            webAnalyticsCode += wrapString.toString();
+                        }
+                        webAnalyticsCode += "</script>";
+                        newTemplateText.insert(templateText.lastIndexOf("</head>"), webAnalyticsCode);
+                        templateText = newTemplateText.toString();
+                    }
+
                     // render the FTL template
                     FreeMarkerWorker.renderTemplate("DataResource:" + dataResourceId, templateText, templateContext, out);
                 } catch (TemplateException e) {
@@ -673,7 +695,7 @@
                 if (sourceFileLocation != null && sourceFileLocation.exists()) {
                     UtilMisc.copyFile(sourceFileLocation,targetFileLocation);
                 } else {
-                    String defaultVisualThemeId = UtilProperties.getPropertyValue("general", "VISUAL_THEME");
+                    String defaultVisualThemeId = EntityUtilProperties.getPropertyValue("general", "VISUAL_THEME", delegator);
                     if (defaultVisualThemeId != null) {
                         GenericValue themeValue = delegator.findOne("VisualThemeResource", UtilMisc.toMap("visualThemeId", defaultVisualThemeId, "resourceTypeEnumId", "VT_DOCBOOKSTYLESHEET", "sequenceId", "01"), true);
                         sourceFileLocation = new File(System.getProperty("ofbiz.home") + "/themes" + themeValue.get("resourceValue"));
diff --git a/applications/content/src/org/ofbiz/content/layout/LayoutEvents.java b/applications/content/src/org/ofbiz/content/layout/LayoutEvents.java
index 2866e60..f6498fa 100644
--- a/applications/content/src/org/ofbiz/content/layout/LayoutEvents.java
+++ b/applications/content/src/org/ofbiz/content/layout/LayoutEvents.java
@@ -593,9 +593,7 @@
         GenericValue v = delegator.makeValue(entityName);
         GenericPK passedPK = v.getPrimaryKey();
         Collection<String> keyColl = passedPK.getAllKeys();
-        Iterator<String> keyIt = keyColl.iterator();
-        while (keyIt.hasNext()) {
-            String attrName = keyIt.next();
+        for(String attrName : keyColl) {
             String attrVal = (String)request.getAttribute(attrName);
             if (attrVal == null) {
                 attrVal = (String)paramMap.get(attrName);
diff --git a/applications/content/src/org/ofbiz/content/search/SearchWorker.java b/applications/content/src/org/ofbiz/content/search/SearchWorker.java
index 17eef36..bdd1008 100644
--- a/applications/content/src/org/ofbiz/content/search/SearchWorker.java
+++ b/applications/content/src/org/ofbiz/content/search/SearchWorker.java
@@ -39,9 +39,11 @@
 import org.ofbiz.service.LocalDispatcher;
 
 import org.apache.lucene.analysis.standard.StandardAnalyzer;
+import org.apache.lucene.analysis.Analyzer;
 import org.apache.lucene.document.Document;
 import org.apache.lucene.index.IndexReader;
 import org.apache.lucene.index.IndexWriter;
+import org.apache.lucene.index.IndexWriterConfig;
 import org.apache.lucene.index.Term;
 import org.apache.lucene.store.Directory;
 import org.apache.lucene.store.FSDirectory;
@@ -132,16 +134,21 @@
         }
         // Now create
         IndexWriter writer = null;
+        long savedWriteLockTimeout = IndexWriterConfig.getDefaultWriteLockTimeout();
+        Analyzer analyzer = new StandardAnalyzer(Version.LUCENE_34);
+        IndexWriterConfig conf = new IndexWriterConfig(Version.LUCENE_34, analyzer);
+
         try {
-            writer = new IndexWriter(directory, new StandardAnalyzer(Version.LUCENE_30), false, IndexWriter.MaxFieldLength.UNLIMITED);
-        } catch (Exception e) {
-            writer = new IndexWriter(directory, new StandardAnalyzer(Version.LUCENE_30), true, IndexWriter.MaxFieldLength.UNLIMITED);
+            IndexWriterConfig.setDefaultWriteLockTimeout(2000);
+            writer  = new IndexWriter(directory, conf);
+        } finally {
+            IndexWriterConfig.setDefaultWriteLockTimeout(savedWriteLockTimeout);
         }
 
         for (GenericValue gv : contentList) {
             indexContent(dispatcher, delegator, context, gv, writer);
         }
-        writer.optimize();
+        writer.forceMerge(1);
         writer.close();
     }
 
@@ -173,17 +180,30 @@
 
     public static void indexContent(LocalDispatcher dispatcher, Delegator delegator, Map<String, Object> context, GenericValue content, String path) throws Exception {
         Directory directory = FSDirectory.open(new File(getIndexPath(path)));
+        long savedWriteLockTimeout = IndexWriterConfig.getDefaultWriteLockTimeout();
+        Analyzer analyzer = new StandardAnalyzer(Version.LUCENE_35);
+        IndexWriterConfig conf = new IndexWriterConfig(Version.LUCENE_35, analyzer);
         IndexWriter writer = null;
         try {
-            writer = new IndexWriter(directory, new StandardAnalyzer(Version.LUCENE_30), false, IndexWriter.MaxFieldLength.UNLIMITED);
+            try {
+                IndexWriterConfig.setDefaultWriteLockTimeout(2000);
+                writer  = new IndexWriter(directory, conf);
+            } finally {
+                IndexWriterConfig.setDefaultWriteLockTimeout(savedWriteLockTimeout);
+            }
             if (Debug.infoOn()) Debug.logInfo("Used old directory:" + directory.toString(), module);
         } catch (FileNotFoundException e) {
-            writer = new IndexWriter(directory, new StandardAnalyzer(Version.LUCENE_30), true, IndexWriter.MaxFieldLength.UNLIMITED);
+            try {
+                IndexWriterConfig.setDefaultWriteLockTimeout(2000);
+                writer  = new IndexWriter(directory, conf);
+            } finally {
+                IndexWriterConfig.setDefaultWriteLockTimeout(savedWriteLockTimeout);
+            }
             if (Debug.infoOn()) Debug.logInfo("Created new directory:" + directory.toString(), module);
         }
 
         indexContent(dispatcher, delegator, context, content, writer);
-        writer.optimize();
+        writer.forceMerge(1);
         writer.close();
     }
 
@@ -211,14 +231,19 @@
 
     public static void indexDataResource(Delegator delegator, Map<String, Object> context, String id, String path) throws Exception {
         Directory directory = FSDirectory.open(new File(getIndexPath(path)));
+        long savedWriteLockTimeout = IndexWriterConfig.getDefaultWriteLockTimeout();
+        Analyzer analyzer = new StandardAnalyzer(Version.LUCENE_35);
+        IndexWriterConfig conf = new IndexWriterConfig(Version.LUCENE_35, analyzer);
         IndexWriter writer = null;
+
         try {
-            writer = new IndexWriter(directory, new StandardAnalyzer(Version.LUCENE_30), false, IndexWriter.MaxFieldLength.UNLIMITED);
-        } catch (FileNotFoundException e) {
-            writer = new IndexWriter(directory, new StandardAnalyzer(Version.LUCENE_30), true, IndexWriter.MaxFieldLength.UNLIMITED);
+            IndexWriterConfig.setDefaultWriteLockTimeout(2000);
+            writer  = new IndexWriter(directory, conf);
+        } finally {
+            IndexWriterConfig.setDefaultWriteLockTimeout(savedWriteLockTimeout);
         }
         indexDataResource(delegator, context, id, writer);
-        writer.optimize();
+        writer.forceMerge(1);
         writer.close();
     }
 
diff --git a/applications/content/src/org/ofbiz/content/survey/PdfSurveyServices.java b/applications/content/src/org/ofbiz/content/survey/PdfSurveyServices.java
index 501b0f8..bb38d81 100644
--- a/applications/content/src/org/ofbiz/content/survey/PdfSurveyServices.java
+++ b/applications/content/src/org/ofbiz/content/survey/PdfSurveyServices.java
@@ -111,9 +111,7 @@
             String surveyQuestionCategoryId = (String) createCategoryResultMap.get("surveyQuestionCategoryId");
 
             pdfStamper.setFormFlattening(true);
-            Iterator<String> i = acroFieldMap.keySet().iterator();
-            while (i.hasNext()) {
-                String fieldName = i.next();
+            for(String fieldName : acroFieldMap.keySet()) {
                 AcroFields.Item item = acroFields.getFieldItem(fieldName);
                 int type = acroFields.getFieldType(fieldName);
                 String value = acroFields.getField(fieldName);
@@ -182,9 +180,7 @@
                     PdfObject tuValue = null;
 
                     Set<PdfName> dictKeys = UtilGenerics.checkSet(dict.getKeys());
-                    Iterator<PdfName> dictKeyIter = dictKeys.iterator();
-                    while (dictKeyIter.hasNext()) {
-                        PdfName dictKeyName = dictKeyIter.next();
+                    for(PdfName dictKeyName : dictKeys) {
                         PdfObject dictObject = dict.get(dictKeyName);
 
                         if ("/Type".equals(dictKeyName.toString())) {
@@ -271,9 +267,7 @@
             AcroFields fs = s.getAcroFields();
             Map<String, Object> hm = UtilGenerics.checkMap(fs.getFields());
             s.setFormFlattening(true);
-            Iterator<String> i = hm.keySet().iterator();
-            while (i.hasNext()) {
-                String fieldName = i.next();
+            for(String fieldName : hm.keySet()) {
                 //AcroFields.Item item = fs.getFieldItem(fieldName);
                 //int type = fs.getFieldType(fieldName);
                 String value = fs.getField(fieldName);
@@ -327,11 +321,9 @@
             // Debug code to get the values for setting TDP
     //        String[] sa = fs.getAppearanceStates("TDP");
     //        for (int i=0;i<sa.length;i++)
-    //            Debug.log("Appearance="+sa[i]);
+    //            Debug.logInfo("Appearance="+sa[i]);
 
-            Iterator<String> iter = map.keySet().iterator();
-            while (iter.hasNext()) {
-                String fieldName = iter.next();
+            for(String fieldName : map.keySet()) {
                 String parmValue = fs.getField(fieldName);
                 acroFieldMap.put(fieldName, parmValue);
             }
@@ -370,11 +362,9 @@
             // Debug code to get the values for setting TDP
     //      String[] sa = fs.getAppearanceStates("TDP");
     //      for (int i=0;i<sa.length;i++)
-    //          Debug.log("Appearance="+sa[i]);
+    //          Debug.logInfo("Appearance="+sa[i]);
 
-            Iterator<String> iter = map.keySet().iterator();
-            while (iter.hasNext()) {
-                String fieldName = iter.next();
+            for(String fieldName : map.keySet()) {
                 String fieldValue = fs.getField(fieldName);
                 Object obj = acroFieldMap.get(fieldName);
                 if (obj instanceof Date) {
@@ -452,10 +442,8 @@
             PdfWriter.getInstance(document, baos);
 
             List<GenericValue> responses = delegator.findByAnd("SurveyResponseAnswer", UtilMisc.toMap("surveyResponseId", surveyResponseId));
-            Iterator<GenericValue> iter = responses.iterator();
-            while (iter.hasNext()) {
+            for(GenericValue surveyResponseAnswer : responses) {
                 String value = null;
-                GenericValue surveyResponseAnswer = iter.next();
                 String surveyQuestionId = (String) surveyResponseAnswer.get("surveyQuestionId");
                 GenericValue surveyQuestion = delegator.findByPrimaryKey("SurveyQuestion", UtilMisc.toMap("surveyQuestionId", surveyQuestionId));
                 String questionType = surveyQuestion.getString("surveyQuestionTypeId");
@@ -503,9 +491,7 @@
 
         try {
             List<GenericValue> responses = delegator.findByAnd("SurveyResponseAnswer", UtilMisc.toMap("surveyResponseId", surveyResponseId));
-            Iterator<GenericValue> iter = responses.iterator();
-            while (iter.hasNext()) {
-                GenericValue surveyResponseAnswer = iter.next();
+            for(GenericValue surveyResponseAnswer : responses) {
                 String surveyQuestionId = (String) surveyResponseAnswer.get("surveyQuestionId");
                 GenericValue surveyQuestion = delegator.findByPrimaryKey("SurveyQuestion", UtilMisc.toMap("surveyQuestionId", surveyQuestionId));
                 qAndA.add(UtilMisc.toMap("question", surveyQuestion, "response", surveyResponseAnswer));
@@ -546,10 +532,8 @@
             }
 
             List<GenericValue> responses = delegator.findByAnd("SurveyResponseAnswer", UtilMisc.toMap("surveyResponseId", surveyResponseId));
-            Iterator<GenericValue> iter = responses.iterator();
-            while (iter.hasNext()) {
+            for(GenericValue surveyResponseAnswer : responses) {
                 String value = null;
-                GenericValue surveyResponseAnswer = iter.next();
                 String surveyQuestionId = (String) surveyResponseAnswer.get("surveyQuestionId");
 
                 GenericValue surveyQuestion = delegator.findByPrimaryKeyCache("SurveyQuestion", UtilMisc.toMap("surveyQuestionId", surveyQuestionId));
diff --git a/applications/content/src/org/ofbiz/content/survey/SurveyWrapper.java b/applications/content/src/org/ofbiz/content/survey/SurveyWrapper.java
index ba6c5db..058b303 100644
--- a/applications/content/src/org/ofbiz/content/survey/SurveyWrapper.java
+++ b/applications/content/src/org/ofbiz/content/survey/SurveyWrapper.java
@@ -181,9 +181,7 @@
         }
 
         Map<String, Object> sqaaWithColIdListByMultiRespId = FastMap.newInstance();
-        Iterator<GenericValue> surveyQuestionAndApplIter = surveyQuestionAndAppls.iterator();
-        while (surveyQuestionAndApplIter.hasNext()) {
-            GenericValue surveyQuestionAndAppl = surveyQuestionAndApplIter.next();
+        for(GenericValue surveyQuestionAndAppl : surveyQuestionAndAppls) {
             String surveyMultiRespColId = surveyQuestionAndAppl.getString("surveyMultiRespColId");
             if (UtilValidate.isNotEmpty(surveyMultiRespColId)) {
                 String surveyMultiRespId = surveyQuestionAndAppl.getString("surveyMultiRespId");
@@ -368,9 +366,7 @@
             }
 
             if (UtilValidate.isNotEmpty(answers)) {
-                Iterator<GenericValue> i = answers.iterator();
-                while (i.hasNext()) {
-                    GenericValue answer = i.next();
+                for(GenericValue answer : answers) {
                     answerMap.put(answer.getString("surveyQuestionId"), answer);
                 }
             }
@@ -378,9 +374,7 @@
 
         // get the pass-thru (posted form data)
         if (UtilValidate.isNotEmpty(passThru)) {
-            Iterator<String> i = passThru.keySet().iterator();
-            while (i.hasNext()) {
-                String key = i.next();
+            for(String key : passThru.keySet()) {
                 if (key.toUpperCase().startsWith("ANSWERS_")) {
                     int splitIndex = key.indexOf('_');
                     String questionId = key.substring(splitIndex+1);
@@ -440,9 +434,7 @@
     public Map<String, Object> getResults(List<GenericValue> questions) throws SurveyWrapperException {
         Map<String, Object> questionResults = FastMap.newInstance();
         if (questions != null) {
-            Iterator<GenericValue> i = questions.iterator();
-            while (i.hasNext()) {
-                GenericValue question = i.next();
+            for(GenericValue question : questions) {
                 Map<String, Object> results = getResultInfo(question);
                 if (results != null) {
                     questionResults.put(question.getString("surveyQuestionId"), results);
@@ -484,10 +476,8 @@
                 resultMap.put("_total", questionTotal);
 
                 // create the map of option info ("_total", "_percent")
-                Iterator<String> i = thisResult.keySet().iterator();
-                while (i.hasNext()) {
+                for(String optId : thisResult.keySet()) {
                     Map<String, Object> optMap = FastMap.newInstance();
-                    String optId = i.next();
                     Long optTotal = (Long) thisResult.get(optId);
                     if (optTotal == null) {
                         optTotal = Long.valueOf(0);
diff --git a/applications/content/src/org/ofbiz/content/test/LuceneTests.java b/applications/content/src/org/ofbiz/content/test/LuceneTests.java
index 8293021..7d2a973 100644
--- a/applications/content/src/org/ofbiz/content/test/LuceneTests.java
+++ b/applications/content/src/org/ofbiz/content/test/LuceneTests.java
@@ -33,8 +33,8 @@
 import org.apache.lucene.search.BooleanQuery;
 import org.apache.lucene.search.IndexSearcher;
 import org.apache.lucene.search.Query;
-import org.apache.lucene.search.Searcher;
 import org.apache.lucene.search.TopScoreDocCollector;
+import org.apache.lucene.store.Directory;
 import org.apache.lucene.store.FSDirectory;
 import org.apache.lucene.util.Version;
 import org.ofbiz.base.util.UtilGenerics;
@@ -73,14 +73,21 @@
     }
 
     public void testSearchTermHand() throws Exception {
+        Directory directory = FSDirectory.open(new File(SearchWorker.getIndexPath(null)));
+        IndexReader r = null;
+        try {
+            r = IndexReader.open(directory, false);
+        } catch (Exception e) {
+            // ignore
+        }
+
         BooleanQuery combQuery = new BooleanQuery();
         String queryLine = "hand";
-        IndexReader reader = IndexReader.open(FSDirectory.open(new File(SearchWorker.getIndexPath(null))), true);
 
-        Searcher searcher = new IndexSearcher(reader);
-        Analyzer analyzer = new StandardAnalyzer(Version.LUCENE_30);
+        IndexSearcher searcher = new IndexSearcher(r);
+        Analyzer analyzer = new StandardAnalyzer(Version.LUCENE_35);
 
-        QueryParser parser = new QueryParser(Version.LUCENE_30, "content", analyzer);
+        QueryParser parser = new QueryParser(Version.LUCENE_35, "content", analyzer);
         Query query = parser.parse(queryLine);
         combQuery.add(query, BooleanClause.Occur.MUST);
 
diff --git a/applications/content/src/org/ofbiz/content/view/SimpleContentViewHandler.java b/applications/content/src/org/ofbiz/content/view/SimpleContentViewHandler.java
index 5d58eef..9eb4f1e 100644
--- a/applications/content/src/org/ofbiz/content/view/SimpleContentViewHandler.java
+++ b/applications/content/src/org/ofbiz/content/view/SimpleContentViewHandler.java
@@ -131,7 +131,7 @@
                 // hack for IE and mime types
                 //String userAgent = request.getHeader("User-Agent");
                 //if (userAgent.indexOf("MSIE") > -1) {
-                //    Debug.log("Found MSIE changing mime type from - " + mimeTypeId, module);
+                //    Debug.logInfo("Found MSIE changing mime type from - " + mimeTypeId, module);
                 //    mimeTypeId = "application/octet-stream";
                 //}
                 // setup chararcter encoding and content type
diff --git a/applications/content/src/org/ofbiz/content/webapp/ftl/EditRenderSubContentCacheTransform.java b/applications/content/src/org/ofbiz/content/webapp/ftl/EditRenderSubContentCacheTransform.java
index 7ed42ad..3f2ea20 100644
--- a/applications/content/src/org/ofbiz/content/webapp/ftl/EditRenderSubContentCacheTransform.java
+++ b/applications/content/src/org/ofbiz/content/webapp/ftl/EditRenderSubContentCacheTransform.java
@@ -167,10 +167,7 @@
 
                     templateRoot.put("context", templateCtx);
                     if (Debug.verboseOn()) {
-                        Set<String> kySet = templateCtx.keySet();
-                        Iterator<String> it = kySet.iterator();
-                        while (it.hasNext()) {
-                            Object ky = (Object)it.next();
+                        for(Object ky : templateCtx.keySet()) {
                             Object val = templateCtx.get(ky);
                             Debug.logVerbose("context key: " + ky + " val: " + val, module);
                         }
diff --git a/applications/content/webapp/content/WEB-INF/controller.xml b/applications/content/webapp/content/WEB-INF/controller.xml
index def29a7..bcdef2a 100644
--- a/applications/content/webapp/content/WEB-INF/controller.xml
+++ b/applications/content/webapp/content/WEB-INF/controller.xml
@@ -745,7 +745,7 @@
         <response name="success" type="view" value="EditDataResourceRole"/>
         <response name="error" type="view" value="EditDataResourceRole"/>
     </request-map>
-	
+
     <!-- ================ DataResourceProductFeature Requests ================= -->
     <request-map uri="EditDataResourceProductFeatures">
         <security auth="true" https="true"/>
diff --git a/applications/content/widget/content/ContentForms.xml b/applications/content/widget/content/ContentForms.xml
index c091646..76a9057 100644
--- a/applications/content/widget/content/ContentForms.xml
+++ b/applications/content/widget/content/ContentForms.xml
@@ -119,13 +119,8 @@
     <form name="ListLookupContent" extends="ListContent" type="list" list-name="listIt" paginate-target="LookupContent"
         odd-row-style="alternate-row" default-table-style="basic-table hover-bar">
         <actions>
-            <service service-name="performFind" result-map="result" result-map-list="listIt">
-                <field-map field-name="inputFields" from-field="parameters"/>
-                <field-map field-name="entityName" value="Content"/>
-                <field-map field-name="orderBy" value="contentId"/>
-                <field-map field-name="viewIndex" from-field="viewIndex"/>
-                <field-map field-name="viewSize" from-field="viewSize"/>
-            </service>
+            <set field="parameters.sortField" from-field="parameters.sortField" default-value="contentId"/>
+            <call-parent-actions/>
         </actions>
         <field name="contentId">
             <hyperlink also-hidden="false" target-type="plain" description="${contentId}" target="javascript:set_value('${contentId}')"/>
diff --git a/applications/content/widget/content/ContentScreens.xml b/applications/content/widget/content/ContentScreens.xml
index 6da8f9b..c595165 100644
--- a/applications/content/widget/content/ContentScreens.xml
+++ b/applications/content/widget/content/ContentScreens.xml
@@ -86,7 +86,6 @@
     <screen name="navigateContent">
         <section>
             <actions>
-                <set field="layoutSettings.javaScripts[+0]" value="/images/jquery/jquery-1.7.min.js" global="true"/>
                 <set field="titleProperty" value="PageTitleNavigateContent"/>
                 <set field="tabButtonItem" value="navigateContent"/>
                 <set field="labelTitleProperty" value="PageTitleNavigateContent"/>
diff --git a/applications/humanres/config/HumanResEntityLabels.xml b/applications/humanres/config/HumanResEntityLabels.xml
new file mode 100644
index 0000000..620277e
--- /dev/null
+++ b/applications/humanres/config/HumanResEntityLabels.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+-->
+
+<resource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+    <property key="EmplLeaveReasonType.description.CASUAL">
+        <value xml:lang="en">Casual</value>
+        <value xml:lang="fr">Convenance</value>
+    </property>
+    <property key="EmplLeaveReasonType.description.MEDICAL">
+        <value xml:lang="en">Medical</value>
+        <value xml:lang="fr">Maladie</value>
+    </property>
+    <property key="EmplLeaveType.description.INLAND_EARNED">
+        <value xml:lang="en">Inland earned</value>
+        <value xml:lang="fr">Congé payé</value>
+    </property>
+    <property key="EmplLeaveType.description.LOSS_OF_PAY">
+        <value xml:lang="en">Loss of pay</value>
+        <value xml:lang="fr">Sans solde</value>
+    </property>
+    <property key="EmplLeaveType.description.RESTRICTED_HOLIDAY">
+        <value xml:lang="en">Restricted holiday</value>
+        <value xml:lang="fr">Jour férié</value>
+    </property>
+    <property key="EmplLeaveType.description.SPECIAL_DAY_OFF">
+        <value xml:lang="en">Special day off</value>
+        <value xml:lang="fr">Congé</value>
+    </property>
+</resource>
\ No newline at end of file
diff --git a/applications/humanres/config/HumanResUiLabels.xml b/applications/humanres/config/HumanResUiLabels.xml
index 862f9a9..c31c8a6 100644
--- a/applications/humanres/config/HumanResUiLabels.xml
+++ b/applications/humanres/config/HumanResUiLabels.xml
@@ -786,7 +786,7 @@
     <property key="HumanResAddPersonTraining">
         <value xml:lang="de">Personenschulung hinzufügen</value>
         <value xml:lang="en">Add Person Training</value>
-        <value xml:lang="fr">Ajouter la formation de la personne</value>
+        <value xml:lang="fr">Ajouter une formation</value>
         <value xml:lang="it">Aggiungi corsi persona</value>
         <value xml:lang="pt_BR">Adicionar treinamento para pessoa</value>
         <value xml:lang="zh">新建个人培训</value>
@@ -918,7 +918,7 @@
     </property>
     <property key="HumanResCurrentEmploymentData">
         <value xml:lang="en">Current Employment information</value>
-        <value xml:lang="fr">Information actuelles sur l'emploi</value>
+        <value xml:lang="fr">Informations actuelles sur l'emploi</value>
         <value xml:lang="it">Informazioni attuali sull'impiego</value>
         <value xml:lang="pt_BR">Informação atual de empregado</value>
         <value xml:lang="zh">当前雇佣关系信息</value>
@@ -1486,6 +1486,10 @@
         <value xml:lang="pt_BR">Licença</value>
         <value xml:lang="zh">离职</value>
     </property>
+    <property key="HumanResLeaveCreationSuccess">
+        <value xml:lang="en">Leave request created successfully</value>
+        <value xml:lang="fr">Demande de congés créée avec succès</value>
+    </property>
     <property key="HumanResListEmployments">
         <value xml:lang="en">List Employment</value>
         <value xml:lang="fr">Liste d'emplois</value>
@@ -1735,6 +1739,14 @@
         <value xml:lang="zh">人力资源管理系统</value>
         <value xml:lang="zh_TW">人力資源管理系統</value>
     </property>
+    <property key="HumanResMyLeaves">
+        <value xml:lang="en">My Leaves</value>
+        <value xml:lang="fr">Mes congés</value>
+    </property>
+    <property key="HumanResMyTrainings">
+        <value xml:lang="en">My Trainings</value>
+        <value xml:lang="fr">Mes formations</value>
+    </property>
     <property key="HumanResNewEmplPosition">
         <value xml:lang="de">Stelle anlegen</value>
         <value xml:lang="en">New Employee Position</value>
@@ -2089,6 +2101,7 @@
     </property>
     <property key="HumanResPayRollHistory">
         <value xml:lang="en">PayRoll History</value>
+        <value xml:lang="fr">Historiques des paiements</value>
         <value xml:lang="zh">薪水支付历史</value>
     </property>
     <property key="HumanResPayRollPreferences">
@@ -2540,6 +2553,10 @@
         <value xml:lang="pt_BR">Procurar aprovações de treinamento</value>
         <value xml:lang="zh">查找培训批准</value>
     </property>
+    <property key="PageTitleFindTrainingCalendar">
+        <value xml:lang="en">Find Training Calendar</value>
+        <value xml:lang="fr">Calendrier de formation</value>
+    </property>
     <property key="PageTitleFindTrainingStatus">
         <value xml:lang="en">Find Training Status</value>
         <value xml:lang="fr">Rechercher les états de formation</value>
diff --git a/applications/humanres/data/HumanResPortletData.xml b/applications/humanres/data/HumanResPortletData.xml
new file mode 100644
index 0000000..101ce27
--- /dev/null
+++ b/applications/humanres/data/HumanResPortletData.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+-->
+<entity-engine-xml>
+
+    <PortletCategory portletCategoryId="HUMANRES" description="Human Resource Portlets"/>
+    <PortalPortlet portalPortletId="myLeave"
+        portletName="My Leave"
+        screenName="MyLeaveList"
+        screenLocation="component://humanres/widget/EmployeeScreens.xml"
+        description="My Leaves form Human Resource" securityServiceName="portalPermissionIsEmployee" securityMainAction="VIEW"/>
+    <PortletPortletCategory portalPortletId="myLeave" portletCategoryId="HUMANRES"/>
+    <PortalPortlet portalPortletId="MyTrainings" portletName="My Trainings"  description="Trainings of a party"
+        screenName="MyTrainings" screenLocation="component://humanres/widget/EmployeeScreens.xml" securityServiceName="portalPermissionIsEmployee"
+        securityMainAction="VIEW"/>
+    <PortletPortletCategory portalPortletId="MyTrainings" portletCategoryId="HUMANRES"/>
+
+</entity-engine-xml>
diff --git a/applications/humanres/data/HumanResTypeData.xml b/applications/humanres/data/HumanResTypeData.xml
index 47d5692..98fe03a 100644
--- a/applications/humanres/data/HumanResTypeData.xml
+++ b/applications/humanres/data/HumanResTypeData.xml
@@ -50,11 +50,15 @@
     <StatusItem statusId="STATUS_RELOCATED" statusTypeId="RELOCATION_STATUS"  description="Relocated"/>
     
     <StatusType statusTypeId="TRAINING_STATUS" description="Training Status"/>
+    <StatusItem statusId="TRAINING_APPLIED" statusTypeId="TRAINING_STATUS"  description="Applied"/>
     <StatusItem statusId="TRAINING_APPROVED" statusTypeId="TRAINING_STATUS"  description="Approved"/>
+    <StatusItem statusId="TRAINING_ASSIGNED" statusTypeId="TRAINING_STATUS"  description="Assigned"/>
+    <StatusItem statusId="TRAINING_PROPOSED" statusTypeId="TRAINING_STATUS"  description="Proposed"/>
     <StatusItem statusId="TRAINING_REJECTED" statusTypeId="TRAINING_STATUS"  description="Rejected"/>
 
     <StatusType statusTypeId="LEAVE_STATUS" description="Employee Leave Status"/>
     <StatusItem statusId="LEAVE_APPROVED" statusTypeId="LEAVE_STATUS"  description="Approved"/>
+    <StatusItem statusId="LEAVE_CREATED" statusTypeId="LEAVE_STATUS"  description="Created"/>
     <StatusItem statusId="LEAVE_REJECTED" statusTypeId="LEAVE_STATUS"  description="Rejected"/>
 
     <EmplPositionType description="Programmer" hasTable="N" parentTypeId="" emplPositionTypeId="PROGRAMMER"/>
@@ -149,8 +153,8 @@
     <Enumeration description="Technical Exam" enumCode="TECHNICAL" enumId="EXAM_TECHNICAL" sequenceId="02" enumTypeId="EXAM_TYPE"/>
     <Enumeration description="Group Discussion" enumCode="GROUP_DISCN" enumId="EXAM_GROUP_DISCN" sequenceId="03" enumTypeId="EXAM_TYPE"/>
     
-    <EmplLeaveReasonType description="Medical" hasTable="N" parentTypeId="" emplLeaveReasonTypeId="Fever"/>
-    <EmplLeaveReasonType description="Casual" hasTable="N" parentTypeId="" emplLeaveReasonTypeId="Personal Work"/>
+    <EmplLeaveReasonType emplLeaveReasonTypeId="MEDICAL" description="Medical" hasTable="N"/>
+    <EmplLeaveReasonType emplLeaveReasonTypeId="CASUAL" description="Casual" hasTable="N"/>
 
     <PerfReviewItemType perfReviewItemTypeId="TECH" hasTable="N" description="Technical skills"/>
     <PerfReviewItemType perfReviewItemTypeId="RESP" hasTable="N" description="Responsibility"/>
diff --git a/applications/humanres/entitydef/entitymodel.xml b/applications/humanres/entitydef/entitymodel.xml
index 246817e..363d374 100644
--- a/applications/humanres/entitydef/entitymodel.xml
+++ b/applications/humanres/entitydef/entitymodel.xml
@@ -40,7 +40,9 @@
   <!-- org.ofbiz.humanres.ability -->
   <!-- ========================================================= -->
 
-    <entity entity-name="PartyQual" package-name="org.ofbiz.humanres.ability" title="Party Qualification Entity">
+    <entity entity-name="PartyQual"
+            package-name="org.ofbiz.humanres.ability"
+            title="Party Qualification Entity">
         <field name="partyId" type="id-ne"></field>
         <field name="partyQualTypeId" type="id-ne"></field>
         <field name="qualificationDesc" type="id-long"></field>
@@ -313,8 +315,8 @@
       </relation>
     </entity>
     <view-entity entity-name="BenefitTypeAndParty"
-      package-name="org.ofbiz.humanres.employment"
-      title="Benefit Type Entity">
+             package-name="org.ofbiz.humanres.employment"
+             title="Benefit Type Entity">
       <member-entity entity-alias="BT" entity-name="BenefitType"/>
       <member-entity entity-alias="PB" entity-name="PartyBenefit"/>
       <alias-all entity-alias="BT"/>
@@ -367,8 +369,8 @@
       </relation>
     </entity>
     <view-entity entity-name="EmploymentAndPerson"
-        package-name="org.ofbiz.humanres.employment"
-        title="Employment and Person Entity">
+            package-name="org.ofbiz.humanres.employment"
+            title="Employment and Person Entity">
         <member-entity entity-alias="EMPLMNT" entity-name="Employment"/>
         <member-entity entity-alias="PERS" entity-name="Person"/>
         <alias-all entity-alias="EMPLMNT"/>
@@ -434,7 +436,7 @@
         <field name="fromDate" type="date-time"/>
         <field name="thruDate" type="date-time"/>
         <field name="approverPartyId" type="id-ne"/>
-          <field name="leaveStatus" type="short-varchar"/>
+        <field name="leaveStatus" type="id-ne"/>
         <field name="description" type="description"/>
         <prim-key field="partyId"/>
         <prim-key field="leaveTypeId"/>
@@ -451,9 +453,13 @@
         <relation type="one" fk-name="EMPL_LEAVE_APPR" title="Approver" rel-entity-name="Party">
             <key-map field-name="approverPartyId" rel-field-name="partyId"/>
         </relation>
+        <relation type="one" fk-name="EMPL_LEAVE_STS" rel-entity-name="StatusItem">
+            <key-map field-name="leaveStatus" rel-field-name="statusId"/>
+        </relation>
     </entity>
     <entity entity-name="EmplLeaveType"
             package-name="org.ofbiz.humanres.employment"
+            default-resource-name="HumanResEntityLabels"
             title="Employee Leave Type Entity">
         <field name="leaveTypeId" type="id-ne"/>
         <field name="parentTypeId" type="id-ne"/>
@@ -711,8 +717,8 @@
       </relation>
     </entity>
     <view-entity entity-name="EmplPositionAndFulfillment"
-      package-name="org.ofbiz.humanres.position"
-      title="EmplPosition Fulfillment Entity">
+            package-name="org.ofbiz.humanres.position"
+            title="EmplPosition Fulfillment Entity">
       <member-entity entity-alias="EMPPOS" entity-name="EmplPosition"></member-entity>
       <member-entity entity-alias="EPF" entity-name="EmplPositionFulfillment"></member-entity>
       <alias-all entity-alias="EMPPOS"/>
@@ -726,7 +732,7 @@
         <key-map field-name="emplPositionTypeId"/>
       </relation>
     </view-entity>
-  <entity entity-name="EmplPositionReportingStruct"
+    <entity entity-name="EmplPositionReportingStruct"
             package-name="org.ofbiz.humanres.position"
             title="EmplPosition Reporting Structure Entity">
       <field name="emplPositionIdReportingTo" type="id-ne"></field>
@@ -811,9 +817,9 @@
         <key-map field-name="responsibilityTypeId"/>
       </relation>
     </entity>
-  <entity entity-name="EmplPositionTypeRate" table-name="EMPL_POSITION_TYPE_RATE_NEW"
-    package-name="org.ofbiz.humanres.position"
-    title="EmplPosition Type Rate Entity">
+    <entity entity-name="EmplPositionTypeRate" table-name="EMPL_POSITION_TYPE_RATE_NEW"
+            package-name="org.ofbiz.humanres.position"
+            title="EmplPosition Type Rate Entity">
     <field name="emplPositionTypeId" type="id-ne"/>
     <field name="rateTypeId" type="id-ne"/>
     <field name="payGradeId" type="id"/>
@@ -835,8 +841,8 @@
     </relation>
   </entity>
   <view-entity entity-name="EmplPositionTypeRateAndAmount"
-    package-name="org.ofbiz.humanres.position"
-    title="EmplPosition Type Rate Entity and Rate Amount">
+        package-name="org.ofbiz.humanres.position"
+        title="EmplPosition Type Rate Entity and Rate Amount">
     <member-entity entity-alias="EPTR" entity-name="EmplPositionTypeRate"/>
     <member-entity entity-alias="RA" entity-name="RateAmount"/>
     <alias-all entity-alias="EPTR"/>
@@ -943,6 +949,7 @@
     </entity>
     <entity entity-name="EmplLeaveReasonType"
             package-name="org.ofbiz.humanres.employment"
+            default-resource-name="HumanResEntityLabels"
             title="Leave Reason Type Entity">
         <field name="emplLeaveReasonTypeId" type="id-ne"/>
         <field name="parentTypeId" type="id-ne"/>
diff --git a/applications/humanres/ofbiz-component.xml b/applications/humanres/ofbiz-component.xml
index a6aca48..92565cf 100644
--- a/applications/humanres/ofbiz-component.xml
+++ b/applications/humanres/ofbiz-component.xml
@@ -29,6 +29,7 @@
     <entity-resource type="data" reader-name="seed" loader="main" location="data/HumanResTypeData.xml"/>
     <entity-resource type="data" reader-name="seed" loader="main" location="data/HumanResHelpData.xml"/>
     <entity-resource type="data" reader-name="seed" loader="main" location="data/HumanResSecurityData.xml"/>
+    <entity-resource type="data" reader-name="seed" loader="main" location="data/HumanResPortletData.xml"/>
     <entity-resource type="data" reader-name="demo" loader="main" location="data/HumanResDemoData.xml"/>
     <service-resource type="model" loader="main" location="servicedef/services.xml"/>
 
diff --git a/applications/humanres/script/org/ofbiz/humanres/HumanResServices.xml b/applications/humanres/script/org/ofbiz/humanres/HumanResServices.xml
index b5de218..6cea7fe 100644
--- a/applications/humanres/script/org/ofbiz/humanres/HumanResServices.xml
+++ b/applications/humanres/script/org/ofbiz/humanres/HumanResServices.xml
@@ -660,6 +660,8 @@
         <set-nonpk-fields value-field="newEntity" map="parameters"/>
         <create-value value-field="newEntity"/>
         <check-errors/>
+        <property-to-field resource="HumanResUiLabels" property="HumanResLeaveCreationSuccess" field="successMessage"/>
+        <field-to-result field="responseMessage" result-name="successMessage"/>
     </simple-method>
 
     <simple-method method-name="updateEmplLeave" short-description="Update Employee Leave">
diff --git a/applications/humanres/widget/EmployeeScreens.xml b/applications/humanres/widget/EmployeeScreens.xml
index 2aafe19..161a40e 100644
--- a/applications/humanres/widget/EmployeeScreens.xml
+++ b/applications/humanres/widget/EmployeeScreens.xml
@@ -122,6 +122,7 @@
                                             <include-screen name="Party" location="component://party/widget/partymgr/ProfileScreens.xml"/>
                                             <include-screen name="Contact" location="component://party/widget/partymgr/ProfileScreens.xml"/>
                                             <include-screen name="contactsAndAccounts" location="component://party/widget/partymgr/ProfileScreens.xml"/>
+                                            <include-screen name="trainingsList"/>
                                         </container>
                                         <container style="profile-right">
                                             <include-screen name="CurrentEmploymentData" location="component://humanres/widget/EmployeeScreens.xml"/>
@@ -298,6 +299,16 @@
         </section>
     </screen>
     
+    <screen name="trainingsList">
+        <section>
+            <widgets>
+                <screenlet title="${uiLabelMap.HumanResTrainings}">
+                    <include-form name="simpleListTrainingStatus" location="component://humanres/widget/forms/PersonTrainingForms.xml"/>
+                </screenlet>
+            </widgets>
+        </section>
+    </screen>
+
     <screen name="PayrollHistory">
         <section>
             <actions>
@@ -322,4 +333,29 @@
             </widgets>
         </section>
     </screen>
+
+    <screen name="MyLeaveList">
+        <section>
+            <actions>
+                <set field="partyId" from-field="userLogin.partyId"/>
+            </actions>
+            <widgets>
+                <screenlet title="${uiLabelMap.HumanResMyLeaves}" navigation-form-name="ListEmplLeaves">
+                    <include-form name="ListEmplLeaves" location="component://humanres/widget/forms/EmployeeForms.xml"/>
+                </screenlet>
+            </widgets>
+        </section>
+    </screen>
+    <screen name="MyTrainings">
+        <section>
+            <actions>
+                <set field="partyId" from-field="userLogin.partyId"/>
+            </actions>
+            <widgets>
+                <screenlet title="${uiLabelMap.HumanResMyTrainings}">
+                    <include-form name="ListEmplTrainings" location="component://humanres/widget/forms/PersonTrainingForms.xml"/>
+                </screenlet>
+            </widgets>
+        </section>
+    </screen>
 </screens>
diff --git a/applications/humanres/widget/PersonTrainingScreens.xml b/applications/humanres/widget/PersonTrainingScreens.xml
index 3b1afec..14d5397 100644
--- a/applications/humanres/widget/PersonTrainingScreens.xml
+++ b/applications/humanres/widget/PersonTrainingScreens.xml
@@ -23,7 +23,6 @@
     <screen name="TrainingCalendar">
         <section>
             <actions>
-                <set field="titleProperty" value="PageTitleFindTrainingCalendar"/>
                 <set field="parameters.period" from-field="parameters.period" default-value="${initialView}"/>
             </actions>
             <widgets>
diff --git a/applications/humanres/widget/forms/EmplLeaveForms.xml b/applications/humanres/widget/forms/EmplLeaveForms.xml
index fd58e96..3115ce6 100644
--- a/applications/humanres/widget/forms/EmplLeaveForms.xml
+++ b/applications/humanres/widget/forms/EmplLeaveForms.xml
@@ -66,6 +66,8 @@
                 </sub-hyperlink>
             </display-entity>
         </field>
+        <field name="leaveTypeId"><display-entity entity-name="EmplLeaveType"/></field>
+        <field name="emplLeaveReasonTypeId"><display-entity entity-name="EmplLeaveReasonType"/></field>
         <field name="approverPartyId">
             <display-entity entity-name="PartyNameView" description="${firstName} ${lastName}" key-field-name="partyId">
                 <sub-hyperlink target="/partymgr/control/viewprofile" target-type="inter-app" description="${approverPartyId}" link-style="buttontext">
@@ -73,7 +75,7 @@
                 </sub-hyperlink>
             </display-entity>
         </field>
-        <field name="leaveStatus"><display/></field>
+        <field name="leaveStatus"><display-entity entity-name="StatusItem" key-field-name="statusId"/></field>
         <field name="updateLeave" title="${uiLabelMap.CommonUpdate}" widget-style="buttontext" use-when="hasAdminPermission">
             <hyperlink also-hidden="false" description="${uiLabelMap.CommonUpdate}" target="EditEmplLeave">
                 <parameter param-name="partyId"/>
@@ -89,7 +91,7 @@
             </hyperlink>
         </field>
         <field name="description"><hidden/></field>
-      </form>
+    </form>
     <form name="EditEmplLeave" type="single" target="updateEmplLeaveExt" default-map-name="leaveApp"
         header-row-style="header-row" default-table-style="basic-table">
         <alt-target use-when="leaveApp==null" target="createEmplLeaveExt"/>
@@ -112,7 +114,7 @@
         <field name="submitButton" use-when="leaveApp==null" title="${uiLabelMap.CommonCreate}" widget-style="smallSubmit"><submit button-type="button"/></field>
         <field name="submitButton" use-when="leaveApp!=null" title="${uiLabelMap.CommonUpdate}" widget-style="smallSubmit"><submit button-type="button"/></field>
     </form>
-   <form name="FindLeaveApprovals" target="FindLeaveApprovals" type="single">
+    <form name="FindLeaveApprovals" target="FindLeaveApprovals" type="single">
         <auto-fields-entity entity-name="EmplLeave" default-field-type="find"/>
         <field name="noConditionFind"><hidden value="Y"/></field>
         <!--<field name="approverPartyId" use-when="!hasAdminPermission"><hidden value="${approverPartyId}"/></field>-->
@@ -144,6 +146,8 @@
                 </sub-hyperlink>
             </display-entity>
         </field>
+        <field name="leaveTypeId"><display-entity entity-name="EmplLeaveType"/></field>
+        <field name="emplLeaveReasonTypeId"><display-entity entity-name="EmplLeaveReasonType"/></field>
         <field name="approverPartyId" field-name="approverPartyId">
             <display-entity entity-name="PartyNameView" description="${firstName} ${lastName}" key-field-name="partyId">
                 <sub-hyperlink target="/partymgr/control/viewprofile" target-type="inter-app" description="${approverPartyId}" link-style="buttontext">
@@ -151,7 +155,7 @@
                 </sub-hyperlink>
             </display-entity>
         </field>
-        <field name="leaveStatus"><display/></field>
+        <field name="leaveStatus"><display-entity entity-name="StatusItem" key-field-name="statusId"/></field>
         <field name="UpdateStatus" title="${uiLabelMap.CommonUpdate}" widget-style="buttontext">
             <hyperlink target="EditEmplLeaveStatus" description="${uiLabelMap.CommonUpdate}" >
                 <parameter param-name="partyId"/>
diff --git a/applications/humanres/widget/forms/EmployeeForms.xml b/applications/humanres/widget/forms/EmployeeForms.xml
index f764ecc..4cd8cbd 100644
--- a/applications/humanres/widget/forms/EmployeeForms.xml
+++ b/applications/humanres/widget/forms/EmployeeForms.xml
@@ -214,7 +214,7 @@
         <auto-fields-service service-name="updateEmplLeave"/>
         <field name="partyId"><hidden/></field>
         <field name="approverPartyId"><lookup target-form-name="LookupPartyName"/></field>
-        <field name="leaveStatus"><display/></field>
+        <field name="leaveStatus"><display-entity entity-name="StatusItem" key-field-name="statusId"/></field>
         <field name="emplLeaveReasonTypeId"><display/></field>
         <field name="leaveTypeId"><display-entity description="${description}" entity-name="EmplLeaveType"/></field>
         <field name="fromDate"></field>
diff --git a/applications/humanres/widget/forms/PersonTrainingForms.xml b/applications/humanres/widget/forms/PersonTrainingForms.xml
index 3cab4ea..84d3b65 100644
--- a/applications/humanres/widget/forms/PersonTrainingForms.xml
+++ b/applications/humanres/widget/forms/PersonTrainingForms.xml
@@ -61,7 +61,7 @@
         <field name="approvalStatus"><hidden value="TRAINING_ASSIGNED"/></field>
         <field name="partyId" position="1"><lookup target-form-name="LookupPartyName" size="10"/></field>
         <field name="roleTypeId"> <hidden value="CAL_ATTENDEE"/></field>
-        <field name="add"><submit/></field>
+        <field name="add" title="${uiLabelMap.CommonAdd}"><submit/></field>
     </form>
     <form name="ListTrainingParticipants" list-name="listIt" title="" type="list" odd-row-style="alternate-row" header-row-style="header-row-2" default-table-style="basic-table hover-bar">
         <actions>
@@ -80,9 +80,9 @@
                 </sub-hyperlink>
             </display-entity>
         </field>
-        <field name="approvalStatus"><display/></field>
-        <field name="trainingRequestId" widget-style="buttontext"/>
-        <field name="trainingClassTypeId" title="${uiLabelMap.HumanResTrainingClassType}"><display/></field>
+        <field name="approvalStatus"><display-entity entity-name="StatusItem" key-field-name="statusId"/></field>
+        <field name="trainingRequestId" widget-style="buttontext"><display/></field>
+        <field name="trainingClassTypeId"><display-entity entity-name="TrainingClassType"/></field>
     </form>
     <form name="FindTrainingApprovals" target="FindTrainingApprovals" title="" type="single" default-title-style="tableheadtext" default-tooltip-style="tabletext" default-widget-style="inputBox">
         <auto-fields-entity entity-name="PersonTraining" default-field-type="find"/>
@@ -133,6 +133,8 @@
                 <parameter param-name="fromDate"/>
             </hyperlink>
         </field>
+        <field name="approvalStatus"><display-entity entity-name="StatusItem" key-field-name="statusId"/></field>
+        <field name="trainingClassTypeId"><display-entity entity-name="TrainingClassType"/></field>
     </form>
     <form name="EditTrainingApprovals" type="single" target="updateTrainingStatus" default-map-name="personTraining">
         <auto-fields-service service-name="updateTrainingStatus" default-field-type="display"/>
@@ -193,5 +195,48 @@
         </field>
         <field name="trainingRequestId" widget-style="buttontext"/>
         <field name="trainingClassTypeId" title="${uiLabelMap.HumanResTrainingClassType}"/>
+        <field name="approvalStatus"><display-entity entity-name="StatusItem" key-field-name="statusId"/></field>
+        <field name="trainingClassTypeId"><display-entity entity-name="TrainingClassType"/></field>
+    </form>
+
+    <form name="simpleListTrainingStatus" list-name="listIt" title="" type="list" odd-row-style="alternate-row" default-table-style="basic-table">
+        <actions>
+            <service service-name="performFind" result-map="result" result-map-list="listIt">
+                <field-map field-name="inputFields" from-field="parameters"/>
+                <field-map field-name="entityName" value="PersonTraining"/>
+                <field-map field-name="orderBy" value="fromDate"/>
+                <field-map field-name="viewIndex" from-field="viewIndex"/>
+                <field-map field-name="viewSize" from-field="viewSize"/>
+            </service>
+        </actions>
+        <field name="fromDate"><display type="date-time"/></field>
+        <field name="thruDate"><display type="date-time"/></field>
+        <field name="trainingClassTypeId" title="${uiLabelMap.HumanResTrainingClassType}"/>
+        <field name="approvalStatus"><display-entity entity-name="StatusItem" key-field-name="statusId"/></field>
+        <field name="trainingClassTypeId"><display-entity entity-name="TrainingClassType"/></field>
+        <field name="approverId" widget-style="buttontext">
+            <display-entity entity-name="PartyNameView" key-field-name="partyId" description="${firstName} ${middleName} ${lastName} ${groupName}"/>
+        </field>
+    </form>
+
+    <form name="ListEmplTrainings" type="list" list-name="listIt" separate-columns="true" target="updateEmplLeave" paginate-target="FindEmplLeaves"
+        odd-row-style="alternate-row" header-row-style="header-row-2" default-table-style="basic-table hover-bar">
+        <actions>
+            <entity-condition entity-name="PersonTraining">
+                <condition-expr field-name="partyId" from-field="partyId"/>
+                <order-by field-name="fromDate"/>
+            </entity-condition>
+        </actions>
+        <auto-fields-entity entity-name="PersonTraining" default-field-type="display"/>
+        <field name="partyId" title="${uiLabelMap.FormFieldTitle_employeePartyId}">
+            <display-entity entity-name="PartyNameView" description="${firstName} ${middleName} ${lastName} ${groupName}"/>
+        </field>
+        <field name="approverId">
+            <display-entity entity-name="PartyNameView" key-field-name="partyId" description="${firstName} ${middleName} ${lastName} ${groupName}"/>
+        </field>
+        <field name="trainingRequestId"/>
+        <field name="trainingClassTypeId" title="${uiLabelMap.HumanResTrainingClassType}"/>
+        <field name="approvalStatus"><display-entity entity-name="StatusItem" key-field-name="statusId"/></field>
+        <field name="trainingClassTypeId"><display-entity entity-name="TrainingClassType"/></field>
     </form>
 </forms>
diff --git a/applications/manufacturing/data/ManufacturingExampleData.xml b/applications/manufacturing/data/ManufacturingExampleData.xml
index 24748fc..0aaabd7 100644
--- a/applications/manufacturing/data/ManufacturingExampleData.xml
+++ b/applications/manufacturing/data/ManufacturingExampleData.xml
@@ -45,6 +45,11 @@
     <FixedAsset fixedAssetId="DEMO_PROD_EQUIPMT_2" fixedAssetName="Demo Production Equipment Two" fixedAssetTypeId="PRODUCTION_EQUIPMENT" dateAcquired="2005-01-01 00:01:00.0" expectedEndOfLife="2010-01-01" calendarId="DEMO_CALENDAR" salvageValue="50" purchaseCost="1000" purchaseCostUomId="USD"/>
     <FixedAssetGeoPoint fixedAssetId="DEMO_PROD_EQUIPMT_2" geoPointId="9000" fromDate="2009-01-09 00:00:00.000"/>
 
+    <FixedAsset fixedAssetId="DEMO_BOOK_GROUP" fixedAssetTypeId="GROUP_EQUIPMENT" fixedAssetName="Demo Book Group"/>
+    <FixedAssetGeoPoint fixedAssetId="DEMO_BOOK_GROUP" geoPointId="9000" fromDate="2011-08-02 00:00:00.000"/>
+    <FixedAsset fixedAssetId="DEMO_BOOK" fixedAssetName="Demo Book" fixedAssetTypeId="PRODUCTION_EQUIPMENT" parentFixedAssetId="DEMO_BOOK_GROUP" calendarId="DEMO_CALENDAR" purchaseCost="200" purchaseCostUomId="USD"/>
+    <FixedAssetGeoPoint fixedAssetId="DEMO_BOOK" geoPointId="9000" fromDate="2011-08-02 00:00:00.000"/>
+
     <FixedAssetDepMethod depreciationCustomMethodId="STR_LINE_DEP_FORMULA" fixedAssetId="DEMO_PROD_EQUIPMT_1"/>
     <FixedAssetDepMethod depreciationCustomMethodId="DBL_DECL_DEP_FORMULA" fixedAssetId="DEMO_PROD_EQUIPMT_2"/>
 </entity-engine-xml>
diff --git a/applications/manufacturing/script/org/ofbiz/manufacturing/test/ProductionRunTests.xml b/applications/manufacturing/script/org/ofbiz/manufacturing/test/ProductionRunTests.xml
index daf8e1d..9d1d2b9 100644
--- a/applications/manufacturing/script/org/ofbiz/manufacturing/test/ProductionRunTests.xml
+++ b/applications/manufacturing/script/org/ofbiz/manufacturing/test/ProductionRunTests.xml
@@ -278,7 +278,6 @@
                 <if-compare field="taskTimeDifference" operator="equals" value="-1.0" type="Double"/>
             </or>
         </assert>
-
         <check-errors/>
     </simple-method>
 
diff --git a/applications/manufacturing/src/org/ofbiz/manufacturing/bom/BOMHelper.java b/applications/manufacturing/src/org/ofbiz/manufacturing/bom/BOMHelper.java
index b2d73a0..0545a66 100644
--- a/applications/manufacturing/src/org/ofbiz/manufacturing/bom/BOMHelper.java
+++ b/applications/manufacturing/src/org/ofbiz/manufacturing/bom/BOMHelper.java
@@ -68,11 +68,8 @@
         List<GenericValue> productNodesList = delegator.findByAndCache("ProductAssoc", 
                 UtilMisc.toMap("productIdTo", productId, "productAssocTypeId", bomType));
         productNodesList = EntityUtil.filterByDate(productNodesList, inDate);
-        GenericValue oneNode = null;
-        Iterator<GenericValue> nodesIterator = productNodesList.iterator();
         int depth = 0;
-        while (nodesIterator.hasNext()) {
-            oneNode = nodesIterator.next();
+        for (GenericValue oneNode : productNodesList) {
             depth = 0;
             depth = getMaxDepth(oneNode.getString("productId"), bomType, inDate, delegator);
             depth++;
@@ -114,11 +111,9 @@
         List<GenericValue> productNodesList = delegator.findByAndCache("ProductAssoc",
                 UtilMisc.toMap("productIdTo", productId, "productAssocTypeId", bomType));
         productNodesList = EntityUtil.filterByDate(productNodesList, inDate);
-        GenericValue oneNode = null;
         GenericValue duplicatedNode = null;
         Iterator<GenericValue> nodesIterator = productNodesList.iterator();
-        while (nodesIterator.hasNext()) {
-            oneNode = nodesIterator.next();
+        for(GenericValue oneNode : productNodesList) {
             for (int i = 0; i < productIdKeys.size(); i++) {
                 if (oneNode.getString("productId").equals(productIdKeys.get(i))) {
                     return oneNode;
@@ -141,9 +136,7 @@
 
         try {
         List<GenericValue> shipmentPlans = delegator.findByAnd("OrderShipment", UtilMisc.toMap("shipmentId", shipmentId));
-        Iterator<GenericValue> shipmentPlansIt = shipmentPlans.iterator();
-        while (shipmentPlansIt.hasNext()) {
-            GenericValue shipmentPlan = shipmentPlansIt.next();
+        for(GenericValue shipmentPlan : shipmentPlans) {
             GenericValue orderItem = shipmentPlan.getRelatedOne("OrderItem");
 
             List<GenericValue> productionRuns = delegator.findByAndCache("WorkOrderItemFulfillment", UtilMisc.toMap("orderId", shipmentPlan.getString("orderId"), "orderItemSeqId", shipmentPlan.getString("orderItemSeqId"), "shipGroupSeqId", shipmentPlan.getString("shipGroupSeqId")));
diff --git a/applications/manufacturing/src/org/ofbiz/manufacturing/bom/BOMNode.java b/applications/manufacturing/src/org/ofbiz/manufacturing/bom/BOMNode.java
index f05d19d..fa53668 100644
--- a/applications/manufacturing/src/org/ofbiz/manufacturing/bom/BOMNode.java
+++ b/applications/manufacturing/src/org/ofbiz/manufacturing/bom/BOMNode.java
@@ -114,11 +114,8 @@
         children = FastList.newInstance();
         children.addAll(rows);
         childrenNodes = FastList.newInstance();
-        Iterator<GenericValue> childrenIterator = children.iterator();
-        GenericValue oneChild = null;
         BOMNode oneChildNode = null;
-        while (childrenIterator.hasNext()) {
-            oneChild = childrenIterator.next();
+        for(GenericValue oneChild : children) {
             // Configurator
             oneChildNode = configurator(oneChild, productFeatures, getRootNode().getProductForRules(), inDate);
             // If the node is null this means that the node has been discarded by the rules.
@@ -340,13 +337,11 @@
             rows = EntityUtil.filterByDate(rows, inDate);
         }
         children = FastList.newInstance();
-        children.addAll(rows);;
+        children.addAll(rows);
         childrenNodes = FastList.newInstance();
-        Iterator<GenericValue> childrenIterator = children.iterator();
-        GenericValue oneChild = null;
+
         BOMNode oneChildNode = null;
-        while (childrenIterator.hasNext()) {
-            oneChild = childrenIterator.next();
+        for(GenericValue oneChild : children) {
             oneChildNode = new BOMNode(oneChild.getString("productId"), delegator, dispatcher, userLogin);
             // Configurator
             //oneChildNode = configurator(oneChild, productFeatures, getRootNode().getProductForRules(), delegator);
diff --git a/applications/manufacturing/src/org/ofbiz/manufacturing/bom/BOMServices.java b/applications/manufacturing/src/org/ofbiz/manufacturing/bom/BOMServices.java
index 4e28e3e..22e2177 100644
--- a/applications/manufacturing/src/org/ofbiz/manufacturing/bom/BOMServices.java
+++ b/applications/manufacturing/src/org/ofbiz/manufacturing/bom/BOMServices.java
@@ -84,9 +84,8 @@
         if (bomType == null) {
             try {
                 List<GenericValue> bomTypesValues = delegator.findByAnd("ProductAssocType", UtilMisc.toMap("parentTypeId", "PRODUCT_COMPONENT"));
-                Iterator<GenericValue> bomTypesValuesIt = bomTypesValues.iterator();
-                while (bomTypesValuesIt.hasNext()) {
-                    bomTypes.add((bomTypesValuesIt.next()).getString("productAssocTypeId"));
+                for(GenericValue bomTypesValue : bomTypesValues) {
+                    bomTypes.add(bomTypesValue.getString("productAssocTypeId"));
                 }
             } catch (GenericEntityException gee) {
                 return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ManufacturingBomErrorRunningMaxDethAlgorithm", UtilMisc.toMap("errorString", gee.getMessage()), locale));
@@ -97,10 +96,8 @@
 
         int depth = 0;
         int maxDepth = 0;
-        Iterator<String> bomTypesIt = bomTypes.iterator();
         try {
-            while (bomTypesIt.hasNext()) {
-                String oneBomType = bomTypesIt.next();
+            for(String oneBomType : bomTypes) {
                 depth = BOMHelper.getMaxDepth(productId, oneBomType, fromDate, delegator);
                 if (depth > maxDepth) {
                     maxDepth = depth;
@@ -149,10 +146,8 @@
                     UtilMisc.toMap("productIdTo", productId, "productAssocTypeId", "PRODUCT_VARIANT"));
             virtualProducts = EntityUtil.filterByDate(virtualProducts);
             int virtualMaxDepth = 0;
-            Iterator<GenericValue> virtualProductsIt = virtualProducts.iterator();
-            while (virtualProductsIt.hasNext()) {
+            for(GenericValue oneVirtualProductAssoc : virtualProducts) {
                 int virtualDepth = 0;
-                GenericValue oneVirtualProductAssoc = virtualProductsIt.next();
                 GenericValue virtualProduct = delegator.findByPrimaryKey("Product", UtilMisc.toMap("productId", oneVirtualProductAssoc.getString("productId")));
                 if (virtualProduct.get("billOfMaterialLevel") != null) {
                     virtualDepth = virtualProduct.getLong("billOfMaterialLevel").intValue();
@@ -190,9 +185,7 @@
                 List<GenericValue> variantProducts = delegator.findByAnd("ProductAssoc", 
                         UtilMisc.toMap("productId", productId, "productAssocTypeId", "PRODUCT_VARIANT"));
                 variantProducts = EntityUtil.filterByDate(variantProducts, true);
-                Iterator<GenericValue> variantProductsIt = variantProducts.iterator();
-                while (variantProductsIt.hasNext()) {
-                    GenericValue oneVariantProductAssoc = variantProductsIt.next();
+                for(GenericValue oneVariantProductAssoc : variantProducts) {
                     GenericValue variantProduct = delegator.findByPrimaryKey("Product", UtilMisc.toMap("productId", oneVariantProductAssoc.getString("productId")));
                     variantProduct.set("billOfMaterialLevel", llc);
                     variantProduct.store();
@@ -220,20 +213,16 @@
         try {
             List<GenericValue> products = delegator.findList("Product", null, null, 
                     UtilMisc.toList("isVirtual DESC"), null, false);
-            Iterator<GenericValue> productsIt = products.iterator();
             Long zero = Long.valueOf(0);
             List<GenericValue> allProducts = FastList.newInstance();
-            while (productsIt.hasNext()) {
-                GenericValue product = productsIt.next();
+            for(GenericValue product : products) {
                 product.set("billOfMaterialLevel", zero);
                 allProducts.add(product);
             }
             delegator.storeAll(allProducts);
             Debug.logInfo("Low Level Code set to 0 for all the products", module);
 
-            productsIt = products.iterator();
-            while (productsIt.hasNext()) {
-                GenericValue product = productsIt.next();
+            for(GenericValue product : products) {
                 try {
                     Map<String, Object> depthResult = dispatcher.runSync("updateLowLevelCode", UtilMisc.<String, Object>toMap("productIdTo", product.getString("productId"), "alsoComponents", Boolean.valueOf(false), "alsoVariants", Boolean.valueOf(false)));
                     Debug.logInfo("Product [" + product.getString("productId") + "] Low Level Code [" + depthResult.get("lowLevelCode") + "]", module);
@@ -414,10 +403,8 @@
 
         // also return a componentMap (useful in scripts and simple language code)
         List<Map<String, Object>> componentsMap = FastList.newInstance();
-        Iterator<BOMNode> componentsIt = components.iterator();
-        while (componentsIt.hasNext()) {
+        for(BOMNode node : components) {
             Map<String, Object> componentMap = FastMap.newInstance();
-            BOMNode node = componentsIt.next();
             componentMap.put("product", node.getProduct());
             componentMap.put("quantity", node.getQuantity());
             componentsMap.add(componentMap);
@@ -466,9 +453,7 @@
         } catch (GenericEntityException gee) {
             return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ManufacturingBomErrorCreatingBillOfMaterialsTree", UtilMisc.toMap("errorString", gee.getMessage()), locale));
         }
-        Iterator<BOMNode> componentsIt = components.iterator();
-        while (componentsIt.hasNext()) {
-            BOMNode oneComponent = componentsIt.next();
+        for(BOMNode oneComponent : components) {
             if (!oneComponent.isManufactured()) {
                 notAssembledComponents.add(oneComponent);
             }
@@ -503,11 +488,9 @@
         } catch (GenericEntityException gee) {
             return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ManufacturingBomErrorLoadingShipmentItems", locale));
         }
-        Iterator<GenericValue> shipmentItemsIt = shipmentItems.iterator();
         Map<String, Object> orderReadHelpers = FastMap.newInstance();
         Map<String, Object> partyOrderShipments = FastMap.newInstance();
-        while (shipmentItemsIt.hasNext()) {
-            GenericValue shipmentItem = shipmentItemsIt.next();
+        for(GenericValue shipmentItem : shipmentItems) {
             // Get the OrderShipments
             List<GenericValue> orderShipments = null;
             try {
diff --git a/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java b/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java
index 4182b69..130b161 100644
--- a/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java
+++ b/applications/manufacturing/src/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.java
@@ -125,9 +125,7 @@
                         UtilMisc.toMap("workEffortId", productionRunId, "workEffortGoodStdTypeId", "PRUN_PROD_DELIV",
                                 "statusId", "WEGS_CREATED"));
                 if (!UtilValidate.isEmpty(products)) {
-                    Iterator<GenericValue> productsIt = products.iterator();
-                    while (productsIt.hasNext()) {
-                        GenericValue product = productsIt.next();
+                    for(GenericValue product : products) {
                         product.set("statusId", "WEGS_CANCELLED");
                         product.store();
                     }
@@ -135,10 +133,8 @@
 
                 // change the tasks status to PRUN_CANCELLED
                 List<GenericValue> tasks = productionRun.getProductionRunRoutingTasks();
-                GenericValue oneTask = null;
                 String taskId = null;
-                for (int i = 0; i < tasks.size(); i++) {
-                    oneTask = tasks.get(i);
+                for(GenericValue oneTask : tasks) {
                     taskId = oneTask.getString("workEffortId");
                     serviceContext.clear();
                     serviceContext.put("workEffortId", taskId);
@@ -150,9 +146,7 @@
                             UtilMisc.toMap("workEffortId", taskId, "workEffortGoodStdTypeId", "PRUNT_PROD_NEEDED", 
                                     "statusId", "WEGS_CREATED"));
                     if (!UtilValidate.isEmpty(components)) {
-                        Iterator<GenericValue> componentsIt = components.iterator();
-                        while (componentsIt.hasNext()) {
-                            GenericValue component = componentsIt.next();
+                        for(GenericValue component : components) {
                             component.set("statusId", "WEGS_CANCELLED");
                             component.store();
                         }
@@ -305,11 +299,8 @@
         }
 
         // Multi creation (like clone) ProductionRunTask and GoodAssoc
-        Iterator<GenericValue>  rt = routingTaskAssocs.iterator();
         boolean first = true;
-        while (rt.hasNext()) {
-            GenericValue routingTaskAssoc = rt.next();
-
+        for(GenericValue routingTaskAssoc : routingTaskAssocs) {
             if (EntityUtil.isValueActive(routingTaskAssoc, startDate)) {
                 GenericValue routingTask = null;
                 try {
@@ -368,11 +359,9 @@
                 // Now we iterate thru the components returned by the getManufacturingComponents service
                 // TODO: if in the BOM a routingWorkEffortId is specified, but the task is not in the routing
                 //       the component is not added to the production run.
-                Iterator<BOMNode>  pb = components.iterator();
-                while (pb.hasNext()) {
+                for(BOMNode node : components) {
                     // The components variable contains a list of BOMNodes:
                     // each node represents a product (component).
-                    BOMNode node = pb.next();
                     GenericValue productBom = node.getProductAssoc();
                     if ((productBom.getString("routingWorkEffortId") == null && first) || (productBom.getString("routingWorkEffortId") != null && productBom.getString("routingWorkEffortId").equals(routingTask.getString("workEffortId")))) {
                         serviceContext.clear();
@@ -433,9 +422,7 @@
         }
 
         if (workEffortPartyAssignments != null) {
-            Iterator<GenericValue> i = workEffortPartyAssignments.iterator();
-            while (i.hasNext()) {
-                GenericValue workEffortPartyAssignment = i.next();
+            for(GenericValue workEffortPartyAssignment : workEffortPartyAssignments) {
                 Map<String, Object> partyToWorkEffort = UtilMisc.<String, Object>toMap(
                         "workEffortId",  productionRunTaskId,
                         "partyId",  workEffortPartyAssignment.getString("partyId"),
@@ -600,9 +587,7 @@
                 return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ManufacturingProductionRunStatusNotChanged", locale));
             }
             // change the production run tasks status to PRUN_SCHEDULED
-            Iterator<GenericValue> tasks = productionRun.getProductionRunRoutingTasks().iterator();
-            while (tasks.hasNext()) {
-                GenericValue task = tasks.next();
+            for(GenericValue task : productionRun.getProductionRunRoutingTasks()) {
                 serviceContext.clear();
                 serviceContext.put("workEffortId", task.getString("workEffortId"));
                 serviceContext.put("currentStatusId", statusId);
@@ -634,9 +619,7 @@
                 return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ManufacturingProductionRunStatusNotChanged", locale));
             }
             // change the production run tasks status to PRUN_DOC_PRINTED
-            Iterator<GenericValue> tasks = productionRun.getProductionRunRoutingTasks().iterator();
-            while (tasks.hasNext()) {
-                GenericValue task = tasks.next();
+            for(GenericValue task : productionRun.getProductionRunRoutingTasks()) {
                 serviceContext.clear();
                 serviceContext.put("workEffortId", task.getString("workEffortId"));
                 serviceContext.put("currentStatusId", "PRUN_DOC_PRINTED");
@@ -726,9 +709,7 @@
                 return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ManufacturingProductionRunStatusNotChanged", locale));
             }
             // change the production run tasks status to PRUN_CLOSED
-            Iterator<GenericValue> tasks = productionRun.getProductionRunRoutingTasks().iterator();
-            while (tasks.hasNext()) {
-                GenericValue task = tasks.next();
+            for(GenericValue task : productionRun.getProductionRunRoutingTasks()) {
                 serviceContext.clear();
                 serviceContext.put("workEffortId", task.getString("workEffortId"));
                 serviceContext.put("currentStatusId", "PRUN_CLOSED");
@@ -996,13 +977,11 @@
             List<GenericValue> costComponents = EntityUtil.filterByDate(delegator.findByAnd("CostComponent",
                     UtilMisc.toMap("workEffortId", workEffortId)));
             result.put("costComponents", costComponents);
-            Iterator<GenericValue> costComponentsIt = costComponents.iterator();
             // TODO: before doing these totals we should convert the cost components' costs to the
             //       base currency uom of the owner of the facility in which the task is running
             BigDecimal totalCost = ZERO;
             BigDecimal totalCostNoMaterials = ZERO;
-            while (costComponentsIt.hasNext()) {
-                GenericValue costComponent = costComponentsIt.next();
+            for(GenericValue costComponent : costComponents) {
                 BigDecimal cost = costComponent.getBigDecimal("cost");
                 totalCost = totalCost.add(cost);
                 if (!"ACTUAL_MAT_COST".equals(costComponent.getString("costComponentTypeId"))) {
@@ -1027,14 +1006,12 @@
         try {
             List<GenericValue> tasks = delegator.findByAnd("WorkEffort", 
                     UtilMisc.toMap("workEffortParentId", workEffortId), UtilMisc.toList("workEffortId"));
-            Iterator<GenericValue> tasksIt = tasks.iterator();
             BigDecimal totalCost = ZERO;
             Map<String, Object> outputMap = dispatcher.runSync("getWorkEffortCosts", 
                     UtilMisc.<String, Object>toMap("userLogin", userLogin, "workEffortId", workEffortId));
             BigDecimal productionRunHeaderCost = (BigDecimal)outputMap.get("totalCost");
             totalCost = totalCost.add(productionRunHeaderCost);
-            while (tasksIt.hasNext()) {
-                GenericValue task = tasksIt.next();
+            for(GenericValue task : tasks) {
                 outputMap = dispatcher.runSync("getWorkEffortCosts", 
                         UtilMisc.<String, Object>toMap("userLogin", userLogin, "workEffortId", task.getString("workEffortId")));
                 BigDecimal taskCost = (BigDecimal)outputMap.get("totalCost");
@@ -1085,9 +1062,7 @@
                     UtilMisc.toMap("workEffortId", productionRunTaskId));
             workEffortCostCalcs = EntityUtil.filterByDate(workEffortCostCalcs);
 
-            Iterator<GenericValue> workEffortCostCalcsIt = workEffortCostCalcs.iterator();
-            while (workEffortCostCalcsIt.hasNext()) {
-                GenericValue workEffortCostCalc = workEffortCostCalcsIt.next();
+            for (GenericValue workEffortCostCalc : workEffortCostCalcs) {
                 GenericValue costComponentCalc = workEffortCostCalc.getRelatedOne("CostComponentCalc");
                 GenericValue customMethod = costComponentCalc.getRelatedOne("CustomMethod");
                 if (UtilValidate.isEmpty(customMethod) || UtilValidate.isEmpty(customMethod.getString("customMethodName"))) {
@@ -1164,11 +1139,9 @@
         }
         // materials costs: these are the costs derived from the materials used by the production run task
         try {
-            Iterator<GenericValue> inventoryAssignIt = delegator.findByAnd("WorkEffortAndInventoryAssign", 
-                    UtilMisc.toMap("workEffortId", productionRunTaskId)).iterator();
             Map<String, BigDecimal> materialsCostByCurrency = FastMap.newInstance();
-            while (inventoryAssignIt.hasNext()) {
-                GenericValue inventoryConsumed = inventoryAssignIt.next();
+            for(GenericValue inventoryConsumed : delegator.findByAnd("WorkEffortAndInventoryAssign",
+                                UtilMisc.toMap("workEffortId", productionRunTaskId))) {
                 BigDecimal quantity = inventoryConsumed.getBigDecimal("quantity");
                 BigDecimal unitCost = inventoryConsumed.getBigDecimal("unitCost");
                 if (UtilValidate.isEmpty(unitCost) || UtilValidate.isEmpty(quantity)) {
@@ -1182,9 +1155,7 @@
                 materialsCost = materialsCost.add(unitCost.multiply(quantity)).setScale(decimals, rounding);
                 materialsCostByCurrency.put(currencyUomId, materialsCost);
             }
-            Iterator<String> currencyIt = materialsCostByCurrency.keySet().iterator();
-            while (currencyIt.hasNext()) {
-                String currencyUomId = currencyIt.next();
+            for(String currencyUomId : materialsCostByCurrency.keySet()) {
                 BigDecimal materialsCost = materialsCostByCurrency.get(currencyUomId);
                 Map<String, Object> inMap = UtilMisc.<String, Object>toMap("userLogin", userLogin,
                         "workEffortId", productionRunTaskId);
@@ -1539,9 +1510,7 @@
             Debug.logError(e.getMessage(),  module);
         }
         if (workEffortPartyAssignments != null) {
-            Iterator<GenericValue> i = workEffortPartyAssignments.iterator();
-            while (i.hasNext()) {
-                GenericValue workEffortPartyAssignment = i.next();
+            for(GenericValue workEffortPartyAssignment : workEffortPartyAssignments) {
                 Map<String, Object> partyToWorkEffort = UtilMisc.<String, Object>toMap(
                         "workEffortId",  productionRunTaskId,
                         "partyId",  workEffortPartyAssignment.getString("partyId"),
@@ -1980,21 +1949,17 @@
         // are currently assigned to this task.
         // If less than passed quantity then return an error message.
         try {
-            Iterator<GenericValue> issuances = (delegator.findByAnd("WorkEffortAndInventoryAssign", 
-                    UtilMisc.toMap("workEffortId", productionRunTaskId, "productId", productId))).iterator();
             BigDecimal totalIssued = BigDecimal.ZERO;
-            while (issuances.hasNext()) {
-                GenericValue issuance = issuances.next();
+            for(GenericValue issuance : delegator.findByAnd("WorkEffortAndInventoryAssign", 
+                            UtilMisc.toMap("workEffortId", productionRunTaskId, "productId", productId))) {
                 BigDecimal issued = issuance.getBigDecimal("quantity");
                 if (issued != null) {
                     totalIssued = totalIssued.add(issued);
                 }
             }
-            Iterator<GenericValue> returns = (delegator.findByAnd("WorkEffortAndInventoryProduced", 
-                    UtilMisc.toMap("workEffortId", productionRunTaskId, "productId", productId))).iterator();
             BigDecimal totalReturned = BigDecimal.ZERO;
-            while (returns.hasNext()) {
-                GenericValue returned = returns.next();
+            for(GenericValue returned : delegator.findByAnd("WorkEffortAndInventoryProduced", 
+                            UtilMisc.toMap("workEffortId", productionRunTaskId, "productId", productId))) {
                 GenericValue returnDetail = EntityUtil.getFirst(delegator.findByAnd("InventoryItemDetail", UtilMisc.toMap("inventoryItemId", returned.getString("inventoryItemId")), UtilMisc.toList("inventoryItemDetailSeqId")));
                 if (returnDetail != null) {
                     BigDecimal qtyReturned = returnDetail.getBigDecimal("quantityOnHandDiff");
@@ -2342,15 +2307,11 @@
         String productionRunId = (String)resultService.get("productionRunId");
         result.put("productionRunId", productionRunId);
 
-        Iterator<ConfigOption> options = config.getSelectedOptions().iterator();
         Map<String, BigDecimal> components = FastMap.newInstance();
-        while (options.hasNext()) {
-            ConfigOption co = options.next();
+        for(ConfigOption co : config.getSelectedOptions()) {
             //components.addAll(co.getComponents());
-            Iterator<GenericValue> selComponents = co.getComponents().iterator();
-            while (selComponents.hasNext()) {
+            for(GenericValue selComponent : co.getComponents()) {
                 BigDecimal componentQuantity = null;
-                GenericValue selComponent = selComponents.next();
                 if (selComponent.get("quantity") != null) {
                     componentQuantity = selComponent.getBigDecimal("quantity");
                 }
@@ -3073,9 +3034,7 @@
             if (UtilValidate.isEmpty(components)) {
                 return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ManufacturingProductionRunCannotDecomposingInventoryItemNoComponentsFound", UtilMisc.toMap("productId", inventoryItem.getString("productId")), locale));
             }
-            Iterator<Map<String, Object>> componentsIt = components.iterator();
-            while (componentsIt.hasNext()) {
-                Map<String, Object> component = componentsIt.next();
+            for(Map<String, Object> component : components) {
                 // get the component's standard cost
                 serviceContext.clear();
                 serviceContext = UtilMisc.toMap("productId", ((GenericValue)component.get("product")).getString("productId"),
@@ -3120,9 +3079,7 @@
             List<GenericValue> resultList = delegator.findByAnd("WorkEffortAndGoods", 
                     UtilMisc.toMap("workEffortGoodStdTypeId", "PRUN_PROD_DELIV",
                             "statusId", "WEGS_CREATED", "workEffortTypeId", "PROD_ORDER_HEADER"));
-            Iterator<GenericValue> iteratorResult = resultList.iterator();
-            while (iteratorResult.hasNext()) {
-                GenericValue genericResult = iteratorResult.next();
+            for(GenericValue genericResult : resultList) {
                 if ("PRUN_CLOSED".equals(genericResult.getString("currentStatusId")) ||
                     "PRUN_CREATED".equals(genericResult.getString("currentStatusId"))) {
                     continue;
@@ -3163,11 +3120,9 @@
             resultList = delegator.findByAnd("OrderHeaderAndItems", 
                     UtilMisc.toMap("orderTypeId", "PURCHASE_ORDER", 
                             "itemStatusId", "ITEM_APPROVED"), UtilMisc.toList("orderId"));
-            iteratorResult = resultList.iterator();
             String orderId = null;
             GenericValue orderDeliverySchedule = null;
-            while (iteratorResult.hasNext()) {
-                GenericValue genericResult = iteratorResult.next();
+            for(GenericValue genericResult : resultList) {
                 String newOrderId =  genericResult.getString("orderId");
                 if (!newOrderId.equals(orderId)) {
                     orderDeliverySchedule = null;
@@ -3218,9 +3173,7 @@
             List<GenericValue> backorders = delegator.findList("OrderItemAndShipGrpInvResAndItem", 
                     EntityCondition.makeCondition(backordersCondList, EntityOperator.AND), null, 
                     UtilMisc.toList("shipBeforeDate"), null, false);
-            Iterator<GenericValue> backordersIt = backorders.iterator();
-            while (backordersIt.hasNext()) {
-                GenericValue genericResult = backordersIt.next();
+            for(GenericValue genericResult : backorders) {
                 String productId = genericResult.getString("productId");
                 GenericValue orderItemShipGroup = delegator.findByPrimaryKey("OrderItemShipGroup", UtilMisc.toMap("orderId", genericResult.get("orderId"),
                                                                                                                   "shipGroupSeqId", genericResult.get("shipGroupSeqId")));
@@ -3238,9 +3191,7 @@
                 TreeMap<Timestamp, Object> productMap = products.get(productId);
                 SortedMap<Timestamp, Object> subsetMap = productMap.headMap(requiredByDate);
                 // iterate and 'reserve'
-                Iterator<Timestamp> subsetMapKeysIt = subsetMap.keySet().iterator();
-                while (subsetMapKeysIt.hasNext()) {
-                    Timestamp currentDate = subsetMapKeysIt.next();
+                for(Timestamp currentDate : subsetMap.keySet()) {
                     Map<String, Object> currentDateMap = UtilGenerics.checkMap(subsetMap.get(currentDate));
                     //List reservations = (List)currentDateMap.get("reservations");
                     BigDecimal remainingQty = (BigDecimal)currentDateMap.get("remainingQty");
diff --git a/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/MrpServices.java b/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/MrpServices.java
index 021ef15..687b0e1 100644
--- a/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/MrpServices.java
+++ b/applications/manufacturing/src/org/ofbiz/manufacturing/mrp/MrpServices.java
@@ -103,9 +103,7 @@
         }
         if (listResult != null) {
             try {
-                Iterator<GenericValue> listResultIt = listResult.iterator();
-                while (listResultIt.hasNext()) {
-                    GenericValue tmpRequirement = listResultIt.next();
+                for(GenericValue tmpRequirement : listResult) {
                     listResultRoles.addAll(tmpRequirement.getRelated("RequirementRole"));
                     //int numOfRecordsRemoved = delegator.removeRelated("RequirementRole", tmpRequirement);
                 }
@@ -129,10 +127,8 @@
             }
         }
 
-        GenericValue genericResult = null;
         Map<String, Object> parameters = null;
         List<GenericValue> resultList = null;
-        Iterator<GenericValue> iteratorResult = null;
         // ----------------------------------------
         // Loads all the approved sales order items and purchase order items
         // ----------------------------------------
@@ -147,7 +143,6 @@
             notAssignedDate = new Timestamp(calendar.getTimeInMillis());
         }
         resultList = null;
-        iteratorResult = null;
         parameters = UtilMisc.<String, Object>toMap("orderTypeId", "SALES_ORDER", "oiStatusId", "ITEM_APPROVED");
         parameters.put("facilityId", facilityId);
         try {
@@ -157,9 +152,7 @@
             Debug.logError(e, "Error : parameters = "+parameters,module);
             return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ManufacturingMrpEventFindError", locale));
         }
-        iteratorResult = resultList.iterator();
-        while (iteratorResult.hasNext()) {
-            genericResult = iteratorResult.next();
+        for(GenericValue genericResult : resultList) {
             String productId =  genericResult.getString("productId");
             BigDecimal reservedQuantity = genericResult.getBigDecimal("reservedQuantity");
             BigDecimal shipGroupQuantity = genericResult.getBigDecimal("quantity");
@@ -211,7 +204,6 @@
         // Loads all the approved product requirements (po requirements)
         // ----------------------------------------
         resultList = null;
-        iteratorResult = null;
         parameters = UtilMisc.<String, Object>toMap("requirementTypeId", "PRODUCT_REQUIREMENT",
                 "statusId", "REQ_APPROVED", "facilityId", facilityId);
         try {
@@ -219,9 +211,7 @@
         } catch (GenericEntityException e) {
             return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ManufacturingMrpEventFindError", locale));
         }
-        iteratorResult = resultList.iterator();
-        while (iteratorResult.hasNext()) {
-            genericResult = iteratorResult.next();
+        for(GenericValue genericResult : resultList) {
             String productId =  genericResult.getString("productId");
             BigDecimal eventQuantityTmp = genericResult.getBigDecimal("quantity");
             if (productId == null || eventQuantityTmp == null) {
@@ -244,7 +234,6 @@
         // Loads all the approved purchase order items
         // ----------------------------------------
         resultList = null;
-        iteratorResult = null;
         String orderId = null;
         GenericValue orderDeliverySchedule = null;
         try {
@@ -259,9 +248,7 @@
         } catch (GenericEntityException e) {
             return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ManufacturingMrpEventFindError", locale));
         }
-        iteratorResult = resultList.iterator();
-        while (iteratorResult.hasNext()) {
-            genericResult = iteratorResult.next();
+        for(GenericValue genericResult : resultList) {
             String newOrderId =  genericResult.getString("orderId");
             if (!newOrderId.equals(orderId)) {
                 orderDeliverySchedule = null;
@@ -321,14 +308,11 @@
         // PRODUCTION Run: components
         // ----------------------------------------
         resultList = null;
-        iteratorResult = null;
         parameters = UtilMisc.<String, Object>toMap("workEffortGoodStdTypeId", "PRUNT_PROD_NEEDED",
                    "statusId", "WEGS_CREATED", "facilityId", facilityId);
         try {
             resultList = delegator.findByAnd("WorkEffortAndGoods", parameters);
-            iteratorResult = resultList.iterator();
-            while (iteratorResult.hasNext()) {
-                genericResult = iteratorResult.next();
+            for(GenericValue genericResult : resultList) {
                 if ("PRUN_CLOSED".equals(genericResult.getString("currentStatusId")) ||
                     "PRUN_COMPLETED".equals(genericResult.getString("currentStatusId")) ||
                     "PRUN_CANCELLED".equals(genericResult.getString("currentStatusId"))) {
@@ -359,14 +343,11 @@
         // PRODUCTION Run: product produced
         // ----------------------------------------
         resultList = null;
-        iteratorResult = null;
         parameters = UtilMisc.<String, Object>toMap("workEffortGoodStdTypeId", "PRUN_PROD_DELIV",
                 "statusId", "WEGS_CREATED", "workEffortTypeId", "PROD_ORDER_HEADER", "facilityId", facilityId);
         try {
             resultList = delegator.findByAnd("WorkEffortAndGoods", parameters);
-            iteratorResult = resultList.iterator();
-            while (iteratorResult.hasNext()) {
-                genericResult = iteratorResult.next();
+            for(GenericValue genericResult : resultList) {
                 if ("PRUN_CLOSED".equals(genericResult.getString("currentStatusId")) ||
                     "PRUN_COMPLETED".equals(genericResult.getString("currentStatusId")) ||
                     "PRUN_CANCELLED".equals(genericResult.getString("currentStatusId"))) {
@@ -402,7 +383,6 @@
         // Products without upcoming events but that are already under minimum quantity in warehouse
         // ----------------------------------------
         resultList = null;
-        iteratorResult = null;
         parameters = UtilMisc.<String, Object>toMap("facilityId", facilityId);
         try {
             resultList = delegator.findByAnd("ProductFacility", parameters);
@@ -410,9 +390,7 @@
             Debug.logError(e, "Unable to retrieve ProductFacility records.", module);
             return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ManufacturingMrpCannotFindProductFacility", locale));
         }
-        iteratorResult = resultList.iterator();
-        while (iteratorResult.hasNext()) {
-            genericResult = iteratorResult.next();
+        for(GenericValue genericResult : resultList) {
             String productId = genericResult.getString("productId");
             BigDecimal minimumStock = genericResult.getBigDecimal("minimumStock");
             if (minimumStock == null) {
@@ -444,7 +422,6 @@
         // SALES FORECASTS
         // ----------------------------------------
         resultList = null;
-        iteratorResult = null;
         GenericValue facility = null;
         try {
             facility = delegator.findOne("Facility", UtilMisc.toMap("facilityId", facilityId), false);
@@ -457,9 +434,7 @@
         } catch (GenericEntityException e) {
             return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ManufacturingMrpCannotFindSalesForecasts", locale));
         }
-        iteratorResult = resultList.iterator();
-        while (iteratorResult.hasNext()) {
-            genericResult = iteratorResult.next();
+        for(GenericValue genericResult : resultList) {
             String customTimePeriodId =  genericResult.getString("customTimePeriodId");
             GenericValue customTimePeriod = null;
             try {
@@ -472,24 +447,21 @@
                     continue;
                 } else {
                     List<GenericValue> salesForecastDetails = null;
-                    Iterator<GenericValue> sfdIter = null;
                     try {
                         salesForecastDetails = delegator.findByAnd("SalesForecastDetail", UtilMisc.toMap("salesForecastId", genericResult.getString("salesForecastId")));
                     } catch (GenericEntityException e) {
                         return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ManufacturingMrpCannotFindSalesForecastDetails", locale));
                     }
-                    sfdIter = salesForecastDetails.iterator();
-                    while (sfdIter.hasNext()) {
-                        genericResult = sfdIter.next();
-                        String productId =  genericResult.getString("productId");
-                        BigDecimal eventQuantityTmp = genericResult.getBigDecimal("quantity");
+                    for(GenericValue sfd : salesForecastDetails) {
+                        String productId =  sfd.getString("productId");
+                        BigDecimal eventQuantityTmp = sfd.getBigDecimal("quantity");
                         if (productId == null || eventQuantityTmp == null) {
                             continue;
                         }
                         eventQuantityTmp = eventQuantityTmp.negate();
                         parameters = UtilMisc.toMap("mrpId", mrpId, "productId", productId, "eventDate", customTimePeriod.getDate("fromDate"), "mrpEventTypeId", "SALES_FORECAST");
                         try {
-                            InventoryEventPlannedServices.createOrUpdateMrpEvent(parameters, eventQuantityTmp, null, genericResult.getString("salesForecastDetailId"), false, delegator);
+                            InventoryEventPlannedServices.createOrUpdateMrpEvent(parameters, eventQuantityTmp, null, sfd.getString("salesForecastDetailId"), false, delegator);
                         } catch (GenericEntityException e) {
                             return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ManufacturingMrpEventProblemInitializing", UtilMisc.toMap("mrpEventTypeId", "SALES_FORECAST"), locale));
                         }
@@ -564,9 +536,7 @@
         Delegator delegator = product.getDelegator();
 
         if (UtilValidate.isNotEmpty(listComponent)) {
-            Iterator<BOMNode> listComponentIter = listComponent.iterator();
-            while (listComponentIter.hasNext()) {
-                BOMNode node = listComponentIter.next();
+            for(BOMNode node : listComponent) {
                 GenericValue productComponent = node.getProductAssoc();
                 // read the startDate for the component
                 String routingTask = node.getProductAssoc().getString("routingWorkEffortId");
@@ -629,9 +599,7 @@
                 if (UtilValidate.isEmpty(facilities)) {
                     return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ManufacturingMrpFacilityGroupIsNotAssociatedToFacility", UtilMisc.toMap("facilityGroupId", facilityGroupId), locale));
                 }
-                Iterator<GenericValue> facilitiesIt = facilities.iterator();
-                while (facilitiesIt.hasNext()) {
-                    GenericValue facilityMember = facilitiesIt.next();
+                for(GenericValue facilityMember : facilities) {
                     GenericValue facility = facilityMember.getRelatedOne("Facility");
                     if ("WAREHOUSE".equals(facility.getString("facilityTypeId")) && UtilValidate.isEmpty(facilityId)) {
                         facilityId = facility.getString("facilityId");
@@ -672,7 +640,6 @@
         Map<String, Object> parameters = null;
         List<GenericValue> listInventoryEventForMRP = null;
         ListIterator<GenericValue> iteratorListInventoryEventForMRP = null;
-        GenericValue inventoryEventForMRP = null;
 
         // Initialization of the MrpEvent table, This table will contain the products we want to buy or build.
         parameters = UtilMisc.<String, Object>toMap("mrpId", mrpId, "reInitialize", Boolean.TRUE, "defaultYearsOffset", defaultYearsOffset, "userLogin", userLogin);
@@ -703,11 +670,9 @@
 
             if (UtilValidate.isNotEmpty(listInventoryEventForMRP)) {
                 bomLevelWithNoEvent = 0;
-                iteratorListInventoryEventForMRP = listInventoryEventForMRP.listIterator();
 
                 oldProductId = "";
-                while (iteratorListInventoryEventForMRP.hasNext()) {
-                    inventoryEventForMRP = iteratorListInventoryEventForMRP.next();
+                for(GenericValue inventoryEventForMRP : listInventoryEventForMRP) {
                     productId = inventoryEventForMRP.getString("productId");
                     eventQuantity = inventoryEventForMRP.getBigDecimal("quantity");
 
diff --git a/applications/manufacturing/src/org/ofbiz/manufacturing/techdata/TechDataServices.java b/applications/manufacturing/src/org/ofbiz/manufacturing/techdata/TechDataServices.java
index 6f7d7dc..25d0666 100644
--- a/applications/manufacturing/src/org/ofbiz/manufacturing/techdata/TechDataServices.java
+++ b/applications/manufacturing/src/org/ofbiz/manufacturing/techdata/TechDataServices.java
@@ -132,9 +132,7 @@
         }
 
         if (listRoutingTaskAssoc != null) {
-            Iterator<GenericValue> i = listRoutingTaskAssoc.iterator();
-            while (i.hasNext()) {
-                GenericValue routingTaskAssoc = i.next();
+            for(GenericValue routingTaskAssoc : listRoutingTaskAssoc) {
                 if (! workEffortIdFrom.equals(routingTaskAssoc.getString("workEffortIdFrom")) ||
                 ! workEffortIdTo.equals(routingTaskAssoc.getString("workEffortIdTo")) ||
                 ! workEffortAssocTypeId.equals(routingTaskAssoc.getString("workEffortAssocTypeId")) ||
diff --git a/applications/manufacturing/webapp/manufacturing/WEB-INF/controller.xml b/applications/manufacturing/webapp/manufacturing/WEB-INF/controller.xml
index d7ca6df..f4f084b 100644
--- a/applications/manufacturing/webapp/manufacturing/WEB-INF/controller.xml
+++ b/applications/manufacturing/webapp/manufacturing/WEB-INF/controller.xml
@@ -466,7 +466,7 @@
     </request-map>
     <request-map uri="ShowProductionRun">
         <security https="true" auth="true"/>
-        <event type="groovy" path="component://manufacturing/webapp/manufacturing/jobshopmgt/" invoke="ShowProductionRun.groovy"/>
+        <event type="groovy" path="component://manufacturing/webapp/manufacturing/jobshopmgt/ShowProductionRun.groovy"/>
         <response name="docs_not_printed" type="view" value="EditProductionRun"/>
         <response name="docs_printed" type="view" value="ProductionRunDeclaration"/>
         <response name="error" type="view" value="FindProductionRun"/>
diff --git a/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunDeclaration.ftl b/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunDeclaration.ftl
deleted file mode 100644
index e69de29..0000000
--- a/applications/manufacturing/webapp/manufacturing/jobshopmgt/ProductionRunDeclaration.ftl
+++ /dev/null
diff --git a/applications/marketing/config/MarketingUiLabels.xml b/applications/marketing/config/MarketingUiLabels.xml
index 1fe5c72..02c61df 100644
--- a/applications/marketing/config/MarketingUiLabels.xml
+++ b/applications/marketing/config/MarketingUiLabels.xml
@@ -27,6 +27,7 @@
         <value xml:lang="pt_BR">Custo real</value>
         <value xml:lang="ro">Cost Actual</value>
         <value xml:lang="th">ราคาจริง</value>
+        <value xml:lang="vi">Chi phí thực tế</value>
         <value xml:lang="zh">实际费用</value>
         <value xml:lang="zh_TW">實際費用</value>
     </property>
@@ -68,6 +69,7 @@
         <value xml:lang="fr">Prospects convertis</value>
         <value xml:lang="it">Leads convertiti</value>
         <value xml:lang="pt_BR">Leads concretizados</value>
+        <value xml:lang="vi">Các đầu mối được chuyển đổi</value>
         <value xml:lang="zh">转化了的线索</value>
         <value xml:lang="zh_TW">轉化了的線索</value>
     </property>
@@ -197,6 +199,7 @@
         <value xml:lang="pt_BR">Campanha de Marketing</value>
         <value xml:lang="ro">Campania Vanzare</value>
         <value xml:lang="th">การวางแผนทางการตลาด</value>
+        <value xml:lang="vi">Chiến dịch tiếp thị</value>
         <value xml:lang="zh">市场攻势</value>
         <value xml:lang="zh_TW">行銷活動</value>
     </property>
@@ -210,6 +213,7 @@
         <value xml:lang="pt_BR">Criar Campanha de Marketing</value>
         <value xml:lang="ro">Creare Campanie Vanzare</value>
         <value xml:lang="th">สร้างการวางแผนทางการตลาด</value>
+        <value xml:lang="vi">Tạo Chiến dịch tiếp thị</value>
         <value xml:lang="zh">新建市场攻势</value>
         <value xml:lang="zh_TW">新建行銷活動</value>
     </property>
@@ -223,6 +227,7 @@
         <value xml:lang="pt_BR">ID de Campanha de Marketing</value>
         <value xml:lang="ro">Cod Campanie Vanzare</value>
         <value xml:lang="th">รหัสการวางแผนทางการตลาด</value>
+        <value xml:lang="vi">Mã chiến dịch tiếp thị</value>
         <value xml:lang="zh">市场攻势标识</value>
         <value xml:lang="zh_TW">行銷活動ID</value>
     </property>
@@ -234,6 +239,7 @@
         <value xml:lang="nl">Fout emailadres opgegeven.</value>
         <value xml:lang="pt_BR">Endereço de e-mail inválido</value>
         <value xml:lang="th">เข้าสู่ที่อยู่ของอีเมล์ไม่ได้</value>
+        <value xml:lang="vi">Địa chỉ email nhập vào không phù hợp.</value>
         <value xml:lang="zh">输入的电子邮件地址无效。</value>
         <value xml:lang="zh_TW">輸入的電子郵件位址無效。</value>
     </property>
@@ -247,6 +253,7 @@
         <value xml:lang="pt_BR">Nome de campanha</value>
         <value xml:lang="ro">Nume Campanie</value>
         <value xml:lang="th">ชื่อโครงการ</value>
+        <value xml:lang="vi">Tên chiến dịch</value>
         <value xml:lang="zh">攻势名称</value>
         <value xml:lang="zh_TW">活動名稱</value>
     </property>
@@ -260,6 +267,7 @@
         <value xml:lang="pt_BR">Relatório de campanha de marketing</value>
         <value xml:lang="ro">Tiparire Campanie de Vanzare</value>
         <value xml:lang="th">รายงานการวางแผนทางการตลาด</value>
+        <value xml:lang="vi">Báo cáo chiến dịch tiếp thị</value>
         <value xml:lang="zh">市场攻势报告</value>
         <value xml:lang="zh_TW">行銷活動報告</value>
     </property>
@@ -273,6 +281,7 @@
         <value xml:lang="pt_BR">Criar papel de campanha de marketig</value>
         <value xml:lang="ro">Creare Rol Campanie Vanzare</value>
         <value xml:lang="th">สร้างสถานะการวางแผนทางการตลาด</value>
+        <value xml:lang="vi">Khởi tạo vai trò trong chiến dịch</value>
         <value xml:lang="zh">新建市场攻势角色</value>
         <value xml:lang="zh_TW">新建行銷活動角色</value>
     </property>
@@ -286,6 +295,7 @@
         <value xml:lang="pt_BR">Descrição da campanha</value>
         <value xml:lang="ro">Sumar Campanie</value>
         <value xml:lang="th">สรุปโครงการ</value>
+        <value xml:lang="vi">Tóm tắt chiến dịch</value>
         <value xml:lang="zh">攻势摘要</value>
         <value xml:lang="zh_TW">活動摘要</value>
     </property>
@@ -299,6 +309,7 @@
         <value xml:lang="pt_BR">OFBiz: Gerente de Marketing</value>
         <value xml:lang="ro">OFBiz: Gestione Vendite</value>
         <value xml:lang="th">OFBiz: การจัดการทางการตลาด</value>
+        <value xml:lang="vi">OFBiz: Quản lý tiếp thị</value>
         <value xml:lang="zh">OFBiz: 市场宣传管理</value>
         <value xml:lang="zh_TW">OFBiz: 行銷管理</value>
     </property>
@@ -329,6 +340,7 @@
         <value xml:lang="pt_BR">Lista de contatos</value>
         <value xml:lang="ro">Lista Contact</value>
         <value xml:lang="th">รายการติดต่อ</value>
+        <value xml:lang="vi">Danh sách liên hệ</value>
         <value xml:lang="zh">联系列表</value>
         <value xml:lang="zh_TW">聯系列表</value>
     </property>
@@ -341,6 +353,7 @@
         <value xml:lang="pt_BR">Criar envento de comunicação</value>
         <value xml:lang="ro">Creare Noua Lista Contact Eveniment Comunicatie</value>
         <value xml:lang="th">สร้างรายการผลการติดต่อใหม่</value>
+        <value xml:lang="vi">Tạo mới danh sách liên hệ cho sự kiện</value>
         <value xml:lang="zh">新建联系列表沟通事件</value>
         <value xml:lang="zh_TW">新建聯系列表溝通事件</value>
     </property>
@@ -353,6 +366,7 @@
         <value xml:lang="pt_BR">ID de evento de comunicação</value>
         <value xml:lang="ro">Cod Eveniment Comunicatie</value>
         <value xml:lang="th">รหัสผลการติดต่อ</value>
+        <value xml:lang="vi">Mã sự kiện truyền thông</value>
         <value xml:lang="zh">沟通事件标识</value>
         <value xml:lang="zh_TW">通訊事件ID</value>
     </property>
@@ -370,6 +384,7 @@
     <property key="MarketingContactListCommStatus">
         <value xml:lang="en">Contact List Communication Status</value>
         <value xml:lang="pt_BR">Estado da comunicação com Lista de contatos</value>
+        <value xml:lang="vi">Tình trạng danh sách liên hệ truyền thông</value>
         <value xml:lang="zh">联系列表沟通状态</value>
         <value xml:lang="zh_TW">聯絡列表溝通狀態</value>
     </property>
@@ -382,6 +397,7 @@
         <value xml:lang="pt_BR">ID de lista de contatos</value>
         <value xml:lang="ro">Cod Lista Contact</value>
         <value xml:lang="th">รหัสรายการติดต่อ</value>
+        <value xml:lang="vi">Mã danh sách liên hệ</value>
         <value xml:lang="zh">联系列表标识</value>
         <value xml:lang="zh_TW">聯絡列表ID</value>
     </property>
@@ -394,6 +410,7 @@
         <value xml:lang="pt_BR">Nome da lista de contatos</value>
         <value xml:lang="ro">Nume Lista Contact</value>
         <value xml:lang="th">รายชื่อที่ติดต่อ</value>
+        <value xml:lang="vi">Tên danh sách liên hệ</value>
         <value xml:lang="zh">联系列表名称</value>
         <value xml:lang="zh_TW">聯系列表名稱</value>
     </property>
@@ -406,6 +423,7 @@
         <value xml:lang="pt_BR">ID do tipo de lista de contato</value>
         <value xml:lang="ro">Tip Lista Contact</value>
         <value xml:lang="th">รหัสประเภทรายการติดต่อ</value>
+        <value xml:lang="vi">Mã phân loại danh sách liên hệ</value>
         <value xml:lang="zh">联系列表类型标识</value>
         <value xml:lang="zh_TW">聯絡列表類型ID</value>
     </property>
@@ -430,6 +448,7 @@
         <value xml:lang="pt_BR">Criar nova lista de contatos</value>
         <value xml:lang="ro">Creare Noua Lista Contact</value>
         <value xml:lang="th">สร้างรายการติดต่อใหม่</value>
+        <value xml:lang="vi">Tạo mới danh sách liên hệ</value>
         <value xml:lang="zh">新建联系列表</value>
         <value xml:lang="zh_TW">新建聯系列表</value>
     </property>
@@ -441,6 +460,7 @@
         <value xml:lang="pt_BR">Encontrar lista de contato</value>
         <value xml:lang="ro">Cauta Liste Contact</value>
         <value xml:lang="th">ค้นหารายการติดต่อ</value>
+        <value xml:lang="vi">Tìm kiếm danh sách liên hệ</value>
         <value xml:lang="zh">查找联系列表</value>
         <value xml:lang="zh_TW">查找聯系列表</value>
     </property>
@@ -454,6 +474,7 @@
         <value xml:lang="pt_BR">É pública ?</value>
         <value xml:lang="ro">Este Public ?</value>
         <value xml:lang="th">เป็นสาธารณะ ?</value>
+        <value xml:lang="vi">Nó được phổ biến không ?</value>
         <value xml:lang="zh">公开吗?</value>
         <value xml:lang="zh_TW">公開嗎?</value>
     </property>
@@ -466,6 +487,7 @@
         <value xml:lang="pt_BR">É de uso único ?</value>
         <value xml:lang="ro">Este pentru un unic utilizatir?</value>
         <value xml:lang="th">ใช้ได้ครั้งเดียว ?</value>
+        <value xml:lang="vi">Nó được sử dụng độc lập không ?</value>
         <value xml:lang="zh">单一用途吗?</value>
         <value xml:lang="zh_TW">單一用途嗎?</value>
     </property>
@@ -477,6 +499,7 @@
         <value xml:lang="pt_BR">Não foi possível encontrar lista de e-mail [${contactListId}].</value>
         <value xml:lang="ro">Nu este posibila gasirea listei e-mail [${contactListId}].</value>
         <value xml:lang="th">ไม่สามารถค้นหารายการติดต่อ [${contactListId}]</value>
+        <value xml:lang="vi">Không tìm thấy danh sách email [${contactListId}].</value>
         <value xml:lang="zh">无法找到电子邮件列表 [${contactListId}]。</value>
         <value xml:lang="zh_TW">無法找到電子郵件列表 [${contactListId}]。</value>
     </property>
@@ -511,6 +534,7 @@
         <value xml:lang="pt_BR">ID do proprietário</value>
         <value xml:lang="ro">Cod Subiect Proprietar</value>
         <value xml:lang="th">รหัสของกลุ่มผู้ใช้</value>
+        <value xml:lang="vi">Mã đối tượng sở hữu</value>
         <value xml:lang="zh">拥有人会员标识</value>
         <value xml:lang="zh_TW">擁有者成員ID</value>
     </property>
@@ -523,6 +547,7 @@
         <value xml:lang="pt_BR">Participante de Lista de contatos</value>
         <value xml:lang="ro">Lista Contacte Subiecti</value>
         <value xml:lang="th">รายการติดต่อกลุ่มผู้ใช้</value>
+        <value xml:lang="vi">Danh sách liên hệ tới đối tượng</value>
         <value xml:lang="zh">联系列表会员</value>
         <value xml:lang="zh_TW">聯絡列表成員</value>
     </property>
@@ -535,6 +560,7 @@
         <value xml:lang="pt_BR">Criar novo participante de lista de contatos</value>
         <value xml:lang="ro">Creare Noua Lista Contact Subiect</value>
         <value xml:lang="th">สร้างรายการติดต่อกลุ่มผู้ใช้ใหม่</value>
+        <value xml:lang="vi">Tạo mới danh sách liên hệ tới đối tượng</value>
         <value xml:lang="zh">新建联系列表会员</value>
         <value xml:lang="zh_TW">新建聯絡列表成員</value>
     </property>
@@ -548,12 +574,14 @@
         <value xml:lang="pt_BR">ID de participante</value>
         <value xml:lang="ro">Cod Subiect</value>
         <value xml:lang="th">รหัสกลุ่มผู้ใช้</value>
+        <value xml:lang="vi">Mã đối tượng</value>
         <value xml:lang="zh">会员标识</value>
         <value xml:lang="zh_TW">成員ID</value>
     </property>
     <property key="MarketingContactListPartiesImport">
         <value xml:lang="en">Import Parties</value>
         <value xml:lang="th">นำเข้ากลุ่มผู้ใช้</value>
+        <value xml:lang="vi">Nhập vào các đối tượng</value>
     </property>
     <property key="MarketingContactListPreferredContactMech">
         <value xml:lang="en">Preferred Contact Mechanism</value>
@@ -577,6 +605,7 @@
         <value xml:lang="pt_BR">Verificação de e-mail de origem</value>
         <value xml:lang="ro">Verifica Email De la</value>
         <value xml:lang="th">ตรวจสอบอีเมล์จาก</value>
+        <value xml:lang="vi">Xác nhận email từ</value>
         <value xml:lang="zh">验证电子邮件来自</value>
         <value xml:lang="zh_TW">驗証電子郵件來自</value>
     </property>
@@ -590,6 +619,7 @@
         <value xml:lang="pt_BR">Tela de verificação de e-mail</value>
         <value xml:lang="ro">Verifica Email Videata</value>
         <value xml:lang="th">ตรวจสอบอีเมล์</value>
+        <value xml:lang="vi">Màn hình xác nhận email</value>
         <value xml:lang="zh">验证电子邮件屏幕</value>
         <value xml:lang="zh_TW">驗証電子郵件螢幕</value>
     </property>
@@ -661,6 +691,7 @@
         <value xml:lang="en">Email Status Report</value>
         <value xml:lang="it">Report stato e-mail</value>
         <value xml:lang="pt_BR">Relatório de estado de e-mail</value>
+        <value xml:lang="vi">Báo cáo tình trạng email</value>
     </property>
     <property key="MarketingFindAccounts">
         <value xml:lang="en">Find SFA Accounts</value>
@@ -668,6 +699,7 @@
         <value xml:lang="it">Ricerca utenze SFA</value>
         <value xml:lang="pt_BR">Encontrar contas da equipe de vendas</value>
         <value xml:lang="th">ค้นหา Account</value>
+        <value xml:lang="vi">Tìm kiếm tài khoản bán hàng</value>
         <value xml:lang="zh">查找销售管理账户</value>
         <value xml:lang="zh_TW">查找銷售管理賬戶</value>
     </property>
@@ -676,12 +708,14 @@
         <value xml:lang="fr">Rechercher des contacts</value>
         <value xml:lang="pt_BR">Encontrar contatos da equipe de vendas</value>
         <value xml:lang="th">ค้นหา Contact</value>
+        <value xml:lang="vi">Tìm kiến liên hệ bán hàng</value>
     </property>
     <property key="MarketingFindLeads">
         <value xml:lang="en">Find SFA Leads</value>
         <value xml:lang="fr">Rechercher des prospects</value>
         <value xml:lang="pt_BR">Buscar Leads da equipe de vendas</value>
         <value xml:lang="th">ค้นหา Lead</value>
+        <value xml:lang="vi">Tìm đầu mối bán hàng</value>
     </property>
     <property key="MarketingMainPage">
         <value xml:lang="de">Haupt</value>
@@ -693,6 +727,7 @@
         <value xml:lang="pt_BR">Principal</value>
         <value xml:lang="ro">Pagina Principala</value>
         <value xml:lang="th">หน้าหลัก</value>
+        <value xml:lang="vi">Trang chính</value>
         <value xml:lang="zh">首页</value>
         <value xml:lang="zh_TW">首頁</value>
     </property>
@@ -705,6 +740,7 @@
         <value xml:lang="pt_BR">Gestão de Marketing</value>
         <value xml:lang="ro">Aplicatie Gestiune Vanzare</value>
         <value xml:lang="th">โปรแกรมประยุกต์การจัดการทางการตลาด</value>
+        <value xml:lang="vi">Quản lý tiếp thị</value>
         <value xml:lang="zh">市场管理应用程序</value>
         <value xml:lang="zh_TW">行銷管理</value>
     </property>
@@ -717,6 +753,7 @@
         <value xml:lang="pt_BR">Aplicação de Gestão de Marketing</value>
         <value xml:lang="ro">Aplicatie Gestiune Vanzare</value>
         <value xml:lang="th">โปรแกรมประยุกต์การจัดการทางการตลาด</value>
+        <value xml:lang="vi">Ứng dụng quản lý tiếp thị</value>
         <value xml:lang="zh">市场管理应用程序</value>
         <value xml:lang="zh_TW">行銷管理應用程式</value>
     </property>
@@ -726,6 +763,7 @@
         <value xml:lang="it">Benvenuto nell'applicazione gestione vendite!</value>
         <value xml:lang="pt_BR">Bem-vindo à aplicação de Gestão de Marketing</value>
         <value xml:lang="th">ยินดีต้อนรับสู่การจัดการทางการตลาด</value>
+        <value xml:lang="vi">Chào mừng bạn đến với Ứng dụng quản lý tiếp thị!</value>
         <value xml:lang="zh">欢迎使用市场管理程序!</value>
         <value xml:lang="zh_TW">歡迎使用行銷管理程式!</value>
     </property>
@@ -735,6 +773,7 @@
         <value xml:lang="fr">N° des employés</value>
         <value xml:lang="it">N. di impiegati</value>
         <value xml:lang="pt_BR">Número de empregados</value>
+        <value xml:lang="vi">Không có nhân viên nào</value>
         <value xml:lang="zh">雇员数量</value>
         <value xml:lang="zh_TW">雇員數量</value>
     </property>
@@ -777,6 +816,7 @@
         <value xml:lang="en">Party Status Report</value>
         <value xml:lang="it">Report stato soggetti</value>
         <value xml:lang="pt_BR">Relatório de estado de participante</value>
+        <value xml:lang="vi">Báo cáo tình trạng đối tượng</value>
     </property>
     <property key="MarketingReports">
         <value xml:lang="de">Berichte</value>
@@ -788,6 +828,7 @@
         <value xml:lang="pt_BR">Relatórios</value>
         <value xml:lang="ro">Tiparire</value>
         <value xml:lang="th">รายงาน</value>
+        <value xml:lang="vi">Báo cáo</value>
         <value xml:lang="zh">报告</value>
         <value xml:lang="zh_TW">報告</value>
     </property>
@@ -799,6 +840,7 @@
         <value xml:lang="pt_BR">Segmento</value>
         <value xml:lang="ro">Segment</value>
         <value xml:lang="th">กลุ่ม</value>
+        <value xml:lang="vi">Phân đoạn</value>
         <value xml:lang="zh">分区</value>
         <value xml:lang="zh_TW">分區</value>
     </property>
@@ -811,6 +853,7 @@
         <value xml:lang="pt_BR">Criar grupo de classificação de segmento</value>
         <value xml:lang="ro">Creare Noua Clasificare Grup Segment</value>
         <value xml:lang="th">สร้างการจัดแบ่งประเภทของกลุ่มใหม่</value>
+        <value xml:lang="vi">Tạo mới các lớp cho nhóm phân đoạn</value>
         <value xml:lang="zh">新建分区组分类</value>
         <value xml:lang="zh_TW">新建分區組分類</value>
     </property>
@@ -823,6 +866,7 @@
         <value xml:lang="pt_BR">Criar novo grupo de segmento</value>
         <value xml:lang="ro">Creare Nou Grup Segment</value>
         <value xml:lang="th">สร้างส่วนของกลุ่มใหม่</value>
+        <value xml:lang="vi">Tạo mới các nhóm phân đoạn</value>
         <value xml:lang="zh">新建分区组</value>
         <value xml:lang="zh_TW">新建分區組</value>
     </property>
@@ -830,6 +874,7 @@
         <value xml:lang="en">Error on creation Segment Group</value>
         <value xml:lang="it">Errore durante la creazione di un nuovo gruppo segmento</value>
         <value xml:lang="pt_BR">Erro ao criar grupo de segmento</value>
+        <value xml:lang="vi">Lỗi trong việc khởi tạo nhóm phân đoạn</value>
         <value xml:lang="zh">创建分区组时出错</value>
         <value xml:lang="zh_TW">創建分區組時出錯</value>
     </property>
@@ -837,6 +882,7 @@
         <value xml:lang="en">Error on delete Segment Group</value>
         <value xml:lang="it">Errore durante la cancellazione di un gruppo segmento</value>
         <value xml:lang="pt_BR">Erro ao excluir grupo de segmento</value>
+        <value xml:lang="vi">Lỗi trong việc xóa nhóm phân đoạn</value>
         <value xml:lang="zh">删除分区组时出错</value>
         <value xml:lang="zh_TW">刪除分區組時出錯</value>
     </property>
@@ -850,6 +896,7 @@
         <value xml:lang="pt_BR">Descrição</value>
         <value xml:lang="ro">Descriere</value>
         <value xml:lang="th">รายละเอียด</value>
+        <value xml:lang="vi">Mô tả</value>
         <value xml:lang="zh">描述</value>
         <value xml:lang="zh_TW">描述</value>
     </property>
@@ -862,6 +909,7 @@
         <value xml:lang="pt_BR">Criar nova localização de grupo de segmento</value>
         <value xml:lang="ro">Creare Nou Grup Segment Geografie</value>
         <value xml:lang="th">สร้างส่วนของโครงสร้างกลุ่มใหม่</value>
+        <value xml:lang="vi">Tạo mới nhóm phân đoạn địa lý</value>
         <value xml:lang="zh">新建分区组地理</value>
         <value xml:lang="zh_TW">新建分區組地理</value>
     </property>
@@ -1031,6 +1079,7 @@
         <value xml:lang="pt_BR">Rastreio</value>
         <value xml:lang="ro">Traseu</value>
         <value xml:lang="th">การติดตาม</value>
+        <value xml:lang="vi">Truy vết</value>
         <value xml:lang="zh">跟踪</value>
         <value xml:lang="zh_TW">跟蹤</value>
     </property>
@@ -1042,6 +1091,7 @@
         <value xml:lang="pt_BR">Código para rastreio</value>
         <value xml:lang="ro">Cod Traseu</value>
         <value xml:lang="th">รหัส Tracking</value>
+        <value xml:lang="vi">Mã truy vết</value>
         <value xml:lang="zh">跟踪码</value>
         <value xml:lang="zh_TW">跟蹤碼</value>
     </property>
@@ -1236,6 +1286,7 @@
         <value xml:lang="pt_BR">Relatório de código de rastreio</value>
         <value xml:lang="ro">Tiparire Cod Traseu</value>
         <value xml:lang="th">รหัส Tracking</value>
+        <value xml:lang="vi">Báo cáo mã truy vết</value>
         <value xml:lang="zh">跟踪码报告</value>
         <value xml:lang="zh_TW">跟蹤碼報告</value>
     </property>
@@ -1247,6 +1298,7 @@
         <value xml:lang="pt_BR">ID de subgrupo</value>
         <value xml:lang="ro">Cod Sub-Grup</value>
         <value xml:lang="th">รหัสกลุ่มย่อย</value>
+        <value xml:lang="vi">Mã nhóm cấp dưới</value>
         <value xml:lang="zh">下级组标识</value>
         <value xml:lang="zh_TW">次級群組ID</value>
     </property>
@@ -1258,6 +1310,7 @@
         <value xml:lang="pt_BR">Tempo de vida</value>
         <value xml:lang="ro">Traseu Timp de Viata</value>
         <value xml:lang="th">เส้นทางที่ใช้ได้ตลอดเวลา</value>
+        <value xml:lang="vi">Tiến trình truy vết</value>
         <value xml:lang="zh">可跟踪期限</value>
         <value xml:lang="zh_TW">追蹤期限</value>
     </property>
@@ -1269,6 +1322,7 @@
         <value xml:lang="pt_BR">ID de código de rastreio</value>
         <value xml:lang="ro">Code Traseu</value>
         <value xml:lang="th">รหัส Tracking</value>
+        <value xml:lang="vi">Mã truy vết</value>
         <value xml:lang="zh">跟踪码标识</value>
         <value xml:lang="zh_TW">追蹤碼ID</value>
     </property>
@@ -1280,6 +1334,7 @@
         <value xml:lang="pt_BR">ID de tipo de código de rastreio</value>
         <value xml:lang="ro">Tip Traseu</value>
         <value xml:lang="th">รหัสประเภทรหัส Tracking</value>
+        <value xml:lang="vi">Mã phân loại truy vết</value>
         <value xml:lang="zh">跟踪码类型标识</value>
         <value xml:lang="zh_TW">追蹤碼類型ID</value>
     </property>
@@ -1291,6 +1346,7 @@
         <value xml:lang="pt_BR">Tipo de código de rastreio</value>
         <value xml:lang="ro">Tip Cod Traseu</value>
         <value xml:lang="th">ประเภทรหัส Tracking</value>
+        <value xml:lang="vi">Phân loại mã truy vết</value>
         <value xml:lang="zh">跟踪码类型</value>
         <value xml:lang="zh_TW">跟蹤碼類型</value>
     </property>
@@ -1302,6 +1358,7 @@
         <value xml:lang="pt_BR">Criar tipo de código de rastreio</value>
         <value xml:lang="ro">Creare Tip Traseu</value>
         <value xml:lang="th">สร้างประเภทรหัส Tracking</value>
+        <value xml:lang="vi">Tạo loại mã truy vết</value>
         <value xml:lang="zh">新建跟踪码类型</value>
         <value xml:lang="zh_TW">新建跟蹤碼類型</value>
     </property>
@@ -1314,6 +1371,7 @@
         <value xml:lang="pt_BR">Descrição</value>
         <value xml:lang="ro">Descriere</value>
         <value xml:lang="th">รายละเอียด</value>
+        <value xml:lang="vi">Mô tả</value>
         <value xml:lang="zh">描述</value>
         <value xml:lang="zh_TW">描述</value>
     </property>
@@ -1586,6 +1644,7 @@
         <value xml:lang="fr">Créer un prospect depuis une vCard</value>
         <value xml:lang="it">Creare lead dalla vCard</value>
         <value xml:lang="pt_BR">Criar novo Lead a partir do vCard</value>
+        <value xml:lang="vi">Tạo đầu mối từ vCard</value>
         <value xml:lang="zh">从vCard新建线索</value>
         <value xml:lang="zh_TW">從vCard新建線索</value>
     </property>
@@ -1595,6 +1654,7 @@
         <value xml:lang="fr">Modifier le compte</value>
         <value xml:lang="it">Aggiornare utente</value>
         <value xml:lang="pt_BR">Editar conta</value>
+        <value xml:lang="vi">Chỉnh sửa tài khoản</value>
         <value xml:lang="zh">编辑账户</value>
         <value xml:lang="zh_TW">編輯賬戶</value>
     </property>
@@ -2102,6 +2162,7 @@
         <value xml:lang="fr">Comptes</value>
         <value xml:lang="it">Utenze</value>
         <value xml:lang="pt_BR">Contas</value>
+        <value xml:lang="vi">Tài khoản</value>
         <value xml:lang="zh">账户</value>
         <value xml:lang="zh_TW">賬戶</value>
     </property>
@@ -2130,6 +2191,7 @@
         <value xml:lang="fr">Tous les comptes</value>
         <value xml:lang="pt_BR">Todas contas</value>
         <value xml:lang="th">Account ทั้งหมด</value>
+        <value xml:lang="vi">Toàn bộ tài khoản</value>
     </property>
     <property key="SfaAllContacts">
         <value xml:lang="de">Alle Kontakte</value>
@@ -2137,12 +2199,14 @@
         <value xml:lang="fr">Tous les contacts</value>
         <value xml:lang="pt_BR">Todos contatos</value>
         <value xml:lang="th">Contact ทั้งหมด</value>
+        <value xml:lang="vi">Toàn bộ liên hệ</value>
     </property>
     <property key="SfaAllLeads">
         <value xml:lang="en">All Leads</value>
         <value xml:lang="fr">Tous les prospects</value>
         <value xml:lang="pt_BR">Todos Leads</value>
         <value xml:lang="th">Lead ทั้งหมด</value>
+        <value xml:lang="vi">Toàn bộ đầu mối</value>
     </property>
     <property key="SfaAssignToMe">
         <value xml:lang="de">Zugewiesen an mich</value>
@@ -2150,6 +2214,7 @@
         <value xml:lang="fr">Me l'assigner</value>
         <value xml:lang="pt_BR">Designar para mim</value>
         <value xml:lang="th">กำหนดให้ฉัน</value>
+        <value xml:lang="vi">Phân quyền cho tôi</value>
     </property>
     <property key="SfaAssignedBy">
         <value xml:lang="de">Zugewiesen von</value>
@@ -2157,6 +2222,7 @@
         <value xml:lang="fr">Assigné par</value>
         <value xml:lang="pt_BR">Designada por</value>
         <value xml:lang="th">กำหนดโดย</value>
+        <value xml:lang="vi">Phân quyền bởi</value>
     </property>
     <property key="SfaAutoCreateContactByImportingVCard">
         <value xml:lang="de">Automatisches Erstellen eines neuen Kontaktes bei dem Import einer vCard</value>
@@ -2228,6 +2294,7 @@
         <value xml:lang="fr">OFBiz: gestion des ventes</value>
         <value xml:lang="it">OFBiz: Gestione forze di vendita</value>
         <value xml:lang="pt_BR">OFBiz: gestor da equipe de vendas</value>
+        <value xml:lang="vi">OFBiz: Quản lý bán hàng</value>
         <value xml:lang="zh">OFBiz: 销售管理程序</value>
         <value xml:lang="zh_TW">OFBiz: 銷售管理程式</value>
     </property>
@@ -2236,6 +2303,7 @@
         <value xml:lang="fr">Concurrents &amp; Associés</value>
         <value xml:lang="it">Competitori e soci</value>
         <value xml:lang="pt_BR">Concorrentes &amp; Parceiros</value>
+        <value xml:lang="vi">Đối tác</value>
         <value xml:lang="zh">竞争者和合作伙伴</value>
         <value xml:lang="zh_TW">競爭者和合作伙伴</value>
     </property>
@@ -2244,6 +2312,7 @@
         <value xml:lang="en">Complete</value>
         <value xml:lang="pt_BR">Completo</value>
         <value xml:lang="th">เสร็จสิ้น</value>
+        <value xml:lang="vi">Hoàn thành</value>
     </property>
     <property key="SfaContact">
         <value xml:lang="de">Kontakt</value>
@@ -2251,6 +2320,7 @@
         <value xml:lang="fr">Contact</value>
         <value xml:lang="it">Contatto</value>
         <value xml:lang="pt_BR">Contato</value>
+        <value xml:lang="vi">Liên hệ</value>
         <value xml:lang="zh">联系</value>
         <value xml:lang="zh_TW">聯系</value>
     </property>
@@ -2259,6 +2329,7 @@
         <value xml:lang="fr">Contacts</value>
         <value xml:lang="it">Contatti</value>
         <value xml:lang="pt_BR">Contatos</value>
+        <value xml:lang="vi">Liên hệ</value>
         <value xml:lang="zh">联系</value>
         <value xml:lang="zh_TW">聯系</value>
     </property>
@@ -2268,6 +2339,7 @@
         <value xml:lang="fr">Convertir le prospect</value>
         <value xml:lang="it">Converti lead</value>
         <value xml:lang="pt_BR">Concretizar Lead</value>
+        <value xml:lang="vi">Chuyển đổi đầu mối</value>
         <value xml:lang="zh">转化线索</value>
         <value xml:lang="zh_TW">轉化線索</value>
     </property>
@@ -2312,6 +2384,7 @@
         <value xml:lang="fr">Documents</value>
         <value xml:lang="it">Documenti</value>
         <value xml:lang="pt_BR">Documentos</value>
+        <value xml:lang="vi">Tài liệu</value>
         <value xml:lang="zh">文档</value>
         <value xml:lang="zh_TW">文檔</value>
     </property>
@@ -2345,6 +2418,7 @@
         <value xml:lang="fr">Évènements</value>
         <value xml:lang="it">Eventi</value>
         <value xml:lang="pt_BR">Eventos</value>
+        <value xml:lang="vi">Sự kiện</value>
         <value xml:lang="zh">事件</value>
         <value xml:lang="zh_TW">事件</value>
     </property>
@@ -2364,12 +2438,14 @@
         <value xml:lang="en">Find Account Leads</value>
         <value xml:lang="pt_BR">Buscar contas de Leads</value>
         <value xml:lang="th">ค้นหา Account Leads</value>
+        <value xml:lang="vi">Tìm kiếm tài khoản đầu mối</value>
     </property>
     <property key="SfaFindAccounts">
         <value xml:lang="de">Finde Konten</value>
         <value xml:lang="en">Find Accounts</value>
         <value xml:lang="pt_BR">Buscar contas</value>
         <value xml:lang="th">ค้นหา Accounts</value>
+        <value xml:lang="vi">Tìm kiếm tài khoản</value>
     </property>
     <property key="SfaFindContacts">
         <value xml:lang="de">Finde Kontakte</value>
@@ -2377,6 +2453,7 @@
         <value xml:lang="fr">Rechercher les contacts</value>
         <value xml:lang="it">Ricerca contatti</value>
         <value xml:lang="pt_BR">Buscar contatos</value>
+        <value xml:lang="vi">Tìm kiếm liên hệ</value>
         <value xml:lang="zh">查找联系</value>
         <value xml:lang="zh_TW">查找聯系</value>
     </property>
@@ -2386,6 +2463,7 @@
         <value xml:lang="fr">Recherchers les prospects</value>
         <value xml:lang="it">Ricerca leads</value>
         <value xml:lang="pt_BR">Buscar Leads</value>
+        <value xml:lang="vi">Tìm kiếm đầu mối</value>
         <value xml:lang="zh">查找线索</value>
         <value xml:lang="zh_TW">查找線索</value>
     </property>
@@ -2395,6 +2473,7 @@
         <value xml:lang="fr">Rechercher les opportunités</value>
         <value xml:lang="it">Ricerca opportunità</value>
         <value xml:lang="pt_BR">Buscar oportunidades</value>
+        <value xml:lang="vi">Tìm kiếm cơ hội</value>
         <value xml:lang="zh">查找机会</value>
         <value xml:lang="zh_TW">查找機會</value>
     </property>
@@ -2405,6 +2484,7 @@
         <value xml:lang="fr">Rechercher les résultats</value>
         <value xml:lang="it">Ricerca risultati</value>
         <value xml:lang="pt_BR">Buscar resultados</value>
+        <value xml:lang="vi">Tìm kiếm kết quả</value>
         <value xml:lang="zh">查找结果</value>
         <value xml:lang="zh_TW">查找結果</value>
     </property>
@@ -2429,6 +2509,7 @@
         <value xml:lang="fr">Prévision</value>
         <value xml:lang="it">Previsioni</value>
         <value xml:lang="pt_BR">Previsão</value>
+        <value xml:lang="vi">Dự báo</value>
         <value xml:lang="zh">预测</value>
         <value xml:lang="zh_TW">預測</value>
     </property>
@@ -2482,6 +2563,7 @@
         <value xml:lang="fr">Prospects</value>
         <value xml:lang="it">Leads</value>
         <value xml:lang="pt_BR">Leads</value>
+        <value xml:lang="vi">Đầu mối</value>
         <value xml:lang="zh">线索</value>
         <value xml:lang="zh_TW">線索</value>
     </property>
@@ -2498,6 +2580,7 @@
         <value xml:lang="fr">Application de gestion des ventes</value>
         <value xml:lang="it">Gestione vendite</value>
         <value xml:lang="pt_BR">Gestor de automação de equipe de vendas</value>
+        <value xml:lang="vi">Quản lý bán hàng</value>
         <value xml:lang="zh">销售管理应用程序</value>
         <value xml:lang="zh_TW">銷售管理應用程式</value>
     </property>
@@ -2532,6 +2615,7 @@
         <value xml:lang="fr">Fusionner les prospects</value>
         <value xml:lang="it">Merge Leads</value>
         <value xml:lang="pt_BR">Mesclar Leads</value>
+        <value xml:lang="vi">Ghép trộn các đầu mối</value>
         <value xml:lang="zh">合并线索</value>
         <value xml:lang="zh_TW">合並線索</value>
     </property>
@@ -2563,6 +2647,7 @@
         <value xml:lang="fr">Mes prospects</value>
         <value xml:lang="pt_BR">Meus Leads</value>
         <value xml:lang="th">Lead ของฉัน</value>
+        <value xml:lang="vi">Đầu mối của tôi</value>
     </property>
     <property key="SfaNewSalesForecast">
         <value xml:lang="de">Neue Verkaufsprognose</value>
@@ -2599,6 +2684,7 @@
         <value xml:lang="fr">Opportunités</value>
         <value xml:lang="it">Opportunità</value>
         <value xml:lang="pt_BR">Oportunidades</value>
+        <value xml:lang="vi">Cơ hội</value>
         <value xml:lang="zh">机会</value>
         <value xml:lang="zh_TW">機會</value>
     </property>
@@ -2652,6 +2738,7 @@
         <value xml:lang="fr">Ajout rapide d'un contact</value>
         <value xml:lang="it">Aggiunta veloce contatto</value>
         <value xml:lang="pt_BR">Adição rápida de contato</value>
+        <value xml:lang="vi">Thêm nhanh Liên hệ</value>
         <value xml:lang="zh">快速添加联系</value>
         <value xml:lang="zh_TW">快速添加聯系</value>
     </property>
@@ -2660,6 +2747,7 @@
         <value xml:lang="fr">Ajout rapide d'un prospect</value>
         <value xml:lang="it">Aggiunta veloce lead</value>
         <value xml:lang="pt_BR">Adição rápida de Lead</value>
+        <value xml:lang="vi">Thêm nhanh Đầu mối</value>
         <value xml:lang="zh">快速添加线索</value>
         <value xml:lang="zh_TW">快速添加線索</value>
     </property>
@@ -2669,6 +2757,7 @@
         <value xml:lang="fr">Prévision de ventes</value>
         <value xml:lang="it">Previsioni di vendita</value>
         <value xml:lang="pt_BR">Previsão de vendas</value>
+        <value xml:lang="vi">Dự đoán bán hàng</value>
         <value xml:lang="zh">销售预测</value>
         <value xml:lang="zh_TW">銷售預測</value>
     </property>
@@ -2677,6 +2766,7 @@
         <value xml:lang="fr">Deuxième contact</value>
         <value xml:lang="it">Secondo contatto</value>
         <value xml:lang="pt_BR">Segundo contato</value>
+        <value xml:lang="vi">Liên hệ thứ 2</value>
         <value xml:lang="zh">第二联系方式</value>
         <value xml:lang="zh_TW">第二聯系方式</value>
     </property>
diff --git a/applications/marketing/script/org/ofbiz/marketing/campaign/CampaignServices.xml b/applications/marketing/script/org/ofbiz/marketing/campaign/CampaignServices.xml
index 4ca0009..bb38fd4 100644
--- a/applications/marketing/script/org/ofbiz/marketing/campaign/CampaignServices.xml
+++ b/applications/marketing/script/org/ofbiz/marketing/campaign/CampaignServices.xml
@@ -55,7 +55,7 @@
             <fail-property resource="MarketingUiLabels.xml" property="MarketingDeletePermissionError"/>
         </check-permission>
         <check-errors/>
-
+        <!-- FIXME: This does not work due to related entities -->
         <make-value entity-name="MarketingCampaign" value-field="lookupPKMap"/>
         <set-pk-fields map="parameters" value-field="lookupPKMap"/>
         <find-by-primary-key entity-name="MarketingCampaign" map="lookupPKMap" value-field="lookedUpValue"/>
@@ -113,87 +113,36 @@
     </simple-method>
 
     <!-- MarketingCampaignRole methods -->
-    <simple-method method-name="addRoleToMarketingCampaign" short-description="Add Role To MarketingCampaign">
-        <check-permission permission="MARKETING" action="_CREATE">
-            <fail-property resource="MarketingUiLabels.xml" property="MarketingCreatePermissionError"/>
-        </check-permission>
-        <check-errors/>
-
-        <make-value entity-name="MarketingCampaignRole" value-field="newEntity"/>
-        <!-- no non-pk fields in this entity, but there may be later... <set-nonpk-fields map="parameters" value-field="newEntity"/> -->
-        <set-pk-fields map="parameters" value-field="newEntity"/>
-
-        <create-value value-field="newEntity"/>
-    </simple-method>
-    <simple-method method-name="removeRoleFromMarketingCampaign" short-description="Remove Role from MarketingCampaign">
-        <check-permission permission="MARKETING" action="_DELETE">
-            <fail-property resource="MarketingUiLabels.xml" property="MarketingDeletePermissionError"/>
-        </check-permission>
-        <check-errors/>
-
-        <make-value entity-name="MarketingCampaignRole" value-field="lookupPKMap"/>
-        <set-pk-fields map="parameters" value-field="lookupPKMap"/>
-        <find-by-primary-key entity-name="MarketingCampaignRole" map="lookupPKMap" value-field="lookedUpValue"/>
-        <remove-value value-field="lookedUpValue"/>
-    </simple-method>
     <simple-method method-name="createMarketingCampaignRole" short-description="Add Role To MarketingCampaign">
         <!-- allow if userLogin.partyId = parameters.partyId or has permission -->
         <if>
             <condition>
                 <and>
-                    <if-compare-field field="userLogin.partyId" to-field="parameters.partyId" operator="not-equals"/>
-                    <not><if-has-permission permission="MARKETING" action="_CREATE"/></not>
+                    <if-compare-field field="userLogin.partyId" to-field="parameters.partyId" operator="not-equals" />
+                    <not><if-has-permission permission="MARKETING" action="_CREATE" /></not>
                 </and>
             </condition>
             <then>
                 <add-error>
-                    <fail-property resource="MarketingUiLabels.xml" property="MarketingCreatePermissionError"/>
+                    <fail-property resource="MarketingUiLabels.xml" property="MarketingCreatePermissionError" />
                 </add-error>
             </then>
         </if>
-
-        <entity-one entity-name="MarketingCampaign" value-field="marketingCampaign"/>
-
-        <!-- okay, now check for all errors -->
-        <check-errors/>
-
-
-        <make-value entity-name="MarketingCampaignRole" value-field="newEntity"/>
-        <set-nonpk-fields map="parameters" value-field="newEntity"/>
-        <set-pk-fields map="parameters" value-field="newEntity"/>
-        <create-value value-field="newEntity"/>
-
+        <entity-one entity-name="MarketingCampaignRole" value-field="marketingCampaignRole" />
+        <if-empty field="marketingCampaignRole">
+            <make-value entity-name="MarketingCampaignRole" value-field="marketingCampaignRole" map="parameters" />
+            <create-value value-field="marketingCampaignRole" />
+            <check-errors />
+        </if-empty>
     </simple-method>
-    <simple-method method-name="updateMarketingCampaignRole" short-description="Update Add Role To MarketingCampaign">
-        <!-- allow if userLogin.partyId = parameters.partyId or has permission -->
-        <if>
-            <condition>
-                <and>
-                    <if-compare-field field="userLogin.partyId" to-field="parameters.partyId" operator="not-equals"/>
-                    <not><if-has-permission permission="MARKETING" action="_UPDATE"/></not>
-                </and>
-            </condition>
-            <then>
-                <add-error>
-                    <fail-property resource="MarketingUiLabels.xml" property="MarketingUpdatePermissionError"/>
-                </add-error>
-            </then>
-        </if>
-        <check-errors/>
 
-        <entity-one entity-name="MarketingCampaign" value-field="marketingCampaign"/>
-
-        <entity-one entity-name="MarketingCampaignRole" value-field="lookedUpValue"/>
-        <set-nonpk-fields map="parameters" value-field="lookedUpValue"/>
-        <store-value value-field="lookedUpValue"/>
-    </simple-method>
     <simple-method method-name="deleteMarketingCampaignRole" short-description="Remove Role from MarketingCampaign">
         <check-permission permission="MARKETING" action="_DELETE">
             <fail-property resource="MarketingUiLabels.xml" property="MarketingDeletePermissionError"/>
         </check-permission>
         <check-errors/>
-
         <entity-one entity-name="MarketingCampaignRole" value-field="lookedUpValue"/>
         <remove-value value-field="lookedUpValue"/>
     </simple-method>
+
 </simple-methods>
diff --git a/applications/marketing/servicedef/services.xml b/applications/marketing/servicedef/services.xml
index 3161057..1d5dff4 100644
--- a/applications/marketing/servicedef/services.xml
+++ b/applications/marketing/servicedef/services.xml
@@ -98,28 +98,12 @@
     </service>
 
     <!-- MarketingCampaignRole Services -->
-    <service name="addRoleToMarketingCampaign" default-entity-name="MarketingCampaignRole" engine="simple"
-            location="component://marketing/script/org/ofbiz/marketing/campaign/CampaignServices.xml" invoke="addRoleToMarketingCampaign" auth="true">
-        <description>Add Role to MarketingCampaign</description>
-        <auto-attributes include="pk" mode="IN" optional="false"/>
-    </service>
-    <service name="removeRoleFromMarketingCampaign" default-entity-name="MarketingCampaignRole" engine="simple"
-            location="component://marketing/script/org/ofbiz/marketing/campaign/CampaignServices.xml" invoke="removeRoleFromMarketingCampaign" auth="true">
-        <description>Remove Role from MarketingCampaign</description>
-        <auto-attributes include="pk" mode="IN" optional="false"/>
-    </service>
     <service name="createMarketingCampaignRole" default-entity-name="MarketingCampaignRole" engine="simple"
             location="component://marketing/script/org/ofbiz/marketing/campaign/CampaignServices.xml" invoke="createMarketingCampaignRole" auth="true">
         <description>Add Role to Campaign</description>
         <auto-attributes include="pk" mode="IN" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
     </service>
-    <service name="updateMarketingCampaignRole" default-entity-name="MarketingCampaignRole" engine="simple"
-            location="component://marketing/script/org/ofbiz/marketing/campaign/CampaignServices.xml" invoke="updateMarketingCampaignRole" auth="true">
-        <description>Update Role to Campaign Join</description>
-        <auto-attributes include="pk" mode="IN" optional="false"/>
-        <auto-attributes include="nonpk" mode="IN" optional="true"/>
-    </service>
     <service name="deleteMarketingCampaignRole" default-entity-name="MarketingCampaignRole" engine="simple"
             location="component://marketing/script/org/ofbiz/marketing/campaign/CampaignServices.xml" invoke="deleteMarketingCampaignRole" auth="true">
         <description>Remove Role from Campaign</description>
diff --git a/applications/marketing/src/org/ofbiz/marketing/marketing/MarketingServices.java b/applications/marketing/src/org/ofbiz/marketing/marketing/MarketingServices.java
index 4498d71..f5e4dd1 100644
--- a/applications/marketing/src/org/ofbiz/marketing/marketing/MarketingServices.java
+++ b/applications/marketing/src/org/ofbiz/marketing/marketing/MarketingServices.java
@@ -108,11 +108,11 @@
             }
         } catch (GenericEntityException e) {
             String error = UtilProperties.getMessage(resourceOrder, "checkhelper.problems_reading_database", locale);
-            Debug.log(e, error + e.getMessage(), module);
+            Debug.logInfo(e, error + e.getMessage(), module);
             return ServiceUtil.returnError(error);
         } catch (GenericServiceException e) {
             String error = UtilProperties.getMessage(resourceMarketing, "MarketingServiceError", locale);
-            Debug.log(e, error + e.getMessage(), module);
+            Debug.logInfo(e, error + e.getMessage(), module);
             return ServiceUtil.returnError(error);
         }
         return ServiceUtil.returnSuccess();
diff --git a/applications/marketing/src/org/ofbiz/marketing/tracking/TrackingCodeEvents.java b/applications/marketing/src/org/ofbiz/marketing/tracking/TrackingCodeEvents.java
index b1b21f3..b456a9d 100644
--- a/applications/marketing/src/org/ofbiz/marketing/tracking/TrackingCodeEvents.java
+++ b/applications/marketing/src/org/ofbiz/marketing/tracking/TrackingCodeEvents.java
@@ -38,6 +38,7 @@
 import org.ofbiz.entity.Delegator;
 import org.ofbiz.entity.GenericEntityException;
 import org.ofbiz.entity.GenericValue;
+import org.ofbiz.entity.util.EntityUtilProperties;
 import org.ofbiz.product.category.CategoryWorker;
 
 /**
@@ -108,7 +109,7 @@
 
                 String dtc = request.getParameter("dtc");
                 if (UtilValidate.isEmpty(dtc)) {
-                    dtc = UtilProperties.getPropertyValue("general", "partner.trackingCodeId.default");
+                    dtc = EntityUtilProperties.getPropertyValue("general", "partner.trackingCodeId.default", delegator);
                 }
                 if (UtilValidate.isNotEmpty(dtc)) {
                     GenericValue defaultTrackingCode = null;
diff --git a/applications/marketing/webapp/marketing/WEB-INF/controller.xml b/applications/marketing/webapp/marketing/WEB-INF/controller.xml
index c03acb2..81a8c3c 100644
--- a/applications/marketing/webapp/marketing/WEB-INF/controller.xml
+++ b/applications/marketing/webapp/marketing/WEB-INF/controller.xml
@@ -155,16 +155,6 @@
         <security https="true" auth="true"/>
         <response name="success" type="view" value="EditMarketingCampaignRoles"/>
     </request-map>
-    <request-map uri="addRoleToMarketingCampaign"><security https="true" auth="true"/>
-        <event type="service" path="" invoke="addRoleToMarketingCampaign"/>
-        <response name="success" type="view" value="EditMarketingCampaignRoles"/>
-        <response name="error" type="view" value="EditMarketingCampaignRoles"/>
-    </request-map>
-    <request-map uri="removeRoleFromMarketingCampaign"><security https="true" auth="true"/>
-        <event type="service" path="" invoke="removeRoleFromMarketingCampaign"/>
-        <response name="success" type="view" value="EditMarketingCampaignRoles"/>
-        <response name="error" type="view" value="EditMarketingCampaignRoles"/>
-    </request-map>
     <request-map uri="ListMarketingCampaignRoles">
         <security https="true" auth="true"/>
         <response name="success" type="view" value="ListMarketingCampaignRoles"/>
@@ -172,13 +162,7 @@
     <request-map uri="createMarketingCampaignRole">
         <security https="true" auth="true"/>
         <event type="service" invoke="createMarketingCampaignRole"/>
-        <response name="success" type="view" value="EditMarketingCampaignRoles"/>
-        <response name="error" type="view" value="EditMarketingCampaignRoles"/>
-    </request-map>
-    <request-map uri="updateMarketingCampaignRole">
-        <security https="true" auth="true"/>
-        <event type="service" invoke="updateMarketingCampaignRole"/>
-        <response name="success" type="view" value="EditMarketingCampaignRoles"/>
+        <response name="success" type="view" value="ListMarketingCampaignRoles"/>
         <response name="error" type="view" value="EditMarketingCampaignRoles"/>
     </request-map>
     <request-map uri="removeMarketingCampaignRole">
diff --git a/applications/marketing/widget/MarketingCampaignForms.xml b/applications/marketing/widget/MarketingCampaignForms.xml
index 6ee763b..0bacdfe 100644
--- a/applications/marketing/widget/MarketingCampaignForms.xml
+++ b/applications/marketing/widget/MarketingCampaignForms.xml
@@ -20,18 +20,16 @@
 
 <forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-form.xsd">
-     <form name="EditMarketingCampaign" type="single" target="updateMarketingCampaign" title="" default-map-name="marketingCampaign"
-        header-row-style="header-row" default-table-style="basic-table">
+
+     <form name="EditMarketingCampaign" type="single" target="updateMarketingCampaign" title="" default-map-name="marketingCampaign">
         <actions>
             <property-to-field field="defaultCurrencyUomId" resource="general" property="currency.uom.id.default" default="USD"/>
         </actions>
         <alt-target use-when="marketingCampaign==null" target="createMarketingCampaign"/>
         <auto-fields-entity entity-name="MarketingCampaign"/>
-
         <field use-when="marketingCampaign!=null" name="marketingCampaignId" title="${uiLabelMap.MarketingCampaignId}" tooltip="${uiLabelMap.CommonNotModifRecreat}"><display/></field>
         <field use-when="marketingCampaign==null&amp;&amp;marketingCampaignId==null" name="marketingCampaignId" title="${uiLabelMap.MarketingCampaignId}"><ignored/></field>
         <field use-when="marketingCampaign==null&amp;&amp;marketingCampaignId!=null" name="marketingCampaignId" title="${uiLabelMap.MarketingCampaignId}" tooltip="${uiLabelMap.CommonCannotBeFound}: [${marketingCampaignId}]"><display/></field>
-
         <field name="parentCampaignId" title="${uiLabelMap.MarketingParentCampaignId}">
             <drop-down allow-empty="true">
                 <entity-options description="${campaignName}" entity-name="MarketingCampaign" key-field-name="marketingCampaignId">
@@ -61,13 +59,12 @@
         <field name="DONE_PAGE">
             <hidden value="${donePage}"/>
         </field>
-
         <field name="submitButton" title="${uiLabelMap.CommonSave}" widget-style="buttontext"><submit button-type="text-link"/></field>
-        <field name="cancelLink" widget-style="buttontext" title="${uiLabelMap.CommonCancel}"><hyperlink target="${donePage}" also-hidden="false" description="${uiLabelMap.CommonCancelDone}" target-type="inter-app"/></field>
+        <field name="cancelLink" widget-style="buttontext" title="${uiLabelMap.CommonEmptyHeader}"><hyperlink target="${donePage}" also-hidden="false" description="${uiLabelMap.CommonCancelDone}" target-type="inter-app"/></field>
     </form>
 
-   <form name="ListMarketingCampaign" list-name="" target="" title="" type="list" paginate-target="listMarketingCampaign"
-        odd-row-style="alternate-row" default-table-style="basic-table hover-bar">
+   <form name="ListMarketingCampaign" type="list" paginate-target="listMarketingCampaign"
+        odd-row-style="alternate-row" header-row-style="header-row-2" default-table-style="basic-table hover-bar">
         <actions>
             <entity-condition entity-name="MarketingCampaign"/>
         </actions>
@@ -77,18 +74,14 @@
             </hyperlink>
         </field>
         <field name="campaignName" title="${uiLabelMap.MarketingCampaignName}"><display/></field>
-        <field name="parentCampaignId" title="${uiLabelMap.MarketingParentCampaignId}">
-            <display/>
+        <field name="statusId" title="${uiLabelMap.CommonStatus}">
+            <display-entity entity-name="StatusItem" description="${description}" also-hidden="true"/>
         </field>
-        <field name="deleteLink" title=" " widget-style="buttontext">
-            <hyperlink target="removeMarketingCampaign" description="${uiLabelMap.CommonDelete}" also-hidden="false">
-                <parameter param-name="marketingCampaignId"/>
-            </hyperlink>
-        </field>
+        <field name="parentCampaignId" title="${uiLabelMap.MarketingParentCampaignId}"><display/></field>
     </form>
 
-   <form name="ListMarketingCampaignRoles" list-name="" target="" title="" type="list" paginate-target="listMarketingCampaignGeo"
-        odd-row-style="alternate-row" default-table-style="basic-table hover-bar">
+   <form name="ListMarketingCampaignRoles" type="list" paginate-target="listMarketingCampaignGeo"
+        odd-row-style="alternate-row" header-row-style="header-row-2" default-table-style="basic-table hover-bar">
         <actions>
         <entity-and entity-name="MarketingCampaignRole">
             <field-map field-name="marketingCampaignId" from-field="marketingCampaignId"/>
@@ -120,13 +113,6 @@
                 </sub-hyperlink>
             </display-entity>-->
         </field>
-        <field name="editLink" title=" " widget-style="buttontext">
-            <hyperlink target="EditMarketingCampaignRoles" description="${uiLabelMap.CommonEdit}" also-hidden="false">
-                <parameter param-name="marketingCampaignId"/>
-                <parameter param-name="roleTypeId"/>
-                <parameter param-name="partyId"/>
-            </hyperlink>
-        </field>
         <field name="deleteLink" title=" " widget-style="buttontext">
             <hyperlink target="removeMarketingCampaignRole" description="${uiLabelMap.CommonDelete}" also-hidden="false">
                 <parameter param-name="marketingCampaignId"/>
@@ -136,15 +122,12 @@
         </field>
     </form>
 
-    <form name="EditMarketingCampaignRoles" type="single" target="updateMarketingCampaignRole" title="" default-map-name="marketingCampaignRole"
+    <form name="EditMarketingCampaignRoles" type="single" target="createMarketingCampaignRole" title="" default-map-name="marketingCampaignRole"
         header-row-style="header-row" default-table-style="basic-table">
-        <alt-target use-when="marketingCampaignRole==null" target="createMarketingCampaignRole"/>
-        <auto-fields-service service-name="updateMarketingCampaignRole"/>
-
+        <auto-fields-service service-name="createMarketingCampaignRole"/>
         <field use-when="marketingCampaign!=null" name="marketingCampaignId" title="${uiLabelMap.MarketingCampaignId}" tooltip="${uiLabelMap.CommonNotModifRecreat}"><display/></field>
         <field use-when="marketingCampaign==null&amp;&amp;marketingCampaignId==null" name="marketingCampaignId" title="${uiLabelMap.MarketingCampaignId}"><ignored/></field>
         <field use-when="marketingCampaign==null&amp;&amp;marketingCampaignId!=null" name="marketingCampaignId" title="${uiLabelMap.MarketingCampaignId}" tooltip="${uiLabelMap.CommonCannotBeFound}: [${marketingCampaignId}]"><display/></field>
-
         <field name="partyId" title="${uiLabelMap.PartyPartyId}">
             <lookup target-form-name="LookupPartyName"/>
         </field>
@@ -155,7 +138,7 @@
             </drop-down>
         </field>
         <field name="submitButton" title="${uiLabelMap.CommonSave}" widget-style="buttontext"><submit button-type="text-link"/></field>
-        <field name="cancelLink" widget-style="buttontext" title="${uiLabelMap.CommonCancel}">
+        <field name="cancelLink" widget-style="buttontext" title="${uiLabelMap.CommonEmptyHeader}">
             <hyperlink target="${donePage}" also-hidden="false" description="${uiLabelMap.CommonCancelDone}">
                 <parameter param-name="marketingCampaignId"/>
             </hyperlink>
diff --git a/applications/marketing/widget/MarketingCampaignScreens.xml b/applications/marketing/widget/MarketingCampaignScreens.xml
index 1e4e9da..4bbcc42 100644
--- a/applications/marketing/widget/MarketingCampaignScreens.xml
+++ b/applications/marketing/widget/MarketingCampaignScreens.xml
@@ -20,6 +20,7 @@
 
 <screens xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-screen.xsd">
+
    <screen name="CommonMarketingCampaignDecorator">
         <section>
             <actions>
@@ -63,130 +64,126 @@
         </section>
     </screen>
 
-   <screen name="EditMarketingCampaign">
+    <screen name="EditMarketingCampaign">
         <section>
             <actions>
-                <property-map resource="OrderUiLabels" map-name="uiLabelMap"/>
-                <set field="titleProperty" value="PageTitleEditMarketingCampaign"/>
-                <set field="campaignTabButtonItem" value="MarketingCampaign"/>
-                <set field="labelTitleProperty" value="PageTitleEditMarketingCampaign"/>
-
-                <set field="donePage" from-field="parameters.DONE_PAGE" default-value="FindMarketingCampaign"/>
-                <set field="marketingCampaignId" from-field="parameters.marketingCampaignId"/>
-                <entity-one entity-name="MarketingCampaign" value-field="marketingCampaign"/>
+                <property-map resource="OrderUiLabels" map-name="uiLabelMap" />
+                <set field="titleProperty" value="PageTitleEditMarketingCampaign" />
+                <set field="campaignTabButtonItem" value="MarketingCampaign" />
+                <set field="labelTitleProperty" value="PageTitleEditMarketingCampaign" />
+                <set field="donePage" from-field="parameters.DONE_PAGE" default-value="FindMarketingCampaign" />
+                <set field="marketingCampaignId" from-field="parameters.marketingCampaignId" />
+                <entity-one entity-name="MarketingCampaign" value-field="marketingCampaign" />
             </actions>
             <widgets>
                 <decorator-screen name="CommonMarketingCampaignDecorator">
                     <decorator-section name="body">
+                        <container style="page-title">
+                            <label text="${uiLabelMap[titleProperty]}" />
+                        </container>
                         <section>
                             <condition>
-                                <not><if-empty field="marketingCampaign"/></not>
+                                <not><if-empty field="marketingCampaign" /></not>
                             </condition>
                             <widgets>
-                                <screenlet title="${uiLabelMap.PageTitleEditMarketingCampaign}">
-                                    <container style="button-bar">
-                                        <link  text="${uiLabelMap.MarketingCampaignCreate}" target="EditMarketingCampaign" style="buttontext create">
-                                            <parameter param-name="DONE_PAGE" from-field="donePage"/>
-                                        </link>
-                                    </container>
-                                    <include-form name="EditMarketingCampaign" location="component://marketing/widget/MarketingCampaignForms.xml"/>
-                                </screenlet>
+                                <container style="button-bar button-style-1">
+                                    <link text="${uiLabelMap.MarketingCampaignCreate}" target="EditMarketingCampaign" style="create">
+                                        <parameter param-name="DONE_PAGE" from-field="donePage" />
+                                    </link>
+                                </container>
                             </widgets>
-                            <fail-widgets>
-                                <screenlet title="${uiLabelMap.PageTitleAddMarketingCampaign}">
-                                    <include-form name="EditMarketingCampaign" location="component://marketing/widget/MarketingCampaignForms.xml"/>
-                                </screenlet>
-                            </fail-widgets>
                         </section>
+                        <include-form name="EditMarketingCampaign" location="component://marketing/widget/MarketingCampaignForms.xml" />
                     </decorator-section>
                 </decorator-screen>
             </widgets>
         </section>
     </screen>
 
-   <screen name="ListMarketingCampaign">
+    <screen name="ListMarketingCampaign">
         <section>
             <actions>
-                <set field="titleProperty" value="PageTitleListMarketingCampaign"/>
-                <set field="labelTitleProperty" value="PageTitleListMarketingCampaign"/>
-
-                <set field="donePage" from-field="parameters.DONE_PAGE" default-value="FindListMarketingCampaign"/>
-                <set field="marketingCampaignId" from-field="parameters.marketingCampaignId"/>
-                <set field="entityName" value="MarketingCampaign"/>
+                <set field="titleProperty" value="PageTitleListMarketingCampaign" />
+                <set field="labelTitleProperty" value="PageTitleListMarketingCampaign" />
+                <set field="donePage" from-field="parameters.DONE_PAGE" default-value="FindMarketingCampaign" />
+                <set field="marketingCampaignId" from-field="parameters.marketingCampaignId" />
+                <set field="entityName" value="MarketingCampaign" />
             </actions>
             <widgets>
                 <decorator-screen name="CommonMarketingCampaignDecorator">
                     <decorator-section name="body">
-                        <screenlet title="${uiLabelMap.PageTitleListMarketingCampaign}">
-                            <container style="button-bar">
-                                <link text="${uiLabelMap.MarketingCampaignCreate}" target="EditMarketingCampaign" style="buttontext create">
-                                    <parameter param-name="DONE_PAGE" from-field="donePage"/>
-                                </link>
-                            </container>
-                            <include-form name="ListMarketingCampaign" location="component://marketing/widget/MarketingCampaignForms.xml"/>
-                        </screenlet>
+                        <container style="page-title">
+                            <label text="${uiLabelMap[titleProperty]}" />
+                        </container>
+                        <container style="button-bar">
+                            <link text="${uiLabelMap.MarketingCampaignCreate}" target="EditMarketingCampaign" style="buttontext create">
+                                <parameter param-name="DONE_PAGE" from-field="donePage" />
+                            </link>
+                        </container>
+                        <include-form name="ListMarketingCampaign" location="component://marketing/widget/MarketingCampaignForms.xml" />
                     </decorator-section>
                 </decorator-screen>
             </widgets>
         </section>
     </screen>
+
     <screen name="EditMarketingCampaignRoles">
         <section>
             <actions>
-                <set field="titleProperty" value="PageTitleEditMarketingCampaignRole"/>
-                <set field="campaignTabButtonItem" value="MarketingCampaignRole"/>
-                <set field="labelTitleProperty" value="PageTitleEditMarketingCampaignRole"/>
-
-                <set field="donePage" from-field="parameters.DONE_PAGE" default-value="ListMarketingCampaignRoles"/>
-                <set field="marketingCampaignId" from-field="parameters.marketingCampaignId"/>
-                <set field="partyId" from-field="parameters.partyId"/>
-                <set field="roleTypeId" from-field="parameters.roleTypeId"/>
-                <set field="fromDate" from-field="parameters.fromDate"/>
-                <entity-one entity-name="MarketingCampaignRole" value-field="marketingCampaignRole"/>
+                <set field="titleProperty" value="MarketingCampaignRoleCreate" />
+                <set field="campaignTabButtonItem" value="MarketingCampaignRole" />
+                <set field="labelTitleProperty" value="PageTitleEditMarketingCampaignRole" />
+                <set field="donePage" value="ListMarketingCampaignRoles" />
+                <set field="marketingCampaignId" from-field="parameters.marketingCampaignId" />
+                <set field="partyId" from-field="parameters.partyId" />
+                <set field="roleTypeId" from-field="parameters.roleTypeId" />
+                <set field="fromDate" from-field="parameters.fromDate" />
+                <entity-one entity-name="MarketingCampaignRole" value-field="marketingCampaignRole" />
             </actions>
             <widgets>
                 <decorator-screen name="CommonMarketingCampaignDecorator">
                     <decorator-section name="body">
-                        <screenlet title="${uiLabelMap.PageTitleEditMarketingCampaignRole}">
-                            <container style="button-bar">
-                                <link  text="${uiLabelMap.MarketingCampaignRoleCreate}" target="EditMarketingCampaignRoles" style="buttontext create">
-                                    <parameter param-name="marketingCampaignId"/>
-                                    <parameter param-name="DONE_PAGE" from-field="donePage"/>
-                                </link>
-                            </container>
-                            <include-form name="EditMarketingCampaignRoles" location="component://marketing/widget/MarketingCampaignForms.xml"/>
-                            <container><label style="h2" text="${uiLabelMap.CommonStatusHistory}"/></container>
-                        </screenlet>
+                        <container style="page-title">
+                            <label text="${uiLabelMap[titleProperty]}" />
+                        </container>
+                        <include-form name="EditMarketingCampaignRoles" location="component://marketing/widget/MarketingCampaignForms.xml" />
+                        <!-- 
+                        <container>
+                            <label style="h2" text="${uiLabelMap.CommonStatusHistory}" />
+                        </container>
+                         -->
                     </decorator-section>
                 </decorator-screen>
             </widgets>
         </section>
     </screen>
+
     <screen name="ListMarketingCampaignRoles">
         <section>
             <actions>
-                <set field="titleProperty" value="PageTitleListMarketingCampaignRole"/>
-                <set field="campaignTabButtonItem" value="MarketingCampaignRole"/>
-                <set field="labelTitleProperty" value="PageTitleListMarketingCampaignRole"/>
-
-                <set field="donePage" from-field="parameters.DONE_PAGE" default-value="FindMarketingCampaign"/>
-                <set field="marketingCampaignId" from-field="parameters.marketingCampaignId"/>
+                <set field="titleProperty" value="PageTitleListMarketingCampaignRole" />
+                <set field="campaignTabButtonItem" value="MarketingCampaignRole" />
+                <set field="labelTitleProperty" value="PageTitleListMarketingCampaignRole" />
+                <set field="donePage" from-field="parameters.DONE_PAGE" default-value="FindMarketingCampaign" />
+                <set field="marketingCampaignId" from-field="parameters.marketingCampaignId" />
             </actions>
             <widgets>
                 <decorator-screen name="CommonMarketingCampaignDecorator">
                     <decorator-section name="body">
-                        <screenlet title="${uiLabelMap.PageTitleListMarketingCampaignRole}">
-                            <container style="button-bar">
-                                <link  text="${uiLabelMap.MarketingCampaignRoleCreate}" target="EditMarketingCampaignRoles" style="buttontext create">
-                                    <parameter param-name="marketingCampaignId"/>
-                                    <parameter param-name="DONE_PAGE" from-field="donePage"/>
-                                </link>
-                            </container>
-                            <include-form name="ListMarketingCampaignRoles" location="component://marketing/widget/MarketingCampaignForms.xml"/>
-                        </screenlet>
+                        <container style="page-title">
+                            <label text="${uiLabelMap[titleProperty]}" />
+                        </container>
+                        <container style="button-bar">
+                            <link text="${uiLabelMap.MarketingCampaignRoleCreate}" target="EditMarketingCampaignRoles" style="buttontext create">
+                                <parameter param-name="marketingCampaignId" />
+                                <parameter param-name="DONE_PAGE" from-field="donePage" />
+                            </link>
+                        </container>
+                        <include-form name="ListMarketingCampaignRoles" location="component://marketing/widget/MarketingCampaignForms.xml" />
                     </decorator-section>
                 </decorator-screen>
             </widgets>
         </section>
     </screen>
+
 </screens>
diff --git a/applications/order/config/OrderEntityLabels.xml b/applications/order/config/OrderEntityLabels.xml
index 7d69f96..2a2e80d 100644
--- a/applications/order/config/OrderEntityLabels.xml
+++ b/applications/order/config/OrderEntityLabels.xml
@@ -29,6 +29,7 @@
         <value xml:lang="ro">Duplicat</value>
         <value xml:lang="ru">Повторное</value>
         <value xml:lang="th">จำลอง</value>
+        <value xml:lang="vi">Nhân bản</value>
         <value xml:lang="zh">重复</value>
         <value xml:lang="zh_TW">重複</value>
     </property>
@@ -42,6 +43,7 @@
         <value xml:lang="ro">Solutionat</value>
         <value xml:lang="ru">Исправлено</value>
         <value xml:lang="th">แก้ไข</value>
+        <value xml:lang="vi">Cố định</value>
         <value xml:lang="zh">已改正</value>
         <value xml:lang="zh_TW">已改正</value>
     </property>
@@ -55,6 +57,7 @@
         <value xml:lang="ro">Implementat</value>
         <value xml:lang="ru">Реализовано</value>
         <value xml:lang="th">ทำให้เห็นผล</value>
+        <value xml:lang="vi">Đã thực hiện</value>
         <value xml:lang="zh">已实现</value>
         <value xml:lang="zh_TW">已實現</value>
     </property>
@@ -68,6 +71,7 @@
         <value xml:lang="ro">Refuzat</value>
         <value xml:lang="ru">Отказано</value>
         <value xml:lang="th">ปฏิเสธ</value>
+        <value xml:lang="vi">Đã từ chối</value>
         <value xml:lang="zh">拒绝</value>
         <value xml:lang="zh_TW">拒絕</value>
     </property>
@@ -81,6 +85,7 @@
         <value xml:lang="ro">Nu Va fi Fixat</value>
         <value xml:lang="ru">Не исправлено</value>
         <value xml:lang="th">ไม่สามารถแก้ไขได้</value>
+        <value xml:lang="vi">Không cố định</value>
         <value xml:lang="zh">不改正</value>
         <value xml:lang="zh_TW">不改正</value>
     </property>
@@ -94,6 +99,7 @@
         <value xml:lang="ro">Cred ca Functioneaza</value>
         <value xml:lang="ru">Для нас работает</value>
         <value xml:lang="th">งานสำหรับฉัน</value>
+        <value xml:lang="vi">Làm cho tôi</value>
         <value xml:lang="zh">对我是正确的</value>
         <value xml:lang="zh_TW">對我是正確的</value>
     </property>
@@ -107,6 +113,7 @@
         <value xml:lang="ro">Cerere De Bug Fix</value>
         <value xml:lang="ru">Запрос на исправление ошибки</value>
         <value xml:lang="th">คำขอร้องสำหรับการแก้บัค</value>
+        <value xml:lang="vi">Yêu cầu sửa lỗi</value>
         <value xml:lang="zh">除错请求</value>
         <value xml:lang="zh_TW">除錯請求</value>
     </property>
@@ -120,6 +127,7 @@
         <value xml:lang="ro">Cerere De Catalog</value>
         <value xml:lang="ru">Запрос каталога</value>
         <value xml:lang="th">คำขอร้องสำหรับหมวดหมู่</value>
+        <value xml:lang="vi">Yêu cầu tài liệu giới thiệu</value>
         <value xml:lang="zh">目录请求</value>
         <value xml:lang="zh_TW">目錄請求</value>
     </property>
@@ -133,6 +141,7 @@
         <value xml:lang="ro">Cerere Caracteristica</value>
         <value xml:lang="ru">Запрос особенности</value>
         <value xml:lang="th">คำขอร้องสำหรับลักษณะ</value>
+        <value xml:lang="vi">Yêu cầu cho tương lai</value>
         <value xml:lang="zh">特性请求</value>
         <value xml:lang="zh_TW">特性請求</value>
     </property>
@@ -146,6 +155,7 @@
         <value xml:lang="ro">Cerere Informatie</value>
         <value xml:lang="ru">Запрос информации</value>
         <value xml:lang="th">คำขอร้องสำหรับข้อมูล</value>
+        <value xml:lang="vi">Yêu cầu thông tin</value>
         <value xml:lang="zh">信息请求</value>
         <value xml:lang="zh_TW">資訊請求</value>
     </property>
@@ -159,6 +169,7 @@
         <value xml:lang="ro">Cerere De Propunere</value>
         <value xml:lang="ru">Запрос предложения</value>
         <value xml:lang="th">คำขอร้องสำหรับข้อเสนอ</value>
+        <value xml:lang="vi">Yêu cầu chào hàng</value>
         <value xml:lang="zh">建议请求</value>
         <value xml:lang="zh_TW">建議請求</value>
     </property>
@@ -172,6 +183,7 @@
         <value xml:lang="pt_BR">Requisição por cotação para compra</value>
         <value xml:lang="ru">Запрос закупочных цен</value>
         <value xml:lang="th">คำขอร้องสำหรับการอ้างอิงการสั่งซื้อ</value>
+        <value xml:lang="vi">Yêu cầu báo giá mua</value>
         <value xml:lang="zh">采购询价</value>
         <value xml:lang="zh_TW">採購詢價</value>
     </property>
@@ -186,6 +198,7 @@
         <value xml:lang="ro">Cerere De Oferta</value>
         <value xml:lang="ru">Запрос цены</value>
         <value xml:lang="th">คำขอร้องสำหรับการอ้างอิง</value>
+        <value xml:lang="vi">Yêu cầu báo giá</value>
         <value xml:lang="zh">询价请求</value>
         <value xml:lang="zh_TW">詢價請求</value>
     </property>
@@ -199,6 +212,7 @@
         <value xml:lang="ro">Cerere De Suport</value>
         <value xml:lang="ru">Запрос поддержки</value>
         <value xml:lang="th">คำขอร้องสำหรับการสนับสนุน</value>
+        <value xml:lang="vi">Yêu cầu hỗ trợ</value>
         <value xml:lang="zh">支持请求</value>
         <value xml:lang="zh_TW">支援請求</value>
     </property>
@@ -212,6 +226,7 @@
         <value xml:lang="ro">Caracteristica Suplimentara</value>
         <value xml:lang="ru">Дополнительная возможность</value>
         <value xml:lang="th">เพิ่มเติมลักษณะ</value>
+        <value xml:lang="vi">Tính năng bổ xung</value>
         <value xml:lang="zh">附加特性</value>
         <value xml:lang="zh_TW">附加特性</value>
     </property>
@@ -225,6 +240,7 @@
         <value xml:lang="ro">Scont</value>
         <value xml:lang="ru">Скидка</value>
         <value xml:lang="th">ส่วนลด</value>
+        <value xml:lang="vi">Khấu trừ</value>
         <value xml:lang="zh">折扣</value>
         <value xml:lang="zh_TW">折扣</value>
     </property>
@@ -238,6 +254,7 @@
         <value xml:lang="ro">Taxa</value>
         <value xml:lang="ru">Сбор</value>
         <value xml:lang="th">ค่าธรรมเนียม</value>
+        <value xml:lang="vi">Phí</value>
         <value xml:lang="zh">费用</value>
         <value xml:lang="zh_TW">費用</value>
     </property>
@@ -251,6 +268,7 @@
         <value xml:lang="ro">Incarcare mixta</value>
         <value xml:lang="ru">Различные расходы</value>
         <value xml:lang="th">ค่าธรรมเนียมเบ็ดเตล็ด</value>
+        <value xml:lang="vi">Thu phí hỗn hợp</value>
         <value xml:lang="zh">其它费用</value>
         <value xml:lang="zh_TW">其他費用</value>
     </property>
@@ -264,6 +282,7 @@
         <value xml:lang="ro">Adaptare Pachet Vanzare</value>
         <value xml:lang="ru">Настройка маркетингового пакета</value>
         <value xml:lang="th">การปรับปรุงรายการทางการตลาด</value>
+        <value xml:lang="vi">Gói markeitng điều chỉnh</value>
         <value xml:lang="zh">调整市场促销方案</value>
         <value xml:lang="zh_TW">調整市場促銷方案</value>
     </property>
@@ -277,6 +296,7 @@
         <value xml:lang="ro">Promotie</value>
         <value xml:lang="ru">Акция</value>
         <value xml:lang="th">โปรโมชัน</value>
+        <value xml:lang="vi">Khuyến mại</value>
         <value xml:lang="zh">促销</value>
         <value xml:lang="zh_TW">促銷</value>
     </property>
@@ -290,6 +310,7 @@
         <value xml:lang="ro">Substituire</value>
         <value xml:lang="ru">Замена</value>
         <value xml:lang="th">จากการเปลี่ยนแปลง</value>
+        <value xml:lang="vi">Thay thế</value>
         <value xml:lang="zh">替换</value>
         <value xml:lang="zh_TW">替換</value>
     </property>
@@ -303,6 +324,7 @@
         <value xml:lang="ro">Taxa Vanzare</value>
         <value xml:lang="ru">Налог с продаж</value>
         <value xml:lang="th">ภาษีการขาย</value>
+        <value xml:lang="vi">Thuế kinh doanh</value>
         <value xml:lang="zh">营业税</value>
         <value xml:lang="zh_TW">營業稅</value>
     </property>
@@ -316,6 +338,7 @@
         <value xml:lang="ro">Cheltueli cu Expedierea si Ambalarea</value>
         <value xml:lang="ru">Поставка и обработка</value>
         <value xml:lang="th">การขนส่งและการควบคุม</value>
+        <value xml:lang="vi">Vận chuyển và quản lý</value>
         <value xml:lang="zh">运输和包装</value>
         <value xml:lang="zh_TW">運輸和包裝</value>
     </property>
@@ -329,6 +352,7 @@
         <value xml:lang="ro">Supraincarcare</value>
         <value xml:lang="ru">Надбавка</value>
         <value xml:lang="th">การคิดเงินเพิ่ม</value>
+        <value xml:lang="vi">Phí phụ thu</value>
         <value xml:lang="zh">额外费用</value>
         <value xml:lang="zh_TW">額外費用</value>
     </property>
@@ -342,6 +366,7 @@
         <value xml:lang="ro">Garantie</value>
         <value xml:lang="ru">Гарантия</value>
         <value xml:lang="th">การรับประกัน</value>
+        <value xml:lang="vi">Bảo hành</value>
         <value xml:lang="zh">保修</value>
         <value xml:lang="zh_TW">保修</value>
     </property>
@@ -353,6 +378,7 @@
         <value xml:lang="it">Indirizzo blacklist</value>
         <value xml:lang="pt_BR">Lista negra de endereços</value>
         <value xml:lang="th">ที่อยู่</value>
+        <value xml:lang="vi">Danh sách đen địa chỉ</value>
         <value xml:lang="zh">地址黑名单</value>
         <value xml:lang="zh_TW">位址黑名單</value>
     </property>
@@ -364,6 +390,7 @@
         <value xml:lang="it">Blacklist carta di credito</value>
         <value xml:lang="pt_BR">Lista negra de cartões de crédito</value>
         <value xml:lang="th">บัตรเครดิต</value>
+        <value xml:lang="vi">Danh sách đen thẻ tín dụng</value>
         <value xml:lang="zh">信用卡黑名单</value>
         <value xml:lang="zh_TW">信用卡黑名單</value>
     </property>
@@ -375,6 +402,7 @@
         <value xml:lang="it">Email blacklist</value>
         <value xml:lang="pt_BR">Lista negra de e-mails</value>
         <value xml:lang="th">อีเมล</value>
+        <value xml:lang="vi">Danh sách đen email</value>
         <value xml:lang="zh">电子邮件黑名单</value>
         <value xml:lang="zh_TW">電子郵件黑名單</value>
     </property>
@@ -386,6 +414,7 @@
         <value xml:lang="it">Telefono blacklist</value>
         <value xml:lang="pt_BR">Lista negra de telefones</value>
         <value xml:lang="th">หมายเลขโทรศัพท์</value>
+        <value xml:lang="vi">Danh sách đen số điện thoại</value>
         <value xml:lang="zh">电话黑名单</value>
         <value xml:lang="zh_TW">電話黑名單</value>
     </property>
@@ -397,6 +426,7 @@
         <value xml:lang="it">URL immagine</value>
         <value xml:lang="pt_BR">URL de imagem</value>
         <value xml:lang="th">รูปภาพ</value>
+        <value xml:lang="vi">Đường dẫn hình ảnh</value>
         <value xml:lang="zh">图像网址</value>
         <value xml:lang="zh_TW">圖像網址</value>
     </property>
@@ -454,6 +484,7 @@
         <value xml:lang="ro">Cumparare</value>
         <value xml:lang="ru">Закупка</value>
         <value xml:lang="th">รายการการสั่งซื้อ</value>
+        <value xml:lang="vi">Đặt mua</value>
         <value xml:lang="zh">采购订单</value>
         <value xml:lang="zh_TW">採購訂單</value>
     </property>
@@ -463,11 +494,12 @@
         <value xml:lang="es">Pedido de Venta</value>
         <value xml:lang="fr">Ventes</value>
         <value xml:lang="it">Ordine di vendita</value>
-        <value xml:lang="nl">Verkoopbestelling</value>		
+        <value xml:lang="nl">Verkoopbestelling</value>
         <value xml:lang="pt_BR">Pedido de vendas</value>
         <value xml:lang="ro">Vanzare</value>
         <value xml:lang="ru">Продажи</value>
         <value xml:lang="th">รายการขาย</value>
+        <value xml:lang="vi">Đặt bán</value>
         <value xml:lang="zh">销售订单</value>
         <value xml:lang="zh_TW">銷售訂單</value>
     </property>
@@ -492,6 +524,7 @@
         <value xml:lang="ro">Alte</value>
         <value xml:lang="ru">Другие</value>
         <value xml:lang="th">อื่น ๆ</value>
+        <value xml:lang="vi">Khác</value>
         <value xml:lang="zh">其它</value>
         <value xml:lang="zh_TW">其他</value>
     </property>
@@ -505,6 +538,7 @@
         <value xml:lang="ro">Produs</value>
         <value xml:lang="ru">Цены на продукцию</value>
         <value xml:lang="th">สินค้า</value>
+        <value xml:lang="vi">Sản phẩm</value>
         <value xml:lang="zh">产品</value>
         <value xml:lang="zh_TW">產品</value>
     </property>
@@ -518,6 +552,7 @@
         <value xml:lang="ro">Propunere</value>
         <value xml:lang="ru">Предложение</value>
         <value xml:lang="th">ข้อเสนอ</value>
+        <value xml:lang="vi">Chào hàng</value>
         <value xml:lang="zh">建议</value>
         <value xml:lang="zh_TW">建議</value>
     </property>
@@ -542,6 +577,7 @@
         <value xml:lang="ro">Produs Cumparat</value>
         <value xml:lang="ru">Закупочное предложение</value>
         <value xml:lang="th">การสั่งซื้อสินค้า</value>
+        <value xml:lang="vi">Mua hàng</value>
         <value xml:lang="zh">产品采购</value>
         <value xml:lang="zh_TW">產品採購</value>
     </property>
@@ -555,6 +591,7 @@
         <value xml:lang="ro">Necesar Cliente</value>
         <value xml:lang="ru">Требование заказчика</value>
         <value xml:lang="th">ความต้องการของลูกค้า</value>
+        <value xml:lang="vi">Yêu cầu của khách hàng</value>
         <value xml:lang="zh">客户需求</value>
         <value xml:lang="zh_TW">客戶需求</value>
     </property>
@@ -568,6 +605,7 @@
         <value xml:lang="ro">Necesar Intern</value>
         <value xml:lang="ru">Внутреннее требование</value>
         <value xml:lang="th">ความต้องการภายใน</value>
+        <value xml:lang="vi">Yêu cầu của nội bộ</value>
         <value xml:lang="zh">内部需求</value>
         <value xml:lang="zh_TW">內部需求</value>
     </property>
@@ -605,6 +643,7 @@
         <value xml:lang="ro">Necesar Produs</value>
         <value xml:lang="ru">Требование продукции</value>
         <value xml:lang="th">ความต้องการสินค้า</value>
+        <value xml:lang="vi">Yêu cầu sản phẩm</value>
         <value xml:lang="zh">产品需求</value>
         <value xml:lang="zh_TW">產品需求</value>
     </property>
@@ -618,6 +657,7 @@
         <value xml:lang="ro">Necesar de Lucru</value>
         <value xml:lang="ru">Требование работ</value>
         <value xml:lang="th">ความต้องการงาน</value>
+        <value xml:lang="vi">Yêu cầu công việc</value>
         <value xml:lang="zh">作业需求</value>
         <value xml:lang="zh_TW">作業需求</value>
     </property>
@@ -627,6 +667,7 @@
         <value xml:lang="fr">Caractéristique additionnelle de retour</value>
         <value xml:lang="it">Caratteristiche aggiuntive sul reso</value>
         <value xml:lang="pt_BR">Devolução de funcionalidade adicional</value>
+        <value xml:lang="vi">Hoàn trả tính năng bổ xung</value>
         <value xml:lang="zh">退货的附加特征</value>
         <value xml:lang="zh_TW">退貨的附加特征</value>
     </property>
@@ -635,6 +676,7 @@
         <value xml:lang="en">Return Discount</value>
         <value xml:lang="it">Sconto sul reso</value>
         <value xml:lang="pt_BR">Desconto por devolução</value>
+        <value xml:lang="vi">Hoàn trả khấu trừ</value>
         <value xml:lang="zh">退货的折扣</value>
         <value xml:lang="zh_TW">退貨的折扣</value>
     </property>
@@ -643,6 +685,7 @@
         <value xml:lang="en">Return Fee</value>
         <value xml:lang="it">Commissioni sul reso</value>
         <value xml:lang="pt_BR">Taxa de devolução</value>
+        <value xml:lang="vi">Hoàn trả phí</value>
         <value xml:lang="zh">退货的费用</value>
         <value xml:lang="zh_TW">退貨的費用</value>
     </property>
@@ -651,6 +694,7 @@
         <value xml:lang="en">Return Manual Adjustment</value>
         <value xml:lang="it">Aggiustamento manuale sul reso</value>
         <value xml:lang="pt_BR">Ajuste manual sobre devolução</value>
+        <value xml:lang="vi">Hoàn trả điều chỉnh thủ công</value>
         <value xml:lang="zh">退货的手册调整</value>
         <value xml:lang="zh_TW">退貨的手冊調整</value>