[setupConf] Merge with pi
authorInigo Sanchez <inigo.sanchez@openbravo.com>
Tue, 18 Nov 2014 11:03:11 +0100
changeset 25388 899242f8a5c7
parent 25387 2c55d7b706ed (current diff)
parent 25379 50d3a6f3a402 (diff)
child 25389 f7b4f6a3f082
[setupConf] Merge with pi
build.xml
--- a/.hgsigs	Tue Nov 18 10:57:35 2014 +0100
+++ b/.hgsigs	Tue Nov 18 11:03:11 2014 +0100
@@ -156,3 +156,4 @@
 794c7a6eb44d57c6a7d862b767ce468f0b7c8eb3 0 iEYEABECAAYFAlQrnFIACgkQCX/oGf+2qkOoBwCg3XsJxaAFlVvuIbHJtqpfAgRzVacAoMO5XmGzPQqzn15w7Ub+vUDOsQs8
 a9d6608b6cabe9e27fa31cbf2a49a69b2d583e0a 0 iEUEABECAAYFAlPfOfMACgkQCX/oGf+2qkP8GQCY8T/ZXMymIqGubZ6h2LbjE7Uc4gCg5A/numsq2gypnrNri+wMt1HLLWA=
 c63d4e4125e832602ed1da786f756c26c7fdcd2a 0 iEYEABECAAYFAlQISYIACgkQCX/oGf+2qkMciwCgo6ZYlA+XmT9DC0n2zO7P5okbQngAoITq7wESNiiLk56/3Rzw7gGtOgMe
+d8e24b51ba03c98d057048de5e86c1c8c977276f 0 iEYEABECAAYFAlRJO3UACgkQCX/oGf+2qkMMFQCeObdVCTDlec79H4alHs8t8SDMQ9YAoO4HfqRXTDGnDg5+LnLtuBxPsQDD
--- a/.hgtags	Tue Nov 18 10:57:35 2014 +0100
+++ b/.hgtags	Tue Nov 18 11:03:11 2014 +0100
@@ -167,3 +167,4 @@
 ae2b41d1cc2ee45fe4fbc5bc6e7879d10418ad3f 3.0PR14Q2.6
 d7d2abe0f424775dcdf9139410ae161881be1fb8 3.0PR14Q3
 a5483762bc5de5e3e934785f3baffda3a2d96db2 3.0PR14Q3.1
+6af26661c789c5daa23e36e7367a05dfe291242e 3.0PR14Q3.2
--- a/build.xml	Tue Nov 18 10:57:35 2014 +0100
+++ b/build.xml	Tue Nov 18 11:03:11 2014 +0100
@@ -877,7 +877,7 @@
   <target name="tomcat.restart.do" description="Restart the tomcat server process">
     <echo message="Restarting Tomcat at ${env.CATALINA_HOME}" />
     <java classname="org.apache.catalina.startup.Bootstrap" fork="true">
-      <classpath path=":${env.CATALINA_HOME}/bin/bootstrap.jar:${env.CATALINA_HOME}/bin/commons-logging-api.jar" />
+      <classpath path=":${env.CATALINA_HOME}/bin/bootstrap.jar:${env.CATALINA_HOME}/bin/commons-logging-api.jar:${env.CATALINA_HOME}/bin/tomcat-juli.jar" />
       <jvmarg value="-Dcatalina.home=${env.CATALINA_HOME}" />
       <jvmarg value="-Dcatalina.base=${env.CATALINA_BASE}" />
       <arg line="stop" />
@@ -888,7 +888,7 @@
     <antcall target="copy.files.jarsync"/>
 
     <java classname="org.apache.catalina.startup.Bootstrap" fork="true" spawn="true">
-      <classpath path=":${env.CATALINA_HOME}/bin/bootstrap.jar:${env.CATALINA_HOME}/bin/commons-logging-api.jar" />
+      <classpath path=":${env.CATALINA_HOME}/bin/bootstrap.jar:${env.CATALINA_HOME}/bin/commons-logging-api.jar:${env.CATALINA_HOME}/bin/tomcat-juli.jar" />
       <!-- note because CATALINA_OPTS can be multi argument the line attribute has to be used! -->
       <jvmarg line="${env.CATALINA_OPTS}" />
       <jvmarg value="-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager" />
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_ELEMENT.xml	Tue Nov 18 10:57:35 2014 +0100
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_ELEMENT.xml	Tue Nov 18 11:03:11 2014 +0100
@@ -1528,8 +1528,8 @@
 <!--F79620AE1CC041308045C23E661BD907-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--F79620AE1CC041308045C23E661BD907-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--F79620AE1CC041308045C23E661BD907-->  <COLUMNNAME><![CDATA[EM_APRM_MatchTrans_Force]]></COLUMNNAME>
-<!--F79620AE1CC041308045C23E661BD907-->  <NAME><![CDATA[EM_APRM_MatchTransactions_Force]]></NAME>
-<!--F79620AE1CC041308045C23E661BD907-->  <PRINTNAME><![CDATA[EM_APRM_MatchTransactions_Force]]></PRINTNAME>
+<!--F79620AE1CC041308045C23E661BD907-->  <NAME><![CDATA[Match Transactions Force]]></NAME>
+<!--F79620AE1CC041308045C23E661BD907-->  <PRINTNAME><![CDATA[Match Transactions Force]]></PRINTNAME>
 <!--F79620AE1CC041308045C23E661BD907-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
 <!--F79620AE1CC041308045C23E661BD907-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
 <!--F79620AE1CC041308045C23E661BD907--></AD_ELEMENT>
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_FIELD.xml	Tue Nov 18 10:57:35 2014 +0100
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_FIELD.xml	Tue Nov 18 11:03:11 2014 +0100
@@ -17032,7 +17032,7 @@
 <!--B7C06E2CD9EC460FBA493804E274ACC7-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
 <!--B7C06E2CD9EC460FBA493804E274ACC7-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--B7C06E2CD9EC460FBA493804E274ACC7-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
-<!--B7C06E2CD9EC460FBA493804E274ACC7-->  <NAME><![CDATA[EM_APRM_MatchTransactions_Force]]></NAME>
+<!--B7C06E2CD9EC460FBA493804E274ACC7-->  <NAME><![CDATA[Match Transactions Force]]></NAME>
 <!--B7C06E2CD9EC460FBA493804E274ACC7-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
 <!--B7C06E2CD9EC460FBA493804E274ACC7-->  <AD_TAB_ID><![CDATA[2845D761A8394468BD3BA4710AA888D4]]></AD_TAB_ID>
 <!--B7C06E2CD9EC460FBA493804E274ACC7-->  <AD_COLUMN_ID><![CDATA[9DC8500B414640E09BF61A3D14FE13D1]]></AD_COLUMN_ID>
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/OBUISEL_SELECTOR.xml	Tue Nov 18 10:57:35 2014 +0100
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/OBUISEL_SELECTOR.xml	Tue Nov 18 11:03:11 2014 +0100
@@ -12,7 +12,7 @@
 <!--14F59CBE3B804B8D81D29DFFF5B51467-->  <OBCLKER_TEMPLATE_ID><![CDATA[9314DE8599AD44E7BFC4CC50699042AB]]></OBCLKER_TEMPLATE_ID>
 <!--14F59CBE3B804B8D81D29DFFF5B51467-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--14F59CBE3B804B8D81D29DFFF5B51467-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[startsWith]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--14F59CBE3B804B8D81D29DFFF5B51467-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--14F59CBE3B804B8D81D29DFFF5B51467-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--14F59CBE3B804B8D81D29DFFF5B51467-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--14F59CBE3B804B8D81D29DFFF5B51467--></OBUISEL_SELECTOR>
 
@@ -28,7 +28,7 @@
 <!--41B3A5EA61AB46FBAF4567E3755BA190-->  <OBCLKER_TEMPLATE_ID><![CDATA[9314DE8599AD44E7BFC4CC50699042AB]]></OBCLKER_TEMPLATE_ID>
 <!--41B3A5EA61AB46FBAF4567E3755BA190-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--41B3A5EA61AB46FBAF4567E3755BA190-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[startsWith]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--41B3A5EA61AB46FBAF4567E3755BA190-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--41B3A5EA61AB46FBAF4567E3755BA190-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--41B3A5EA61AB46FBAF4567E3755BA190-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--41B3A5EA61AB46FBAF4567E3755BA190--></OBUISEL_SELECTOR>
 
@@ -43,7 +43,7 @@
 <!--4C399E0BD7C34BAFA55FEAACA0568B31-->  <OBCLKER_TEMPLATE_ID><![CDATA[9314DE8599AD44E7BFC4CC50699042AB]]></OBCLKER_TEMPLATE_ID>
 <!--4C399E0BD7C34BAFA55FEAACA0568B31-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--4C399E0BD7C34BAFA55FEAACA0568B31-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[startsWith]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--4C399E0BD7C34BAFA55FEAACA0568B31-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--4C399E0BD7C34BAFA55FEAACA0568B31-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--4C399E0BD7C34BAFA55FEAACA0568B31-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--4C399E0BD7C34BAFA55FEAACA0568B31--></OBUISEL_SELECTOR>
 
@@ -59,7 +59,7 @@
 <!--5D29D4DFCF4440B8BF89420419A0DBFE-->  <OBCLKER_TEMPLATE_ID><![CDATA[9314DE8599AD44E7BFC4CC50699042AB]]></OBCLKER_TEMPLATE_ID>
 <!--5D29D4DFCF4440B8BF89420419A0DBFE-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--5D29D4DFCF4440B8BF89420419A0DBFE-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[startsWith]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--5D29D4DFCF4440B8BF89420419A0DBFE-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--5D29D4DFCF4440B8BF89420419A0DBFE-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--5D29D4DFCF4440B8BF89420419A0DBFE-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--5D29D4DFCF4440B8BF89420419A0DBFE--></OBUISEL_SELECTOR>
 
@@ -80,7 +80,7 @@
 <!--6643B422022B41698FEFD6C7FAD7AC4B-->  <OBCLKER_TEMPLATE_ID><![CDATA[C1FD42039C804705B8E5012E4553433C]]></OBCLKER_TEMPLATE_ID>
 <!--6643B422022B41698FEFD6C7FAD7AC4B-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--6643B422022B41698FEFD6C7FAD7AC4B-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[startsWith]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--6643B422022B41698FEFD6C7FAD7AC4B-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--6643B422022B41698FEFD6C7FAD7AC4B-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--6643B422022B41698FEFD6C7FAD7AC4B-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--6643B422022B41698FEFD6C7FAD7AC4B--></OBUISEL_SELECTOR>
 
@@ -95,7 +95,7 @@
 <!--7811D4DBBB734D5ABB5DCC0CFDA21B88-->  <OBCLKER_TEMPLATE_ID><![CDATA[9314DE8599AD44E7BFC4CC50699042AB]]></OBCLKER_TEMPLATE_ID>
 <!--7811D4DBBB734D5ABB5DCC0CFDA21B88-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--7811D4DBBB734D5ABB5DCC0CFDA21B88-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[startsWith]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--7811D4DBBB734D5ABB5DCC0CFDA21B88-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--7811D4DBBB734D5ABB5DCC0CFDA21B88-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--7811D4DBBB734D5ABB5DCC0CFDA21B88-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--7811D4DBBB734D5ABB5DCC0CFDA21B88--></OBUISEL_SELECTOR>
 
@@ -112,7 +112,7 @@
 <!--9FAD469CE4414A25974CF45C0AD22D35-->  <OBCLKER_TEMPLATE_ID><![CDATA[9314DE8599AD44E7BFC4CC50699042AB]]></OBCLKER_TEMPLATE_ID>
 <!--9FAD469CE4414A25974CF45C0AD22D35-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--9FAD469CE4414A25974CF45C0AD22D35-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[substring]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--9FAD469CE4414A25974CF45C0AD22D35-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--9FAD469CE4414A25974CF45C0AD22D35-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--9FAD469CE4414A25974CF45C0AD22D35-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--9FAD469CE4414A25974CF45C0AD22D35--></OBUISEL_SELECTOR>
 
@@ -143,7 +143,7 @@
 <!--A98899B1C75A4F4EBD3414F1B654EFAB-->  <OBCLKER_TEMPLATE_ID><![CDATA[9314DE8599AD44E7BFC4CC50699042AB]]></OBCLKER_TEMPLATE_ID>
 <!--A98899B1C75A4F4EBD3414F1B654EFAB-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--A98899B1C75A4F4EBD3414F1B654EFAB-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[substring]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--A98899B1C75A4F4EBD3414F1B654EFAB-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--A98899B1C75A4F4EBD3414F1B654EFAB-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--A98899B1C75A4F4EBD3414F1B654EFAB-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--A98899B1C75A4F4EBD3414F1B654EFAB--></OBUISEL_SELECTOR>
 
@@ -159,7 +159,7 @@
 <!--B15DC1DA631A402C9B05AC11A2EA724C-->  <OBCLKER_TEMPLATE_ID><![CDATA[9314DE8599AD44E7BFC4CC50699042AB]]></OBCLKER_TEMPLATE_ID>
 <!--B15DC1DA631A402C9B05AC11A2EA724C-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--B15DC1DA631A402C9B05AC11A2EA724C-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[startsWith]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--B15DC1DA631A402C9B05AC11A2EA724C-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--B15DC1DA631A402C9B05AC11A2EA724C-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--B15DC1DA631A402C9B05AC11A2EA724C-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--B15DC1DA631A402C9B05AC11A2EA724C--></OBUISEL_SELECTOR>
 
@@ -174,7 +174,7 @@
 <!--B496EA4EDC36442D90CC9B553311DC11-->  <OBCLKER_TEMPLATE_ID><![CDATA[9314DE8599AD44E7BFC4CC50699042AB]]></OBCLKER_TEMPLATE_ID>
 <!--B496EA4EDC36442D90CC9B553311DC11-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--B496EA4EDC36442D90CC9B553311DC11-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[startsWith]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--B496EA4EDC36442D90CC9B553311DC11-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--B496EA4EDC36442D90CC9B553311DC11-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--B496EA4EDC36442D90CC9B553311DC11-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--B496EA4EDC36442D90CC9B553311DC11--></OBUISEL_SELECTOR>
 
@@ -190,7 +190,7 @@
 <!--BA4FDCB15ACB47AD81BE3985E13032EE-->  <OBCLKER_TEMPLATE_ID><![CDATA[9314DE8599AD44E7BFC4CC50699042AB]]></OBCLKER_TEMPLATE_ID>
 <!--BA4FDCB15ACB47AD81BE3985E13032EE-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--BA4FDCB15ACB47AD81BE3985E13032EE-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[substring]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--BA4FDCB15ACB47AD81BE3985E13032EE-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--BA4FDCB15ACB47AD81BE3985E13032EE-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--BA4FDCB15ACB47AD81BE3985E13032EE-->  <ENTITY_ALIAS><![CDATA[e]]></ENTITY_ALIAS>
 <!--BA4FDCB15ACB47AD81BE3985E13032EE-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--BA4FDCB15ACB47AD81BE3985E13032EE--></OBUISEL_SELECTOR>
@@ -207,7 +207,7 @@
 <!--EE54530EA4884AD5A10365E480015325-->  <OBCLKER_TEMPLATE_ID><![CDATA[9314DE8599AD44E7BFC4CC50699042AB]]></OBCLKER_TEMPLATE_ID>
 <!--EE54530EA4884AD5A10365E480015325-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--EE54530EA4884AD5A10365E480015325-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[substring]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--EE54530EA4884AD5A10365E480015325-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--EE54530EA4884AD5A10365E480015325-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--EE54530EA4884AD5A10365E480015325-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--EE54530EA4884AD5A10365E480015325-->  <OBUIAPP_PROCESS_ID><![CDATA[9BED7889E1034FE68BD85D5D16857320]]></OBUIAPP_PROCESS_ID>
 <!--EE54530EA4884AD5A10365E480015325--></OBUISEL_SELECTOR>
@@ -223,7 +223,7 @@
 <!--FDDCBE57CCDF4FB89ED708316E2BF0E6-->  <OBCLKER_TEMPLATE_ID><![CDATA[9314DE8599AD44E7BFC4CC50699042AB]]></OBCLKER_TEMPLATE_ID>
 <!--FDDCBE57CCDF4FB89ED708316E2BF0E6-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--FDDCBE57CCDF4FB89ED708316E2BF0E6-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[startsWith]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--FDDCBE57CCDF4FB89ED708316E2BF0E6-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--FDDCBE57CCDF4FB89ED708316E2BF0E6-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--FDDCBE57CCDF4FB89ED708316E2BF0E6-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--FDDCBE57CCDF4FB89ED708316E2BF0E6--></OBUISEL_SELECTOR>
 
@@ -239,7 +239,7 @@
 <!--FF808181312D569C01312D8C1EC40036-->  <OBCLKER_TEMPLATE_ID><![CDATA[9314DE8599AD44E7BFC4CC50699042AB]]></OBCLKER_TEMPLATE_ID>
 <!--FF808181312D569C01312D8C1EC40036-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--FF808181312D569C01312D8C1EC40036-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[substring]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--FF808181312D569C01312D8C1EC40036-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--FF808181312D569C01312D8C1EC40036-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--FF808181312D569C01312D8C1EC40036-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--FF808181312D569C01312D8C1EC40036--></OBUISEL_SELECTOR>
 
@@ -255,7 +255,7 @@
 <!--FF808181312D569C01312D8DCCD50045-->  <OBCLKER_TEMPLATE_ID><![CDATA[9314DE8599AD44E7BFC4CC50699042AB]]></OBCLKER_TEMPLATE_ID>
 <!--FF808181312D569C01312D8DCCD50045-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--FF808181312D569C01312D8DCCD50045-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[substring]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--FF808181312D569C01312D8DCCD50045-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--FF808181312D569C01312D8DCCD50045-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--FF808181312D569C01312D8DCCD50045-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--FF808181312D569C01312D8DCCD50045--></OBUISEL_SELECTOR>
 
@@ -271,7 +271,7 @@
 <!--FF808181312D569C01312D8EE5430054-->  <OBCLKER_TEMPLATE_ID><![CDATA[9314DE8599AD44E7BFC4CC50699042AB]]></OBCLKER_TEMPLATE_ID>
 <!--FF808181312D569C01312D8EE5430054-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--FF808181312D569C01312D8EE5430054-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[substring]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--FF808181312D569C01312D8EE5430054-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--FF808181312D569C01312D8EE5430054-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--FF808181312D569C01312D8EE5430054-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--FF808181312D569C01312D8EE5430054--></OBUISEL_SELECTOR>
 
@@ -287,7 +287,7 @@
 <!--FF808181312D569C01312D90408D005D-->  <OBCLKER_TEMPLATE_ID><![CDATA[9314DE8599AD44E7BFC4CC50699042AB]]></OBCLKER_TEMPLATE_ID>
 <!--FF808181312D569C01312D90408D005D-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--FF808181312D569C01312D90408D005D-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[substring]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--FF808181312D569C01312D90408D005D-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--FF808181312D569C01312D90408D005D-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--FF808181312D569C01312D90408D005D-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--FF808181312D569C01312D90408D005D--></OBUISEL_SELECTOR>
 
@@ -305,7 +305,7 @@
 <!--FF808181312DA8D801312DDE869B000C-->  <OBCLKER_TEMPLATE_ID><![CDATA[9314DE8599AD44E7BFC4CC50699042AB]]></OBCLKER_TEMPLATE_ID>
 <!--FF808181312DA8D801312DDE869B000C-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--FF808181312DA8D801312DDE869B000C-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[substring]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--FF808181312DA8D801312DDE869B000C-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--FF808181312DA8D801312DDE869B000C-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--FF808181312DA8D801312DDE869B000C-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--FF808181312DA8D801312DDE869B000C--></OBUISEL_SELECTOR>
 
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/actionHandler/CheckRecordChangedActionHandler.java	Tue Nov 18 10:57:35 2014 +0100
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/actionHandler/CheckRecordChangedActionHandler.java	Tue Nov 18 11:03:11 2014 +0100
@@ -60,7 +60,7 @@
       Date bbddBSLUpdated = bsline.getUpdated();
       // Remove milliseconds to compare against updated from UI
       Calendar calendar = Calendar.getInstance();
-      calendar.setTime(OBDateUtils.convertToUTC(bbddBSLUpdated));
+      calendar.setTime(OBDateUtils.convertDateToUTC(bbddBSLUpdated));
       calendar.setLenient(true);
       calendar.set(Calendar.MILLISECOND, 0);
       if (date.getTime() != calendar.getTimeInMillis()) {
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/actionHandler/UnMatchTransactionActionHandler.java	Tue Nov 18 10:57:35 2014 +0100
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/actionHandler/UnMatchTransactionActionHandler.java	Tue Nov 18 11:03:11 2014 +0100
@@ -63,7 +63,7 @@
       Date bbddBSLUpdated = bsline.getUpdated();
       // Remove milis
       Calendar calendar = Calendar.getInstance();
-      calendar.setTime(OBDateUtils.convertToUTC(bbddBSLUpdated));
+      calendar.setTime(OBDateUtils.convertDateToUTC(bbddBSLUpdated));
       calendar.setLenient(true);
       calendar.set(Calendar.MILLISECOND, 0);
       if (date.getTime() != calendar.getTimeInMillis()) {
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/ProcessInvoice.java	Tue Nov 18 10:57:35 2014 +0100
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/ProcessInvoice.java	Tue Nov 18 11:03:11 2014 +0100
@@ -153,7 +153,23 @@
             return;
           }
         }
+        // check BP currency
+        if ("CO".equals(strdocaction)) {
+            // check BP currency
+            if (invoice.getBusinessPartner().getCurrency() == null) {
+            	String errorMSG =  
+            			Utility.messageBD(this, "InitBPCurrencyLnk", vars.getLanguage(), false);
+               msg = new OBError();
+               msg.setType("Error");
+               msg.setTitle(Utility.messageBD(this, "Error", vars.getLanguage()));
+               msg.setMessage(String.format(errorMSG, invoice.getBusinessPartner().getId(), invoice.getBusinessPartner().getName()));
 
+               vars.setMessage(strTabId, msg);
+               printPageClosePopUp(response, vars, Utility.getTabURL(strTabId, "R", true));
+               return;
+            }
+        }
+        
         OBContext.setAdminMode(true);
         Process process = null;
         try {
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/hqlinjections/AddPaymentOrderInvoicesTransformer.java	Tue Nov 18 10:57:35 2014 +0100
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/hqlinjections/AddPaymentOrderInvoicesTransformer.java	Tue Nov 18 11:03:11 2014 +0100
@@ -109,7 +109,7 @@
     return transformedHql;
   }
 
-  private StringBuffer getSelectClause(String transactionType, boolean hasSelectedIds) {
+  protected StringBuffer getSelectClause(String transactionType, boolean hasSelectedIds) {
     StringBuffer selectClause = new StringBuffer();
     // Create Select Clause
     selectClause.append(getAggregatorFunction("psd.id") + " as paymentScheduleDetail, ");
@@ -161,7 +161,7 @@
     return selectClause;
   }
 
-  private StringBuffer getWhereClause(String transactionType,
+  protected StringBuffer getWhereClause(String transactionType,
       Map<String, String> requestParameters, List<String> selectedPSDs) {
     String strBusinessPartnerId = requestParameters.get("received_from");
     String strFinPaymentId = requestParameters.get("fin_payment_id");
@@ -244,7 +244,7 @@
 
   }
 
-  private StringBuffer getGroupByClause(String transactionType) {
+  protected StringBuffer getGroupByClause(String transactionType) {
     StringBuffer groupByClause = new StringBuffer();
     // Create GroupBy Clause
     if ("I".equals(transactionType)) {
@@ -279,7 +279,7 @@
    * @param transactionType
    * @return
    */
-  private StringBuffer getOrderByClause(String transactionType, List<String> selectedPSDs,
+  protected StringBuffer getOrderByClause(String transactionType, List<String> selectedPSDs,
       Map<String, String> requestParameters) {
     StringBuffer orderByClause = new StringBuffer();
     if (selectedPSDs.size() == 0) {
@@ -321,7 +321,7 @@
     return orderByClause;
   }
 
-  private String removeGridFilters(String _hqlQuery) {
+  protected String removeGridFilters(String _hqlQuery) {
     String hqlQuery = _hqlQuery;
     // Get the substring of grid filter inside where clause, if transaction type is "Orders" or
     // "Invoices", put in the having clause
@@ -343,7 +343,7 @@
    * @param queryNamedParameters
    * @return
    */
-  private String calculateHavingClause(String _hqlQuery, String transactionType,
+  protected String calculateHavingClause(String _hqlQuery, String transactionType,
       JSONObject criteria, Map<String, Object> queryNamedParameters) {
     String hqlQuery = _hqlQuery;
     StringBuffer havingClause = new StringBuffer();
@@ -470,7 +470,8 @@
    * @param orderByClause
    * @return
    */
-  private String appendOrderByClause(String _hqlQuery, StringBuffer orderByClause, boolean justCount) {
+  protected String appendOrderByClause(String _hqlQuery, StringBuffer orderByClause,
+      boolean justCount) {
     String hqlQuery = _hqlQuery;
     if (!justCount) {
       if (hqlQuery.contains(" ORDER BY ")) {
@@ -483,7 +484,7 @@
     return hqlQuery;
   }
 
-  private void transformCriteria(JSONObject buildCriteria, List<String> selectedPSDs)
+  protected void transformCriteria(JSONObject buildCriteria, List<String> selectedPSDs)
       throws JSONException {
     JSONArray criteriaArray = buildCriteria.getJSONArray("criteria");
     JSONArray newCriteriaArray = new JSONArray();
@@ -509,14 +510,14 @@
    * @param expression
    * @return
    */
-  private String getAggregatorFunction(String expression) {
+  protected String getAggregatorFunction(String expression) {
     return " hqlagg(" + expression + ")";
   }
 
   /**
    * @see HQLDataSourceService#replaceParametersWithAlias(Table, String)
    */
-  private String replaceParametersWithAlias(Table table, String whereClause) {
+  protected String replaceParametersWithAlias(Table table, String whereClause) {
     if (whereClause.trim().isEmpty()) {
       return whereClause;
     }
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_PaymentProcess.java	Tue Nov 18 10:57:35 2014 +0100
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_PaymentProcess.java	Tue Nov 18 11:03:11 2014 +0100
@@ -415,6 +415,18 @@
                         .getInvoicePaymentSchedule().getInvoice() : null;
                     paidAmount = BigDecimal.ZERO;
                     String fromCurrency = payment.getCurrency().getId();
+                    if (businessPartner.getCurrency() == null) {
+                    	String errorMSG = 
+                    			Utility.messageBD(conProvider, "InitBPCurrencyLnk", language, false);
+                    	
+                    	 msg.setType("Error");
+                         msg.setTitle(Utility.messageBD(conProvider, "Error", language));
+                         msg.setMessage(String.format(errorMSG, businessPartner.getId(), businessPartner.getName()));
+                         bundle.setResult(msg);
+                         OBDal.getInstance().rollbackAndClose();
+                         return;
+                    	
+                    }
                     String toCurrency = businessPartner.getCurrency().getId();
                     if (!fromCurrency.equals(toCurrency)) {
                       BigDecimal exchangeRate = BigDecimal.ZERO;
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/utility/APRM_MatchingUtility.java	Tue Nov 18 10:57:35 2014 +0100
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/utility/APRM_MatchingUtility.java	Tue Nov 18 11:03:11 2014 +0100
@@ -661,14 +661,16 @@
   private static Date getClearItemsMaxDate(FIN_Reconciliation reconciliation) {
     OBCriteria<FIN_ReconciliationLine_v> obc = OBDal.getInstance().createCriteria(
         FIN_ReconciliationLine_v.class);
+    obc.createAlias(FIN_ReconciliationLine_v.PROPERTY_BANKSTATEMENTLINE, "bsl");
     obc.setFilterOnReadableClients(false);
     obc.setFilterOnReadableOrganization(false);
     obc.add(Restrictions.eq(FIN_ReconciliationLine_v.PROPERTY_RECONCILIATION, reconciliation));
-    obc.addOrder(Order.desc(FIN_ReconciliationLine_v.PROPERTY_TRANSACTIONDATE));
+    obc.addOrder(Order.desc("bsl." + FIN_BankStatementLine.PROPERTY_TRANSACTIONDATE));
     obc.setMaxResults(1);
     FIN_ReconciliationLine_v line = ((FIN_ReconciliationLine_v) obc.uniqueResult());
     // If there are no lines use reconciliation ending Date
-    return line != null ? line.getTransactionDate() : reconciliation.getEndingDate();
+    return line != null ? line.getBankStatementLine().getTransactionDate() : reconciliation
+        .getEndingDate();
   }
 
   /**
--- a/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MESSAGE.xml	Tue Nov 18 10:57:35 2014 +0100
+++ b/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MESSAGE.xml	Tue Nov 18 11:03:11 2014 +0100
@@ -1808,6 +1808,18 @@
 <!--FBA2F11416C4413F8E2D554119461964-->  <ISINCLUDEINI18N><![CDATA[N]]></ISINCLUDEINI18N>
 <!--FBA2F11416C4413F8E2D554119461964--></AD_MESSAGE>
 
+<!--FC137BAF53044944BA817054F4414E58--><AD_MESSAGE>
+<!--FC137BAF53044944BA817054F4414E58-->  <AD_MESSAGE_ID><![CDATA[FC137BAF53044944BA817054F4414E58]]></AD_MESSAGE_ID>
+<!--FC137BAF53044944BA817054F4414E58-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--FC137BAF53044944BA817054F4414E58-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--FC137BAF53044944BA817054F4414E58-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--FC137BAF53044944BA817054F4414E58-->  <VALUE><![CDATA[OBUIAPP_RM_NotAvailableStock]]></VALUE>
+<!--FC137BAF53044944BA817054F4414E58-->  <MSGTEXT><![CDATA[There isn't enough available stock for RM order No: %0]]></MSGTEXT>
+<!--FC137BAF53044944BA817054F4414E58-->  <MSGTYPE><![CDATA[E]]></MSGTYPE>
+<!--FC137BAF53044944BA817054F4414E58-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--FC137BAF53044944BA817054F4414E58-->  <ISINCLUDEINI18N><![CDATA[N]]></ISINCLUDEINI18N>
+<!--FC137BAF53044944BA817054F4414E58--></AD_MESSAGE>
+
 <!--FF1B52D0AF694B0EB3F220D65E3BD28F--><AD_MESSAGE>
 <!--FF1B52D0AF694B0EB3F220D65E3BD28F-->  <AD_MESSAGE_ID><![CDATA[FF1B52D0AF694B0EB3F220D65E3BD28F]]></AD_MESSAGE_ID>
 <!--FF1B52D0AF694B0EB3F220D65E3BD28F-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/MultipleDeleteActionHandler.java	Tue Nov 18 10:57:35 2014 +0100
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/MultipleDeleteActionHandler.java	Tue Nov 18 11:03:11 2014 +0100
@@ -11,25 +11,35 @@
  * under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2011 Openbravo SLU 
+ * All portions are Copyright (C) 2011-2014 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
  */
 package org.openbravo.client.application;
 
+import java.util.HashMap;
 import java.util.Map;
 
 import javax.enterprise.context.ApplicationScoped;
+import javax.inject.Inject;
 
 import org.codehaus.jettison.json.JSONArray;
 import org.codehaus.jettison.json.JSONException;
 import org.codehaus.jettison.json.JSONObject;
 import org.openbravo.base.exception.OBException;
+import org.openbravo.base.model.Entity;
+import org.openbravo.base.model.ModelProvider;
 import org.openbravo.base.structure.BaseOBObject;
+import org.openbravo.client.application.window.ApplicationDictionaryCachedStructures;
 import org.openbravo.client.kernel.BaseActionHandler;
 import org.openbravo.client.kernel.StaticResourceComponent;
+import org.openbravo.dal.core.OBContext;
 import org.openbravo.dal.service.OBDal;
+import org.openbravo.model.ad.datamodel.Table;
+import org.openbravo.service.datasource.DataSourceService;
+import org.openbravo.service.datasource.DataSourceServiceProvider;
+import org.openbravo.service.json.JsonConstants;
 import org.openbravo.service.json.JsonUtils;
 
 /**
@@ -41,22 +51,38 @@
 @ApplicationScoped
 public class MultipleDeleteActionHandler extends BaseActionHandler {
 
+  @Inject
+  private DataSourceServiceProvider dataSourceServiceProvider;
+
+  @Inject
+  private ApplicationDictionaryCachedStructures cachedStructures;
+
   protected JSONObject execute(Map<String, Object> parameters, String data) {
 
     try {
       final JSONObject dataObject = new JSONObject(data);
       final String entityName = dataObject.getString("entity");
       final JSONArray ids = dataObject.getJSONArray("ids");
+      DataSourceService dataSourceService = getCustomDataSourceService(entityName);
       for (int i = 0; i < ids.length(); i++) {
-        final BaseOBObject object = OBDal.getInstance().get(entityName, (String) ids.get(i));
-        if (object != null) {
-          OBDal.getInstance().remove(object);
-          // https://issues.openbravo.com/view.php?id=21229#c51631
-          OBDal.getInstance().flush();
-          OBDal.getInstance().getSession().clear();
+        if (dataSourceService == null) {
+          final BaseOBObject object = OBDal.getInstance().get(entityName, (String) ids.get(i));
+          if (object != null) {
+            OBDal.getInstance().remove(object);
+            // https://issues.openbravo.com/view.php?id=21229#c51631
+            OBDal.getInstance().flush();
+            OBDal.getInstance().getSession().clear();
+          }
+        } else {
+          // if a custom data source, remove them one at a time using the custom data source
+          Map<String, String> dsParameters = new HashMap<String, String>();
+          dsParameters.put(JsonConstants.ID, ids.getString(i));
+          dataSourceService.remove(dsParameters);
         }
       }
-      OBDal.getInstance().commitAndClose();
+      if (dataSourceService == null) {
+        OBDal.getInstance().commitAndClose();
+      }
 
       // just return an empty message, as the system knows how many have been deleted.
       return new JSONObject();
@@ -68,4 +94,31 @@
       }
     }
   }
+
+  /**
+   * Gets the data source service in case it is a custom datasource, other cases it returns null.
+   * 
+   * Note this should be extended to always delegate in the datasource instead of deleting within
+   * this class: see issue #28118
+   *
+   * @param entityName
+   *          the entity name
+   * @return the custom data source service
+   */
+  private DataSourceService getCustomDataSourceService(String entityName) {
+    OBContext.setAdminMode(true);
+    try {
+      final Entity entity = ModelProvider.getInstance().getEntity(entityName);
+      Table table = cachedStructures.getTable(entity.getTableId());
+      if (ApplicationConstants.DATASOURCEBASEDTABLE.equals(table.getDataOriginType())) {
+        // if a data source based table, return the data source service
+        return dataSourceServiceProvider.getDataSource(table.getObserdsDatasource().getName());
+      }
+      // otherwise return null
+      return null;
+    } finally {
+      OBContext.restorePreviousMode();
+    }
+  }
+
 }
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/event/OpenClosePeriodHandler.java	Tue Nov 18 10:57:35 2014 +0100
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/event/OpenClosePeriodHandler.java	Tue Nov 18 11:03:11 2014 +0100
@@ -123,19 +123,19 @@
           }
         } else {
           for (Period p : PeriodControlUtility.getOrderedPeriods(periodIdList)) {
+            OBContext.setAdminMode(false);
             PeriodControlLog pcl = OBProvider.getInstance().get(PeriodControlLog.class);
-            pcl.setClient(p.getClient());
-            pcl.setOrganization(p.getOrganization());
-            pcl.setCalendar(p.getYear().getCalendar());
-            pcl.setCascade(true);
-            pcl.setPeriodAction(action);
-            pcl.setPeriodNo(p);
-            pcl.setPeriod(p);
-            pcl.setYear(p.getYear());
-            pcl.setProcessed(false);
-            pcl.setProcessNow(false);
-            OBContext.setAdminMode(false);
             try {
+              pcl.setClient(p.getClient());
+              pcl.setOrganization(p.getOrganization());
+              pcl.setCalendar(p.getYear().getCalendar());
+              pcl.setCascade(true);
+              pcl.setPeriodAction(action);
+              pcl.setPeriodNo(p);
+              pcl.setPeriod(p);
+              pcl.setYear(p.getYear());
+              pcl.setProcessed(false);
+              pcl.setProcessNow(false);
               OBDal.getInstance().save(pcl);
               OBDal.getInstance().flush();
             } finally {
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/servlet/CalloutHttpServletResponse.java	Tue Nov 18 10:57:35 2014 +0100
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/servlet/CalloutHttpServletResponse.java	Tue Nov 18 11:03:11 2014 +0100
@@ -11,7 +11,7 @@
  * under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2010 Openbravo SLU 
+ * All portions are Copyright (C) 2010-2014 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -21,154 +21,24 @@
 import java.io.IOException;
 import java.io.PrintWriter;
 import java.io.StringWriter;
-import java.util.Locale;
 
-import javax.servlet.ServletOutputStream;
-import javax.servlet.http.Cookie;
 import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpServletResponseWrapper;
 
-public class CalloutHttpServletResponse implements HttpServletResponse {
-  HttpServletResponse wrappedResponse;
+public class CalloutHttpServletResponse extends HttpServletResponseWrapper {
   StringWriter sWriter = new StringWriter();
   PrintWriter writer = new PrintWriter(sWriter);
 
   public CalloutHttpServletResponse(HttpServletResponse wrappedResponse) {
-    this.wrappedResponse = wrappedResponse;
+    super(wrappedResponse);
   }
 
   public String getOutputFromWriter() {
     return sWriter.toString();
   }
 
-  public void addCookie(Cookie arg0) {
-    wrappedResponse.addCookie(arg0);
-  }
-
-  public void addDateHeader(String arg0, long arg1) {
-    wrappedResponse.addDateHeader(arg0, arg1);
-  }
-
-  public void addHeader(String arg0, String arg1) {
-    wrappedResponse.addHeader(arg0, arg1);
-  }
-
-  public void addIntHeader(String arg0, int arg1) {
-    wrappedResponse.addIntHeader(arg0, arg1);
-  }
-
-  public boolean containsHeader(String arg0) {
-    return wrappedResponse.containsHeader(arg0);
-  }
-
-  @Deprecated
-  public String encodeRedirectUrl(String arg0) {
-    return wrappedResponse.encodeRedirectUrl(arg0);
-  }
-
-  public String encodeRedirectURL(String arg0) {
-    return wrappedResponse.encodeRedirectURL(arg0);
-  }
-
-  @Deprecated
-  public String encodeUrl(String arg0) {
-    return wrappedResponse.encodeUrl(arg0);
-  }
-
-  public String encodeURL(String arg0) {
-    return wrappedResponse.encodeURL(arg0);
-  }
-
-  public void flushBuffer() throws IOException {
-    wrappedResponse.flushBuffer();
-  }
-
-  public int getBufferSize() {
-    return wrappedResponse.getBufferSize();
-  }
-
-  public String getCharacterEncoding() {
-    return wrappedResponse.getCharacterEncoding();
-  }
-
-  public String getContentType() {
-    return wrappedResponse.getContentType();
-  }
-
-  public Locale getLocale() {
-    return wrappedResponse.getLocale();
-  }
-
-  public ServletOutputStream getOutputStream() throws IOException {
-    return wrappedResponse.getOutputStream();
-  }
-
+  @Override
   public PrintWriter getWriter() throws IOException {
     return writer;
   }
-
-  public boolean isCommitted() {
-    return wrappedResponse.isCommitted();
-  }
-
-  public void reset() {
-    wrappedResponse.reset();
-  }
-
-  public void resetBuffer() {
-    wrappedResponse.resetBuffer();
-  }
-
-  public void sendError(int arg0, String arg1) throws IOException {
-    wrappedResponse.sendError(arg0, arg1);
-  }
-
-  public void sendError(int arg0) throws IOException {
-    wrappedResponse.sendError(arg0);
-  }
-
-  public void sendRedirect(String arg0) throws IOException {
-    wrappedResponse.sendRedirect(arg0);
-  }
-
-  public void setBufferSize(int arg0) {
-    wrappedResponse.setBufferSize(arg0);
-  }
-
-  public void setCharacterEncoding(String arg0) {
-    wrappedResponse.setCharacterEncoding(arg0);
-  }
-
-  public void setContentLength(int arg0) {
-    wrappedResponse.setContentLength(arg0);
-  }
-
-  public void setContentType(String arg0) {
-    wrappedResponse.setContentType(arg0);
-  }
-
-  public void setDateHeader(String arg0, long arg1) {
-    wrappedResponse.setDateHeader(arg0, arg1);
-  }
-
-  public void setHeader(String arg0, String arg1) {
-    wrappedResponse.setHeader(arg0, arg1);
-  }
-
-  public void setIntHeader(String arg0, int arg1) {
-    wrappedResponse.setIntHeader(arg0, arg1);
-  }
-
-  public void setLocale(Locale arg0) {
-    wrappedResponse.setLocale(arg0);
-  }
-
-  @Deprecated
-  public void setStatus(int arg0, String arg1) {
-    wrappedResponse.setStatus(arg0, arg1);
-  }
-
-  public void setStatus(int arg0) {
-    wrappedResponse.setStatus(arg0);
-  }
-
 }
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/classic/ob-classic-window.js	Tue Nov 18 10:57:35 2014 +0100
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/classic/ob-classic-window.js	Tue Nov 18 11:03:11 2014 +0100
@@ -46,7 +46,10 @@
   // ignore the tab info update for one time, to prevent double history entries
   ignoreTabInfoUpdate: true,
   hasBeenDrawnOnce: false,
-  appFrameWindow: null
+  appFrameWindow: null,
+  // forcing this this tab to be in the bottom in order to make context menu of
+  // other tabs work in chrome, see https://issues.openbravo.com/view.php?id=27959
+  zIndex: 1
 });
 
 isc.OBClassicWindow.addMethods({
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-date.js	Tue Nov 18 10:57:35 2014 +0100
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-date.js	Tue Nov 18 11:03:11 2014 +0100
@@ -52,7 +52,7 @@
 
     dateFormatUpper = this.dateFormat.toUpperCase();
     length = dateFormatUpper.length;
-    this.dateSeparator = this.dateFormat.toUpperCase().replace(/D/g, '').replace(/M/g, '').replace(/Y/g, '').substr(0, 1);
+    this.dateSeparator = OB.Utilities.Date.getDateSeparator(this.dateFormat);
 
     for (i = 0; i < length; i++) {
       if (this.isSeparator(dateFormatUpper, i)) {
@@ -224,7 +224,7 @@
   },
 
   isSeparator: function (str, position) {
-    return str.charAt(position) === '-' || str.charAt(position) === '\\' || str.charAt(position) === '/';
+    return str.charAt(position) === '-' || str.charAt(position) === '\\' || str.charAt(position) === '/' || str.charAt(position) === OB.Utilities.Date.getDateSeparator(OB.Format.date);
   },
 
   hasSeparator: function (str) {
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-grid.js	Tue Nov 18 10:57:35 2014 +0100
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-grid.js	Tue Nov 18 11:03:11 2014 +0100
@@ -271,7 +271,7 @@
       return null;
     }
 
-    if (field.isLink && !field.clientClass && record[field.name]) {
+    if (!OB.User.isPortal && field.isLink && !field.clientClass && record[field.name]) {
       // To keep compatibility with < 3.0MP20 versions that didn't implement 'clientClass' and only have 'isLink' property
       field.clientClass = 'OBGridLinkCellClick';
     }
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js	Tue Nov 18 10:57:35 2014 +0100
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js	Tue Nov 18 11:03:11 2014 +0100
@@ -2956,7 +2956,9 @@
     this.view.standardWindow.autoSaveDone(this.view, true);
 
     // if nothing else got selected, select ourselves then
-    if (!this.getSelectedRecord() || (this.getSelectedRecord().id === record._originalId)) {
+    // if there is already a record selected, only force reselecting that record if the editCompletionEvent was 'programmatic', 
+    // otherwise ('enter', 'tab', etc) it is not needed, and doing it causes https://issues.openbravo.com/view.php?id=27957  
+    if (!this.getSelectedRecord() || (editCompletionEvent === 'programmatic' && this.getSelectedRecord().id === record._originalId)) {
       this.selectRecord(record);
       keepSelection = true;
       this.view.refreshChildViews(keepSelection);
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/return-material/ob-return-material.js	Tue Nov 18 10:57:35 2014 +0100
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/return-material/ob-return-material.js	Tue Nov 18 11:03:11 2014 +0100
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2011-2012 Openbravo SLU
+ * All portions are Copyright (C) 2011-2014 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -89,7 +89,13 @@
       selectedRecords = item.grid.getSelectedRecords(),
       selectedRecordsLength = selectedRecords.length,
       editedRecord = null,
-      i;
+      storageBin = record.storageBin,
+      i; 
+  //Cheking available stock
+  if (storageBin === null){
+	item.grid.view.messageBar.setMessage(isc.OBMessageBar.TYPE_ERROR, null, OB.I18N.getLabel('OBUIAPP_RM_NotAvailableStock', [record.rMOrderNo]));
+	return false;
+  }
   // check value is positive and below available qty and pending qty
   if (value === null || value < 0 || value > record.pending || value > record.availableQty) {
     if (record.pending < record.availableQty) {
@@ -110,6 +116,7 @@
       }
     }
   }
+  
   return true;
 };
 
@@ -123,9 +130,15 @@
       selectedRecords = grid.getSelectedRecords(),
       pending = new BigDecimal(String(record.pending)),
       availableQty = new BigDecimal(String(record.availableQty)),
+      storageBin = record.storageBin,
       editedRecord = null,
       i;
   if (state) {
+	//Cheking available stock
+	if (storageBin === null){
+	  grid.view.messageBar.setMessage(isc.OBMessageBar.TYPE_ERROR, null, OB.I18N.getLabel('OBUIAPP_RM_NotAvailableStock', [record.rMOrderNo]));
+	  return false;
+	}
     // calculate already shipped qty on grid
     for (i = 0; i < selectedRecords.length; i++) {
       editedRecord = isc.addProperties({}, selectedRecords[i], grid.getEditedRecord(selectedRecords[i]));
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-utilities-date.js	Tue Nov 18 10:57:35 2014 +0100
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-utilities-date.js	Tue Nov 18 11:03:11 2014 +0100
@@ -473,4 +473,13 @@
     newDate.setHours(newDate.getHours() + 1);
   }
   return newDate;
+};
+
+//** {{{ OB.Utilities.Date.getDateSeparator }}} **
+//
+// Returns the date separator
+OB.Utilities.Date.getDateSeparator = function (dateFormat) {
+  // obtains the date separator by selecting the first characters that is not 'D', 'M' or 'Y'
+  return dateFormat.toUpperCase().replace(/D/g, '').replace(/M/g, '').replace(/Y/g, '').substr(0, 1);
+
 };
\ No newline at end of file
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-utilities.js	Tue Nov 18 10:57:35 2014 +0100
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-utilities.js	Tue Nov 18 11:03:11 2014 +0100
@@ -213,7 +213,8 @@
   loadingLayout.addMember(isc.Label.create({
     contents: label,
     styleName: OB.Styles.LoadingPrompt.loadingTextStyleName,
-    width: 1,
+    width: 100,
+    align: 'right',
     overflow: 'visible'
   }));
   loadingLayout.addMember(isc.Img.create(OB.Styles.LoadingPrompt.loadingImage));
--- a/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/BaseKernelServlet.java	Tue Nov 18 10:57:35 2014 +0100
+++ b/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/BaseKernelServlet.java	Tue Nov 18 11:03:11 2014 +0100
@@ -11,7 +11,7 @@
  * under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2009-2011 Openbravo SLU 
+ * All portions are Copyright (C) 2009-2014 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -19,15 +19,12 @@
 package org.openbravo.client.kernel;
 
 import java.io.IOException;
-import java.io.PrintWriter;
-import java.util.Locale;
 
 import javax.servlet.ServletConfig;
 import javax.servlet.ServletException;
-import javax.servlet.ServletOutputStream;
-import javax.servlet.http.Cookie;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpServletResponseWrapper;
 import javax.servlet.http.HttpSession;
 
 import org.openbravo.base.secureApp.HttpSecureAppServlet;
@@ -56,8 +53,7 @@
       throws ServletException, IOException {
     // encapsulate the response to catch any redirects
     // redirects are done by the authentication manager
-    final KernelHttpServletResponse localResponse = new KernelHttpServletResponse();
-    localResponse.setDelegate(response);
+    final KernelHttpServletResponse localResponse = new KernelHttpServletResponse(response);
     RequestContext.get().setResponse(localResponse);
 
     callServiceInSuper(request, localResponse);
@@ -99,12 +95,19 @@
     }
   }
 
-  public static class KernelHttpServletResponse implements HttpServletResponse {
-    private HttpServletResponse delegate;
-
+  public static class KernelHttpServletResponse extends HttpServletResponseWrapper {
     private String redirectTarget = null;
     private boolean doLogout = false;
 
+    public KernelHttpServletResponse(HttpServletResponse response) {
+      super(response);
+    }
+
+    @Override
+    public void sendRedirect(String arg0) throws IOException {
+      setRedirectTarget(arg0);
+    }
+
     public boolean isDoLogout() {
       return doLogout;
     }
@@ -120,137 +123,5 @@
     public void setRedirectTarget(String redirectTarget) {
       this.redirectTarget = redirectTarget;
     }
-
-    public void addCookie(Cookie arg0) {
-      delegate.addCookie(arg0);
-    }
-
-    public void addDateHeader(String arg0, long arg1) {
-      delegate.addDateHeader(arg0, arg1);
-    }
-
-    public void addHeader(String arg0, String arg1) {
-      delegate.addHeader(arg0, arg1);
-    }
-
-    public void addIntHeader(String arg0, int arg1) {
-      delegate.addIntHeader(arg0, arg1);
-    }
-
-    public boolean containsHeader(String arg0) {
-      return delegate.containsHeader(arg0);
-    }
-
-    public String encodeRedirectUrl(String arg0) {
-      return delegate.encodeRedirectUrl(arg0);
-    }
-
-    public String encodeRedirectURL(String arg0) {
-      return delegate.encodeRedirectURL(arg0);
-    }
-
-    public String encodeUrl(String arg0) {
-      return delegate.encodeUrl(arg0);
-    }
-
-    public String encodeURL(String arg0) {
-      return delegate.encodeURL(arg0);
-    }
-
-    public void flushBuffer() throws IOException {
-      delegate.flushBuffer();
-    }
-
-    public int getBufferSize() {
-      return delegate.getBufferSize();
-    }
-
-    public String getCharacterEncoding() {
-      return delegate.getCharacterEncoding();
-    }
-
-    public String getContentType() {
-      return delegate.getContentType();
-    }
-
-    public Locale getLocale() {
-      return delegate.getLocale();
-    }
-
-    public ServletOutputStream getOutputStream() throws IOException {
-      return delegate.getOutputStream();
-    }
-
-    public PrintWriter getWriter() throws IOException {
-      return delegate.getWriter();
-    }
-
-    public boolean isCommitted() {
-      return delegate.isCommitted();
-    }
-
-    public void reset() {
-      delegate.reset();
-    }
-
-    public void resetBuffer() {
-      delegate.resetBuffer();
-    }
-
-    public void sendError(int arg0, String arg1) throws IOException {
-      delegate.sendError(arg0, arg1);
-    }
-
-    public void sendError(int arg0) throws IOException {
-      delegate.sendError(arg0);
-    }
-
-    public void sendRedirect(String arg0) throws IOException {
-      setRedirectTarget(arg0);
-    }
-
-    public void setBufferSize(int arg0) {
-      delegate.setBufferSize(arg0);
-    }
-
-    public void setCharacterEncoding(String arg0) {
-      delegate.setCharacterEncoding(arg0);
-    }
-
-    public void setContentLength(int arg0) {
-      delegate.setContentLength(arg0);
-    }
-
-    public void setContentType(String arg0) {
-      delegate.setContentType(arg0);
-    }
-
-    public void setDateHeader(String arg0, long arg1) {
-      delegate.setDateHeader(arg0, arg1);
-    }
-
-    public void setHeader(String arg0, String arg1) {
-      delegate.setHeader(arg0, arg1);
-    }
-
-    public void setIntHeader(String arg0, int arg1) {
-      delegate.setIntHeader(arg0, arg1);
-    }
-
-    public void setLocale(Locale arg0) {
-      delegate.setLocale(arg0);
-    }
-
-    public void setStatus(int arg0, String arg1) {
-      delegate.setStatus(arg0, arg1);
-    }
-
-    public void setStatus(int arg0) {
-      delegate.setStatus(arg0);
-    }
-
-    public void setDelegate(HttpServletResponse delegate) {
-      this.delegate = delegate;
-    }
   }
 }
--- a/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/RequestContext.java	Tue Nov 18 10:57:35 2014 +0100
+++ b/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/RequestContext.java	Tue Nov 18 11:03:11 2014 +0100
@@ -11,7 +11,7 @@
  * under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2009-2011 Openbravo SLU 
+ * All portions are Copyright (C) 2009-2014 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -21,29 +21,15 @@
 import java.io.BufferedReader;
 import java.io.ByteArrayInputStream;
 import java.io.IOException;
-import java.io.InputStream;
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import java.io.UnsupportedEncodingException;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.security.Principal;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Enumeration;
 import java.util.HashMap;
 import java.util.List;
-import java.util.Locale;
 import java.util.Map;
-import java.util.Set;
 
-import javax.servlet.RequestDispatcher;
-import javax.servlet.Servlet;
 import javax.servlet.ServletContext;
-import javax.servlet.ServletException;
 import javax.servlet.ServletInputStream;
-import javax.servlet.ServletOutputStream;
-import javax.servlet.http.Cookie;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import javax.servlet.http.HttpSession;
@@ -61,18 +47,18 @@
  * <li>Makes it possible to set request parameters to simulate a request from a client to a server.</li>
  * </ul>
  * 
- * Note: compiling through ant gives a deprecated api usage warning, this seems to be a javac bug:
- * http://bugs.sun.com/view_bug.do?bug_id=6460147
- * 
  * @author mtaal
  */
 @SuppressWarnings("deprecation")
 public class RequestContext {
-  private static ServletContext servletContext = new LocalServletContext();
+  private static ServletContext servletContext = null;
 
   private static ThreadLocal<RequestContext> instance = new ThreadLocal<RequestContext>();
 
   public static ServletContext getServletContext() {
+    if (servletContext == null) {
+      throw new OBException("Servlet Context is null");
+    }
     return servletContext;
   }
 
@@ -154,16 +140,18 @@
   }
 
   public HttpServletRequest getRequest() {
-    if (!(request instanceof HttpServletRequestWrapper)) {
-      final HttpServletRequestWrapper wrapper = new HttpServletRequestWrapper();
-      wrapper.setDelegate(request);
+    if (request != null && !(request instanceof HttpServletRequestWrapper)) {
+      final HttpServletRequestWrapper wrapper = new HttpServletRequestWrapper(request);
       request = wrapper;
     }
     return request;
   }
 
   public void setRequestContent(String requestContent) {
-    ((HttpServletRequestWrapper) getRequest()).setRequestContent(requestContent);
+    HttpServletRequestWrapper req = (HttpServletRequestWrapper) getRequest();
+    if (req != null) {
+      req.setRequestContent(requestContent);
+    }
   }
 
   public VariablesSecureApp getVariablesSecureApp() {
@@ -186,10 +174,12 @@
     this.request = request;
   }
 
+  /**
+   * This method makes only sense to be invoked from a Request in a servlet container, other cases
+   * response will be null
+   * 
+   */
   public HttpServletResponse getResponse() {
-    if (response == null) {
-      response = new HttpServletResponseWrapper();
-    }
     return response;
   }
 
@@ -197,16 +187,23 @@
     this.response = response;
   }
 
-  public static class HttpServletRequestWrapper implements HttpServletRequest {
+  public static class HttpServletRequestWrapper extends
+      javax.servlet.http.HttpServletRequestWrapper {
+
     private HttpServletRequest delegate;
     private Map<String, Object> attributes = new HashMap<String, Object>();
-    private Map<String, String> parameters = new HashMap<String, String>();
+    private Map<String, String[]> parameters = new HashMap<String, String[]>();
     private HttpSession localSession = null;
     private String requestContent;
     private ServletInputStream inputStream;
 
+    public HttpServletRequestWrapper(HttpServletRequest request) {
+      super(request);
+      delegate = request;
+    }
+
     public void setParameter(String arg0, String arg1) {
-      parameters.put(arg0, arg1);
+      parameters.put(arg0, new String[] { arg1 });
     }
 
     public Object getAttribute(String arg0) {
@@ -216,7 +213,8 @@
       return delegate.getAttribute(arg0);
     }
 
-    public Enumeration<?> getAttributeNames() {
+    @SuppressWarnings("unchecked")
+    public Enumeration<String> getAttributeNames() {
       if (delegate == null) {
         final List<String> names = new ArrayList<String>();
         names.addAll(attributes.keySet());
@@ -225,18 +223,6 @@
       return delegate.getAttributeNames();
     }
 
-    public String getAuthType() {
-      return delegate.getAuthType();
-    }
-
-    public String getCharacterEncoding() {
-      return delegate.getCharacterEncoding();
-    }
-
-    public int getContentLength() {
-      return delegate.getContentLength();
-    }
-
     public String getContentType() {
       if (delegate == null) {
         return "text/html";
@@ -244,30 +230,6 @@
       return delegate.getContentType();
     }
 
-    public String getContextPath() {
-      return delegate.getContextPath();
-    }
-
-    public Cookie[] getCookies() {
-      return delegate.getCookies();
-    }
-
-    public long getDateHeader(String arg0) {
-      return delegate.getDateHeader(arg0);
-    }
-
-    public String getHeader(String arg0) {
-      return delegate.getHeader(arg0);
-    }
-
-    public Enumeration<?> getHeaderNames() {
-      return delegate.getHeaderNames();
-    }
-
-    public Enumeration<?> getHeaders(String arg0) {
-      return delegate.getHeaders(arg0);
-    }
-
     public ServletInputStream getInputStream() throws IOException {
       if (delegate == null) {
         if (inputStream == null) {
@@ -275,7 +237,6 @@
             inputStream = new ServletInputStream() {
               @Override
               public int read() throws IOException {
-                // TODO Auto-generated method stub
                 return 0;
               }
             };
@@ -290,47 +251,19 @@
       return delegate.getInputStream();
     }
 
-    public int getIntHeader(String arg0) {
-      return delegate.getIntHeader(arg0);
-    }
-
-    public String getLocalAddr() {
-      return delegate.getLocalAddr();
-    }
-
-    public Locale getLocale() {
-      return delegate.getLocale();
-    }
-
-    public Enumeration<?> getLocales() {
-      return delegate.getLocales();
-    }
-
-    public String getLocalName() {
-      return delegate.getLocalName();
-    }
-
-    public int getLocalPort() {
-      return delegate.getLocalPort();
-    }
-
-    public String getMethod() {
-      return delegate.getMethod();
-    }
-
     public String getParameter(String arg0) {
       if (delegate == null || parameters.containsKey(arg0)) {
-        return parameters.get(arg0);
+        final String[] param = parameters.get(arg0);
+        if (param == null || param.length == 0) {
+          return null;
+        }
+        return param[0];
       }
       return delegate.getParameter(arg0);
     }
 
-    public Map<?, ?> getParameterMap() {
-      return parameters;
-    }
-
     @SuppressWarnings("unchecked")
-    public Enumeration<?> getParameterNames() {
+    public Enumeration<String> getParameterNames() {
       final List<String> names = new ArrayList<String>();
       names.addAll(parameters.keySet());
       if (delegate != null) {
@@ -341,64 +274,11 @@
 
     public String[] getParameterValues(String arg0) {
       if (delegate == null || parameters.containsKey(arg0)) {
-        final String value = parameters.get(arg0);
-        if (value == null) {
-          return null;
-        }
-        final String[] strArray = { value };
-        return strArray;
+        return parameters.get(arg0);
       }
       return delegate.getParameterValues(arg0);
     }
 
-    public String getPathInfo() {
-      return delegate.getPathInfo();
-    }
-
-    public String getPathTranslated() {
-      return delegate.getPathTranslated();
-    }
-
-    public String getProtocol() {
-      return delegate.getProtocol();
-    }
-
-    public String getQueryString() {
-      return delegate.getQueryString();
-    }
-
-    public BufferedReader getReader() throws IOException {
-      return delegate.getReader();
-    }
-
-    public String getRealPath(String arg0) {
-      return delegate.getRealPath(arg0);
-    }
-
-    public String getRemoteAddr() {
-      return delegate.getRemoteAddr();
-    }
-
-    public String getRemoteHost() {
-      return delegate.getRemoteHost();
-    }
-
-    public int getRemotePort() {
-      return delegate.getRemotePort();
-    }
-
-    public String getRemoteUser() {
-      return delegate.getRemoteUser();
-    }
-
-    public RequestDispatcher getRequestDispatcher(String arg0) {
-      return delegate.getRequestDispatcher(arg0);
-    }
-
-    public String getRequestedSessionId() {
-      return delegate.getRequestedSessionId();
-    }
-
     public String getRequestURI() {
       if (delegate == null) {
         return "";
@@ -406,26 +286,6 @@
       return delegate.getRequestURI();
     }
 
-    public StringBuffer getRequestURL() {
-      return delegate.getRequestURL();
-    }
-
-    public String getScheme() {
-      return delegate.getScheme();
-    }
-
-    public String getServerName() {
-      return delegate.getServerName();
-    }
-
-    public int getServerPort() {
-      return delegate.getServerPort();
-    }
-
-    public String getServletPath() {
-      return delegate.getServletPath();
-    }
-
     public HttpSession getSession() {
       if (delegate == null) {
         if (localSession == null) {
@@ -446,34 +306,6 @@
       return delegate.getSession(arg0);
     }
 
-    public Principal getUserPrincipal() {
-      return delegate.getUserPrincipal();
-    }
-
-    public boolean isRequestedSessionIdFromCookie() {
-      return delegate.isRequestedSessionIdFromCookie();
-    }
-
-    public boolean isRequestedSessionIdFromUrl() {
-      return delegate.isRequestedSessionIdFromUrl();
-    }
-
-    public boolean isRequestedSessionIdFromURL() {
-      return delegate.isRequestedSessionIdFromURL();
-    }
-
-    public boolean isRequestedSessionIdValid() {
-      return delegate.isRequestedSessionIdValid();
-    }
-
-    public boolean isSecure() {
-      return delegate.isSecure();
-    }
-
-    public boolean isUserInRole(String arg0) {
-      return delegate.isUserInRole(arg0);
-    }
-
     public void removeAttribute(String arg0) {
       if (delegate == null) {
         attributes.remove(arg0);
@@ -490,18 +322,10 @@
       delegate.setAttribute(arg0, arg1);
     }
 
-    public void setCharacterEncoding(String arg0) throws UnsupportedEncodingException {
-      delegate.setCharacterEncoding(arg0);
-    }
-
     public HttpServletRequest getDelegate() {
       return delegate;
     }
 
-    public void setDelegate(HttpServletRequest delegate) {
-      this.delegate = delegate;
-    }
-
     public String getRequestContent() {
       return requestContent;
     }
@@ -511,307 +335,11 @@
     }
   }
 
-  public static class HttpSessionWrapper implements HttpSession {
-
-    private Map<String, Object> attributes = new HashMap<String, Object>();
-
-    @Override
-    public Object getAttribute(String arg0) {
-      return attributes.get(arg0);
-    }
-
-    @Override
-    public Enumeration<?> getAttributeNames() {
-      return Collections.enumeration(attributes.keySet());
-    }
-
-    @Override
-    public long getCreationTime() {
-      // TODO Auto-generated method stub
-      return 0;
-    }
-
-    @Override
-    public String getId() {
-      // TODO Auto-generated method stub
-      return null;
-    }
-
-    @Override
-    public long getLastAccessedTime() {
-      // TODO Auto-generated method stub
-      return 0;
-    }
-
-    @Override
-    public int getMaxInactiveInterval() {
-      // TODO Auto-generated method stub
-      return 0;
-    }
-
+  public static class HttpSessionWrapper extends org.openbravo.base.HttpSessionWrapper {
     @Override
     public ServletContext getServletContext() {
       return servletContext;
     }
-
-    /**
-     * @deprecated
-     */
-    @Override
-    public javax.servlet.http.HttpSessionContext getSessionContext() {
-      // TODO Auto-generated method stub
-      return null;
-    }
-
-    @Override
-    public Object getValue(String arg0) {
-      return null;
-    }
-
-    @Override
-    public String[] getValueNames() {
-      return null;
-    }
-
-    @Override
-    public void invalidate() {
-      // TODO Auto-generated method stub
-
-    }
-
-    @Override
-    public boolean isNew() {
-      // TODO Auto-generated method stub
-      return false;
-    }
-
-    @Override
-    public void putValue(String arg0, Object arg1) {
-      // TODO Auto-generated method stub
-
-    }
-
-    @Override
-    public void removeAttribute(String arg0) {
-      setAttribute(arg0, null);
-    }
-
-    @Override
-    public void removeValue(String arg0) {
-      // TODO Auto-generated method stub
-    }
-
-    @Override
-    public void setAttribute(String arg0, Object arg1) {
-      attributes.put(arg0, arg1);
-    }
-
-    @Override
-    public void setMaxInactiveInterval(int arg0) {
-      // TODO Auto-generated method stub
-    }
-  }
-
-  public static class HttpServletResponseWrapper implements HttpServletResponse {
-    private StringWriter sWriter = new StringWriter();
-    private PrintWriter writer = new PrintWriter(sWriter);
-
-    public String getResponseContent() {
-      writer.flush();
-      sWriter.flush();
-      return sWriter.toString();
-    }
-
-    @Override
-    public void addCookie(Cookie arg0) {
-      // TODO Auto-generated method stub
-
-    }
-
-    @Override
-    public void addDateHeader(String arg0, long arg1) {
-      // TODO Auto-generated method stub
-
-    }
-
-    @Override
-    public void addHeader(String arg0, String arg1) {
-      // TODO Auto-generated method stub
-
-    }
-
-    @Override
-    public void addIntHeader(String arg0, int arg1) {
-      // TODO Auto-generated method stub
-
-    }
-
-    @Override
-    public boolean containsHeader(String arg0) {
-      // TODO Auto-generated method stub
-      return false;
-    }
-
-    @Override
-    public String encodeRedirectUrl(String arg0) {
-      // TODO Auto-generated method stub
-      return null;
-    }
-
-    @Override
-    public String encodeRedirectURL(String arg0) {
-      // TODO Auto-generated method stub
-      return null;
-    }
-
-    @Override
-    public String encodeUrl(String arg0) {
-      // TODO Auto-generated method stub
-      return null;
-    }
-
-    @Override
-    public String encodeURL(String arg0) {
-      // TODO Auto-generated method stub
-      return null;
-    }
-
-    @Override
-    public void sendError(int arg0, String arg1) throws IOException {
-      // TODO Auto-generated method stub
-
-    }
-
-    @Override
-    public void sendError(int arg0) throws IOException {
-      // TODO Auto-generated method stub
-
-    }
-
-    @Override
-    public void sendRedirect(String arg0) throws IOException {
-      // TODO Auto-generated method stub
-
-    }
-
-    @Override
-    public void setDateHeader(String arg0, long arg1) {
-      // TODO Auto-generated method stub
-
-    }
-
-    @Override
-    public void setHeader(String arg0, String arg1) {
-      // TODO Auto-generated method stub
-
-    }
-
-    @Override
-    public void setIntHeader(String arg0, int arg1) {
-      // TODO Auto-generated method stub
-
-    }
-
-    @Override
-    public void setStatus(int arg0, String arg1) {
-      // TODO Auto-generated method stub
-
-    }
-
-    @Override
-    public void setStatus(int arg0) {
-      // TODO Auto-generated method stub
-
-    }
-
-    @Override
-    public void flushBuffer() throws IOException {
-      // TODO Auto-generated method stub
-
-    }
-
-    @Override
-    public int getBufferSize() {
-      // TODO Auto-generated method stub
-      return 0;
-    }
-
-    @Override
-    public String getCharacterEncoding() {
-      // TODO Auto-generated method stub
-      return null;
-    }
-
-    @Override
-    public String getContentType() {
-      // TODO Auto-generated method stub
-      return null;
-    }
-
-    @Override
-    public Locale getLocale() {
-      // TODO Auto-generated method stub
-      return null;
-    }
-
-    @Override
-    public ServletOutputStream getOutputStream() throws IOException {
-      // TODO Auto-generated method stub
-      return null;
-    }
-
-    @Override
-    public PrintWriter getWriter() throws IOException {
-      return writer;
-    }
-
-    @Override
-    public boolean isCommitted() {
-      // TODO Auto-generated method stub
-      return false;
-    }
-
-    @Override
-    public void reset() {
-      // TODO Auto-generated method stub
-
-    }
-
-    @Override
-    public void resetBuffer() {
-      // TODO Auto-generated method stub
-
-    }
-
-    @Override
-    public void setBufferSize(int arg0) {
-      // TODO Auto-generated method stub
-
-    }
-
-    @Override
-    public void setCharacterEncoding(String arg0) {
-      // TODO Auto-generated method stub
-
-    }
-
-    @Override
-    public void setContentLength(int arg0) {
-      // TODO Auto-generated method stub
-
-    }
-
-    @Override
-    public void setContentType(String arg0) {
-      // TODO Auto-generated method stub
-
-    }
-
-    @Override
-    public void setLocale(Locale arg0) {
-      // TODO Auto-generated method stub
-
-    }
   }
 
   private static class LocalServletInputStream extends ServletInputStream {
@@ -874,160 +402,4 @@
     }
   }
 
-  public static class LocalServletContext implements ServletContext {
-
-    private Map<String, Object> attributes = new HashMap<String, Object>();
-
-    @Override
-    public Object getAttribute(String arg0) {
-      return attributes.get(arg0);
-    }
-
-    @SuppressWarnings({ "rawtypes" })
-    @Override
-    public Enumeration getAttributeNames() {
-      // TODO Auto-generated method stub
-      return null;
-    }
-
-    @Override
-    public ServletContext getContext(String arg0) {
-      // TODO Auto-generated method stub
-      return null;
-    }
-
-    public String getContextPath() {
-      // TODO Auto-generated method stub
-      return null;
-    }
-
-    @Override
-    public String getInitParameter(String arg0) {
-      // TODO Auto-generated method stub
-      return null;
-    }
-
-    @SuppressWarnings({ "rawtypes" })
-    @Override
-    public Enumeration getInitParameterNames() {
-      // TODO Auto-generated method stub
-      return null;
-    }
-
-    @Override
-    public int getMajorVersion() {
-      // TODO Auto-generated method stub
-      return 0;
-    }
-
-    @Override
-    public String getMimeType(String arg0) {
-      // TODO Auto-generated method stub
-      return null;
-    }
-
-    @Override
-    public int getMinorVersion() {
-      // TODO Auto-generated method stub
-      return 0;
-    }
-
-    @Override
-    public RequestDispatcher getNamedDispatcher(String arg0) {
-      // TODO Auto-generated method stub
-      return null;
-    }
-
-    @Override
-    public String getRealPath(String arg0) {
-      // TODO Auto-generated method stub
-      return null;
-    }
-
-    @Override
-    public RequestDispatcher getRequestDispatcher(String arg0) {
-      // TODO Auto-generated method stub
-      return null;
-    }
-
-    @Override
-    public URL getResource(String arg0) throws MalformedURLException {
-      // TODO Auto-generated method stub
-      return null;
-    }
-
-    @Override
-    public InputStream getResourceAsStream(String arg0) {
-      // TODO Auto-generated method stub
-      return null;
-    }
-
-    @SuppressWarnings({ "rawtypes" })
-    @Override
-    public Set getResourcePaths(String arg0) {
-      // TODO Auto-generated method stub
-      return null;
-    }
-
-    @Override
-    public String getServerInfo() {
-      // TODO Auto-generated method stub
-      return null;
-    }
-
-    @Override
-    public Servlet getServlet(String arg0) throws ServletException {
-      // TODO Auto-generated method stub
-      return null;
-    }
-
-    @Override
-    public String getServletContextName() {
-      // TODO Auto-generated method stub
-      return null;
-    }
-
-    @SuppressWarnings({ "rawtypes" })
-    @Override
-    public Enumeration getServletNames() {
-      // TODO Auto-generated method stub
-      return null;
-    }
-
-    @SuppressWarnings({ "rawtypes" })
-    @Override
-    public Enumeration getServlets() {
-      // TODO Auto-generated method stub
-      return null;
-    }
-
-    @Override
-    public void log(Exception arg0, String arg1) {
-      // TODO Auto-generated method stub
-
-    }
-
-    @Override
-    public void log(String arg0, Throwable arg1) {
-      // TODO Auto-generated method stub
-
-    }
-
-    @Override
-    public void log(String arg0) {
-      // TODO Auto-generated method stub
-
-    }
-
-    @Override
-    public void removeAttribute(String arg0) {
-      attributes.remove(arg0);
-    }
-
-    @Override
-    public void setAttribute(String arg0, Object arg1) {
-      attributes.put(arg0, arg1);
-    }
-  }
-
 }
--- a/modules/org.openbravo.client.querylist/web/org.openbravo.client.querylist/js/ob-querylist-widget.js	Tue Nov 18 10:57:35 2014 +0100
+++ b/modules/org.openbravo.client.querylist/web/org.openbravo.client.querylist/js/ob-querylist-widget.js	Tue Nov 18 11:03:11 2014 +0100
@@ -58,7 +58,7 @@
     if (this.fields) {
       for (i = 0; i < this.fields.length; i++) {
         field = this.fields[i];
-        if (field.isLink && !field.clientClass) {
+        if (!OB.User.isPortal && field.isLink && !field.clientClass) {
           field.clientClass = 'OBQLCanvasItem_Link';
         }
       }
--- a/modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/DataSourceServiceProvider.java	Tue Nov 18 10:57:35 2014 +0100
+++ b/modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/DataSourceServiceProvider.java	Tue Nov 18 11:03:11 2014 +0100
@@ -26,6 +26,7 @@
 
 import org.hibernate.criterion.Restrictions;
 import org.openbravo.base.exception.OBException;
+import org.openbravo.base.model.Entity;
 import org.openbravo.base.model.ModelProvider;
 import org.openbravo.base.util.OBClassLoader;
 import org.openbravo.base.weld.WeldUtils;
@@ -54,63 +55,124 @@
    * Checks the internal cache for a datasource with the requested name and returns it if found. If
    * not found a new one is created, which is cached and then returned.
    * 
-   * @param name
+   * @param dataSourceIdentifier
    *          the name by which to search and identify the data source.
    * @return a {@link DataSourceService} object
    */
-  @SuppressWarnings("unchecked")
-  public DataSourceService getDataSource(String name) {
-    DataSourceService ds = dataSources.get(name);
-    if (ds == null) {
+  public DataSourceService getDataSource(String dataSourceIdentifier) {
+    DataSourceService dataSourceService = dataSources.get(dataSourceIdentifier);
+    if (dataSourceService == null) {
       OBContext.setAdminMode();
       try {
-        DataSource dataSource = OBDal.getInstance().get(DataSource.class, name);
-        if (dataSource == null) {
-
-          final OBCriteria<DataSource> obCriteria = OBDal.getInstance().createCriteria(
-              DataSource.class);
-          obCriteria.add(Restrictions.eq(DataSource.PROPERTY_NAME, name));
-          if (!obCriteria.list().isEmpty()) {
-            dataSource = obCriteria.list().get(0);
-          }
-        }
-        if (dataSource == null) {
-          final OBCriteria<Table> qTable = OBDal.getInstance().createCriteria(Table.class);
-          qTable.add(Restrictions.eq(Table.PROPERTY_NAME, name));
-          if (!qTable.list().isEmpty()) {
-            Table table = (Table) qTable.list().get(0);
-            if (ApplicationConstants.DATASOURCEBASEDTABLE.equals(table.getDataOriginType())) {
-              dataSource = table.getObserdsDatasource();
-              ds.setEntity(ModelProvider.getInstance().getEntityByTableId(table.getId()));
-            } else if (ApplicationConstants.HQLBASEDTABLE.equals(table.getDataOriginType())) {
-              dataSource = OBDal.getInstance().get(DataSource.class,
-                  ApplicationConstants.HQL_TABLE_DATASOURCE_ID);
-            }
-          }
-          if (dataSource == null) {
-            ds = weldUtils.getInstance(DefaultDataSourceService.class);
-            ds.setName(name);
-            ds.setEntity(ModelProvider.getInstance().getEntity(name));
-            dataSources.put(name, ds);
-          }
-
-        } else {
-          if (dataSource.getJavaClassName() != null) {
-            final Class<DataSourceService> clz = (Class<DataSourceService>) OBClassLoader
-                .getInstance().loadClass(dataSource.getJavaClassName());
-            ds = weldUtils.getInstance(clz);
-          } else {
-            ds = new DefaultDataSourceService();
-          }
-          ds.setDataSource(dataSource);
-          dataSources.put(name, ds);
-        }
+        DataSource dataSource = getRealDataSource(dataSourceIdentifier);
+        dataSourceService = getDataSourceServiceFromDataSource(dataSource, dataSourceIdentifier);
+        dataSources.put(dataSourceIdentifier, dataSourceService);
       } catch (Exception e) {
         throw new OBException(e);
       } finally {
         OBContext.restorePreviousMode();
       }
     }
+    return dataSourceService;
+  }
+
+  /**
+   * Obtains a dataSource given a dataSource identifier.
+   * 
+   * This class should have been named getDataSource instead of getRealDataSource, but the name was
+   * already taken by a public method that returns a DataSourceService
+   * 
+   * @param dataSourceIdentifier
+   *          a string that identifies the dataSource. it can be either the ID of the DataSource,
+   *          the name of the DataSource or the name of the Table whose datasource is to be
+   *          retrieved
+   * @return the datasource associated with the provided identifier or null if there aren't any
+   */
+  private DataSource getRealDataSource(String dataSourceIdentifier) {
+    // Checks if the dataSourceIdentifier the ID of the DataSource
+    DataSource dataSource = getDataSourceFromDataSourceId(dataSourceIdentifier);
+    if (dataSource == null) {
+      // If it is not the ID of the DataSource, checks if it is its name
+      dataSource = getDataSourceFromDataSourceName(dataSourceIdentifier);
+      if (dataSource == null) {
+        // If the dataSourceIdentifier is not the DataSource ID nor its name, checks if it is the
+        // name of a Table
+        dataSource = getDataSourceFromTableName(dataSourceIdentifier);
+      }
+    }
+    return dataSource;
+  }
+
+  private DataSource getDataSourceFromDataSourceId(String dataSourceId) {
+    return OBDal.getInstance().get(DataSource.class, dataSourceId);
+  }
+
+  private DataSource getDataSourceFromDataSourceName(String dataSourceName) {
+    DataSource dataSource = null;
+    final OBCriteria<DataSource> obCriteria = OBDal.getInstance().createCriteria(DataSource.class);
+    obCriteria.add(Restrictions.eq(DataSource.PROPERTY_NAME, dataSourceName));
+    if (!obCriteria.list().isEmpty()) {
+      dataSource = obCriteria.list().get(0);
+    }
+    return dataSource;
+  }
+
+  private DataSource getDataSourceFromTableName(String tableName) {
+    DataSource dataSource = null;
+    final OBCriteria<Table> qTable = OBDal.getInstance().createCriteria(Table.class);
+    qTable.add(Restrictions.eq(Table.PROPERTY_NAME, tableName));
+    if (!qTable.list().isEmpty()) {
+      Table table = (Table) qTable.list().get(0);
+      if (ApplicationConstants.DATASOURCEBASEDTABLE.equals(table.getDataOriginType())) {
+        // If the table is based on a manual datasource, return that particular datasource
+        dataSource = table.getObserdsDatasource();
+      } else if (ApplicationConstants.HQLBASEDTABLE.equals(table.getDataOriginType())) {
+        // If the table is based on a HQL table, use the 'HQL Tables Datasource'
+        dataSource = OBDal.getInstance().get(DataSource.class,
+            ApplicationConstants.HQL_TABLE_DATASOURCE_ID);
+      }
+    }
+    return dataSource;
+  }
+
+  /**
+   * Returns a DataSourceService given a DataSource
+   * 
+   * @param dataSource
+   *          the dataSource whose DataSourceService is to be retrieved
+   * @param dataSourceIdentifier
+   *          the name that was used to retrieve the dataSource
+   * @return the DataSourceService associated with the provided DataSource, or the
+   *         DefaultDataSourceService otherwise
+   * @throws ClassNotFoundException
+   */
+  private DataSourceService getDataSourceServiceFromDataSource(DataSource dataSource,
+      String dataSourceIdentifier) throws ClassNotFoundException {
+    DataSourceService ds = null;
+    if (dataSource == null) {
+      // if no dataSource is provided, return the DefaultDataSourceService
+      ds = weldUtils.getInstance(DefaultDataSourceService.class);
+      ds.setName(dataSourceIdentifier);
+    } else {
+      // try to retrieve the DataSourceService through the dataSource java class name, otherwise
+      // return the DefaultDataSourceService
+      if (dataSource.getJavaClassName() != null) {
+        @SuppressWarnings("unchecked")
+        final Class<DataSourceService> clz = (Class<DataSourceService>) OBClassLoader.getInstance()
+            .loadClass(dataSource.getJavaClassName());
+        ds = weldUtils.getInstance(clz);
+      } else {
+        ds = new DefaultDataSourceService();
+      }
+      ds.setDataSource(dataSource);
+    }
+    // don't fail if the entity does not exist, just don't assign it to the DataSourceService
+    boolean checkIfNotExists = false;
+    Entity entity = ModelProvider.getInstance().getEntity(dataSourceIdentifier, checkIfNotExists);
+    if (entity != null) {
+      ds.setEntity(entity);
+    }
     return ds;
   }
+
 }
--- a/modules/org.openbravo.service.json/src/org/openbravo/service/json/AdvancedQueryBuilder.java	Tue Nov 18 10:57:35 2014 +0100
+++ b/modules/org.openbravo.service.json/src/org/openbravo/service/json/AdvancedQueryBuilder.java	Tue Nov 18 11:03:11 2014 +0100
@@ -54,7 +54,9 @@
 import org.openbravo.model.ad.datamodel.Table;
 import org.openbravo.model.ad.domain.Reference;
 import org.openbravo.model.ad.domain.ReferencedTable;
+import org.openbravo.model.ad.system.Client;
 import org.openbravo.model.ad.ui.Tab;
+import org.openbravo.model.common.enterprise.Organization;
 import org.openbravo.service.db.DalConnectionProvider;
 
 /**
@@ -216,9 +218,27 @@
 
     if (subEntity != null) {
       // if there's subentity, process it as a subquery with "exists"
-      String subEntityClientOrg = " and e.organization.id "
+
+      String orgPath;
+      if (subEntity.getMappingClass().isAssignableFrom(Organization.class)) {
+        // special case subentity is Organization, so no extra path required to get it
+        orgPath = "e";
+      } else {
+        orgPath = "e.organization";
+      }
+
+      String subEntityClientOrg = " and " + orgPath + ".id "
           + createInClause(OBContext.getOBContext().getReadableOrganizations());
-      subEntityClientOrg += " and e.client.id "
+
+      String clientPath;
+      if (subEntity.getMappingClass().isAssignableFrom(Client.class)) {
+        // special case subentity is Client, so no extra path required to get it
+        clientPath = "e";
+      } else {
+        clientPath = "e.client";
+      }
+
+      subEntityClientOrg += " and " + clientPath + ".id "
           + createInClause(OBContext.getOBContext().getReadableClients());
 
       AdvancedQueryBuilder subEntityQueryBuilder = subDataEntityQueryService.getQueryBuilder();
--- a/modules/org.openbravo.service.json/src/org/openbravo/service/json/DataToJsonConverter.java	Tue Nov 18 10:57:35 2014 +0100
+++ b/modules/org.openbravo.service.json/src/org/openbravo/service/json/DataToJsonConverter.java	Tue Nov 18 11:03:11 2014 +0100
@@ -22,6 +22,7 @@
 import java.sql.Timestamp;
 import java.text.SimpleDateFormat;
 import java.util.ArrayList;
+import java.util.Calendar;
 import java.util.Date;
 import java.util.List;
 import java.util.Map;
@@ -43,7 +44,6 @@
 import org.openbravo.base.structure.BaseOBObject;
 import org.openbravo.dal.core.DalUtil;
 import org.openbravo.dal.core.OBContext;
-import org.openbravo.erpCommon.utility.OBDateUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -363,7 +363,7 @@
       if (property.getDomainType() instanceof TimestampDomainType) {
 
         Timestamp localTime = (Timestamp) value;
-        Date UTCTime = OBDateUtils.convertToUTC(localTime);
+        Date UTCTime = convertToUTC(localTime);
 
         return xmlTimeFormatWithoutMTOffset.format(UTCTime);
       } else if (property.getDomainType() instanceof AbsoluteTimeDomainType) {
@@ -388,6 +388,20 @@
     return value;
   }
 
+  private static Date convertToUTC(Date localTime) {
+    Calendar now = Calendar.getInstance();
+    Calendar calendar = Calendar.getInstance();
+    calendar.setTime(localTime);
+    calendar.set(Calendar.DATE, now.get(Calendar.DATE));
+    calendar.set(Calendar.MONTH, now.get(Calendar.MONTH));
+    calendar.set(Calendar.YEAR, now.get(Calendar.YEAR));
+
+    int gmtMillisecondOffset = (now.get(Calendar.ZONE_OFFSET) + now.get(Calendar.DST_OFFSET));
+    calendar.add(Calendar.MILLISECOND, -gmtMillisecondOffset);
+
+    return calendar.getTime();
+  }
+
   protected Object convertPrimitiveValue(Object value) {
     if (value == null) {
       // Do not return null, or they key and value of this particular column will
--- a/modules/org.openbravo.userinterface.selector/src-db/database/sourcedata/OBUISEL_SELECTOR.xml	Tue Nov 18 10:57:35 2014 +0100
+++ b/modules/org.openbravo.userinterface.selector/src-db/database/sourcedata/OBUISEL_SELECTOR.xml	Tue Nov 18 11:03:11 2014 +0100
@@ -14,7 +14,7 @@
 <!--387D9FFC48A74054835C5DF6E6FD08F7-->  <VALUEFIELD_ID><![CDATA[DD28F69792084E7F8EBBF2FA94F52A5F]]></VALUEFIELD_ID>
 <!--387D9FFC48A74054835C5DF6E6FD08F7-->  <DISPLAYFIELD_ID><![CDATA[DD28F69792084E7F8EBBF2FA94F52A5F]]></DISPLAYFIELD_ID>
 <!--387D9FFC48A74054835C5DF6E6FD08F7-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[substring]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--387D9FFC48A74054835C5DF6E6FD08F7-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--387D9FFC48A74054835C5DF6E6FD08F7-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--387D9FFC48A74054835C5DF6E6FD08F7-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--387D9FFC48A74054835C5DF6E6FD08F7--></OBUISEL_SELECTOR>
 
@@ -30,7 +30,7 @@
 <!--E4F389D409DF4EC3B371B69C8A124DA7-->  <OBCLKER_TEMPLATE_ID><![CDATA[9314DE8599AD44E7BFC4CC50699042AB]]></OBCLKER_TEMPLATE_ID>
 <!--E4F389D409DF4EC3B371B69C8A124DA7-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--E4F389D409DF4EC3B371B69C8A124DA7-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[substring]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--E4F389D409DF4EC3B371B69C8A124DA7-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--E4F389D409DF4EC3B371B69C8A124DA7-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--E4F389D409DF4EC3B371B69C8A124DA7-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--E4F389D409DF4EC3B371B69C8A124DA7--></OBUISEL_SELECTOR>
 
@@ -46,7 +46,7 @@
 <!--F959A77A1E494215A8154F12EF91FE74-->  <OBCLKER_TEMPLATE_ID><![CDATA[9314DE8599AD44E7BFC4CC50699042AB]]></OBCLKER_TEMPLATE_ID>
 <!--F959A77A1E494215A8154F12EF91FE74-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--F959A77A1E494215A8154F12EF91FE74-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[startsWith]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--F959A77A1E494215A8154F12EF91FE74-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--F959A77A1E494215A8154F12EF91FE74-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--F959A77A1E494215A8154F12EF91FE74-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--F959A77A1E494215A8154F12EF91FE74--></OBUISEL_SELECTOR>
 
--- a/modules/org.openbravo.userinterface.selector/web/org.openbravo.userinterface.selector/js/ob-selector-item.js	Tue Nov 18 10:57:35 2014 +0100
+++ b/modules/org.openbravo.userinterface.selector/web/org.openbravo.userinterface.selector/js/ob-selector-item.js	Tue Nov 18 11:03:11 2014 +0100
@@ -603,7 +603,7 @@
     // Dropdown selector that shows more than one column.
     if (this.pickListFields.length > 1) {
       // calculate width of checkBox and first fields before selector field in viewGrid
-      if (!this.form.view.isShowingForm) {
+      if (this.form.view && !this.form.view.isShowingForm) {
         while (i < this.grid.fields.size() && nameField.localeCompare(this.grid.fields.get(i).valueField) !== 0) {
           leftFieldsWidth = leftFieldsWidth + this.grid.fields.get(i).width;
           i++;
--- a/src-core/build.xml	Tue Nov 18 10:57:35 2014 +0100
+++ b/src-core/build.xml	Tue Nov 18 11:03:11 2014 +0100
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!--
 ************************************************************************************
-* Copyright (C) 2001-2006 Openbravo S.L.U.
+* Copyright (C) 2001-2014 Openbravo S.L.U.
 * Licensed under the Apache Software License version 2.0
 * 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
@@ -44,7 +44,7 @@
   </target>
 
   <target name="compile" depends="init">
-    <javac srcdir="${build.core.src}" destdir="${build.core}" fork="true" deprecation="on" encoding="UTF-8" debug="true" debuglevel="lines,vars,source" includeantruntime="false">
+    <javac srcdir="${build.core.src}" destdir="${build.core}" fork="true" deprecation="off" encoding="UTF-8" debug="true" debuglevel="lines,vars,source" includeantruntime="false">
       <classpath refid="core.class.path"/>  
     </javac>
   </target>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src-core/src/org/openbravo/base/HttpSessionWrapper.java	Tue Nov 18 11:03:11 2014 +0100
@@ -0,0 +1,141 @@
+/*
+ ************************************************************************************
+ * Copyright (C) 2014 Openbravo S.L.U.
+ * Licensed under the Apache Software License version 2.0
+ * 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.
+ ************************************************************************************
+ */
+
+package org.openbravo.base;
+
+import java.util.Collections;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.servlet.ServletContext;
+import javax.servlet.http.HttpSession;
+
+/**
+ * Implements a fake HttpSession to be used when running out of a Servlet container (such as Quartz
+ * scheduler or jUnit)
+ * 
+ * @author alostale
+ *
+ */
+public class HttpSessionWrapper implements HttpSession {
+  private Map<String, Object> attributes = new HashMap<String, Object>();
+
+  @Override
+  public Object getAttribute(String arg0) {
+    return attributes.get(arg0);
+  }
+
+  @Override
+  public Enumeration<String> getAttributeNames() {
+    return Collections.enumeration(attributes.keySet());
+  }
+
+  @Override
+  public long getCreationTime() {
+    // TODO Auto-generated method stub
+    return 0;
+  }
+
+  @Override
+  public String getId() {
+    // TODO Auto-generated method stub
+    return null;
+  }
+
+  @Override
+  public long getLastAccessedTime() {
+    // TODO Auto-generated method stub
+    return 0;
+  }
+
+  @Override
+  public int getMaxInactiveInterval() {
+    // TODO Auto-generated method stub
+    return 0;
+  }
+
+  @Override
+  public ServletContext getServletContext() {
+    return null;
+  }
+
+  /**
+   * @deprecated
+   */
+  @Override
+  public javax.servlet.http.HttpSessionContext getSessionContext() {
+    // TODO Auto-generated method stub
+    return null;
+  }
+
+  /**
+   * @deprecated
+   */
+  @Override
+  public Object getValue(String arg0) {
+    return null;
+  }
+
+  /**
+   * @deprecated
+   */
+  @Override
+  public String[] getValueNames() {
+    return null;
+  }
+
+  @Override
+  public void invalidate() {
+    // TODO Auto-generated method stub
+
+  }
+
+  @Override
+  public boolean isNew() {
+    // TODO Auto-generated method stub
+    return false;
+  }
+
+  /**
+   * @deprecated
+   */
+  @Deprecated
+  @Override
+  public void putValue(String arg0, Object arg1) {
+    // TODO Auto-generated method stub
+
+  }
+
+  @Override
+  public void removeAttribute(String arg0) {
+    setAttribute(arg0, null);
+  }
+
+  /**
+   * @deprecated
+   */
+  @Override
+  public void removeValue(String arg0) {
+    // TODO Auto-generated method stub
+  }
+
+  @Override
+  public void setAttribute(String arg0, Object arg1) {
+    attributes.put(arg0, arg1);
+  }
+
+  @Override
+  public void setMaxInactiveInterval(int arg0) {
+    // TODO Auto-generated method stub
+  }
+}
--- a/src-core/src/org/openbravo/base/VariablesBase.java	Tue Nov 18 10:57:35 2014 +0100
+++ b/src-core/src/org/openbravo/base/VariablesBase.java	Tue Nov 18 11:03:11 2014 +0100
@@ -1,6 +1,6 @@
 /*
  ************************************************************************************
- * Copyright (C) 2001-2011 Openbravo S.L.U.
+ * Copyright (C) 2001-2014 Openbravo S.L.U.
  * Licensed under the Apache Software License version 2.0
  * 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
@@ -66,19 +66,26 @@
    */
   @SuppressWarnings("unchecked")
   public VariablesBase(HttpServletRequest request) {
-    this.session = request.getSession(true);
-    this.httpRequest = request;
-    this.isMultipart = ServletFileUpload.isMultipartContent(new ServletRequestContext(request));
-    if (isMultipart) {
-      DiskFileItemFactory factory = new DiskFileItemFactory();
-      // factory.setSizeThreshold(yourMaxMemorySize);
-      // factory.setRepositoryPath(yourTempDirectory);
-      ServletFileUpload upload = new ServletFileUpload(factory);
-      // upload.setSizeMax(yourMaxRequestSize);
-      try {
-        items = upload.parseRequest(request);
-      } catch (Exception ex) {
-        ex.printStackTrace();
+    if (request == null) {
+      // logging exception to obtain stack trace to pinpoint the cause
+      log4j.warn("Creating a VariablesBase with a null request", new Exception());
+      this.session = new HttpSessionWrapper();
+      this.isMultipart = false;
+    } else {
+      this.session = request.getSession(true);
+      this.httpRequest = request;
+      this.isMultipart = ServletFileUpload.isMultipartContent(new ServletRequestContext(request));
+      if (isMultipart) {
+        DiskFileItemFactory factory = new DiskFileItemFactory();
+        // factory.setSizeThreshold(yourMaxMemorySize);
+        // factory.setRepositoryPath(yourTempDirectory);
+        ServletFileUpload upload = new ServletFileUpload(factory);
+        // upload.setSizeMax(yourMaxRequestSize);
+        try {
+          items = upload.parseRequest(request);
+        } catch (Exception ex) {
+          ex.printStackTrace();
+        }
       }
     }
   }
@@ -128,10 +135,10 @@
    * @return
    */
   private String computeHash() {
-
-    long t = 0;
-    if (log4j.isDebugEnabled())
-      t = System.currentTimeMillis();
+    long t = System.currentTimeMillis();
+    if (httpRequest == null) {
+      return Long.toString(t);
+    }
     StringBuffer postString = new StringBuffer();
 
     for (String parameter : sortedParameters()) {
@@ -169,15 +176,19 @@
    */
   private List<String> sortedParameters() {
     if (sortedParameters == null) {
-      sortedParameters = new ArrayList<String>();
-      for (@SuppressWarnings("rawtypes")
-      Enumeration e = httpRequest.getParameterNames(); e.hasMoreElements();) {
-        String parameter = (String) e.nextElement();
-        if (!parameter.equalsIgnoreCase("Command") && !parameter.contains("ProcessId")) {
-          sortedParameters.add(parameter);
+      if (httpRequest == null) {
+        sortedParameters = new ArrayList<String>();
+      } else {
+        sortedParameters = new ArrayList<String>();
+        for (@SuppressWarnings("rawtypes")
+        Enumeration e = httpRequest.getParameterNames(); e.hasMoreElements();) {
+          String parameter = (String) e.nextElement();
+          if (!parameter.equalsIgnoreCase("Command") && !parameter.contains("ProcessId")) {
+            sortedParameters.add(parameter);
+          }
         }
+        Collections.sort(sortedParameters);
       }
-      Collections.sort(sortedParameters);
     }
     return sortedParameters;
   }
--- a/src-db/database/build-create.xml	Tue Nov 18 10:57:35 2014 +0100
+++ b/src-db/database/build-create.xml	Tue Nov 18 11:03:11 2014 +0100
@@ -258,6 +258,7 @@
           INSERT INTO AD_REGISTRATION_INFO(AD_REGISTRATION_INFO_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, CREATEDBY, UPDATED, UPDATEDBY)
           VALUES('0', '0', '0', 'Y', NOW(), '0', NOW(), '0');
           CALL AD_UPDATE_ACCESS();
+      	  ${bbdd.sessionConfig};
           SELECT AD_DB_MODIFIED('Y') FROM DUAL;
           UPDATE AD_MODULE SET ISINDEVELOPMENT='N', ISDEFAULT='N', SEQNO=NULL, STATUS='P', UPDATE_AVAILABLE=NULL, ISREGISTERED='N' WHERE STATUS IS NULL OR STATUS='I';
           CALL AD_LANGUAGE_CREATE(NULL);
@@ -303,6 +304,7 @@
           INSERT INTO AD_REGISTRATION_INFO(AD_REGISTRATION_INFO_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, CREATEDBY, UPDATED, UPDATEDBY)
           VALUES('0', '0', '0', 'Y', NOW(), '0', NOW(), '0');
           SELECT AD_UPDATE_ACCESS();
+          ${bbdd.sessionConfig};
           SELECT AD_DB_MODIFIED('Y');
           UPDATE AD_MODULE SET ISINDEVELOPMENT='N', ISDEFAULT='N', SEQNO=NULL, STATUS='P', UPDATE_AVAILABLE=NULL, ISREGISTERED='N' WHERE STATUS IS NULL OR STATUS='I';
           SELECT AD_LANGUAGE_CREATE(NULL);
Binary file src-db/database/lib/dbsourcemanager.jar has changed
--- a/src-db/database/model/functions/C_INVOICE_POST.xml	Tue Nov 18 10:57:35 2014 +0100
+++ b/src-db/database/model/functions/C_INVOICE_POST.xml	Tue Nov 18 11:03:11 2014 +0100
@@ -1539,6 +1539,8 @@
         p_DateInvoiced DATE;
         v_totalQtyInvoiced NUMBER;
         v_ODocumentNo C_ORDER.DocumentNo%TYPE;
+        v_invoiceRule C_ORDER.InvoiceRule%TYPE;
+        v_NewPendingToDeliver C_ORDERLINE.QtyDelivered%TYPE;
         v_NewPendingToInvoice NUMBER;
         v_deliveredQty NUMBER;
         v_inOutStatus varchar2(60) ;
@@ -1552,12 +1554,19 @@
         LOOP
           IF (CurLines.C_OrderLine_ID IS NOT NULL) THEN
             --Check that qty pending to invoice is higher or equal to the qty being invoiced
-            SELECT o.documentno, ABS(ol.qtyordered) - ABS(ol.qtyinvoiced + CurLines.QtyInvoiced), p.isquantityvariable
-              INTO v_ODocumentNo, v_NewPendingToInvoice, v_Isquantityvariable
+            SELECT o.documentno, o.invoicerule, ABS(ol.qtydelivered) - ABS(ol.qtyinvoiced + CurLines.QtyInvoiced) , ABS(ol.qtyordered) - ABS(ol.qtyinvoiced + CurLines.QtyInvoiced), p.isquantityvariable
+              INTO v_ODocumentNo, v_invoiceRule, v_NewPendingToDeliver, v_NewPendingToInvoice, v_Isquantityvariable
             FROM c_order o, c_orderline ol
             LEFT JOIN m_product p ON p.m_product_id = ol.m_product_id
             WHERE o.c_order_id = ol.c_order_id
               AND ol.c_orderline_id = CurLines.c_orderline_id;
+            IF (v_Isquantityvariable <> 'Y' AND v_invoiceRule = 'D' AND v_NewPendingToDeliver < 0) THEN
+              v_Message := '@NotPossibleCompleteInvoice@' || ' ' || v_DocumentNo;
+              v_Message := v_Message || ' ' || '@line@' || ' ' || CurLines.line || '. ';
+              v_Message := v_Message || '@OrderDocumentno@' || ' ' || v_ODocumentNo;
+              v_Message := v_Message || ': ' || '@QtyInvoicedHigherDelivered@' || '.';
+              RAISE_APPLICATION_ERROR(-20000, v_Message);
+            END IF;
             IF (v_Isquantityvariable <> 'Y' AND v_NewPendingToInvoice <0) THEN
               v_Message := '@NotPossibleCompleteInvoice@' || ' ' || v_DocumentNo;
               v_Message := v_Message || ' ' || '@line@' || ' ' || CurLines.line || '. ';
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src-db/database/model/functions/C_INVOICE_REACTIVATE.xml	Tue Nov 18 11:03:11 2014 +0100
@@ -0,0 +1,53 @@
+<?xml version="1.0"?>
+  <database name="FUNCTION C_INVOICE_REACTIVATE">
+    <function name="C_INVOICE_REACTIVATE" type="NULL">
+      <parameter name="p_ep_instance" type="VARCHAR" mode="in">
+        <default/>
+      </parameter>
+      <body><![CDATA[/*************************************************************************
+* The contents of this file are subject to the Openbravo  Public  License
+* Version  1.0  (the  "License"),  being   the  Mozilla   Public  License
+* Version 1.1  with a permitted attribution clause; you may not  use this
+* file except in compliance with the License. You  may  obtain  a copy of
+* the License at http://www.openbravo.com/legal/license.html
+* Software distributed under the License  is  distributed  on  an "AS IS"
+* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+* License for the specific  language  governing  rights  and  limitations
+* under the License.
+* The Original Code is Openbravo ERP.
+* The Initial Developer of the Original Code is Openbravo SLU
+* All portions are Copyright (C) 2014 Openbravo SLU
+* All Rights Reserved.
+* Contributor(s):  ______________________________________.
+************************************************************************/
+
+p_record_id C_INVOICE.C_Invoice_ID%TYPE;
+p_docAction C_INVOICE.DocAction%TYPE;
+
+TYPE RECORD IS REF CURSOR;
+Cur_Params RECORD;
+
+BEGIN
+
+  FOR Cur_Params IN (
+    SELECT *
+    FROM ad_ep_instance_para
+    WHERE ad_ep_instance_id = p_ep_instance
+    ) LOOP
+    IF (cur_params.parametername LIKE 'DocAction') THEN
+      p_docaction := Cur_Params.p_string;
+    ELSIF (cur_params.parametername LIKE 'Record_ID') THEN
+      p_record_id := cur_params.p_string;
+    END IF;
+  END LOOP;
+
+  IF (p_docAction IN ('RE')) THEN
+    UPDATE C_INVOICE
+    SET OutstandingAmt=0,
+      DaysTillDue=0 
+    WHERE C_Invoice_ID=p_record_id;
+  END IF;
+END C_INVOICE_REACTIVATE
+]]></body>
+    </function>
+  </database>
--- a/src-db/database/model/functions/MA_WORKREQUIREMENT_PROCESS.xml	Tue Nov 18 10:57:35 2014 +0100
+++ b/src-db/database/model/functions/MA_WORKREQUIREMENT_PROCESS.xml	Tue Nov 18 11:03:11 2014 +0100
@@ -16,7 +16,7 @@
 * under the License.
 * The Original Code is Openbravo ERP.
 * The Initial Developer of the Original Code is Openbravo SLU
-* All portions are Copyright (C) 2001-2006 Openbravo SLU
+* All portions are Copyright (C) 2001-2014 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
@@ -165,7 +165,7 @@
               now(), v_User_ID, Cur_Sequence.MA_Process_ID, Cur_Sequence.CostCenterUse,
               Cur_Sequence.Preptime, v_Multiplier*v_Quantity, 0,
               Cur_Sequence.SeqNo, 'N', Cur_Sequence.NoQty, Cur_Sequence.GroupUse, Cur_Sequence.Outsourced,
-              v_Startdate, v_Enddate, v_Multiplier*v_Quantity*Cur_Sequence.Estimatedtime, Cur_Sequence.Usedmaterial
+              v_Startdate, ADD_HMS(v_Startdate, v_Multiplier*v_Quantity*Cur_Sequence.Estimatedtime, 0 , 0), v_Multiplier*v_Quantity*Cur_Sequence.Estimatedtime, Cur_Sequence.Usedmaterial
             )
             ;
           FOR Cur_SeqProduct IN
--- a/src-db/database/model/functions/M_CHECK_STOCK.xml	Tue Nov 18 10:57:35 2014 +0100
+++ b/src-db/database/model/functions/M_CHECK_STOCK.xml	Tue Nov 18 11:03:11 2014 +0100
@@ -28,37 +28,32 @@
 * under the License.
 * The Original Code is Openbravo ERP.
 * The Initial Developer of the Original Code is Openbravo SLU
-* All portions are Copyright (C) 2001-2006 Openbravo SLU
+* All portions are Copyright (C) 2001-2014 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
   v_ResultStr VARCHAR2(2000):='';
   v_ExistsNegativeStock NUMBER;
-  v_Stock CHAR:='N';
-  v_Name VARCHAR2(60) ;
-  v_AD_Client_ID VARCHAR2(32);
+  v_AllowsNegativeStock CHAR:='N';
 BEGIN
   v_ResultStr:='Checking stock';
   p_Result:=1;
   SELECT ALLOWNEGATIVESTOCK
-  INTO v_Stock
+  INTO v_AllowsNegativeStock
   FROM AD_CLIENTINFO
   WHERE AD_CLIENT_ID=p_AD_Client_ID;
-  IF v_Stock='N' THEN
-    SELECT COUNT(*)
+  IF v_AllowsNegativeStock='N' THEN
+    SELECT count(1)
     INTO v_ExistsNegativeStock
-    FROM
-      ( SELECT ROUND(COALESCE(QTYONHAND, 0), 2) AS QTY,
-        ROUND(COALESCE(QTYORDERONHAND, 0), 2) AS QTYORDER
+    FROM DUAL
+    WHERE EXISTS
+      ( SELECT 1
       FROM M_STORAGE_DETAIL
       WHERE M_PRODUCT_ID=p_M_Product_ID
         AND AD_CLIENT_ID=p_AD_Client_ID
         AND AD_ORG_ID=p_AD_Org_ID
-      )
-      A
-    WHERE QTY<0
-      OR QTYORDER<0;
-    IF v_ExistsNegativeStock<>0 THEN
+      AND (QTYONHAND<0 OR COALESCE(QTYORDERONHAND,0)<0));    
+    IF(v_ExistsNegativeStock <> 0) THEN
       p_Result:=0;
       p_Message:='@NotEnoughStocked@';
     END IF;
--- a/src-db/database/model/functions/M_RESERVE_STOCK_AUTO.xml	Tue Nov 18 10:57:35 2014 +0100
+++ b/src-db/database/model/functions/M_RESERVE_STOCK_AUTO.xml	Tue Nov 18 11:03:11 2014 +0100
@@ -22,7 +22,7 @@
 * under the License.
 * The Original Code is Openbravo ERP.
 * The Initial Developer of the Original Code is Openbravo SLU
-* All portions are Copyright (C) 2012 Openbravo SLU
+* All portions are Copyright (C) 2012-2014 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
@@ -114,13 +114,16 @@
   
   v_pendingqty := v_pendingtoreserveqty;
   FOR cur_stock IN (
-    SELECT *
-    FROM m_stock_proposed
-    WHERE ad_pinstance_id = v_pinstance_id
-    ORDER BY priority
+    SELECT sp.quantity, sp.m_storage_detail_id, w.isallocated
+    FROM m_stock_proposed sp
+        JOIN m_storage_detail sd ON sd.m_storage_detail_id = sp.m_storage_detail_id
+        JOIN m_locator l ON sd.m_locator_id = l.m_locator_id
+        JOIN m_warehouse w ON l.m_warehouse_id = w.m_warehouse_id
+    WHERE sp.ad_pinstance_id = v_pinstance_id
+    ORDER BY sp.priority
   ) LOOP
     v_qty := LEAST(cur_stock.quantity, v_pendingqty);
-    M_RESERVE_STOCK_MANUAL(p_reservation_id, 'SD', cur_stock.m_storage_detail_id, v_qty, p_user_id, 'N', v_dummy);
+    M_RESERVE_STOCK_MANUAL(p_reservation_id, 'SD', cur_stock.m_storage_detail_id, v_qty, p_user_id, cur_stock.isallocated, v_dummy);
     v_pendingqty := v_pendingqty - v_qty;
     IF (v_pendingqty <= 0) THEN
       p_reservedqty := v_reserveqty;
--- a/src-db/database/model/functions/M_UPDATE_INVENTORY.xml	Tue Nov 18 10:57:35 2014 +0100
+++ b/src-db/database/model/functions/M_UPDATE_INVENTORY.xml	Tue Nov 18 11:03:11 2014 +0100
@@ -52,38 +52,39 @@
 * under the License.
 * The Original Code is Openbravo ERP.
 * The Initial Developer of the Original Code is Openbravo SLU
-* All portions are Copyright (C) 2001-2006 Openbravo SLU
+* All portions are Copyright (C) 2001-2014 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
-  v_cuenta NUMBER;
   v_count NUMBER;
   v_qtyorder NUMBER;
   v_preqtyorder NUMBER;
   v_Storage_ID VARCHAR2(32);
+  v_attributesetinstance VARCHAR2(32);
 
 BEGIN
   v_qtyorder:=p_qtyorder;
   v_preqtyorder:=p_preqtyorder;
-  SELECT COUNT(*)
-  INTO v_cuenta
+  v_attributesetinstance :=COALESCE(p_attributesetinstance,'0');
+  SELECT count(1)
+  INTO v_count
+  FROM DUAL WHERE EXISTS(
+  SELECT 1
   FROM M_STORAGE_DETAIL
   WHERE M_PRODUCT_ID=p_product
     AND M_LOCATOR_ID=p_locator
-    AND COALESCE(M_ATTRIBUTESETINSTANCE_ID, '0')=COALESCE(p_attributesetinstance, '0')
+    AND M_ATTRIBUTESETINSTANCE_ID=v_attributesetinstance
     AND C_UOM_ID=p_uom
-    AND COALESCE(M_PRODUCT_UOM_ID, '-1')=COALESCE(p_product_uom, '-1') ;
+    AND COALESCE(M_PRODUCT_UOM_ID, '-1')=COALESCE(p_product_uom, '-1'));
   IF(p_product_uom IS NOT NULL) THEN
     IF(v_qtyorder IS NULL) THEN
       v_qtyorder:=0;
     END IF;
     IF(v_preqtyorder IS NULL) THEN
       v_preqtyorder:=0;
-
+    END IF;
   END IF;
-  END IF;
-  IF(v_cuenta=0) THEN
-    Ad_Sequence_Next('M_Storage_Detail', p_client, v_Storage_ID) ;
+  IF(v_count = 0) THEN
     INSERT
     INTO M_STORAGE_DETAIL
       (
@@ -95,9 +96,9 @@
       )
       VALUES
       (
-        v_Storage_ID, p_client, p_org, 'Y',
+        get_uuid(), p_client, p_org, 'Y',
         now(), p_user, now(), p_user,
-        p_product, p_locator, COALESCE(p_attributesetinstance, '0'), p_uom,
+        p_product, p_locator, v_attributesetinstance, p_uom,
         p_product_uom, COALESCE(p_qty, 0), v_qtyorder, p_datelastinventory,
         COALESCE(p_preqty, 0), v_preqtyorder
       )
@@ -115,7 +116,7 @@
       UPDATEDBY=p_user
     WHERE M_PRODUCT_ID=p_product
       AND M_LOCATOR_ID=p_locator
-      AND COALESCE(M_ATTRIBUTESETINSTANCE_ID, '0')=COALESCE(p_attributesetinstance, '0')
+      AND M_ATTRIBUTESETINSTANCE_ID=v_attributesetinstance
       AND C_UOM_ID=p_uom
       AND COALESCE(M_PRODUCT_UOM_ID, '-1')=COALESCE(p_product_uom, '-1') ;
    
@@ -124,7 +125,7 @@
     FROM m_product p join m_attributeset aset ON p.m_attributeset_id = aset.m_attributeset_id 
                      JOIN M_STORAGE_DETAIL SD ON SD.M_PRODUCT_ID=p.m_product_id
             AND SD.M_LOCATOR_ID=p_locator
-            AND COALESCE(SD.M_ATTRIBUTESETINSTANCE_ID, '0')=COALESCE(p_attributesetinstance, '0')
+            AND SD.M_ATTRIBUTESETINSTANCE_ID=v_attributesetinstance
             AND SD.C_UOM_ID=p_uom
             AND COALESCE(SD.M_PRODUCT_UOM_ID, '-1')=COALESCE(p_product_uom, '-1')
     WHERE COALESCE(p.attrsetvaluetype, '-') <> 'F'
--- a/src-db/database/model/tables/C_PERIOD.xml	Tue Nov 18 10:57:35 2014 +0100
+++ b/src-db/database/model/tables/C_PERIOD.xml	Tue Nov 18 11:03:11 2014 +0100
@@ -90,6 +90,9 @@
       <foreign-key foreignTable="C_YEAR" name="C_YEAR_PERIOD">
         <reference local="C_YEAR_ID" foreign="C_YEAR_ID"/>
       </foreign-key>
+      <index name="C_PERIOD_ORG" unique="false">
+        <index-column name="AD_ORG_ID"/>
+      </index>
       <index name="C_PERIOD_YEAR" unique="false">
         <index-column name="C_YEAR_ID"/>
       </index>
--- a/src-db/database/model/tables/M_INOUT.xml	Tue Nov 18 10:57:35 2014 +0100
+++ b/src-db/database/model/tables/M_INOUT.xml	Tue Nov 18 11:03:11 2014 +0100
@@ -299,7 +299,7 @@
       <foreign-key foreignTable="C_DOCTYPE" name="M_INOUT_C_DOCTYPE">
         <reference local="C_DOCTYPE_ID" foreign="C_DOCTYPE_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_INVOICE" name="M_INOUT_C_INVOICE">
+      <foreign-key foreignTable="C_INVOICE" name="M_INOUT_C_INVOICE" onDelete="setnull">
         <reference local="C_INVOICE_ID" foreign="C_INVOICE_ID"/>
       </foreign-key>
       <foreign-key foreignTable="C_ORDER" name="M_INOUT_C_ORDER">
--- a/src-db/database/model/tables/M_LANDEDCOST.xml	Tue Nov 18 10:57:35 2014 +0100
+++ b/src-db/database/model/tables/M_LANDEDCOST.xml	Tue Nov 18 11:03:11 2014 +0100
@@ -57,10 +57,6 @@
         <default><![CDATA[DR]]></default>
         <onCreateDefault/>
       </column>
-      <column name="C_CURRENCY_ID" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
-        <default/>
-        <onCreateDefault/>
-      </column>
       <column name="POSTED" primaryKey="false" required="false" type="VARCHAR" size="60" autoIncrement="false">
         <default><![CDATA[N]]></default>
         <onCreateDefault/>
@@ -87,9 +83,6 @@
       <foreign-key foreignTable="M_COSTADJUSTMENT" name="M_LANDEDCOST_COSTADJ">
         <reference local="M_COSTADJUSTMENT_ID" foreign="M_COSTADJUSTMENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_CURRENCY" name="M_LANDEDCOST_CURRENCY">
-        <reference local="C_CURRENCY_ID" foreign="C_CURRENCY_ID"/>
-      </foreign-key>
       <foreign-key foreignTable="C_DOCTYPE" name="M_LANDEDCOST_DOCTYPE">
         <reference local="C_DOCTYPE_ID" foreign="C_DOCTYPE_ID"/>
       </foreign-key>
--- a/src-db/database/model/tables/M_RESERVATION_STOCK.xml	Tue Nov 18 10:57:35 2014 +0100
+++ b/src-db/database/model/tables/M_RESERVATION_STOCK.xml	Tue Nov 18 11:03:11 2014 +0100
@@ -53,9 +53,9 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <column name="M_ATTRIBUTESETINSTANCE_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
-        <default/>
-        <onCreateDefault/>
+      <column name="M_ATTRIBUTESETINSTANCE_ID" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
+        <default><![CDATA[0]]></default>
+        <onCreateDefault><![CDATA['0']]></onCreateDefault>
       </column>
       <column name="RELEASEDQTY" primaryKey="false" required="false" type="DECIMAL" autoIncrement="false">
         <default/>
--- a/src-db/database/model/tables/M_STORAGE_DETAIL.xml	Tue Nov 18 10:57:35 2014 +0100
+++ b/src-db/database/model/tables/M_STORAGE_DETAIL.xml	Tue Nov 18 11:03:11 2014 +0100
@@ -9,9 +9,9 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <column name="M_ATTRIBUTESETINSTANCE_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
-        <default/>
-        <onCreateDefault/>
+      <column name="M_ATTRIBUTESETINSTANCE_ID" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
+        <default><![CDATA[0]]></default>
+        <onCreateDefault><![CDATA['0']]></onCreateDefault>
       </column>
       <column name="C_UOM_ID" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
         <default/>
@@ -103,6 +103,12 @@
       <index name="M_STORAGE_DETAIL_UOM" unique="false">
         <index-column name="C_UOM_ID"/>
       </index>
+      <index name="M_STORAGEDET_QTYONHAND" unique="false">
+        <index-column name="QTYONHAND"/>
+      </index>
+      <index name="M_STORAGEDET_QTYORDERONHAND" unique="false">
+        <index-column name="QTYORDERONHAND"/>
+      </index>
       <unique name="M_STORAGE_DETAIL_UN">
         <unique-column name="M_PRODUCT_ID"/>
         <unique-column name="M_LOCATOR_ID"/>
--- a/src-db/database/model/tables/M_WAREHOUSE.xml	Tue Nov 18 10:57:35 2014 +0100
+++ b/src-db/database/model/tables/M_WAREHOUSE.xml	Tue Nov 18 11:03:11 2014 +0100
@@ -77,6 +77,10 @@
         <default/>
         <onCreateDefault/>
       </column>
+      <column name="ISALLOCATED" primaryKey="false" required="true" type="CHAR" size="1" autoIncrement="false">
+        <default><![CDATA[N]]></default>
+        <onCreateDefault><![CDATA['N']]></onCreateDefault>
+      </column>
       <foreign-key foreignTable="C_LOCATION" name="C_LOCATION_WAREHOUSE">
         <reference local="C_LOCATION_ID" foreign="C_LOCATION_ID"/>
       </foreign-key>
@@ -96,6 +100,7 @@
         <unique-column name="AD_CLIENT_ID"/>
         <unique-column name="NAME"/>
       </unique>
+      <check name="M_WAREHOUSE_ALLOCATED"><![CDATA[ISALLOCATED IN ('Y', 'N')]]></check>
       <check name="M_WAREHOUSE_ISACTIVE_CHK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
       <check name="M_WAREHOUSE_ISSHIPPER_CHK"><![CDATA[ISSHIPPER IN ('Y', 'N')]]></check>
     </table>
--- a/src-db/database/model/triggers/MA_WRPHASE_TRG.xml	Tue Nov 18 10:57:35 2014 +0100
+++ b/src-db/database/model/triggers/MA_WRPHASE_TRG.xml	Tue Nov 18 11:03:11 2014 +0100
@@ -14,7 +14,7 @@
 * under the License.
 * The Original Code is Openbravo ERP.
 * The Initial Developer of the Original Code is Openbravo SLU
-* All portions are Copyright (C) 2011 Openbravo SLU
+* All portions are Copyright (C) 2011-2014 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
@@ -26,23 +26,28 @@
     END IF;
 
 IF (INSERTING) THEN
-	UPDATE MA_WORKREQUIREMENT 
-	SET ESTIMATEDTIME = ESTIMATEDTIME + :NEW.ESTIMATEDTIME, RUNTIME = RUNTIME + :NEW.RUNTIME
+	UPDATE MA_WORKREQUIREMENT SET 
+  ENDDATE = ADD_HMS(STARTDATE, ESTIMATEDTIME + :NEW.ESTIMATEDTIME, 0, 0),
+  ESTIMATEDTIME = ESTIMATEDTIME + :NEW.ESTIMATEDTIME, 
+  RUNTIME = RUNTIME + :NEW.RUNTIME
 	WHERE MA_WORKREQUIREMENT_ID = :NEW.MA_WORKREQUIREMENT_ID;
 END IF;
 
 IF (UPDATING) THEN
-	UPDATE MA_WORKREQUIREMENT 
-	SET ESTIMATEDTIME = ESTIMATEDTIME + :NEW.ESTIMATEDTIME - :OLD.ESTIMATEDTIME, RUNTIME = RUNTIME + :NEW.RUNTIME - :OLD.RUNTIME
+	UPDATE MA_WORKREQUIREMENT SET 
+  ENDDATE = ADD_HMS(STARTDATE, ESTIMATEDTIME + :NEW.ESTIMATEDTIME - :OLD.ESTIMATEDTIME, 0, 0),
+  ESTIMATEDTIME = ESTIMATEDTIME + :NEW.ESTIMATEDTIME - :OLD.ESTIMATEDTIME, RUNTIME = RUNTIME + :NEW.RUNTIME - :OLD.RUNTIME
 	WHERE MA_WORKREQUIREMENT_ID = :NEW.MA_WORKREQUIREMENT_ID;
 END IF;
 
 IF (DELETING) THEN
-	UPDATE MA_WORKREQUIREMENT 
-	SET ESTIMATEDTIME = ESTIMATEDTIME - :OLD.ESTIMATEDTIME, RUNTIME = RUNTIME - :OLD.RUNTIME
+	UPDATE MA_WORKREQUIREMENT SET 
+  ENDDATE = ADD_HMS(STARTDATE, ESTIMATEDTIME - :OLD.ESTIMATEDTIME, 0, 0),
+  ESTIMATEDTIME = ESTIMATEDTIME - :OLD.ESTIMATEDTIME, RUNTIME = RUNTIME - :OLD.RUNTIME
 	WHERE MA_WORKREQUIREMENT_ID = :OLD.MA_WORKREQUIREMENT_ID;
 END IF;
 
+
 END MA_WRPHASE_TRG
 ]]></body>
     </trigger>
--- a/src-db/database/model/triggers/M_LC_COST_CHK_TRG.xml	Tue Nov 18 10:57:35 2014 +0100
+++ b/src-db/database/model/triggers/M_LC_COST_CHK_TRG.xml	Tue Nov 18 11:03:11 2014 +0100
@@ -66,7 +66,6 @@
         OR(COALESCE(:old.m_landedcost_id, '0') <> COALESCE(:new.m_landedcost_id, '0'))
         OR(COALESCE(:old.m_lc_distribution_alg_id, '0') <> COALESCE(:new.m_lc_distribution_alg_id, '0'))
         OR(COALESCE(:old.m_lc_type_id, '0') <> COALESCE(:new.m_lc_type_id, '0'))
-        OR(COALESCE(:old.matching_costadjustment_id, '0') <> COALESCE(:new.matching_costadjustment_id, '0'))
         OR(COALESCE(:old.AD_ORG_ID, '0') <> COALESCE(:new.AD_ORG_ID, '0'))
         OR(COALESCE(:old.AD_CLIENT_ID, '0') <> COALESCE(:new.AD_CLIENT_ID, '0'))))
         THEN RAISE_APPLICATION_ERROR(-20000, '@20501@') ;
--- a/src-db/database/model/views/M_PRERESERVATION_PICK_EDIT.xml	Tue Nov 18 10:57:35 2014 +0100
+++ b/src-db/database/model/views/M_PRERESERVATION_PICK_EDIT.xml	Tue Nov 18 11:03:11 2014 +0100
@@ -1,4 +1,4 @@
 <?xml version="1.0"?>
   <database name="VIEW M_PRERESERVATION_PICK_EDIT">
-    <view name="M_PRERESERVATION_PICK_EDIT"><![CDATA[SELECT COALESCE(res.m_reservation_stock_id, (sol.c_orderline_id || pol.c_orderline_id)) AS m_prereservation_pick_edit_id, pol.ad_client_id, pol.ad_org_id, pol.createdby, pol.created, pol.updated, pol.updatedby, to_char('Y') AS isactive, pol.c_orderline_id AS purchase_orderline_id, sol.c_orderline_id AS sales_orderline_id, so.documentno, sol.line, so.dateordered, so.datepromised, pol.qtyordered AS purchasedqty, del.qty AS receivedqty, res.quantity AS reservedqty, res.m_reservation_stock_id, CASE WHEN res.m_reservation_stock_id IS NULL THEN 'N' ELSE 'Y' END AS ob_selected, sol.qtyordered, sol.qtydelivered, solres.m_reservation_id, COALESCE(solres.qty, 0) - COALESCE(res.quantity, 0) AS otherresqty, so.c_bpartner_id FROM c_orderline pol JOIN c_order po ON pol.c_order_id = po.c_order_id AND po.issotrx = 'N' AND po.docstatus = 'CO' JOIN c_orderline sol ON pol.m_product_id = sol.m_product_id AND sol.qtyordered <> sol.qtydelivered JOIN c_order so ON sol.c_order_id = so.c_order_id AND so.issotrx = 'Y' AND so.docstatus = 'CO' JOIN (SELECT COALESCE(sum(mp.qty), 0) AS qty, ol.c_orderline_id FROM c_orderline ol JOIN c_order o ON ol.c_order_id = o.c_order_id AND o.issotrx = 'N' AND o.docstatus = 'CO' LEFT JOIN m_matchpo mp ON mp.c_orderline_id = ol.c_orderline_id AND mp.m_inoutline_id IS NOT NULL GROUP BY ol.c_orderline_id) del ON del.c_orderline_id = pol.c_orderline_id AND del.qty <> pol.qtyordered LEFT JOIN (SELECT r.c_orderline_id AS sales_orderline_id, rs.c_orderline_id AS purchase_orderline_id, rs.quantity, rs.m_reservation_stock_id FROM m_reservation r JOIN m_reservation_stock rs ON r.m_reservation_id = rs.m_reservation_id WHERE r.c_orderline_id IS NOT NULL AND rs.c_orderline_id IS NOT NULL AND rs.m_locator_id IS NULL AND r.res_status <> 'CL') res ON res.sales_orderline_id = sol.c_orderline_id AND res.purchase_orderline_id = pol.c_orderline_id LEFT JOIN (SELECT sum(rs.quantity - COALESCE(rs.releasedqty, 0)) AS qty, r.m_reservation_id, r.c_orderline_id, r.quantity AS resqty FROM m_reservation r JOIN m_reservation_stock rs ON r.m_reservation_id = rs.m_reservation_id WHERE r.c_orderline_id IS NOT NULL GROUP BY r.m_reservation_id, r.c_orderline_id, r.quantity) solres ON solres.c_orderline_id = sol.c_orderline_id WHERE (COALESCE(solres.qty, 0) - COALESCE(res.quantity, 0)) <> (sol.qtyordered - sol.qtydelivered)]]></view>
+    <view name="M_PRERESERVATION_PICK_EDIT"><![CDATA[SELECT COALESCE(res.m_reservation_stock_id, (sol.c_orderline_id || pol.c_orderline_id)) AS m_prereservation_pick_edit_id, pol.ad_client_id, pol.ad_org_id, pol.createdby, pol.created, pol.updated, pol.updatedby, to_char('Y') AS isactive, pol.c_orderline_id AS purchase_orderline_id, sol.c_orderline_id AS sales_orderline_id, so.documentno, sol.line, so.dateordered, so.datepromised, pol.qtyordered AS purchasedqty, del.qty AS receivedqty, res.quantity AS reservedqty, res.m_reservation_stock_id, CASE WHEN res.m_reservation_stock_id IS NULL THEN 'N' ELSE 'Y' END AS ob_selected, sol.qtyordered, sol.qtydelivered, solres.m_reservation_id, COALESCE(solres.qty, 0) - COALESCE(res.quantity, 0) AS otherresqty, so.c_bpartner_id, COALESCE(res.isallocated, w.isallocated) AS isallocated FROM c_orderline pol JOIN c_order po ON pol.c_order_id = po.c_order_id AND po.issotrx = 'N' AND po.docstatus = 'CO' JOIN c_orderline sol ON pol.m_product_id = sol.m_product_id AND sol.qtyordered <> sol.qtydelivered JOIN c_order so ON sol.c_order_id = so.c_order_id AND so.issotrx = 'Y' AND so.docstatus = 'CO' JOIN m_warehouse w ON po.m_warehouse_id = w.m_warehouse_id JOIN (SELECT COALESCE(sum(mp.qty), 0) AS qty, ol.c_orderline_id FROM c_orderline ol JOIN c_order o ON ol.c_order_id = o.c_order_id AND o.issotrx = 'N' AND o.docstatus = 'CO' LEFT JOIN m_matchpo mp ON mp.c_orderline_id = ol.c_orderline_id AND mp.m_inoutline_id IS NOT NULL GROUP BY ol.c_orderline_id) del ON del.c_orderline_id = pol.c_orderline_id AND del.qty <> pol.qtyordered LEFT JOIN (SELECT r.c_orderline_id AS sales_orderline_id, rs.c_orderline_id AS purchase_orderline_id, rs.quantity, rs.m_reservation_stock_id, rs.isallocated FROM m_reservation r JOIN m_reservation_stock rs ON r.m_reservation_id = rs.m_reservation_id WHERE r.c_orderline_id IS NOT NULL AND rs.c_orderline_id IS NOT NULL AND rs.m_locator_id IS NULL AND r.res_status <> 'CL') res ON res.sales_orderline_id = sol.c_orderline_id AND res.purchase_orderline_id = pol.c_orderline_id LEFT JOIN (SELECT sum(rs.quantity - COALESCE(rs.releasedqty, 0)) AS qty, r.m_reservation_id, r.c_orderline_id, r.quantity AS resqty FROM m_reservation r JOIN m_reservation_stock rs ON r.m_reservation_id = rs.m_reservation_id WHERE r.c_orderline_id IS NOT NULL GROUP BY r.m_reservation_id, r.c_orderline_id, r.quantity) solres ON solres.c_orderline_id = sol.c_orderline_id WHERE (COALESCE(solres.qty, 0) - COALESCE(res.quantity, 0)) <> (sol.qtyordered - sol.qtydelivered)]]></view>
   </database>
--- a/src-db/database/sourcedata/AD_AUXILIARINPUT.xml	Tue Nov 18 10:57:35 2014 +0100
+++ b/src-db/database/sourcedata/AD_AUXILIARINPUT.xml	Tue Nov 18 11:03:11 2014 +0100
@@ -1521,6 +1521,17 @@
 <!--3752F4D586254CA0BAA6CE2AA8E6137F-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--3752F4D586254CA0BAA6CE2AA8E6137F--></AD_AUXILIARINPUT>
 
+<!--377353A77F7A4876BE4F36592679CD4C--><AD_AUXILIARINPUT>
+<!--377353A77F7A4876BE4F36592679CD4C-->  <AD_AUXILIARINPUT_ID><![CDATA[377353A77F7A4876BE4F36592679CD4C]]></AD_AUXILIARINPUT_ID>
+<!--377353A77F7A4876BE4F36592679CD4C-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--377353A77F7A4876BE4F36592679CD4C-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--377353A77F7A4876BE4F36592679CD4C-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--377353A77F7A4876BE4F36592679CD4C-->  <AD_TAB_ID><![CDATA[187]]></AD_TAB_ID>
+<!--377353A77F7A4876BE4F36592679CD4C-->  <NAME><![CDATA[ATTRIBUTESETINSTANCIABLE]]></NAME>
+<!--377353A77F7A4876BE4F36592679CD4C-->  <CODE><![CDATA[@SQL=SELECT (CASE count(*) WHEN 0 THEN 'N' ELSE 'Y' END) from M_ATTRIBUTESET mats join M_PRODUCT mp on mats.M_AttributeSet_ID=mp.M_AttributeSet_ID WHERE mp.M_PRODUCT_ID=@M_Product_ID@ and (mats.IsLot='Y' or mats.IsSerNo='Y' or mats.IsGuaranteeDate='Y')]]></CODE>
+<!--377353A77F7A4876BE4F36592679CD4C-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--377353A77F7A4876BE4F36592679CD4C--></AD_AUXILIARINPUT>
+
 <!--38FA2581642644948132767B5CE448A4--><AD_AUXILIARINPUT>
 <!--38FA2581642644948132767B5CE448A4-->  <AD_AUXILIARINPUT_ID><![CDATA[38FA2581642644948132767B5CE448A4]]></AD_AUXILIARINPUT_ID>
 <!--38FA2581642644948132767B5CE448A4-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -1717,6 +1728,17 @@
 <!--44C89F429E0E42F7961A634D61F34E0A-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--44C89F429E0E42F7961A634D61F34E0A--></AD_AUXILIARINPUT>
 
+<!--44F99FD664A64A9683694FE63672BD55--><AD_AUXILIARINPUT>
+<!--44F99FD664A64A9683694FE63672BD55-->  <AD_AUXILIARINPUT_ID><![CDATA[44F99FD664A64A9683694FE63672BD55]]></AD_AUXILIARINPUT_ID>
+<!--44F99FD664A64A9683694FE63672BD55-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--44F99FD664A64A9683694FE63672BD55-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--44F99FD664A64A9683694FE63672BD55-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--44F99FD664A64A9683694FE63672BD55-->  <AD_TAB_ID><![CDATA[293]]></AD_TAB_ID>
+<!--44F99FD664A64A9683694FE63672BD55-->  <NAME><![CDATA[ATTRIBUTESETINSTANCIABLE]]></NAME>
+<!--44F99FD664A64A9683694FE63672BD55-->  <CODE><![CDATA[@SQL=SELECT (CASE count(*) WHEN 0 THEN 'N' ELSE 'Y' END) from M_ATTRIBUTESET mats join M_PRODUCT mp on mats.M_AttributeSet_ID=mp.M_AttributeSet_ID WHERE mp.M_PRODUCT_ID=@M_Product_ID@ and (mats.IsLot='Y' or mats.IsSerNo='Y' or mats.IsGuaranteeDate='Y')]]></CODE>
+<!--44F99FD664A64A9683694FE63672BD55-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--44F99FD664A64A9683694FE63672BD55--></AD_AUXILIARINPUT>
+
 <!--467629226B744AD5A9D5CEBD284C29E4--><AD_AUXILIARINPUT>
 <!--467629226B744AD5A9D5CEBD284C29E4-->  <AD_AUXILIARINPUT_ID><![CDATA[467629226B744AD5A9D5CEBD284C29E4]]></AD_AUXILIARINPUT_ID>
 <!--467629226B744AD5A9D5CEBD284C29E4-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -3445,6 +3467,17 @@
 <!--D030CCF0F7514C898D981791049FB0DF-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--D030CCF0F7514C898D981791049FB0DF--></AD_AUXILIARINPUT>
 
+<!--D0A19017CE354E62883A1404058DA667--><AD_AUXILIARINPUT>
+<!--D0A19017CE354E62883A1404058DA667-->  <AD_AUXILIARINPUT_ID><![CDATA[D0A19017CE354E62883A1404058DA667]]></AD_AUXILIARINPUT_ID>
+<!--D0A19017CE354E62883A1404058DA667-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--D0A19017CE354E62883A1404058DA667-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--D0A19017CE354E62883A1404058DA667-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--D0A19017CE354E62883A1404058DA667-->  <AD_TAB_ID><![CDATA[0F76B56EB2874C729ABE1665D5853E9D]]></AD_TAB_ID>
+<!--D0A19017CE354E62883A1404058DA667-->  <NAME><![CDATA[HeaderStatus]]></NAME>
+<!--D0A19017CE354E62883A1404058DA667-->  <CODE><![CDATA[@SQL=SELECT DOCSTATUS FROM M_INOUT WHERE M_INOUT_ID = @M_INOUT_ID@]]></CODE>
+<!--D0A19017CE354E62883A1404058DA667-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--D0A19017CE354E62883A1404058DA667--></AD_AUXILIARINPUT>
+
 <!--D0DC4F3EC11B4F6D9457EF08B5AF54C5--><AD_AUXILIARINPUT>
 <!--D0DC4F3EC11B4F6D9457EF08B5AF54C5-->  <AD_AUXILIARINPUT_ID><![CDATA[D0DC4F3EC11B4F6D9457EF08B5AF54C5]]></AD_AUXILIARINPUT_ID>
 <!--D0DC4F3EC11B4F6D9457EF08B5AF54C5-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src-db/database/sourcedata/AD_COLUMN.xml	Tue Nov 18 10:57:35 2014 +0100
+++ b/src-db/database/sourcedata/AD_COLUMN.xml	Tue Nov 18 11:03:11 2014 +0100
@@ -111876,7 +111876,7 @@
 <!--8767-->  <ISPARENT><![CDATA[N]]></ISPARENT>
 <!--8767-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
 <!--8767-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
-<!--8767-->  <READONLYLOGIC><![CDATA[@Processed@='Y']]></READONLYLOGIC>
+<!--8767-->  <READONLYLOGIC><![CDATA[@Processed@='Y' | @ATTRIBUTESETINSTANCIABLE@='Y']]></READONLYLOGIC>
 <!--8767-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
 <!--8767-->  <SEQNO><![CDATA[0]]></SEQNO>
 <!--8767-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
@@ -162851,7 +162851,7 @@
 <!--802337-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--802337-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--802337-->  <NAME><![CDATA[Waiting Period]]></NAME>
-<!--802337-->  <HELP><![CDATA[Delay in hours from the beginning of the case to perform the test.]]></HELP>
+<!--802337-->  <HELP><![CDATA[Delay in days from the beginning of the case to perform the test.]]></HELP>
 <!--802337-->  <COLUMNNAME><![CDATA[Days]]></COLUMNNAME>
 <!--802337-->  <AD_TABLE_ID><![CDATA[800140]]></AD_TABLE_ID>
 <!--802337-->  <AD_REFERENCE_ID><![CDATA[11]]></AD_REFERENCE_ID>
@@ -221349,42 +221349,6 @@
 <!--00568254CB3C8733E050007F01000513-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
 <!--00568254CB3C8733E050007F01000513--></AD_COLUMN>
 
-<!--00568254CB3D8733E050007F01000513--><AD_COLUMN>
-<!--00568254CB3D8733E050007F01000513-->  <AD_COLUMN_ID><![CDATA[00568254CB3D8733E050007F01000513]]></AD_COLUMN_ID>
-<!--00568254CB3D8733E050007F01000513-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
-<!--00568254CB3D8733E050007F01000513-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
-<!--00568254CB3D8733E050007F01000513-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
-<!--00568254CB3D8733E050007F01000513-->  <NAME><![CDATA[Currency]]></NAME>
-<!--00568254CB3D8733E050007F01000513-->  <DESCRIPTION><![CDATA[An accepted medium of monetary exchange that may vary across countries.]]></DESCRIPTION>
-<!--00568254CB3D8733E050007F01000513-->  <HELP><![CDATA[Indicates the currency to be used when processing this document.]]></HELP>
-<!--00568254CB3D8733E050007F01000513-->  <COLUMNNAME><![CDATA[C_Currency_ID]]></COLUMNNAME>
-<!--00568254CB3D8733E050007F01000513-->  <AD_TABLE_ID><![CDATA[082F967CDF7245EB9A150941F326C45C]]></AD_TABLE_ID>
-<!--00568254CB3D8733E050007F01000513-->  <AD_REFERENCE_ID><![CDATA[19]]></AD_REFERENCE_ID>
-<!--00568254CB3D8733E050007F01000513-->  <FIELDLENGTH><![CDATA[32]]></FIELDLENGTH>
-<!--00568254CB3D8733E050007F01000513-->  <ISKEY><![CDATA[N]]></ISKEY>
-<!--00568254CB3D8733E050007F01000513-->  <ISPARENT><![CDATA[N]]></ISPARENT>
-<!--00568254CB3D8733E050007F01000513-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
-<!--00568254CB3D8733E050007F01000513-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
-<!--00568254CB3D8733E050007F01000513-->  <READONLYLOGIC><![CDATA[@Processed@='Y']]></READONLYLOGIC>
-<!--00568254CB3D8733E050007F01000513-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
-<!--00568254CB3D8733E050007F01000513-->  <SEQNO><![CDATA[150]]></SEQNO>
-<!--00568254CB3D8733E050007F01000513-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
-<!--00568254CB3D8733E050007F01000513-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
-<!--00568254CB3D8733E050007F01000513-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
-<!--00568254CB3D8733E050007F01000513-->  <AD_ELEMENT_ID><![CDATA[193]]></AD_ELEMENT_ID>
-<!--00568254CB3D8733E050007F01000513-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
-<!--00568254CB3D8733E050007F01000513-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
-<!--00568254CB3D8733E050007F01000513-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
-<!--00568254CB3D8733E050007F01000513-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
-<!--00568254CB3D8733E050007F01000513-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
-<!--00568254CB3D8733E050007F01000513-->  <POSITION><![CDATA[15]]></POSITION>
-<!--00568254CB3D8733E050007F01000513-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
-<!--00568254CB3D8733E050007F01000513-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
-<!--00568254CB3D8733E050007F01000513-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
-<!--00568254CB3D8733E050007F01000513-->  <IMAGESIZEVALUESACTION><![CDATA[N]]></IMAGESIZEVALUESACTION>
-<!--00568254CB3D8733E050007F01000513-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
-<!--00568254CB3D8733E050007F01000513--></AD_COLUMN>
-
 <!--00568254CB5F8733E050007F01000513--><AD_COLUMN>
 <!--00568254CB5F8733E050007F01000513-->  <AD_COLUMN_ID><![CDATA[00568254CB5F8733E050007F01000513]]></AD_COLUMN_ID>
 <!--00568254CB5F8733E050007F01000513-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -221688,6 +221652,7 @@
 <!--00568254CB678733E050007F01000513-->  <ISPARENT><![CDATA[Y]]></ISPARENT>
 <!--00568254CB678733E050007F01000513-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
 <!--00568254CB678733E050007F01000513-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--00568254CB678733E050007F01000513-->  <READONLYLOGIC><![CDATA[@HeaderStatus@='CO']]></READONLYLOGIC>
 <!--00568254CB678733E050007F01000513-->  <ISIDENTIFIER><![CDATA[Y]]></ISIDENTIFIER>
 <!--00568254CB678733E050007F01000513-->  <SEQNO><![CDATA[90]]></SEQNO>
 <!--00568254CB678733E050007F01000513-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
@@ -221758,7 +221723,7 @@
 <!--00568254CB698733E050007F01000513-->  <ISPARENT><![CDATA[N]]></ISPARENT>
 <!--00568254CB698733E050007F01000513-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
 <!--00568254CB698733E050007F01000513-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
-<!--00568254CB698733E050007F01000513-->  <READONLYLOGIC><![CDATA[@ProcessedHeader@='Y']]></READONLYLOGIC>
+<!--00568254CB698733E050007F01000513-->  <READONLYLOGIC><![CDATA[@ProcessedHeader@='Y' | @HeaderStatus@='CO']]></READONLYLOGIC>
 <!--00568254CB698733E050007F01000513-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
 <!--00568254CB698733E050007F01000513-->  <SEQNO><![CDATA[110]]></SEQNO>
 <!--00568254CB698733E050007F01000513-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
@@ -221792,7 +221757,7 @@
 <!--00568254CB6B8733E050007F01000513-->  <ISPARENT><![CDATA[N]]></ISPARENT>
 <!--00568254CB6B8733E050007F01000513-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
 <!--00568254CB6B8733E050007F01000513-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
-<!--00568254CB6B8733E050007F01000513-->  <READONLYLOGIC><![CDATA[@ProcessedHeader@='Y'|(@c_invoiceline_id@!null&@c_invoiceline_id@!'')]]></READONLYLOGIC>
+<!--00568254CB6B8733E050007F01000513-->  <READONLYLOGIC><![CDATA[@ProcessedHeader@='Y'|(@c_invoiceline_id@!null&@c_invoiceline_id@!'') | @HeaderStatus@='CO']]></READONLYLOGIC>
 <!--00568254CB6B8733E050007F01000513-->  <ISIDENTIFIER><![CDATA[Y]]></ISIDENTIFIER>
 <!--00568254CB6B8733E050007F01000513-->  <SEQNO><![CDATA[130]]></SEQNO>
 <!--00568254CB6B8733E050007F01000513-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
@@ -221828,7 +221793,7 @@
 <!--00568254CB6C8733E050007F01000513-->  <ISPARENT><![CDATA[N]]></ISPARENT>
 <!--00568254CB6C8733E050007F01000513-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
 <!--00568254CB6C8733E050007F01000513-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
-<!--00568254CB6C8733E050007F01000513-->  <READONLYLOGIC><![CDATA[@ProcessedHeader@='Y']]></READONLYLOGIC>
+<!--00568254CB6C8733E050007F01000513-->  <READONLYLOGIC><![CDATA[@ProcessedHeader@='Y' | @HeaderStatus@='CO']]></READONLYLOGIC>
 <!--00568254CB6C8733E050007F01000513-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
 <!--00568254CB6C8733E050007F01000513-->  <SEQNO><![CDATA[140]]></SEQNO>
 <!--00568254CB6C8733E050007F01000513-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
@@ -221899,7 +221864,7 @@
 <!--00568254CB718733E050007F01000513-->  <ISPARENT><![CDATA[N]]></ISPARENT>
 <!--00568254CB718733E050007F01000513-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
 <!--00568254CB718733E050007F01000513-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
-<!--00568254CB718733E050007F01000513-->  <READONLYLOGIC><![CDATA[@ProcessedHeader@='Y'|(@c_invoiceline_id@!null&@c_invoiceline_id@!'')]]></READONLYLOGIC>
+<!--00568254CB718733E050007F01000513-->  <READONLYLOGIC><![CDATA[@ProcessedHeader@='Y'|(@c_invoiceline_id@!null&@c_invoiceline_id@!'') | @HeaderStatus@='CO']]></READONLYLOGIC>
 <!--00568254CB718733E050007F01000513-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
 <!--00568254CB718733E050007F01000513-->  <SEQNO><![CDATA[160]]></SEQNO>
 <!--00568254CB718733E050007F01000513-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
@@ -223572,7 +223537,7 @@
 <!--01DDF5AB6917DB9EE050007F01002DD8-->  <ISPARENT><![CDATA[N]]></ISPARENT>
 <!--01DDF5AB6917DB9EE050007F01002DD8-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
 <!--01DDF5AB6917DB9EE050007F01002DD8-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
-<!--01DDF5AB6917DB9EE050007F01002DD8-->  <READONLYLOGIC><![CDATA[@ProcessedHeader@='Y']]></READONLYLOGIC>
+<!--01DDF5AB6917DB9EE050007F01002DD8-->  <READONLYLOGIC><![CDATA[@ProcessedHeader@='Y' | @HeaderStatus@='CO']]></READONLYLOGIC>
 <!--01DDF5AB6917DB9EE050007F01002DD8-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
 <!--01DDF5AB6917DB9EE050007F01002DD8-->  <SEQNO><![CDATA[170]]></SEQNO>
 <!--01DDF5AB6917DB9EE050007F01002DD8-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
@@ -223752,7 +223717,7 @@
 <!--0227873A968BE6FBE050007F01005124-->  <ISPARENT><![CDATA[N]]></ISPARENT>
 <!--0227873A968BE6FBE050007F01005124-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
 <!--0227873A968BE6FBE050007F01005124-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
-<!--0227873A968BE6FBE050007F01005124-->  <READONLYLOGIC><![CDATA[@ProcessedHeader@='Y']]></READONLYLOGIC>
+<!--0227873A968BE6FBE050007F01005124-->  <READONLYLOGIC><![CDATA[@ProcessedHeader@='Y' | @HeaderStatus@='CO']]></READONLYLOGIC>
 <!--0227873A968BE6FBE050007F01005124-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
 <!--0227873A968BE6FBE050007F01005124-->  <SEQNO><![CDATA[200]]></SEQNO>
 <!--0227873A968BE6FBE050007F01005124-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
@@ -225202,6 +225167,75 @@
 <!--05C58E74CB76448CBA4AF4CA43E193E3-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
 <!--05C58E74CB76448CBA4AF4CA43E193E3--></AD_COLUMN>
 
+<!--06005FA088FD93DAE050007F01006246--><AD_COLUMN>
+<!--06005FA088FD93DAE050007F01006246-->  <AD_COLUMN_ID><![CDATA[06005FA088FD93DAE050007F01006246]]></AD_COLUMN_ID>
+<!--06005FA088FD93DAE050007F01006246-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--06005FA088FD93DAE050007F01006246-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--06005FA088FD93DAE050007F01006246-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--06005FA088FD93DAE050007F01006246-->  <NAME><![CDATA[Allocated]]></NAME>
+<!--06005FA088FD93DAE050007F01006246-->  <HELP><![CDATA[An Allocated Reservation Stock means that the referenced stock and quantity can only be used to fulfill this Reservation.]]></HELP>
+<!--06005FA088FD93DAE050007F01006246-->  <COLUMNNAME><![CDATA[Isallocated]]></COLUMNNAME>
+<!--06005FA088FD93DAE050007F01006246-->  <AD_TABLE_ID><![CDATA[190]]></AD_TABLE_ID>
+<!--06005FA088FD93DAE050007F01006246-->  <AD_REFERENCE_ID><![CDATA[20]]></AD_REFERENCE_ID>
+<!--06005FA088FD93DAE050007F01006246-->  <FIELDLENGTH><![CDATA[1]]></FIELDLENGTH>
+<!--06005FA088FD93DAE050007F01006246-->  <DEFAULTVALUE><![CDATA[N]]></DEFAULTVALUE>
+<!--06005FA088FD93DAE050007F01006246-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--06005FA088FD93DAE050007F01006246-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--06005FA088FD93DAE050007F01006246-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
+<!--06005FA088FD93DAE050007F01006246-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--06005FA088FD93DAE050007F01006246-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--06005FA088FD93DAE050007F01006246-->  <SEQNO><![CDATA[71]]></SEQNO>
+<!--06005FA088FD93DAE050007F01006246-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--06005FA088FD93DAE050007F01006246-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--06005FA088FD93DAE050007F01006246-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--06005FA088FD93DAE050007F01006246-->  <AD_ELEMENT_ID><![CDATA[CA9E531DC5F9EB11E040007F0100672C]]></AD_ELEMENT_ID>
+<!--06005FA088FD93DAE050007F01006246-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--06005FA088FD93DAE050007F01006246-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--06005FA088FD93DAE050007F01006246-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--06005FA088FD93DAE050007F01006246-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--06005FA088FD93DAE050007F01006246-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--06005FA088FD93DAE050007F01006246-->  <POSITION><![CDATA[20]]></POSITION>
+<!--06005FA088FD93DAE050007F01006246-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--06005FA088FD93DAE050007F01006246-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
+<!--06005FA088FD93DAE050007F01006246-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
+<!--06005FA088FD93DAE050007F01006246-->  <IMAGESIZEVALUESACTION><![CDATA[N]]></IMAGESIZEVALUESACTION>
+<!--06005FA088FD93DAE050007F01006246-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
+<!--06005FA088FD93DAE050007F01006246--></AD_COLUMN>
+
+<!--06018F3A50D9AE33E050007F010021AE--><AD_COLUMN>
+<!--06018F3A50D9AE33E050007F010021AE-->  <AD_COLUMN_ID><![CDATA[06018F3A50D9AE33E050007F010021AE]]></AD_COLUMN_ID>
+<!--06018F3A50D9AE33E050007F010021AE-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--06018F3A50D9AE33E050007F010021AE-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--06018F3A50D9AE33E050007F010021AE-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--06018F3A50D9AE33E050007F010021AE-->  <NAME><![CDATA[Allocated]]></NAME>
+<!--06018F3A50D9AE33E050007F010021AE-->  <HELP><![CDATA[An Allocated Reservation Stock means that the referenced stock and quantity can only be used to fulfill this Reservation.]]></HELP>
+<!--06018F3A50D9AE33E050007F010021AE-->  <COLUMNNAME><![CDATA[Isallocated]]></COLUMNNAME>
+<!--06018F3A50D9AE33E050007F010021AE-->  <AD_TABLE_ID><![CDATA[37E387BC8B4F4906B6D653ACAE690A1E]]></AD_TABLE_ID>
+<!--06018F3A50D9AE33E050007F010021AE-->  <AD_REFERENCE_ID><![CDATA[20]]></AD_REFERENCE_ID>
+<!--06018F3A50D9AE33E050007F010021AE-->  <FIELDLENGTH><![CDATA[1]]></FIELDLENGTH>
+<!--06018F3A50D9AE33E050007F010021AE-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--06018F3A50D9AE33E050007F010021AE-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--06018F3A50D9AE33E050007F010021AE-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
+<!--06018F3A50D9AE33E050007F010021AE-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--06018F3A50D9AE33E050007F010021AE-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--06018F3A50D9AE33E050007F010021AE-->  <SEQNO><![CDATA[260]]></SEQNO>
+<!--06018F3A50D9AE33E050007F010021AE-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--06018F3A50D9AE33E050007F010021AE-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--06018F3A50D9AE33E050007F010021AE-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--06018F3A50D9AE33E050007F010021AE-->  <AD_ELEMENT_ID><![CDATA[CA9E531DC5F9EB11E040007F0100672C]]></AD_ELEMENT_ID>
+<!--06018F3A50D9AE33E050007F010021AE-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--06018F3A50D9AE33E050007F010021AE-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--06018F3A50D9AE33E050007F010021AE-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--06018F3A50D9AE33E050007F010021AE-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--06018F3A50D9AE33E050007F010021AE-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--06018F3A50D9AE33E050007F010021AE-->  <POSITION><![CDATA[25]]></POSITION>
+<!--06018F3A50D9AE33E050007F010021AE-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--06018F3A50D9AE33E050007F010021AE-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
+<!--06018F3A50D9AE33E050007F010021AE-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
+<!--06018F3A50D9AE33E050007F010021AE-->  <IMAGESIZEVALUESACTION><![CDATA[N]]></IMAGESIZEVALUESACTION>
+<!--06018F3A50D9AE33E050007F010021AE-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
+<!--06018F3A50D9AE33E050007F010021AE--></AD_COLUMN>
+
 <!--060657E87C824FD29A132A97802331F1--><AD_COLUMN>
 <!--060657E87C824FD29A132A97802331F1-->  <AD_COLUMN_ID><![CDATA[060657E87C824FD29A132A97802331F1]]></AD_COLUMN_ID>
 <!--060657E87C824FD29A132A97802331F1-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -287055,6 +287089,7 @@
 <!--842AB447B9D1488EA42F3DACA71934F3-->  <ISPARENT><![CDATA[N]]></ISPARENT>
 <!--842AB447B9D1488EA42F3DACA71934F3-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
 <!--842AB447B9D1488EA42F3DACA71934F3-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--842AB447B9D1488EA42F3DACA71934F3-->  <READONLYLOGIC><![CDATA[@isvalidated@='Y']]></READONLYLOGIC>
 <!--842AB447B9D1488EA42F3DACA71934F3-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
 <!--842AB447B9D1488EA42F3DACA71934F3-->  <SEQNO><![CDATA[200]]></SEQNO>
 <!--842AB447B9D1488EA42F3DACA71934F3-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
@@ -309093,6 +309128,7 @@
 <!--B151560F62693082E040007F01002081-->  <ISPARENT><![CDATA[N]]></ISPARENT>
 <!--B151560F62693082E040007F01002081-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
 <!--B151560F62693082E040007F01002081-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--B151560F62693082E040007F01002081-->  <READONLYLOGIC><![CDATA[@M_Locator_ID@=null]]></READONLYLOGIC>
 <!--B151560F62693082E040007F01002081-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
 <!--B151560F62693082E040007F01002081-->  <SEQNO><![CDATA[140]]></SEQNO>
 <!--B151560F62693082E040007F01002081-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
--- a/src-db/database/sourcedata/AD_ELEMENT.xml	Tue Nov 18 10:57:35 2014 +0100
+++ b/src-db/database/sourcedata/AD_ELEMENT.xml	Tue Nov 18 11:03:11 2014 +0100
@@ -15508,9 +15508,9 @@
 <!--800495-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--800495-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--800495-->  <COLUMNNAME><![CDATA[Days]]></COLUMNNAME>
-<!--800495-->  <NAME><![CDATA[Waiting Period (Hours)]]></NAME>
+<!--800495-->  <NAME><![CDATA[Waiting Period (Days)]]></NAME>
 <!--800495-->  <PRINTNAME><![CDATA[Days]]></PRINTNAME>
-<!--800495-->  <HELP><![CDATA[Delay in hours from the beginning of the case to perform the test.]]></HELP>
+<!--800495-->  <HELP><![CDATA[Delay in days from the beginning of the case to perform the test.]]></HELP>
 <!--800495-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--800495-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
 <!--800495--></AD_ELEMENT>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src-db/database/sourcedata/AD_EP_PROCEDURES.xml	Tue Nov 18 11:03:11 2014 +0100
@@ -0,0 +1,13 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<data>
+<!--5EA5277A83DE47FA8775B1EAA725223D--><AD_EP_PROCEDURES>
+<!--5EA5277A83DE47FA8775B1EAA725223D-->  <AD_EP_PROCEDURES_ID><![CDATA[5EA5277A83DE47FA8775B1EAA725223D]]></AD_EP_PROCEDURES_ID>
+<!--5EA5277A83DE47FA8775B1EAA725223D-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--5EA5277A83DE47FA8775B1EAA725223D-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--5EA5277A83DE47FA8775B1EAA725223D-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--5EA5277A83DE47FA8775B1EAA725223D-->  <AD_EXTENSION_POINTS_ID><![CDATA[CBE7DD2E561E4D3D8257ECEA5F19687F]]></AD_EXTENSION_POINTS_ID>
+<!--5EA5277A83DE47FA8775B1EAA725223D-->  <PROCEDURENAME><![CDATA[C_INVOICE_REACTIVATE]]></PROCEDURENAME>
+<!--5EA5277A83DE47FA8775B1EAA725223D-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--5EA5277A83DE47FA8775B1EAA725223D--></AD_EP_PROCEDURES>
+
+</data>
--- a/src-db/database/sourcedata/AD_FIELD.xml	Tue Nov 18 10:57:35 2014 +0100
+++ b/src-db/database/sourcedata/AD_FIELD.xml	Tue Nov 18 11:03:11 2014 +0100
@@ -12860,7 +12860,7 @@
 <!--997-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
 <!--997-->  <DISPLAYLENGTH><![CDATA[1]]></DISPLAYLENGTH>
 <!--997-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
-<!--997-->  <SEQNO><![CDATA[70]]></SEQNO>
+<!--997-->  <SEQNO><![CDATA[80]]></SEQNO>
 <!--997-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--997-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--997-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
@@ -131110,8 +131110,8 @@
 <!--802588-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
 <!--802588-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--802588-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
-<!--802588-->  <NAME><![CDATA[Waiting Period (Hours)]]></NAME>
-<!--802588-->  <HELP><![CDATA[Delay in hours from the beginning of the case to perform the test.]]></HELP>
+<!--802588-->  <NAME><![CDATA[Waiting Period (Days)]]></NAME>
+<!--802588-->  <HELP><![CDATA[Delay in days from the beginning of the case to perform the test.]]></HELP>
 <!--802588-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
 <!--802588-->  <AD_TAB_ID><![CDATA[800160]]></AD_TAB_ID>
 <!--802588-->  <AD_COLUMN_ID><![CDATA[802337]]></AD_COLUMN_ID>
@@ -175649,34 +175649,6 @@
 <!--0056819E5150679FE050007F01000569-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
 <!--0056819E5150679FE050007F01000569--></AD_FIELD>
 
-<!--0056819E5151679FE050007F01000569--><AD_FIELD>
-<!--0056819E5151679FE050007F01000569-->  <AD_FIELD_ID><![CDATA[0056819E5151679FE050007F01000569]]></AD_FIELD_ID>
-<!--0056819E5151679FE050007F01000569-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
-<!--0056819E5151679FE050007F01000569-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
-<!--0056819E5151679FE050007F01000569-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
-<!--0056819E5151679FE050007F01000569-->  <NAME><![CDATA[Currency]]></NAME>
-<!--0056819E5151679FE050007F01000569-->  <DESCRIPTION><![CDATA[An accepted medium of monetary exchange that may vary across countries.]]></DESCRIPTION>
-<!--0056819E5151679FE050007F01000569-->  <HELP><![CDATA[Indicates the currency to be used when processing this document.]]></HELP>
-<!--0056819E5151679FE050007F01000569-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
-<!--0056819E5151679FE050007F01000569-->  <AD_TAB_ID><![CDATA[F25CBC61CDD64F5E8A6FDC41C6E23C96]]></AD_TAB_ID>
-<!--0056819E5151679FE050007F01000569-->  <AD_COLUMN_ID><![CDATA[00568254CB3D8733E050007F01000513]]></AD_COLUMN_ID>
-<!--0056819E5151679FE050007F01000569-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
-<!--0056819E5151679FE050007F01000569-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
-<!--0056819E5151679FE050007F01000569-->  <DISPLAYLENGTH><![CDATA[32]]></DISPLAYLENGTH>
-<!--0056819E5151679FE050007F01000569-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
-<!--0056819E5151679FE050007F01000569-->  <SEQNO><![CDATA[60]]></SEQNO>
-<!--0056819E5151679FE050007F01000569-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
-<!--0056819E5151679FE050007F01000569-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
-<!--0056819E5151679FE050007F01000569-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
-<!--0056819E5151679FE050007F01000569-->  <SHOWINRELATION><![CDATA[Y]]></SHOWINRELATION>
-<!--0056819E5151679FE050007F01000569-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
-<!--0056819E5151679FE050007F01000569-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
-<!--0056819E5151679FE050007F01000569-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
-<!--0056819E5151679FE050007F01000569-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
-<!--0056819E5151679FE050007F01000569-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
-<!--0056819E5151679FE050007F01000569-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
-<!--0056819E5151679FE050007F01000569--></AD_FIELD>
-
 <!--0056819E5164679FE050007F01000569--><AD_FIELD>
 <!--0056819E5164679FE050007F01000569-->  <AD_FIELD_ID><![CDATA[0056819E5164679FE050007F01000569]]></AD_FIELD_ID>
 <!--0056819E5164679FE050007F01000569-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -176275,7 +176247,7 @@
 <!--00568254CC038733E050007F01000513-->  <AD_TAB_ID><![CDATA[0F76B56EB2874C729ABE1665D5853E9D]]></AD_TAB_ID>
 <!--00568254CC038733E050007F01000513-->  <AD_COLUMN_ID><![CDATA[00568254CB628733E050007F01000513]]></AD_COLUMN_ID>
 <!--00568254CC038733E050007F01000513-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
-<!--00568254CC038733E050007F01000513-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--00568254CC038733E050007F01000513-->  <ISDISPLAYED><![CDATA[N]]></ISDISPLAYED>
 <!--00568254CC038733E050007F01000513-->  <DISPLAYLENGTH><![CDATA[1]]></DISPLAYLENGTH>
 <!--00568254CC038733E050007F01000513-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--00568254CC038733E050007F01000513-->  <SEQNO><![CDATA[990]]></SEQNO>
@@ -176305,7 +176277,7 @@
 <!--00568254CC048733E050007F01000513-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
 <!--00568254CC048733E050007F01000513-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
 <!--00568254CC048733E050007F01000513-->  <DISPLAYLENGTH><![CDATA[32]]></DISPLAYLENGTH>
-<!--00568254CC048733E050007F01000513-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--00568254CC048733E050007F01000513-->  <ISREADONLY><![CDATA[Y]]></ISREADONLY>
 <!--00568254CC048733E050007F01000513-->  <SEQNO><![CDATA[80]]></SEQNO>
 <!--00568254CC048733E050007F01000513-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--00568254CC048733E050007F01000513-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
@@ -178524,7 +178496,7 @@
 <!--023AA8E75FDB4274E050007F01005DB0-->  <AD_TAB_ID><![CDATA[0F76B56EB2874C729ABE1665D5853E9D]]></AD_TAB_ID>
 <!--023AA8E75FDB4274E050007F01005DB0-->  <AD_COLUMN_ID><![CDATA[022DB885E9665700E050007F01000846]]></AD_COLUMN_ID>
 <!--023AA8E75FDB4274E050007F01005DB0-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
-<!--023AA8E75FDB4274E050007F01005DB0-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--023AA8E75FDB4274E050007F01005DB0-->  <ISDISPLAYED><![CDATA[N]]></ISDISPLAYED>
 <!--023AA8E75FDB4274E050007F01005DB0-->  <DISPLAYLOGIC><![CDATA[@IsMatched@='N']]></DISPLAYLOGIC>
 <!--023AA8E75FDB4274E050007F01005DB0-->  <DISPLAYLENGTH><![CDATA[1]]></DISPLAYLENGTH>
 <!--023AA8E75FDB4274E050007F01005DB0-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
@@ -179483,7 +179455,7 @@
 <!--052E2B6A5FB444A0A8FFA12A7F5AE7D2-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--052E2B6A5FB444A0A8FFA12A7F5AE7D2-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--052E2B6A5FB444A0A8FFA12A7F5AE7D2-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
-<!--052E2B6A5FB444A0A8FFA12A7F5AE7D2-->  <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
+<!--052E2B6A5FB444A0A8FFA12A7F5AE7D2-->  <SHOWINRELATION><![CDATA[Y]]></SHOWINRELATION>
 <!--052E2B6A5FB444A0A8FFA12A7F5AE7D2-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
 <!--052E2B6A5FB444A0A8FFA12A7F5AE7D2-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--052E2B6A5FB444A0A8FFA12A7F5AE7D2-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
@@ -179659,6 +179631,35 @@
 <!--05A05505FBF14040A661CE3A51417DAC-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
 <!--05A05505FBF14040A661CE3A51417DAC--></AD_FIELD>
 
+<!--06005FA0890493DAE050007F01006246--><AD_FIELD>
+<!--06005FA0890493DAE050007F01006246-->  <AD_FIELD_ID><![CDATA[06005FA0890493DAE050007F01006246]]></AD_FIELD_ID>
+<!--06005FA0890493DAE050007F01006246-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--06005FA0890493DAE050007F01006246-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--06005FA0890493DAE050007F01006246-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--06005FA0890493DAE050007F01006246-->  <NAME><![CDATA[Allocated]]></NAME>
+<!--06005FA0890493DAE050007F01006246-->  <HELP><![CDATA[When the system automatically reserves stock of this warehouse it will be allocated or not based on this flag.]]></HELP>
+<!--06005FA0890493DAE050007F01006246-->  <ISCENTRALLYMAINTAINED><![CDATA[N]]></ISCENTRALLYMAINTAINED>
+<!--06005FA0890493DAE050007F01006246-->  <AD_TAB_ID><![CDATA[177]]></AD_TAB_ID>
+<!--06005FA0890493DAE050007F01006246-->  <AD_COLUMN_ID><![CDATA[06005FA088FD93DAE050007F01006246]]></AD_COLUMN_ID>
+<!--06005FA0890493DAE050007F01006246-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
+<!--06005FA0890493DAE050007F01006246-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--06005FA0890493DAE050007F01006246-->  <DISPLAYLOGIC><![CDATA[@StockReservations@!'']]></DISPLAYLOGIC>
+<!--06005FA0890493DAE050007F01006246-->  <DISPLAYLENGTH><![CDATA[1]]></DISPLAYLENGTH>
+<!--06005FA0890493DAE050007F01006246-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--06005FA0890493DAE050007F01006246-->  <SEQNO><![CDATA[70]]></SEQNO>
+<!--06005FA0890493DAE050007F01006246-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--06005FA0890493DAE050007F01006246-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--06005FA0890493DAE050007F01006246-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--06005FA0890493DAE050007F01006246-->  <SHOWINRELATION><![CDATA[Y]]></SHOWINRELATION>
+<!--06005FA0890493DAE050007F01006246-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--06005FA0890493DAE050007F01006246-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--06005FA0890493DAE050007F01006246-->  <GRID_SEQNO><![CDATA[70]]></GRID_SEQNO>
+<!--06005FA0890493DAE050007F01006246-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--06005FA0890493DAE050007F01006246-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--06005FA0890493DAE050007F01006246-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--06005FA0890493DAE050007F01006246-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
+<!--06005FA0890493DAE050007F01006246--></AD_FIELD>
+
 <!--06119ABE11644B2B8CD67F7DC4C96891--><AD_FIELD>
 <!--06119ABE11644B2B8CD67F7DC4C96891-->  <AD_FIELD_ID><![CDATA[06119ABE11644B2B8CD67F7DC4C96891]]></AD_FIELD_ID>
 <!--06119ABE11644B2B8CD67F7DC4C96891-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -181194,6 +181195,35 @@
 <!--0B6B5FF16D8D419DA4E4751CDCC78158-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
 <!--0B6B5FF16D8D419DA4E4751CDCC78158--></AD_FIELD>
 
+<!--0B6D4F88C0C04FFCA730D7115B17A298--><AD_FIELD>
+<!--0B6D4F88C0C04FFCA730D7115B17A298-->  <AD_FIELD_ID><![CDATA[0B6D4F88C0C04FFCA730D7115B17A298]]></AD_FIELD_ID>
+<!--0B6D4F88C0C04FFCA730D7115B17A298-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--0B6D4F88C0C04FFCA730D7115B17A298-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--0B6D4F88C0C04FFCA730D7115B17A298-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--0B6D4F88C0C04FFCA730D7115B17A298-->  <NAME><![CDATA[Year]]></NAME>
+<!--0B6D4F88C0C04FFCA730D7115B17A298-->  <DESCRIPTION><![CDATA[Calendar Year]]></DESCRIPTION>
+<!--0B6D4F88C0C04FFCA730D7115B17A298-->  <HELP><![CDATA[The Year uniquely identifies an accounting year for a calendar.]]></HELP>
+<!--0B6D4F88C0C04FFCA730D7115B17A298-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--0B6D4F88C0C04FFCA730D7115B17A298-->  <AD_TAB_ID><![CDATA[4FB5884A443240EEB5504BBF7813870D]]></AD_TAB_ID>
+<!--0B6D4F88C0C04FFCA730D7115B17A298-->  <AD_COLUMN_ID><![CDATA[846]]></AD_COLUMN_ID>
+<!--0B6D4F88C0C04FFCA730D7115B17A298-->  <PROPERTY><![CDATA[period.year]]></PROPERTY>
+<!--0B6D4F88C0C04FFCA730D7115B17A298-->  <IGNOREINWAD><![CDATA[Y]]></IGNOREINWAD>
+<!--0B6D4F88C0C04FFCA730D7115B17A298-->  <ISDISPLAYED><![CDATA[N]]></ISDISPLAYED>
+<!--0B6D4F88C0C04FFCA730D7115B17A298-->  <DISPLAYLENGTH><![CDATA[22]]></DISPLAYLENGTH>
+<!--0B6D4F88C0C04FFCA730D7115B17A298-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--0B6D4F88C0C04FFCA730D7115B17A298-->  <SEQNO><![CDATA[30]]></SEQNO>
+<!--0B6D4F88C0C04FFCA730D7115B17A298-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--0B6D4F88C0C04FFCA730D7115B17A298-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--0B6D4F88C0C04FFCA730D7115B17A298-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--0B6D4F88C0C04FFCA730D7115B17A298-->  <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
+<!--0B6D4F88C0C04FFCA730D7115B17A298-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--0B6D4F88C0C04FFCA730D7115B17A298-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--0B6D4F88C0C04FFCA730D7115B17A298-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--0B6D4F88C0C04FFCA730D7115B17A298-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--0B6D4F88C0C04FFCA730D7115B17A298-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--0B6D4F88C0C04FFCA730D7115B17A298-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
+<!--0B6D4F88C0C04FFCA730D7115B17A298--></AD_FIELD>
+
 <!--0B8D3921854242DB8406BE46A4C0AC8F--><AD_FIELD>
 <!--0B8D3921854242DB8406BE46A4C0AC8F-->  <AD_FIELD_ID><![CDATA[0B8D3921854242DB8406BE46A4C0AC8F]]></AD_FIELD_ID>
 <!--0B8D3921854242DB8406BE46A4C0AC8F-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -181707,6 +181737,34 @@
 <!--0CBE816A45594928AB5484A9B82FBC9D-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
 <!--0CBE816A45594928AB5484A9B82FBC9D--></AD_FIELD>
 
+<!--0CC4EEFC6B84455EA2B01704BF87AAEB--><AD_FIELD>
+<!--0CC4EEFC6B84455EA2B01704BF87AAEB-->  <AD_FIELD_ID><![CDATA[0CC4EEFC6B84455EA2B01704BF87AAEB]]></AD_FIELD_ID>
+<!--0CC4EEFC6B84455EA2B01704BF87AAEB-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--0CC4EEFC6B84455EA2B01704BF87AAEB-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--0CC4EEFC6B84455EA2B01704BF87AAEB-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--0CC4EEFC6B84455EA2B01704BF87AAEB-->  <NAME><![CDATA[Status]]></NAME>
+<!--0CC4EEFC6B84455EA2B01704BF87AAEB-->  <DESCRIPTION><![CDATA[A defined state or position of a payment.]]></DESCRIPTION>
+<!--0CC4EEFC6B84455EA2B01704BF87AAEB-->  <HELP><![CDATA[Status for the debt payment]]></HELP>
+<!--0CC4EEFC6B84455EA2B01704BF87AAEB-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--0CC4EEFC6B84455EA2B01704BF87AAEB-->  <AD_TAB_ID><![CDATA[885A6DB490044F3F8528373B60E3D9F5]]></AD_TAB_ID>
+<!--0CC4EEFC6B84455EA2B01704BF87AAEB-->  <AD_COLUMN_ID><![CDATA[6C095E9D39CD4A31BC29FB37853B9044]]></AD_COLUMN_ID>
+<!--0CC4EEFC6B84455EA2B01704BF87AAEB-->  <IGNOREINWAD><![CDATA[Y]]></IGNOREINWAD>
+<!--0CC4EEFC6B84455EA2B01704BF87AAEB-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--0CC4EEFC6B84455EA2B01704BF87AAEB-->  <DISPLAYLENGTH><![CDATA[32]]></DISPLAYLENGTH>
+<!--0CC4EEFC6B84455EA2B01704BF87AAEB-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--0CC4EEFC6B84455EA2B01704BF87AAEB-->  <SEQNO><![CDATA[15]]></SEQNO>
+<!--0CC4EEFC6B84455EA2B01704BF87AAEB-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--0CC4EEFC6B84455EA2B01704BF87AAEB-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--0CC4EEFC6B84455EA2B01704BF87AAEB-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--0CC4EEFC6B84455EA2B01704BF87AAEB-->  <SHOWINRELATION><![CDATA[Y]]></SHOWINRELATION>
+<!--0CC4EEFC6B84455EA2B01704BF87AAEB-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--0CC4EEFC6B84455EA2B01704BF87AAEB-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--0CC4EEFC6B84455EA2B01704BF87AAEB-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--0CC4EEFC6B84455EA2B01704BF87AAEB-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--0CC4EEFC6B84455EA2B01704BF87AAEB-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--0CC4EEFC6B84455EA2B01704BF87AAEB-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
+<!--0CC4EEFC6B84455EA2B01704BF87AAEB--></AD_FIELD>
+
 <!--0CD05D49ED214052B2C59F88F8999A34--><AD_FIELD>
 <!--0CD05D49ED214052B2C59F88F8999A34-->  <AD_FIELD_ID><![CDATA[0CD05D49ED214052B2C59F88F8999A34]]></AD_FIELD_ID>
 <!--0CD05D49ED214052B2C59F88F8999A34-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -183266,6 +183324,33 @@
 <!--119FCD6CC06F43E6BE4DA88BC1368A4D-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
 <!--119FCD6CC06F43E6BE4DA88BC1368A4D--></AD_FIELD>
 
+<!--11C516B1076A4C6A9356851CA71498F3--><AD_FIELD>
+<!--11C516B1076A4C6A9356851CA71498F3-->  <AD_FIELD_ID><![CDATA[11C516B1076A4C6A9356851CA71498F3]]></AD_FIELD_ID>
+<!--11C516B1076A4C6A9356851CA71498F3-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--11C516B1076A4C6A9356851CA71498F3-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--11C516B1076A4C6A9356851CA71498F3-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--11C516B1076A4C6A9356851CA71498F3-->  <NAME><![CDATA[Allocated]]></NAME>
+<!--11C516B1076A4C6A9356851CA71498F3-->  <HELP><![CDATA[An Allocated Reservation Stock means that the referenced stock and quantity can only be used to fulfill this Reservation.]]></HELP>
+<!--11C516B1076A4C6A9356851CA71498F3-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--11C516B1076A4C6A9356851CA71498F3-->  <AD_TAB_ID><![CDATA[F03F2C664800458CAEFF50DECB3A7FFE]]></AD_TAB_ID>
+<!--11C516B1076A4C6A9356851CA71498F3-->  <AD_COLUMN_ID><![CDATA[06018F3A50D9AE33E050007F010021AE]]></AD_COLUMN_ID>
+<!--11C516B1076A4C6A9356851CA71498F3-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
+<!--11C516B1076A4C6A9356851CA71498F3-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--11C516B1076A4C6A9356851CA71498F3-->  <DISPLAYLENGTH><![CDATA[1]]></DISPLAYLENGTH>
+<!--11C516B1076A4C6A9356851CA71498F3-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--11C516B1076A4C6A9356851CA71498F3-->  <SEQNO><![CDATA[90]]></SEQNO>
+<!--11C516B1076A4C6A9356851CA71498F3-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--11C516B1076A4C6A9356851CA71498F3-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--11C516B1076A4C6A9356851CA71498F3-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--11C516B1076A4C6A9356851CA71498F3-->  <SHOWINRELATION><![CDATA[Y]]></SHOWINRELATION>
+<!--11C516B1076A4C6A9356851CA71498F3-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--11C516B1076A4C6A9356851CA71498F3-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--11C516B1076A4C6A9356851CA71498F3-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--11C516B1076A4C6A9356851CA71498F3-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--11C516B1076A4C6A9356851CA71498F3-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--11C516B1076A4C6A9356851CA71498F3-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
+<!--11C516B1076A4C6A9356851CA71498F3--></AD_FIELD>
+
 <!--11CD099503E147538CD4520E2EE10C04--><AD_FIELD>
 <!--11CD099503E147538CD4520E2EE10C04-->  <AD_FIELD_ID><![CDATA[11CD099503E147538CD4520E2EE10C04]]></AD_FIELD_ID>
 <!--11CD099503E147538CD4520E2EE10C04-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -187409,6 +187494,63 @@
 <!--1C1FBE81744B4AB4974716E8E420F27B-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
 <!--1C1FBE81744B4AB4974716E8E420F27B--></AD_FIELD>
 
+<!--1C57893D7EE14B43BA50FA6C1CC652CD--><AD_FIELD>
+<!--1C57893D7EE14B43BA50FA6C1CC652CD-->  <AD_FIELD_ID><![CDATA[1C57893D7EE14B43BA50FA6C1CC652CD]]></AD_FIELD_ID>
+<!--1C57893D7EE14B43BA50FA6C1CC652CD-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--1C57893D7EE14B43BA50FA6C1CC652CD-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--1C57893D7EE14B43BA50FA6C1CC652CD-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--1C57893D7EE14B43BA50FA6C1CC652CD-->  <NAME><![CDATA[Open/Close All]]></NAME>
+<!--1C57893D7EE14B43BA50FA6C1CC652CD-->  <DESCRIPTION><![CDATA[Open/Close all Base Document Types]]></DESCRIPTION>
+<!--1C57893D7EE14B43BA50FA6C1CC652CD-->  <HELP><![CDATA[Open/Close all Base Document Types.
+NOTE: You will not be able to close the fiscal year if you close all its periods permanently. Maybe you should close it before changing the last period from closed to permanently closed.]]></HELP>
+<!--1C57893D7EE14B43BA50FA6C1CC652CD-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--1C57893D7EE14B43BA50FA6C1CC652CD-->  <AD_TAB_ID><![CDATA[885A6DB490044F3F8528373B60E3D9F5]]></AD_TAB_ID>
+<!--1C57893D7EE14B43BA50FA6C1CC652CD-->  <AD_COLUMN_ID><![CDATA[5944]]></AD_COLUMN_ID>
+<!--1C57893D7EE14B43BA50FA6C1CC652CD-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
+<!--1C57893D7EE14B43BA50FA6C1CC652CD-->  <ISDISPLAYED><![CDATA[N]]></ISDISPLAYED>
+<!--1C57893D7EE14B43BA50FA6C1CC652CD-->  <DISPLAYLENGTH><![CDATA[1]]></DISPLAYLENGTH>
+<!--1C57893D7EE14B43BA50FA6C1CC652CD-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--1C57893D7EE14B43BA50FA6C1CC652CD-->  <SEQNO><![CDATA[90]]></SEQNO>
+<!--1C57893D7EE14B43BA50FA6C1CC652CD-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--1C57893D7EE14B43BA50FA6C1CC652CD-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--1C57893D7EE14B43BA50FA6C1CC652CD-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--1C57893D7EE14B43BA50FA6C1CC652CD-->  <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
+<!--1C57893D7EE14B43BA50FA6C1CC652CD-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--1C57893D7EE14B43BA50FA6C1CC652CD-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--1C57893D7EE14B43BA50FA6C1CC652CD-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--1C57893D7EE14B43BA50FA6C1CC652CD-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--1C57893D7EE14B43BA50FA6C1CC652CD-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--1C57893D7EE14B43BA50FA6C1CC652CD-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
+<!--1C57893D7EE14B43BA50FA6C1CC652CD--></AD_FIELD>
+
+<!--1C699675AE784F6CB33D050E9F8C51F7--><AD_FIELD>
+<!--1C699675AE784F6CB33D050E9F8C51F7-->  <AD_FIELD_ID><![CDATA[1C699675AE784F6CB33D050E9F8C51F7]]></AD_FIELD_ID>
+<!--1C699675AE784F6CB33D050E9F8C51F7-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--1C699675AE784F6CB33D050E9F8C51F7-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--1C699675AE784F6CB33D050E9F8C51F7-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--1C699675AE784F6CB33D050E9F8C51F7-->  <NAME><![CDATA[Regularization Fact_Acct_Group_ID]]></NAME>
+<!--1C699675AE784F6CB33D050E9F8C51F7-->  <DESCRIPTION><![CDATA[Refers to the Fact_Acct_Group_ID of the regularization entry]]></DESCRIPTION>
+<!--1C699675AE784F6CB33D050E9F8C51F7-->  <HELP><![CDATA[Refers to the Fact_Acct_Group_ID of the regularization entry]]></HELP>
+<!--1C699675AE784F6CB33D050E9F8C51F7-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--1C699675AE784F6CB33D050E9F8C51F7-->  <AD_TAB_ID><![CDATA[885A6DB490044F3F8528373B60E3D9F5]]></AD_TAB_ID>
+<!--1C699675AE784F6CB33D050E9F8C51F7-->  <AD_COLUMN_ID><![CDATA[5854D61EEF923B11E040007F01002D1D]]></AD_COLUMN_ID>
+<!--1C699675AE784F6CB33D050E9F8C51F7-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
+<!--1C699675AE784F6CB33D050E9F8C51F7-->  <ISDISPLAYED><![CDATA[N]]></ISDISPLAYED>
+<!--1C699675AE784F6CB33D050E9F8C51F7-->  <DISPLAYLENGTH><![CDATA[32]]></DISPLAYLENGTH>
+<!--1C699675AE784F6CB33D050E9F8C51F7-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--1C699675AE784F6CB33D050E9F8C51F7-->  <SEQNO><![CDATA[110]]></SEQNO>
+<!--1C699675AE784F6CB33D050E9F8C51F7-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--1C699675AE784F6CB33D050E9F8C51F7-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--1C699675AE784F6CB33D050E9F8C51F7-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--1C699675AE784F6CB33D050E9F8C51F7-->  <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
+<!--1C699675AE784F6CB33D050E9F8C51F7-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--1C699675AE784F6CB33D050E9F8C51F7-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--1C699675AE784F6CB33D050E9F8C51F7-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--1C699675AE784F6CB33D050E9F8C51F7-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--1C699675AE784F6CB33D050E9F8C51F7-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--1C699675AE784F6CB33D050E9F8C51F7-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
+<!--1C699675AE784F6CB33D050E9F8C51F7--></AD_FIELD>
+
 <!--1C70789D0D4F4C36AEB334055B995C6F--><AD_FIELD>
 <!--1C70789D0D4F4C36AEB334055B995C6F-->  <AD_FIELD_ID><![CDATA[1C70789D0D4F4C36AEB334055B995C6F]]></AD_FIELD_ID>
 <!--1C70789D0D4F4C36AEB334055B995C6F-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -189339,6 +189481,34 @@
 <!--21E3DA53AEFE4CAFB2CBC2C0E47D0D13-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
 <!--21E3DA53AEFE4CAFB2CBC2C0E47D0D13--></AD_FIELD>
 
+<!--21ECF5080AC0406898A5899E82E4A2F3--><AD_FIELD>
+<!--21ECF5080AC0406898A5899E82E4A2F3-->  <AD_FIELD_ID><![CDATA[21ECF5080AC0406898A5899E82E4A2F3]]></AD_FIELD_ID>
+<!--21ECF5080AC0406898A5899E82E4A2F3-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--21ECF5080AC0406898A5899E82E4A2F3-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--21ECF5080AC0406898A5899E82E4A2F3-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--21ECF5080AC0406898A5899E82E4A2F3-->  <NAME><![CDATA[Document Category]]></NAME>
+<!--21ECF5080AC0406898A5899E82E4A2F3-->  <DESCRIPTION><![CDATA[A classification of document types that are shown and processed in the same window.]]></DESCRIPTION>
+<!--21ECF5080AC0406898A5899E82E4A2F3-->  <HELP><![CDATA[The Document Base Type identifies the base or starting point for a document.  Multiple document types may share a single document base type.]]></HELP>
+<!--21ECF5080AC0406898A5899E82E4A2F3-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--21ECF5080AC0406898A5899E82E4A2F3-->  <AD_TAB_ID><![CDATA[4FB5884A443240EEB5504BBF7813870D]]></AD_TAB_ID>
+<!--21ECF5080AC0406898A5899E82E4A2F3-->  <AD_COLUMN_ID><![CDATA[5945]]></AD_COLUMN_ID>
+<!--21ECF5080AC0406898A5899E82E4A2F3-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
+<!--21ECF5080AC0406898A5899E82E4A2F3-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--21ECF5080AC0406898A5899E82E4A2F3-->  <DISPLAYLENGTH><![CDATA[60]]></DISPLAYLENGTH>
+<!--21ECF5080AC0406898A5899E82E4A2F3-->  <ISREADONLY><![CDATA[Y]]></ISREADONLY>
+<!--21ECF5080AC0406898A5899E82E4A2F3-->  <SEQNO><![CDATA[30]]></SEQNO>
+<!--21ECF5080AC0406898A5899E82E4A2F3-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--21ECF5080AC0406898A5899E82E4A2F3-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--21ECF5080AC0406898A5899E82E4A2F3-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--21ECF5080AC0406898A5899E82E4A2F3-->  <SHOWINRELATION><![CDATA[Y]]></SHOWINRELATION>
+<!--21ECF5080AC0406898A5899E82E4A2F3-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--21ECF5080AC0406898A5899E82E4A2F3-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--21ECF5080AC0406898A5899E82E4A2F3-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--21ECF5080AC0406898A5899E82E4A2F3-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--21ECF5080AC0406898A5899E82E4A2F3-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--21ECF5080AC0406898A5899E82E4A2F3-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
+<!--21ECF5080AC0406898A5899E82E4A2F3--></AD_FIELD>
+
 <!--22039949CA0345DB91BE3B3B5E776F7E--><AD_FIELD>
 <!--22039949CA0345DB91BE3B3B5E776F7E-->  <AD_FIELD_ID><![CDATA[22039949CA0345DB91BE3B3B5E776F7E]]></AD_FIELD_ID>
 <!--22039949CA0345DB91BE3B3B5E776F7E-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -192922,6 +193092,36 @@
 <!--2D06E858042E4397966007C26D191CF1-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
 <!--2D06E858042E4397966007C26D191CF1--></AD_FIELD>
 
+<!--2D08326CF03F4D348AA069B8E923DB68--><AD_FIELD>
+<!--2D08326CF03F4D348AA069B8E923DB68-->  <AD_FIELD_ID><![CDATA[2D08326CF03F4D348AA069B8E923DB68]]></AD_FIELD_ID>
+<!--2D08326CF03F4D348AA069B8E923DB68-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--2D08326CF03F4D348AA069B8E923DB68-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--2D08326CF03F4D348AA069B8E923DB68-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--2D08326CF03F4D348AA069B8E923DB68-->  <NAME><![CDATA[Active]]></NAME>
+<!--2D08326CF03F4D348AA069B8E923DB68-->  <DESCRIPTION><![CDATA[A flag indicating whether this record is available for use or de-activated.]]></DESCRIPTION>
+<!--2D08326CF03F4D348AA069B8E923DB68-->  <HELP><![CDATA[There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reporting. There are two reasons for de-activating and not deleting records: 
+(1) The system requires the record for auditing purposes.
+(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are existing invoices for it. By de-activating the Business Partner you prevent it from being used in future transactions.]]></HELP>
+<!--2D08326CF03F4D348AA069B8E923DB68-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--2D08326CF03F4D348AA069B8E923DB68-->  <AD_TAB_ID><![CDATA[4FB5884A443240EEB5504BBF7813870D]]></AD_TAB_ID>
+<!--2D08326CF03F4D348AA069B8E923DB68-->  <AD_COLUMN_ID><![CDATA[1815]]></AD_COLUMN_ID>
+<!--2D08326CF03F4D348AA069B8E923DB68-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
+<!--2D08326CF03F4D348AA069B8E923DB68-->  <ISDISPLAYED><![CDATA[N]]></ISDISPLAYED>
+<!--2D08326CF03F4D348AA069B8E923DB68-->  <DISPLAYLENGTH><![CDATA[1]]></DISPLAYLENGTH>
+<!--2D08326CF03F4D348AA069B8E923DB68-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--2D08326CF03F4D348AA069B8E923DB68-->  <SEQNO><![CDATA[20]]></SEQNO>
+<!--2D08326CF03F4D348AA069B8E923DB68-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--2D08326CF03F4D348AA069B8E923DB68-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--2D08326CF03F4D348AA069B8E923DB68-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--2D08326CF03F4D348AA069B8E923DB68-->  <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
+<!--2D08326CF03F4D348AA069B8E923DB68-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--2D08326CF03F4D348AA069B8E923DB68-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--2D08326CF03F4D348AA069B8E923DB68-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--2D08326CF03F4D348AA069B8E923DB68-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--2D08326CF03F4D348AA069B8E923DB68-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--2D08326CF03F4D348AA069B8E923DB68-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
+<!--2D08326CF03F4D348AA069B8E923DB68--></AD_FIELD>
+
 <!--2D1767DF008E44C6AC778416B50DA9C1--><AD_FIELD>
 <!--2D1767DF008E44C6AC778416B50DA9C1-->  <AD_FIELD_ID><![CDATA[2D1767DF008E44C6AC778416B50DA9C1]]></AD_FIELD_ID>
 <!--2D1767DF008E44C6AC778416B50DA9C1-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -197147,6 +197347,33 @@
 <!--3846B544FCE14364B39D309A04EC3994-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
 <!--3846B544FCE14364B39D309A04EC3994--></AD_FIELD>
 
+<!--384D92F0496046BB8C2DCB494AD9ECF4--><AD_FIELD>
+<!--384D92F0496046BB8C2DCB494AD9ECF4-->  <AD_FIELD_ID><![CDATA[384D92F0496046BB8C2DCB494AD9ECF4]]></AD_FIELD_ID>
+<!--384D92F0496046BB8C2DCB494AD9ECF4-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--384D92F0496046BB8C2DCB494AD9ECF4-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--384D92F0496046BB8C2DCB494AD9ECF4-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--384D92F0496046BB8C2DCB494AD9ECF4-->  <NAME><![CDATA[Client]]></NAME>
+<!--384D92F0496046BB8C2DCB494AD9ECF4-->  <DESCRIPTION><![CDATA[Client for this installation.]]></DESCRIPTION>
+<!--384D92F0496046BB8C2DCB494AD9ECF4-->  <HELP><![CDATA[A Client is a company or a legal entity. You cannot share data between Clients.]]></HELP>
+<!--384D92F0496046BB8C2DCB494AD9ECF4-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--384D92F0496046BB8C2DCB494AD9ECF4-->  <AD_TAB_ID><![CDATA[4FB5884A443240EEB5504BBF7813870D]]></AD_TAB_ID>
+<!--384D92F0496046BB8C2DCB494AD9ECF4-->  <AD_COLUMN_ID><![CDATA[1813]]></AD_COLUMN_ID>
+<!--384D92F0496046BB8C2DCB494AD9ECF4-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
+<!--384D92F0496046BB8C2DCB494AD9ECF4-->  <ISDISPLAYED><![CDATA[N]]></ISDISPLAYED>
+<!--384D92F0496046BB8C2DCB494AD9ECF4-->  <DISPLAYLENGTH><![CDATA[22]]></DISPLAYLENGTH>
+<!--384D92F0496046BB8C2DCB494AD9ECF4-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--384D92F0496046BB8C2DCB494AD9ECF4-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--384D92F0496046BB8C2DCB494AD9ECF4-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--384D92F0496046BB8C2DCB494AD9ECF4-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--384D92F0496046BB8C2DCB494AD9ECF4-->  <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
+<!--384D92F0496046BB8C2DCB494AD9ECF4-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--384D92F0496046BB8C2DCB494AD9ECF4-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--384D92F0496046BB8C2DCB494AD9ECF4-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--384D92F0496046BB8C2DCB494AD9ECF4-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--384D92F0496046BB8C2DCB494AD9ECF4-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--384D92F0496046BB8C2DCB494AD9ECF4-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
+<!--384D92F0496046BB8C2DCB494AD9ECF4--></AD_FIELD>
+
 <!--385EEC17D494423CA7009AD3D3268B4C--><AD_FIELD>
 <!--385EEC17D494423CA7009AD3D3268B4C-->  <AD_FIELD_ID><![CDATA[385EEC17D494423CA7009AD3D3268B4C]]></AD_FIELD_ID>
 <!--385EEC17D494423CA7009AD3D3268B4C-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -197333,7 +197560,7 @@
 <!--39932E6D9F234DE7BE28C602E43BD91D-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
 <!--39932E6D9F234DE7BE28C602E43BD91D-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
 <!--39932E6D9F234DE7BE28C602E43BD91D-->  <DISPLAYLENGTH><![CDATA[19]]></DISPLAYLENGTH>
-<!--39932E6D9F234DE7BE28C602E43BD91D-->  <ISREADONLY><![CDATA[Y]]></ISREADONLY>
+<!--39932E6D9F234DE7BE28C602E43BD91D-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--39932E6D9F234DE7BE28C602E43BD91D-->  <SEQNO><![CDATA[70]]></SEQNO>
 <!--39932E6D9F234DE7BE28C602E43BD91D-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--39932E6D9F234DE7BE28C602E43BD91D-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
@@ -199410,6 +199637,33 @@
 <!--4040A5566CC24140928B07806947EAC9-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
 <!--4040A5566CC24140928B07806947EAC9--></AD_FIELD>
 
+<!--405DE947F5744F03877A02FF73B28C9C--><AD_FIELD>
+<!--405DE947F5744F03877A02FF73B28C9C-->  <AD_FIELD_ID><![CDATA[405DE947F5744F03877A02FF73B28C9C]]></AD_FIELD_ID>
+<!--405DE947F5744F03877A02FF73B28C9C-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--405DE947F5744F03877A02FF73B28C9C-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--405DE947F5744F03877A02FF73B28C9C-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--405DE947F5744F03877A02FF73B28C9C-->  <NAME><![CDATA[Client]]></NAME>
+<!--405DE947F5744F03877A02FF73B28C9C-->  <DESCRIPTION><![CDATA[Client for this installation.]]></DESCRIPTION>
+<!--405DE947F5744F03877A02FF73B28C9C-->  <HELP><![CDATA[A Client is a company or a legal entity. You cannot share data between Clients.]]></HELP>
+<!--405DE947F5744F03877A02FF73B28C9C-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--405DE947F5744F03877A02FF73B28C9C-->  <AD_TAB_ID><![CDATA[885A6DB490044F3F8528373B60E3D9F5]]></AD_TAB_ID>
+<!--405DE947F5744F03877A02FF73B28C9C-->  <AD_COLUMN_ID><![CDATA[838]]></AD_COLUMN_ID>
+<!--405DE947F5744F03877A02FF73B28C9C-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
+<!--405DE947F5744F03877A02FF73B28C9C-->  <ISDISPLAYED><![CDATA[N]]></ISDISPLAYED>
+<!--405DE947F5744F03877A02FF73B28C9C-->  <DISPLAYLENGTH><![CDATA[22]]></DISPLAYLENGTH>
+<!--405DE947F5744F03877A02FF73B28C9C-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--405DE947F5744F03877A02FF73B28C9C-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--405DE947F5744F03877A02FF73B28C9C-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--405DE947F5744F03877A02FF73B28C9C-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--405DE947F5744F03877A02FF73B28C9C-->  <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
+<!--405DE947F5744F03877A02FF73B28C9C-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--405DE947F5744F03877A02FF73B28C9C-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--405DE947F5744F03877A02FF73B28C9C-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--405DE947F5744F03877A02FF73B28C9C-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--405DE947F5744F03877A02FF73B28C9C-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--405DE947F5744F03877A02FF73B28C9C-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
+<!--405DE947F5744F03877A02FF73B28C9C--></AD_FIELD>
+
 <!--4067AD7F0E8F41FBA5E1FD302A6623C5--><AD_FIELD>
 <!--4067AD7F0E8F41FBA5E1FD302A6623C5-->  <AD_FIELD_ID><![CDATA[4067AD7F0E8F41FBA5E1FD302A6623C5]]></AD_FIELD_ID>
 <!--4067AD7F0E8F41FBA5E1FD302A6623C5-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -200882,6 +201136,35 @@
 <!--44023AE71D154D9DBE06532EDA193069-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
 <!--44023AE71D154D9DBE06532EDA193069--></AD_FIELD>
 
+<!--4402F9658DAD4486BFC67FB62E275856--><AD_FIELD>
+<!--4402F9658DAD4486BFC67FB62E275856-->  <AD_FIELD_ID><![CDATA[4402F9658DAD4486BFC67FB62E275856]]></AD_FIELD_ID>
+<!--4402F9658DAD4486BFC67FB62E275856-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--4402F9658DAD4486BFC67FB62E275856-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--4402F9658DAD4486BFC67FB62E275856-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--4402F9658DAD4486BFC67FB62E275856-->  <NAME><![CDATA[Calendar]]></NAME>
+<!--4402F9658DAD4486BFC67FB62E275856-->  <DESCRIPTION><![CDATA[A table showing the days of the week for each month of the year.]]></DESCRIPTION>
+<!--4402F9658DAD4486BFC67FB62E275856-->  <HELP><![CDATA[The Calendar uniquely identifies an accounting calendar.  Multiple calendars can be used.  For example you may need a standard calendar that runs from Jan 1 to Dec 31 and a fiscal calendar that runs from July 1 to June 30.]]></HELP>
+<!--4402F9658DAD4486BFC67FB62E275856-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--4402F9658DAD4486BFC67FB62E275856-->  <AD_TAB_ID><![CDATA[885A6DB490044F3F8528373B60E3D9F5]]></AD_TAB_ID>
+<!--4402F9658DAD4486BFC67FB62E275856-->  <AD_COLUMN_ID><![CDATA[1042]]></AD_COLUMN_ID>
+<!--4402F9658DAD4486BFC67FB62E275856-->  <PROPERTY><![CDATA[year.calendar]]></PROPERTY>
+<!--4402F9658DAD4486BFC67FB62E275856-->  <IGNOREINWAD><![CDATA[Y]]></IGNOREINWAD>
+<!--4402F9658DAD4486BFC67FB62E275856-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--4402F9658DAD4486BFC67FB62E275856-->  <DISPLAYLENGTH><![CDATA[10]]></DISPLAYLENGTH>
+<!--4402F9658DAD4486BFC67FB62E275856-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--4402F9658DAD4486BFC67FB62E275856-->  <SEQNO><![CDATA[20]]></SEQNO>
+<!--4402F9658DAD4486BFC67FB62E275856-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--4402F9658DAD4486BFC67FB62E275856-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--4402F9658DAD4486BFC67FB62E275856-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--4402F9658DAD4486BFC67FB62E275856-->  <SHOWINRELATION><![CDATA[Y]]></SHOWINRELATION>
+<!--4402F9658DAD4486BFC67FB62E275856-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--4402F9658DAD4486BFC67FB62E275856-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--4402F9658DAD4486BFC67FB62E275856-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--4402F9658DAD4486BFC67FB62E275856-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--4402F9658DAD4486BFC67FB62E275856-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--4402F9658DAD4486BFC67FB62E275856-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
+<!--4402F9658DAD4486BFC67FB62E275856--></AD_FIELD>
+
 <!--44075B86C7C543F8973D5C2C7C276C85--><AD_FIELD>
 <!--44075B86C7C543F8973D5C2C7C276C85-->  <AD_FIELD_ID><![CDATA[44075B86C7C543F8973D5C2C7C276C85]]></AD_FIELD_ID>
 <!--44075B86C7C543F8973D5C2C7C276C85-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -201479,6 +201762,34 @@
 <!--45EE0A7E487041C1A6F47E791B31C82F-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
 <!--45EE0A7E487041C1A6F47E791B31C82F--></AD_FIELD>
 
+<!--45FC2891BD3044CEACA7F06E13B8AD9C--><AD_FIELD>
+<!--45FC2891BD3044CEACA7F06E13B8AD9C-->  <AD_FIELD_ID><![CDATA[45FC2891BD3044CEACA7F06E13B8AD9C]]></AD_FIELD_ID>
+<!--45FC2891BD3044CEACA7F06E13B8AD9C-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--45FC2891BD3044CEACA7F06E13B8AD9C-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--45FC2891BD3044CEACA7F06E13B8AD9C-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--45FC2891BD3044CEACA7F06E13B8AD9C-->  <NAME><![CDATA[Period]]></NAME>
+<!--45FC2891BD3044CEACA7F06E13B8AD9C-->  <DESCRIPTION><![CDATA[A specified time period.]]></DESCRIPTION>
+<!--45FC2891BD3044CEACA7F06E13B8AD9C-->  <HELP><![CDATA[The Period indicates an exclusive range of dates for a calendar.]]></HELP>
+<!--45FC2891BD3044CEACA7F06E13B8AD9C-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--45FC2891BD3044CEACA7F06E13B8AD9C-->  <AD_TAB_ID><![CDATA[4FB5884A443240EEB5504BBF7813870D]]></AD_TAB_ID>
+<!--45FC2891BD3044CEACA7F06E13B8AD9C-->  <AD_COLUMN_ID><![CDATA[1820]]></AD_COLUMN_ID>
+<!--45FC2891BD3044CEACA7F06E13B8AD9C-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
+<!--45FC2891BD3044CEACA7F06E13B8AD9C-->  <ISDISPLAYED><![CDATA[N]]></ISDISPLAYED>
+<!--45FC2891BD3044CEACA7F06E13B8AD9C-->  <DISPLAYLENGTH><![CDATA[22]]></DISPLAYLENGTH>
+<!--45FC2891BD3044CEACA7F06E13B8AD9C-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--45FC2891BD3044CEACA7F06E13B8AD9C-->  <SEQNO><![CDATA[40]]></SEQNO>
+<!--45FC2891BD3044CEACA7F06E13B8AD9C-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--45FC2891BD3044CEACA7F06E13B8AD9C-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--45FC2891BD3044CEACA7F06E13B8AD9C-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--45FC2891BD3044CEACA7F06E13B8AD9C-->  <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
+<!--45FC2891BD3044CEACA7F06E13B8AD9C-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--45FC2891BD3044CEACA7F06E13B8AD9C-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--45FC2891BD3044CEACA7F06E13B8AD9C-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--45FC2891BD3044CEACA7F06E13B8AD9C-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--45FC2891BD3044CEACA7F06E13B8AD9C-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--45FC2891BD3044CEACA7F06E13B8AD9C-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
+<!--45FC2891BD3044CEACA7F06E13B8AD9C--></AD_FIELD>
+
 <!--46076641CD0748C7B7268451CFCB0850--><AD_FIELD>
 <!--46076641CD0748C7B7268451CFCB0850-->  <AD_FIELD_ID><![CDATA[46076641CD0748C7B7268451CFCB0850]]></AD_FIELD_ID>
 <!--46076641CD0748C7B7268451CFCB0850-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -201686,6 +201997,34 @@
 <!--46E31D53387F4BDEB84B2DD16F7DA22A-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
 <!--46E31D53387F4BDEB84B2DD16F7DA22A--></AD_FIELD>
 
+<!--4718F0995E304F2CB96710CC4B4EC955--><AD_FIELD>
+<!--4718F0995E304F2CB96710CC4B4EC955-->  <AD_FIELD_ID><![CDATA[4718F0995E304F2CB96710CC4B4EC955]]></AD_FIELD_ID>
+<!--4718F0995E304F2CB96710CC4B4EC955-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--4718F0995E304F2CB96710CC4B4EC955-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--4718F0995E304F2CB96710CC4B4EC955-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--4718F0995E304F2CB96710CC4B4EC955-->  <NAME><![CDATA[Organization]]></NAME>
+<!--4718F0995E304F2CB96710CC4B4EC955-->  <DESCRIPTION><![CDATA[Organizational entity within client]]></DESCRIPTION>
+<!--4718F0995E304F2CB96710CC4B4EC955-->  <HELP><![CDATA[An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.]]></HELP>
+<!--4718F0995E304F2CB96710CC4B4EC955-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--4718F0995E304F2CB96710CC4B4EC955-->  <AD_TAB_ID><![CDATA[4FB5884A443240EEB5504BBF7813870D]]></AD_TAB_ID>
+<!--4718F0995E304F2CB96710CC4B4EC955-->  <AD_COLUMN_ID><![CDATA[1814]]></AD_COLUMN_ID>
+<!--4718F0995E304F2CB96710CC4B4EC955-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
+<!--4718F0995E304F2CB96710CC4B4EC955-->  <ISDISPLAYED><![CDATA[N]]></ISDISPLAYED>
+<!--4718F0995E304F2CB96710CC4B4EC955-->  <DISPLAYLENGTH><![CDATA[22]]></DISPLAYLENGTH>
+<!--4718F0995E304F2CB96710CC4B4EC955-->  <ISREADONLY><![CDATA[Y]]></ISREADONLY>
+<!--4718F0995E304F2CB96710CC4B4EC955-->  <SEQNO><![CDATA[40]]></SEQNO>
+<!--4718F0995E304F2CB96710CC4B4EC955-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--4718F0995E304F2CB96710CC4B4EC955-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--4718F0995E304F2CB96710CC4B4EC955-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--4718F0995E304F2CB96710CC4B4EC955-->  <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
+<!--4718F0995E304F2CB96710CC4B4EC955-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--4718F0995E304F2CB96710CC4B4EC955-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--4718F0995E304F2CB96710CC4B4EC955-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--4718F0995E304F2CB96710CC4B4EC955-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--4718F0995E304F2CB96710CC4B4EC955-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--4718F0995E304F2CB96710CC4B4EC955-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
+<!--4718F0995E304F2CB96710CC4B4EC955--></AD_FIELD>
+
 <!--47258ECF7D664AE4849BCD833382B90D--><AD_FIELD>
 <!--47258ECF7D664AE4849BCD833382B90D-->  <AD_FIELD_ID><![CDATA[47258ECF7D664AE4849BCD833382B90D]]></AD_FIELD_ID>
 <!--47258ECF7D664AE4849BCD833382B90D-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -202314,6 +202653,34 @@
 <!--491A105F5FE148E2B64D2B122A2DC6A4-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
 <!--491A105F5FE148E2B64D2B122A2DC6A4--></AD_FIELD>
 
+<!--493F74D5DD8845848A0310C614991E75--><AD_FIELD>
+<!--493F74D5DD8845848A0310C614991E75-->  <AD_FIELD_ID><![CDATA[493F74D5DD8845848A0310C614991E75]]></AD_FIELD_ID>
+<!--493F74D5DD8845848A0310C614991E75-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--493F74D5DD8845848A0310C614991E75-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--493F74D5DD8845848A0310C614991E75-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--493F74D5DD8845848A0310C614991E75-->  <NAME><![CDATA[Ending Date]]></NAME>
+<!--493F74D5DD8845848A0310C614991E75-->  <DESCRIPTION><![CDATA[A parameter stating when a specified request will end.]]></DESCRIPTION>
+<!--493F74D5DD8845848A0310C614991E75-->  <HELP><![CDATA[The End Date indicates the last date in this range.]]></HELP>
+<!--493F74D5DD8845848A0310C614991E75-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--493F74D5DD8845848A0310C614991E75-->  <AD_TAB_ID><![CDATA[885A6DB490044F3F8528373B60E3D9F5]]></AD_TAB_ID>
+<!--493F74D5DD8845848A0310C614991E75-->  <AD_COLUMN_ID><![CDATA[5943]]></AD_COLUMN_ID>
+<!--493F74D5DD8845848A0310C614991E75-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
+<!--493F74D5DD8845848A0310C614991E75-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--493F74D5DD8845848A0310C614991E75-->  <DISPLAYLENGTH><![CDATA[10]]></DISPLAYLENGTH>
+<!--493F74D5DD8845848A0310C614991E75-->  <ISREADONLY><![CDATA[Y]]></ISREADONLY>
+<!--493F74D5DD8845848A0310C614991E75-->  <SEQNO><![CDATA[80]]></SEQNO>
+<!--493F74D5DD8845848A0310C614991E75-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--493F74D5DD8845848A0310C614991E75-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--493F74D5DD8845848A0310C614991E75-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--493F74D5DD8845848A0310C614991E75-->  <SHOWINRELATION><![CDATA[Y]]></SHOWINRELATION>
+<!--493F74D5DD8845848A0310C614991E75-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--493F74D5DD8845848A0310C614991E75-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--493F74D5DD8845848A0310C614991E75-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--493F74D5DD8845848A0310C614991E75-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--493F74D5DD8845848A0310C614991E75-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--493F74D5DD8845848A0310C614991E75-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
+<!--493F74D5DD8845848A0310C614991E75--></AD_FIELD>
+
 <!--496692F1E30A400DB2C448F97AA8A9C1--><AD_FIELD>
 <!--496692F1E30A400DB2C448F97AA8A9C1-->  <AD_FIELD_ID><![CDATA[496692F1E30A400DB2C448F97AA8A9C1]]></AD_FIELD_ID>
 <!--496692F1E30A400DB2C448F97AA8A9C1-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -202452,6 +202819,35 @@
 <!--49D7345C33DC426A83EE3B10A6B2E7C8-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
 <!--49D7345C33DC426A83EE3B10A6B2E7C8--></AD_FIELD>
 
+<!--49DBC6AB5D3A4453B1E715AB8EDD8EF5--><AD_FIELD>
+<!--49DBC6AB5D3A4453B1E715AB8EDD8EF5-->  <AD_FIELD_ID><![CDATA[49DBC6AB5D3A4453B1E715AB8EDD8EF5]]></AD_FIELD_ID>
+<!--49DBC6AB5D3A4453B1E715AB8EDD8EF5-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--49DBC6AB5D3A4453B1E715AB8EDD8EF5-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--49DBC6AB5D3A4453B1E715AB8EDD8EF5-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--49DBC6AB5D3A4453B1E715AB8EDD8EF5-->  <NAME><![CDATA[Calendar]]></NAME>
+<!--49DBC6AB5D3A4453B1E715AB8EDD8EF5-->  <DESCRIPTION><![CDATA[A table showing the days of the week for each month of the year.]]></DESCRIPTION>
+<!--49DBC6AB5D3A4453B1E715AB8EDD8EF5-->  <HELP><![CDATA[The Calendar uniquely identifies an accounting calendar.  Multiple calendars can be used.  For example you may need a standard calendar that runs from Jan 1 to Dec 31 and a fiscal calendar that runs from July 1 to June 30.]]></HELP>
+<!--49DBC6AB5D3A4453B1E715AB8EDD8EF5-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--49DBC6AB5D3A4453B1E715AB8EDD8EF5-->  <AD_TAB_ID><![CDATA[4FB5884A443240EEB5504BBF7813870D]]></AD_TAB_ID>
+<!--49DBC6AB5D3A4453B1E715AB8EDD8EF5-->  <AD_COLUMN_ID><![CDATA[1042]]></AD_COLUMN_ID>
+<!--49DBC6AB5D3A4453B1E715AB8EDD8EF5-->  <PROPERTY><![CDATA[period.year.calendar]]></PROPERTY>
+<!--49DBC6AB5D3A4453B1E715AB8EDD8EF5-->  <IGNOREINWAD><![CDATA[Y]]></IGNOREINWAD>
+<!--49DBC6AB5D3A4453B1E715AB8EDD8EF5-->  <ISDISPLAYED><![CDATA[N]]></ISDISPLAYED>
+<!--49DBC6AB5D3A4453B1E715AB8EDD8EF5-->  <DISPLAYLENGTH><![CDATA[22]]></DISPLAYLENGTH>
+<!--49DBC6AB5D3A4453B1E715AB8EDD8EF5-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--49DBC6AB5D3A4453B1E715AB8EDD8EF5-->  <SEQNO><![CDATA[10]]></SEQNO>
+<!--49DBC6AB5D3A4453B1E715AB8EDD8EF5-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--49DBC6AB5D3A4453B1E715AB8EDD8EF5-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--49DBC6AB5D3A4453B1E715AB8EDD8EF5-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--49DBC6AB5D3A4453B1E715AB8EDD8EF5-->  <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
+<!--49DBC6AB5D3A4453B1E715AB8EDD8EF5-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--49DBC6AB5D3A4453B1E715AB8EDD8EF5-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--49DBC6AB5D3A4453B1E715AB8EDD8EF5-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--49DBC6AB5D3A4453B1E715AB8EDD8EF5-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--49DBC6AB5D3A4453B1E715AB8EDD8EF5-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--49DBC6AB5D3A4453B1E715AB8EDD8EF5-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
+<!--49DBC6AB5D3A4453B1E715AB8EDD8EF5--></AD_FIELD>
+
 <!--49F526720AB54F1F8B8DE1C500BFA87B--><AD_FIELD>
 <!--49F526720AB54F1F8B8DE1C500BFA87B-->  <AD_FIELD_ID><![CDATA[49F526720AB54F1F8B8DE1C500BFA87B]]></AD_FIELD_ID>
 <!--49F526720AB54F1F8B8DE1C500BFA87B-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -203787,6 +204183,34 @@
 <!--4E7181E5E2EC4BD89FB05FDA27FF9B60-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
 <!--4E7181E5E2EC4BD89FB05FDA27FF9B60--></AD_FIELD>
 
+<!--4E85BE7BAB5749EAA192B5E77A28217D--><AD_FIELD>
+<!--4E85BE7BAB5749EAA192B5E77A28217D-->  <AD_FIELD_ID><![CDATA[4E85BE7BAB5749EAA192B5E77A28217D]]></AD_FIELD_ID>
+<!--4E85BE7BAB5749EAA192B5E77A28217D-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--4E85BE7BAB5749EAA192B5E77A28217D-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--4E85BE7BAB5749EAA192B5E77A28217D-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--4E85BE7BAB5749EAA192B5E77A28217D-->  <NAME><![CDATA[Divideup Fact_Acct_Group_ID]]></NAME>
+<!--4E85BE7BAB5749EAA192B5E77A28217D-->  <DESCRIPTION><![CDATA[Refers to the Fact_Acct_Group_ID of the divide up entry]]></DESCRIPTION>
+<!--4E85BE7BAB5749EAA192B5E77A28217D-->  <HELP><![CDATA[Refers to the Fact_Acct_Group_ID of the divide up entry]]></HELP>
+<!--4E85BE7BAB5749EAA192B5E77A28217D-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--4E85BE7BAB5749EAA192B5E77A28217D-->  <AD_TAB_ID><![CDATA[885A6DB490044F3F8528373B60E3D9F5]]></AD_TAB_ID>
+<!--4E85BE7BAB5749EAA192B5E77A28217D-->  <AD_COLUMN_ID><![CDATA[5854D61EEF933B11E040007F01002D1D]]></AD_COLUMN_ID>
+<!--4E85BE7BAB5749EAA192B5E77A28217D-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
+<!--4E85BE7BAB5749EAA192B5E77A28217D-->  <ISDISPLAYED><![CDATA[N]]></ISDISPLAYED>
+<!--4E85BE7BAB5749EAA192B5E77A28217D-->  <DISPLAYLENGTH><![CDATA[32]]></DISPLAYLENGTH>
+<!--4E85BE7BAB5749EAA192B5E77A28217D-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--4E85BE7BAB5749EAA192B5E77A28217D-->  <SEQNO><![CDATA[120]]></SEQNO>
+<!--4E85BE7BAB5749EAA192B5E77A28217D-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--4E85BE7BAB5749EAA192B5E77A28217D-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--4E85BE7BAB5749EAA192B5E77A28217D-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--4E85BE7BAB5749EAA192B5E77A28217D-->  <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
+<!--4E85BE7BAB5749EAA192B5E77A28217D-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--4E85BE7BAB5749EAA192B5E77A28217D-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--4E85BE7BAB5749EAA192B5E77A28217D-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--4E85BE7BAB5749EAA192B5E77A28217D-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--4E85BE7BAB5749EAA192B5E77A28217D-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--4E85BE7BAB5749EAA192B5E77A28217D-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
+<!--4E85BE7BAB5749EAA192B5E77A28217D--></AD_FIELD>
+
 <!--4E94D12948864A1D92461F87C9595B0D--><AD_FIELD>
 <!--4E94D12948864A1D92461F87C9595B0D-->  <AD_FIELD_ID><![CDATA[4E94D12948864A1D92461F87C9595B0D]]></AD_FIELD_ID>
 <!--4E94D12948864A1D92461F87C9595B0D-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -213730,6 +214154,34 @@
 <!--594880DA2BB74D00B5AD14AB0278CB7D-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
 <!--594880DA2BB74D00B5AD14AB0278CB7D--></AD_FIELD>
 
+<!--59608B4464DD4D8BA5352008B5127D6A--><AD_FIELD>
+<!--59608B4464DD4D8BA5352008B5127D6A-->  <AD_FIELD_ID><![CDATA[59608B4464DD4D8BA5352008B5127D6A]]></AD_FIELD_ID>
+<!--59608B4464DD4D8BA5352008B5127D6A-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--59608B4464DD4D8BA5352008B5127D6A-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--59608B4464DD4D8BA5352008B5127D6A-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--59608B4464DD4D8BA5352008B5127D6A-->  <NAME><![CDATA[Open_Fact_Acct_Group_ID]]></NAME>
+<!--59608B4464DD4D8BA5352008B5127D6A-->  <DESCRIPTION><![CDATA[Refers to the Open_Fact_Acct_Group_ID of the open entry]]></DESCRIPTION>
+<!--59608B4464DD4D8BA5352008B5127D6A-->  <HELP><![CDATA[Refers to the Open_Fact_Acct_Group_ID of the open entry]]></HELP>
+<!--59608B4464DD4D8BA5352008B5127D6A-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--59608B4464DD4D8BA5352008B5127D6A-->  <AD_TAB_ID><![CDATA[885A6DB490044F3F8528373B60E3D9F5]]></AD_TAB_ID>
+<!--59608B4464DD4D8BA5352008B5127D6A-->  <AD_COLUMN_ID><![CDATA[8200738EF14611DDB9650016D4EE9DB3]]></AD_COLUMN_ID>
+<!--59608B4464DD4D8BA5352008B5127D6A-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
+<!--59608B4464DD4D8BA5352008B5127D6A-->  <ISDISPLAYED><![CDATA[N]]></ISDISPLAYED>
+<!--59608B4464DD4D8BA5352008B5127D6A-->  <DISPLAYLENGTH><![CDATA[32]]></DISPLAYLENGTH>
+<!--59608B4464DD4D8BA5352008B5127D6A-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--59608B4464DD4D8BA5352008B5127D6A-->  <SEQNO><![CDATA[130]]></SEQNO>
+<!--59608B4464DD4D8BA5352008B5127D6A-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--59608B4464DD4D8BA5352008B5127D6A-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--59608B4464DD4D8BA5352008B5127D6A-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--59608B4464DD4D8BA5352008B5127D6A-->  <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
+<!--59608B4464DD4D8BA5352008B5127D6A-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--59608B4464DD4D8BA5352008B5127D6A-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--59608B4464DD4D8BA5352008B5127D6A-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--59608B4464DD4D8BA5352008B5127D6A-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--59608B4464DD4D8BA5352008B5127D6A-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--59608B4464DD4D8BA5352008B5127D6A-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
+<!--59608B4464DD4D8BA5352008B5127D6A--></AD_FIELD>
+
 <!--59887AF48863C5B0E040007F01015E76--><AD_FIELD>
 <!--59887AF48863C5B0E040007F01015E76-->  <AD_FIELD_ID><![CDATA[59887AF48863C5B0E040007F01015E76]]></AD_FIELD_ID>
 <!--59887AF48863C5B0E040007F01015E76-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -226843,6 +227295,62 @@
 <!--7446D90108A64F659D08BDA0BE526704-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
 <!--7446D90108A64F659D08BDA0BE526704--></AD_FIELD>
 
+<!--7434FE03C6CC43AB8CFCEF1049EA43D5--><AD_FIELD>
+<!--7434FE03C6CC43AB8CFCEF1049EA43D5-->  <AD_FIELD_ID><![CDATA[7434FE03C6CC43AB8CFCEF1049EA43D5]]></AD_FIELD_ID>
+<!--7434FE03C6CC43AB8CFCEF1049EA43D5-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--7434FE03C6CC43AB8CFCEF1049EA43D5-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--7434FE03C6CC43AB8CFCEF1049EA43D5-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--7434FE03C6CC43AB8CFCEF1049EA43D5-->  <NAME><![CDATA[Period Action]]></NAME>
+<!--7434FE03C6CC43AB8CFCEF1049EA43D5-->  <DESCRIPTION><![CDATA[Action taken for this period]]></DESCRIPTION>
+<!--7434FE03C6CC43AB8CFCEF1049EA43D5-->  <HELP><![CDATA[The Period Action indicates the action to be taken for this period.  For example 'Close Period' or 'Open Period'.]]></HELP>
+<!--7434FE03C6CC43AB8CFCEF1049EA43D5-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--7434FE03C6CC43AB8CFCEF1049EA43D5-->  <AD_TAB_ID><![CDATA[4FB5884A443240EEB5504BBF7813870D]]></AD_TAB_ID>
+<!--7434FE03C6CC43AB8CFCEF1049EA43D5-->  <AD_COLUMN_ID><![CDATA[2354]]></AD_COLUMN_ID>
+<!--7434FE03C6CC43AB8CFCEF1049EA43D5-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
+<!--7434FE03C6CC43AB8CFCEF1049EA43D5-->  <ISDISPLAYED><![CDATA[N]]></ISDISPLAYED>
+<!--7434FE03C6CC43AB8CFCEF1049EA43D5-->  <DISPLAYLENGTH><![CDATA[60]]></DISPLAYLENGTH>
+<!--7434FE03C6CC43AB8CFCEF1049EA43D5-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--7434FE03C6CC43AB8CFCEF1049EA43D5-->  <SEQNO><![CDATA[60]]></SEQNO>
+<!--7434FE03C6CC43AB8CFCEF1049EA43D5-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--7434FE03C6CC43AB8CFCEF1049EA43D5-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--7434FE03C6CC43AB8CFCEF1049EA43D5-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--7434FE03C6CC43AB8CFCEF1049EA43D5-->  <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
+<!--7434FE03C6CC43AB8CFCEF1049EA43D5-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--7434FE03C6CC43AB8CFCEF1049EA43D5-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--7434FE03C6CC43AB8CFCEF1049EA43D5-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--7434FE03C6CC43AB8CFCEF1049EA43D5-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--7434FE03C6CC43AB8CFCEF1049EA43D5-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--7434FE03C6CC43AB8CFCEF1049EA43D5-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
+<!--7434FE03C6CC43AB8CFCEF1049EA43D5--></AD_FIELD>
+
+<!--74626827988342D4AD25D01FD27DEAF8--><AD_FIELD>
+<!--74626827988342D4AD25D01FD27DEAF8-->  <AD_FIELD_ID><![CDATA[74626827988342D4AD25D01FD27DEAF8]]></AD_FIELD_ID>
+<!--74626827988342D4AD25D01FD27DEAF8-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--74626827988342D4AD25D01FD27DEAF8-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--74626827988342D4AD25D01FD27DEAF8-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--74626827988342D4AD25D01FD27DEAF8-->  <NAME><![CDATA[Period Status]]></NAME>
+<!--74626827988342D4AD25D01FD27DEAF8-->  <DESCRIPTION><![CDATA[Current state of this period]]></DESCRIPTION>
+<!--74626827988342D4AD25D01FD27DEAF8-->  <HELP><![CDATA[The Period Status indicates the current status for this period.  For example 'Closed', 'Open', 'Never Opened'.]]></HELP>
+<!--74626827988342D4AD25D01FD27DEAF8-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--74626827988342D4AD25D01FD27DEAF8-->  <AD_TAB_ID><![CDATA[4FB5884A443240EEB5504BBF7813870D]]></AD_TAB_ID>
+<!--74626827988342D4AD25D01FD27DEAF8-->  <AD_COLUMN_ID><![CDATA[1822]]></AD_COLUMN_ID>
+<!--74626827988342D4AD25D01FD27DEAF8-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
+<!--74626827988342D4AD25D01FD27DEAF8-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--74626827988342D4AD25D01FD27DEAF8-->  <DISPLAYLENGTH><![CDATA[60]]></DISPLAYLENGTH>
+<!--74626827988342D4AD25D01FD27DEAF8-->  <ISREADONLY><![CDATA[Y]]></ISREADONLY>
+<!--74626827988342D4AD25D01FD27DEAF8-->  <SEQNO><![CDATA[20]]></SEQNO>
+<!--74626827988342D4AD25D01FD27DEAF8-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--74626827988342D4AD25D01FD27DEAF8-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--74626827988342D4AD25D01FD27DEAF8-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--74626827988342D4AD25D01FD27DEAF8-->  <SHOWINRELATION><![CDATA[Y]]></SHOWINRELATION>
+<!--74626827988342D4AD25D01FD27DEAF8-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--74626827988342D4AD25D01FD27DEAF8-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--74626827988342D4AD25D01FD27DEAF8-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--74626827988342D4AD25D01FD27DEAF8-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--74626827988342D4AD25D01FD27DEAF8-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--74626827988342D4AD25D01FD27DEAF8-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
+<!--74626827988342D4AD25D01FD27DEAF8--></AD_FIELD>
+
 <!--746EE23586C94DB2A1366876E3935D22--><AD_FIELD>
 <!--746EE23586C94DB2A1366876E3935D22-->  <AD_FIELD_ID><![CDATA[746EE23586C94DB2A1366876E3935D22]]></AD_FIELD_ID>
 <!--746EE23586C94DB2A1366876E3935D22-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -229073,6 +229581,33 @@
 <!--79F6BC10FDBF4915AA2516B6FB400FB2-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
 <!--79F6BC10FDBF4915AA2516B6FB400FB2--></AD_FIELD>
 
+<!--7A09F86A950347EA85B725CC2FC09754--><AD_FIELD>
+<!--7A09F86A950347EA85B725CC2FC09754-->  <AD_FIELD_ID><![CDATA[7A09F86A950347EA85B725CC2FC09754]]></AD_FIELD_ID>
+<!--7A09F86A950347EA85B725CC2FC09754-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--7A09F86A950347EA85B725CC2FC09754-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--7A09F86A950347EA85B725CC2FC09754-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--7A09F86A950347EA85B725CC2FC09754-->  <NAME><![CDATA[Open Close]]></NAME>
+<!--7A09F86A950347EA85B725CC2FC09754-->  <DESCRIPTION><![CDATA[Open / Close period control.]]></DESCRIPTION>
+<!--7A09F86A950347EA85B725CC2FC09754-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--7A09F86A950347EA85B725CC2FC09754-->  <AD_TAB_ID><![CDATA[4FB5884A443240EEB5504BBF7813870D]]></AD_TAB_ID>
+<!--7A09F86A950347EA85B725CC2FC09754-->  <AD_COLUMN_ID><![CDATA[F27047EFFEDF4F499F8D9D93A55B79B5]]></AD_COLUMN_ID>
+<!--7A09F86A950347EA85B725CC2FC09754-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
+<!--7A09F86A950347EA85B725CC2FC09754-->  <ISDISPLAYED><![CDATA[N]]></ISDISPLAYED>
+<!--7A09F86A950347EA85B725CC2FC09754-->  <DISPLAYLENGTH><![CDATA[60]]></DISPLAYLENGTH>
+<!--7A09F86A950347EA85B725CC2FC09754-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--7A09F86A950347EA85B725CC2FC09754-->  <SEQNO><![CDATA[80]]></SEQNO>
+<!--7A09F86A950347EA85B725CC2FC09754-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--7A09F86A950347EA85B725CC2FC09754-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--7A09F86A950347EA85B725CC2FC09754-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--7A09F86A950347EA85B725CC2FC09754-->  <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
+<!--7A09F86A950347EA85B725CC2FC09754-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--7A09F86A950347EA85B725CC2FC09754-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--7A09F86A950347EA85B725CC2FC09754-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--7A09F86A950347EA85B725CC2FC09754-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--7A09F86A950347EA85B725CC2FC09754-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--7A09F86A950347EA85B725CC2FC09754-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
+<!--7A09F86A950347EA85B725CC2FC09754--></AD_FIELD>
+
 <!--7A3A75A0F0D6403BBFD157B6DE057A83--><AD_FIELD>
 <!--7A3A75A0F0D6403BBFD157B6DE057A83-->  <AD_FIELD_ID><![CDATA[7A3A75A0F0D6403BBFD157B6DE057A83]]></AD_FIELD_ID>
 <!--7A3A75A0F0D6403BBFD157B6DE057A83-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -229671,6 +230206,33 @@
 <!--7C3C6AE4742F435D8A5CCF0E5BC71AB6-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
 <!--7C3C6AE4742F435D8A5CCF0E5BC71AB6--></AD_FIELD>
 
+<!--7C4EB7E3D6D64865A2D9ECE326AD4B55--><AD_FIELD>
+<!--7C4EB7E3D6D64865A2D9ECE326AD4B55-->  <AD_FIELD_ID><![CDATA[7C4EB7E3D6D64865A2D9ECE326AD4B55]]></AD_FIELD_ID>
+<!--7C4EB7E3D6D64865A2D9ECE326AD4B55-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--7C4EB7E3D6D64865A2D9ECE326AD4B55-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--7C4EB7E3D6D64865A2D9ECE326AD4B55-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--7C4EB7E3D6D64865A2D9ECE326AD4B55-->  <NAME><![CDATA[Period Control]]></NAME>
+<!--7C4EB7E3D6D64865A2D9ECE326AD4B55-->  <DESCRIPTION><![CDATA[Period Control]]></DESCRIPTION>
+<!--7C4EB7E3D6D64865A2D9ECE326AD4B55-->  <HELP><![CDATA[The Period Control shows the status of a Period (Never Opened, Opened, Closed) for each of the DocBaseTypes.]]></HELP>
+<!--7C4EB7E3D6D64865A2D9ECE326AD4B55-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--7C4EB7E3D6D64865A2D9ECE326AD4B55-->  <AD_TAB_ID><![CDATA[4FB5884A443240EEB5504BBF7813870D]]></AD_TAB_ID>
+<!--7C4EB7E3D6D64865A2D9ECE326AD4B55-->  <AD_COLUMN_ID><![CDATA[1812]]></AD_COLUMN_ID>
+<!--7C4EB7E3D6D64865A2D9ECE326AD4B55-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
+<!--7C4EB7E3D6D64865A2D9ECE326AD4B55-->  <ISDISPLAYED><![CDATA[N]]></ISDISPLAYED>
+<!--7C4EB7E3D6D64865A2D9ECE326AD4B55-->  <DISPLAYLENGTH><![CDATA[32]]></DISPLAYLENGTH>
+<!--7C4EB7E3D6D64865A2D9ECE326AD4B55-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--7C4EB7E3D6D64865A2D9ECE326AD4B55-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--7C4EB7E3D6D64865A2D9ECE326AD4B55-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--7C4EB7E3D6D64865A2D9ECE326AD4B55-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--7C4EB7E3D6D64865A2D9ECE326AD4B55-->  <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
+<!--7C4EB7E3D6D64865A2D9ECE326AD4B55-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--7C4EB7E3D6D64865A2D9ECE326AD4B55-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--7C4EB7E3D6D64865A2D9ECE326AD4B55-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--7C4EB7E3D6D64865A2D9ECE326AD4B55-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--7C4EB7E3D6D64865A2D9ECE326AD4B55-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--7C4EB7E3D6D64865A2D9ECE326AD4B55-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
+<!--7C4EB7E3D6D64865A2D9ECE326AD4B55--></AD_FIELD>
+
 <!--7C541AC0C757FDD7E040007F01016B4D--><AD_FIELD>
 <!--7C541AC0C757FDD7E040007F01016B4D-->  <AD_FIELD_ID><![CDATA[7C541AC0C757FDD7E040007F01016B4D]]></AD_FIELD_ID>
 <!--7C541AC0C757FDD7E040007F01016B4D-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -250512,6 +251074,34 @@
 <!--9EE010D24949479E9D92F82554DEF22C-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
 <!--9EE010D24949479E9D92F82554DEF22C--></AD_FIELD>
 
+<!--9F15AB5E61454B7DBB5201089922FE55--><AD_FIELD>
+<!--9F15AB5E61454B7DBB5201089922FE55-->  <AD_FIELD_ID><![CDATA[9F15AB5E61454B7DBB5201089922FE55]]></AD_FIELD_ID>
+<!--9F15AB5E61454B7DBB5201089922FE55-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--9F15AB5E61454B7DBB5201089922FE55-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--9F15AB5E61454B7DBB5201089922FE55-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--9F15AB5E61454B7DBB5201089922FE55-->  <NAME><![CDATA[Starting Date]]></NAME>
+<!--9F15AB5E61454B7DBB5201089922FE55-->  <DESCRIPTION><![CDATA[A parameter stating when a specified request will begin.]]></DESCRIPTION>
+<!--9F15AB5E61454B7DBB5201089922FE55-->  <HELP><![CDATA[A parameter stating when a specified request will begin.]]></HELP>
+<!--9F15AB5E61454B7DBB5201089922FE55-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--9F15AB5E61454B7DBB5201089922FE55-->  <AD_TAB_ID><![CDATA[885A6DB490044F3F8528373B60E3D9F5]]></AD_TAB_ID>
+<!--9F15AB5E61454B7DBB5201089922FE55-->  <AD_COLUMN_ID><![CDATA[484]]></AD_COLUMN_ID>
+<!--9F15AB5E61454B7DBB5201089922FE55-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
+<!--9F15AB5E61454B7DBB5201089922FE55-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--9F15AB5E61454B7DBB5201089922FE55-->  <DISPLAYLENGTH><![CDATA[10]]></DISPLAYLENGTH>
+<!--9F15AB5E61454B7DBB5201089922FE55-->  <ISREADONLY><![CDATA[Y]]></ISREADONLY>
+<!--9F15AB5E61454B7DBB5201089922FE55-->  <SEQNO><![CDATA[70]]></SEQNO>
+<!--9F15AB5E61454B7DBB5201089922FE55-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--9F15AB5E61454B7DBB5201089922FE55-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--9F15AB5E61454B7DBB5201089922FE55-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--9F15AB5E61454B7DBB5201089922FE55-->  <SHOWINRELATION><![CDATA[Y]]></SHOWINRELATION>
+<!--9F15AB5E61454B7DBB5201089922FE55-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--9F15AB5E61454B7DBB5201089922FE55-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--9F15AB5E61454B7DBB5201089922FE55-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--9F15AB5E61454B7DBB5201089922FE55-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--9F15AB5E61454B7DBB5201089922FE55-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--9F15AB5E61454B7DBB5201089922FE55-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
+<!--9F15AB5E61454B7DBB5201089922FE55--></AD_FIELD>
+
 <!--9F23E336ECF442C180DC146F8B771C05--><AD_FIELD>
 <!--9F23E336ECF442C180DC146F8B771C05-->  <AD_FIELD_ID><![CDATA[9F23E336ECF442C180DC146F8B771C05]]></AD_FIELD_ID>
 <!--9F23E336ECF442C180DC146F8B771C05-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -251193,6 +251783,34 @@
 <!--A175C8B51EFE460BAEB495029AE8AF21-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
 <!--A175C8B51EFE460BAEB495029AE8AF21--></AD_FIELD>
 
+<!--A178883F5CE0421CA02C722DCEF154B9--><AD_FIELD>
+<!--A178883F5CE0421CA02C722DCEF154B9-->  <AD_FIELD_ID><![CDATA[A178883F5CE0421CA02C722DCEF154B9]]></AD_FIELD_ID>
+<!--A178883F5CE0421CA02C722DCEF154B9-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--A178883F5CE0421CA02C722DCEF154B9-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--A178883F5CE0421CA02C722DCEF154B9-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--A178883F5CE0421CA02C722DCEF154B9-->  <NAME><![CDATA[Year]]></NAME>
+<!--A178883F5CE0421CA02C722DCEF154B9-->  <DESCRIPTION><![CDATA[Calendar Year]]></DESCRIPTION>
+<!--A178883F5CE0421CA02C722DCEF154B9-->  <HELP><![CDATA[The Year uniquely identifies an accounting year for a calendar.]]></HELP>
+<!--A178883F5CE0421CA02C722DCEF154B9-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--A178883F5CE0421CA02C722DCEF154B9-->  <AD_TAB_ID><![CDATA[885A6DB490044F3F8528373B60E3D9F5]]></AD_TAB_ID>
+<!--A178883F5CE0421CA02C722DCEF154B9-->  <AD_COLUMN_ID><![CDATA[846]]></AD_COLUMN_ID>
+<!--A178883F5CE0421CA02C722DCEF154B9-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
+<!--A178883F5CE0421CA02C722DCEF154B9-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--A178883F5CE0421CA02C722DCEF154B9-->  <DISPLAYLENGTH><![CDATA[22]]></DISPLAYLENGTH>
+<!--A178883F5CE0421CA02C722DCEF154B9-->  <ISREADONLY><![CDATA[Y]]></ISREADONLY>
+<!--A178883F5CE0421CA02C722DCEF154B9-->  <SEQNO><![CDATA[40]]></SEQNO>
+<!--A178883F5CE0421CA02C722DCEF154B9-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--A178883F5CE0421CA02C722DCEF154B9-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--A178883F5CE0421CA02C722DCEF154B9-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--A178883F5CE0421CA02C722DCEF154B9-->  <SHOWINRELATION><![CDATA[Y]]></SHOWINRELATION>
+<!--A178883F5CE0421CA02C722DCEF154B9-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--A178883F5CE0421CA02C722DCEF154B9-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--A178883F5CE0421CA02C722DCEF154B9-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--A178883F5CE0421CA02C722DCEF154B9-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--A178883F5CE0421CA02C722DCEF154B9-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--A178883F5CE0421CA02C722DCEF154B9-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
+<!--A178883F5CE0421CA02C722DCEF154B9--></AD_FIELD>
+
 <!--A18268C7292C4EB7A862476D7E89D80B--><AD_FIELD>
 <!--A18268C7292C4EB7A862476D7E89D80B-->  <AD_FIELD_ID><![CDATA[A18268C7292C4EB7A862476D7E89D80B]]></AD_FIELD_ID>
 <!--A18268C7292C4EB7A862476D7E89D80B-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -269699,6 +270317,34 @@
 <!--BFC19E677C2347A6A5BCAA12FA2CA82C-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
 <!--BFC19E677C2347A6A5BCAA12FA2CA82C--></AD_FIELD>
 
+<!--BFCD276E190841E3AC18FCE6E7CDEFD8--><AD_FIELD>
+<!--BFCD276E190841E3AC18FCE6E7CDEFD8-->  <AD_FIELD_ID><![CDATA[BFCD276E190841E3AC18FCE6E7CDEFD8]]></AD_FIELD_ID>
+<!--BFCD276E190841E3AC18FCE6E7CDEFD8-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--BFCD276E190841E3AC18FCE6E7CDEFD8-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--BFCD276E190841E3AC18FCE6E7CDEFD8-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--BFCD276E190841E3AC18FCE6E7CDEFD8-->  <NAME><![CDATA[Name]]></NAME>
+<!--BFCD276E190841E3AC18FCE6E7CDEFD8-->  <DESCRIPTION><![CDATA[A non-unique identifier for a record/document often used as a search tool.]]></DESCRIPTION>
+<!--BFCD276E190841E3AC18FCE6E7CDEFD8-->  <HELP><![CDATA[A more descriptive identifier (that does need to be unique) of a record/document that is used as a default search option along with the search key (that is unique and mostly shorter). It is up to 60 characters in length.]]></HELP>
+<!--BFCD276E190841E3AC18FCE6E7CDEFD8-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--BFCD276E190841E3AC18FCE6E7CDEFD8-->  <AD_TAB_ID><![CDATA[885A6DB490044F3F8528373B60E3D9F5]]></AD_TAB_ID>
+<!--BFCD276E190841E3AC18FCE6E7CDEFD8-->  <AD_COLUMN_ID><![CDATA[482]]></AD_COLUMN_ID>
+<!--BFCD276E190841E3AC18FCE6E7CDEFD8-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
+<!--BFCD276E190841E3AC18FCE6E7CDEFD8-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--BFCD276E190841E3AC18FCE6E7CDEFD8-->  <DISPLAYLENGTH><![CDATA[60]]></DISPLAYLENGTH>
+<!--BFCD276E190841E3AC18FCE6E7CDEFD8-->  <ISREADONLY><![CDATA[Y]]></ISREADONLY>
+<!--BFCD276E190841E3AC18FCE6E7CDEFD8-->  <SEQNO><![CDATA[60]]></SEQNO>
+<!--BFCD276E190841E3AC18FCE6E7CDEFD8-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--BFCD276E190841E3AC18FCE6E7CDEFD8-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--BFCD276E190841E3AC18FCE6E7CDEFD8-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--BFCD276E190841E3AC18FCE6E7CDEFD8-->  <SHOWINRELATION><![CDATA[Y]]></SHOWINRELATION>
+<!--BFCD276E190841E3AC18FCE6E7CDEFD8-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--BFCD276E190841E3AC18FCE6E7CDEFD8-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--BFCD276E190841E3AC18FCE6E7CDEFD8-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--BFCD276E190841E3AC18FCE6E7CDEFD8-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--BFCD276E190841E3AC18FCE6E7CDEFD8-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--BFCD276E190841E3AC18FCE6E7CDEFD8-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
+<!--BFCD276E190841E3AC18FCE6E7CDEFD8--></AD_FIELD>
+
 <!--BFDDA6636FB04F4AA150791E4E105547--><AD_FIELD>
 <!--BFDDA6636FB04F4AA150791E4E105547-->  <AD_FIELD_ID><![CDATA[BFDDA6636FB04F4AA150791E4E105547]]></AD_FIELD_ID>
 <!--BFDDA6636FB04F4AA150791E4E105547-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -273488,6 +274134,34 @@
 <!--C94728F7441E41C38660A8AE2AAFC716-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
 <!--C94728F7441E41C38660A8AE2AAFC716--></AD_FIELD>
 
+<!--C949AF7941034C7DA6303248740FB098--><AD_FIELD>
+<!--C949AF7941034C7DA6303248740FB098-->  <AD_FIELD_ID><![CDATA[C949AF7941034C7DA6303248740FB098]]></AD_FIELD_ID>
+<!--C949AF7941034C7DA6303248740FB098-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--C949AF7941034C7DA6303248740FB098-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--C949AF7941034C7DA6303248740FB098-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--C949AF7941034C7DA6303248740FB098-->  <NAME><![CDATA[Organization]]></NAME>
+<!--C949AF7941034C7DA6303248740FB098-->  <DESCRIPTION><![CDATA[Organizational entity within client]]></DESCRIPTION>
+<!--C949AF7941034C7DA6303248740FB098-->  <HELP><![CDATA[An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.]]></HELP>
+<!--C949AF7941034C7DA6303248740FB098-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--C949AF7941034C7DA6303248740FB098-->  <AD_TAB_ID><![CDATA[885A6DB490044F3F8528373B60E3D9F5]]></AD_TAB_ID>
+<!--C949AF7941034C7DA6303248740FB098-->  <AD_COLUMN_ID><![CDATA[839]]></AD_COLUMN_ID>
+<!--C949AF7941034C7DA6303248740FB098-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
+<!--C949AF7941034C7DA6303248740FB098-->  <ISDISPLAYED><![CDATA[N]]></ISDISPLAYED>
+<!--C949AF7941034C7DA6303248740FB098-->  <DISPLAYLENGTH><![CDATA[22]]></DISPLAYLENGTH>
+<!--C949AF7941034C7DA6303248740FB098-->  <ISREADONLY><![CDATA[Y]]></ISREADONLY>
+<!--C949AF7941034C7DA6303248740FB098-->  <SEQNO><![CDATA[30]]></SEQNO>
+<!--C949AF7941034C7DA6303248740FB098-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--C949AF7941034C7DA6303248740FB098-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--C949AF7941034C7DA6303248740FB098-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--C949AF7941034C7DA6303248740FB098-->  <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
+<!--C949AF7941034C7DA6303248740FB098-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--C949AF7941034C7DA6303248740FB098-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--C949AF7941034C7DA6303248740FB098-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--C949AF7941034C7DA6303248740FB098-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--C949AF7941034C7DA6303248740FB098-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--C949AF7941034C7DA6303248740FB098-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
+<!--C949AF7941034C7DA6303248740FB098--></AD_FIELD>
+
 <!--C9716CAD12E842D1BE87230518FE3A01--><AD_FIELD>
 <!--C9716CAD12E842D1BE87230518FE3A01-->  <AD_FIELD_ID><![CDATA[C9716CAD12E842D1BE87230518FE3A01]]></AD_FIELD_ID>
 <!--C9716CAD12E842D1BE87230518FE3A01-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -273714,6 +274388,34 @@
 <!--C9DF612F55AC45A58371BB8711D13CCB-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
 <!--C9DF612F55AC45A58371BB8711D13CCB--></AD_FIELD>
 
+<!--C9EFE6ACF6D7465D86740EE43F219C3E--><AD_FIELD>
+<!--C9EFE6ACF6D7465D86740EE43F219C3E-->  <AD_FIELD_ID><![CDATA[C9EFE6ACF6D7465D86740EE43F219C3E]]></AD_FIELD_ID>
+<!--C9EFE6ACF6D7465D86740EE43F219C3E-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--C9EFE6ACF6D7465D86740EE43F219C3E-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--C9EFE6ACF6D7465D86740EE43F219C3E-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--C9EFE6ACF6D7465D86740EE43F219C3E-->  <NAME><![CDATA[Open/Close]]></NAME>
+<!--C9EFE6ACF6D7465D86740EE43F219C3E-->  <DESCRIPTION><![CDATA[Open/Close]]></DESCRIPTION>
+<!--C9EFE6ACF6D7465D86740EE43F219C3E-->  <HELP><![CDATA[Open/Close]]></HELP>
+<!--C9EFE6ACF6D7465D86740EE43F219C3E-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--C9EFE6ACF6D7465D86740EE43F219C3E-->  <AD_TAB_ID><![CDATA[4FB5884A443240EEB5504BBF7813870D]]></AD_TAB_ID>
+<!--C9EFE6ACF6D7465D86740EE43F219C3E-->  <AD_COLUMN_ID><![CDATA[2355]]></AD_COLUMN_ID>
+<!--C9EFE6ACF6D7465D86740EE43F219C3E-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
+<!--C9EFE6ACF6D7465D86740EE43F219C3E-->  <ISDISPLAYED><![CDATA[N]]></ISDISPLAYED>
+<!--C9EFE6ACF6D7465D86740EE43F219C3E-->  <DISPLAYLENGTH><![CDATA[1]]></DISPLAYLENGTH>
+<!--C9EFE6ACF6D7465D86740EE43F219C3E-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--C9EFE6ACF6D7465D86740EE43F219C3E-->  <SEQNO><![CDATA[70]]></SEQNO>
+<!--C9EFE6ACF6D7465D86740EE43F219C3E-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--C9EFE6ACF6D7465D86740EE43F219C3E-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--C9EFE6ACF6D7465D86740EE43F219C3E-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--C9EFE6ACF6D7465D86740EE43F219C3E-->  <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
+<!--C9EFE6ACF6D7465D86740EE43F219C3E-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--C9EFE6ACF6D7465D86740EE43F219C3E-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--C9EFE6ACF6D7465D86740EE43F219C3E-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--C9EFE6ACF6D7465D86740EE43F219C3E-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--C9EFE6ACF6D7465D86740EE43F219C3E-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--C9EFE6ACF6D7465D86740EE43F219C3E-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
+<!--C9EFE6ACF6D7465D86740EE43F219C3E--></AD_FIELD>
+
 <!--C9F0FE067F9A4D20A0D84D6D43865BC2--><AD_FIELD>
 <!--C9F0FE067F9A4D20A0D84D6D43865BC2-->  <AD_FIELD_ID><![CDATA[C9F0FE067F9A4D20A0D84D6D43865BC2]]></AD_FIELD_ID>
 <!--C9F0FE067F9A4D20A0D84D6D43865BC2-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -274488,6 +275190,36 @@
 <!--CA9E542CEB127632E040007F01006734-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
 <!--CA9E542CEB127632E040007F01006734--></AD_FIELD>
 
+<!--CAA731B47DA0436E81D85BD3640F05E7--><AD_FIELD>
+<!--CAA731B47DA0436E81D85BD3640F05E7-->  <AD_FIELD_ID><![CDATA[CAA731B47DA0436E81D85BD3640F05E7]]></AD_FIELD_ID>
+<!--CAA731B47DA0436E81D85BD3640F05E7-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--CAA731B47DA0436E81D85BD3640F05E7-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--CAA731B47DA0436E81D85BD3640F05E7-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--CAA731B47DA0436E81D85BD3640F05E7-->  <NAME><![CDATA[Active]]></NAME>
+<!--CAA731B47DA0436E81D85BD3640F05E7-->  <DESCRIPTION><![CDATA[A flag indicating whether this record is available for use or de-activated.]]></DESCRIPTION>
+<!--CAA731B47DA0436E81D85BD3640F05E7-->  <HELP><![CDATA[There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reporting. There are two reasons for de-activating and not deleting records: 
+(1) The system requires the record for auditing purposes.
+(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are existing invoices for it. By de-activating the Business Partner you prevent it from being used in future transactions.]]></HELP>
+<!--CAA731B47DA0436E81D85BD3640F05E7-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--CAA731B47DA0436E81D85BD3640F05E7-->  <AD_TAB_ID><![CDATA[885A6DB490044F3F8528373B60E3D9F5]]></AD_TAB_ID>
+<!--CAA731B47DA0436E81D85BD3640F05E7-->  <AD_COLUMN_ID><![CDATA[840]]></AD_COLUMN_ID>
+<!--CAA731B47DA0436E81D85BD3640F05E7-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
+<!--CAA731B47DA0436E81D85BD3640F05E7-->  <ISDISPLAYED><![CDATA[N]]></ISDISPLAYED>
+<!--CAA731B47DA0436E81D85BD3640F05E7-->  <DISPLAYLENGTH><![CDATA[1]]></DISPLAYLENGTH>
+<!--CAA731B47DA0436E81D85BD3640F05E7-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--CAA731B47DA0436E81D85BD3640F05E7-->  <SEQNO><![CDATA[20]]></SEQNO>
+<!--CAA731B47DA0436E81D85BD3640F05E7-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--CAA731B47DA0436E81D85BD3640F05E7-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--CAA731B47DA0436E81D85BD3640F05E7-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--CAA731B47DA0436E81D85BD3640F05E7-->  <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
+<!--CAA731B47DA0436E81D85BD3640F05E7-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--CAA731B47DA0436E81D85BD3640F05E7-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--CAA731B47DA0436E81D85BD3640F05E7-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--CAA731B47DA0436E81D85BD3640F05E7-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--CAA731B47DA0436E81D85BD3640F05E7-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--CAA731B47DA0436E81D85BD3640F05E7-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
+<!--CAA731B47DA0436E81D85BD3640F05E7--></AD_FIELD>
+
 <!--CAB22ACCB6E86B2FE040007F010059CA--><AD_FIELD>
 <!--CAB22ACCB6E86B2FE040007F010059CA-->  <AD_FIELD_ID><![CDATA[CAB22ACCB6E86B2FE040007F010059CA]]></AD_FIELD_ID>
 <!--CAB22ACCB6E86B2FE040007F010059CA-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -278718,7 +279450,7 @@
 <!--D165311612564E8CAC703D261108CD0B-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--D165311612564E8CAC703D261108CD0B-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--D165311612564E8CAC703D261108CD0B-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
-<!--D165311612564E8CAC703D261108CD0B-->  <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
+<!--D165311612564E8CAC703D261108CD0B-->  <SHOWINRELATION><![CDATA[Y]]></SHOWINRELATION>
 <!--D165311612564E8CAC703D261108CD0B-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
 <!--D165311612564E8CAC703D261108CD0B-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--D165311612564E8CAC703D261108CD0B-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
@@ -282260,6 +282992,34 @@
 <!--D72BAEDF1E3E451D8942DF2FE4B805EF-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
 <!--D72BAEDF1E3E451D8942DF2FE4B805EF--></AD_FIELD>
 
+<!--D7432D982A8D4BF58380D60A9BD0F09A--><AD_FIELD>
+<!--D7432D982A8D4BF58380D60A9BD0F09A-->  <AD_FIELD_ID><![CDATA[D7432D982A8D4BF58380D60A9BD0F09A]]></AD_FIELD_ID>
+<!--D7432D982A8D4BF58380D60A9BD0F09A-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--D7432D982A8D4BF58380D60A9BD0F09A-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--D7432D982A8D4BF58380D60A9BD0F09A-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--D7432D982A8D4BF58380D60A9BD0F09A-->  <NAME><![CDATA[Period Type]]></NAME>
+<!--D7432D982A8D4BF58380D60A9BD0F09A-->  <DESCRIPTION><![CDATA[Period Type]]></DESCRIPTION>
+<!--D7432D982A8D4BF58380D60A9BD0F09A-->  <HELP><![CDATA[The Period Type indicates the type (Standard or Adjustment) of period.]]></HELP>
+<!--D7432D982A8D4BF58380D60A9BD0F09A-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--D7432D982A8D4BF58380D60A9BD0F09A-->  <AD_TAB_ID><![CDATA[885A6DB490044F3F8528373B60E3D9F5]]></AD_TAB_ID>
+<!--D7432D982A8D4BF58380D60A9BD0F09A-->  <AD_COLUMN_ID><![CDATA[847]]></AD_COLUMN_ID>
+<!--D7432D982A8D4BF58380D60A9BD0F09A-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
+<!--D7432D982A8D4BF58380D60A9BD0F09A-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--D7432D982A8D4BF58380D60A9BD0F09A-->  <DISPLAYLENGTH><![CDATA[60]]></DISPLAYLENGTH>
+<!--D7432D982A8D4BF58380D60A9BD0F09A-->  <ISREADONLY><![CDATA[Y]]></ISREADONLY>
+<!--D7432D982A8D4BF58380D60A9BD0F09A-->  <SEQNO><![CDATA[90]]></SEQNO>
+<!--D7432D982A8D4BF58380D60A9BD0F09A-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--D7432D982A8D4BF58380D60A9BD0F09A-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--D7432D982A8D4BF58380D60A9BD0F09A-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--D7432D982A8D4BF58380D60A9BD0F09A-->  <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
+<!--D7432D982A8D4BF58380D60A9BD0F09A-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--D7432D982A8D4BF58380D60A9BD0F09A-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--D7432D982A8D4BF58380D60A9BD0F09A-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--D7432D982A8D4BF58380D60A9BD0F09A-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--D7432D982A8D4BF58380D60A9BD0F09A-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--D7432D982A8D4BF58380D60A9BD0F09A-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
+<!--D7432D982A8D4BF58380D60A9BD0F09A--></AD_FIELD>
+
 <!--D74D967D0AFF45679516ACB4214FF361--><AD_FIELD>
 <!--D74D967D0AFF45679516ACB4214FF361-->  <AD_FIELD_ID><![CDATA[D74D967D0AFF45679516ACB4214FF361]]></AD_FIELD_ID>
 <!--D74D967D0AFF45679516ACB4214FF361-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -284945,6 +285705,32 @@
 <!--DD0A1F35341446C2BCC14B330B1DC545-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
 <!--DD0A1F35341446C2BCC14B330B1DC545--></AD_FIELD>
 
+<!--DD1EBE37AD75403BAFEA77EC0734D41E--><AD_FIELD>
+<!--DD1EBE37AD75403BAFEA77EC0734D41E-->  <AD_FIELD_ID><![CDATA[DD1EBE37AD75403BAFEA77EC0734D41E]]></AD_FIELD_ID>
+<!--DD1EBE37AD75403BAFEA77EC0734D41E-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--DD1EBE37AD75403BAFEA77EC0734D41E-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--DD1EBE37AD75403BAFEA77EC0734D41E-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--DD1EBE37AD75403BAFEA77EC0734D41E-->  <NAME><![CDATA[Status]]></NAME>
+<!--DD1EBE37AD75403BAFEA77EC0734D41E-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--DD1EBE37AD75403BAFEA77EC0734D41E-->  <AD_TAB_ID><![CDATA[4FB5884A443240EEB5504BBF7813870D]]></AD_TAB_ID>
+<!--DD1EBE37AD75403BAFEA77EC0734D41E-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
+<!--DD1EBE37AD75403BAFEA77EC0734D41E-->  <ISDISPLAYED><![CDATA[N]]></ISDISPLAYED>
+<!--DD1EBE37AD75403BAFEA77EC0734D41E-->  <DISPLAYLENGTH><![CDATA[4]]></DISPLAYLENGTH>
+<!--DD1EBE37AD75403BAFEA77EC0734D41E-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--DD1EBE37AD75403BAFEA77EC0734D41E-->  <SEQNO><![CDATA[10]]></SEQNO>
+<!--DD1EBE37AD75403BAFEA77EC0734D41E-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--DD1EBE37AD75403BAFEA77EC0734D41E-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--DD1EBE37AD75403BAFEA77EC0734D41E-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--DD1EBE37AD75403BAFEA77EC0734D41E-->  <SHOWINRELATION><![CDATA[Y]]></SHOWINRELATION>
+<!--DD1EBE37AD75403BAFEA77EC0734D41E-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--DD1EBE37AD75403BAFEA77EC0734D41E-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--DD1EBE37AD75403BAFEA77EC0734D41E-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--DD1EBE37AD75403BAFEA77EC0734D41E-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--DD1EBE37AD75403BAFEA77EC0734D41E-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--DD1EBE37AD75403BAFEA77EC0734D41E-->  <CLIENTCLASS><![CDATA[PeriodControlStatus_Field]]></CLIENTCLASS>
+<!--DD1EBE37AD75403BAFEA77EC0734D41E-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
+<!--DD1EBE37AD75403BAFEA77EC0734D41E--></AD_FIELD>
+
 <!--DD2A5839D78146559012A9D2AC8FA1F7--><AD_FIELD>
 <!--DD2A5839D78146559012A9D2AC8FA1F7-->  <AD_FIELD_ID><![CDATA[DD2A5839D78146559012A9D2AC8FA1F7]]></AD_FIELD_ID>
 <!--DD2A5839D78146559012A9D2AC8FA1F7-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -286089,6 +286875,34 @@
 <!--E056A7C3E5214E68B4DDB00F5A64022F-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
 <!--E056A7C3E5214E68B4DDB00F5A64022F--></AD_FIELD>
 
+<!--E021828CBBA74A29B77D98B771B9A81D--><AD_FIELD>
+<!--E021828CBBA74A29B77D98B771B9A81D-->  <AD_FIELD_ID><![CDATA[E021828CBBA74A29B77D98B771B9A81D]]></AD_FIELD_ID>
+<!--E021828CBBA74A29B77D98B771B9A81D-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--E021828CBBA74A29B77D98B771B9A81D-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--E021828CBBA74A29B77D98B771B9A81D-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--E021828CBBA74A29B77D98B771B9A81D-->  <NAME><![CDATA[Period No.]]></NAME>
+<!--E021828CBBA74A29B77D98B771B9A81D-->  <DESCRIPTION><![CDATA[Unique Period Number]]></DESCRIPTION>
+<!--E021828CBBA74A29B77D98B771B9A81D-->  <HELP><![CDATA[The Period No identifies a specific period for this year. Each period is defined by a start and end date.  Date ranges for a calendar and year cannot overlap.]]></HELP>
+<!--E021828CBBA74A29B77D98B771B9A81D-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--E021828CBBA74A29B77D98B771B9A81D-->  <AD_TAB_ID><![CDATA[885A6DB490044F3F8528373B60E3D9F5]]></AD_TAB_ID>
+<!--E021828CBBA74A29B77D98B771B9A81D-->  <AD_COLUMN_ID><![CDATA[845]]></AD_COLUMN_ID>
+<!--E021828CBBA74A29B77D98B771B9A81D-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
+<!--E021828CBBA74A29B77D98B771B9A81D-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--E021828CBBA74A29B77D98B771B9A81D-->  <DISPLAYLENGTH><![CDATA[10]]></DISPLAYLENGTH>
+<!--E021828CBBA74A29B77D98B771B9A81D-->  <ISREADONLY><![CDATA[Y]]></ISREADONLY>
+<!--E021828CBBA74A29B77D98B771B9A81D-->  <SEQNO><![CDATA[50]]></SEQNO>
+<!--E021828CBBA74A29B77D98B771B9A81D-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--E021828CBBA74A29B77D98B771B9A81D-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--E021828CBBA74A29B77D98B771B9A81D-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--E021828CBBA74A29B77D98B771B9A81D-->  <SHOWINRELATION><![CDATA[Y]]></SHOWINRELATION>
+<!--E021828CBBA74A29B77D98B771B9A81D-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--E021828CBBA74A29B77D98B771B9A81D-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--E021828CBBA74A29B77D98B771B9A81D-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--E021828CBBA74A29B77D98B771B9A81D-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--E021828CBBA74A29B77D98B771B9A81D-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--E021828CBBA74A29B77D98B771B9A81D-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
+<!--E021828CBBA74A29B77D98B771B9A81D--></AD_FIELD>
+
 <!--E05CB0FB66EE41ED8BDA713BC2334E2F--><AD_FIELD>
 <!--E05CB0FB66EE41ED8BDA713BC2334E2F-->  <AD_FIELD_ID><![CDATA[E05CB0FB66EE41ED8BDA713BC2334E2F]]></AD_FIELD_ID>
 <!--E05CB0FB66EE41ED8BDA713BC2334E2F-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -288569,6 +289383,33 @@
 <!--E7A84652321C421BBED957FCB4F3CE92-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
 <!--E7A84652321C421BBED957FCB4F3CE92--></AD_FIELD>
 
+<!--E7AD476047D94A3C85052467A5013772--><AD_FIELD>
+<!--E7AD476047D94A3C85052467A5013772-->  <AD_FIELD_ID><![CDATA[E7AD476047D94A3C85052467A5013772]]></AD_FIELD_ID>
+<!--E7AD476047D94A3C85052467A5013772-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--E7AD476047D94A3C85052467A5013772-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--E7AD476047D94A3C85052467A5013772-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--E7AD476047D94A3C85052467A5013772-->  <NAME><![CDATA[Open Close]]></NAME>
+<!--E7AD476047D94A3C85052467A5013772-->  <DESCRIPTION><![CDATA[Open / Close period control.]]></DESCRIPTION>
+<!--E7AD476047D94A3C85052467A5013772-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--E7AD476047D94A3C85052467A5013772-->  <AD_TAB_ID><![CDATA[885A6DB490044F3F8528373B60E3D9F5]]></AD_TAB_ID>
+<!--E7AD476047D94A3C85052467A5013772-->  <AD_COLUMN_ID><![CDATA[7270DE4F7AAA41E89E5F133AF78F2163]]></AD_COLUMN_ID>
+<!--E7AD476047D94A3C85052467A5013772-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
+<!--E7AD476047D94A3C85052467A5013772-->  <ISDISPLAYED><![CDATA[N]]></ISDISPLAYED>
+<!--E7AD476047D94A3C85052467A5013772-->  <DISPLAYLENGTH><![CDATA[60]]></DISPLAYLENGTH>
+<!--E7AD476047D94A3C85052467A5013772-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--E7AD476047D94A3C85052467A5013772-->  <SEQNO><![CDATA[140]]></SEQNO>
+<!--E7AD476047D94A3C85052467A5013772-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--E7AD476047D94A3C85052467A5013772-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--E7AD476047D94A3C85052467A5013772-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--E7AD476047D94A3C85052467A5013772-->  <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
+<!--E7AD476047D94A3C85052467A5013772-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--E7AD476047D94A3C85052467A5013772-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--E7AD476047D94A3C85052467A5013772-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--E7AD476047D94A3C85052467A5013772-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--E7AD476047D94A3C85052467A5013772-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--E7AD476047D94A3C85052467A5013772-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
+<!--E7AD476047D94A3C85052467A5013772--></AD_FIELD>
+
 <!--E7B46A3FA13E4E87A418FFAF6841F629--><AD_FIELD>
 <!--E7B46A3FA13E4E87A418FFAF6841F629-->  <AD_FIELD_ID><![CDATA[E7B46A3FA13E4E87A418FFAF6841F629]]></AD_FIELD_ID>
 <!--E7B46A3FA13E4E87A418FFAF6841F629-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -289076,6 +289917,32 @@
 <!--E9814FE8483F4C2D87F69BC8BE9314C1-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
 <!--E9814FE8483F4C2D87F69BC8BE9314C1--></AD_FIELD>
 
+<!--E9A00524A8074CB7BD11B5D9ECF8B6C2--><AD_FIELD>
+<!--E9A00524A8074CB7BD11B5D9ECF8B6C2-->  <AD_FIELD_ID><![CDATA[E9A00524A8074CB7BD11B5D9ECF8B6C2]]></AD_FIELD_ID>
+<!--E9A00524A8074CB7BD11B5D9ECF8B6C2-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--E9A00524A8074CB7BD11B5D9ECF8B6C2-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--E9A00524A8074CB7BD11B5D9ECF8B6C2-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--E9A00524A8074CB7BD11B5D9ECF8B6C2-->  <NAME><![CDATA[Status]]></NAME>
+<!--E9A00524A8074CB7BD11B5D9ECF8B6C2-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--E9A00524A8074CB7BD11B5D9ECF8B6C2-->  <AD_TAB_ID><![CDATA[885A6DB490044F3F8528373B60E3D9F5]]></AD_TAB_ID>
+<!--E9A00524A8074CB7BD11B5D9ECF8B6C2-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
+<!--E9A00524A8074CB7BD11B5D9ECF8B6C2-->  <ISDISPLAYED><![CDATA[N]]></ISDISPLAYED>
+<!--E9A00524A8074CB7BD11B5D9ECF8B6C2-->  <DISPLAYLENGTH><![CDATA[4]]></DISPLAYLENGTH>
+<!--E9A00524A8074CB7BD11B5D9ECF8B6C2-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--E9A00524A8074CB7BD11B5D9ECF8B6C2-->  <SEQNO><![CDATA[10]]></SEQNO>
+<!--E9A00524A8074CB7BD11B5D9ECF8B6C2-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--E9A00524A8074CB7BD11B5D9ECF8B6C2-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--E9A00524A8074CB7BD11B5D9ECF8B6C2-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--E9A00524A8074CB7BD11B5D9ECF8B6C2-->  <SHOWINRELATION><![CDATA[Y]]></SHOWINRELATION>
+<!--E9A00524A8074CB7BD11B5D9ECF8B6C2-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--E9A00524A8074CB7BD11B5D9ECF8B6C2-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--E9A00524A8074CB7BD11B5D9ECF8B6C2-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--E9A00524A8074CB7BD11B5D9ECF8B6C2-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--E9A00524A8074CB7BD11B5D9ECF8B6C2-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--E9A00524A8074CB7BD11B5D9ECF8B6C2-->  <CLIENTCLASS><![CDATA[PeriodStatus_Field]]></CLIENTCLASS>
+<!--E9A00524A8074CB7BD11B5D9ECF8B6C2-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
+<!--E9A00524A8074CB7BD11B5D9ECF8B6C2--></AD_FIELD>
+
 <!--E9AA034E69644D3FAD38A9E6149A11A0--><AD_FIELD>
 <!--E9AA034E69644D3FAD38A9E6149A11A0-->  <AD_FIELD_ID><![CDATA[E9AA034E69644D3FAD38A9E6149A11A0]]></AD_FIELD_ID>
 <!--E9AA034E69644D3FAD38A9E6149A11A0-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -289780,6 +290647,34 @@
 <!--EB8FF491CE734785982BAD81F9523B93-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
 <!--EB8FF491CE734785982BAD81F9523B93--></AD_FIELD>
 
+<!--EC3124AE4095410DA49E7AC5FEF2AC48--><AD_FIELD>
+<!--EC3124AE4095410DA49E7AC5FEF2AC48-->  <AD_FIELD_ID><![CDATA[EC3124AE4095410DA49E7AC5FEF2AC48]]></AD_FIELD_ID>
+<!--EC3124AE4095410DA49E7AC5FEF2AC48-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--EC3124AE4095410DA49E7AC5FEF2AC48-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--EC3124AE4095410DA49E7AC5FEF2AC48-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--EC3124AE4095410DA49E7AC5FEF2AC48-->  <NAME><![CDATA[Closing Fact_Acct_Group_ID]]></NAME>
+<!--EC3124AE4095410DA49E7AC5FEF2AC48-->  <DESCRIPTION><![CDATA[Refers to the Fact_Acct_Group_ID of the closing entry]]></DESCRIPTION>
+<!--EC3124AE4095410DA49E7AC5FEF2AC48-->  <HELP><![CDATA[Refers to the Fact_Acct_Group_ID of the closing entry]]></HELP>
+<!--EC3124AE4095410DA49E7AC5FEF2AC48-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--EC3124AE4095410DA49E7AC5FEF2AC48-->  <AD_TAB_ID><![CDATA[885A6DB490044F3F8528373B60E3D9F5]]></AD_TAB_ID>
+<!--EC3124AE4095410DA49E7AC5FEF2AC48-->  <AD_COLUMN_ID><![CDATA[5854D61EEF913B11E040007F01002D1D]]></AD_COLUMN_ID>
+<!--EC3124AE4095410DA49E7AC5FEF2AC48-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
+<!--EC3124AE4095410DA49E7AC5FEF2AC48-->  <ISDISPLAYED><![CDATA[N]]></ISDISPLAYED>
+<!--EC3124AE4095410DA49E7AC5FEF2AC48-->  <DISPLAYLENGTH><![CDATA[32]]></DISPLAYLENGTH>
+<!--EC3124AE4095410DA49E7AC5FEF2AC48-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--EC3124AE4095410DA49E7AC5FEF2AC48-->  <SEQNO><![CDATA[100]]></SEQNO>
+<!--EC3124AE4095410DA49E7AC5FEF2AC48-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--EC3124AE4095410DA49E7AC5FEF2AC48-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--EC3124AE4095410DA49E7AC5FEF2AC48-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--EC3124AE4095410DA49E7AC5FEF2AC48-->  <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
+<!--EC3124AE4095410DA49E7AC5FEF2AC48-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--EC3124AE4095410DA49E7AC5FEF2AC48-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--EC3124AE4095410DA49E7AC5FEF2AC48-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--EC3124AE4095410DA49E7AC5FEF2AC48-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--EC3124AE4095410DA49E7AC5FEF2AC48-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--EC3124AE4095410DA49E7AC5FEF2AC48-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
+<!--EC3124AE4095410DA49E7AC5FEF2AC48--></AD_FIELD>
+
 <!--EC787F77B1254D9A871B60CF6F2A52DA--><AD_FIELD>
 <!--EC787F77B1254D9A871B60CF6F2A52DA-->  <AD_FIELD_ID><![CDATA[EC787F77B1254D9A871B60CF6F2A52DA]]></AD_FIELD_ID>
 <!--EC787F77B1254D9A871B60CF6F2A52DA-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -294511,6 +295406,33 @@
 <!--FAA9ED0D2AEA444F83D09DF2FE479785-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
 <!--FAA9ED0D2AEA444F83D09DF2FE479785--></AD_FIELD>
 
+<!--FAAB7E56371A4A6984C12D3DABE5DFAE--><AD_FIELD>
+<!--FAAB7E56371A4A6984C12D3DABE5DFAE-->  <AD_FIELD_ID><![CDATA[FAAB7E56371A4A6984C12D3DABE5DFAE]]></AD_FIELD_ID>
+<!--FAAB7E56371A4A6984C12D3DABE5DFAE-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--FAAB7E56371A4A6984C12D3DABE5DFAE-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--FAAB7E56371A4A6984C12D3DABE5DFAE-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--FAAB7E56371A4A6984C12D3DABE5DFAE-->  <NAME><![CDATA[Period]]></NAME>
+<!--FAAB7E56371A4A6984C12D3DABE5DFAE-->  <DESCRIPTION><![CDATA[A specified time period.]]></DESCRIPTION>
+<!--FAAB7E56371A4A6984C12D3DABE5DFAE-->  <HELP><![CDATA[The Period indicates an exclusive range of dates for a calendar.]]></HELP>
+<!--FAAB7E56371A4A6984C12D3DABE5DFAE-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--FAAB7E56371A4A6984C12D3DABE5DFAE-->  <AD_TAB_ID><![CDATA[885A6DB490044F3F8528373B60E3D9F5]]></AD_TAB_ID>
+<!--FAAB7E56371A4A6984C12D3DABE5DFAE-->  <AD_COLUMN_ID><![CDATA[837]]></AD_COLUMN_ID>
+<!--FAAB7E56371A4A6984C12D3DABE5DFAE-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
+<!--FAAB7E56371A4A6984C12D3DABE5DFAE-->  <ISDISPLAYED><![CDATA[N]]></ISDISPLAYED>
+<!--FAAB7E56371A4A6984C12D3DABE5DFAE-->  <DISPLAYLENGTH><![CDATA[32]]></DISPLAYLENGTH>
+<!--FAAB7E56371A4A6984C12D3DABE5DFAE-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--FAAB7E56371A4A6984C12D3DABE5DFAE-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--FAAB7E56371A4A6984C12D3DABE5DFAE-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--FAAB7E56371A4A6984C12D3DABE5DFAE-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--FAAB7E56371A4A6984C12D3DABE5DFAE-->  <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
+<!--FAAB7E56371A4A6984C12D3DABE5DFAE-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--FAAB7E56371A4A6984C12D3DABE5DFAE-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--FAAB7E56371A4A6984C12D3DABE5DFAE-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--FAAB7E56371A4A6984C12D3DABE5DFAE-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--FAAB7E56371A4A6984C12D3DABE5DFAE-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--FAAB7E56371A4A6984C12D3DABE5DFAE-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
+<!--FAAB7E56371A4A6984C12D3DABE5DFAE--></AD_FIELD>
+
 <!--FAB4A3C5C0F34374B68D789C4710BF99--><AD_FIELD>
 <!--FAB4A3C5C0F34374B68D789C4710BF99-->  <AD_FIELD_ID><![CDATA[FAB4A3C5C0F34374B68D789C4710BF99]]></AD_FIELD_ID>
 <!--FAB4A3C5C0F34374B68D789C4710BF99-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src-db/database/sourcedata/AD_MENU.xml	Tue Nov 18 10:57:35 2014 +0100
+++ b/src-db/database/sourcedata/AD_MENU.xml	Tue Nov 18 11:03:11 2014 +0100
@@ -4630,7 +4630,7 @@
 <!--1A99A1553A0F4EF1AF5EB20F69238C2E-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--1A99A1553A0F4EF1AF5EB20F69238C2E-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--1A99A1553A0F4EF1AF5EB20F69238C2E-->  <NAME><![CDATA[Landed Cost Distribution Algorithm]]></NAME>
-<!--1A99A1553A0F4EF1AF5EB20F69238C2E-->  <DESCRIPTION><![CDATA[Master window where available algorithms are defined.]]></DESCRIPTION>
+<!--1A99A1553A0F4EF1AF5EB20F69238C2E-->  <DESCRIPTION><![CDATA[Master window where available landed cost distribution algorithms are defined.]]></DESCRIPTION>
 <!--1A99A1553A0F4EF1AF5EB20F69238C2E-->  <ISSUMMARY><![CDATA[N]]></ISSUMMARY>
 <!--1A99A1553A0F4EF1AF5EB20F69238C2E-->  <ACTION><![CDATA[W]]></ACTION>
 <!--1A99A1553A0F4EF1AF5EB20F69238C2E-->  <AD_WINDOW_ID><![CDATA[12B062B1031A40EC8067D353B31967EB]]></AD_WINDOW_ID>
@@ -4755,7 +4755,7 @@
 <!--369F385A56D4448191BCCDB6ABD900A1-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--369F385A56D4448191BCCDB6ABD900A1-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--369F385A56D4448191BCCDB6ABD900A1-->  <NAME><![CDATA[Inventory Amount Update]]></NAME>
-<!--369F385A56D4448191BCCDB6ABD900A1-->  <DESCRIPTION><![CDATA[Inventory Amount Update window genereate closing and opening inventories, generate a cost adjustment and set all transactions prior to the reference date as permanently adjusted]]></DESCRIPTION>
+<!--369F385A56D4448191BCCDB6ABD900A1-->  <DESCRIPTION><![CDATA[Inventory Amount Update window allows to change either current inventory amount or current unit cost of products in stock at a given reference date.]]></DESCRIPTION>
 <!--369F385A56D4448191BCCDB6ABD900A1-->  <ISSUMMARY><![CDATA[N]]></ISSUMMARY>
 <!--369F385A56D4448191BCCDB6ABD900A1-->  <ACTION><![CDATA[W]]></ACTION>
 <!--369F385A56D4448191BCCDB6ABD900A1-->  <AD_WINDOW_ID><![CDATA[E7754848A0314B018B37C1428ECB4D21]]></AD_WINDOW_ID>
@@ -4918,7 +4918,7 @@
 <!--70EA2A01CB2444FC9F2139FCEB9BA7D7-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--70EA2A01CB2444FC9F2139FCEB9BA7D7-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--70EA2A01CB2444FC9F2139FCEB9BA7D7-->  <NAME><![CDATA[Landed Cost Type]]></NAME>
-<!--70EA2A01CB2444FC9F2139FCEB9BA7D7-->  <DESCRIPTION><![CDATA[Defines the different types or concepts of the Landed Costs that are assigned to the Receipts.]]></DESCRIPTION>
+<!--70EA2A01CB2444FC9F2139FCEB9BA7D7-->  <DESCRIPTION><![CDATA[Landed Cost Types window allows to define different types of Landed Costs that can be assigned to Goods Receipts and therefore allocated to the products included in the receipts.]]></DESCRIPTION>
 <!--70EA2A01CB2444FC9F2139FCEB9BA7D7-->  <ISSUMMARY><![CDATA[N]]></ISSUMMARY>
 <!--70EA2A01CB2444FC9F2139FCEB9BA7D7-->  <ACTION><![CDATA[W]]></ACTION>
 <!--70EA2A01CB2444FC9F2139FCEB9BA7D7-->  <AD_WINDOW_ID><![CDATA[944C49CE80BE4F71B9917BD680A052A8]]></AD_WINDOW_ID>
@@ -5194,7 +5194,7 @@
 <!--D0EB635DAB004B16B636122FEA516898-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--D0EB635DAB004B16B636122FEA516898-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--D0EB635DAB004B16B636122FEA516898-->  <NAME><![CDATA[Landed Cost]]></NAME>
-<!--D0EB635DAB004B16B636122FEA516898-->  <DESCRIPTION><![CDATA[Landed cost window allows to create, edit and process a landed cost]]></DESCRIPTION>
+<!--D0EB635DAB004B16B636122FEA516898-->  <DESCRIPTION><![CDATA[Landed Cost window allows to allocate additional costs such as freight, insurance or duties to goods receipt(s) therefore the cost of the products included in the receipt(s) is adjusted as applicable.]]></DESCRIPTION>
 <!--D0EB635DAB004B16B636122FEA516898-->  <ISSUMMARY><![CDATA[N]]></ISSUMMARY>
 <!--D0EB635DAB004B16B636122FEA516898-->  <ACTION><![CDATA[W]]></ACTION>
 <!--D0EB635DAB004B16B636122FEA516898-->  <AD_WINDOW_ID><![CDATA[D1B11CBC0FEF4CA0B44D3BECEBA219BC]]></AD_WINDOW_ID>
@@ -5219,7 +5219,7 @@
 <!--D3B15512AB244A9D88AAF4E63C42CEC6-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--D3B15512AB244A9D88AAF4E63C42CEC6-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--D3B15512AB244A9D88AAF4E63C42CEC6-->  <NAME><![CDATA[Cost Adjustment]]></NAME>
-<!--D3B15512AB244A9D88AAF4E63C42CEC6-->  <DESCRIPTION><![CDATA[Window where the Cost Adjustment generated by any of the adjustment processes can be reviewed.]]></DESCRIPTION>
+<!--D3B15512AB244A9D88AAF4E63C42CEC6-->  <DESCRIPTION><![CDATA[Cost Adjustment window allows to review product transaction's cost adjustments caused by changes in purchase prices, landed cost allocation or manual/negative cost corrections.]]></DESCRIPTION>
 <!--D3B15512AB244A9D88AAF4E63C42CEC6-->  <ISSUMMARY><![CDATA[N]]></ISSUMMARY>
 <!--D3B15512AB244A9D88AAF4E63C42CEC6-->  <ACTION><![CDATA[W]]></ACTION>
 <!--D3B15512AB244A9D88AAF4E63C42CEC6-->  <AD_WINDOW_ID><![CDATA[1688A758BDA04C88A5C1D370EB979C53]]></AD_WINDOW_ID>
--- a/src-db/database/sourcedata/AD_MESSAGE.xml	Tue Nov 18 10:57:35 2014 +0100
+++ b/src-db/database/sourcedata/AD_MESSAGE.xml	Tue Nov 18 11:03:11 2014 +0100
@@ -17399,6 +17399,18 @@
 <!--24DC08DDDEF64FFE81EF69745410C78C-->  <ISINCLUDEINI18N><![CDATA[N]]></ISINCLUDEINI18N>
 <!--24DC08DDDEF64FFE81EF69745410C78C--></AD_MESSAGE>
 
+<!--270BF082B1234A3FB74792CC4E5A4B26--><AD_MESSAGE>
+<!--270BF082B1234A3FB74792CC4E5A4B26-->  <AD_MESSAGE_ID><![CDATA[270BF082B1234A3FB74792CC4E5A4B26]]></AD_MESSAGE_ID>
+<!--270BF082B1234A3FB74792CC4E5A4B26-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--270BF082B1234A3FB74792CC4E5A4B26-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--270BF082B1234A3FB74792CC4E5A4B26-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--270BF082B1234A3FB74792CC4E5A4B26-->  <VALUE><![CDATA[InitBPCurrencyLnk]]></VALUE>
+<!--270BF082B1234A3FB74792CC4E5A4B26-->  <MSGTEXT><![CDATA[Please initialize <a class="LabelLink" onclick="OB.Utilities.openDirectTab('220', '%s')" href="#"> %s </a> business partner currency before processing the document.]]></MSGTEXT>
+<!--270BF082B1234A3FB74792CC4E5A4B26-->  <MSGTYPE><![CDATA[I]]></MSGTYPE>
+<!--270BF082B1234A3FB74792CC4E5A4B26-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--270BF082B1234A3FB74792CC4E5A4B26-->  <ISINCLUDEINI18N><![CDATA[N]]></ISINCLUDEINI18N>
+<!--270BF082B1234A3FB74792CC4E5A4B26--></AD_MESSAGE>
+
 <!--272961BF12DB4930A0F8EDDADE8827CA--><AD_MESSAGE>
 <!--272961BF12DB4930A0F8EDDADE8827CA-->  <AD_MESSAGE_ID><![CDATA[272961BF12DB4930A0F8EDDADE8827CA]]></AD_MESSAGE_ID>
 <!--272961BF12DB4930A0F8EDDADE8827CA-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -18684,6 +18696,18 @@
 <!--452669FBC6B44F90BD0FC29AFF79084B-->  <ISINCLUDEINI18N><![CDATA[N]]></ISINCLUDEINI18N>
 <!--452669FBC6B44F90BD0FC29AFF79084B--></AD_MESSAGE>
 
+<!--45395544AF19476D82D2F38FF529F2BD--><AD_MESSAGE>
+<!--45395544AF19476D82D2F38FF529F2BD-->  <AD_MESSAGE_ID><![CDATA[45395544AF19476D82D2F38FF529F2BD]]></AD_MESSAGE_ID>
+<!--45395544AF19476D82D2F38FF529F2BD-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--45395544AF19476D82D2F38FF529F2BD-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--45395544AF19476D82D2F38FF529F2BD-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--45395544AF19476D82D2F38FF529F2BD-->  <VALUE><![CDATA[WrongFixBackdatedFrom]]></VALUE>
+<!--45395544AF19476D82D2F38FF529F2BD-->  <MSGTEXT><![CDATA[Fix backdated from date you have entered is invalid  because it is part of a period closed, please ensure that date entered is not part of a period closed. ]]></MSGTEXT>
+<!--45395544AF19476D82D2F38FF529F2BD-->  <MSGTYPE><![CDATA[W]]></MSGTYPE>
+<!--45395544AF19476D82D2F38FF529F2BD-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--45395544AF19476D82D2F38FF529F2BD-->  <ISINCLUDEINI18N><![CDATA[N]]></ISINCLUDEINI18N>
+<!--45395544AF19476D82D2F38FF529F2BD--></AD_MESSAGE>
+
 <!--4572743978F94C65969984E770B89172--><AD_MESSAGE>
 <!--4572743978F94C65969984E770B89172-->  <AD_MESSAGE_ID><![CDATA[4572743978F94C65969984E770B89172]]></AD_MESSAGE_ID>
 <!--4572743978F94C65969984E770B89172-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -19953,6 +19977,18 @@
 <!--643C242A10AE4A4495EA6D82B99C1F86-->  <ISINCLUDEINI18N><![CDATA[N]]></ISINCLUDEINI18N>
 <!--643C242A10AE4A4495EA6D82B99C1F86--></AD_MESSAGE>
 
+<!--64F35F2418B944BD88A146A3032D3717--><AD_MESSAGE>
+<!--64F35F2418B944BD88A146A3032D3717-->  <AD_MESSAGE_ID><![CDATA[64F35F2418B944BD88A146A3032D3717]]></AD_MESSAGE_ID>
+<!--64F35F2418B944BD88A146A3032D3717-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--64F35F2418B944BD88A146A3032D3717-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--64F35F2418B944BD88A146A3032D3717-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--64F35F2418B944BD88A146A3032D3717-->  <VALUE><![CDATA[QtyInvoicedHigherDelivered]]></VALUE>
+<!--64F35F2418B944BD88A146A3032D3717-->  <MSGTEXT><![CDATA[Invoiced Quantity cannot be higher than Delivered Quantity when Invoice Terms are: After Delivery]]></MSGTEXT>
+<!--64F35F2418B944BD88A146A3032D3717-->  <MSGTYPE><![CDATA[E]]></MSGTYPE>
+<!--64F35F2418B944BD88A146A3032D3717-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--64F35F2418B944BD88A146A3032D3717-->  <ISINCLUDEINI18N><![CDATA[N]]></ISINCLUDEINI18N>
+<!--64F35F2418B944BD88A146A3032D3717--></AD_MESSAGE>
+
 <!--657E957FEC7243E7AD58A2A009292C26--><AD_MESSAGE>
 <!--657E957FEC7243E7AD58A2A009292C26-->  <AD_MESSAGE_ID><![CDATA[657E957FEC7243E7AD58A2A009292C26]]></AD_MESSAGE_ID>
 <!--657E957FEC7243E7AD58A2A009292C26-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -23887,7 +23923,7 @@
 <!--C6DE79E703C743D7B0BF88E03EE2F742-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--C6DE79E703C743D7B0BF88E03EE2F742-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--C6DE79E703C743D7B0BF88E03EE2F742-->  <VALUE><![CDATA[DocumentAssociated]]></VALUE>
-<!--C6DE79E703C743D7B0BF88E03EE2F742-->  <MSGTEXT><![CDATA[Sales Order has been already booked for the document]]></MSGTEXT>
+<!--C6DE79E703C743D7B0BF88E03EE2F742-->  <MSGTEXT><![CDATA[Purchase Invoice has been already booked for the document]]></MSGTEXT>
 <!--C6DE79E703C743D7B0BF88E03EE2F742-->  <MSGTYPE><![CDATA[E]]></MSGTYPE>
 <!--C6DE79E703C743D7B0BF88E03EE2F742-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--C6DE79E703C743D7B0BF88E03EE2F742-->  <ISINCLUDEINI18N><![CDATA[N]]></ISINCLUDEINI18N>
--- a/src-db/database/sourcedata/AD_PROCESS_PARA.xml	Tue Nov 18 10:57:35 2014 +0100
+++ b/src-db/database/sourcedata/AD_PROCESS_PARA.xml	Tue Nov 18 11:03:11 2014 +0100
@@ -4496,7 +4496,7 @@
 <!--97266E0DF6A24EC0BC6845B9E305F307-->  <COLUMNNAME><![CDATA[PriceStd]]></COLUMNNAME>
 <!--97266E0DF6A24EC0BC6845B9E305F307-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
 <!--97266E0DF6A24EC0BC6845B9E305F307-->  <FIELDLENGTH><![CDATA[10]]></FIELDLENGTH>
-<!--97266E0DF6A24EC0BC6845B9E305F307-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
+<!--97266E0DF6A24EC0BC6845B9E305F307-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
 <!--97266E0DF6A24EC0BC6845B9E305F307-->  <ISRANGE><![CDATA[N]]></ISRANGE>
 <!--97266E0DF6A24EC0BC6845B9E305F307-->  <AD_ELEMENT_ID><![CDATA[957]]></AD_ELEMENT_ID>
 <!--97266E0DF6A24EC0BC6845B9E305F307--></AD_PROCESS_PARA>
--- a/src-db/database/sourcedata/AD_REF_LIST.xml	Tue Nov 18 10:57:35 2014 +0100
+++ b/src-db/database/sourcedata/AD_REF_LIST.xml	Tue Nov 18 11:03:11 2014 +0100
@@ -9974,7 +9974,7 @@
 <!--78ED41661F55422786E4109B62FCC5D0-->  <AD_REF_LIST_ID><![CDATA[78ED41661F55422786E4109B62FCC5D0]]></AD_REF_LIST_ID>
 <!--78ED41661F55422786E4109B62FCC5D0-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
 <!--78ED41661F55422786E4109B62FCC5D0-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
-<!--78ED41661F55422786E4109B62FCC5D0-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--78ED41661F55422786E4109B62FCC5D0-->  <ISACTIVE><![CDATA[N]]></ISACTIVE>
 <!--78ED41661F55422786E4109B62FCC5D0-->  <VALUE><![CDATA[IAU]]></VALUE>
 <!--78ED41661F55422786E4109B62FCC5D0-->  <NAME><![CDATA[Inventory Amount Update]]></NAME>
 <!--78ED41661F55422786E4109B62FCC5D0-->  <AD_REFERENCE_ID><![CDATA[EB3568484660488FA112CBBB2C1D2780]]></AD_REFERENCE_ID>
--- a/src-db/database/sourcedata/AD_TAB.xml	Tue Nov 18 10:57:35 2014 +0100
+++ b/src-db/database/sourcedata/AD_TAB.xml	Tue Nov 18 11:03:11 2014 +0100
@@ -3681,8 +3681,8 @@
 <!--289-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--289-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--289-->  <NAME><![CDATA[Transactions]]></NAME>
-<!--289-->  <DESCRIPTION><![CDATA[View all transactions related to this product.]]></DESCRIPTION>
-<!--289-->  <HELP><![CDATA[The transaction tab is a summarized view of all the transactions of a product. ]]></HELP>
+<!--289-->  <DESCRIPTION><![CDATA[Transaction tab is a summarized view of all the transactions of a product. ]]></DESCRIPTION>
+<!--289-->  <HELP><![CDATA[Transaction tab is a summarized view of all the transactions of a product.]]></HELP>
 <!--289-->  <AD_TABLE_ID><![CDATA[329]]></AD_TABLE_ID>
 <!--289-->  <AD_WINDOW_ID><![CDATA[140]]></AD_WINDOW_ID>
 <!--289-->  <SEQNO><![CDATA[50]]></SEQNO>
@@ -3745,8 +3745,8 @@
 <!--291-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--291-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--291-->  <NAME><![CDATA[Lines]]></NAME>
-<!--291-->  <DESCRIPTION><![CDATA[Add products to be included in your invoice.  Each product is added by creating a line.]]></DESCRIPTION>
-<!--291-->  <HELP><![CDATA[Once the purchase invoice header has been properly filled in and saved, each purchase invoice line can be registered in this tab one by one.]]></HELP>
+<!--291-->  <DESCRIPTION><![CDATA[Once the purchase invoice header has been properly filled in and saved purchase invoice lines can be registered in this tab.]]></DESCRIPTION>
+<!--291-->  <HELP><![CDATA[Once the purchase invoice header has been properly filled in and saved purchase invoice lines can be registered in this tab.]]></HELP>
 <!--291-->  <AD_TABLE_ID><![CDATA[333]]></AD_TABLE_ID>
 <!--291-->  <AD_WINDOW_ID><![CDATA[183]]></AD_WINDOW_ID>
 <!--291-->  <SEQNO><![CDATA[20]]></SEQNO>
@@ -13256,8 +13256,8 @@
 <!--06DCB72BB6D24F82BCDA5FFF8EA0425C-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--06DCB72BB6D24F82BCDA5FFF8EA0425C-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--06DCB72BB6D24F82BCDA5FFF8EA0425C-->  <NAME><![CDATA[Line]]></NAME>
-<!--06DCB72BB6D24F82BCDA5FFF8EA0425C-->  <DESCRIPTION><![CDATA[Each transaction requiring adjustment.]]></DESCRIPTION>
-<!--06DCB72BB6D24F82BCDA5FFF8EA0425C-->  <HELP><![CDATA[Each transaction requiring adjustment.]]></HELP>
+<!--06DCB72BB6D24F82BCDA5FFF8EA0425C-->  <DESCRIPTION><![CDATA[A cost adjustment document can have as many adjustment lines as products included in the receipts to which landed cost have been allocated.]]></DESCRIPTION>
+<!--06DCB72BB6D24F82BCDA5FFF8EA0425C-->  <HELP><![CDATA[A cost adjustment document can have as many adjustment lines as products included in the receipts to which landed cost have been allocated.]]></HELP>
 <!--06DCB72BB6D24F82BCDA5FFF8EA0425C-->  <AD_TABLE_ID><![CDATA[34E79323CEC847C2A9ED2C8430AC73D1]]></AD_TABLE_ID>
 <!--06DCB72BB6D24F82BCDA5FFF8EA0425C-->  <AD_WINDOW_ID><![CDATA[1688A758BDA04C88A5C1D370EB979C53]]></AD_WINDOW_ID>
 <!--06DCB72BB6D24F82BCDA5FFF8EA0425C-->  <SEQNO><![CDATA[20]]></SEQNO>
@@ -13319,8 +13319,8 @@
 <!--0F39553D7C61492B8204FDD46E744FD0-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--0F39553D7C61492B8204FDD46E744FD0-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--0F39553D7C61492B8204FDD46E744FD0-->  <NAME><![CDATA[Header]]></NAME>
-<!--0F39553D7C61492B8204FDD46E744FD0-->  <DESCRIPTION><![CDATA[Master window where available algorithms are defined.]]></DESCRIPTION>
-<!--0F39553D7C61492B8204FDD46E744FD0-->  <HELP><![CDATA[Master window where available algorithms are defined.]]></HELP>
+<!--0F39553D7C61492B8204FDD46E744FD0-->  <DESCRIPTION><![CDATA[Master window where available landed cost distribution algorithms are defined.]]></DESCRIPTION>
+<!--0F39553D7C61492B8204FDD46E744FD0-->  <HELP><![CDATA[Master window where available landed cost distribution algorithms are defined.]]></HELP>
 <!--0F39553D7C61492B8204FDD46E744FD0-->  <AD_TABLE_ID><![CDATA[61F6EE14CE4A484D857536AF192E6BED]]></AD_TABLE_ID>
 <!--0F39553D7C61492B8204FDD46E744FD0-->  <AD_WINDOW_ID><![CDATA[12B062B1031A40EC8067D353B31967EB]]></AD_WINDOW_ID>
 <!--0F39553D7C61492B8204FDD46E744FD0-->  <SEQNO><![CDATA[10]]></SEQNO>
@@ -13381,6 +13381,8 @@
 <!--0F76B56EB2874C729ABE1665D5853E9D-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--0F76B56EB2874C729ABE1665D5853E9D-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--0F76B56EB2874C729ABE1665D5853E9D-->  <NAME><![CDATA[Landed Cost]]></NAME>
+<!--0F76B56EB2874C729ABE1665D5853E9D-->  <DESCRIPTION><![CDATA[Landed Cost tab allows to allocate additional costs to the goods receipt.]]></DESCRIPTION>
+<!--0F76B56EB2874C729ABE1665D5853E9D-->  <HELP><![CDATA[Landed Cost tab allows to allocate additional costs to the goods receipt.]]></HELP>
 <!--0F76B56EB2874C729ABE1665D5853E9D-->  <AD_TABLE_ID><![CDATA[55A984C314FD4C4FB5E7C32DE36BB07B]]></AD_TABLE_ID>
 <!--0F76B56EB2874C729ABE1665D5853E9D-->  <AD_WINDOW_ID><![CDATA[184]]></AD_WINDOW_ID>
 <!--0F76B56EB2874C729ABE1665D5853E9D-->  <SEQNO><![CDATA[60]]></SEQNO>
@@ -13631,6 +13633,8 @@
 <!--1C05058D61AC4B69A7E550F32F9F2873-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--1C05058D61AC4B69A7E550F32F9F2873-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--1C05058D61AC4B69A7E550F32F9F2873-->  <NAME><![CDATA[Cost]]></NAME>
+<!--1C05058D61AC4B69A7E550F32F9F2873-->  <DESCRIPTION><![CDATA[A Landed Cost Document can have as many cost (lines) as landed cost types to allocate to the Goods Receipt(s) selected.]]></DESCRIPTION>
+<!--1C05058D61AC4B69A7E550F32F9F2873-->  <HELP><![CDATA[A Landed Cost Document can have as many cost (lines) as landed cost types to allocate to the Goods Receipt(s) selected.]]></HELP>
 <!--1C05058D61AC4B69A7E550F32F9F2873-->  <AD_TABLE_ID><![CDATA[55A984C314FD4C4FB5E7C32DE36BB07B]]></AD_TABLE_ID>
 <!--1C05058D61AC4B69A7E550F32F9F2873-->  <AD_WINDOW_ID><![CDATA[D1B11CBC0FEF4CA0B44D3BECEBA219BC]]></AD_WINDOW_ID>
 <!--1C05058D61AC4B69A7E550F32F9F2873-->  <SEQNO><![CDATA[20]]></SEQNO>
@@ -14608,8 +14612,8 @@
 <!--45A6D51BFBB74C079AC559A4240A296D-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--45A6D51BFBB74C079AC559A4240A296D-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--45A6D51BFBB74C079AC559A4240A296D-->  <NAME><![CDATA[Header]]></NAME>
-<!--45A6D51BFBB74C079AC559A4240A296D-->  <DESCRIPTION><![CDATA[Each Cost Adjustment generated. ]]></DESCRIPTION>
-<!--45A6D51BFBB74C079AC559A4240A296D-->  <HELP><![CDATA[Each Cost Adjustment generated. ]]></HELP>
+<!--45A6D51BFBB74C079AC559A4240A296D-->  <DESCRIPTION><![CDATA[Cost adjustment documents are automatically created by either the  "Costing Background" Process or the "Price Correction Background" process as applicable, depending on the source of the adjustment.]]></DESCRIPTION>
+<!--45A6D51BFBB74C079AC559A4240A296D-->  <HELP><![CDATA[Cost adjustment documents are automatically created by either the  "Costing Background" Process or the "Price Correction Background" process as applicable, depending on the source of the adjustment.]]></HELP>
 <!--45A6D51BFBB74C079AC559A4240A296D-->  <AD_TABLE_ID><![CDATA[D022B92163074E5E82449C8E0B5AFDF6]]></AD_TABLE_ID>
 <!--45A6D51BFBB74C079AC559A4240A296D-->  <AD_WINDOW_ID><![CDATA[1688A758BDA04C88A5C1D370EB979C53]]></AD_WINDOW_ID>
 <!--45A6D51BFBB74C079AC559A4240A296D-->  <SEQNO><![CDATA[10]]></SEQNO>
@@ -14856,6 +14860,8 @@
 <!--4CD2099689D74243A0DE7910C6C86AD0-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--4CD2099689D74243A0DE7910C6C86AD0-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--4CD2099689D74243A0DE7910C6C86AD0-->  <NAME><![CDATA[Header]]></NAME>
+<!--4CD2099689D74243A0DE7910C6C86AD0-->  <DESCRIPTION><![CDATA[An inventory Amount Update can be created and processed in the header section of the Inventory Amount Update window.]]></DESCRIPTION>
+<!--4CD2099689D74243A0DE7910C6C86AD0-->  <HELP><![CDATA[An inventory Amount Update can be created and processed in the header section of the Inventory Amount Update window.]]></HELP>
 <!--4CD2099689D74243A0DE7910C6C86AD0-->  <AD_TABLE_ID><![CDATA[F6B6AD5679FF4A798D2A3D44B232C52C]]></AD_TABLE_ID>
 <!--4CD2099689D74243A0DE7910C6C86AD0-->  <AD_WINDOW_ID><![CDATA[E7754848A0314B018B37C1428ECB4D21]]></AD_WINDOW_ID>
 <!--4CD2099689D74243A0DE7910C6C86AD0-->  <SEQNO><![CDATA[10]]></SEQNO>
@@ -14941,6 +14947,35 @@
 <!--4F9E1C27F7F040C58C5CA2E6FD5B26CB-->  <EM_OBUIAPP_SHOW_SELECT><![CDATA[Y]]></EM_OBUIAPP_SHOW_SELECT>
 <!--4F9E1C27F7F040C58C5CA2E6FD5B26CB--></AD_TAB>
 
+<!--4FB5884A443240EEB5504BBF7813870D--><AD_TAB>
+<!--4FB5884A443240EEB5504BBF7813870D-->  <AD_TAB_ID><![CDATA[4FB5884A443240EEB5504BBF7813870D]]></AD_TAB_ID>
+<!--4FB5884A443240EEB5504BBF7813870D-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--4FB5884A443240EEB5504BBF7813870D-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--4FB5884A443240EEB5504BBF7813870D-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--4FB5884A443240EEB5504BBF7813870D-->  <NAME><![CDATA[Documents]]></NAME>
+<!--4FB5884A443240EEB5504BBF7813870D-->  <AD_TABLE_ID><![CDATA[229]]></AD_TABLE_ID>
+<!--4FB5884A443240EEB5504BBF7813870D-->  <AD_WINDOW_ID><![CDATA[110]]></AD_WINDOW_ID>
+<!--4FB5884A443240EEB5504BBF7813870D-->  <SEQNO><![CDATA[52]]></SEQNO>
+<!--4FB5884A443240EEB5504BBF7813870D-->  <TABLEVEL><![CDATA[2]]></TABLEVEL>
+<!--4FB5884A443240EEB5504BBF7813870D-->  <ISSINGLEROW><![CDATA[N]]></ISSINGLEROW>
+<!--4FB5884A443240EEB5504BBF7813870D-->  <ISINFOTAB><![CDATA[N]]></ISINFOTAB>
+<!--4FB5884A443240EEB5504BBF7813870D-->  <ISTRANSLATIONTAB><![CDATA[N]]></ISTRANSLATIONTAB>
+<!--4FB5884A443240EEB5504BBF7813870D-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--4FB5884A443240EEB5504BBF7813870D-->  <HASTREE><![CDATA[N]]></HASTREE>
+<!--4FB5884A443240EEB5504BBF7813870D-->  <PROCESSING><![CDATA[N]]></PROCESSING>
+<!--4FB5884A443240EEB5504BBF7813870D-->  <IMPORTFIELDS><![CDATA[N]]></IMPORTFIELDS>
+<!--4FB5884A443240EEB5504BBF7813870D-->  <ISSORTTAB><![CDATA[N]]></ISSORTTAB>
+<!--4FB5884A443240EEB5504BBF7813870D-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--4FB5884A443240EEB5504BBF7813870D-->  <UIPATTERN><![CDATA[RO]]></UIPATTERN>
+<!--4FB5884A443240EEB5504BBF7813870D-->  <SHOWPARENTBUTTONS><![CDATA[Y]]></SHOWPARENTBUTTONS>
+<!--4FB5884A443240EEB5504BBF7813870D-->  <DISABLE_PARENT_KEY_PROPERTY><![CDATA[N]]></DISABLE_PARENT_KEY_PROPERTY>
+<!--4FB5884A443240EEB5504BBF7813870D-->  <ISREADONLYTREE><![CDATA[N]]></ISREADONLYTREE>
+<!--4FB5884A443240EEB5504BBF7813870D-->  <ISSHOWTREENODEICONS><![CDATA[Y]]></ISSHOWTREENODEICONS>
+<!--4FB5884A443240EEB5504BBF7813870D-->  <EM_OBUIAPP_CAN_ADD><![CDATA[N]]></EM_OBUIAPP_CAN_ADD>
+<!--4FB5884A443240EEB5504BBF7813870D-->  <EM_OBUIAPP_CAN_DELETE><![CDATA[N]]></EM_OBUIAPP_CAN_DELETE>
+<!--4FB5884A443240EEB5504BBF7813870D-->  <EM_OBUIAPP_SHOW_SELECT><![CDATA[Y]]></EM_OBUIAPP_SHOW_SELECT>
+<!--4FB5884A443240EEB5504BBF7813870D--></AD_TAB>
+
 <!--5247D51755AA43F384EBC35006FC2329--><AD_TAB>
 <!--5247D51755AA43F384EBC35006FC2329-->  <AD_TAB_ID><![CDATA[5247D51755AA43F384EBC35006FC2329]]></AD_TAB_ID>
 <!--5247D51755AA43F384EBC35006FC2329-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -15042,7 +15077,8 @@
 <!--5734406CB06D492CA9C5E31960CA7628-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--5734406CB06D492CA9C5E31960CA7628-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--5734406CB06D492CA9C5E31960CA7628-->  <NAME><![CDATA[Accounting]]></NAME>
-<!--5734406CB06D492CA9C5E31960CA7628-->  <HELP><![CDATA[Accounting information related to the cost adjustment]]></HELP>
+<!--5734406CB06D492CA9C5E31960CA7628-->  <DESCRIPTION><![CDATA[This tab provides Landed Cost Matching accounting information.]]></DESCRIPTION>
+<!--5734406CB06D492CA9C5E31960CA7628-->  <HELP><![CDATA[This tab provides Landed Cost Matching accounting information.]]></HELP>
 <!--5734406CB06D492CA9C5E31960CA7628-->  <AD_TABLE_ID><![CDATA[270]]></AD_TABLE_ID>
 <!--5734406CB06D492CA9C5E31960CA7628-->  <AD_WINDOW_ID><![CDATA[D1B11CBC0FEF4CA0B44D3BECEBA219BC]]></AD_WINDOW_ID>
 <!--5734406CB06D492CA9C5E31960CA7628-->  <SEQNO><![CDATA[70]]></SEQNO>
@@ -15211,8 +15247,8 @@
 <!--5EE59CF00EF846DD953BB27BBF44E696-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--5EE59CF00EF846DD953BB27BBF44E696-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--5EE59CF00EF846DD953BB27BBF44E696-->  <NAME><![CDATA[Header]]></NAME>
-<!--5EE59CF00EF846DD953BB27BBF44E696-->  <DESCRIPTION><![CDATA[Defines the different types or concepts of the Landed Costs that are assigned to the Receipts.]]></DESCRIPTION>
-<!--5EE59CF00EF846DD953BB27BBF44E696-->  <HELP><![CDATA[Defines the different types or concepts of the Landed Costs that are assigned to the Receipts.]]></HELP>
+<!--5EE59CF00EF846DD953BB27BBF44E696-->  <DESCRIPTION><![CDATA[Landed Cost Types can be defined either as a "Product" or as an "Account" (G/L Item). Besides that a distribution algorithm can be define to configure the way landed costs are going to be allocated to products.]]></DESCRIPTION>
+<!--5EE59CF00EF846DD953BB27BBF44E696-->  <HELP><![CDATA[Landed Cost Types can be defined either as a "Product" or as an "Account" (G/L Item). Besides that a distribution algorithm can be define to configure the way landed costs are going to be allocated to products.]]></HELP>
 <!--5EE59CF00EF846DD953BB27BBF44E696-->  <AD_TABLE_ID><![CDATA[BAFE429F04854EBEBD63A450DD714C89]]></AD_TABLE_ID>
 <!--5EE59CF00EF846DD953BB27BBF44E696-->  <AD_WINDOW_ID><![CDATA[944C49CE80BE4F71B9917BD680A052A8]]></AD_WINDOW_ID>
 <!--5EE59CF00EF846DD953BB27BBF44E696-->  <SEQNO><![CDATA[10]]></SEQNO>
@@ -15616,8 +15652,8 @@
 <!--6BC4F7D2CBE94AEE939CCB5990B55FEA-->  <AD_TAB_ID><![CDATA[6BC4F7D2CBE94AEE939CCB5990B55FEA]]></AD_TAB_ID>
 <!--6BC4F7D2CBE94AEE939CCB5990B55FEA-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
 <!--6BC4F7D2CBE94AEE939CCB5990B55FEA-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
-<!--6BC4F7D2CBE94AEE939CCB5990B55FEA-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
-<!--6BC4F7D2CBE94AEE939CCB5990B55FEA-->  <NAME><![CDATA[Period Control]]></NAME>
+<!--6BC4F7D2CBE94AEE939CCB5990B55FEA-->  <ISACTIVE><![CDATA[N]]></ISACTIVE>
+<!--6BC4F7D2CBE94AEE939CCB5990B55FEA-->  <NAME><![CDATA[Period Control Old]]></NAME>
 <!--6BC4F7D2CBE94AEE939CCB5990B55FEA-->  <DESCRIPTION><![CDATA[View to display the Period Control for the selected organization]]></DESCRIPTION>
 <!--6BC4F7D2CBE94AEE939CCB5990B55FEA-->  <HELP><![CDATA[Period control tab is a read-only tab which lists the fiscal calendar period status of an organization.]]></HELP>
 <!--6BC4F7D2CBE94AEE939CCB5990B55FEA-->  <AD_TABLE_ID><![CDATA[CB391C8A13D74B688A34017B5B5D1F5D]]></AD_TABLE_ID>
@@ -15809,6 +15845,8 @@
 <!--7209E9DB66CC47CF933AAEC8E3F873B6-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--7209E9DB66CC47CF933AAEC8E3F873B6-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--7209E9DB66CC47CF933AAEC8E3F873B6-->  <NAME><![CDATA[Accounting Cost]]></NAME>
+<!--7209E9DB66CC47CF933AAEC8E3F873B6-->  <DESCRIPTION><![CDATA[This tab provides Landed Cost document accounting information.]]></DESCRIPTION>
+<!--7209E9DB66CC47CF933AAEC8E3F873B6-->  <HELP><![CDATA[This tab provides Landed Cost document accounting information.]]></HELP>
 <!--7209E9DB66CC47CF933AAEC8E3F873B6-->  <AD_TABLE_ID><![CDATA[270]]></AD_TABLE_ID>
 <!--7209E9DB66CC47CF933AAEC8E3F873B6-->  <AD_WINDOW_ID><![CDATA[D1B11CBC0FEF4CA0B44D3BECEBA219BC]]></AD_WINDOW_ID>
 <!--7209E9DB66CC47CF933AAEC8E3F873B6-->  <SEQNO><![CDATA[40]]></SEQNO>
@@ -16419,12 +16457,46 @@
 <!--8723B0D2464B4AF8B63EDD3E541B883D-->  <EM_OBUIAPP_SHOW_SELECT><![CDATA[Y]]></EM_OBUIAPP_SHOW_SELECT>
 <!--8723B0D2464B4AF8B63EDD3E541B883D--></AD_TAB>
 
+<!--885A6DB490044F3F8528373B60E3D9F5--><AD_TAB>
+<!--885A6DB490044F3F8528373B60E3D9F5-->  <AD_TAB_ID><![CDATA[885A6DB490044F3F8528373B60E3D9F5]]></AD_TAB_ID>
+<!--885A6DB490044F3F8528373B60E3D9F5-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--885A6DB490044F3F8528373B60E3D9F5-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--885A6DB490044F3F8528373B60E3D9F5-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--885A6DB490044F3F8528373B60E3D9F5-->  <NAME><![CDATA[Period Control]]></NAME>
+<!--885A6DB490044F3F8528373B60E3D9F5-->  <AD_TABLE_ID><![CDATA[145]]></AD_TABLE_ID>
+<!--885A6DB490044F3F8528373B60E3D9F5-->  <AD_WINDOW_ID><![CDATA[110]]></AD_WINDOW_ID>
+<!--885A6DB490044F3F8528373B60E3D9F5-->  <SEQNO><![CDATA[51]]></SEQNO>
+<!--885A6DB490044F3F8528373B60E3D9F5-->  <TABLEVEL><![CDATA[1]]></TABLEVEL>
+<!--885A6DB490044F3F8528373B60E3D9F5-->  <ISSINGLEROW><![CDATA[N]]></ISSINGLEROW>
+<!--885A6DB490044F3F8528373B60E3D9F5-->  <ISINFOTAB><![CDATA[N]]></ISINFOTAB>
+<!--885A6DB490044F3F8528373B60E3D9F5-->  <ISTRANSLATIONTAB><![CDATA[N]]></ISTRANSLATIONTAB>
+<!--885A6DB490044F3F8528373B60E3D9F5-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--885A6DB490044F3F8528373B60E3D9F5-->  <HASTREE><![CDATA[N]]></HASTREE>
+<!--885A6DB490044F3F8528373B60E3D9F5-->  <PROCESSING><![CDATA[N]]></PROCESSING>
+<!--885A6DB490044F3F8528373B60E3D9F5-->  <IMPORTFIELDS><![CDATA[N]]></IMPORTFIELDS>
+<!--885A6DB490044F3F8528373B60E3D9F5-->  <ISSORTTAB><![CDATA[N]]></ISSORTTAB>
+<!--885A6DB490044F3F8528373B60E3D9F5-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--885A6DB490044F3F8528373B60E3D9F5-->  <UIPATTERN><![CDATA[RO]]></UIPATTERN>
+<!--885A6DB490044F3F8528373B60E3D9F5-->  <HQLORDERBYCLAUSE><![CDATA[startingDate]]></HQLORDERBYCLAUSE>
+<!--885A6DB490044F3F8528373B60E3D9F5-->  <HQLFILTERCLAUSE><![CDATA[e._computedColumns.status not in ('P','C')]]></HQLFILTERCLAUSE>
+<!--885A6DB490044F3F8528373B60E3D9F5-->  <SHOWPARENTBUTTONS><![CDATA[Y]]></SHOWPARENTBUTTONS>
+<!--885A6DB490044F3F8528373B60E3D9F5-->  <DISPLAYLOGIC><![CDATA[@IsPeriodControlAllowed@='Y']]></DISPLAYLOGIC>
+<!--885A6DB490044F3F8528373B60E3D9F5-->  <DISABLE_PARENT_KEY_PROPERTY><![CDATA[N]]></DISABLE_PARENT_KEY_PROPERTY>
+<!--885A6DB490044F3F8528373B60E3D9F5-->  <ISREADONLYTREE><![CDATA[N]]></ISREADONLYTREE>
+<!--885A6DB490044F3F8528373B60E3D9F5-->  <ISSHOWTREENODEICONS><![CDATA[Y]]></ISSHOWTREENODEICONS>
+<!--885A6DB490044F3F8528373B60E3D9F5-->  <EM_OBUIAPP_CAN_ADD><![CDATA[N]]></EM_OBUIAPP_CAN_ADD>
+<!--885A6DB490044F3F8528373B60E3D9F5-->  <EM_OBUIAPP_CAN_DELETE><![CDATA[N]]></EM_OBUIAPP_CAN_DELETE>
+<!--885A6DB490044F3F8528373B60E3D9F5-->  <EM_OBUIAPP_SHOW_SELECT><![CDATA[Y]]></EM_OBUIAPP_SHOW_SELECT>
+<!--885A6DB490044F3F8528373B60E3D9F5--></AD_TAB>
+
 <!--89A2764B004B4D95B09C9F4C1CB56BE5--><AD_TAB>
 <!--89A2764B004B4D95B09C9F4C1CB56BE5-->  <AD_TAB_ID><![CDATA[89A2764B004B4D95B09C9F4C1CB56BE5]]></AD_TAB_ID>
 <!--89A2764B004B4D95B09C9F4C1CB56BE5-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
 <!--89A2764B004B4D95B09C9F4C1CB56BE5-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--89A2764B004B4D95B09C9F4C1CB56BE5-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--89A2764B004B4D95B09C9F4C1CB56BE5-->  <NAME><![CDATA[Matched Amount]]></NAME>
+<!--89A2764B004B4D95B09C9F4C1CB56BE5-->  <DESCRIPTION><![CDATA[Matched Amount tab is a red only tab that allows to review the purchase invoice lines matched against landed cost lines.]]></DESCRIPTION>
+<!--89A2764B004B4D95B09C9F4C1CB56BE5-->  <HELP><![CDATA[Matched Amount tab is a red only tab that allows to review the purchase invoice lines matched against landed cost lines.]]></HELP>
 <!--89A2764B004B4D95B09C9F4C1CB56BE5-->  <AD_TABLE_ID><![CDATA[EF0201D90F30499EBFAF53D0FC7452DB]]></AD_TABLE_ID>
 <!--89A2764B004B4D95B09C9F4C1CB56BE5-->  <AD_WINDOW_ID><![CDATA[D1B11CBC0FEF4CA0B44D3BECEBA219BC]]></AD_WINDOW_ID>
 <!--89A2764B004B4D95B09C9F4C1CB56BE5-->  <SEQNO><![CDATA[30]]></SEQNO>
@@ -16681,6 +16753,8 @@
 <!--94216D8AE8CD49DAA29525914C152CEC-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--94216D8AE8CD49DAA29525914C152CEC-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--94216D8AE8CD49DAA29525914C152CEC-->  <NAME><![CDATA[Inventories]]></NAME>
+<!--94216D8AE8CD49DAA29525914C152CEC-->  <DESCRIPTION><![CDATA[A closing and an opening inventories are created for every product whose unit cost or inventory value have been modified.]]></DESCRIPTION>
+<!--94216D8AE8CD49DAA29525914C152CEC-->  <HELP><![CDATA[A closing and an opening inventories are created for every product whose unit cost or inventory value have been modified.]]></HELP>
 <!--94216D8AE8CD49DAA29525914C152CEC-->  <AD_TABLE_ID><![CDATA[ED973DE0D2604AFDA19DBBE27254D670]]></AD_TABLE_ID>
 <!--94216D8AE8CD49DAA29525914C152CEC-->  <AD_WINDOW_ID><![CDATA[E7754848A0314B018B37C1428ECB4D21]]></AD_WINDOW_ID>
 <!--94216D8AE8CD49DAA29525914C152CEC-->  <SEQNO><![CDATA[30]]></SEQNO>
@@ -17766,6 +17840,9 @@
 <!--BD883B355F1B448A9CB6BD472600EB2D-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--BD883B355F1B448A9CB6BD472600EB2D-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--BD883B355F1B448A9CB6BD472600EB2D-->  <NAME><![CDATA[Lines]]></NAME>
+<!--BD883B355F1B448A9CB6BD472600EB2D-->  <DESCRIPTION><![CDATA[Once an inventory amount update header has been properly created and saved, inventory amount update lines can be created in this tab.]]></DESCRIPTION>
+<!--BD883B355F1B448A9CB6BD472600EB2D-->  <HELP><![CDATA[Once an inventory amount update header has been properly created and saved, inventory amount update lines can be created in this tab.
+]]></HELP>
 <!--BD883B355F1B448A9CB6BD472600EB2D-->  <AD_TABLE_ID><![CDATA[F26CC88DB04946F1A19DF05749C4381F]]></AD_TABLE_ID>
 <!--BD883B355F1B448A9CB6BD472600EB2D-->  <AD_WINDOW_ID><![CDATA[E7754848A0314B018B37C1428ECB4D21]]></AD_WINDOW_ID>
 <!--BD883B355F1B448A9CB6BD472600EB2D-->  <SEQNO><![CDATA[20]]></SEQNO>
@@ -17795,6 +17872,8 @@
 <!--C0B6D4F225994C7C83CCFC6EF3822A4A-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--C0B6D4F225994C7C83CCFC6EF3822A4A-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--C0B6D4F225994C7C83CCFC6EF3822A4A-->  <NAME><![CDATA[Receipt]]></NAME>
+<!--C0B6D4F225994C7C83CCFC6EF3822A4A-->  <DESCRIPTION><![CDATA[Receipt tab allows to select either the receipt(s) or receipt line(s) to which landed cost types booked are going to be allocated.]]></DESCRIPTION>
+<!--C0B6D4F225994C7C83CCFC6EF3822A4A-->  <HELP><![CDATA[Receipt tab allows to select either the receipt(s) or receipt line(s) to which landed cost types booked are going to be allocated.]]></HELP>
 <!--C0B6D4F225994C7C83CCFC6EF3822A4A-->  <AD_TABLE_ID><![CDATA[FC90AED3E5ED45CAB28A1FF2D571FB99]]></AD_TABLE_ID>
 <!--C0B6D4F225994C7C83CCFC6EF3822A4A-->  <AD_WINDOW_ID><![CDATA[D1B11CBC0FEF4CA0B44D3BECEBA219BC]]></AD_WINDOW_ID>
 <!--C0B6D4F225994C7C83CCFC6EF3822A4A-->  <SEQNO><![CDATA[50]]></SEQNO>
@@ -18176,6 +18255,8 @@
 <!--CCFB20B3268346B99A2390B8989BCDAA-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--CCFB20B3268346B99A2390B8989BCDAA-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--CCFB20B3268346B99A2390B8989BCDAA-->  <NAME><![CDATA[Receipt Line Amount]]></NAME>
+<!--CCFB20B3268346B99A2390B8989BCDAA-->  <DESCRIPTION><![CDATA[Receipt Line Amount is a read only tab that shows detailed information about the landed cost type line allocated to each receipt line, as well as the landed cost amount distributed to each receipt line.]]></DESCRIPTION>
+<!--CCFB20B3268346B99A2390B8989BCDAA-->  <HELP><![CDATA[Receipt Line Amount is a read only tab that shows detailed information about the landed cost type line allocated to each receipt line, as well as the landed cost amount distributed to each receipt line.]]></HELP>
 <!--CCFB20B3268346B99A2390B8989BCDAA-->  <AD_TABLE_ID><![CDATA[4DA32EB3E1A5429197785EC79FF34132]]></AD_TABLE_ID>
 <!--CCFB20B3268346B99A2390B8989BCDAA-->  <AD_WINDOW_ID><![CDATA[D1B11CBC0FEF4CA0B44D3BECEBA219BC]]></AD_WINDOW_ID>
 <!--CCFB20B3268346B99A2390B8989BCDAA-->  <SEQNO><![CDATA[60]]></SEQNO>
@@ -18673,8 +18754,8 @@
 <!--EE01CF71A3D741E8B2B7204ADCBBF7A8-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--EE01CF71A3D741E8B2B7204ADCBBF7A8-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--EE01CF71A3D741E8B2B7204ADCBBF7A8-->  <NAME><![CDATA[Accounting]]></NAME>
-<!--EE01CF71A3D741E8B2B7204ADCBBF7A8-->  <DESCRIPTION><![CDATA[Accounting information related to the cost adjustment]]></DESCRIPTION>
-<!--EE01CF71A3D741E8B2B7204ADCBBF7A8-->  <HELP><![CDATA[Accounting information related to the cost adjustment]]></HELP>
+<!--EE01CF71A3D741E8B2B7204ADCBBF7A8-->  <DESCRIPTION><![CDATA[This tab provides Cost Adjustment accounting information.]]></DESCRIPTION>
+<!--EE01CF71A3D741E8B2B7204ADCBBF7A8-->  <HELP><![CDATA[This tab provides Cost Adjustment accounting information.]]></HELP>
 <!--EE01CF71A3D741E8B2B7204ADCBBF7A8-->  <AD_TABLE_ID><![CDATA[270]]></AD_TABLE_ID>
 <!--EE01CF71A3D741E8B2B7204ADCBBF7A8-->  <AD_WINDOW_ID><![CDATA[1688A758BDA04C88A5C1D370EB979C53]]></AD_WINDOW_ID>
 <!--EE01CF71A3D741E8B2B7204ADCBBF7A8-->  <SEQNO><![CDATA[30]]></SEQNO>
@@ -18766,8 +18847,8 @@
 <!--F25CBC61CDD64F5E8A6FDC41C6E23C96-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--F25CBC61CDD64F5E8A6FDC41C6E23C96-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--F25CBC61CDD64F5E8A6FDC41C6E23C96-->  <NAME><![CDATA[Header]]></NAME>
-<!--F25CBC61CDD64F5E8A6FDC41C6E23C96-->  <DESCRIPTION><![CDATA[Landed cost window allows to create, edit and process a landed cost]]></DESCRIPTION>
-<!--F25CBC61CDD64F5E8A6FDC41C6E23C96-->  <HELP><![CDATA[Landed cost window allows to create, edit and process a landed cost]]></HELP>
+<!--F25CBC61CDD64F5E8A6FDC41C6E23C96-->  <DESCRIPTION><![CDATA[A Landed Cost document can be created, processed and post in this window.]]></DESCRIPTION>
+<!--F25CBC61CDD64F5E8A6FDC41C6E23C96-->  <HELP><![CDATA[A Landed Cost document can be created, processed and post in this window.]]></HELP>
 <!--F25CBC61CDD64F5E8A6FDC41C6E23C96-->  <AD_TABLE_ID><![CDATA[082F967CDF7245EB9A150941F326C45C]]></AD_TABLE_ID>
 <!--F25CBC61CDD64F5E8A6FDC41C6E23C96-->  <AD_WINDOW_ID><![CDATA[D1B11CBC0FEF4CA0B44D3BECEBA219BC]]></AD_WINDOW_ID>
 <!--F25CBC61CDD64F5E8A6FDC41C6E23C96-->  <SEQNO><![CDATA[10]]></SEQNO>
--- a/src-db/database/sourcedata/AD_TREENODE.xml	Tue Nov 18 10:57:35 2014 +0100
+++ b/src-db/database/sourcedata/AD_TREENODE.xml	Tue Nov 18 11:03:11 2014 +0100
@@ -106,8 +106,8 @@
 <!--336590D9E14D4C269480543BA8A31321-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
 <!--336590D9E14D4C269480543BA8A31321-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--336590D9E14D4C269480543BA8A31321-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
-<!--336590D9E14D4C269480543BA8A31321-->  <PARENT_ID><![CDATA[800256]]></PARENT_ID>
-<!--336590D9E14D4C269480543BA8A31321-->  <SEQNO><![CDATA[10]]></SEQNO>
+<!--336590D9E14D4C269480543BA8A31321-->  <PARENT_ID><![CDATA[800244]]></PARENT_ID>
+<!--336590D9E14D4C269480543BA8A31321-->  <SEQNO><![CDATA[140]]></SEQNO>
 <!--336590D9E14D4C269480543BA8A31321--></AD_TREENODE>
 
 <!--3887BEFE9C8C43B892367AA37B0FC04A--><AD_TREENODE>
@@ -821,7 +821,7 @@
 <!--52118BF1A22A4D84E040007F01005FEC-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--52118BF1A22A4D84E040007F01005FEC-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--52118BF1A22A4D84E040007F01005FEC-->  <PARENT_ID><![CDATA[800244]]></PARENT_ID>
-<!--52118BF1A22A4D84E040007F01005FEC-->  <SEQNO><![CDATA[10]]></SEQNO>
+<!--52118BF1A22A4D84E040007F01005FEC-->  <SEQNO><![CDATA[30]]></SEQNO>
 <!--52118BF1A22A4D84E040007F01005FEC--></AD_TREENODE>
 
 <!--52118BF1A22B4D84E040007F01005FEC--><AD_TREENODE>
@@ -843,7 +843,7 @@
 <!--52118BF1A22C4D84E040007F01005FEC-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--52118BF1A22C4D84E040007F01005FEC-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--52118BF1A22C4D84E040007F01005FEC-->  <PARENT_ID><![CDATA[800244]]></PARENT_ID>
-<!--52118BF1A22C4D84E040007F01005FEC-->  <SEQNO><![CDATA[20]]></SEQNO>
+<!--52118BF1A22C4D84E040007F01005FEC-->  <SEQNO><![CDATA[40]]></SEQNO>
 <!--52118BF1A22C4D84E040007F01005FEC--></AD_TREENODE>
 
 <!--52118BF1A22D4D84E040007F01005FEC--><AD_TREENODE>
@@ -1107,7 +1107,7 @@
 <!--52118BF1A2504D84E040007F01005FEC-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--52118BF1A2504D84E040007F01005FEC-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--52118BF1A2504D84E040007F01005FEC-->  <PARENT_ID><![CDATA[800244]]></PARENT_ID>
-<!--52118BF1A2504D84E040007F01005FEC-->  <SEQNO><![CDATA[30]]></SEQNO>
+<!--52118BF1A2504D84E040007F01005FEC-->  <SEQNO><![CDATA[50]]></SEQNO>
 <!--52118BF1A2504D84E040007F01005FEC--></AD_TREENODE>
 
 <!--52118BF1A2514D84E040007F01005FEC--><AD_TREENODE>
@@ -1833,7 +1833,7 @@
 <!--52118BF1A2B64D84E040007F01005FEC-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--52118BF1A2B64D84E040007F01005FEC-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--52118BF1A2B64D84E040007F01005FEC-->  <PARENT_ID><![CDATA[800244]]></PARENT_ID>
-<!--52118BF1A2B64D84E040007F01005FEC-->  <SEQNO><![CDATA[80]]></SEQNO>
+<!--52118BF1A2B64D84E040007F01005FEC-->  <SEQNO><![CDATA[110]]></SEQNO>
 <!--52118BF1A2B64D84E040007F01005FEC--></AD_TREENODE>
 
 <!--52118BF1A2B84D84E040007F01005FEC--><AD_TREENODE>
@@ -2086,7 +2086,7 @@
 <!--52118BF1A2D64D84E040007F01005FEC-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--52118BF1A2D64D84E040007F01005FEC-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--52118BF1A2D64D84E040007F01005FEC-->  <PARENT_ID><![CDATA[800244]]></PARENT_ID>
-<!--52118BF1A2D64D84E040007F01005FEC-->  <SEQNO><![CDATA[40]]></SEQNO>
+<!--52118BF1A2D64D84E040007F01005FEC-->  <SEQNO><![CDATA[60]]></SEQNO>
 <!--52118BF1A2D64D84E040007F01005FEC--></AD_TREENODE>
 
 <!--52118BF1A2D74D84E040007F01005FEC--><AD_TREENODE>
@@ -2097,7 +2097,7 @@
 <!--52118BF1A2D74D84E040007F01005FEC-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--52118BF1A2D74D84E040007F01005FEC-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--52118BF1A2D74D84E040007F01005FEC-->  <PARENT_ID><![CDATA[800244]]></PARENT_ID>
-<!--52118BF1A2D74D84E040007F01005FEC-->  <SEQNO><![CDATA[50]]></SEQNO>
+<!--52118BF1A2D74D84E040007F01005FEC-->  <SEQNO><![CDATA[70]]></SEQNO>
 <!--52118BF1A2D74D84E040007F01005FEC--></AD_TREENODE>
 
 <!--52118BF1A2D94D84E040007F01005FEC--><AD_TREENODE>
@@ -2196,7 +2196,7 @@
 <!--52118BF1A2E34D84E040007F01005FEC-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--52118BF1A2E34D84E040007F01005FEC-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--52118BF1A2E34D84E040007F01005FEC-->  <PARENT_ID><![CDATA[800243]]></PARENT_ID>
-<!--52118BF1A2E34D84E040007F01005FEC-->  <SEQNO><![CDATA[20]]></SEQNO>
+<!--52118BF1A2E34D84E040007F01005FEC-->  <SEQNO><![CDATA[30]]></SEQNO>
 <!--52118BF1A2E34D84E040007F01005FEC--></AD_TREENODE>
 
 <!--52118BF1A2E44D84E040007F01005FEC--><AD_TREENODE>
@@ -2317,7 +2317,7 @@
 <!--52118BF1A2F34D84E040007F01005FEC-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--52118BF1A2F34D84E040007F01005FEC-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--52118BF1A2F34D84E040007F01005FEC-->  <PARENT_ID><![CDATA[800244]]></PARENT_ID>
-<!--52118BF1A2F34D84E040007F01005FEC-->  <SEQNO><![CDATA[60]]></SEQNO>
+<!--52118BF1A2F34D84E040007F01005FEC-->  <SEQNO><![CDATA[80]]></SEQNO>
 <!--52118BF1A2F34D84E040007F01005FEC--></AD_TREENODE>
 
 <!--52118BF1A2F44D84E040007F01005FEC--><AD_TREENODE>
@@ -3384,7 +3384,7 @@
 <!--52118BF1A3604D84E040007F01005FEC-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--52118BF1A3604D84E040007F01005FEC-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--52118BF1A3604D84E040007F01005FEC-->  <PARENT_ID><![CDATA[800243]]></PARENT_ID>
-<!--52118BF1A3604D84E040007F01005FEC-->  <SEQNO><![CDATA[30]]></SEQNO>
+<!--52118BF1A3604D84E040007F01005FEC-->  <SEQNO><![CDATA[40]]></SEQNO>
 <!--52118BF1A3604D84E040007F01005FEC--></AD_TREENODE>
 
 <!--52118BF1A3614D84E040007F01005FEC--><AD_TREENODE>
@@ -3834,7 +3834,7 @@
 <!--52118BF1A5D24D84E040007F01005FEC-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--52118BF1A5D24D84E040007F01005FEC-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--52118BF1A5D24D84E040007F01005FEC-->  <PARENT_ID><![CDATA[800244]]></PARENT_ID>
-<!--52118BF1A5D24D84E040007F01005FEC-->  <SEQNO><![CDATA[70]]></SEQNO>
+<!--52118BF1A5D24D84E040007F01005FEC-->  <SEQNO><![CDATA[90]]></SEQNO>
 <!--52118BF1A5D24D84E040007F01005FEC--></AD_TREENODE>
 
 <!--52118BF1A5D34D84E040007F01005FEC--><AD_TREENODE>
@@ -4219,7 +4219,7 @@
 <!--CAAE0973314D6706E040007F01003FCE-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--CAAE0973314D6706E040007F01003FCE-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--CAAE0973314D6706E040007F01003FCE-->  <PARENT_ID><![CDATA[800244]]></PARENT_ID>
-<!--CAAE0973314D6706E040007F01003FCE-->  <SEQNO><![CDATA[90]]></SEQNO>
+<!--CAAE0973314D6706E040007F01003FCE-->  <SEQNO><![CDATA[130]]></SEQNO>
 <!--CAAE0973314D6706E040007F01003FCE--></AD_TREENODE>
 
 <!--CB8D7C97A32FBEAEE040007F01000D19--><AD_TREENODE>
@@ -4339,8 +4339,8 @@
 <!--FD0F90C3F8CFD46CE040007F01002D90-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
 <!--FD0F90C3F8CFD46CE040007F01002D90-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--FD0F90C3F8CFD46CE040007F01002D90-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
-<!--FD0F90C3F8CFD46CE040007F01002D90-->  <PARENT_ID><![CDATA[800256]]></PARENT_ID>
-<!--FD0F90C3F8CFD46CE040007F01002D90-->  <SEQNO><![CDATA[70]]></SEQNO>
+<!--FD0F90C3F8CFD46CE040007F01002D90-->  <PARENT_ID><![CDATA[800244]]></PARENT_ID>
+<!--FD0F90C3F8CFD46CE040007F01002D90-->  <SEQNO><![CDATA[150]]></SEQNO>
 <!--FD0F90C3F8CFD46CE040007F01002D90--></AD_TREENODE>
 
 </data>
--- a/src-db/database/sourcedata/AD_VAL_RULE.xml	Tue Nov 18 10:57:35 2014 +0100
+++ b/src-db/database/sourcedata/AD_VAL_RULE.xml	Tue Nov 18 11:03:11 2014 +0100
@@ -1349,7 +1349,7 @@
 <!--299FA667CF374AC5ACC74739C3251134-->  <NAME><![CDATA[C_Tax IsSOTrx]]></NAME>
 <!--299FA667CF374AC5ACC74739C3251134-->  <DESCRIPTION><![CDATA[Validate tax depending on is Sales or Purchase transaction]]></DESCRIPTION>
 <!--299FA667CF374AC5ACC74739C3251134-->  <TYPE><![CDATA[S]]></TYPE>
-<!--299FA667CF374AC5ACC74739C3251134-->  <CODE><![CDATA[(C_TAX.SOPOTYPE =(CASE WHEN @IsSOTrx@ = 'Y' THEN 'S' ELSE 'P' END) OR C_TAX.SOPOTYPE = 'B') AND C_TAX.AD_CLIENT_ID=@AD_CLIENT_ID@ AND C_TAX.C_TAX_ID=(CASE WHEN @IsSOTrx@ = 'Y' AND EXISTS(SELECT 1 FROM AD_ORGINFO WHERE ISTAXUNDEDUCTABLE='Y' AND AD_ORG_ID=@AD_ORG_ID@) THEN (SELECT C_TAX_ID FROM AD_ORGINFO WHERE ISTAXUNDEDUCTABLE='Y' AND AD_ORG_ID=@AD_ORG_ID@) ELSE C_TAX.C_TAX_ID END)]]></CODE>
+<!--299FA667CF374AC5ACC74739C3251134-->  <CODE><![CDATA[(C_TAX.SOPOTYPE =(CASE WHEN @IsSOTrx@ = 'Y' THEN 'S' ELSE 'P' END) OR C_TAX.SOPOTYPE = 'B') AND C_TAX.AD_CLIENT_ID=@AD_CLIENT_ID@ AND AD_ISORGINCLUDED(@AD_ORG_ID@, C_TAX.AD_ORG_ID, @#AD_Client_ID@) <> '-1' AND C_TAX.C_TAXCATEGORY_ID = (SELECT C_TAXCATEGORY_ID FROM M_PRODUCT WHERE M_PRODUCT_ID=@M_PRODUCT_ID@) AND C_TAX.C_TAX_ID=(CASE WHEN @IsSOTrx@ = 'Y' AND EXISTS(SELECT 1 FROM AD_ORGINFO WHERE ISTAXUNDEDUCTABLE='Y' AND AD_ORG_ID=@AD_ORG_ID@) THEN (SELECT C_TAX_ID FROM AD_ORGINFO WHERE ISTAXUNDEDUCTABLE='Y' AND AD_ORG_ID=@AD_ORG_ID@) ELSE C_TAX.C_TAX_ID END)]]></CODE>
 <!--299FA667CF374AC5ACC74739C3251134-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--299FA667CF374AC5ACC74739C3251134--></AD_VAL_RULE>
 
--- a/src-db/database/sourcedata/AD_WINDOW.xml	Tue Nov 18 10:57:35 2014 +0100
+++ b/src-db/database/sourcedata/AD_WINDOW.xml	Tue Nov 18 11:03:11 2014 +0100
@@ -2672,8 +2672,8 @@
 <!--12B062B1031A40EC8067D353B31967EB-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--12B062B1031A40EC8067D353B31967EB-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--12B062B1031A40EC8067D353B31967EB-->  <NAME><![CDATA[Landed Cost Distribution Algorithm]]></NAME>
-<!--12B062B1031A40EC8067D353B31967EB-->  <DESCRIPTION><![CDATA[Master window where available algorithms are defined.]]></DESCRIPTION>
-<!--12B062B1031A40EC8067D353B31967EB-->  <HELP><![CDATA[Master window where available algorithms are defined.]]></HELP>
+<!--12B062B1031A40EC8067D353B31967EB-->  <DESCRIPTION><![CDATA[Master window where available landed cost distribution algorithms are defined.]]></DESCRIPTION>
+<!--12B062B1031A40EC8067D353B31967EB-->  <HELP><![CDATA[Master window where available landed cost distribution algorithms are defined.]]></HELP>
 <!--12B062B1031A40EC8067D353B31967EB-->  <WINDOWTYPE><![CDATA[M]]></WINDOWTYPE>
 <!--12B062B1031A40EC8067D353B31967EB-->  <ISSOTRX><![CDATA[Y]]></ISSOTRX>
 <!--12B062B1031A40EC8067D353B31967EB-->  <PROCESSING><![CDATA[N]]></PROCESSING>
@@ -2689,8 +2689,8 @@
 <!--1688A758BDA04C88A5C1D370EB979C53-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--1688A758BDA04C88A5C1D370EB979C53-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--1688A758BDA04C88A5C1D370EB979C53-->  <NAME><![CDATA[Cost Adjustment]]></NAME>
-<!--1688A758BDA04C88A5C1D370EB979C53-->  <DESCRIPTION><![CDATA[Window where the Cost Adjustment generated by any of the adjustment processes can be reviewed.]]></DESCRIPTION>
-<!--1688A758BDA04C88A5C1D370EB979C53-->  <HELP><![CDATA[Window where the Cost Adjustment generated by any of the adjustment processes can be reviewed.]]></HELP>
+<!--1688A758BDA04C88A5C1D370EB979C53-->  <DESCRIPTION><![CDATA[Cost Adjustment window allows to review product transaction's cost adjustments caused by changes in purchase prices, landed cost allocation or manual/negative cost corrections.]]></DESCRIPTION>
+<!--1688A758BDA04C88A5C1D370EB979C53-->  <HELP><![CDATA[Cost Adjustment window allows to review product transaction's cost adjustments caused by changes in purchase prices, landed cost allocation or manual/negative cost corrections.]]></HELP>
 <!--1688A758BDA04C88A5C1D370EB979C53-->  <WINDOWTYPE><![CDATA[T]]></WINDOWTYPE>
 <!--1688A758BDA04C88A5C1D370EB979C53-->  <ISSOTRX><![CDATA[Y]]></ISSOTRX>
 <!--1688A758BDA04C88A5C1D370EB979C53-->  <PROCESSING><![CDATA[N]]></PROCESSING>
@@ -3075,8 +3075,8 @@
 <!--944C49CE80BE4F71B9917BD680A052A8-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--944C49CE80BE4F71B9917BD680A052A8-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--944C49CE80BE4F71B9917BD680A052A8-->  <NAME><![CDATA[Landed Cost Type]]></NAME>
-<!--944C49CE80BE4F71B9917BD680A052A8-->  <DESCRIPTION><![CDATA[Defines the different types or concepts of the Landed Costs that are assigned to the Receipts.]]></DESCRIPTION>
-<!--944C49CE80BE4F71B9917BD680A052A8-->  <HELP><![CDATA[Defines the different types or concepts of the Landed Costs that are assigned to the Receipts.]]></HELP>
+<!--944C49CE80BE4F71B9917BD680A052A8-->  <DESCRIPTION><![CDATA[Landed Cost Types window allows to define different types of Landed Costs that can be assigned to Goods Receipts and therefore allocated to the products included in the receipts.]]></DESCRIPTION>
+<!--944C49CE80BE4F71B9917BD680A052A8-->  <HELP><![CDATA[Landed Cost Types window allows to define different types of Landed Costs that can be assigned to Goods Receipts and therefore allocated to the products included in the receipts.]]></HELP>
 <!--944C49CE80BE4F71B9917BD680A052A8-->  <WINDOWTYPE><![CDATA[M]]></WINDOWTYPE>
 <!--944C49CE80BE4F71B9917BD680A052A8-->  <ISSOTRX><![CDATA[Y]]></ISSOTRX>
 <!--944C49CE80BE4F71B9917BD680A052A8-->  <PROCESSING><![CDATA[N]]></PROCESSING>
@@ -3300,9 +3300,9 @@
 <!--D1B11CBC0FEF4CA0B44D3BECEBA219BC-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--D1B11CBC0FEF4CA0B44D3BECEBA219BC-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--D1B11CBC0FEF4CA0B44D3BECEBA219BC-->  <NAME><![CDATA[Landed Cost]]></NAME>
-<!--D1B11CBC0FEF4CA0B44D3BECEBA219BC-->  <DESCRIPTION><![CDATA[Landed cost window allows to create, edit and process a landed cost]]></DESCRIPTION>
-<!--D1B11CBC0FEF4CA0B44D3BECEBA219BC-->  <HELP><![CDATA[Landed cost window allows to create, edit and process a landed cost]]></HELP>
-<!--D1B11CBC0FEF4CA0B44D3BECEBA219BC-->  <WINDOWTYPE><![CDATA[M]]></WINDOWTYPE>
+<!--D1B11CBC0FEF4CA0B44D3BECEBA219BC-->  <DESCRIPTION><![CDATA[Landed Cost window allows to allocate additional costs such as freight, insurance or duties to goods receipt(s) therefore the cost of the products included in the receipt(s) is adjusted as applicable.]]></DESCRIPTION>
+<!--D1B11CBC0FEF4CA0B44D3BECEBA219BC-->  <HELP><![CDATA[Landed Cost window allows to allocate additional costs such as freight, insurance or duties to goods receipt(s) therefore the cost of the products included in the receipt(s) is adjusted as applicable.]]></HELP>
+<!--D1B11CBC0FEF4CA0B44D3BECEBA219BC-->  <WINDOWTYPE><![CDATA[T]]></WINDOWTYPE>
 <!--D1B11CBC0FEF4CA0B44D3BECEBA219BC-->  <ISSOTRX><![CDATA[N]]></ISSOTRX>
 <!--D1B11CBC0FEF4CA0B44D3BECEBA219BC-->  <PROCESSING><![CDATA[N]]></PROCESSING>
 <!--D1B11CBC0FEF4CA0B44D3BECEBA219BC-->  <ISDEFAULT><![CDATA[N]]></ISDEFAULT>
@@ -3417,12 +3417,8 @@
 <!--E7754848A0314B018B37C1428ECB4D21-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--E7754848A0314B018B37C1428ECB4D21-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--E7754848A0314B018B37C1428ECB4D21-->  <NAME><![CDATA[Inventory Amount Update]]></NAME>
-<!--E7754848A0314B018B37C1428ECB4D21-->  <DESCRIPTION><![CDATA[Inventory Amount Update window genereate closing and opening inventories, generate a cost adjustment and set all transactions prior to the reference date as permanently adjusted]]></DESCRIPTION>
-<!--E7754848A0314B018B37C1428ECB4D21-->  <HELP><![CDATA[Generates 2 closing/opening inventories.
-Closing inventory cost is the inventory amount on that moment. The costing background should be disabled during this process to avoid being it calculated as usual.
-Opening inventory cost is the desired amount (average).
-Generates a Cost Adjustment Document so the cost is adjusted to the reference date in case this is a different date than the current one.
-Sets all transactions prior to the reference date as permanently adjusted]]></HELP>
+<!--E7754848A0314B018B37C1428ECB4D21-->  <DESCRIPTION><![CDATA[Inventory Amount Update window allows to change either current inventory amount or current unit cost of products in stock at a given reference date.]]></DESCRIPTION>
+<!--E7754848A0314B018B37C1428ECB4D21-->  <HELP><![CDATA[Inventory Amount Update window allows to change either current inventory amount or current unit cost of products in stock at a given reference date.]]></HELP>
 <!--E7754848A0314B018B37C1428ECB4D21-->  <WINDOWTYPE><![CDATA[M]]></WINDOWTYPE>
 <!--E7754848A0314B018B37C1428ECB4D21-->  <ISSOTRX><![CDATA[Y]]></ISSOTRX>
 <!--E7754848A0314B018B37C1428ECB4D21-->  <PROCESSING><![CDATA[N]]></PROCESSING>
--- a/src-db/database/sourcedata/OBUISEL_SELECTOR.xml	Tue Nov 18 10:57:35 2014 +0100
+++ b/src-db/database/sourcedata/OBUISEL_SELECTOR.xml	Tue Nov 18 11:03:11 2014 +0100
@@ -48,7 +48,7 @@
 <!--0E1E9236E2FE471FB946F8DA2803C537-->  <OBCLKER_TEMPLATE_ID><![CDATA[9314DE8599AD44E7BFC4CC50699042AB]]></OBCLKER_TEMPLATE_ID>
 <!--0E1E9236E2FE471FB946F8DA2803C537-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--0E1E9236E2FE471FB946F8DA2803C537-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[substring]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--0E1E9236E2FE471FB946F8DA2803C537-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--0E1E9236E2FE471FB946F8DA2803C537-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--0E1E9236E2FE471FB946F8DA2803C537-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--0E1E9236E2FE471FB946F8DA2803C537--></OBUISEL_SELECTOR>
 
@@ -64,7 +64,7 @@
 <!--121CCCD7F670457A9FF815163F11A61F-->  <OBCLKER_TEMPLATE_ID><![CDATA[9314DE8599AD44E7BFC4CC50699042AB]]></OBCLKER_TEMPLATE_ID>
 <!--121CCCD7F670457A9FF815163F11A61F-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--121CCCD7F670457A9FF815163F11A61F-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[startsWith]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--121CCCD7F670457A9FF815163F11A61F-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--121CCCD7F670457A9FF815163F11A61F-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--121CCCD7F670457A9FF815163F11A61F-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--121CCCD7F670457A9FF815163F11A61F--></OBUISEL_SELECTOR>
 
@@ -80,7 +80,7 @@
 <!--1E14C66616444E0DA8D5C5321EC9F61B-->  <OBCLKER_TEMPLATE_ID><![CDATA[9314DE8599AD44E7BFC4CC50699042AB]]></OBCLKER_TEMPLATE_ID>
 <!--1E14C66616444E0DA8D5C5321EC9F61B-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--1E14C66616444E0DA8D5C5321EC9F61B-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[startsWith]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--1E14C66616444E0DA8D5C5321EC9F61B-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--1E14C66616444E0DA8D5C5321EC9F61B-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--1E14C66616444E0DA8D5C5321EC9F61B-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--1E14C66616444E0DA8D5C5321EC9F61B--></OBUISEL_SELECTOR>
 
@@ -97,7 +97,7 @@
 <!--1F051395F1CC4A40ADFE5C440EBCAA7F-->  <OBCLKER_TEMPLATE_ID><![CDATA[9314DE8599AD44E7BFC4CC50699042AB]]></OBCLKER_TEMPLATE_ID>
 <!--1F051395F1CC4A40ADFE5C440EBCAA7F-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--1F051395F1CC4A40ADFE5C440EBCAA7F-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[startsWith]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--1F051395F1CC4A40ADFE5C440EBCAA7F-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--1F051395F1CC4A40ADFE5C440EBCAA7F-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--1F051395F1CC4A40ADFE5C440EBCAA7F-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--1F051395F1CC4A40ADFE5C440EBCAA7F--></OBUISEL_SELECTOR>
 
@@ -112,7 +112,7 @@
 <!--1F1889DC41AD41D596A046091B4EFA81-->  <OBCLKER_TEMPLATE_ID><![CDATA[9314DE8599AD44E7BFC4CC50699042AB]]></OBCLKER_TEMPLATE_ID>
 <!--1F1889DC41AD41D596A046091B4EFA81-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--1F1889DC41AD41D596A046091B4EFA81-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[startsWith]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--1F1889DC41AD41D596A046091B4EFA81-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--1F1889DC41AD41D596A046091B4EFA81-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--1F1889DC41AD41D596A046091B4EFA81-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--1F1889DC41AD41D596A046091B4EFA81--></OBUISEL_SELECTOR>
 
@@ -181,7 +181,7 @@
 <!--2E64F551C7C4470C80C29DBA24B34A5F-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--2E64F551C7C4470C80C29DBA24B34A5F-->  <VALUEFIELD_ID><![CDATA[2CB91FE062B541ACB00D82AC69858446]]></VALUEFIELD_ID>
 <!--2E64F551C7C4470C80C29DBA24B34A5F-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[substring]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--2E64F551C7C4470C80C29DBA24B34A5F-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--2E64F551C7C4470C80C29DBA24B34A5F-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--2E64F551C7C4470C80C29DBA24B34A5F-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--2E64F551C7C4470C80C29DBA24B34A5F--></OBUISEL_SELECTOR>
 
@@ -197,7 +197,7 @@
 <!--32CFC9EB6DD04FACA7452C20C39116F0-->  <OBCLKER_TEMPLATE_ID><![CDATA[9314DE8599AD44E7BFC4CC50699042AB]]></OBCLKER_TEMPLATE_ID>
 <!--32CFC9EB6DD04FACA7452C20C39116F0-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--32CFC9EB6DD04FACA7452C20C39116F0-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[substring]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--32CFC9EB6DD04FACA7452C20C39116F0-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--32CFC9EB6DD04FACA7452C20C39116F0-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--32CFC9EB6DD04FACA7452C20C39116F0-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--32CFC9EB6DD04FACA7452C20C39116F0--></OBUISEL_SELECTOR>
 
@@ -212,7 +212,7 @@
 <!--3E93B5BA717D4596BA41B843AFFB903C-->  <OBCLKER_TEMPLATE_ID><![CDATA[C1FD42039C804705B8E5012E4553433C]]></OBCLKER_TEMPLATE_ID>
 <!--3E93B5BA717D4596BA41B843AFFB903C-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--3E93B5BA717D4596BA41B843AFFB903C-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[startsWith]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--3E93B5BA717D4596BA41B843AFFB903C-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--3E93B5BA717D4596BA41B843AFFB903C-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--3E93B5BA717D4596BA41B843AFFB903C-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--3E93B5BA717D4596BA41B843AFFB903C--></OBUISEL_SELECTOR>
 
@@ -227,7 +227,7 @@
 <!--3E9E206575F94F579BAE65C1C929E3E0-->  <OBCLKER_TEMPLATE_ID><![CDATA[9314DE8599AD44E7BFC4CC50699042AB]]></OBCLKER_TEMPLATE_ID>
 <!--3E9E206575F94F579BAE65C1C929E3E0-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--3E9E206575F94F579BAE65C1C929E3E0-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[startsWith]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--3E9E206575F94F579BAE65C1C929E3E0-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--3E9E206575F94F579BAE65C1C929E3E0-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--3E9E206575F94F579BAE65C1C929E3E0-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--3E9E206575F94F579BAE65C1C929E3E0--></OBUISEL_SELECTOR>
 
@@ -244,7 +244,7 @@
 <!--3F43145FED1B4EC08A4797BFCB4F1C6D-->  <OBCLKER_TEMPLATE_ID><![CDATA[9314DE8599AD44E7BFC4CC50699042AB]]></OBCLKER_TEMPLATE_ID>
 <!--3F43145FED1B4EC08A4797BFCB4F1C6D-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--3F43145FED1B4EC08A4797BFCB4F1C6D-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[startsWith]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--3F43145FED1B4EC08A4797BFCB4F1C6D-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--3F43145FED1B4EC08A4797BFCB4F1C6D-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--3F43145FED1B4EC08A4797BFCB4F1C6D-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--3F43145FED1B4EC08A4797BFCB4F1C6D--></OBUISEL_SELECTOR>
 
@@ -261,7 +261,7 @@
 <!--4028E61131FB4B1B0131FB5307F1000C-->  <VALUEFIELD_ID><![CDATA[4028E61131FB4B1B0131FB5711430042]]></VALUEFIELD_ID>
 <!--4028E61131FB4B1B0131FB5307F1000C-->  <DISPLAYFIELD_ID><![CDATA[4028E61131FB4B1B0131FB5625760036]]></DISPLAYFIELD_ID>
 <!--4028E61131FB4B1B0131FB5307F1000C-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[substring]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--4028E61131FB4B1B0131FB5307F1000C-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--4028E61131FB4B1B0131FB5307F1000C-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--4028E61131FB4B1B0131FB5307F1000C-->  <HQL><![CDATA[SELECT distinct bp.name as name,bp.id as bpid, bp.searchKey as value,
    bp.creditLimit - bp.creditUsed as creditAvailable, bp.creditUsed as creditUsed,
    COALESCE(contact.name, usercontact.name) as contactname, COALESCE(contact.id, usercontact.id) as contactid,
@@ -290,7 +290,7 @@
 <!--45825E189BCB47B497709849EBF61AA7-->  <OBCLKER_TEMPLATE_ID><![CDATA[9314DE8599AD44E7BFC4CC50699042AB]]></OBCLKER_TEMPLATE_ID>
 <!--45825E189BCB47B497709849EBF61AA7-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--45825E189BCB47B497709849EBF61AA7-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[startsWith]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--45825E189BCB47B497709849EBF61AA7-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--45825E189BCB47B497709849EBF61AA7-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--45825E189BCB47B497709849EBF61AA7-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--45825E189BCB47B497709849EBF61AA7--></OBUISEL_SELECTOR>
 
@@ -308,7 +308,7 @@
 <!--4C8BC3E8E56441F4B8C98C684A0C9212-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--4C8BC3E8E56441F4B8C98C684A0C9212-->  <VALUEFIELD_ID><![CDATA[D5CD42F686A14DFA949052B99900D679]]></VALUEFIELD_ID>
 <!--4C8BC3E8E56441F4B8C98C684A0C9212-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[substring]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--4C8BC3E8E56441F4B8C98C684A0C9212-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--4C8BC3E8E56441F4B8C98C684A0C9212-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--4C8BC3E8E56441F4B8C98C684A0C9212-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--4C8BC3E8E56441F4B8C98C684A0C9212--></OBUISEL_SELECTOR>
 
@@ -326,7 +326,7 @@
 <!--518C9A856274423AB19490CA145AE139-->  <VALUEFIELD_ID><![CDATA[D313500687424563ABC3782E70F2F73B]]></VALUEFIELD_ID>
 <!--518C9A856274423AB19490CA145AE139-->  <DISPLAYFIELD_ID><![CDATA[BD59EB3C7F684361B4408CACE67910E9]]></DISPLAYFIELD_ID>
 <!--518C9A856274423AB19490CA145AE139-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[startsWith]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--518C9A856274423AB19490CA145AE139-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--518C9A856274423AB19490CA145AE139-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--518C9A856274423AB19490CA145AE139-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--518C9A856274423AB19490CA145AE139--></OBUISEL_SELECTOR>
 
@@ -360,7 +360,7 @@
 <!--632F319DE1564495B3B5D710127DA6DC-->  <OBCLKER_TEMPLATE_ID><![CDATA[9314DE8599AD44E7BFC4CC50699042AB]]></OBCLKER_TEMPLATE_ID>
 <!--632F319DE1564495B3B5D710127DA6DC-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--632F319DE1564495B3B5D710127DA6DC-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[startsWith]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--632F319DE1564495B3B5D710127DA6DC-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--632F319DE1564495B3B5D710127DA6DC-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--632F319DE1564495B3B5D710127DA6DC-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--632F319DE1564495B3B5D710127DA6DC--></OBUISEL_SELECTOR>
 
@@ -375,7 +375,7 @@
 <!--720AAD2B1552455582E5D15103F59923-->  <OBCLKER_TEMPLATE_ID><![CDATA[9314DE8599AD44E7BFC4CC50699042AB]]></OBCLKER_TEMPLATE_ID>
 <!--720AAD2B1552455582E5D15103F59923-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--720AAD2B1552455582E5D15103F59923-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[startsWith]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--720AAD2B1552455582E5D15103F59923-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--720AAD2B1552455582E5D15103F59923-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--720AAD2B1552455582E5D15103F59923-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--720AAD2B1552455582E5D15103F59923--></OBUISEL_SELECTOR>
 
@@ -394,7 +394,7 @@
 <!--7809A075DD5C40A598FA80D7BEE70BCE-->  <OBCLKER_TEMPLATE_ID><![CDATA[9314DE8599AD44E7BFC4CC50699042AB]]></OBCLKER_TEMPLATE_ID>
 <!--7809A075DD5C40A598FA80D7BEE70BCE-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--7809A075DD5C40A598FA80D7BEE70BCE-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[substring]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--7809A075DD5C40A598FA80D7BEE70BCE-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--7809A075DD5C40A598FA80D7BEE70BCE-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--7809A075DD5C40A598FA80D7BEE70BCE-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--7809A075DD5C40A598FA80D7BEE70BCE--></OBUISEL_SELECTOR>
 
@@ -411,7 +411,7 @@
 <!--7B07F521E4804C89B7956E584989CC16-->  <OBCLKER_TEMPLATE_ID><![CDATA[9314DE8599AD44E7BFC4CC50699042AB]]></OBCLKER_TEMPLATE_ID>
 <!--7B07F521E4804C89B7956E584989CC16-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--7B07F521E4804C89B7956E584989CC16-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[substring]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--7B07F521E4804C89B7956E584989CC16-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--7B07F521E4804C89B7956E584989CC16-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--7B07F521E4804C89B7956E584989CC16-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--7B07F521E4804C89B7956E584989CC16--></OBUISEL_SELECTOR>
 
@@ -446,7 +446,7 @@
 <!--862F54CB1B074513BD791C6789F4AA42-->  <VALUEFIELD_ID><![CDATA[B103893820FC4080809A97FABD49D8AF]]></VALUEFIELD_ID>
 <!--862F54CB1B074513BD791C6789F4AA42-->  <DISPLAYFIELD_ID><![CDATA[9835921A3AA54B8D8D0126B3696F8354]]></DISPLAYFIELD_ID>
 <!--862F54CB1B074513BD791C6789F4AA42-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[substring]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--862F54CB1B074513BD791C6789F4AA42-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--862F54CB1B074513BD791C6789F4AA42-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--862F54CB1B074513BD791C6789F4AA42-->  <HQL><![CDATA[SELECT bp.name as name,bp.id as bpid, bp.searchKey as value,
    bp.creditLimit - bp.creditUsed as creditAvailable, bp.creditUsed as creditUsed,
    bp.customer as customer, bp.vendor as vendor, 
@@ -470,7 +470,7 @@
 <!--9F883550D23F4DB18B3FD9DE9E03999B-->  <OBCLKER_TEMPLATE_ID><![CDATA[9314DE8599AD44E7BFC4CC50699042AB]]></OBCLKER_TEMPLATE_ID>
 <!--9F883550D23F4DB18B3FD9DE9E03999B-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--9F883550D23F4DB18B3FD9DE9E03999B-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[startsWith]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--9F883550D23F4DB18B3FD9DE9E03999B-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--9F883550D23F4DB18B3FD9DE9E03999B-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--9F883550D23F4DB18B3FD9DE9E03999B-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--9F883550D23F4DB18B3FD9DE9E03999B--></OBUISEL_SELECTOR>
 
@@ -520,7 +520,7 @@
 <!--A25A4A49D65D4460BBDC38EF78F28C09-->  <OBCLKER_TEMPLATE_ID><![CDATA[C1FD42039C804705B8E5012E4553433C]]></OBCLKER_TEMPLATE_ID>
 <!--A25A4A49D65D4460BBDC38EF78F28C09-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--A25A4A49D65D4460BBDC38EF78F28C09-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[startsWith]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--A25A4A49D65D4460BBDC38EF78F28C09-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--A25A4A49D65D4460BBDC38EF78F28C09-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--A25A4A49D65D4460BBDC38EF78F28C09-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--A25A4A49D65D4460BBDC38EF78F28C09--></OBUISEL_SELECTOR>
 
@@ -536,7 +536,7 @@
 <!--A35B6EC33A2243018915908AEB1B3F5E-->  <OBCLKER_TEMPLATE_ID><![CDATA[9314DE8599AD44E7BFC4CC50699042AB]]></OBCLKER_TEMPLATE_ID>
 <!--A35B6EC33A2243018915908AEB1B3F5E-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--A35B6EC33A2243018915908AEB1B3F5E-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[substring]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--A35B6EC33A2243018915908AEB1B3F5E-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--A35B6EC33A2243018915908AEB1B3F5E-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--A35B6EC33A2243018915908AEB1B3F5E-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--A35B6EC33A2243018915908AEB1B3F5E--></OBUISEL_SELECTOR>
 
@@ -552,7 +552,7 @@
 <!--A48B1462EE7F4C109F06564E0B4677A8-->  <OBCLKER_TEMPLATE_ID><![CDATA[9314DE8599AD44E7BFC4CC50699042AB]]></OBCLKER_TEMPLATE_ID>
 <!--A48B1462EE7F4C109F06564E0B4677A8-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--A48B1462EE7F4C109F06564E0B4677A8-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[startsWith]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--A48B1462EE7F4C109F06564E0B4677A8-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--A48B1462EE7F4C109F06564E0B4677A8-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--A48B1462EE7F4C109F06564E0B4677A8-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--A48B1462EE7F4C109F06564E0B4677A8--></OBUISEL_SELECTOR>
 
@@ -568,7 +568,7 @@
 <!--B06B003BD6E34FDDAF5DFD5A9ECD14E2-->  <OBCLKER_TEMPLATE_ID><![CDATA[9314DE8599AD44E7BFC4CC50699042AB]]></OBCLKER_TEMPLATE_ID>
 <!--B06B003BD6E34FDDAF5DFD5A9ECD14E2-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--B06B003BD6E34FDDAF5DFD5A9ECD14E2-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[startsWith]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--B06B003BD6E34FDDAF5DFD5A9ECD14E2-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--B06B003BD6E34FDDAF5DFD5A9ECD14E2-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--B06B003BD6E34FDDAF5DFD5A9ECD14E2-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--B06B003BD6E34FDDAF5DFD5A9ECD14E2--></OBUISEL_SELECTOR>
 
@@ -583,7 +583,7 @@
 <!--B2D8976FFFDB45428C3A9F0CDA7AD5C0-->  <OBCLKER_TEMPLATE_ID><![CDATA[9314DE8599AD44E7BFC4CC50699042AB]]></OBCLKER_TEMPLATE_ID>
 <!--B2D8976FFFDB45428C3A9F0CDA7AD5C0-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--B2D8976FFFDB45428C3A9F0CDA7AD5C0-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[startsWith]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--B2D8976FFFDB45428C3A9F0CDA7AD5C0-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--B2D8976FFFDB45428C3A9F0CDA7AD5C0-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--B2D8976FFFDB45428C3A9F0CDA7AD5C0-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--B2D8976FFFDB45428C3A9F0CDA7AD5C0--></OBUISEL_SELECTOR>
 
@@ -653,7 +653,7 @@
 <!--B9E2C11BDA924BF8ADF019BA15A11153-->  <OBCLKER_TEMPLATE_ID><![CDATA[9314DE8599AD44E7BFC4CC50699042AB]]></OBCLKER_TEMPLATE_ID>
 <!--B9E2C11BDA924BF8ADF019BA15A11153-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--B9E2C11BDA924BF8ADF019BA15A11153-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[startsWith]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--B9E2C11BDA924BF8ADF019BA15A11153-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--B9E2C11BDA924BF8ADF019BA15A11153-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--B9E2C11BDA924BF8ADF019BA15A11153-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--B9E2C11BDA924BF8ADF019BA15A11153--></OBUISEL_SELECTOR>
 
@@ -705,7 +705,7 @@
 <!--D47A3616483E46C18A09794B9B276B37-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--D47A3616483E46C18A09794B9B276B37-->  <VALUEFIELD_ID><![CDATA[2CB91FE062B541ACB00D82AC69858446]]></VALUEFIELD_ID>
 <!--D47A3616483E46C18A09794B9B276B37-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[substring]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--D47A3616483E46C18A09794B9B276B37-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--D47A3616483E46C18A09794B9B276B37-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--D47A3616483E46C18A09794B9B276B37-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--D47A3616483E46C18A09794B9B276B37--></OBUISEL_SELECTOR>
 
@@ -720,7 +720,7 @@
 <!--D4F428CFB0FD42A6998BF377BA4212AB-->  <OBCLKER_TEMPLATE_ID><![CDATA[9314DE8599AD44E7BFC4CC50699042AB]]></OBCLKER_TEMPLATE_ID>
 <!--D4F428CFB0FD42A6998BF377BA4212AB-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--D4F428CFB0FD42A6998BF377BA4212AB-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[startsWith]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--D4F428CFB0FD42A6998BF377BA4212AB-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--D4F428CFB0FD42A6998BF377BA4212AB-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--D4F428CFB0FD42A6998BF377BA4212AB-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--D4F428CFB0FD42A6998BF377BA4212AB--></OBUISEL_SELECTOR>
 
@@ -786,7 +786,7 @@
 <!--DE9CFEFB6F49404995BE8B0FBF3F7F9E-->  <OBCLKER_TEMPLATE_ID><![CDATA[9314DE8599AD44E7BFC4CC50699042AB]]></OBCLKER_TEMPLATE_ID>
 <!--DE9CFEFB6F49404995BE8B0FBF3F7F9E-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--DE9CFEFB6F49404995BE8B0FBF3F7F9E-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[startsWith]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--DE9CFEFB6F49404995BE8B0FBF3F7F9E-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--DE9CFEFB6F49404995BE8B0FBF3F7F9E-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--DE9CFEFB6F49404995BE8B0FBF3F7F9E-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--DE9CFEFB6F49404995BE8B0FBF3F7F9E--></OBUISEL_SELECTOR>
 
@@ -817,7 +817,7 @@
 <!--E1F081829D324B20B7214E7018B589C4-->  <OBCLKER_TEMPLATE_ID><![CDATA[9314DE8599AD44E7BFC4CC50699042AB]]></OBCLKER_TEMPLATE_ID>
 <!--E1F081829D324B20B7214E7018B589C4-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--E1F081829D324B20B7214E7018B589C4-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[startsWith]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--E1F081829D324B20B7214E7018B589C4-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--E1F081829D324B20B7214E7018B589C4-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--E1F081829D324B20B7214E7018B589C4-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--E1F081829D324B20B7214E7018B589C4--></OBUISEL_SELECTOR>
 
@@ -835,7 +835,7 @@
 <!--E65052A724B3451CA643A0CC355CEA40-->  <OBCLKER_TEMPLATE_ID><![CDATA[9314DE8599AD44E7BFC4CC50699042AB]]></OBCLKER_TEMPLATE_ID>
 <!--E65052A724B3451CA643A0CC355CEA40-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--E65052A724B3451CA643A0CC355CEA40-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[startsWith]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--E65052A724B3451CA643A0CC355CEA40-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--E65052A724B3451CA643A0CC355CEA40-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--E65052A724B3451CA643A0CC355CEA40-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--E65052A724B3451CA643A0CC355CEA40--></OBUISEL_SELECTOR>
 
@@ -853,7 +853,7 @@
 <!--EB3C41F0973A4EDA91E475833792A6D4-->  <VALUEFIELD_ID><![CDATA[EDADAD64A1634FDEA50343CE1AAAF1FB]]></VALUEFIELD_ID>
 <!--EB3C41F0973A4EDA91E475833792A6D4-->  <DISPLAYFIELD_ID><![CDATA[797E2E6C7A6D4A349491B85A1C1ACB7D]]></DISPLAYFIELD_ID>
 <!--EB3C41F0973A4EDA91E475833792A6D4-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[substring]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--EB3C41F0973A4EDA91E475833792A6D4-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--EB3C41F0973A4EDA91E475833792A6D4-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--EB3C41F0973A4EDA91E475833792A6D4-->  <HQL><![CDATA[select e.searchKey as searchKey, e.id as id, plv as priceListVersion, plv.name as priceListVersionName, c.id as currency, pp.priceLimit as priceLimit, e.name as productName, e.uOM as uOM, pp.standardPrice as standardPrice, pp.listPrice as netListPrice, pl.salesPriceList as salesPriceList, e.characteristicDescription as chDescription, gp.name as genericProduct
 from PricingProductPrice pp
 join pp.product e
@@ -865,7 +865,7 @@
 and e.active = 'Y'
 and plv.active = 'Y'
   and @additional_filters@]]></HQL>
-<!--EB3C41F0973A4EDA91E475833792A6D4-->  <ENTITY_ALIAS><![CDATA[pp]]></ENTITY_ALIAS>
+<!--EB3C41F0973A4EDA91E475833792A6D4-->  <ENTITY_ALIAS><![CDATA[e]]></ENTITY_ALIAS>
 <!--EB3C41F0973A4EDA91E475833792A6D4-->  <CUSTOM_QUERY><![CDATA[Y]]></CUSTOM_QUERY>
 <!--EB3C41F0973A4EDA91E475833792A6D4--></OBUISEL_SELECTOR>
 
@@ -912,7 +912,7 @@
 <!--F132874BE0954A9B8C1301BE20704730-->  <VALUEFIELD_ID><![CDATA[38075EEC36C24E3CAB44D1B33D2CE637]]></VALUEFIELD_ID>
 <!--F132874BE0954A9B8C1301BE20704730-->  <DISPLAYFIELD_ID><![CDATA[7CA7330BA4864D2FB1FED44CDB88A622]]></DISPLAYFIELD_ID>
 <!--F132874BE0954A9B8C1301BE20704730-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[substring]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--F132874BE0954A9B8C1301BE20704730-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--F132874BE0954A9B8C1301BE20704730-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--F132874BE0954A9B8C1301BE20704730-->  <HQL><![CDATA[SELECT distinct bp.name as name,bp.id as bpid, bp.searchKey as value,
    bp.creditLimit - bp.creditUsed as creditAvailable, bp.creditUsed as creditUsed,
    COALESCE(contact.name, usercontact.name) as contactname, COALESCE(contact.id, usercontact.id) as contactid,
@@ -941,7 +941,7 @@
 <!--F26A0C81FAD3456D8FC8656DB7B4A001-->  <OBCLKER_TEMPLATE_ID><![CDATA[9314DE8599AD44E7BFC4CC50699042AB]]></OBCLKER_TEMPLATE_ID>
 <!--F26A0C81FAD3456D8FC8656DB7B4A001-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--F26A0C81FAD3456D8FC8656DB7B4A001-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[startsWith]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--F26A0C81FAD3456D8FC8656DB7B4A001-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--F26A0C81FAD3456D8FC8656DB7B4A001-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--F26A0C81FAD3456D8FC8656DB7B4A001-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--F26A0C81FAD3456D8FC8656DB7B4A001--></OBUISEL_SELECTOR>
 
@@ -957,7 +957,7 @@
 <!--F3CDEE79343F4746A2FEE8C60EBEC0BF-->  <OBCLKER_TEMPLATE_ID><![CDATA[9314DE8599AD44E7BFC4CC50699042AB]]></OBCLKER_TEMPLATE_ID>
 <!--F3CDEE79343F4746A2FEE8C60EBEC0BF-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--F3CDEE79343F4746A2FEE8C60EBEC0BF-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[startsWith]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--F3CDEE79343F4746A2FEE8C60EBEC0BF-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--F3CDEE79343F4746A2FEE8C60EBEC0BF-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--F3CDEE79343F4746A2FEE8C60EBEC0BF-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--F3CDEE79343F4746A2FEE8C60EBEC0BF--></OBUISEL_SELECTOR>
 
--- a/src-test/src/org/openbravo/test/AllWebserviceTests.java	Tue Nov 18 10:57:35 2014 +0100
+++ b/src-test/src/org/openbravo/test/AllWebserviceTests.java	Tue Nov 18 11:03:11 2014 +0100
@@ -21,6 +21,7 @@
 
 import org.junit.runner.RunWith;
 import org.junit.runners.Suite;
+import org.openbravo.test.datasource.FKDropDownDatasource;
 import org.openbravo.test.datasource.ProductSelectorDataSourceTest;
 import org.openbravo.test.datasource.SelectorFieldPropertySelectorDSTest;
 import org.openbravo.test.datasource.TestCSVEncoding;
@@ -46,6 +47,7 @@
     TestCSVEncoding.class, //
     SelectorFieldPropertySelectorDSTest.class, //
     ProductSelectorDataSourceTest.class, //
-    TestComboDatasource.class })
+    TestComboDatasource.class, //
+    FKDropDownDatasource.class })
 public class AllWebserviceTests {
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src-test/src/org/openbravo/test/datasource/FKDropDownDatasource.java	Tue Nov 18 11:03:11 2014 +0100
@@ -0,0 +1,61 @@
+/*
+ *************************************************************************
+ * The contents of this file are subject to the Openbravo  Public  License
+ * Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
+ * Version 1.1  with a permitted attribution clause; you may not  use this
+ * file except in compliance with the License. You  may  obtain  a copy of
+ * the License at http://www.openbravo.com/legal/license.html 
+ * Software distributed under the License  is  distributed  on  an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ * License for the specific  language  governing  rights  and  limitations
+ * under the License. 
+ * The Original Code is Openbravo ERP. 
+ * The Initial Developer of the Original Code is Openbravo SLU 
+ * All portions are Copyright (C) 2014 Openbravo SLU 
+ * All Rights Reserved. 
+ * Contributor(s):  ______________________________________.
+ ************************************************************************
+ */
+
+package org.openbravo.test.datasource;
+
+import static org.hamcrest.Matchers.greaterThan;
+import static org.hamcrest.Matchers.is;
+import static org.junit.Assert.assertThat;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.codehaus.jettison.json.JSONObject;
+import org.junit.Test;
+
+/**
+ * Test cases to check behavior of FK filter drop downs
+ * 
+ * @author alostale
+ *
+ */
+public class FKDropDownDatasource extends BaseDataSourceTestNoDal {
+
+  /**
+   * Drop down FK filter in Organization dataset is a special case because org filtering must be
+   * done in the base entity.
+   * 
+   * See issue 28085
+   */
+  @Test
+  public void filterFKInOrganization() throws Exception {
+    Map<String, String> params = new HashMap<String, String>();
+
+    params.put("tabId", "143");
+    params.put("_distinct", "organizationType");
+    params.put("_operationType", "fetch");
+    params.put("_startRow", "0");
+    params.put("_endRow", "75");
+    JSONObject resp = new JSONObject(doRequest("/org.openbravo.service.datasource/Organization",
+        params, 200, "POST")).getJSONObject("response");
+
+    assertThat("response status", resp.getInt("status"), is(0));
+    assertThat("number of rows", resp.getInt("totalRows"), greaterThan(0));
+  }
+}
--- a/src-test/src/org/openbravo/test/datasource/TestComboDatasource.java	Tue Nov 18 10:57:35 2014 +0100
+++ b/src-test/src/org/openbravo/test/datasource/TestComboDatasource.java	Tue Nov 18 11:03:11 2014 +0100
@@ -24,9 +24,11 @@
  * @author Shankar Balachandran 
  */
 
+import static org.hamcrest.Matchers.isEmptyOrNullString;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertThat;
 import static org.junit.Assert.assertTrue;
 
 import java.util.HashMap;
@@ -36,11 +38,7 @@
 import org.codehaus.jettison.json.JSONException;
 import org.codehaus.jettison.json.JSONObject;
 import org.junit.Test;
-import org.openbravo.client.kernel.RequestContext;
-import org.openbravo.client.kernel.reference.FKComboUIDefinition;
 import org.openbravo.dal.core.OBContext;
-import org.openbravo.dal.service.OBDal;
-import org.openbravo.model.ad.ui.Field;
 import org.openbravo.service.json.JsonConstants;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -250,20 +248,21 @@
    */
   @Test
   public void testForIssue27612() throws Exception {
-    setOBContext("100");
-    RequestContext rq = RequestContext.get();
-    FKComboUIDefinition fkCombo = new FKComboUIDefinition();
-    Field field = OBDal.getInstance().get(Field.class, "2052");
-    rq.setRequestParameter("inpadOrgId", "");
-    rq.setRequestParameter("CHANGED_COLUMN", "inpadOrgId");
-    try {
-      OBContext.setAdminMode();
-      fkCombo.setReference(field.getColumn().getReference());
-      JSONObject jsonObject = new JSONObject(fkCombo.getFieldProperties(field, true));
-      assertTrue("".equals(jsonObject.get("_identifier")));
-    } finally {
-      OBContext.restorePreviousMode();
-    }
+    String ficRequest = "/org.openbravo.client.kernel?_action=org.openbravo.client.application.window.FormInitializationComponent" //
+        + "&MODE=CHANGE" //
+        + "&PARENT_ID=null" //
+        + "&TAB_ID=186" // Sales Order
+        + "&ROW_ID=null" //
+        + "&CHANGED_COLUMN=inpadOrgId";
+
+    // Executes a FIC in mode change for an empty ad_org, before the fix it returned default value,
+    // now it should return empty
+
+    String response = doRequest(ficRequest, new HashMap<String, String>(), 200, "POST");
+    JSONObject jsonResponse = new JSONObject(response);
+    assertTrue(jsonResponse.toString() != null);
+    assertThat(jsonResponse.getJSONObject("columnValues").getJSONObject("AD_Org_ID")
+        .getString("id"), isEmptyOrNullString());
   }
 
   /**
Binary file src-util/modulescript/build/classes/org/openbravo/modulescript/InitializeBPCurrency.class has changed
Binary file src-util/modulescript/build/classes/org/openbravo/modulescript/InitializeBPCurrencyData.class has changed
Binary file src-util/modulescript/build/classes/org/openbravo/modulescript/UpdateProductChValueOrg.class has changed
Binary file src-util/modulescript/build/classes/org/openbravo/modulescript/UpdateProductChValueOrgData.class has changed
--- a/src-util/modulescript/build/javasqlc/src/org/openbravo/modulescript/InitializeBPCurrencyData.java	Tue Nov 18 10:57:35 2014 +0100
+++ b/src-util/modulescript/build/javasqlc/src/org/openbravo/modulescript/InitializeBPCurrencyData.java	Tue Nov 18 11:03:11 2014 +0100
@@ -122,6 +122,43 @@
     return(updateCount);
   }
 
+  public static int UpdateBpCurrency(ConnectionProvider connectionProvider)    throws ServletException {
+    String strSql = "";
+    strSql = strSql + 
+      "        UPDATE C_Bpartner bp" +
+      " 		SET BP_Currency_ID = (" +
+      " 		                     SELECT DISTINCT i.C_Currency_ID" +
+      " 		                     FROM C_INVOICE i" +
+      " 		                     WHERE i.C_Bpartner_ID = bp.C_Bpartner_ID " +
+      " 		                     AND i.docstatus = 'CO'" +
+      " 		                     AND ((SELECT COUNT(DISTINCT i.C_CURRENCY_ID) FROM C_INVOICE i " +
+      " 		                     WHERE i.docstatus='CO' AND i.C_Bpartner_ID = bp.C_Bpartner_ID) = 1) " +
+      " 		                     )" +
+      " 		WHERE bp.BP_Currency_ID IS NULL";
+
+    int updateCount = 0;
+    PreparedStatement st = null;
+
+    try {
+    st = connectionProvider.getPreparedStatement(strSql);
+
+      updateCount = st.executeUpdate();
+    } catch(SQLException e){
+      log4j.error("SQL error in query: " + strSql + "Exception:"+ e);
+      throw new ServletException("@CODE=" + Integer.toString(e.getErrorCode()) + "@" + e.getMessage());
+    } catch(Exception ex){
+      log4j.error("Exception in query: " + strSql + "Exception:"+ ex);
+      throw new ServletException("@CODE=@" + ex.getMessage());
+    } finally {
+      try {
+        connectionProvider.releasePreparedStatement(st);
+      } catch(Exception ignore){
+        ignore.printStackTrace();
+      }
+    }
+    return(updateCount);
+  }
+
   public static boolean isExecuted(ConnectionProvider connectionProvider)    throws ServletException {
     String strSql = "";
     strSql = strSql + 
@@ -257,4 +294,72 @@
     }
     return(updateCount);
   }
+
+  public static boolean isUpdatedFromInvoice(ConnectionProvider connectionProvider)    throws ServletException {
+    String strSql = "";
+    strSql = strSql + 
+      "        SELECT count(*) as exist" +
+      "        FROM DUAL" +
+      "        WHERE EXISTS (SELECT 1 FROM ad_preference" +
+      "                      WHERE attribute = 'isUpdatedFromInvoice')";
+
+    ResultSet result;
+    boolean boolReturn = false;
+    PreparedStatement st = null;
+
+    try {
+    st = connectionProvider.getPreparedStatement(strSql);
+
+      result = st.executeQuery();
+      if(result.next()) {
+        boolReturn = !UtilSql.getValue(result, "exist").equals("0");
+      }
+      result.close();
+    } catch(SQLException e){
+      log4j.error("SQL error in query: " + strSql + "Exception:"+ e);
+      throw new ServletException("@CODE=" + Integer.toString(e.getErrorCode()) + "@" + e.getMessage());
+    } catch(Exception ex){
+      log4j.error("Exception in query: " + strSql + "Exception:"+ ex);
+      throw new ServletException("@CODE=@" + ex.getMessage());
+    } finally {
+      try {
+        connectionProvider.releasePreparedStatement(st);
+      } catch(Exception ignore){
+        ignore.printStackTrace();
+      }
+    }
+    return(boolReturn);
+  }
+
+  public static int createUpdateFromInvoicePref(ConnectionProvider connectionProvider)    throws ServletException {
+    String strSql = "";
+    strSql = strSql + 
+      "           INSERT INTO ad_preference (" +
+      "           ad_preference_id, ad_client_id, ad_org_id, isactive," +
+      "           createdby, created, updatedby, updated,attribute" +
+      "           ) VALUES (" +
+      "           get_uuid(), '0', '0', 'Y', '0', NOW(), '0', NOW(),'isUpdatedFromInvoice')";
+
+    int updateCount = 0;
+    PreparedStatement st = null;
+
+    try {
+    st = connectionProvider.getPreparedStatement(strSql);
+
+      updateCount = st.executeUpdate();
+    } catch(SQLException e){
+      log4j.error("SQL error in query: " + strSql + "Exception:"+ e);
+      throw new ServletException("@CODE=" + Integer.toString(e.getErrorCode()) + "@" + e.getMessage());
+    } catch(Exception ex){
+      log4j.error("Exception in query: " + strSql + "Exception:"+ ex);
+      throw new ServletException("@CODE=@" + ex.getMessage());
+    } finally {
+      try {
+        connectionProvider.releasePreparedStatement(st);
+      } catch(Exception ignore){
+        ignore.printStackTrace();
+      }
+    }
+    return(updateCount);
+  }
 }
--- a/src-util/modulescript/src/org/openbravo/modulescript/InitializeBPCurrency.java	Tue Nov 18 10:57:35 2014 +0100
+++ b/src-util/modulescript/src/org/openbravo/modulescript/InitializeBPCurrency.java	Tue Nov 18 11:03:11 2014 +0100
@@ -37,12 +37,22 @@
         InitializeBPCurrencyData.initializeCurrency(cp);
         InitializeBPCurrencyData.createPreference(cp);
         InitializeBPCurrencyData.createUpdatePreference(cp);
+        // update bp currency if it is not updated by initializeCurrency
+        // and there exists completed invoice in same currency 
+        // for any business partner
+        InitializeBPCurrencyData.UpdateBpCurrency(cp);
+        InitializeBPCurrencyData.createUpdateFromInvoicePref(cp);
       } else {
         boolean isUpdated = InitializeBPCurrencyData.isUpdated(cp);
         if(!isUpdated) {
           InitializeBPCurrencyData.initializeCurrency(cp);
           InitializeBPCurrencyData.createUpdatePreference(cp);
         }
+        boolean isUpdatedFromInv = InitializeBPCurrencyData.isUpdatedFromInvoice(cp);
+        if(!isUpdatedFromInv) {
+          InitializeBPCurrencyData.UpdateBpCurrency(cp);
+          InitializeBPCurrencyData.createUpdateFromInvoicePref(cp);
+        }
       }
     } catch (Exception e) {
       handleError(e);
--- a/src-util/modulescript/src/org/openbravo/modulescript/InitializeBPCurrency_data.xsql	Tue Nov 18 10:57:35 2014 +0100
+++ b/src-util/modulescript/src/org/openbravo/modulescript/InitializeBPCurrency_data.xsql	Tue Nov 18 11:03:11 2014 +0100
@@ -44,6 +44,23 @@
       ]]>
     </Sql>
   </SqlMethod>
+  <SqlMethod name="UpdateBpCurrency" type="preparedStatement" return="rowCount">
+    <SqlMethodComment></SqlMethodComment>
+    <Sql>
+     <![CDATA[
+        UPDATE C_Bpartner bp
+ 		SET BP_Currency_ID = (
+ 		                     SELECT DISTINCT i.C_Currency_ID
+ 		                     FROM C_INVOICE i
+ 		                     WHERE i.C_Bpartner_ID = bp.C_Bpartner_ID 
+ 		                     AND i.docstatus = 'CO'
+ 		                     AND ((SELECT COUNT(DISTINCT i.C_CURRENCY_ID) FROM C_INVOICE i 
+ 		                     WHERE i.docstatus='CO' AND i.C_Bpartner_ID = bp.C_Bpartner_ID) = 1) 
+ 		                     )
+ 		WHERE bp.BP_Currency_ID IS NULL
+      ]]>
+    </Sql>
+  </SqlMethod>
   <SqlMethod name="isExecuted" type="preparedStatement" return="boolean">
     <SqlMethodComment></SqlMethodComment>
     <Sql>
@@ -90,4 +107,27 @@
          ]]>
         </Sql>
    </SqlMethod>
+   <SqlMethod name="isUpdatedFromInvoice" type="preparedStatement" return="boolean">
+    <SqlMethodComment></SqlMethodComment>
+    <Sql>
+      <![CDATA[
+        SELECT count(*) as exist
+        FROM DUAL
+        WHERE EXISTS (SELECT 1 FROM ad_preference
+                      WHERE attribute = 'isUpdatedFromInvoice')
+      ]]>
+    </Sql>
+  </SqlMethod>
+   <SqlMethod name="createUpdateFromInvoicePref" type="preparedStatement" return="rowcount">
+      <SqlMethodComment></SqlMethodComment>
+       <Sql>
+       <![CDATA[
+           INSERT INTO ad_preference (
+           ad_preference_id, ad_client_id, ad_org_id, isactive,
+           createdby, created, updatedby, updated,attribute
+           ) VALUES (
+           get_uuid(), '0', '0', 'Y', '0', NOW(), '0', NOW(),'isUpdatedFromInvoice')
+         ]]>
+        </Sql>
+   </SqlMethod>
 </SqlClass>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src-util/modulescript/src/org/openbravo/modulescript/UpdateProductChValueOrg.java	Tue Nov 18 11:03:11 2014 +0100
@@ -0,0 +1,27 @@
+package org.openbravo.modulescript;
+
+import org.apache.log4j.Logger;
+import org.openbravo.database.ConnectionProvider;
+import org.openbravo.modulescript.ModuleScript;
+
+public class UpdateProductChValueOrg extends ModuleScript {
+
+  private static final Logger log4j = Logger.getLogger(UpdateProductChValueOrg.class);
+
+  @Override
+  public void execute() {
+    try {
+      ConnectionProvider cp = getConnectionProvider();
+      boolean executed = UpdateProductChValueOrgData.isModuleScriptExecuted(cp);
+      if (!executed) {
+        int count = UpdateProductChValueOrgData.updateProductChValueOrg(cp);
+        if (count > 0)
+          log4j.info("Updated " + count + " invoices.");
+        UpdateProductChValueOrgData.createPreference(cp);
+      }
+    } catch (Exception e) {
+      handleError(e);
+    }
+  }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src-util/modulescript/src/org/openbravo/modulescript/UpdateProductChValueOrg_data.xsql	Tue Nov 18 11:03:11 2014 +0100
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ *************************************************************************
+ * The contents of this file are subject to the Openbravo  Public  License
+ * Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
+ * Version 1.1  with a permitted attribution clause; you may not  use this
+ * file except in compliance with the License. You  may  obtain  a copy of
+ * the License at http://www.openbravo.com/legal/license.html
+ * Software distributed under the License  is  distributed  on  an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ * License for the specific  language  governing  rights  and  limitations
+ * under the License.
+ * The Original Code is Openbravo ERP.
+ * The Initial Developer of the Original Code is Openbravo SLU
+ * All portions are Copyright (C) 2014 Openbravo SLU
+ * All Rights Reserved.
+ * Contributor(s):  ______________________________________.
+ ************************************************************************
+-->
+<SqlClass name="UpdateProductChValueOrgData" package="org.openbravo.modulescript">
+   <SqlClassComment></SqlClassComment>
+  <SqlMethod name="select" type="preparedStatement" return="multiple">
+    <SqlMethodComment></SqlMethodComment>
+    <Sql><![CDATA[
+      SELECT '' as exist FROM DUAL
+      ]]>
+    </Sql>
+  </SqlMethod>
+  <SqlMethod name="updateProductChValueOrg" type="preparedStatement" return="rowcount">
+    <SqlMethodComment></SqlMethodComment>
+    <Sql>
+      <![CDATA[
+    update m_product_ch_value chv
+    set ad_org_id =
+        (select p.ad_org_id
+          from m_product p
+          where chv.m_product_id = p.m_product_id)
+    where exists (select 1
+                   from m_product p
+                   where chv.m_product_id = p.m_product_id and
+                         chv.ad_org_id <> p.ad_org_id)    
+      ]]>
+    </Sql>
+  </SqlMethod>
+   <SqlMethod name="isModuleScriptExecuted" type="preparedStatement" return="boolean">
+    <SqlMethodComment></SqlMethodComment>
+    <Sql>
+      <![CDATA[
+    SELECT count(*) as exist
+    FROM ad_preference
+    WHERE attribute = 'UpdateProductChValueOrg' and isactive = 'Y'
+      ]]>
+    </Sql>
+  </SqlMethod>
+   <SqlMethod name="createPreference" type="preparedStatement" return="rowcount">
+    <SqlMethodComment></SqlMethodComment>
+    <Sql>
+      <![CDATA[
+    INSERT INTO ad_preference (
+    ad_preference_id, ad_client_id, ad_org_id, isactive,
+    createdby, created, updatedby, updated, attribute
+    ) VALUES (
+    get_uuid(), '0', '0', 'Y', 
+    '0', NOW(), '0', NOW(), 'UpdateProductChValueOrg')
+      ]]>
+    </Sql>
+  </SqlMethod>
+</SqlClass>
\ No newline at end of file
--- a/src-wad/src/org/openbravo/wad/web.xml	Tue Nov 18 10:57:35 2014 +0100
+++ b/src-wad/src/org/openbravo/wad/web.xml	Tue Nov 18 11:03:11 2014 +0100
@@ -12,7 +12,7 @@
     * under the License. 
     * The Original Code is Openbravo ERP. 
     * The Initial Developer of the Original Code is Openbravo SLU
-    * All portions are Copyright (C) 2001-2011 Openbravo SLU 
+    * All portions are Copyright (C) 2001-2014 Openbravo SLU 
     * All Rights Reserved. 
     * Contributor(s):    ______________________________________.
     ************************************************************************
@@ -135,11 +135,4 @@
   <session-config>
     <session-timeout id="fieldSessionTimeOut">60</session-timeout>
   </session-config>
-  
-  <resource-ref>
-    <description>Oracle Datasource example</description>
-    <res-ref-name>jdbc/openbravo</res-ref-name>
-    <res-type>javax.sql.DataSource</res-type>
-    <res-auth>Container</res-auth>
-  </resource-ref>
 </web-app>
--- a/src/org/openbravo/base/model/ModelProvider.java	Tue Nov 18 10:57:35 2014 +0100
+++ b/src/org/openbravo/base/model/ModelProvider.java	Tue Nov 18 11:03:11 2014 +0100
@@ -900,10 +900,26 @@
    * @throws CheckException
    */
   public Entity getEntity(String entityName) throws CheckException {
+    boolean checkIfNotExists = true;
+    return getEntity(entityName, checkIfNotExists);
+  }
+
+  /**
+   * Retrieves an Entity using the entityName. If not found then a CheckException is thrown if the
+   * checkIfNotExists parameter is true.
+   * 
+   * @param entityName
+   *          the name used for searching the Entity.
+   * @param checkIfNotExists
+   *          a boolean that is true calls to Check.fail if the entity does not exist
+   * @return the Entity object
+   * @throws CheckException
+   */
+  public Entity getEntity(String entityName, boolean checkIfNotExists) throws CheckException {
     if (model == null)
       getModel();
     final Entity entity = entitiesByName.get(entityName);
-    if (entity == null) {
+    if (entity == null && checkIfNotExists) {
       Check.fail("Mapping name: " + entityName + " not found in runtime model");
     }
     return entity;
--- a/src/org/openbravo/common/actionhandler/ManagePrereservationActionHandler.java	Tue Nov 18 10:57:35 2014 +0100
+++ b/src/org/openbravo/common/actionhandler/ManagePrereservationActionHandler.java	Tue Nov 18 11:03:11 2014 +0100
@@ -11,7 +11,7 @@
  * under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2012 Openbravo SLU 
+ * All portions are Copyright (C) 2012-2014 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -134,6 +134,9 @@
 
       final BigDecimal qty = new BigDecimal(
           selectedLine.getString(PrereservationManualPickEdit.PROPERTY_RESERVEDQTY));
+      final boolean allocated = selectedLine
+          .getBoolean(PrereservationManualPickEdit.PROPERTY_ALLOCATED);
+      resStock.setAllocated(allocated);
       resStock.setQuantity(qty);
 
       OBDal.getInstance().save(resStock);
--- a/src/org/openbravo/common/actionhandler/ManageReservationActionHandler.java	Tue Nov 18 10:57:35 2014 +0100
+++ b/src/org/openbravo/common/actionhandler/ManageReservationActionHandler.java	Tue Nov 18 11:03:11 2014 +0100
@@ -11,7 +11,7 @@
  * under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2013 Openbravo SLU 
+ * All portions are Copyright (C) 2013-2014 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -186,8 +186,11 @@
     if (idList.size() > 0) {
       for (String id : idList) {
         ReservationStock resStock = OBDal.getInstance().get(ReservationStock.class, id);
-        reservation.getMaterialMgmtReservationStockList().remove(resStock);
-        OBDal.getInstance().remove(resStock);
+        if(resStock.getReleased() == null
+            || resStock.getReleased().compareTo(BigDecimal.ZERO) == 0) {
+          reservation.getMaterialMgmtReservationStockList().remove(resStock);
+          OBDal.getInstance().remove(resStock);
+        }
       }
       OBDal.getInstance().save(reservation);
       OBDal.getInstance().flush();
--- a/src/org/openbravo/common/datasource/StockReservationPickAndEditDataSource.java	Tue Nov 18 10:57:35 2014 +0100
+++ b/src/org/openbravo/common/datasource/StockReservationPickAndEditDataSource.java	Tue Nov 18 11:03:11 2014 +0100
@@ -29,6 +29,7 @@
 import java.util.Set;
 import java.util.StringTokenizer;
 
+import org.apache.commons.lang.StringUtils;
 import org.apache.log4j.Logger;
 import org.codehaus.jettison.json.JSONArray;
 import org.codehaus.jettison.json.JSONException;
@@ -580,6 +581,10 @@
     if (filterCriteria.get("released") != null) {
       releasedFilterCriteria = filterCriteria.get("released");
     }
+    String allocatedCriteria = "";
+    if (filterCriteria.get("allocated") != null) {
+      allocatedCriteria = filterCriteria.get("allocated");
+    }
 
     if (ol != null && !"".equals(ol)) {
       reservation = ReservationUtils.getReservationFromOrder(OBDal.getInstance().get(
@@ -597,14 +602,18 @@
     try {
       result.addAll(getSelectedLines(reservation));
       if (orderLinesFiltered == null || orderLinesFiltered.size() == 0) {
-        result.addAll(getStorageDetail(reservation, organizations, warehousesFiltered,
-            locatorsFiltered, attributesFiltered, availableQtyFilterCriteria,
-            reservedinothersFilterCriteria, releasedFilterCriteria, selectedIds));
+        result
+            .addAll(getStorageDetail(reservation, organizations, warehousesFiltered,
+                locatorsFiltered, attributesFiltered, availableQtyFilterCriteria,
+                reservedinothersFilterCriteria, releasedFilterCriteria, allocatedCriteria,
+                selectedIds));
       }
       if (locatorsFiltered == null || locatorsFiltered.size() == 0) {
-        result.addAll(getPurchaseOrderLines(reservation, organizations, warehousesFiltered,
-            attributesFiltered, orderLinesFiltered, availableQtyFilterCriteria,
-            reservedinothersFilterCriteria, releasedFilterCriteria, selectedIds));
+        result
+            .addAll(getPurchaseOrderLines(reservation, organizations, warehousesFiltered,
+                attributesFiltered, orderLinesFiltered, availableQtyFilterCriteria,
+                reservedinothersFilterCriteria, releasedFilterCriteria, allocatedCriteria,
+                selectedIds));
       }
     } finally {
       OBContext.restorePreviousMode();
@@ -862,7 +871,7 @@
       Set<String> organizations, List<Warehouse> warehousesFiltered,
       List<AttributeSetInstance> attributeSetInstancesFiltered, List<OrderLine> orderLinesFiltered,
       String availableQtyFilterCriteria, String reservedinothersFilterCriteria,
-      String releasedFilterCriteria, ArrayList<String> selectedIds) {
+      String releasedFilterCriteria, String allocatedCriteria, ArrayList<String> selectedIds) {
     List<Map<String, Object>> result = new ArrayList<Map<String, Object>>();
     final StringBuilder hqlString = new StringBuilder();
     hqlString.append("select ol from OrderLine as ol ");
@@ -955,13 +964,19 @@
           && !isInScope("released", releasedFilterCriteria, BigDecimal.ZERO)) {
         continue;
       }
+      if (StringUtils.isNotBlank(allocatedCriteria)
+          && !isInScope("allocated", allocatedCriteria, orderLine.getSalesOrder().getWarehouse()
+              .isAllocated())) {
+        continue;
+      }
+
       myMap.put("availableQty",
           orderLine.getOrderedQuantity().subtract(getDeliveredQuantity(orderLine)));
       myMap.put("reservedinothers", reservedinothers);
       myMap.put("quantity", BigDecimal.ZERO);
       myMap.put("reservationQuantity", reservation.getQuantity());
       myMap.put("released", BigDecimal.ZERO);
-      myMap.put("allocated", false);
+      myMap.put("allocated", orderLine.getSalesOrder().getWarehouse().isAllocated());
       result.add(myMap);
     }
     return result;
@@ -971,7 +986,7 @@
       Set<String> organizations, List<Warehouse> warehousesFiltered,
       List<Locator> locatorsFiltered, List<AttributeSetInstance> attributeSetInstancesFiltered,
       String availableQtyFilterCriteria, String reservedinothersFilterCriteria,
-      String releasedFilterCriteria, ArrayList<String> selectedIds) {
+      String releasedFilterCriteria, String allocatedCriteria, ArrayList<String> selectedIds) {
     List<Map<String, Object>> result = new ArrayList<Map<String, Object>>();
     final StringBuilder hqlString = new StringBuilder();
     hqlString.append("select sd from MaterialMgmtStorageDetail as sd ");
@@ -1073,6 +1088,11 @@
                 && !isInScope("released", releasedFilterCriteria, BigDecimal.ZERO)) {
               continue;
             }
+            if (StringUtils.isNotBlank(allocatedCriteria)
+                && !isInScope("allocated", allocatedCriteria, sd.getStorageBin().getWarehouse()
+                    .isAllocated())) {
+              continue;
+            }
             result = tomap(sd, false, result, reservedinothers, reservation);
           }
         }
@@ -1093,6 +1113,11 @@
             && !isInScope("released", releasedFilterCriteria, BigDecimal.ZERO)) {
           continue;
         }
+        if (StringUtils.isNotBlank(allocatedCriteria)
+            && !isInScope("allocated", allocatedCriteria, sd.getStorageBin().getWarehouse()
+                .isAllocated())) {
+          continue;
+        }
         result = tomap(sd, false, result, reservedinothers, reservation);
       }
     }
@@ -1125,7 +1150,7 @@
     myMap.put("reservationQuantity", reservation.getQuantity());
     myMap.put("quantity", BigDecimal.ZERO);
     myMap.put("released", BigDecimal.ZERO);
-    myMap.put("allocated", false);
+    myMap.put("allocated", sd.getStorageBin().getWarehouse().isAllocated());
     result.add(myMap);
 
     return result;
@@ -1170,6 +1195,30 @@
     return true;
   }
 
+  private boolean isInScope(String fieldName, String filterCriteria, boolean flag) {
+    try {
+      if (filterCriteria.startsWith("[")) {
+        JSONArray myJSON = new JSONArray(filterCriteria);
+        if (myJSON.getJSONObject(0).getString("fieldName").equals(fieldName)) {
+          return isInScope(fieldName, myJSON.getJSONObject(0).toString(), flag);
+        }
+      } else if (filterCriteria.startsWith("{")) {
+        JSONObject myJSON = new JSONObject(filterCriteria);
+        if (myJSON.getString("fieldName").equals(fieldName)) {
+          if (myJSON.getString("operator").equals("equals")) {
+            return flag == myJSON.getBoolean("value");
+          }
+        }
+
+      } else {
+        return flag == "true".equals(filterCriteria);
+      }
+    } catch (JSONException e) {
+      log4j.error("Error parsing criteria", e);
+    }
+    return true;
+  }
+
   private BigDecimal getQtyOnHand(Product product, Locator storageBin,
       AttributeSetInstance attribute, OrderLine orderline) {
     if (orderline != null && !"".equals(orderline)) {
--- a/src/org/openbravo/costing/AverageCostAdjustment.java	Tue Nov 18 10:57:35 2014 +0100
+++ b/src/org/openbravo/costing/AverageCostAdjustment.java	Tue Nov 18 11:03:11 2014 +0100
@@ -20,7 +20,6 @@
 
 import java.math.BigDecimal;
 import java.math.RoundingMode;
-import java.util.Calendar;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.List;
@@ -128,21 +127,78 @@
           RoundingMode.HALF_UP);
     }
     log.debug("Starting average cost {}", cost == null ? "not cost" : cost.toPlainString());
-    if (AverageAlgorithm.modifiesAverage(trxType) && cost != null) {
-      Costing curCosting = basetrx.getMaterialMgmtCostingList().get(0);
-      if (curCosting.getCost().compareTo(cost) != 0) {
-        // Update existing costing
-        curCosting.setPermanent(Boolean.FALSE);
-        OBDal.getInstance().save(curCosting);
+    if (cost != null && (AverageAlgorithm.modifiesAverage(trxType) || !baseCAL.isBackdatedTrx())) {
+      BigDecimal trxCost = CostAdjustmentUtils.getTrxCost(basetrx, false, getCostCurrency());
+      BigDecimal trxPrice = trxCost.add(adjustmentBalance.multiply(signMultiplier)).divide(
+          basetrx.getMovementQuantity().abs(), costCurPrecission, RoundingMode.HALF_UP);
+      if (checkNegativeStockCorrection && currentStock.compareTo(basetrx.getMovementQuantity()) < 0
+          && cost.compareTo(trxPrice) != 0 && !baseCAL.isNegativeStockCorrection()
+          && AverageAlgorithm.modifiesAverage(trxType)) {
+        // stock was negative and cost different than trx price then Negative Stock Correction
+        // is added
+        BigDecimal trxSignMultiplier = new BigDecimal(basetrx.getMovementQuantity().signum());
+        BigDecimal negCorrAmt = trxPrice.multiply(currentStock)
+            .setScale(stdCurPrecission, RoundingMode.HALF_UP).subtract(currentValueAmt)
+            .subtract(adjustmentBalance);
+        adjustmentBalance = adjustmentBalance.add(negCorrAmt.multiply(trxSignMultiplier));
+        // If there is a difference insert a cost adjustment line.
+        CostAdjustmentLine newCAL = insertCostAdjustmentLine(basetrx, negCorrAmt, null);
+        newCAL.setNegativeStockCorrection(Boolean.TRUE);
+        newCAL.setRelatedTransactionAdjusted(Boolean.TRUE);
+        newCAL.setUnitCost(Boolean.FALSE);
+        OBDal.getInstance().save(newCAL);
+        cost = trxPrice;
+        log.debug("Negative stock correction. Amount: {}, new cost {}", negCorrAmt.toPlainString(),
+            cost.toPlainString());
+      }
+      if (basetrx.getMaterialMgmtCostingList().size() == 0) {
+        Date newDate = new Date();
+        Date dateTo = costing.getEndingDate();
+        costing.setEndingDate(newDate);
+        OBDal.getInstance().save(costing);
+        Costing newCosting = OBProvider.getInstance().get(Costing.class);
+        newCosting.setCost(cost);
+        newCosting.setCurrency((Currency) OBDal.getInstance().getProxy(Currency.ENTITY_NAME,
+            strCostCurrencyId));
+        newCosting.setStartingDate(newDate);
+        newCosting.setEndingDate(dateTo);
+        newCosting.setInventoryTransaction(basetrx);
+        newCosting.setProduct(basetrx.getProduct());
+        if (isManufacturingProduct) {
+          newCosting.setOrganization((Organization) OBDal.getInstance().getProxy(
+              Organization.ENTITY_NAME, "0"));
+        } else {
+          newCosting.setOrganization((Organization) OBDal.getInstance().getProxy(
+              Organization.ENTITY_NAME, strCostOrgId));
+        }
+        newCosting.setQuantity(basetrx.getMovementQuantity());
+        newCosting.setTotalMovementQuantity(currentStock);
+        newCosting.setPrice(trxPrice);
+        newCosting.setCostType("AVA");
+        newCosting.setManual(Boolean.FALSE);
+        newCosting.setPermanent(Boolean.TRUE);
+        newCosting.setProduction(trxType == TrxType.ManufacturingProduced);
+        newCosting.setWarehouse((Warehouse) getCostDimensions().get(CostDimension.Warehouse));
+        OBDal.getInstance().save(newCosting);
         OBDal.getInstance().flush();
-        if (curCosting.getOriginalCost() == null) {
-          curCosting.setOriginalCost(curCosting.getCost());
+      } else {
+        Costing curCosting = basetrx.getMaterialMgmtCostingList().get(0);
+        if (curCosting.getCost().compareTo(cost) != 0) {
+          // Update existing costing
+          curCosting.setPermanent(Boolean.FALSE);
+          OBDal.getInstance().save(curCosting);
+          OBDal.getInstance().flush();
+          if (curCosting.getOriginalCost() == null) {
+            curCosting.setOriginalCost(curCosting.getCost());
+          }
+          curCosting.setCost(cost);
+          curCosting.setPrice(trxPrice);
+          curCosting.setPermanent(Boolean.TRUE);
+          OBDal.getInstance().flush();
+          OBDal.getInstance().save(curCosting);
         }
-        curCosting.setCost(cost);
-        curCosting.setPermanent(Boolean.TRUE);
-        OBDal.getInstance().flush();
-        OBDal.getInstance().save(curCosting);
       }
+
     }
 
     // Modify isManufacturingProduct flag in case it has changed at some point.
@@ -223,8 +279,10 @@
             continue;
           }
           log.debug("New average cost: {}", cost.toPlainString());
-          BigDecimal trxPrice = trxCost.add(trxAdjAmt).divide(trx.getMovementQuantity().abs(),
-              costCurPrecission, RoundingMode.HALF_UP);
+          Costing curCosting = trx.getMaterialMgmtCostingList().get(0);
+          BigDecimal trxPrice = curCosting.getPrice().multiply(trx.getMovementQuantity().abs())
+              .add(trxAdjAmt)
+              .divide(trx.getMovementQuantity().abs(), costCurPrecission, RoundingMode.HALF_UP);
 
           if (checkNegativeStockCorrection && currentStock.compareTo(trx.getMovementQuantity()) < 0
               && cost.compareTo(trxPrice) != 0) {
@@ -237,8 +295,8 @@
             trxAdjAmt = trxAdjAmt.add(negCorrAmt.multiply(trxSignMultiplier));
             // If there is a difference insert a cost adjustment line.
             CostAdjustmentLine newCAL = insertCostAdjustmentLine(trx, negCorrAmt, null);
-            newCAL.setNegativeStockCorrection(true);
-            newCAL.setRelatedTransactionAdjusted(true);
+            newCAL.setNegativeStockCorrection(Boolean.TRUE);
+            newCAL.setRelatedTransactionAdjusted(Boolean.TRUE);
             newCAL.setUnitCost(Boolean.FALSE);
             OBDal.getInstance().save(newCAL);
             cost = trxPrice;
@@ -246,7 +304,6 @@
                 negCorrAmt.toPlainString(), cost.toPlainString());
           }
 
-          Costing curCosting = trx.getMaterialMgmtCostingList().get(0);
           if (curCosting.getCost().compareTo(cost) == 0 && StringUtils.isEmpty(bdCostingId)) {
             // new cost hasn't changed, following transactions will have the same cost, so no more
             // related transactions are needed to include.
@@ -262,29 +319,56 @@
             if (curCosting.getOriginalCost() == null) {
               curCosting.setOriginalCost(curCosting.getCost());
             }
+            curCosting.setPrice(trxPrice);
             curCosting.setCost(cost);
             curCosting.setPermanent(Boolean.TRUE);
             OBDal.getInstance().save(curCosting);
           }
-        } else if (!trx.isCostPermanent() && cost != null && !isVoidedTrx(trx, currentTrxType)) {
-          // Check current trx unit cost matches new expected cost
-          BigDecimal expectedCost = cost.multiply(trx.getMovementQuantity().abs());
-          BigDecimal unitCost = CostAdjustmentUtils.getTrxCost(trx, true,
-              OBDal.getInstance().get(Currency.class, strCurrentCurId));
-          unitCost = unitCost.add(trxAdjAmt);
-          log.debug("Is adjustment needed? Expected {} vs Current {}",
-              expectedCost.toPlainString(), unitCost.toPlainString());
-          if (expectedCost.compareTo(unitCost) != 0) {
-            trxAdjAmt = trxAdjAmt.add(expectedCost.subtract(unitCost).multiply(trxSignMultiplier));
-            adjustmentBalance = adjustmentBalance.add(expectedCost.subtract(unitCost).multiply(
-                trxSignMultiplier));
-            // If there is a difference insert a cost adjustment line.
-            CostAdjustmentLine newCAL = insertCostAdjustmentLine(trx,
-                expectedCost.subtract(unitCost), null);
-            newCAL.setRelatedTransactionAdjusted(true);
-            OBDal.getInstance().save(newCAL);
-            log.debug("Adjustment added. Amount {}.", expectedCost.subtract(unitCost)
-                .toPlainString());
+        } else if (cost != null && !isVoidedTrx(trx, currentTrxType)) {
+          if (!trx.isCostPermanent()) {
+            // Check current trx unit cost matches new expected cost
+            BigDecimal expectedCost = cost.multiply(trx.getMovementQuantity().abs()
+                .setScale(costCurPrecission, RoundingMode.HALF_UP));
+            BigDecimal unitCost = CostAdjustmentUtils.getTrxCost(trx, true, OBDal.getInstance()
+                .get(Currency.class, strCurrentCurId));
+            unitCost = unitCost.add(trxAdjAmt);
+            log.debug("Is adjustment needed? Expected {} vs Current {}",
+                expectedCost.toPlainString(), unitCost.toPlainString());
+            if (expectedCost.compareTo(unitCost) != 0) {
+              trxAdjAmt = trxAdjAmt
+                  .add(expectedCost.subtract(unitCost).multiply(trxSignMultiplier));
+              adjustmentBalance = adjustmentBalance.add(expectedCost.subtract(unitCost).multiply(
+                  trxSignMultiplier));
+              // If there is a difference insert a cost adjustment line.
+              CostAdjustmentLine newCAL = insertCostAdjustmentLine(trx,
+                  expectedCost.subtract(unitCost), null);
+              newCAL.setRelatedTransactionAdjusted(Boolean.TRUE);
+              OBDal.getInstance().save(newCAL);
+              log.debug("Adjustment added. Amount {}.", expectedCost.subtract(unitCost)
+                  .toPlainString());
+            }
+          }
+          if (trx.getMaterialMgmtCostingList().size() != 0) {
+            Costing curCosting = trx.getMaterialMgmtCostingList().get(0);
+            if (currentStock.signum() != 0) {
+              cost = currentValueAmt.add(adjustmentBalance).divide(currentStock, costCurPrecission,
+                  RoundingMode.HALF_UP);
+            }
+            BigDecimal trxPrice = curCosting.getPrice().multiply(trx.getMovementQuantity().abs())
+                .add(trxAdjAmt)
+                .divide(trx.getMovementQuantity().abs(), costCurPrecission, RoundingMode.HALF_UP);
+            if (curCosting.getCost().compareTo(cost) != 0) {
+              curCosting.setPermanent(Boolean.FALSE);
+              OBDal.getInstance().save(curCosting);
+              OBDal.getInstance().flush();
+              if (curCosting.getOriginalCost() == null) {
+                curCosting.setOriginalCost(curCosting.getCost());
+              }
+              curCosting.setPrice(trxPrice);
+              curCosting.setCost(cost);
+              curCosting.setPermanent(Boolean.TRUE);
+              OBDal.getInstance().save(curCosting);
+            }
           }
         }
 
@@ -322,10 +406,10 @@
         }
         newCosting.setQuantity(null);
         newCosting.setTotalMovementQuantity(currentStock);
-        newCosting.setPrice(null);
+        newCosting.setPrice(cost);
         newCosting.setCostType("AVA");
-        newCosting.setManual(false);
-        newCosting.setPermanent(true);
+        newCosting.setManual(Boolean.FALSE);
+        newCosting.setPermanent(Boolean.TRUE);
         newCosting.setProduction(trxType == TrxType.ManufacturingProduced);
         newCosting.setWarehouse((Warehouse) getCostDimensions().get(CostDimension.Warehouse));
         OBDal.getInstance().save(newCosting);
@@ -379,7 +463,8 @@
           costCurrency, trx.getTransactionProcessDate(), getCostOrg(),
           FinancialUtils.PRECISION_COSTING);
     }
-    BigDecimal expectedCostAmt = trx.getMovementQuantity().abs().multiply(cost);
+    BigDecimal expectedCostAmt = trx.getMovementQuantity().abs().multiply(cost)
+        .setScale(costCurPrecission, RoundingMode.HALF_UP);
     BigDecimal currentCost = trx.getTransactionCost();
     return expectedCostAmt.subtract(currentCost);
   }
@@ -412,8 +497,12 @@
     // adjusted transaction. But for transactions with the same movement date only those with a
     // transaction date after the process date of the adjusted transaction.
     wh.append(" and (");
-    wh.append("  (trx." + MaterialTransaction.PROPERTY_TRANSACTIONPROCESSDATE + " < :fixbdt");
-    wh.append("  and (");
+
+    if (costingRule.isBackdatedTransactionsFixed()) {
+      wh.append("  (trx." + MaterialTransaction.PROPERTY_TRANSACTIONPROCESSDATE + " < :fixbdt");
+      wh.append("  and (");
+    }
+
     wh.append("   trx." + MaterialTransaction.PROPERTY_TRANSACTIONPROCESSDATE + " > :trxdate");
     wh.append("   or (");
     wh.append("    trx." + MaterialTransaction.PROPERTY_TRANSACTIONPROCESSDATE + " = :trxdate");
@@ -421,34 +510,39 @@
     wh.append("     trxtype." + CostAdjustmentUtils.propADListPriority + " > :trxtypeprio");
     wh.append("     or (");
     wh.append("      trxtype." + CostAdjustmentUtils.propADListPriority + " = :trxtypeprio");
-    wh.append("      and trx." + MaterialTransaction.PROPERTY_MOVEMENTQUANTITY + " <= :trxqty");
-    wh.append("  ))))");
-    wh.append("  and trx.id != :trxid");
+    wh.append("      and trx." + MaterialTransaction.PROPERTY_MOVEMENTQUANTITY + " < :trxqty");
+    wh.append("      or (");
+    wh.append("        trx." + MaterialTransaction.PROPERTY_MOVEMENTQUANTITY + " = :trxqty");
+    wh.append("        and trx." + MaterialTransaction.PROPERTY_ID + " > :trxid");
+    wh.append("  )))))");
 
-    wh.append(" ) or (");
+    if (costingRule.isBackdatedTransactionsFixed()) {
+      wh.append(" ) or (");
 
-    wh.append("  trx." + MaterialTransaction.PROPERTY_TRANSACTIONPROCESSDATE + " >= :fixbdt");
-    wh.append("  and (");
-    wh.append("   trx." + MaterialTransaction.PROPERTY_MOVEMENTDATE + " > :mvtdate");
-    wh.append("   or (");
-    wh.append("    trx." + MaterialTransaction.PROPERTY_MOVEMENTDATE + " = :mvtdate");
-    // If there are more than one trx on the same trx process date filter out those types with less
-    // priority and / or higher quantity.
-    wh.append("    and (");
-    wh.append("     trx." + MaterialTransaction.PROPERTY_TRANSACTIONPROCESSDATE + " > :trxdate");
-    wh.append("     or (");
-    wh.append("      trx." + MaterialTransaction.PROPERTY_TRANSACTIONPROCESSDATE + " = :trxdate");
-    wh.append("      and (");
-    wh.append("       trxtype." + CostAdjustmentUtils.propADListPriority + " > :trxtypeprio");
-    wh.append("       or (");
-    wh.append("        trxtype." + CostAdjustmentUtils.propADListPriority + " = :trxtypeprio");
-    wh.append("        and trx." + MaterialTransaction.PROPERTY_MOVEMENTQUANTITY + " < :trxqty");
-    wh.append("         or (");
-    wh.append("          trx." + MaterialTransaction.PROPERTY_MOVEMENTQUANTITY + " = :trxqty");
-    wh.append("          and trx." + MaterialTransaction.PROPERTY_ID + " < :trxid");
-    wh.append("    )))))");
-    wh.append("    and trx.id != :trxid");
-    wh.append(" ))))");
+      wh.append("  trx." + MaterialTransaction.PROPERTY_TRANSACTIONPROCESSDATE + " >= :fixbdt");
+      wh.append("  and (");
+      wh.append("   trx." + MaterialTransaction.PROPERTY_MOVEMENTDATE + " > :mvtdate");
+      wh.append("   or (");
+      wh.append("    trx." + MaterialTransaction.PROPERTY_MOVEMENTDATE + " = :mvtdate");
+      // If there are more than one trx on the same trx process date filter out those types with
+      // less
+      // priority and / or higher quantity.
+      wh.append("    and (");
+      wh.append("     trx." + MaterialTransaction.PROPERTY_TRANSACTIONPROCESSDATE + " > :trxdate");
+      wh.append("     or (");
+      wh.append("      trx." + MaterialTransaction.PROPERTY_TRANSACTIONPROCESSDATE + " = :trxdate");
+      wh.append("      and (");
+      wh.append("       trxtype." + CostAdjustmentUtils.propADListPriority + " > :trxtypeprio");
+      wh.append("       or (");
+      wh.append("        trxtype." + CostAdjustmentUtils.propADListPriority + " = :trxtypeprio");
+      wh.append("        and trx." + MaterialTransaction.PROPERTY_MOVEMENTQUANTITY + " < :trxqty");
+      wh.append("         or (");
+      wh.append("          trx." + MaterialTransaction.PROPERTY_MOVEMENTQUANTITY + " = :trxqty");
+      wh.append("          and trx." + MaterialTransaction.PROPERTY_ID + " > :trxid");
+      wh.append("    )))))");
+      wh.append(" )))");
+    }
+    wh.append(")");
     wh.append("  and org.id in (:orgs)");
     if (warehouse != null) {
       wh.append("  and loc." + Locator.PROPERTY_WAREHOUSE + " = :warehouse");
@@ -474,13 +568,9 @@
     trxQry.setFilterOnReadableClients(false);
     trxQry.setNamedParameter("refid", CostAdjustmentUtils.MovementTypeRefID);
     trxQry.setNamedParameter("product", trx.getProduct());
-    trxQry.setNamedParameter("mvtdate", trx.getMovementDate());
     if (costingRule.isBackdatedTransactionsFixed()) {
+      trxQry.setNamedParameter("mvtdate", trx.getMovementDate());
       trxQry.setNamedParameter("fixbdt", costingRule.getFixbackdatedfrom());
-    } else {
-      Calendar cal = Calendar.getInstance();
-      cal.set(9999, 12, 31);
-      trxQry.setNamedParameter("fixbdt", cal.getTime());
     }
     trxQry.setNamedParameter("trxtypeprio",
         CostAdjustmentUtils.getTrxTypePrio(trx.getMovementType()));
@@ -519,11 +609,11 @@
     BigDecimal currentValueAmt = CostAdjustmentUtils.getValuedStockOnTransactionDate(getCostOrg(),
         basetrx, getCostDimensions(), isManufacturingProduct, areBaseTrxBackdatedFixed,
         getCostCurrency());
-    int precission = getCostCurrency().getCostingPrecision().intValue();
 
-    BigDecimal trxCost = CostAdjustmentUtils.getTrxCost(basetrx, false, getCostCurrency());
-    BigDecimal trxUnitCost = trxCost.divide(basetrx.getMovementQuantity(), precission);
-    BigDecimal adjustAmt = currentStock.multiply(trxUnitCost).subtract(currentValueAmt);
+    Costing curCosting = basetrx.getMaterialMgmtCostingList().get(0);
+    BigDecimal trxPrice = curCosting.getPrice();
+    BigDecimal adjustAmt = currentStock.multiply(trxPrice)
+        .setScale(stdCurPrecission, RoundingMode.HALF_UP).subtract(currentValueAmt);
 
     costAdjLine.setCurrency((Currency) OBDal.getInstance().getProxy(Currency.ENTITY_NAME,
         strCostCurrencyId));
@@ -620,7 +710,7 @@
   private void extendPreviousCosting(Costing bdCosting) {
     StringBuffer where = new StringBuffer();
     where.append(" as c");
-    where.append("  join c." + Costing.PROPERTY_INVENTORYTRANSACTION + " as trx");
+    where.append("  left join c." + Costing.PROPERTY_INVENTORYTRANSACTION + " as trx");
     where.append(" where c." + Costing.PROPERTY_PRODUCT + " = :product");
     where.append("   and c." + Costing.PROPERTY_ORGANIZATION + " = :org");
     where.append("   and c." + Costing.PROPERTY_COSTTYPE + " = 'AVA'");
--- a/src/org/openbravo/costing/CostAdjustmentProcess.java	Tue Nov 18 10:57:35 2014 +0100
+++ b/src/org/openbravo/costing/CostAdjustmentProcess.java	Tue Nov 18 11:03:11 2014 +0100
@@ -292,7 +292,7 @@
               trx.getCurrency(), accountingDate, trx.getOrganization(), "C");
         }
         trxCost.setCost(convertedAmt);
-        trxCost.setCurrency(line.getCurrency());
+        trxCost.setCurrency(trx.getCurrency());
 
         OBDal.getInstance().save(trxCost);
         OBDal.getInstance().flush();
--- a/src/org/openbravo/costing/CostAdjustmentUtils.java	Tue Nov 18 10:57:35 2014 +0100
+++ b/src/org/openbravo/costing/CostAdjustmentUtils.java	Tue Nov 18 11:03:11 2014 +0100
@@ -20,7 +20,6 @@
 
 import java.math.BigDecimal;
 import java.math.RoundingMode;
-import java.util.Calendar;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.List;
@@ -331,6 +330,8 @@
       orgs = osp.getChildTree("0", false);
       costDimensions = CostingUtils.getEmptyDimensions();
     }
+    CostingRule costingRule = CostingUtils.getCostDimensionRule(costorg,
+        trx.getTransactionProcessDate());
 
     StringBuffer select = new StringBuffer();
     select
@@ -346,8 +347,13 @@
     select.append("   and trx." + MaterialTransaction.PROPERTY_ISCOSTCALCULATED + " = true");
 
     select.append("  and ( ");
-    select.append("  ( trx." + MaterialTransaction.PROPERTY_TRANSACTIONPROCESSDATE + " < :fixbdt");
-    select.append("   and  (");
+
+    if (costingRule.isBackdatedTransactionsFixed()) {
+      select.append("  (");
+      select.append("   trx." + MaterialTransaction.PROPERTY_TRANSACTIONPROCESSDATE + " < :fixbdt");
+      select.append("   and  (");
+    }
+
     // If there are more than one trx on the same trx process date filter out those types with less
     // priority and / or higher quantity.
     select.append("    trx." + MaterialTransaction.PROPERTY_TRANSACTIONPROCESSDATE + " < :trxdate");
@@ -358,36 +364,41 @@
     select.append("      trxtype." + propADListPriority + " < :trxtypeprio");
     select.append("      or (");
     select.append("       trxtype." + propADListPriority + " = :trxtypeprio");
-    select
-        .append("       and trx." + MaterialTransaction.PROPERTY_MOVEMENTQUANTITY + " >= :trxqty");
-    select.append("   ))))");
-
-    select.append(" ) or (");
-
-    select.append("  trx." + MaterialTransaction.PROPERTY_TRANSACTIONPROCESSDATE + " >= :fixbdt");
-    select.append("  and (");
-    select.append("   trx." + MaterialTransaction.PROPERTY_MOVEMENTDATE + " < :mvtdate");
-    select.append("   or (");
-    select.append("    trx." + MaterialTransaction.PROPERTY_MOVEMENTDATE + " = :mvtdate");
-    // If there are more than one trx on the same trx process date filter out those types with less
-    // priority and / or higher quantity.
-    select.append("    and (");
-    select
-        .append("     trx." + MaterialTransaction.PROPERTY_TRANSACTIONPROCESSDATE + " < :trxdate");
-    select.append("     or (");
-    select.append("      trx." + MaterialTransaction.PROPERTY_TRANSACTIONPROCESSDATE
-        + " = :trxdate");
-    select.append("      and (");
-    select.append("       trxtype." + propADListPriority + " < :trxtypeprio");
-    select.append("       or (");
-    select.append("        trxtype." + propADListPriority + " = :trxtypeprio");
-    select
-        .append("        and trx." + MaterialTransaction.PROPERTY_MOVEMENTQUANTITY + " > :trxqty");
+    select.append("       and trx." + MaterialTransaction.PROPERTY_MOVEMENTQUANTITY + " > :trxqty");
     select.append("        or (");
     select.append("         trx." + MaterialTransaction.PROPERTY_MOVEMENTQUANTITY + " = :trxqty");
-    select.append("         and trx." + MaterialTransaction.PROPERTY_ID + " >= :trxid");
-    select.append("    ))))");
-    select.append("  )))))");
+    select.append("         and trx." + MaterialTransaction.PROPERTY_ID + " <= :trxid");
+    select.append("   ))))");
+    if (costingRule.isBackdatedTransactionsFixed()) {
+      select.append(" )) or (");
+
+      select.append("  trx." + MaterialTransaction.PROPERTY_TRANSACTIONPROCESSDATE + " >= :fixbdt");
+      select.append("  and (");
+      select.append("   trx." + MaterialTransaction.PROPERTY_MOVEMENTDATE + " < :mvtdate");
+      select.append("   or (");
+      select.append("    trx." + MaterialTransaction.PROPERTY_MOVEMENTDATE + " = :mvtdate");
+      // If there are more than one trx on the same trx process date filter out those types with
+      // less
+      // priority and / or higher quantity.
+      select.append("    and (");
+      select.append("     trx." + MaterialTransaction.PROPERTY_TRANSACTIONPROCESSDATE
+          + " < :trxdate");
+      select.append("     or (");
+      select.append("      trx." + MaterialTransaction.PROPERTY_TRANSACTIONPROCESSDATE
+          + " = :trxdate");
+      select.append("      and (");
+      select.append("       trxtype." + propADListPriority + " < :trxtypeprio");
+      select.append("       or (");
+      select.append("        trxtype." + propADListPriority + " = :trxtypeprio");
+      select.append("        and trx." + MaterialTransaction.PROPERTY_MOVEMENTQUANTITY
+          + " > :trxqty");
+      select.append("        or (");
+      select.append("         trx." + MaterialTransaction.PROPERTY_MOVEMENTQUANTITY + " = :trxqty");
+      select.append("         and trx." + MaterialTransaction.PROPERTY_ID + " <= :trxid");
+      select.append("    ))))");
+      select.append("   ))))");
+    }
+    select.append("  )");
     if (costDimensions.get(CostDimension.Warehouse) != null) {
       select.append("  and locator." + Locator.PROPERTY_WAREHOUSE + ".id = :warehouse");
     }
@@ -395,19 +406,14 @@
     Query trxQry = OBDal.getInstance().getSession().createQuery(select.toString());
     trxQry.setParameter("refid", MovementTypeRefID);
     trxQry.setParameter("product", trx.getProduct());
-    trxQry.setParameter("mvtdate", trx.getMovementDate());
     trxQry.setParameter("trxdate", trx.getTransactionProcessDate());
     trxQry.setParameter("trxtypeprio", getTrxTypePrio(trx.getMovementType()));
     trxQry.setParameter("trxqty", trx.getMovementQuantity());
     trxQry.setParameter("trxid", trx.getId());
-    CostingRule costingRule = CostingUtils.getCostDimensionRule(costorg,
-        trx.getTransactionProcessDate());
+
     if (costingRule.isBackdatedTransactionsFixed()) {
+      trxQry.setParameter("mvtdate", trx.getMovementDate());
       trxQry.setParameter("fixbdt", costingRule.getFixbackdatedfrom());
-    } else {
-      Calendar cal = Calendar.getInstance();
-      cal.set(9999, 12, 31);
-      trxQry.setParameter("fixbdt", cal.getTime());
     }
 
     if (costDimensions.get(CostDimension.Warehouse) != null) {
@@ -572,6 +578,8 @@
       orgs = osp.getChildTree("0", false);
       costDimensions = CostingUtils.getEmptyDimensions();
     }
+    CostingRule costingRule = CostingUtils.getCostDimensionRule(costorg,
+        trx.getTransactionProcessDate());
 
     StringBuffer select = new StringBuffer();
     select.append(" select sum(case");
@@ -592,13 +600,16 @@
 
     select.append("  and trx." + MaterialTransaction.PROPERTY_PRODUCT + " = :product");
     // Include only transactions that have its cost calculated
-    select.append("   and trx." + MaterialTransaction.PROPERTY_ISCOSTCALCULATED + " = true");
+    select.append("  and trx." + MaterialTransaction.PROPERTY_ISCOSTCALCULATED + " = true");
+    select.append("  and (");
 
-    select.append("  and ( ");
-    select.append("   ( trx." + MaterialTransaction.PROPERTY_TRANSACTIONPROCESSDATE + " < :fixbdt");
+    if (costingRule.isBackdatedTransactionsFixed()) {
+      select.append("   ( trx." + MaterialTransaction.PROPERTY_TRANSACTIONPROCESSDATE
+          + " < :fixbdt");
+      select.append(" and (");
+    }
     // If there are more than one trx on the same trx process date filter out those types with less
     // priority and / or higher quantity.
-    select.append(" and (");
     select.append("  trx." + MaterialTransaction.PROPERTY_TRANSACTIONPROCESSDATE + " < :trxdate");
     select.append("  or (");
     select.append("   trx." + MaterialTransaction.PROPERTY_TRANSACTIONPROCESSDATE + " = :trxdate");
@@ -606,30 +617,40 @@
     select.append("    trxtype." + propADListPriority + " < :trxtypeprio");
     select.append("    or (");
     select.append("     trxtype." + propADListPriority + " = :trxtypeprio");
-    select.append("     and trx." + MaterialTransaction.PROPERTY_MOVEMENTQUANTITY + " >= :trxqty");
+    select.append("     and trx." + MaterialTransaction.PROPERTY_MOVEMENTQUANTITY + " = :trxqty");
+    select.append("        or (");
+    select.append("         trx." + MaterialTransaction.PROPERTY_MOVEMENTQUANTITY + " = :trxqty");
+    select.append("         and trx." + MaterialTransaction.PROPERTY_ID + " <= :trxid");
     select.append(" ))))");
 
-    select.append(" ) or (");
+    if (costingRule.isBackdatedTransactionsFixed()) {
+      select.append(" )) or (");
+      select
+          .append("   trx." + MaterialTransaction.PROPERTY_TRANSACTIONPROCESSDATE + " >= :fixbdt");
 
-    select.append("   trx." + MaterialTransaction.PROPERTY_MOVEMENTDATE + " < :mvtdate");
-    select.append("   or (");
-    select.append("    trx." + MaterialTransaction.PROPERTY_MOVEMENTDATE + " = :mvtdate");
-    // If there are more than one trx on the same trx process date filter out those types with less
-    // priority and / or higher quantity.
-    select.append(" and (");
-    select.append("  trx." + MaterialTransaction.PROPERTY_TRANSACTIONPROCESSDATE + " < :trxdate");
-    select.append("  or (");
-    select.append("   trx." + MaterialTransaction.PROPERTY_TRANSACTIONPROCESSDATE + " = :trxdate");
-    select.append("   and (");
-    select.append("    trxtype." + propADListPriority + " < :trxtypeprio");
-    select.append("    or (");
-    select.append("     trxtype." + propADListPriority + " = :trxtypeprio");
-    select.append("     and trx." + MaterialTransaction.PROPERTY_MOVEMENTQUANTITY + " > :trxqty");
-    select.append("        or (");
-    select.append("         trx." + MaterialTransaction.PROPERTY_MOVEMENTQUANTITY + " = :trxqty");
-    select.append("         and trx." + MaterialTransaction.PROPERTY_ID + " >= :trxid");
-    select.append("  )))))");
-    select.append(" )))");
+      select.append("   and (trx." + MaterialTransaction.PROPERTY_MOVEMENTDATE + " < :mvtdate");
+      select.append("   or (");
+      select.append("    trx." + MaterialTransaction.PROPERTY_MOVEMENTDATE + " = :mvtdate");
+      // If there are more than one trx on the same trx process date filter out those types with
+      // less
+      // priority and / or higher quantity.
+      select.append(" and (");
+      select.append("  trx." + MaterialTransaction.PROPERTY_TRANSACTIONPROCESSDATE + " < :trxdate");
+      select.append("  or (");
+      select
+          .append("   trx." + MaterialTransaction.PROPERTY_TRANSACTIONPROCESSDATE + " = :trxdate");
+      select.append("   and (");
+      select.append("    trxtype." + propADListPriority + " < :trxtypeprio");
+      select.append("    or (");
+      select.append("     trxtype." + propADListPriority + " = :trxtypeprio");
+      select.append("     and trx." + MaterialTransaction.PROPERTY_MOVEMENTQUANTITY + " > :trxqty");
+      select.append("        or (");
+      select.append("         trx." + MaterialTransaction.PROPERTY_MOVEMENTQUANTITY + " = :trxqty");
+      select.append("         and trx." + MaterialTransaction.PROPERTY_ID + " <= :trxid");
+      select.append("  ))))))");
+      select.append(" ))");
+    }
+    select.append(" )");
 
     if (costDimensions.get(CostDimension.Warehouse) != null) {
       select.append("  and locator." + Locator.PROPERTY_WAREHOUSE + ".id = :warehouse");
@@ -642,24 +663,17 @@
     Query trxQry = OBDal.getInstance().getSession().createQuery(select.toString());
     trxQry.setParameter("refid", MovementTypeRefID);
     trxQry.setParameter("product", trx.getProduct());
-
-    trxQry.setParameter("mvtdate", trx.getMovementDate());
-
-    trxQry.setParameter("trxdate", trx.getTransactionProcessDate());
     if (costDimensions.get(CostDimension.Warehouse) != null) {
       trxQry.setParameter("warehouse", costDimensions.get(CostDimension.Warehouse).getId());
     }
+
+    trxQry.setParameter("trxdate", trx.getTransactionProcessDate());
     trxQry.setParameter("trxtypeprio", getTrxTypePrio(trx.getMovementType()));
     trxQry.setParameter("trxqty", trx.getMovementQuantity());
     trxQry.setParameter("trxid", trx.getId());
-    CostingRule costingRule = CostingUtils.getCostDimensionRule(costorg,
-        trx.getTransactionProcessDate());
     if (costingRule.isBackdatedTransactionsFixed()) {
+      trxQry.setParameter("mvtdate", trx.getMovementDate());
       trxQry.setParameter("fixbdt", costingRule.getFixbackdatedfrom());
-    } else {
-      Calendar cal = Calendar.getInstance();
-      cal.set(9999, 12, 31);
-      trxQry.setParameter("fixbdt", cal.getTime());
     }
 
     trxQry.setParameterList("orgs", orgs);
--- a/src/org/openbravo/costing/CostingAlgorithmAdjustmentImp.java	Tue Nov 18 10:57:35 2014 +0100
+++ b/src/org/openbravo/costing/CostingAlgorithmAdjustmentImp.java	Tue Nov 18 11:03:11 2014 +0100
@@ -531,12 +531,15 @@
 
   private BigDecimal getInventoryClosingAmt(CostAdjustmentLine costAdjLine) {
     MaterialTransaction trx = costAdjLine.getInventoryTransaction();
-    BigDecimal trxCalculatedCost = CostAdjustmentUtils.getTrxCost(trx, true, getCostCurrency());
-    BigDecimal trxExpectedCost = CostAdjustmentUtils.getValuedStockOnMovementDateByAttrAndLocator(
-        trx.getProduct(), getCostOrg(), trx.getMovementDate(), getCostDimensions(),
-        trx.getStorageBin(), trx.getAttributeSetValue(), getCostCurrency(), true);
+    // currentBalanceOnDate already includes the cost of the inventory closing. The balance after an
+    // inventory closing should be zero, so the adjustment amount should be de current balance
+    // negated.
+    BigDecimal currentBalanceOnDate = CostAdjustmentUtils
+        .getValuedStockOnMovementDateByAttrAndLocator(trx.getProduct(), getCostOrg(),
+            trx.getMovementDate(), getCostDimensions(), trx.getStorageBin(),
+            trx.getAttributeSetValue(), getCostCurrency(), true);
 
-    return trxExpectedCost.subtract(trxCalculatedCost);
+    return currentBalanceOnDate.negate();
   }
 
   /**
--- a/src/org/openbravo/costing/CostingBackground.java	Tue Nov 18 10:57:35 2014 +0100
+++ b/src/org/openbravo/costing/CostingBackground.java	Tue Nov 18 11:03:11 2014 +0100
@@ -130,6 +130,7 @@
       bundle.setResult(result);
       return;
     } catch (Exception e) {
+      OBDal.getInstance().rollbackAndClose();
       result = OBMessageUtils.translateError(bundle.getConnection(), bundle.getContext().toVars(),
           OBContext.getOBContext().getLanguage().getLanguage(), e.getMessage());
       result.setType("Error");
--- a/src/org/openbravo/costing/CostingRuleProcess.java	Tue Nov 18 10:57:35 2014 +0100
+++ b/src/org/openbravo/costing/CostingRuleProcess.java	Tue Nov 18 11:03:11 2014 +0100
@@ -118,7 +118,9 @@
           OBDal.getInstance().flush();
         }
         createCostingRuleInits(ruleId, childOrgs, startingDate);
-        rule.setFixbackdatedfrom(startingDate);
+        if (rule.getFixbackdatedfrom() == null && rule.isBackdatedTransactionsFixed()) {
+          rule.setFixbackdatedfrom(startingDate);
+        }
 
         // Update cost of inventories and process starting physical inventories.
         updateInventoriesCostAndProcessInitInventories(ruleId, startingDate, existsPreviousRule);
--- a/src/org/openbravo/costing/CostingServer.java	Tue Nov 18 10:57:35 2014 +0100
+++ b/src/org/openbravo/costing/CostingServer.java	Tue Nov 18 11:03:11 2014 +0100
@@ -132,6 +132,7 @@
 
   private void checkCostAdjustments() {
     TrxType trxType = TrxType.getTrxType(transaction);
+    boolean adjustmentAlreadyCreated = false;
     if (trxType == TrxType.InventoryClosing) {
       OBDal.getInstance().refresh(transaction.getPhysicalInventoryLine().getPhysInventory());
       if (transaction.getPhysicalInventoryLine().getPhysInventory()
@@ -153,7 +154,10 @@
       checkPriceCorrectionTrxs = false;
     }
     if (checkPriceCorrectionTrxs && transaction.isCheckpricedifference()) {
-      PriceDifferenceProcess.processPriceDifferenceTransaction(transaction);
+      JSONObject message = PriceDifferenceProcess.processPriceDifferenceTransaction(transaction);
+      if (message.has("documentNo")) {
+        adjustmentAlreadyCreated = true;
+      }
     }
 
     // check if landed cost need to be processed
@@ -188,24 +192,29 @@
             landedCost.setReferenceDate(new Date());
             landedCost.setDocumentType(docType);
             landedCost.setDocumentNo(docNo);
-            landedCost.setCurrency(currency);
             landedCost.setOrganization(organization);
             OBDal.getInstance().save(landedCost);
 
             LCReceipt lcReceipt = OBProvider.getInstance().get(LCReceipt.class);
             lcReceipt.setLandedCost(landedCost);
+            lcReceipt.setOrganization(organization);
             lcReceipt.setGoodsShipment(transaction.getGoodsShipmentLine().getShipmentReceipt());
             OBDal.getInstance().save(lcReceipt);
 
           }
           final LandedCostCost landedCostCost = (LandedCostCost) lcLines.get()[0];
           landedCostCost.setLandedCost(landedCost);
+          landedCost.getLandedCostCostList().add(landedCostCost);
+          OBDal.getInstance().save(landedCost);
           OBDal.getInstance().save(landedCostCost);
         }
 
         if (landedCost != null) {
           OBDal.getInstance().flush();
           JSONObject message = LandedCostProcess.doProcessLandedCost(landedCost);
+          if (message.has("documentNo")) {
+            adjustmentAlreadyCreated = true;
+          }
 
           if (message.get("severity") != "success") {
             throw new OBException(OBMessageUtils.parseTranslation("@ErrorProcessingLandedCost@")
@@ -240,6 +249,7 @@
           throw new OBException(OBMessageUtils.parseTranslation("@ErrorProcessingCostAdj@") + ": "
               + costAdjustmentHeader.getDocumentNo() + " - " + message.getString("text"));
         }
+        adjustmentAlreadyCreated = true;
       } catch (JSONException ignore) {
         throw new OBException(OBMessageUtils.parseTranslation("@ErrorProcessingCostAdj@"));
       }
@@ -262,7 +272,8 @@
         costingRule.isBackdatedTransactionsFixed());
     // the stock previous to transaction was negative
     if (checkNegativeStockCorrectionTrxs
-        && currentStock.compareTo(transaction.getMovementQuantity()) < 0 && modifiesAvg) {
+        && currentStock.compareTo(transaction.getMovementQuantity()) < 0 && modifiesAvg
+        && !adjustmentAlreadyCreated) {
 
       CostAdjustment costAdjustmentHeader = CostAdjustmentUtils.insertCostAdjustmentHeader(
           transaction.getOrganization(), "NSC"); // NSC= Negative Stock Correction
@@ -271,6 +282,7 @@
       CostAdjustmentLine cal = CostAdjustmentUtils.insertCostAdjustmentLine(transaction,
           costAdjustmentHeader, null, Boolean.TRUE, acctDate);
       cal.setNegativeStockCorrection(Boolean.TRUE);
+      cal.setUnitCost(Boolean.FALSE);
       OBDal.getInstance().save(cal);
       OBDal.getInstance().flush();
 
--- a/src/org/openbravo/costing/CostingUtils.java	Tue Nov 18 10:57:35 2014 +0100
+++ b/src/org/openbravo/costing/CostingUtils.java	Tue Nov 18 11:03:11 2014 +0100
@@ -484,7 +484,7 @@
 
   public static CostingRule getCostDimensionRule(Organization org, Date date) {
     StringBuffer where = new StringBuffer();
-    where.append(CostingRule.PROPERTY_ORGANIZATION + " = :organization");
+    where.append(CostingRule.PROPERTY_ORGANIZATION + ".id = :organization");
     where.append(" and (" + CostingRule.PROPERTY_STARTINGDATE + " is null ");
     where.append("   or " + CostingRule.PROPERTY_STARTINGDATE + " <= :startdate)");
     where.append(" and (" + CostingRule.PROPERTY_ENDINGDATE + " is null");
@@ -495,7 +495,7 @@
     OBQuery<CostingRule> crQry = OBDal.getInstance().createQuery(CostingRule.class,
         where.toString());
     crQry.setFilterOnReadableOrganization(false);
-    crQry.setNamedParameter("organization", org);
+    crQry.setNamedParameter("organization", org.getId());
     crQry.setNamedParameter("startdate", date);
     crQry.setNamedParameter("enddate", date);
     crQry.setMaxResult(1);
--- a/src/org/openbravo/costing/FixBackdatedTransactionsProcess.java	Tue Nov 18 10:57:35 2014 +0100
+++ b/src/org/openbravo/costing/FixBackdatedTransactionsProcess.java	Tue Nov 18 11:03:11 2014 +0100
@@ -68,7 +68,8 @@
       rule.setBackdatedTransactionsFixed(Boolean.TRUE);
       OBDal.getInstance().save(rule);
 
-      if (jsonparams.has("fixbackdatedfrom")) {
+      if (jsonparams.has("fixbackdatedfrom")
+          && !jsonparams.getString("fixbackdatedfrom").equals("null")) {
         try {
           fixbackdatedfrom = JsonUtils.createDateFormat().parse(
               jsonparams.getString("fixbackdatedfrom"));
--- a/src/org/openbravo/costing/InventoryAmountUpdateProcess.java	Tue Nov 18 10:57:35 2014 +0100
+++ b/src/org/openbravo/costing/InventoryAmountUpdateProcess.java	Tue Nov 18 11:03:11 2014 +0100
@@ -173,7 +173,7 @@
     InventoryAmountUpdateLine line = OBDal.getInstance().get(InventoryAmountUpdateLine.class,
         lineId);
     ScrollableResults stockLines = getStockLines(childOrgs, date, line.getProduct(), warehouse,
-        costRule.isFixBackdatedTransactions());
+        costRule.isBackdatedTransactionsFixed());
     // The key of the Map is the concatenation of orgId and warehouseId
     Map<String, String> inventories = new HashMap<String, String>();
     Map<String, Long> maxLineNumbers = new HashMap<String, Long>();
--- a/src/org/openbravo/costing/LCCostMatchFromInvoiceHandler.java	Tue Nov 18 10:57:35 2014 +0100
+++ b/src/org/openbravo/costing/LCCostMatchFromInvoiceHandler.java	Tue Nov 18 11:03:11 2014 +0100
@@ -45,6 +45,7 @@
   @Override
   protected JSONObject doExecute(Map<String, Object> parameters, String content) {
     JSONObject jsonResponse = new JSONObject();
+    JSONObject jsonMessage = null;
     OBContext.setAdminMode(true);
     try {
       JSONObject jsonRequest = new JSONObject(content);
@@ -58,11 +59,13 @@
       }
 
       JSONArray selectedLines = jsonparams.getJSONObject("LCCosts").getJSONArray("_selection");
-      processSelectedLines(il, selectedLines, existingMatchings);
+      jsonMessage = processSelectedLines(il, selectedLines, existingMatchings);
 
-      JSONObject jsonMessage = new JSONObject();
-      jsonMessage.put("severity", "success");
-      jsonMessage.put("text", OBMessageUtils.messageBD("Success"));
+      if (jsonMessage == null) {
+        jsonMessage = new JSONObject();
+        jsonMessage.put("severity", "success");
+        jsonMessage.put("text", OBMessageUtils.messageBD("Success"));
+      }
       jsonResponse.put("message", jsonMessage);
 
     } catch (JSONException e) {
@@ -88,8 +91,9 @@
     return jsonResponse;
   }
 
-  private void processSelectedLines(InvoiceLine il, JSONArray selectedLines,
+  private JSONObject processSelectedLines(InvoiceLine il, JSONArray selectedLines,
       List<String> existingMatchings) throws JSONException {
+    JSONObject message = null;
     for (int i = 0; i < selectedLines.length(); i++) {
       JSONObject line = selectedLines.getJSONObject(i);
       final String strLCMatchedId = line.getString("matchedLandedCost");
@@ -135,8 +139,9 @@
         lcCost.setMatchingAdjusted(isMatchingAdjusted);
         OBDal.getInstance().save(lcCost);
       }
+      OBDal.getInstance().flush();
       if (processMatching) {
-        LCMatchingProcess.doProcessLCMatching(lcCost);
+        message = LCMatchingProcess.doProcessLCMatching(lcCost);
       }
     }
     // Delete unselected matches
@@ -158,5 +163,6 @@
       }
       OBDal.getInstance().save(il);
     }
+    return message;
   }
 }
--- a/src/org/openbravo/costing/LCMatchingProcess.java	Tue Nov 18 10:57:35 2014 +0100
+++ b/src/org/openbravo/costing/LCMatchingProcess.java	Tue Nov 18 11:03:11 2014 +0100
@@ -171,6 +171,8 @@
       CostAdjustmentLine cal = CostAdjustmentUtils.insertCostAdjustmentLine(trx, ca, amt, true,
           referenceDate);
       cal.setNeedsPosting(Boolean.FALSE);
+      cal.setUnitCost(Boolean.FALSE);
+      cal.setCurrency(lcCost.getCurrency());
       OBDal.getInstance().save(cal);
 
       if (i % 100 == 0) {
--- a/src/org/openbravo/costing/LandedCostDistributionByAmount.java	Tue Nov 18 10:57:35 2014 +0100
+++ b/src/org/openbravo/costing/LandedCostDistributionByAmount.java	Tue Nov 18 11:03:11 2014 +0100
@@ -45,21 +45,20 @@
   @Override
   public void distributeAmount(LandedCostCost lcCost, boolean isMatching) {
     // Calculate total amount of all receipt lines assigned to the landed cost.
+    lcCost = (LandedCostCost) OBDal.getInstance().getProxy(LandedCostCost.ENTITY_NAME,
+        lcCost.getId());
     LandedCost landedCost = lcCost.getLandedCost();
-    String strCurId = landedCost.getCurrency().getId();
+    // Get the currency of the Landed Cost Cost
+    String strCurId = lcCost.getCurrency().getId();
     String strOrgId = landedCost.getOrganization().getId();
     Date dateReference = landedCost.getReferenceDate();
-    int precission = landedCost.getCurrency().getStandardPrecision().intValue();
+    int precission = lcCost.getCurrency().getCostingPrecision().intValue();
     BigDecimal baseAmt;
     if (isMatching) {
       baseAmt = lcCost.getMatchingAmount().subtract(lcCost.getAmount());
     } else {
       baseAmt = lcCost.getAmount();
     }
-    if (!lcCost.getCurrency().getId().equals(strCurId)) {
-      baseAmt = FinancialUtils.getConvertedAmount(baseAmt, lcCost.getCurrency(),
-          landedCost.getCurrency(), dateReference, landedCost.getOrganization(), "C");
-    }
 
     BigDecimal totalAmt = BigDecimal.ZERO;
 
@@ -111,6 +110,8 @@
       LCReceiptLineAmt lcrla = OBProvider.getInstance().get(LCReceiptLineAmt.class);
       lcrla.setLandedCostCost((LandedCostCost) OBDal.getInstance().getProxy(
           LandedCostCost.ENTITY_NAME, lcCost.getId()));
+      lcCost = (LandedCostCost) OBDal.getInstance().getProxy(LandedCostCost.ENTITY_NAME,
+          lcCost.getId());
       lcrla.setLandedCostReceipt(lcrl);
       lcrla.setGoodsShipmentLine(receiptline);
       lcrla.setMatchingAdjustment(isMatching);
--- a/src/org/openbravo/costing/LandedCostProcess.java	Tue Nov 18 10:57:35 2014 +0100
+++ b/src/org/openbravo/costing/LandedCostProcess.java	Tue Nov 18 11:03:11 2014 +0100
@@ -42,6 +42,7 @@
 import org.openbravo.dal.service.OBDal;
 import org.openbravo.dal.service.OBQuery;
 import org.openbravo.erpCommon.utility.OBMessageUtils;
+import org.openbravo.model.common.currency.Currency;
 import org.openbravo.model.materialmgmt.cost.CostAdjustment;
 import org.openbravo.model.materialmgmt.cost.CostAdjustmentLine;
 import org.openbravo.model.materialmgmt.cost.LCDistributionAlgorithm;
@@ -96,6 +97,7 @@
       landedCost.setDocumentStatus("CO");
       landedCost.setProcessed(Boolean.TRUE);
       OBDal.getInstance().save(landedCost);
+      message.put("documentNo", ca.getDocumentNo());
     } catch (JSONException ignore) {
     } finally {
       OBContext.restorePreviousMode();
@@ -196,11 +198,19 @@
 
     StringBuffer hql = new StringBuffer();
     hql.append(" select sum(rla." + LCReceiptLineAmt.PROPERTY_AMOUNT + ") as amt");
+    hql.append("   , rla." + LCReceiptLineAmt.PROPERTY_LANDEDCOSTCOST
+        + ".currency.id as lcCostCurrency");
     hql.append("   , rla." + LCReceipt.PROPERTY_GOODSSHIPMENTLINE + ".id as receipt");
+    hql.append("   , (select " + MaterialTransaction.PROPERTY_TRANSACTIONPROCESSDATE + " from "
+        + MaterialTransaction.ENTITY_NAME + " as transaction where "
+        + MaterialTransaction.PROPERTY_GOODSSHIPMENTLINE + ".id = rla."
+        + LCReceipt.PROPERTY_GOODSSHIPMENTLINE + ".id) as trxprocessdate");
     hql.append(" from " + LCReceiptLineAmt.ENTITY_NAME + " as rla");
     hql.append("   join rla." + LCReceiptLineAmt.PROPERTY_LANDEDCOSTRECEIPT + " as rl");
     hql.append(" where rl." + LCReceipt.PROPERTY_LANDEDCOST + " = :lc");
-    hql.append(" group by rla." + LCReceipt.PROPERTY_GOODSSHIPMENTLINE + ".id");
+    hql.append(" group by rla." + LCReceiptLineAmt.PROPERTY_LANDEDCOSTCOST + ".currency.id");
+    hql.append(" , rla." + LCReceipt.PROPERTY_GOODSSHIPMENTLINE + ".id");
+    hql.append(" order by trxprocessdate, amt");
 
     Query qryLCRLA = OBDal.getInstance().getSession().createQuery(hql.toString());
     qryLCRLA.setParameter("lc", landedCost);
@@ -211,14 +221,17 @@
       log.debug("Process receipt amounts");
       Object[] receiptAmt = receiptamts.get();
       BigDecimal amt = (BigDecimal) receiptAmt[0];
+      Currency lcCostCurrency = OBDal.getInstance().get(Currency.class, (String) receiptAmt[1]);
       ShipmentInOutLine receiptLine = OBDal.getInstance().get(ShipmentInOutLine.class,
-          (String) receiptAmt[1]);
+          (String) receiptAmt[2]);
       // MaterialTransaction receiptLine = (MaterialTransaction) record[1];
       MaterialTransaction trx = receiptLine.getMaterialMgmtMaterialTransactionList().get(0);
       CostAdjustmentLine cal = CostAdjustmentUtils.insertCostAdjustmentLine(trx, ca, amt, true,
           referenceDate);
       cal.setNeedsPosting(Boolean.FALSE);
       cal.setUnitCost(Boolean.FALSE);
+      cal.setCurrency(lcCostCurrency);
+      cal.setLineNo((i + 1) * 10L);
       OBDal.getInstance().save(cal);
 
       if (i % 100 == 0) {
--- a/src/org/openbravo/costing/PriceDifferenceProcess.java	Tue Nov 18 10:57:35 2014 +0100
+++ b/src/org/openbravo/costing/PriceDifferenceProcess.java	Tue Nov 18 11:03:11 2014 +0100
@@ -34,6 +34,7 @@
 import org.openbravo.financial.FinancialUtils;
 import org.openbravo.model.common.currency.Currency;
 import org.openbravo.model.common.enterprise.Organization;
+import org.openbravo.model.common.invoice.Invoice;
 import org.openbravo.model.common.plm.Product;
 import org.openbravo.model.materialmgmt.cost.CostAdjustment;
 import org.openbravo.model.materialmgmt.cost.CostAdjustmentLine;
@@ -77,11 +78,12 @@
     BigDecimal expectedCost = BigDecimal.ZERO;
     BigDecimal invoiceQty = BigDecimal.ZERO;
     for (ReceiptInvoiceMatch matchInv : receiptLine.getProcurementReceiptInvoiceMatchList()) {
-      if (matchInv.getInvoiceLine().getInvoice().getDocumentStatus().equals("VO")) {
+      Invoice invoice = matchInv.getInvoiceLine().getInvoice();
+      if (invoice.getDocumentStatus().equals("VO")) {
         // Skip voided invoices.
         continue;
       }
-      if (!matchInv.getInvoiceLine().getInvoice().isProcessed()) {
+      if (!invoice.isProcessed()) {
         // Skip not processed invoices.
         continue;
       }
@@ -92,12 +94,13 @@
         invoiceQty = invoiceQty.add(matchInv.getQuantity());
       }
       invoiceAmt = matchInv.getQuantity().multiply(matchInv.getInvoiceLine().getUnitPrice());
-      invoiceAmt = FinancialUtils.getConvertedAmount(invoiceAmt, matchInv.getInvoiceLine()
-          .getInvoice().getCurrency(), trxCurrency, trxDate, trxOrg,
-          FinancialUtils.PRECISION_STANDARD);
+
+      invoiceAmt = FinancialUtils.getConvertedAmount(invoiceAmt, invoice.getCurrency(),
+          trxCurrency, trxDate, trxOrg, FinancialUtils.PRECISION_STANDARD,
+          invoice.getCurrencyConversionRateDocList());
       expectedCost = expectedCost.add(invoiceAmt);
 
-      Date invoiceDate = matchInv.getInvoiceLine().getInvoice().getInvoiceDate();
+      Date invoiceDate = invoice.getInvoiceDate();
       if (costAdjDateAcct == null || costAdjDateAcct.before(invoiceDate)) {
         costAdjDateAcct = invoiceDate;
       }
@@ -153,7 +156,7 @@
       OBDal.getInstance().flush();
       JSONObject message = CostAdjustmentProcess.doProcessCostAdjustment(costAdjHeader);
       try {
-
+        message.put("documentNo", costAdjHeader.getDocumentNo());
         if (message.get("severity") != "success") {
           throw new OBException(OBMessageUtils.parseTranslation("@ErrorProcessingCostAdj@") + ": "
               + costAdjHeader.getDocumentNo() + " - " + message.getString("text"));
@@ -161,6 +164,7 @@
       } catch (JSONException e) {
         throw new OBException(OBMessageUtils.parseTranslation("@ErrorProcessingCostAdj@"));
       }
+
       return message;
     } else {
       JSONObject message = new JSONObject();
--- a/src/org/openbravo/dal/core/DalSessionFactory.java	Tue Nov 18 10:57:35 2014 +0100
+++ b/src/org/openbravo/dal/core/DalSessionFactory.java	Tue Nov 18 11:03:11 2014 +0100
@@ -37,7 +37,9 @@
 import org.hibernate.StatelessSession;
 import org.hibernate.TypeHelper;
 import org.hibernate.classic.Session;
+import org.hibernate.connection.ConnectionProvider;
 import org.hibernate.engine.FilterDefinition;
+import org.hibernate.engine.SessionFactoryImplementor;
 import org.hibernate.engine.SessionImplementor;
 import org.hibernate.jdbc.BorrowedConnectionProxy;
 import org.hibernate.metadata.ClassMetadata;
@@ -304,4 +306,8 @@
   public TypeHelper getTypeHelper() {
     return delegateSessionFactory.getTypeHelper();
   }
+
+  public ConnectionProvider getConnectionProvider() {
+    return ((SessionFactoryImplementor) delegateSessionFactory).getConnectionProvider();
+  }
 }
--- a/src/org/openbravo/erpCommon/ad_actionButton/CopyFromPOOrder.java	Tue Nov 18 10:57:35 2014 +0100
+++ b/src/org/openbravo/erpCommon/ad_actionButton/CopyFromPOOrder.java	Tue Nov 18 11:03:11 2014 +0100
@@ -171,28 +171,32 @@
               Utility.messageBD(this, "TaxNotFound", vars.getLanguage()));
           return myError;
         }
-        // Processing for taxincluded
-        if (order.getPriceList().isPriceIncludesTax()) {
-          BigDecimal grossAmount, grossUnitPrice, qtyOrdered, priceActual;
+        OBContext.setAdminMode(true);
+        try {
+          // Processing for taxincluded
+          if (order.getPriceList().isPriceIncludesTax()) {
+            BigDecimal grossAmount, grossUnitPrice, qtyOrdered, priceActual;
 
-          strGrossUnitPrice = strPriceActual;
-          strGrossBaseUnitPrice = strGrossUnitPrice;
-          grossUnitPrice = (strGrossUnitPrice.equals("") ? ZERO
-              : (new BigDecimal(strGrossUnitPrice))).setScale(pricePrecision,
-              BigDecimal.ROUND_HALF_UP);
-          qtyOrdered = (data[i].qtyordered.equals("") ? ZERO : new BigDecimal(data[i].qtyordered));
-          grossAmount = qtyOrdered.multiply(grossUnitPrice).setScale(stdPrecision,
-              BigDecimal.ROUND_HALF_UP);
-          priceActual = FinancialUtils.calculateNetFromGross(strCTaxID, grossAmount,
-              pricePrecision, grossAmount, qtyOrdered);
+            strGrossUnitPrice = strPriceActual;
+            strGrossBaseUnitPrice = strGrossUnitPrice;
+            grossUnitPrice = (strGrossUnitPrice.equals("") ? ZERO : (new BigDecimal(
+                strGrossUnitPrice))).setScale(pricePrecision, BigDecimal.ROUND_HALF_UP);
+            qtyOrdered = (data[i].qtyordered.equals("") ? ZERO : new BigDecimal(data[i].qtyordered));
+            grossAmount = qtyOrdered.multiply(grossUnitPrice).setScale(stdPrecision,
+                BigDecimal.ROUND_HALF_UP);
+            priceActual = FinancialUtils.calculateNetFromGross(strCTaxID, grossAmount,
+                pricePrecision, grossAmount, qtyOrdered);
 
-          strGrossPriceList = strPriceList;
-          strPriceActual = priceActual.toString();
-          strNetPriceList = priceActual.toString();
-          strPriceLimit = priceActual.toString();
-          strGrossAmount = grossAmount.toString();
-        } else {
-          strNetPriceList = strPriceList;
+            strGrossPriceList = strPriceList;
+            strPriceActual = priceActual.toString();
+            strNetPriceList = priceActual.toString();
+            strPriceLimit = priceActual.toString();
+            strGrossAmount = grossAmount.toString();
+          } else {
+            strNetPriceList = strPriceList;
+          }
+        } finally {
+          OBContext.restorePreviousMode();
         }
 
         int line = Integer.valueOf(orderData[0].line.equals("") ? "0" : orderData[0].line)
@@ -259,8 +263,8 @@
       myError = Utility.translateError(this, vars, vars.getLanguage(), "ProcessRunError");
     }
     try {
+      OBContext.setAdminMode(true);
       for (String strOrderLine : strOrderLineList) {
-        OBContext.setAdminMode(true);
         org.openbravo.model.ad.ui.Process process = OBDal.getInstance().get(
             org.openbravo.model.ad.ui.Process.class, "DFC78024B1F54CBB95DC73425BA6687F");
 
--- a/src/org/openbravo/erpCommon/ad_actionButton/CreateFrom_Shipment.html	Tue Nov 18 10:57:35 2014 +0100
+++ b/src/org/openbravo/erpCommon/ad_actionButton/CreateFrom_Shipment.html	Tue Nov 18 11:03:11 2014 +0100
@@ -89,6 +89,7 @@
     }
 
     function onloadFunctions() {
+        disableFieldButton('buttonBPartnerSel');
     }
     
 
@@ -364,10 +365,10 @@
                       <input type="hidden" name="inpcBpartnerId" id="paramBPartnerId" value="">
                     </td>
                     <td class="TextBox_ContentCell">
-                      <input type="text" class="dojoValidateValid TextBox_btn_TwoCells_width" maxlength="22" name="inpBpartnerId_DES" id="paramBPartnerDescription" value=""></input>
+                      <input type="text" class="dojoValidateValid TextBox_btn_TwoCells_width" maxlength="22" name="inpBpartnerId_DES" id="paramBPartnerDescription" value="" disabled></input>
                     </td>
                     <td class="FieldButton_ContentCell">
-                      <a class="FieldButtonLink" href="#" onfocus="setWindowElementFocus(this); window.status='Business Partner'; return true;" onblur=" window.status=''; return true;" onkeypress="this.className='FieldButtonLink_active'; return true;" onkeyup="this.className='FieldButtonLink_focus'; return true;"  onclick="openSearch(null, null, '../info/BusinessPartner.html', 'SELECTOR_BUSINESS', false, 'frmMain', 'inpcBpartnerId', 'inpBpartnerId_DES', document.frmMain.inpBpartnerId_DES.value, 'WindowID', 'xx');return false;" >
+                      <a id="buttonBPartnerSel" class="FieldButtonLink" href="#" onfocus="setWindowElementFocus(this); window.status='Business Partner'; return true;" onblur=" window.status=''; return true;" onkeypress="this.className='FieldButtonLink_active'; return true;" onkeyup="this.className='FieldButtonLink_focus'; return true;"  onclick="openSearch(null, null, '../info/BusinessPartner.html', 'SELECTOR_BUSINESS', false, 'frmMain', 'inpcBpartnerId', 'inpBpartnerId_DES', document.frmMain.inpBpartnerId_DES.value, 'WindowID', 'xx');return false;" >
                         <table class="FieldButton"onmouseout="this.className='FieldButton';window.status='';return true;" onmouseover="this.className='FieldButton_hover';window.status='Business Partner';return true;" onmousedown="this.className='FieldButton_active';return true;" onmouseup="this.className='FieldButton';return true;">
                           <tr>
                             <td class="FieldButton_bg">
--- a/src/org/openbravo/erpCommon/ad_actionButton/CreateFrom_ShipmentPO.html	Tue Nov 18 10:57:35 2014 +0100
+++ b/src/org/openbravo/erpCommon/ad_actionButton/CreateFrom_ShipmentPO.html	Tue Nov 18 11:03:11 2014 +0100
@@ -85,6 +85,7 @@
     }
 
     function onloadFunctions() {
+    	disableFieldButton('buttonBPartnerSel');
     }
 
     function enableLocalShortcuts(){
@@ -404,10 +405,10 @@
                       <input type="hidden" name="inpcBpartnerId" id="paramBPartnerId" value="">
                     </td>
                     <td class="TextBox_ContentCell">
-                      <input type="text" class="dojoValidateValid TextBox_btn_TwoCells_width" maxlength="22" name="inpBpartnerId_DES" id="paramBPartnerDescription" value=""></input>
+                      <input type="text" class="dojoValidateValid TextBox_btn_TwoCells_width" maxlength="22" name="inpBpartnerId_DES" id="paramBPartnerDescription" value="" disabled></input>
                     </td>
                     <td class="FieldButton_ContentCell">
-                      <a class="FieldButtonLink" href="#" onfocus="setWindowElementFocus(this); window.status='Business Partner'; return true;" onblur=" window.status=''; return true;" onkeypress="this.className='FieldButtonLink_active'; return true;" onkeyup="this.className='FieldButtonLink_focus'; return true;"  onclick="openSearch(null, null, '../info/BusinessPartner.html', 'SELECTOR_BUSINESS', false, 'frmMain', 'inpcBpartnerId', 'inpBpartnerId_DES', document.frmMain.inpBpartnerId_DES.value, 'WindowID', 'xx');return false;" >
+                      <a id="buttonBPartnerSel" class="FieldButtonLink" href="#" onfocus="setWindowElementFocus(this); window.status='Business Partner'; return true;" onblur=" window.status=''; return true;" onkeypress="this.className='FieldButtonLink_active'; return true;" onkeyup="this.className='FieldButtonLink_focus'; return true;"  onclick="openSearch(null, null, '../info/BusinessPartner.html', 'SELECTOR_BUSINESS', false, 'frmMain', 'inpcBpartnerId', 'inpBpartnerId_DES', document.frmMain.inpBpartnerId_DES.value, 'WindowID', 'xx');return false;" >
                         <table class="FieldButton"onmouseout="this.className='FieldButton';window.status='';return true;" onmouseover="this.className='FieldButton_hover';window.status='Business Partner';return true;" onmousedown="this.className='FieldButton_active';return true;" onmouseup="this.className='FieldButton';return true;">
                           <tr>
                             <td class="FieldButton_bg">
--- a/src/org/openbravo/erpCommon/ad_callouts/SL_InvAmtUpd_AmtUnitCost.java	Tue Nov 18 10:57:35 2014 +0100
+++ b/src/org/openbravo/erpCommon/ad_callouts/SL_InvAmtUpd_AmtUnitCost.java	Tue Nov 18 11:03:11 2014 +0100
@@ -23,6 +23,7 @@
 import javax.servlet.ServletException;
 
 import org.openbravo.dal.service.OBDal;
+import org.openbravo.model.common.currency.Currency;
 import org.openbravo.model.common.enterprise.Organization;
 
 public class SL_InvAmtUpd_AmtUnitCost extends SimpleCallout {
@@ -34,13 +35,15 @@
     BigDecimal onHandQty = info.getBigDecimalParameter("inponhandqty");
     String orgId = info.getStringParameter("inpadOrgId", null);
     Organization organization = OBDal.getInstance().get(Organization.class, orgId);
+    Currency currency = organization.getCurrency() != null ? organization.getCurrency()
+        : organization.getClient().getCurrency();
 
     if (info.getLastFieldChanged().equalsIgnoreCase("inpinventoryAmount")) {
       BigDecimal invAmount = info.getBigDecimalParameter("inpinventoryAmount");
       info.addResult(
           "inpunitcost",
-          onHandQty.intValue() == 0 ? BigDecimal.ZERO : invAmount.divide(onHandQty, organization
-              .getCurrency().getPricePrecision().intValue(), BigDecimal.ROUND_HALF_UP));
+          onHandQty.intValue() == 0 ? BigDecimal.ZERO : invAmount.divide(onHandQty, currency
+              .getPricePrecision().intValue(), BigDecimal.ROUND_HALF_UP));
     } else if (info.getLastFieldChanged().equalsIgnoreCase("inpunitcost")) {
       BigDecimal unitCost = info.getBigDecimalParameter("inpunitcost");
       info.addResult("inpinventoryAmount", unitCost.multiply(onHandQty));
--- a/src/org/openbravo/erpCommon/ad_callouts/SL_LandedCost_InvoiceLine.java	Tue Nov 18 10:57:35 2014 +0100
+++ b/src/org/openbravo/erpCommon/ad_callouts/SL_LandedCost_InvoiceLine.java	Tue Nov 18 11:03:11 2014 +0100
@@ -28,7 +28,6 @@
 import org.openbravo.dal.core.OBContext;
 import org.openbravo.dal.service.OBDal;
 import org.openbravo.model.common.invoice.InvoiceLine;
-import org.openbravo.model.materialmgmt.cost.LandedCost;
 
 public class SL_LandedCost_InvoiceLine extends SimpleCallout {
 
@@ -37,7 +36,6 @@
   @Override
   protected void execute(CalloutInfo info) throws ServletException {
     VariablesSecureApp vars = info.vars;
-    String strLCId = vars.getStringParameter("inpmLandedcostId");
     String strInvLineId = vars.getStringParameter("inpcInvoicelineId");
     String strAmount = "";
     String strCurrencyId = "";
@@ -45,13 +43,11 @@
       InvoiceLine invoiceLine = OBDal.getInstance().get(InvoiceLine.class, strInvLineId);
       strAmount = getAmount(invoiceLine);
       strCurrencyId = invoiceLine.getInvoice().getCurrency().getId();
+      info.addResult("inpcCurrencyId", strCurrencyId);
     } else {
       strAmount = "0";
-      LandedCost landedCost = OBDal.getInstance().get(LandedCost.class, strLCId);
-      strCurrencyId = landedCost.getCurrency().getId();
     }
     info.addResult("inpamount", strAmount);
-    info.addResult("inpcCurrencyId", strCurrencyId);
   }
 
   private String getAmount(InvoiceLine invoiceLine) {
--- a/src/org/openbravo/erpCommon/ad_forms/AcctServer.java	Tue Nov 18 10:57:35 2014 +0100
+++ b/src/org/openbravo/erpCommon/ad_forms/AcctServer.java	Tue Nov 18 11:03:11 2014 +0100
@@ -33,6 +33,7 @@
 import java.util.Vector;
 
 import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
 
 import org.apache.commons.lang.StringUtils;
 import org.apache.log4j.Logger;
@@ -43,6 +44,7 @@
 import org.openbravo.base.secureApp.VariablesSecureApp;
 import org.openbravo.base.session.OBPropertiesProvider;
 import org.openbravo.client.kernel.RequestContext;
+import org.openbravo.dal.core.DalUtil;
 import org.openbravo.dal.core.OBContext;
 import org.openbravo.dal.service.OBCriteria;
 import org.openbravo.dal.service.OBDal;
@@ -2175,7 +2177,20 @@
    */
   public void setMessageResult(ConnectionProvider conn, String _strStatus, String strMessageType,
       Map<String, String> _parameters) {
-    VariablesSecureApp vars = new VariablesSecureApp(RequestContext.get().getRequest());
+    HttpServletRequest request = RequestContext.get().getRequest();
+    VariablesSecureApp vars;
+
+    if (request != null) {
+      // getting context info from session
+      vars = new VariablesSecureApp(RequestContext.get().getRequest());
+    } else {
+      // there is no session, getting context info from OBContext
+      OBContext ctx = OBContext.getOBContext();
+      vars = new VariablesSecureApp((String) DalUtil.getId(ctx.getUser()),
+          (String) DalUtil.getId(ctx.getCurrentClient()), (String) DalUtil.getId(ctx
+              .getCurrentOrganization()), (String) DalUtil.getId(ctx.getRole()), ctx.getLanguage()
+              .getLanguage());
+    }
     setMessageResult(conn, vars, _strStatus, strMessageType, _parameters);
   }
 
@@ -2480,8 +2495,10 @@
         } else {
           throw new OBException("@NotConvertible@");
         }
-        amtFromSourcecurrency = amtFrom.multiply(_amount).divide(amtTo, conversionRatePrecision,
-            BigDecimal.ROUND_HALF_EVEN);
+        if (amtTo.compareTo(BigDecimal.ZERO) != 0)
+               amtFromSourcecurrency = amtFrom.multiply(_amount).divide(amtTo, conversionRatePrecision,
+                               BigDecimal.ROUND_HALF_EVEN);
+        else  amtFromSourcecurrency = amtFrom;
       }
     }
     amtDiff = (amtTo).subtract(amtFrom);
--- a/src/org/openbravo/erpCommon/ad_forms/DocLandedCost_data.xsql	Tue Nov 18 10:57:35 2014 +0100
+++ b/src/org/openbravo/erpCommon/ad_forms/DocLandedCost_data.xsql	Tue Nov 18 11:03:11 2014 +0100
@@ -26,7 +26,7 @@
       <![CDATA[
         SELECT '' AS M_LANDEDCOST_ID, '' AS AD_CLIENT_ID, '' AS AD_ORG_ID, '' AS ISACTIVE,
           '' AS CREATED, '' AS CREATEDBY, '' AS UPDATED, '' AS UPDATEDBY, '' AS DATETRX, '' AS PROCESSING,
-          '' AS PROCESSED, '' AS POSTED, '' AS DATEACCT, '' AS DATEDOC, '' AS C_CURRENCY_ID
+          '' AS PROCESSED, '' AS POSTED, '' AS DATEACCT, '' AS DATEDOC
         FROM DUAL
       ]]>
     </Sql>
@@ -37,7 +37,7 @@
     <![CDATA[
         SELECT LC.M_LANDEDCOST_ID, LC.AD_CLIENT_ID, LC.AD_ORG_ID, LC.ISACTIVE, LC.CREATED, LC.CREATEDBY, LC.UPDATED,        
         LC.UPDATEDBY, LC.REFERENCEDATE AS DATETRX, LC.PROCESSING,        
-        LC.PROCESSED, LC.POSTED, LC.REFERENCEDATE AS DATEACCT, LC.REFERENCEDATE AS DATEDOC, LC.C_CURRENCY_ID
+        LC.PROCESSED, LC.POSTED, LC.REFERENCEDATE AS DATEACCT, LC.REFERENCEDATE AS DATEDOC
         FROM M_LANDEDCOST LC      
         WHERE LC.AD_Client_ID=?
         AND LC.M_LANDEDCOST_ID=?
--- a/src/org/openbravo/erpCommon/ad_forms/RequisitionToOrder.xml	Tue Nov 18 10:57:35 2014 +0100
+++ b/src/org/openbravo/erpCommon/ad_forms/RequisitionToOrder.xml	Tue Nov 18 11:03:11 2014 +0100
@@ -62,9 +62,9 @@
     <FIELD id="fieldNeedByDate">needbydate</FIELD>
     <FIELD id="fieldProduct" replaceCharacters="html">product</FIELD>
     <FIELD id="fieldAttribute" replaceCharacters="html">attribute</FIELD>
-    <FIELD id="fieldQuantity" format="euroEdition">qtytoorder</FIELD>
+    <FIELD id="fieldQuantity" format="qtyEdition">qtytoorder</FIELD>
     <FIELD id="fieldUnit" replaceCharacters="html">uomname</FIELD>
-    <FIELD id="fieldSecQuantity" format="euroEdition">quantityorder</FIELD>
+    <FIELD id="fieldSecQuantity" format="qtyEdition">quantityorder</FIELD>
     <FIELD id="fieldSecUnit" replaceCharacters="html">secuomname</FIELD>
     <FIELD id="fieldRequester" replaceCharacters="html">requester</FIELD>
     <FIELD id="fieldVendor" replaceCharacters="html">vendor</FIELD>
@@ -82,13 +82,13 @@
     <FIELD id="fieldSelProduct" replaceCharacters="html">product</FIELD>
     <FIELD id="fieldSelAttribute">attribute</FIELD>
     <FIELD id="fieldSelNeedByDate" replaceCharacters="html">needbydate</FIELD>
-    <FIELD id="fieldReqQty" format="euroEdition">reqqty</FIELD>
-    <FIELD id="fieldMatchedQty" format="euroEdition">matchedqty</FIELD>
-    <FIELD id="fieldSelQty" format="euroEdition" attribute="value">lockqty</FIELD>
+    <FIELD id="fieldReqQty" format="qtyEdition">reqqty</FIELD>
+    <FIELD id="fieldMatchedQty" format="qtyEdition">matchedqty</FIELD>
+    <FIELD id="fieldSelQty" format="qtyEdition" attribute="value">lockqty</FIELD>
     <FIELD id="fieldSelQty" attribute="name" replace="xx">mRequisitionlineId</FIELD>
     <FIELD id="fieldSelPrice" format="priceEdition" attribute="value">lockprice</FIELD>
     <FIELD id="fieldSelUnit" replaceCharacters="html">uomname</FIELD>
-    <FIELD id="fieldSelSecQuantity" format="euroEdition">quantityorder</FIELD>
+    <FIELD id="fieldSelSecQuantity" format="qtyEdition">quantityorder</FIELD>
     <FIELD id="fieldSelSecUnit" replaceCharacters="html">secuomname</FIELD>
     <FIELD id="fieldSelPrice" attribute="name" replace="xx">mRequisitionlineId</FIELD>
     <FIELD id="fieldPriceList" format="priceEdition" replaceCharacters="html">pricelist</FIELD>
--- a/src/org/openbravo/erpCommon/ad_forms/RequisitionToOrder_data.xsql	Tue Nov 18 10:57:35 2014 +0100
+++ b/src/org/openbravo/erpCommon/ad_forms/RequisitionToOrder_data.xsql	Tue Nov 18 11:03:11 2014 +0100
@@ -48,7 +48,9 @@
       <![CDATA[
         SELECT M_REQUISITIONLINE_ID, M_REQUISITIONLINE.NEEDBYDATE,
           M_REQUISITIONLINE.QTY - M_REQUISITIONLINE.ORDEREDQTY AS QTYTOORDER,
-          QUANTITYORDER, C_UOM1.NAME AS SECUOMNAME, C_UOM.NAME AS UOMNAME,
+          QUANTITYORDER,
+          AD_COLUMN_IDENTIFIER(to_char('C_Uom'), to_char(C_UOM1.C_UOM_ID), ?) AS SECUOMNAME,
+          AD_COLUMN_IDENTIFIER(to_char('C_Uom'), to_char(C_UOM.C_UOM_ID), ?) AS UOMNAME,
           CASE WHEN pl.istaxincluded = 'Y' THEN M_REQUISITIONLINE.GROSS_UNIT_PRICE ELSE M_REQUISITIONLINE.PRICEACTUAL END AS PRICE,
           AD_COLUMN_IDENTIFIER(to_char('C_BPartner'), to_char(COALESCE(M_REQUISITIONLINE.C_BPARTNER_ID, M_REQUISITION.C_BPARTNER_ID)), ?) AS VENDOR,
           AD_COLUMN_IDENTIFIER(to_char('M_PriceList'), to_char(COALESCE(M_REQUISITIONLINE.M_PRICELIST_ID, M_REQUISITION.M_PRICELIST_ID)), ?) AS PRICELISTID,
@@ -69,7 +71,7 @@
           AND M_REQUISITIONLINE.AD_ORG_ID IN ('1')
           AND 1=1
         GROUP BY M_REQUISITIONLINE.M_REQUISITIONLINE_ID, M_REQUISITIONLINE.NEEDBYDATE, M_REQUISITIONLINE.QTY, M_REQUISITIONLINE.ORDEREDQTY,
-        QUANTITYORDER, C_UOM1.NAME, C_UOM.NAME, pl.istaxincluded, M_REQUISITIONLINE.GROSS_UNIT_PRICE, M_REQUISITIONLINE.PRICEACTUAL,
+        QUANTITYORDER, C_UOM1.C_UOM_ID, C_UOM.C_UOM_ID, pl.istaxincluded, M_REQUISITIONLINE.GROSS_UNIT_PRICE, M_REQUISITIONLINE.PRICEACTUAL,
         M_REQUISITIONLINE.C_BPARTNER_ID, M_REQUISITION.C_BPARTNER_ID, M_REQUISITIONLINE.M_PRICELIST_ID, M_REQUISITION.M_PRICELIST_ID,
         M_REQUISITIONLINE.M_PRODUCT_ID, M_REQUISITIONLINE.M_ATTRIBUTESETINSTANCE_ID, M_REQUISITION.AD_USER_ID
         ORDER BY MIN(M_REQUISITIONLINE.LINE), M_REQUISITIONLINE.NEEDBYDATE, M_REQUISITIONLINE.M_PRODUCT_ID, M_REQUISITIONLINE.M_ATTRIBUTESETINSTANCE_ID
@@ -80,6 +82,8 @@
     <Parameter name="language"/>
     <Parameter name="language"/>
     <Parameter name="language"/>
+    <Parameter name="language"/>
+    <Parameter name="language"/>
     <Parameter name="adUserClient" type="replace" optional="true" after="AND M_REQUISITION.AD_CLIENT_ID IN (" text="'1'"/>
     <Parameter name="adOrgId" optional="true" type="replace" after="AND M_REQUISITIONLINE.AD_ORG_ID IN (" text="'1'"/>
     <Parameter name="parDateFrom" optional="true" after="AND 1=1"><![CDATA[ AND M_REQUISITIONLINE.NEEDBYDATE >= TO_DATE(?)]]></Parameter>
@@ -96,7 +100,9 @@
         SELECT M_REQUISITIONLINE.M_REQUISITIONLINE_ID, M_REQUISITIONLINE.NEEDBYDATE, M_REQUISITIONLINE.QTY AS REQQTY,
           M_REQUISITIONLINE.ORDEREDQTY AS MATCHEDQTY, M_REQUISITIONLINE.PRICELIST,
           COALESCE(LOCKQTY, QTY-ORDEREDQTY) AS LOCKQTY,
-          QUANTITYORDER, C_UOM1.NAME AS SECUOMNAME, C_UOM.NAME AS UOMNAME,
+          QUANTITYORDER,
+          AD_COLUMN_IDENTIFIER(to_char('C_Uom'), to_char(C_UOM1.C_UOM_ID), ?) AS SECUOMNAME,
+          AD_COLUMN_IDENTIFIER(to_char('C_Uom'), to_char(C_UOM.C_UOM_ID), ?) AS UOMNAME,
           COALESCE(LOCKPRICE, CASE WHEN pl.istaxincluded = 'Y' THEN M_REQUISITIONLINE.GROSS_UNIT_PRICE ELSE M_REQUISITIONLINE.PRICEACTUAL END) AS LOCKPRICE,
           COALESCE(M_REQUISITIONLINE.C_BPARTNER_ID, M_REQUISITION.C_BPARTNER_ID, '-1') AS VENDOR_ID,
           COALESCE(M_REQUISITIONLINE.M_PRICELIST_ID, M_REQUISITION.M_PRICELIST_ID, '-1') AS M_PRICELIST_ID,
@@ -118,7 +124,7 @@
           AND M_REQUISITION.AD_CLIENT_ID IN ('1')
           AND M_REQUISITIONLINE.AD_ORG_ID IN ('1')
         GROUP BY M_REQUISITIONLINE.M_REQUISITIONLINE_ID, M_REQUISITIONLINE.NEEDBYDATE, M_REQUISITIONLINE.QTY,
-        M_REQUISITIONLINE.ORDEREDQTY, M_REQUISITIONLINE.PRICELIST, C_UOM1.NAME, C_UOM.NAME, PL.ISTAXINCLUDED, 
+        M_REQUISITIONLINE.ORDEREDQTY, M_REQUISITIONLINE.PRICELIST, C_UOM1.C_UOM_ID, C_UOM.C_UOM_ID, PL.ISTAXINCLUDED, 
         M_REQUISITION.C_BPARTNER_ID, M_REQUISITION.M_PRICELIST_ID, LOCKQTY, QUANTITYORDER, LOCKPRICE, 
         M_REQUISITIONLINE.GROSS_UNIT_PRICE, M_REQUISITIONLINE.PRICEACTUAL, M_REQUISITIONLINE.C_BPARTNER_ID, 
         M_REQUISITIONLINE.M_PRICELIST_ID, M_REQUISITIONLINE.M_PRODUCT_ID, M_REQUISITIONLINE.M_ATTRIBUTESETINSTANCE_ID
@@ -129,6 +135,8 @@
     <Parameter name="language"/>
     <Parameter name="language"/>
     <Parameter name="language"/>
+    <Parameter name="language"/>
+    <Parameter name="language"/>
     <Parameter name="adUserId"/>
     <Parameter name="adUserClient" type="replace" optional="true" after="AND M_REQUISITION.AD_CLIENT_ID IN (" text="'1'"/>
     <Parameter name="adOrgId" optional="true" type="replace" after="AND M_REQUISITIONLINE.AD_ORG_ID IN (" text="'1'"/>
--- a/src/org/openbravo/erpCommon/ad_process/ConvertQuotationIntoOrder.java	Tue Nov 18 10:57:35 2014 +0100
+++ b/src/org/openbravo/erpCommon/ad_process/ConvertQuotationIntoOrder.java	Tue Nov 18 11:03:11 2014 +0100
@@ -55,6 +55,7 @@
 import org.openbravo.service.db.CallStoredProcedure;
 import org.openbravo.service.db.DalBaseProcess;
 import org.openbravo.service.db.DalConnectionProvider;
+import org.openbravo.service.db.DbUtility;
 
 public class ConvertQuotationIntoOrder extends DalBaseProcess {
 
@@ -285,8 +286,9 @@
           + objCloneOrder.getDocumentNo() + " @beenCreated@");
       bundle.setResult(result);
     } catch (Exception e) {
+      Throwable t = DbUtility.getUnderlyingSQLException(e);
       final OBError error = OBMessageUtils.translateError(bundle.getConnection(), vars,
-          vars.getLanguage(), e.getCause().getMessage());
+          vars.getLanguage(), t.getMessage());
       bundle.setResult(error);
     }
   }
--- a/src/org/openbravo/erpCommon/ad_process/MRPPurchaseCreateReservations.java	Tue Nov 18 10:57:35 2014 +0100
+++ b/src/org/openbravo/erpCommon/ad_process/MRPPurchaseCreateReservations.java	Tue Nov 18 11:03:11 2014 +0100
@@ -11,7 +11,7 @@
  * under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2012-2013 Openbravo SLU 
+ * All portions are Copyright (C) 2012-2014 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -137,7 +137,8 @@
               if (incomingLine.getTransactionType().equals("PP")
                   && incomingLine.getSalesOrderLine() != null) {
                 ReservationUtils.reserveStockManual(reservation, incomingLine.getSalesOrderLine(),
-                    consumedQuantity, "N");
+                    consumedQuantity, incomingLine.getSalesOrderLine().getSalesOrder()
+                        .getWarehouse().isAllocated() ? "Y" : "N");
               }
 
               if (quantity.signum() < 1 && reservation.getRESStatus().equals("DR")) {
@@ -216,4 +217,4 @@
       throw new OBException(OBMessageUtils.parseTranslation(t.getMessage()), t);
     }
   }
-}
\ No newline at end of file
+}
--- a/src/org/openbravo/erpCommon/ad_reports/ReportProjectProfitabilityJR.java	Tue Nov 18 10:57:35 2014 +0100
+++ b/src/org/openbravo/erpCommon/ad_reports/ReportProjectProfitabilityJR.java	Tue Nov 18 11:03:11 2014 +0100
@@ -11,7 +11,7 @@
  * under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2001-2012 Openbravo SLU 
+ * All portions are Copyright (C) 2001-2014 Openbravo SLU 
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -211,7 +211,7 @@
     hsqlScript.append("   where tel.timeSheet = true ");
     hsqlScript.append("         and tel.uOM.id = unitofmeasure.id ");
     hsqlScript.append("         and tel.uOM.id <> '101' ");
-    hsqlScript.append("         and es.processed = true ");
+    hsqlScript.append("         and es.processed = 'Y' ");
     if (!"".equals(strProject)) {
       hsqlScript.append("    and p.id = ?");
       parameters.add(strProject);
--- a/src/org/openbravo/erpCommon/ad_reports/ReportValuationStock_data.xsql	Tue Nov 18 10:57:35 2014 +0100
+++ b/src/org/openbravo/erpCommon/ad_reports/ReportValuationStock_data.xsql	Tue Nov 18 11:03:11 2014 +0100
@@ -40,19 +40,15 @@
                        ELSE NULL
                      END AS TOTAL_COST,  A.ISCOSTCALCULATED, A.AD_CLIENT_ID, A.MOVEMENTDATE, A.C_CURRENCY_ID
               FROM M_PRODUCT_CATEGORY,
-                   (SELECT trx.M_PRODUCT_ID, sum(trx.MOVEMENTQTY) AS QTY, sum(CASE WHEN trx.MOVEMENTQTY < 0 THEN- tc.trxcost ELSE tc.trxcost END) AS Suma, 
-                   trx.C_UOM_ID, trx.AD_CLIENT_ID, trx.iscostcalculated, tc.c_currency_id, coalesce(io.dateacct,trx.movementdate) as movementdate
+                   (SELECT trx.m_transaction_id, trx.M_PRODUCT_ID, trx.MOVEMENTQTY AS QTY, sum(CASE WHEN trx.MOVEMENTQTY < 0 THEN- tc.cost ELSE tc.cost END) AS Suma, 
+                   trx.C_UOM_ID, trx.AD_CLIENT_ID, trx.iscostcalculated, tc.c_currency_id, coalesce(tc.dateacct, tc.COSTDATE) as movementdate
                     FROM M_TRANSACTION trx 
-                      JOIN M_LOCATOR l ON trx.M_LOCATOR_ID = l.M_LOCATOR_ID 
-                      LEFT JOIN M_INOUTLINE iol ON trx.M_INOUTLINE_ID = iol.M_INOUTLINE_ID 
-                      LEFT JOIN M_INOUT io ON iol.M_INOUT_ID = io.M_INOUT_ID 
-                      LEFT JOIN (SELECT sum(cost) AS trxcost, m_transaction_id, c_currency_id
-                                 FROM M_TRANSACTION_COST
-                                 WHERE COALESCE(DATEACCT, COSTDATE) < to_date(?)
-                                 GROUP BY m_transaction_id, c_currency_id) tc ON trx.m_transaction_id = tc.m_transaction_id
+                      JOIN M_LOCATOR l ON trx.M_LOCATOR_ID = l.M_LOCATOR_ID
+                      LEFT JOIN M_TRANSACTION_COST tc ON trx.m_transaction_id = tc.m_transaction_id
                     WHERE trx.MOVEMENTDATE < to_date(?)
+                    AND COALESCE(tc.DATEACCT, tc.COSTDATE) < to_date(?)
               AND l.M_WAREHOUSE_ID = ?
-                    GROUP BY trx.M_PRODUCT_ID, trx.C_UOM_ID, trx.AD_CLIENT_ID, trx.iscostcalculated, tc.c_currency_id, coalesce(io.dateacct,trx.movementdate)) A,
+                    GROUP BY trx.m_transaction_id, trx.M_PRODUCT_ID, trx.MOVEMENTQTY, trx.C_UOM_ID, trx.AD_CLIENT_ID, trx.iscostcalculated, tc.c_currency_id, coalesce(tc.dateacct, tc.COSTDATE)) A,
                    C_UOM,
                    M_PRODUCT
               WHERE A.M_PRODUCT_ID = M_PRODUCT.M_PRODUCT_ID
--- a/src/org/openbravo/erpCommon/utility/OBDateUtils.java	Tue Nov 18 10:57:35 2014 +0100
+++ b/src/org/openbravo/erpCommon/utility/OBDateUtils.java	Tue Nov 18 11:03:11 2014 +0100
@@ -236,15 +236,19 @@
     return cal.getTime();
   }
 
-  public static Date convertToUTC(Date localTime) {
-    Calendar now = Calendar.getInstance();
+  /**
+   * Returns a new Date converted to UTC
+   * 
+   * @param date
+   *          Date to be converted to UTC
+   * 
+   */
+  public static Date convertDateToUTC(Date date) {
     Calendar calendar = Calendar.getInstance();
-    calendar.setTime(localTime);
-    calendar.set(Calendar.DATE, now.get(Calendar.DATE));
-    calendar.set(Calendar.MONTH, now.get(Calendar.MONTH));
-    calendar.set(Calendar.YEAR, now.get(Calendar.YEAR));
+    calendar.setTime(date);
 
-    int gmtMillisecondOffset = (now.get(Calendar.ZONE_OFFSET) + now.get(Calendar.DST_OFFSET));
+    int gmtMillisecondOffset = (calendar.get(Calendar.ZONE_OFFSET) + calendar
+        .get(Calendar.DST_OFFSET));
     calendar.add(Calendar.MILLISECOND, -gmtMillisecondOffset);
 
     return calendar.getTime();
--- a/src/org/openbravo/erpReports/C_OrderJR_new.jrxml	Tue Nov 18 10:57:35 2014 +0100
+++ b/src/org/openbravo/erpReports/C_OrderJR_new.jrxml	Tue Nov 18 11:03:11 2014 +0100
@@ -65,6 +65,9 @@
 	<parameter name="SUBREP_C_OrderLinesJR_new" class="net.sf.jasperreports.engine.JasperReport" isForPrompting="false"/>
 	<parameter name="SUBREP_C_OrderLinesTaxIncludedJR_new" class="net.sf.jasperreports.engine.JasperReport" isForPrompting="false"/>
 	<parameter name="SUBREP_RptC_Order_TaxLines_new" class="net.sf.jasperreports.engine.JasperReport" isForPrompting="false"/>
+	<parameter name="SHOW_LOGO" isForPrompting="true" class="java.lang.String"/>
+	<parameter name="SHOW_COMPANYDATA" isForPrompting="false" class="java.lang.String"/>
+	<parameter name="HEADER_MARGIN" isForPrompting="true" class="java.lang.String"/>
 	<queryString>
 		<![CDATA[SELECT C_ORDER.C_ORDER_ID, C_ORDER.ISSOTRX,C_BPARTNER.NAME, L.ADDRESS1 ||
 (CASE WHEN (L.POSTAL||L.CITY||R.NAME) IS NOT NULL THEN (CHR(10)||L.POSTAL || (CASE WHEN L.POSTAL IS NOT NULL THEN (' - '||TO_CHAR(L.CITY)) END) ||
@@ -77,13 +80,12 @@
 COALESCE(TO_CHAR(ADDRESS1), '') || CASE WHEN ADDRESS1 IS null THEN '' ELSE CHR(13) END || COALESCE(TO_CHAR(POSTAL), '') || CASE WHEN POSTAL IS null THEN '' ELSE CHR(13) END ||
 COALESCE(TO_CHAR(L.CITY), '') || CASE WHEN L.CITY IS null THEN '' ELSE CHR(13) END || COALESCE(TO_CHAR(CO.NAME), '') || CASE WHEN CO.NAME IS null THEN '' ELSE CHR(13) END ||
 COALESCE(TO_CHAR(C_BPARTNER_LOCATION.PHONE), '') || CASE WHEN C_BPARTNER_LOCATION.PHONE IS null THEN '' ELSE CHR(13) END || COALESCE(TO_CHAR(C_BPARTNER_LOCATION.FAX), '') ||
-CASE WHEN C_BPARTNER_LOCATION.FAX IS null THEN '' ELSE CHR(13) END) AS BP_DATA, AD_ORGINFO.TAXID AS ORG_TAXID, SHOWLOGO, SHOWCOMPANYDATA, HEADERMARGIN,
-AD_ORG.NAME AS ORG_NAME, DELIVERYRULE.NAME AS DELIVERYTERM, PAYMENTTERM.TERM AS PAYMENTTERM, C_POC_DOCTYPE_TEMPLATE.NAME AS DOC_TYPE, C_CURRENCY.ISO_CODE as CURRENCY_ISO, M_PRICELIST.ISTAXINCLUDED
+CASE WHEN C_BPARTNER_LOCATION.FAX IS null THEN '' ELSE CHR(13) END) AS BP_DATA, AD_ORGINFO.TAXID AS ORG_TAXID, $P{SHOW_LOGO} AS SHOWLOGO, $P{SHOW_COMPANYDATA} AS SHOWCOMPANYDATA, $P{HEADER_MARGIN} AS HEADERMARGIN,
+AD_ORG.NAME AS ORG_NAME, DELIVERYRULE.NAME AS DELIVERYTERM, PAYMENTTERM.TERM AS PAYMENTTERM, C_CURRENCY.ISO_CODE as CURRENCY_ISO, M_PRICELIST.ISTAXINCLUDED
 FROM C_BPARTNER_LOCATION left join C_LOCATION L on C_BPARTNER_LOCATION.C_LOCATION_ID = L.C_LOCATION_ID
              left join C_COUNTRY CO ON L.C_COUNTRY_ID = CO.C_COUNTRY_ID
              left join  C_REGION R on L.C_REGION_ID = R.C_REGION_ID,
-     AD_USER right join C_ORDER on AD_USER.AD_USER_ID = C_ORDER.AD_USER_ID
-                         left join C_POC_DOCTYPE_TEMPLATE ON C_POC_DOCTYPE_TEMPLATE.C_DOCTYPE_ID = C_ORDER.C_DOCTYPETARGET_ID,
+     AD_USER right join C_ORDER on AD_USER.AD_USER_ID = C_ORDER.AD_USER_ID,
 C_BPARTNER, AD_ORGINFO, AD_CLIENT, AD_ORG,
    (SELECT VALUE, NAME
     FROM AD_REF_LIST_V
@@ -128,7 +130,6 @@
 	<field name="org_name" class="java.lang.String"/>
 	<field name="deliveryterm" class="java.lang.String"/>
 	<field name="paymentterm" class="java.lang.String"/>
-	<field name="doc_type" class="java.lang.String"/>
 	<field name="currency_iso" class="java.lang.String"/>
 	<field name="istaxincluded" class="java.lang.String"/>
 	<variable name="SHOWLOGO" class="java.lang.String"/>
--- a/src/org/openbravo/erpReports/C_OrderLinesJR_new.jrxml	Tue Nov 18 10:57:35 2014 +0100
+++ b/src/org/openbravo/erpReports/C_OrderLinesJR_new.jrxml	Tue Nov 18 11:03:11 2014 +0100
@@ -37,15 +37,16 @@
               AND C_ORDERLINE.C_ORDER_ID=C_ORDER.C_ORDER_ID
               AND C_ORDERLINE.BOM_PARENT_ID IS NULL
         UNION
-        SELECT 2 AS ISBOM, C_ORDERLINE.LINE, M_PRODUCT.NAME AS PRODUCT_NAME, C_ORDERLINE.QTYORDERED*M_PRODUCT_BOM.BOMQTY AS QUANTITY,
-        TO_CHAR(C_UOM.NAME) AS UOM, TO_NUMBER(NULL) AS PRICEACTUAL, TO_NUMBER(NULL) AS BASE, TO_NUMBER(NULL) AS LINENETAMT, TO_NUMBER(NULL) AS TAXLINE,
+        SELECT 2 AS ISBOM, C_ORDERLINE.LINE, M_PRODUCT.NAME AS PRODUCT_NAME, C_ORDERLINE.QTYORDERED AS QUANTITY,
+        TO_CHAR(C_UOM.NAME) AS UOM, CASE WHEN $P{ISTAXINCLUDED} = 'N' THEN C_ORDERLINE.PRICEACTUAL ELSE C_ORDERLINE.GROSS_UNIT_PRICE END AS PRICEACTUAL, TO_NUMBER(NULL) AS BASE, CASE WHEN $P{ISTAXINCLUDED} = 'N' THEN C_ORDERLINE.LINENETAMT ELSE C_ORDERLINE.LINE_GROSS_AMOUNT END AS LINENETAMT, TO_NUMBER(NULL) AS TAXLINE,
         C_ORDER.docstatus AS STATUS, TO_CHAR(M_PRODUCT.VALUE) AS VALUE
         FROM M_PRODUCT_BOM, M_PRODUCT, C_ORDERLINE, C_UOM,  C_ORDER
-        WHERE  C_ORDERLINE.M_PRODUCT_ID = M_PRODUCT_BOM.M_PRODUCT_ID
+        WHERE  C_ORDERLINE.M_PRODUCT_ID = M_PRODUCT_BOM.M_PRODUCTBOM_ID
             AND M_PRODUCT_BOM.M_PRODUCTBOM_ID = M_PRODUCT.M_PRODUCT_ID
             AND M_PRODUCT.C_UOM_ID = C_UOM.C_UOM_ID
             AND C_ORDERLINE.C_ORDER_ID = $P{C_ORDER_ID}
             AND C_ORDERLINE.C_ORDER_ID=C_ORDER.C_ORDER_ID
+			AND C_ORDERLINE.BOM_PARENT_ID IS NOT NULL
         UNION
         SELECT 3 AS ISBOM, TO_NUMBER(null) AS LINE, C_TAX.NAME AS PRODUCT_NAME, TO_NUMBER(NULL) AS QUANTITY, '' AS UOM, TO_NUMBER(NULL) AS PRICEACTUAL,
         C_ORDERTAX.TAXBASEAMT AS BASE, C_ORDERTAX.TAXAMT AS LINENETAMT, C_ORDERTAX.LINE AS TAXLINE, C_ORDER.docstatus AS STATUS,
--- a/src/org/openbravo/erpReports/C_OrderLinesTaxIncludedJR_new.jrxml	Tue Nov 18 10:57:35 2014 +0100
+++ b/src/org/openbravo/erpReports/C_OrderLinesTaxIncludedJR_new.jrxml	Tue Nov 18 11:03:11 2014 +0100
@@ -36,11 +36,11 @@
         WHERE C_ORDERLINE.C_ORDER_ID = $P{C_ORDER_ID}
               AND C_ORDERLINE.C_ORDER_ID=C_ORDER.C_ORDER_ID
         UNION
-        SELECT 2 AS ISBOM, C_ORDERLINE.LINE, M_PRODUCT.NAME AS PRODUCT_NAME, C_ORDERLINE.QTYORDERED*M_PRODUCT_BOM.BOMQTY AS QUANTITY,
-        TO_CHAR(C_UOM.NAME) AS UOM, TO_NUMBER(NULL) AS PRICEACTUAL, TO_NUMBER(NULL) AS BASE, TO_NUMBER(NULL) AS LINENETAMT, TO_NUMBER(NULL) AS TAXLINE,
+        SELECT 2 AS ISBOM, C_ORDERLINE.LINE, M_PRODUCT.NAME AS PRODUCT_NAME, C_ORDERLINE.QTYORDERED AS QUANTITY,
+        TO_CHAR(C_UOM.NAME) AS UOM, CASE WHEN $P{ISTAXINCLUDED} = 'N' THEN C_ORDERLINE.PRICEACTUAL ELSE C_ORDERLINE.GROSS_UNIT_PRICE END AS PRICEACTUAL, TO_NUMBER(NULL) AS BASE, CASE WHEN $P{ISTAXINCLUDED} = 'N' THEN C_ORDERLINE.LINENETAMT ELSE C_ORDERLINE.LINE_GROSS_AMOUNT END AS LINENETAMT, TO_NUMBER(NULL) AS TAXLINE,
         C_ORDER.docstatus AS STATUS, TO_CHAR(M_PRODUCT.VALUE) AS VALUE
         FROM M_PRODUCT_BOM, M_PRODUCT, C_ORDERLINE, C_UOM,  C_ORDER
-        WHERE  C_ORDERLINE.M_PRODUCT_ID = M_PRODUCT_BOM.M_PRODUCT_ID
+        WHERE  C_ORDERLINE.M_PRODUCT_ID = M_PRODUCT_BOM.M_PRODUCTBOM_ID
             AND M_PRODUCT_BOM.M_PRODUCTBOM_ID = M_PRODUCT.M_PRODUCT_ID
             AND M_PRODUCT.C_UOM_ID = C_UOM.C_UOM_ID
             AND C_ORDERLINE.C_ORDER_ID = $P{C_ORDER_ID}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/org/openbravo/event/CostingRuleEventHandler.java	Tue Nov 18 11:03:11 2014 +0100
@@ -0,0 +1,119 @@
+/*
+ *************************************************************************
+ * The contents of this file are subject to the Openbravo  Public  License
+ * Version  1.0  (the  "License"),  being   the  Mozilla   Public  License
+ * Version 1.1  with a permitted attribution clause; you may not  use this
+ * file except in compliance with the License. You  may  obtain  a copy of
+ * the License at http://www.openbravo.com/legal/license.html
+ * Software distributed under the License  is  distributed  on  an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ * License for the specific  language  governing  rights  and  limitations
+ * under the License.
+ * The Original Code is Openbravo ERP.
+ * The Initial Developer of the Original Code is Openbravo SLU
+ * All portions are Copyright (C) 2013-2014 Openbravo SLU
+ * All Rights Reserved.
+ * Contributor(s):  ______________________________________.
+ *************************************************************************
+ */
+package org.openbravo.event;
+
+import java.text.ParseException;
+import java.util.Date;
+
+import javax.enterprise.event.Observes;
+
+import org.apache.log4j.Logger;
+import org.hibernate.HibernateException;
+import org.hibernate.Query;
+import org.hibernate.Session;
+import org.openbravo.base.exception.OBException;
+import org.openbravo.base.model.Entity;
+import org.openbravo.base.model.ModelProvider;
+import org.openbravo.base.model.Property;
+import org.openbravo.client.kernel.event.EntityNewEvent;
+import org.openbravo.client.kernel.event.EntityPersistenceEventObserver;
+import org.openbravo.client.kernel.event.EntityUpdateEvent;
+import org.openbravo.dal.service.OBDal;
+import org.openbravo.erpCommon.utility.OBDateUtils;
+import org.openbravo.erpCommon.utility.OBMessageUtils;
+import org.openbravo.model.materialmgmt.cost.CostingRule;
+
+public class CostingRuleEventHandler extends EntityPersistenceEventObserver {
+  private static Entity[] entities = { ModelProvider.getInstance().getEntity(
+      CostingRule.ENTITY_NAME) };
+  protected Logger logger = Logger.getLogger(this.getClass());
+
+  @Override
+  protected Entity[] getObservedEntities() {
+    return entities;
+  }
+
+  public void onSave(@Observes EntityUpdateEvent event) {
+    if (!isValidEvent(event)) {
+      return;
+    }
+    final Entity costingRule = ModelProvider.getInstance().getEntity(CostingRule.ENTITY_NAME);
+    final Property genericProperty = costingRule
+        .getProperty(CostingRule.PROPERTY_BACKDATEDTRANSACTIONSFIXED);
+    Boolean isbackdatedtransaction = (Boolean) event.getCurrentState(genericProperty);
+    CostingRule rule = (CostingRule) event.getTargetInstance();
+    checkFixBackdatedFrom(isbackdatedtransaction, rule);
+  }
+
+  public void onUpdate(@Observes EntityUpdateEvent event) {
+    if (!isValidEvent(event)) {
+      return;
+    }
+    final Entity costingRule = ModelProvider.getInstance().getEntity(CostingRule.ENTITY_NAME);
+    final Property genericProperty = costingRule
+        .getProperty(CostingRule.PROPERTY_BACKDATEDTRANSACTIONSFIXED);
+    Boolean isbackdatedtransaction = (Boolean) event.getCurrentState(genericProperty);
+    CostingRule rule = (CostingRule) event.getTargetInstance();
+    checkFixBackdatedFrom(isbackdatedtransaction, rule);
+  }
+
+  public void onNew(@Observes EntityNewEvent event) {
+    if (!isValidEvent(event)) {
+      return;
+    }
+    final Entity costingRule = ModelProvider.getInstance().getEntity(CostingRule.ENTITY_NAME);
+    final Property genericProperty = costingRule
+        .getProperty(CostingRule.PROPERTY_BACKDATEDTRANSACTIONSFIXED);
+    Boolean isbackdatedtransaction = (Boolean) event.getCurrentState(genericProperty);
+    CostingRule rule = (CostingRule) event.getTargetInstance();
+    checkFixBackdatedFrom(isbackdatedtransaction, rule);
+  }
+
+  private void checkFixBackdatedFrom(Boolean isbackdatedtransaction, CostingRule rule) {
+    StringBuilder hql = new StringBuilder();
+    final Session session = OBDal.getInstance().getSession();
+    hql.append("select min(p.startingDate)  from FinancialMgmtPeriodControl pc"
+        + " inner join  pc.period p" + " where  periodstatus='O' " + " and p.client= :client"
+        + " and pc.organization= :org ");
+
+    final Query query = session.createQuery(hql.toString());
+    query.setParameter("client", rule.getClient());
+    query.setParameter("org", rule.getOrganization());
+    query.uniqueResult();
+
+    try {
+      if (isbackdatedtransaction) {
+        if (rule.getFixbackdatedfrom() == null && !(rule.getStartingDate() == null)) {
+          rule.setFixbackdatedfrom(rule.getStartingDate());
+        }
+      }
+      if (rule.getFixbackdatedfrom() != null) {
+        if (rule.getFixbackdatedfrom().before(
+            OBDateUtils.getDate(OBDateUtils.formatDate((Date) query.uniqueResult())))) {
+          throw new OBException(OBMessageUtils.messageBD("WrongFixBackdatedFrom"));
+        }
+      }
+
+    } catch (HibernateException e) {
+      logger.error("Error executing process", e);
+    } catch (ParseException e) {
+      logger.error("Error executing process", e);
+    }
+  }
+}
\ No newline at end of file
--- a/src/org/openbravo/financial/FinancialUtils.java	Tue Nov 18 10:57:35 2014 +0100
+++ b/src/org/openbravo/financial/FinancialUtils.java	Tue Nov 18 11:03:11 2014 +0100
@@ -21,6 +21,7 @@
 import java.math.BigDecimal;
 import java.math.RoundingMode;
 import java.util.ArrayList;
+import java.util.Collections;
 import java.util.Date;
 import java.util.List;
 
@@ -28,14 +29,17 @@
 import org.apache.log4j.Logger;
 import org.hibernate.criterion.Restrictions;
 import org.openbravo.base.exception.OBException;
+import org.openbravo.base.util.Check;
 import org.openbravo.dal.core.DalUtil;
 import org.openbravo.dal.core.OBContext;
 import org.openbravo.dal.service.OBCriteria;
 import org.openbravo.dal.service.OBDal;
 import org.openbravo.dal.service.OBQuery;
 import org.openbravo.erpCommon.utility.OBDateUtils;
+import org.openbravo.erpCommon.utility.OBMessageUtils;
 import org.openbravo.model.ad.system.Client;
 import org.openbravo.model.common.currency.ConversionRate;
+import org.openbravo.model.common.currency.ConversionRateDoc;
 import org.openbravo.model.common.currency.Currency;
 import org.openbravo.model.common.enterprise.Organization;
 import org.openbravo.model.common.plm.Product;
@@ -224,6 +228,17 @@
   }
 
   /**
+   * It calls
+   * {@link FinancialUtils#getConvertedAmount(BigDecimal, Currency, Currency, Date, Organization, String, List)}
+   * with an empty list of conversion rates at document level
+   */
+  public static BigDecimal getConvertedAmount(BigDecimal amount, Currency curFrom, Currency curTo,
+      Date date, Organization org, String strPrecision) throws OBException {
+    return getConvertedAmount(amount, curFrom, curTo, date, org, strPrecision,
+        Collections.<ConversionRateDoc> emptyList());
+  }
+
+  /**
    * Converts an amount.
    * 
    * @param amount
@@ -238,21 +253,38 @@
    *          Organization of the document that needs to be converted.
    * @param strPrecision
    *          type of precision to be used to round the converted amount.
+   * @param rateDocs
+   *          list of conversion rates defined on the document of the amount that needs to be
+   *          converted.
    * @return a BigDecimal representing the converted amount.
    * @throws OBException
    *           when no Conversion Rate is found for the given parameters.
    */
-
   public static BigDecimal getConvertedAmount(BigDecimal amount, Currency curFrom, Currency curTo,
-      Date date, Organization org, String strPrecision) throws OBException {
+      Date date, Organization org, String strPrecision, List<ConversionRateDoc> rateDocs)
+      throws OBException {
+    Check.isNotNull(rateDocs, OBMessageUtils.messageBD("ParameterMissing") + " (rateDocs)");
     if (curFrom.getId().equals(curTo.getId()) || amount.signum() == 0) {
       return amount;
     }
-    ConversionRate cr = getConversionRate(date, curFrom, curTo, org, org.getClient());
-    if (cr == null) {
-      throw new OBException("@NoCurrencyConversion@ " + curFrom.getISOCode() + " @to@ "
-          + curTo.getISOCode() + " @ForDate@ " + OBDateUtils.formatDate(date)
-          + " @And@ @ACCS_AD_ORG_ID_D@ " + org.getIdentifier());
+    BigDecimal rate = null;
+    if (rateDocs.size() > 0) {
+      for (ConversionRateDoc rateDoc : rateDocs) {
+        if (curFrom.getId().equals(rateDoc.getCurrency().getId())
+            && curTo.getId().equals(rateDoc.getToCurrency().getId())) {
+          rate = rateDoc.getRate();
+          break;
+        }
+      }
+    }
+    if (rate == null) {
+      ConversionRate cr = getConversionRate(date, curFrom, curTo, org, org.getClient());
+      if (cr == null) {
+        throw new OBException("@NoCurrencyConversion@ " + curFrom.getISOCode() + " @to@ "
+            + curTo.getISOCode() + " @ForDate@ " + OBDateUtils.formatDate(date)
+            + " @And@ @ACCS_AD_ORG_ID_D@ " + org.getIdentifier());
+      }
+      rate = cr.getMultipleRateBy();
     }
     Long precision = curTo.getStandardPrecision();
     if (PRECISION_COSTING.equals(strPrecision)) {
@@ -260,8 +292,7 @@
     } else if (PRECISION_PRICE.equals(strPrecision)) {
       precision = curTo.getPricePrecision();
     }
-    return amount.multiply(cr.getMultipleRateBy()).setScale(precision.intValue(),
-        RoundingMode.HALF_UP);
+    return amount.multiply(rate).setScale(precision.intValue(), RoundingMode.HALF_UP);
   }
 
   /**
--- a/src/org/openbravo/materialmgmt/VariantAutomaticGenerationProcess.java	Tue Nov 18 10:57:35 2014 +0100
+++ b/src/org/openbravo/materialmgmt/VariantAutomaticGenerationProcess.java	Tue Nov 18 11:03:11 2014 +0100
@@ -141,8 +141,7 @@
         variant.setProductAccountsList(Collections.<ProductAccounts> emptyList());
         variant.setGeneric(false);
         for (ProductCharacteristic prCh : variant.getProductCharacteristicList()) {
-          prCh
-              .setProductCharacteristicConfList(Collections.<ProductCharacteristicConf> emptyList());
+          prCh.setProductCharacteristicConfList(Collections.<ProductCharacteristicConf> emptyList());
         }
 
         String searchKey = product.getSearchKey();
@@ -171,6 +170,7 @@
           newPrChValue.setCharacteristic(prChConf.getCharacteristicOfProduct().getCharacteristic());
           newPrChValue.setCharacteristicValue(prChConf.getCharacteristicValue());
           newPrChValue.setProduct(variant);
+          newPrChValue.setOrganization(product.getOrganization());
           if (StringUtils.isNotBlank(strChDesc)) {
             strChDesc += ", ";
           }
--- a/src/org/openbravo/scheduling/OBScheduler.java	Tue Nov 18 10:57:35 2014 +0100
+++ b/src/org/openbravo/scheduling/OBScheduler.java	Tue Nov 18 11:03:11 2014 +0100
@@ -411,7 +411,8 @@
 
           } else if (data.frequency.equals(FREQUENCY_DAILY)) {
             if ("".equals(data.dailyOption)) {
-              trigger = TriggerUtils.makeDailyTrigger(hour, minute);
+              final String cronExpression = second + " " + minute + " " + hour + " ? * *";
+              trigger = new CronTrigger(name, OB_GROUP, cronExpression);
 
             } else if (data.dailyOption.equals(EVERY_N_DAYS)) {
               try {
--- a/src/org/openbravo/service/db/DalConnectionProvider.java	Tue Nov 18 10:57:35 2014 +0100
+++ b/src/org/openbravo/service/db/DalConnectionProvider.java	Tue Nov 18 11:03:11 2014 +0100
@@ -27,9 +27,9 @@
 import java.sql.Statement;
 import java.util.Properties;
 
-import org.hibernate.StatelessSession;
 import org.openbravo.base.session.OBPropertiesProvider;
 import org.openbravo.base.session.SessionFactoryController;
+import org.openbravo.dal.core.DalSessionFactory;
 import org.openbravo.dal.service.OBDal;
 import org.openbravo.database.ConnectionProvider;
 import org.openbravo.exception.NoConnectionAvailableException;
@@ -95,10 +95,21 @@
     return getProperties().getProperty("bbdd.rdbms");
   }
 
+  private boolean closeConnection(Connection conn) {
+    if (conn == null)
+      return false;
+    try {
+      conn.setAutoCommit(true);
+      conn.close();
+    } catch (Exception ex) {
+      return false;
+    }
+    return true;
+  }
+
   public Connection getTransactionConnection() throws NoConnectionAvailableException, SQLException {
-    final StatelessSession session = SessionFactoryController.getInstance().getSessionFactory()
-        .openStatelessSession();
-    Connection conn = session.connection();
+    Connection conn = ((DalSessionFactory) SessionFactoryController.getInstance()
+        .getSessionFactory()).getConnectionProvider().getConnection();
 
     if (conn == null) {
       throw new NoConnectionAvailableException("CouldnĀ“t get an available connection");
@@ -111,12 +122,14 @@
     if (conn == null)
       return;
     conn.commit();
+    closeConnection(conn);
   }
 
   public void releaseRollbackConnection(Connection conn) throws SQLException {
     if (conn == null)
       return;
     conn.rollback();
+    closeConnection(conn);
   }
 
   public PreparedStatement getPreparedStatement(String SQLPreparedStatement) throws Exception {