From 75f9f57cbc6103d2e7b18ccef50834b3f92f217d Mon Sep 17 00:00:00 2001 From: joergviola Date: Fri, 29 Jan 2010 10:52:35 +0000 Subject: [PATCH 01/46] Started approach 2 of OSGi integration: Embed ADempiere in Equinox OSGi * Status: Swing client can be started in Equinox - not tested much * turned base, client and tools projects into bundles * sorted out some glitches in resource loading * a copy of Adempiere class in client was required to correctly fire up swing * first ideas for the service interfaces (see base/org.adempiere.base package) https://sourceforge.net/tracker/?func=detail&aid=2700937&group_id=176962&atid=879334 --- base/.classpath | 1 + base/.project | 63 +- base/META-INF/MANIFEST.MF | 70 + base/build.properties | 74 + base/plugin.xml | 6 + base/schema/ResourceFinder.exsd | 102 ++ .../org/adempiere/base/IResourceFinder.java | 25 + .../org/adempiere/base/IServiceLocator.java | 31 + base/src/org/adempiere/base/Service.java | 41 + .../base/equinox/EquinoxResourceFinder.java | 35 + .../base/equinox/EquinoxServiceLocator.java | 29 + .../adempiere/base/equinox/ExtensionList.java | 65 + base/src/org/compiere/Adempiere.java | 64 +- base/src/org/compiere/util/Env.java | 22 +- client/.classpath | 25 +- client/.project | 57 +- client/META-INF/MANIFEST.MF | 202 +++ client/build.properties | 8 + client/plugin.xml | 13 + .../src/org/adempiere/client/Activator.java | 12 + client/src/org/compiere/AdempiereClient.java | 219 +++ client/src/org/compiere/acct/AcctViewer.java | 4 +- .../org/compiere/apps/FieldRecordInfo.java | 2 +- client/src/org/compiere/apps/search/Find.java | 8 +- client/src/org/compiere/apps/search/Info.java | 2 +- .../org/compiere/grid/ed/VAccountDialog.java | 6 +- client/src/org/compiere/grid/ed/VLocator.java | 2 +- .../org/compiere/grid/ed/ValuePreference.java | 2 +- .../src/org/compiere/util/ResourceFinder.java | 18 + .../src/org/compiere/util/Splash.java | 6 +- tools/.classpath | 4 + tools/.project | 55 +- tools/META-INF/MANIFEST.MF | 1293 +++++++++++++++++ tools/build.properties | 53 + 34 files changed, 2488 insertions(+), 131 deletions(-) create mode 100644 base/META-INF/MANIFEST.MF create mode 100644 base/build.properties create mode 100644 base/plugin.xml create mode 100644 base/schema/ResourceFinder.exsd create mode 100644 base/src/org/adempiere/base/IResourceFinder.java create mode 100644 base/src/org/adempiere/base/IServiceLocator.java create mode 100644 base/src/org/adempiere/base/Service.java create mode 100644 base/src/org/adempiere/base/equinox/EquinoxResourceFinder.java create mode 100644 base/src/org/adempiere/base/equinox/EquinoxServiceLocator.java create mode 100644 base/src/org/adempiere/base/equinox/ExtensionList.java create mode 100644 client/META-INF/MANIFEST.MF create mode 100644 client/build.properties create mode 100644 client/plugin.xml create mode 100644 client/src/org/adempiere/client/Activator.java create mode 100644 client/src/org/compiere/AdempiereClient.java create mode 100644 client/src/org/compiere/util/ResourceFinder.java rename {base => client}/src/org/compiere/util/Splash.java (93%) create mode 100644 tools/META-INF/MANIFEST.MF create mode 100644 tools/build.properties diff --git a/base/.classpath b/base/.classpath index 5614471424..749a920ecb 100644 --- a/base/.classpath +++ b/base/.classpath @@ -24,5 +24,6 @@ + diff --git a/base/.project b/base/.project index 7e951739a9..cd61b00662 100644 --- a/base/.project +++ b/base/.project @@ -1,26 +1,37 @@ - - - base - - - dbPort - looks - print - tools - - - - org.eclipse.jdt.core.javabuilder - - - - - com.ibm.etools.validation.validationbuilder - - - - - - org.eclipse.jdt.core.javanature - - + + + base + + + dbPort + looks + print + tools + + + + org.eclipse.jdt.core.javabuilder + + + + + com.ibm.etools.validation.validationbuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.pde.PluginNature + + diff --git a/base/META-INF/MANIFEST.MF b/base/META-INF/MANIFEST.MF new file mode 100644 index 0000000000..5934d99793 --- /dev/null +++ b/base/META-INF/MANIFEST.MF @@ -0,0 +1,70 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: org.adempiere.base +Bundle-SymbolicName: org.adempiere.base;singleton:=true +Bundle-Version: 0.0.0.2 +Bundle-ClassPath: base.jar, + lib/commons-net-1.4.0.jar, + lib/ant.jar, + lib/jpedal.jar, + lib/jnlp.jar, + lib/junit.jar, + client/jbossall-client.jar, + lib/postgresql.jar, + lib/ocrs12.jar, + lib/ojdbc14.jar, + lib/c3p0-0.9.1.2.jar, + lib/script-api.jar, + lib/barbecue-1.5-beta1.jar, + lib/poi-3.0.1-FINAL-20070705.jar, + lib/jcommon-1.0.14.jar, + lib/jfreechart-1.0.11.jar, + lib/swingx-0.9.0.jar, + lib/looks-2.0.4.jar, + lib/commons-collections-3.1.jar, + lib/activemq-core-5.0.0.jar +Export-Package: com.jgoodies.looks, + com.jgoodies.looks.common, + com.jgoodies.looks.plastic, + com.jgoodies.looks.plastic.theme, + com.jgoodies.looks.windows, + org.adempiere.apps.graph, + org.adempiere.as, + org.adempiere.base, + org.adempiere.exceptions, + org.adempiere.impexp, + org.adempiere.model, + org.adempiere.pdf, + org.adempiere.pdf.viewer, + org.adempiere.pipo, + org.adempiere.pipo.exception, + org.adempiere.pipo.handler, + org.adempiere.plaf, + org.adempiere.print.export, + org.adempiere.process, + org.adempiere.process.rpl, + org.adempiere.process.rpl.exp, + org.adempiere.process.rpl.imp, + org.adempiere.util, + org.compiere, + org.compiere.FA, + org.compiere.acct, + org.compiere.cm, + org.compiere.db, + org.compiere.dbPort, + org.compiere.impexp, + org.compiere.interfaces, + org.compiere.model, + org.compiere.plaf, + org.compiere.print, + org.compiere.print.layout, + org.compiere.process, + org.compiere.report, + org.compiere.report.core, + org.compiere.sla, + org.compiere.swing, + org.compiere.tools, + org.compiere.util, + org.compiere.wf +Require-Bundle: org.eclipse.core.runtime;bundle-version="3.5.0", + org.adempiere.tools;bundle-version="0.0.0" diff --git a/base/build.properties b/base/build.properties new file mode 100644 index 0000000000..f0410d0383 --- /dev/null +++ b/base/build.properties @@ -0,0 +1,74 @@ +source.base.jar = src/ +bin.includes = META-INF/,\ + ../tools/lib/commons-net-1.4.0.jar,\ + ../tools/lib/ant.jar,\ + ../tools/lib/jpedal.jar,\ + ../tools/lib/jnlp.jar,\ + ../tools/lib/junit.jar,\ + client/jbossall-client.jar,\ + ../tools/lib/postgresql.jar,\ + ../tools/lib/ocrs12.jar,\ + ../tools/lib/ojdbc14.jar,\ + ../tools/lib/c3p0-0.9.1.2.jar,\ + ../tools/lib/script-api.jar,\ + ../tools/lib/barbecue-1.5-beta1.jar,\ + ../tools/lib/poi-3.0.1-FINAL-20070705.jar,\ + ../tools/lib/jcommon-1.0.14.jar,\ + ../tools/lib/jfreechart-1.0.11.jar,\ + ../tools/lib/swingx-0.9.0.jar,\ + ../tools/lib/looks-2.0.4.jar,\ + ../tools/lib/commons-collections-3.1.jar,\ + ../tools/lib/activemq-core-5.0.0.jar,\ + base.jar,\ + lib/looks-2.0.4.jar,\ + plugin.xml +jars.extra.classpath = platform:/plugin/org.adempiere.tools/lib/activation.jar,\ + platform:/plugin/org.adempiere.tools/lib/activemq-core-5.0.0.jar,\ + platform:/plugin/org.adempiere.tools/lib/ant-commons-net.jar,\ + platform:/plugin/org.adempiere.tools/lib/ant-contrib-1.0b1.jar,\ + platform:/plugin/org.adempiere.tools/lib/ant-launcher.jar,\ + platform:/plugin/org.adempiere.tools/lib/ant.jar,\ + platform:/plugin/org.adempiere.tools/lib/barbecue-1.5-beta1.jar,\ + platform:/plugin/org.adempiere.tools/lib/bsh-2.0b5.jar,\ + platform:/plugin/org.adempiere.tools/lib/bsh-engine.jar,\ + platform:/plugin/org.adempiere.tools/lib/c3p0-0.9.1.2.jar,\ + platform:/plugin/org.adempiere.tools/lib/c3p0-oracle-thin-extras-0.9.1.2.jar,\ + platform:/plugin/org.adempiere.tools/lib/cglib.jar,\ + platform:/plugin/org.adempiere.tools/lib/commons-codec.jar,\ + platform:/plugin/org.adempiere.tools/lib/commons-collections-3.1.jar,\ + platform:/plugin/org.adempiere.tools/lib/commons-logging.jar,\ + platform:/plugin/org.adempiere.tools/lib/commons-net-1.4.0.jar,\ + platform:/plugin/org.adempiere.tools/lib/groovy-all-1.5.1.jar,\ + platform:/plugin/org.adempiere.tools/lib/groovy-engine.jar,\ + platform:/plugin/org.adempiere.tools/lib/iText-2.1.7.jar,\ + platform:/plugin/org.adempiere.tools/lib/javaee.jar,\ + platform:/plugin/org.adempiere.tools/lib/jcommon-1.0.14.jar,\ + platform:/plugin/org.adempiere.tools/lib/jfreechart-1.0.11.jar,\ + platform:/plugin/org.adempiere.tools/lib/jgraph.jar,\ + platform:/plugin/org.adempiere.tools/lib/jnlp.jar,\ + platform:/plugin/org.adempiere.tools/lib/jpayment.jar,\ + platform:/plugin/org.adempiere.tools/lib/jpedal.jar,\ + platform:/plugin/org.adempiere.tools/lib/jsp-api.jar,\ + platform:/plugin/org.adempiere.tools/lib/jstl.jar,\ + platform:/plugin/org.adempiere.tools/lib/junit.jar,\ + platform:/plugin/org.adempiere.tools/lib/jython-engine.jar,\ + platform:/plugin/org.adempiere.tools/lib/jython.jar,\ + platform:/plugin/org.adempiere.tools/lib/log4j.jar,\ + platform:/plugin/org.adempiere.tools/lib/logkit.jar,\ + platform:/plugin/org.adempiere.tools/lib/looks-2.0.4.jar,\ + platform:/plugin/org.adempiere.tools/lib/mail.jar,\ + platform:/plugin/org.adempiere.tools/lib/miglayout-3.7.1-swing.jar,\ + platform:/plugin/org.adempiere.tools/lib/ocrs12.jar,\ + platform:/plugin/org.adempiere.tools/lib/ojdbc14.jar,\ + platform:/plugin/org.adempiere.tools/lib/poi-3.0.1-FINAL-20070705.jar,\ + platform:/plugin/org.adempiere.tools/lib/postgresql.jar,\ + platform:/plugin/org.adempiere.tools/lib/script-api.jar,\ + platform:/plugin/org.adempiere.tools/lib/servlet-api.jar,\ + platform:/plugin/org.adempiere.tools/lib/standard.jar,\ + platform:/plugin/org.adempiere.tools/lib/swingx-0.9.0.jar,\ + platform:/plugin/org.adempiere.tools/lib/Verisign.jar,\ + platform:/plugin/org.adempiere.tools/lib/wizard.jar,\ + platform:/plugin/org.adempiere.tools/lib/xercesImpl.jar,\ + platform:/plugin/org.adempiere.tools/lib/xjavadoc-1.1.jar,\ + platform:/plugin/org.adempiere.tools/lib/xml-apis.jar + \ No newline at end of file diff --git a/base/plugin.xml b/base/plugin.xml new file mode 100644 index 0000000000..cb6b8fe432 --- /dev/null +++ b/base/plugin.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/base/schema/ResourceFinder.exsd b/base/schema/ResourceFinder.exsd new file mode 100644 index 0000000000..a2f30d7849 --- /dev/null +++ b/base/schema/ResourceFinder.exsd @@ -0,0 +1,102 @@ + + + + + + + + + [Enter description of this extension point.] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + [Enter the first release in which this extension point appears.] + + + + + + + + + [Enter extension point usage example here.] + + + + + + + + + [Enter API information here.] + + + + + + + + + [Enter information about supplied implementation of this extension point.] + + + + + diff --git a/base/src/org/adempiere/base/IResourceFinder.java b/base/src/org/adempiere/base/IResourceFinder.java new file mode 100644 index 0000000000..a99ea7b76b --- /dev/null +++ b/base/src/org/adempiere/base/IResourceFinder.java @@ -0,0 +1,25 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. * + * This program is free software; you can redistribute it and/or modify it * + * under the terms version 2 of the GNU General Public License as published * + * by the Free Software Foundation. This program is distributed in the hope * + * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * + * See the GNU General Public License for more details. * + * You should have received a copy of the GNU General Public License along * + * with this program; if not, write to the Free Software Foundation, Inc., * + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * + * For the text or an alternative of this public license, you may reach us * + * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * + * or via info@compiere.org or http://www.compiere.org/license.html * + *****************************************************************************/ +package org.adempiere.base; + +import java.net.URL; + +public interface IResourceFinder { + + URL getResource(String name); + +} diff --git a/base/src/org/adempiere/base/IServiceLocator.java b/base/src/org/adempiere/base/IServiceLocator.java new file mode 100644 index 0000000000..7b127bfd4d --- /dev/null +++ b/base/src/org/adempiere/base/IServiceLocator.java @@ -0,0 +1,31 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. * + * This program is free software; you can redistribute it and/or modify it * + * under the terms version 2 of the GNU General Public License as published * + * by the Free Software Foundation. This program is distributed in the hope * + * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * + * See the GNU General Public License for more details. * + * You should have received a copy of the GNU General Public License along * + * with this program; if not, write to the Free Software Foundation, Inc., * + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * + * For the text or an alternative of this public license, you may reach us * + * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * + * or via info@compiere.org or http://www.compiere.org/license.html * + *****************************************************************************/ +package org.adempiere.base; + + +/** + * A service locator looks up services. + * This is the central authority for adempiere service definition, + * because each service defined has to be looked up via this interface. + * @author viola + * + */ +public interface IServiceLocator { + + IResourceFinder getResourceFinder(); + +} diff --git a/base/src/org/adempiere/base/Service.java b/base/src/org/adempiere/base/Service.java new file mode 100644 index 0000000000..4ab5206ec8 --- /dev/null +++ b/base/src/org/adempiere/base/Service.java @@ -0,0 +1,41 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. * + * This program is free software; you can redistribute it and/or modify it * + * under the terms version 2 of the GNU General Public License as published * + * by the Free Software Foundation. This program is distributed in the hope * + * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * + * See the GNU General Public License for more details. * + * You should have received a copy of the GNU General Public License along * + * with this program; if not, write to the Free Software Foundation, Inc., * + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * + * For the text or an alternative of this public license, you may reach us * + * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * + * or via info@compiere.org or http://www.compiere.org/license.html * + *****************************************************************************/ +package org.adempiere.base; + +import org.adempiere.base.equinox.EquinoxServiceLocator; + +/** + * This is a very simple factory for service locators + * @author viola + * + */ +public class Service { + + private static IServiceLocator theLocator; + + public static IServiceLocator locator() { + if (theLocator==null) { + synchronized (Service.class) { + if (theLocator==null) { + theLocator = new EquinoxServiceLocator(); + } + } + } + return theLocator; + } + +} diff --git a/base/src/org/adempiere/base/equinox/EquinoxResourceFinder.java b/base/src/org/adempiere/base/equinox/EquinoxResourceFinder.java new file mode 100644 index 0000000000..b720e95006 --- /dev/null +++ b/base/src/org/adempiere/base/equinox/EquinoxResourceFinder.java @@ -0,0 +1,35 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. * + * This program is free software; you can redistribute it and/or modify it * + * under the terms version 2 of the GNU General Public License as published * + * by the Free Software Foundation. This program is distributed in the hope * + * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * + * See the GNU General Public License for more details. * + * You should have received a copy of the GNU General Public License along * + * with this program; if not, write to the Free Software Foundation, Inc., * + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * + * For the text or an alternative of this public license, you may reach us * + * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * + * or via info@compiere.org or http://www.compiere.org/license.html * + *****************************************************************************/ +package org.adempiere.base.equinox; + +import java.net.URL; + +import org.adempiere.base.IResourceFinder; + +public class EquinoxResourceFinder implements IResourceFinder { + + public URL getResource(String name) { + ExtensionList list = new ExtensionList(IResourceFinder.class, "org.adempiere.base.ResourceFinder"); + for (IResourceFinder rf : list) { + URL url = rf.getResource(name); + if (url!=null) + return url; + } + return null; + } + +} \ No newline at end of file diff --git a/base/src/org/adempiere/base/equinox/EquinoxServiceLocator.java b/base/src/org/adempiere/base/equinox/EquinoxServiceLocator.java new file mode 100644 index 0000000000..907ef8e7ed --- /dev/null +++ b/base/src/org/adempiere/base/equinox/EquinoxServiceLocator.java @@ -0,0 +1,29 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. * + * This program is free software; you can redistribute it and/or modify it * + * under the terms version 2 of the GNU General Public License as published * + * by the Free Software Foundation. This program is distributed in the hope * + * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * + * See the GNU General Public License for more details. * + * You should have received a copy of the GNU General Public License along * + * with this program; if not, write to the Free Software Foundation, Inc., * + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * + * For the text or an alternative of this public license, you may reach us * + * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * + * or via info@compiere.org or http://www.compiere.org/license.html * + *****************************************************************************/ +package org.adempiere.base.equinox; + +import org.adempiere.base.IResourceFinder; +import org.adempiere.base.IServiceLocator; + + +public class EquinoxServiceLocator implements IServiceLocator { + + public IResourceFinder getResourceFinder() { + return new EquinoxResourceFinder(); + } + +} diff --git a/base/src/org/adempiere/base/equinox/ExtensionList.java b/base/src/org/adempiere/base/equinox/ExtensionList.java new file mode 100644 index 0000000000..760a36e4f8 --- /dev/null +++ b/base/src/org/adempiere/base/equinox/ExtensionList.java @@ -0,0 +1,65 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. * + * This program is free software; you can redistribute it and/or modify it * + * under the terms version 2 of the GNU General Public License as published * + * by the Free Software Foundation. This program is distributed in the hope * + * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * + * See the GNU General Public License for more details. * + * You should have received a copy of the GNU General Public License along * + * with this program; if not, write to the Free Software Foundation, Inc., * + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * + * For the text or an alternative of this public license, you may reach us * + * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * + * or via info@compiere.org or http://www.compiere.org/license.html * + *****************************************************************************/ +package org.adempiere.base.equinox; + +import java.util.Iterator; + +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IConfigurationElement; +import org.eclipse.core.runtime.Platform; + +public class ExtensionList implements Iterable{ + + public class ExtensionIterator implements Iterator { + + private int index = 0; + + public boolean hasNext() { + return index clazz, String id) { + try { + elements = Platform.getExtensionRegistry().getConfigurationElementsFor(id); + } catch (Exception ex) { + System.out.println(ex.getMessage()); + } + } + + public Iterator iterator() { + return new ExtensionIterator(); + } + +} diff --git a/base/src/org/compiere/Adempiere.java b/base/src/org/compiere/Adempiere.java index 9426820d29..a306fef357 100644 --- a/base/src/org/compiere/Adempiere.java +++ b/base/src/org/compiere/Adempiere.java @@ -30,6 +30,7 @@ import javax.jnlp.ServiceManager; import javax.jnlp.UnavailableServiceException; import javax.swing.ImageIcon; +import org.adempiere.base.Service; import org.compiere.db.CConnection; import org.compiere.model.MClient; import org.compiere.model.MSystem; @@ -43,7 +44,7 @@ import org.compiere.util.Ini; import org.compiere.util.Login; import org.compiere.util.SecureEngine; import org.compiere.util.SecureInterface; -import org.compiere.util.Splash; +//import org.compiere.util.Splash; import org.compiere.util.Util; /** @@ -336,7 +337,8 @@ public final class Adempiere if (s_imageLogo == null) { Toolkit tk = Toolkit.getDefaultToolkit(); - URL url = org.compiere.Adempiere.class.getResource(s_file100x30); + URL url = Service.locator().getResourceFinder().getResource(s_file100x30); +// URL url = org.compiere.Adempiere.class.getResource(s_file100x30); // System.out.println(url); if (url == null) return null; @@ -580,37 +582,41 @@ public final class Adempiere return true; } // startupEnvironment + public static URL getResource(String name) { + return Service.locator().getResourceFinder().getResource(name); + } + /** * Main Method * * @param args optional start class */ - public static void main (String[] args) - { - Splash.getSplash(); - startup(true); // error exit and initUI - - // Start with class as argument - or if nothing provided with Client - String className = "org.compiere.apps.AMenu"; - for (int i = 0; i < args.length; i++) - { - if (!args[i].equals("-debug")) // ignore -debug - { - className = args[i]; - break; - } - } - // - try - { - Class startClass = Class.forName(className); - startClass.newInstance(); - } - catch (Exception e) - { - System.err.println("ADempiere starting: " + className + " - " + e.toString()); - e.printStackTrace(); - } - } // main +// public static void main (String[] args) +// { +// Splash.getSplash(); +// startup(true); // error exit and initUI +// +// // Start with class as argument - or if nothing provided with Client +// String className = "org.compiere.apps.AMenu"; +// for (int i = 0; i < args.length; i++) +// { +// if (!args[i].equals("-debug")) // ignore -debug +// { +// className = args[i]; +// break; +// } +// } +// // +// try +// { +// Class startClass = Class.forName(className); +// startClass.newInstance(); +// } +// catch (Exception e) +// { +// System.err.println("ADempiere starting: " + className + " - " + e.toString()); +// e.printStackTrace(); +// } +// } // main } // Adempiere diff --git a/base/src/org/compiere/util/Env.java b/base/src/org/compiere/util/Env.java index 0c990f0e7d..076e681113 100644 --- a/base/src/org/compiere/util/Env.java +++ b/base/src/org/compiere/util/Env.java @@ -46,6 +46,8 @@ import javax.swing.JFrame; import javax.swing.RepaintManager; import javax.swing.SwingUtilities; +import org.adempiere.base.IResourceFinder; +import org.adempiere.base.Service; import org.compiere.Adempiere; import org.compiere.db.CConnection; import org.compiere.model.MClient; @@ -54,6 +56,10 @@ import org.compiere.model.MRole; import org.compiere.model.MSession; import org.compiere.model.PO; import org.compiere.swing.CFrame; +import org.eclipse.core.runtime.IConfigurationElement; +import org.eclipse.core.runtime.Platform; + +import com.sun.xml.internal.ws.util.ServiceFinder; /** @@ -1479,7 +1485,10 @@ public final class Env */ public static Image getImage (String fileNameInImageDir) { - URL url = Adempiere.class.getResource("images/" + fileNameInImageDir); + IResourceFinder rf = Service.locator().getResourceFinder(); + URL url = rf.getResource("images/" + fileNameInImageDir); + +// URL url = Adempiere.class.getResource("images/" + fileNameInImageDir); if (url == null) { s_log.log(Level.SEVERE, "Not found: " + fileNameInImageDir); @@ -1497,7 +1506,9 @@ public final class Env */ public static ImageIcon getImageIcon (String fileNameInImageDir) { - URL url = Adempiere.class.getResource("images/" + fileNameInImageDir); + IResourceFinder rf = Service.locator().getResourceFinder(); + URL url = rf.getResource("images/" + fileNameInImageDir); +// URL url = Adempiere.class.getResource("images/" + fileNameInImageDir); if (url == null) { s_log.log(Level.INFO, "Not found: " + fileNameInImageDir); @@ -1517,9 +1528,12 @@ public final class Env */ public static ImageIcon getImageIcon2 (String fileName) { - URL url = Adempiere.class.getResource("images/" + fileName+".gif"); + IResourceFinder rf = Service.locator().getResourceFinder(); + URL url = rf.getResource("images/" + fileName+".gif"); +// URL url = Adempiere.class.getResource("images/" + fileName+".gif"); if (url == null) - url = Adempiere.class.getResource("images/" + fileName+".png"); + url = rf.getResource("images/" + fileName+".png"); +// url = Adempiere.class.getResource("images/" + fileName+".png"); if (url == null) { s_log.log(Level.INFO, "GIF/PNG Not found: " + fileName); diff --git a/client/.classpath b/client/.classpath index 6733c56d92..59f03ea131 100644 --- a/client/.classpath +++ b/client/.classpath @@ -1,12 +1,13 @@ - - - - - - - - - - - - + + + + + + + + + + + + + diff --git a/client/.project b/client/.project index f6ae8189d8..7d64912067 100644 --- a/client/.project +++ b/client/.project @@ -1,23 +1,34 @@ - - - client - - - base - dbPort - extend - looks - print - tools - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - + + + client + + + base + dbPort + extend + looks + print + tools + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.pde.PluginNature + + diff --git a/client/META-INF/MANIFEST.MF b/client/META-INF/MANIFEST.MF new file mode 100644 index 0000000000..ccec30c3b1 --- /dev/null +++ b/client/META-INF/MANIFEST.MF @@ -0,0 +1,202 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: org.adempiere.client +Bundle-SymbolicName: org.adempiere.client;singleton:=true +Bundle-Version: 0.0.0.2 +Bundle-ClassPath: client.jar, + lib/swingx-0.9.0.jar, + lib/groovy-all-1.5.1.jar, + lib/jcommon-1.0.14.jar, + lib/jfreechart-1.0.11.jar +Export-Package: com.keypoint, + de.schaeffer.compiere.tools, + groovy.inspect, + groovy.inspect.swingui, + groovy.io, + groovy.lang, + groovy.mock, + groovy.mock.interceptor, + groovy.model, + groovy.security, + groovy.servlet, + groovy.sql, + groovy.swing, + groovy.swing.binding, + groovy.swing.factory, + groovy.swing.impl, + groovy.text, + groovy.time, + groovy.ui, + groovy.ui.icons, + groovy.ui.text, + groovy.ui.view, + groovy.util, + groovy.util.slurpersupport, + groovy.xml, + groovy.xml.dom, + groovy.xml.streamingmarkupsupport, + groovyjarjarantlr, + groovyjarjarantlr.ASdebug, + groovyjarjarantlr.actions.cpp, + groovyjarjarantlr.actions.csharp, + groovyjarjarantlr.actions.java, + groovyjarjarantlr.actions.python, + groovyjarjarantlr.build, + groovyjarjarantlr.collections, + groovyjarjarantlr.collections.impl, + groovyjarjarantlr.debug, + groovyjarjarantlr.debug.misc, + groovyjarjarantlr.preprocessor, + groovyjarjarasm.asm, + groovyjarjarasm.asm.signature, + groovyjarjarasm.asm.tree, + groovyjarjarcommonscli, + org.adempiere.apps.graph, + org.codehaus.groovy, + org.codehaus.groovy.ant, + org.codehaus.groovy.antlr, + org.codehaus.groovy.antlr.java, + org.codehaus.groovy.antlr.parser, + org.codehaus.groovy.antlr.treewalker, + org.codehaus.groovy.ast, + org.codehaus.groovy.ast.expr, + org.codehaus.groovy.ast.stmt, + org.codehaus.groovy.binding, + org.codehaus.groovy.bsf, + org.codehaus.groovy.classgen, + org.codehaus.groovy.control, + org.codehaus.groovy.control.io, + org.codehaus.groovy.control.messages, + org.codehaus.groovy.groovydoc, + org.codehaus.groovy.reflection, + org.codehaus.groovy.runtime, + org.codehaus.groovy.runtime.metaclass, + org.codehaus.groovy.runtime.typehandling, + org.codehaus.groovy.runtime.wrappers, + org.codehaus.groovy.syntax, + org.codehaus.groovy.tools, + org.codehaus.groovy.tools.groovydoc, + org.codehaus.groovy.tools.javac, + org.codehaus.groovy.tools.shell, + org.codehaus.groovy.tools.shell.commands, + org.codehaus.groovy.tools.shell.util, + org.codehaus.groovy.tools.xml, + org.codehaus.groovy.vmplugin, + org.codehaus.groovy.vmplugin.v4, + org.codehaus.groovy.vmplugin.v5, + org.compiere, + org.compiere.acct, + org.compiere.apps, + org.compiere.apps.form, + org.compiere.apps.search, + org.compiere.apps.wf, + org.compiere.grid, + org.compiere.grid.ed, + org.compiere.grid.tree, + org.compiere.images, + org.compiere.install, + org.compiere.minigrid, + org.compiere.pos, + org.compiere.print, + org.eevolution.form, + org.jdesktop.beans, + org.jdesktop.swingx, + org.jdesktop.swingx.action, + org.jdesktop.swingx.auth, + org.jdesktop.swingx.auth.resources, + org.jdesktop.swingx.autocomplete, + org.jdesktop.swingx.autocomplete.workarounds, + org.jdesktop.swingx.border, + org.jdesktop.swingx.calendar, + org.jdesktop.swingx.calendar.resources, + org.jdesktop.swingx.color, + org.jdesktop.swingx.combobox, + org.jdesktop.swingx.decorator, + org.jdesktop.swingx.editors, + org.jdesktop.swingx.error, + org.jdesktop.swingx.event, + org.jdesktop.swingx.geom, + org.jdesktop.swingx.graphics, + org.jdesktop.swingx.icon, + org.jdesktop.swingx.image, + org.jdesktop.swingx.multislider, + org.jdesktop.swingx.multisplitpane, + org.jdesktop.swingx.painter, + org.jdesktop.swingx.painter.effects, + org.jdesktop.swingx.plaf, + org.jdesktop.swingx.plaf.basic, + org.jdesktop.swingx.plaf.basic.resources, + org.jdesktop.swingx.plaf.linux, + org.jdesktop.swingx.plaf.macosx, + org.jdesktop.swingx.plaf.metal, + org.jdesktop.swingx.plaf.misc, + org.jdesktop.swingx.plaf.motif, + org.jdesktop.swingx.plaf.nimbus, + org.jdesktop.swingx.plaf.resources, + org.jdesktop.swingx.plaf.windows, + org.jdesktop.swingx.plaf.windows.resources, + org.jdesktop.swingx.renderer, + org.jdesktop.swingx.resources, + org.jdesktop.swingx.table, + org.jdesktop.swingx.table.resources, + org.jdesktop.swingx.tips, + org.jdesktop.swingx.tree, + org.jdesktop.swingx.treetable, + org.jdesktop.swingx.util, + org.jfree, + org.jfree.base, + org.jfree.base.config, + org.jfree.base.log, + org.jfree.base.modules, + org.jfree.chart, + org.jfree.chart.annotations, + org.jfree.chart.axis, + org.jfree.chart.block, + org.jfree.chart.demo, + org.jfree.chart.editor, + org.jfree.chart.encoders, + org.jfree.chart.entity, + org.jfree.chart.event, + org.jfree.chart.imagemap, + org.jfree.chart.labels, + org.jfree.chart.needle, + org.jfree.chart.plot, + org.jfree.chart.plot.dial, + org.jfree.chart.renderer, + org.jfree.chart.renderer.category, + org.jfree.chart.renderer.xy, + org.jfree.chart.resources, + org.jfree.chart.servlet, + org.jfree.chart.title, + org.jfree.chart.urls, + org.jfree.chart.util, + org.jfree.data, + org.jfree.data.category, + org.jfree.data.contour, + org.jfree.data.function, + org.jfree.data.gantt, + org.jfree.data.general, + org.jfree.data.io, + org.jfree.data.jdbc, + org.jfree.data.resources, + org.jfree.data.statistics, + org.jfree.data.time, + org.jfree.data.time.ohlc, + org.jfree.data.xml, + org.jfree.data.xy, + org.jfree.date, + org.jfree.io, + org.jfree.layout, + org.jfree.resources, + org.jfree.text, + org.jfree.threads, + org.jfree.ui, + org.jfree.ui.about, + org.jfree.ui.about.resources, + org.jfree.ui.action, + org.jfree.ui.tabbedui, + org.jfree.util +Require-Bundle: org.adempiere.base;bundle-version="0.0.0", + org.eclipse.core.runtime;bundle-version="3.5.0", + org.adempiere.tools;bundle-version="0.0.0" +Bundle-Activator: org.adempiere.client.Activator diff --git a/client/build.properties b/client/build.properties new file mode 100644 index 0000000000..865179574d --- /dev/null +++ b/client/build.properties @@ -0,0 +1,8 @@ +source.client.jar = src/ +bin.includes = META-INF/,\ + lib/swingx-0.9.0.jar,\ + lib/groovy-all-1.5.1.jar,\ + lib/jcommon-1.0.14.jar,\ + lib/jfreechart-1.0.11.jar,\ + client.jar,\ + plugin.xml diff --git a/client/plugin.xml b/client/plugin.xml new file mode 100644 index 0000000000..41786b2054 --- /dev/null +++ b/client/plugin.xml @@ -0,0 +1,13 @@ + + + + + + + + + diff --git a/client/src/org/adempiere/client/Activator.java b/client/src/org/adempiere/client/Activator.java new file mode 100644 index 0000000000..fb5fec09f0 --- /dev/null +++ b/client/src/org/adempiere/client/Activator.java @@ -0,0 +1,12 @@ +package org.adempiere.client; + +import org.eclipse.core.runtime.Plugin; +import org.osgi.framework.BundleContext; + +public class Activator extends Plugin { + @Override + public void start(BundleContext context) throws Exception { + System.out.println("Starting client"); + org.compiere.AdempiereClient.main(new String[]{}); + } +} diff --git a/client/src/org/compiere/AdempiereClient.java b/client/src/org/compiere/AdempiereClient.java new file mode 100644 index 0000000000..7d4dd39e35 --- /dev/null +++ b/client/src/org/compiere/AdempiereClient.java @@ -0,0 +1,219 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. * + * This program is free software; you can redistribute it and/or modify it * + * under the terms version 2 of the GNU General Public License as published * + * by the Free Software Foundation. This program is distributed in the hope * + * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * + * See the GNU General Public License for more details. * + * You should have received a copy of the GNU General Public License along * + * with this program; if not, write to the Free Software Foundation, Inc., * + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * + * For the text or an alternative of this public license, you may reach us * + * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * + * or via info@compiere.org or http://www.compiere.org/license.html * + *****************************************************************************/ +package org.compiere; + +import java.awt.Image; +import java.awt.Toolkit; +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.net.URL; +import java.util.Properties; +import java.util.logging.Level; + +import javax.jnlp.BasicService; +import javax.jnlp.ServiceManager; +import javax.jnlp.UnavailableServiceException; +import javax.swing.ImageIcon; + +import org.compiere.db.CConnection; +import org.compiere.model.MClient; +import org.compiere.model.MSystem; +import org.compiere.model.ModelValidationEngine; +import org.compiere.util.CLogFile; +import org.compiere.util.CLogMgt; +import org.compiere.util.CLogger; +import org.compiere.util.DB; +import org.compiere.util.Env; +import org.compiere.util.Ini; +import org.compiere.util.Login; +import org.compiere.util.SecureEngine; +import org.compiere.util.SecureInterface; +import org.compiere.util.Splash; +import org.compiere.util.Util; + +/** + * Adempiere Control Class + * + * @author Jorg Janke + * @version $Id: Adempiere.java,v 1.8 2006/08/11 02:58:14 jjanke Exp $ + * + */ +public final class AdempiereClient +{ + /** Logging */ + private static CLogger log = null; + + /************************************************************************* + * Startup Client. + * - Print greeting, + * - Check Java version and + * - load ini parameters + * If it is a client, load/set PLAF and exit if error. + * If Client, you need to call startupEnvironment explicitly! + * For testing call method startupEnvironment + * @param isClient true for client + * @return successful startup + */ + public static synchronized boolean startup (boolean isClient) + { + // Already started + if (log != null) + return true; + + // Check Version + if (!Login.isJavaOK(isClient) && isClient) + System.exit(1); + + CLogMgt.initialize(isClient); + Ini.setClient (isClient); // Ini requires Logging + // Init Log + log = CLogger.getCLogger(AdempiereClient.class); + // Greeting + log.info(Adempiere.getSummaryAscii()); + // log.info(getAdempiereHome() + " - " + getJavaInfo() + " - " + getOSInfo()); + + // Load System environment + // EnvLoader.load(Ini.ENV_PREFIX); + + // System properties + Ini.loadProperties (false); + + // Set up Log + CLogMgt.setLevel(Ini.getProperty(Ini.P_TRACELEVEL)); + if (isClient && Ini.isPropertyBool(Ini.P_TRACEFILE) + && CLogFile.get(false, null, isClient) == null) + CLogMgt.addHandler(CLogFile.get (true, Ini.findAdempiereHome(), isClient)); + + // Set UI + if (isClient) + { + if (CLogMgt.isLevelAll()) + log.log(Level.FINEST, System.getProperties().toString()); + } + + // Set Default Database Connection from Ini + DB.setDBTarget(CConnection.get(Adempiere.getCodeBaseHost())); + + if (isClient) // don't test connection + return false; // need to call + + return startupEnvironment(isClient); + } // startup + + /** + * Startup Adempiere Environment. + * Automatically called for Server connections + * For testing call this method. + * @param isClient true if client connection + * @return successful startup + */ + public static boolean startupEnvironment (boolean isClient) + { + startup(isClient); // returns if already initiated + if (!DB.isConnected()) + { + log.severe ("No Database"); + return false; + } + MSystem system = MSystem.get(Env.getCtx()); // Initializes Base Context too + if (system == null) + return false; + + // Initialize main cached Singletons + ModelValidationEngine.get(); + try + { + String className = system.getEncryptionKey(); + if (className == null || className.length() == 0) + { + className = System.getProperty(SecureInterface.ADEMPIERE_SECURE); + if (className != null && className.length() > 0 + && !className.equals(SecureInterface.ADEMPIERE_SECURE_DEFAULT)) + { + SecureEngine.init(className); // test it + system.setEncryptionKey(className); + system.save(); + } + } + SecureEngine.init(className); + + // + if (isClient) + MClient.get(Env.getCtx(),0); // Login Client loaded later + else + MClient.getAll(Env.getCtx()); + } + catch (Exception e) + { + log.warning("Environment problems: " + e.toString()); + } + + // Start Workflow Document Manager (in other package) for PO + String className = null; + try + { + className = "org.compiere.wf.DocWorkflowManager"; + Class.forName(className); + // Initialize Archive Engine + className = "org.compiere.print.ArchiveEngine"; + Class.forName(className); + } + catch (Exception e) + { + log.warning("Not started: " + className + " - " + e.getMessage()); + } + + if (!isClient) + DB.updateMail(); + return true; + } // startupEnvironment + + + /** + * Main Method + * + * @param args optional start class + */ + public static void main (String[] args) + { + Splash.getSplash(); + startup(true); // error exit and initUI + + // Start with class as argument - or if nothing provided with Client + String className = "org.compiere.apps.AMenu"; + for (int i = 0; i < args.length; i++) + { + if (!args[i].equals("-debug")) // ignore -debug + { + className = args[i]; + break; + } + } + // + try + { + Class startClass = Class.forName(className); + startClass.newInstance(); + } + catch (Exception e) + { + System.err.println("ADempiere starting: " + className + " - " + e.toString()); + e.printStackTrace(); + } + } // main +} // Adempiere diff --git a/client/src/org/compiere/acct/AcctViewer.java b/client/src/org/compiere/acct/AcctViewer.java index 2fe4c85488..2827738ae4 100644 --- a/client/src/org/compiere/acct/AcctViewer.java +++ b/client/src/org/compiere/acct/AcctViewer.java @@ -122,7 +122,7 @@ public class AcctViewer extends CFrame /** State Info */ private AcctViewerData m_data = null; /** Image Icon */ - private ImageIcon m_iFind = new ImageIcon(org.compiere.Adempiere.class.getResource("images/Find16.gif")); + private ImageIcon m_iFind = new ImageIcon(org.compiere.Adempiere.getResource("images/Find16.gif")); /** Logger */ private static CLogger log = CLogger.getCLogger(AcctViewer.class); @@ -210,7 +210,7 @@ public class AcctViewer extends CFrame */ private void jbInit() throws Exception { - ImageIcon ii = new ImageIcon(org.compiere.Adempiere.class.getResource("images/InfoAccount16.gif")); + ImageIcon ii = new ImageIcon(org.compiere.Adempiere.getResource("images/InfoAccount16.gif")); setIconImage(ii.getImage()); // mainLayout.setHgap(5); diff --git a/client/src/org/compiere/apps/FieldRecordInfo.java b/client/src/org/compiere/apps/FieldRecordInfo.java index 245fee94dc..2306cba212 100644 --- a/client/src/org/compiere/apps/FieldRecordInfo.java +++ b/client/src/org/compiere/apps/FieldRecordInfo.java @@ -63,7 +63,7 @@ public class FieldRecordInfo extends CDialog public static final String CHANGE_LOG_COMMAND = "ChangeLog"; /** The Menu Icon */ - private static Icon s_icon = new ImageIcon(org.compiere.Adempiere.class.getResource("images/ChangeLog16.png")); + private static Icon s_icon = new ImageIcon(org.compiere.Adempiere.getResource("images/ChangeLog16.png")); private int AD_Table_ID; private int AD_Column_ID; diff --git a/client/src/org/compiere/apps/search/Find.java b/client/src/org/compiere/apps/search/Find.java index 25316aa2fc..e970c2b13a 100644 --- a/client/src/org/compiere/apps/search/Find.java +++ b/client/src/org/compiere/apps/search/Find.java @@ -310,22 +310,22 @@ public final class Find extends CDialog spaceN = Box.createVerticalStrut(8); spaceW = Box.createHorizontalStrut(8); spaceS = Box.createVerticalStrut(8); - bIgnore.setIcon(new ImageIcon(org.compiere.Adempiere.class.getResource("images/Ignore24.gif"))); + bIgnore.setIcon(new ImageIcon(org.compiere.Adempiere.getResource("images/Ignore24.gif"))); bIgnore.setMargin(new Insets(2, 2, 2, 2)); bIgnore.setToolTipText(Msg.getMsg(Env.getCtx(),"Ignore")); bIgnore.addActionListener(this); fQueryName.setToolTipText (Msg.getMsg(Env.getCtx(),"QueryName")); fQueryName.setEditable(true); fQueryName.addActionListener(this); - bSave.setIcon(new ImageIcon(org.compiere.Adempiere.class.getResource("images/Save24.gif"))); + bSave.setIcon(new ImageIcon(org.compiere.Adempiere.getResource("images/Save24.gif"))); bSave.setMargin(new Insets(2, 2, 2, 2)); bSave.setToolTipText(Msg.getMsg(Env.getCtx(),"Save")); bSave.addActionListener(this); - bNew.setIcon(new ImageIcon(org.compiere.Adempiere.class.getResource("images/New24.gif"))); + bNew.setIcon(new ImageIcon(org.compiere.Adempiere.getResource("images/New24.gif"))); bNew.setMargin(new Insets(2, 2, 2, 2)); bNew.setToolTipText(Msg.getMsg(Env.getCtx(),"New")); bNew.addActionListener(this); - bDelete.setIcon(new ImageIcon(org.compiere.Adempiere.class.getResource("images/Delete24.gif"))); + bDelete.setIcon(new ImageIcon(org.compiere.Adempiere.getResource("images/Delete24.gif"))); bDelete.setMargin(new Insets(2, 2, 2, 2)); bDelete.setToolTipText(Msg.getMsg(Env.getCtx(),"Delete")); bDelete.addActionListener(this); diff --git a/client/src/org/compiere/apps/search/Info.java b/client/src/org/compiere/apps/search/Info.java index 0f7ccd924a..2214543d83 100644 --- a/client/src/org/compiere/apps/search/Info.java +++ b/client/src/org/compiere/apps/search/Info.java @@ -402,7 +402,7 @@ public abstract class Info extends CDialog // popup.add(calcMenu); calcMenu.setText(Msg.getMsg(Env.getCtx(), "Calculator")); - calcMenu.setIcon(new ImageIcon(org.compiere.Adempiere.class.getResource("images/Calculator16.gif"))); + calcMenu.setIcon(new ImageIcon(org.compiere.Adempiere.getResource("images/Calculator16.gif"))); calcMenu.addActionListener(this); // p_table.getSelectionModel().addListSelectionListener(this); diff --git a/client/src/org/compiere/grid/ed/VAccountDialog.java b/client/src/org/compiere/grid/ed/VAccountDialog.java index 5fd659f660..b78ab99c0a 100644 --- a/client/src/org/compiere/grid/ed/VAccountDialog.java +++ b/client/src/org/compiere/grid/ed/VAccountDialog.java @@ -226,15 +226,15 @@ public final class VAccountDialog extends CDialog toolBar.setRequestFocusEnabled(false); toolBar.setBorderPainted(false); toolBar.setMargin(new Insets(5, 5, 5, 5)); - bSave.setIcon(new ImageIcon(org.compiere.Adempiere.class.getResource("images/Save24.gif"))); + bSave.setIcon(new ImageIcon(org.compiere.Adempiere.getResource("images/Save24.gif"))); bSave.setMargin(new Insets(2, 2, 2, 2)); bSave.setToolTipText(Msg.getMsg(Env.getCtx(),"AccountNewUpdate")); bSave.addActionListener(this); - bRefresh.setIcon(new ImageIcon(org.compiere.Adempiere.class.getResource("images/Refresh24.gif"))); + bRefresh.setIcon(new ImageIcon(org.compiere.Adempiere.getResource("images/Refresh24.gif"))); bRefresh.setMargin(new Insets(2, 2, 2, 2)); bRefresh.setToolTipText(Msg.getMsg(Env.getCtx(),"Refresh")); bRefresh.addActionListener(this); - bIgnore.setIcon(new ImageIcon(org.compiere.Adempiere.class.getResource("images/Ignore24.gif"))); + bIgnore.setIcon(new ImageIcon(org.compiere.Adempiere.getResource("images/Ignore24.gif"))); bIgnore.setMargin(new Insets(2, 2, 2, 2)); bIgnore.setToolTipText(Msg.getMsg(Env.getCtx(),"Ignore")); bIgnore.addActionListener(this); diff --git a/client/src/org/compiere/grid/ed/VLocator.java b/client/src/org/compiere/grid/ed/VLocator.java index 71f0edcd6c..0e76487133 100644 --- a/client/src/org/compiere/grid/ed/VLocator.java +++ b/client/src/org/compiere/grid/ed/VLocator.java @@ -144,7 +144,7 @@ public class VLocator extends JComponent m_text.addActionListener(this); this.add(m_text, BorderLayout.CENTER); - m_button.setIcon(new ImageIcon(org.compiere.Adempiere.class.getResource("images/Locator10.gif"))); + m_button.setIcon(new ImageIcon(org.compiere.Adempiere.getResource("images/Locator10.gif"))); m_button.setMargin(new Insets(0, 0, 0, 0)); m_button.setPreferredSize(new Dimension(height, height)); m_button.addActionListener(this); diff --git a/client/src/org/compiere/grid/ed/ValuePreference.java b/client/src/org/compiere/grid/ed/ValuePreference.java index f69a770266..9887f07c35 100644 --- a/client/src/org/compiere/grid/ed/ValuePreference.java +++ b/client/src/org/compiere/grid/ed/ValuePreference.java @@ -162,7 +162,7 @@ public class ValuePreference extends CDialog /** The Name of the Editor */ public static final String NAME = "ValuePreference"; /** The Menu Icon */ - private static Icon s_icon = new ImageIcon(org.compiere.Adempiere.class.getResource("images/VPreference16.gif")); + private static Icon s_icon = new ImageIcon(org.compiere.AdempiereClient.class.getResource("images/VPreference16.gif")); /** Logger */ private static CLogger log = CLogger.getCLogger(ValuePreference.class); diff --git a/client/src/org/compiere/util/ResourceFinder.java b/client/src/org/compiere/util/ResourceFinder.java new file mode 100644 index 0000000000..2a613bf290 --- /dev/null +++ b/client/src/org/compiere/util/ResourceFinder.java @@ -0,0 +1,18 @@ +package org.compiere.util; + +import java.net.URL; + +import org.adempiere.base.IResourceFinder; +import org.compiere.AdempiereClient; + +public class ResourceFinder implements IResourceFinder { + + public ResourceFinder() { + } + + public URL getResource(String name) { + URL resource = AdempiereClient.class.getResource(name); + return resource; + } + +} diff --git a/base/src/org/compiere/util/Splash.java b/client/src/org/compiere/util/Splash.java similarity index 93% rename from base/src/org/compiere/util/Splash.java rename to client/src/org/compiere/util/Splash.java index d7d19c57e1..fc3a358c5c 100644 --- a/base/src/org/compiere/util/Splash.java +++ b/client/src/org/compiere/util/Splash.java @@ -36,6 +36,7 @@ import java.net.URL; import java.util.Locale; import org.compiere.Adempiere; +import org.compiere.AdempiereClient; /** * Splash Screen. @@ -94,6 +95,7 @@ public class Splash extends Frame public Splash (String text) { super("Adempiere"); + System.out.println(text); message.setText(text); try { @@ -268,9 +270,9 @@ public class Splash extends Frame public AImage() { super(); - URL url = org.compiere.Adempiere.class.getResource("images/Java_anim.gif"); + URL url = org.compiere.AdempiereClient.class.getResource("images/Java_anim.gif"); if (url == null) - url = org.compiere.Adempiere.class.getResource("images/Java_logo.gif"); + url = org.compiere.AdempiereClient.class.getResource("images/Java_logo.gif"); if (url != null) { m_image = Toolkit.getDefaultToolkit().getImage(url); diff --git a/tools/.classpath b/tools/.classpath index 02b53b801f..d1215fb9a1 100644 --- a/tools/.classpath +++ b/tools/.classpath @@ -25,5 +25,9 @@ + + + + diff --git a/tools/.project b/tools/.project index 0f9d568aea..74a97a1d35 100644 --- a/tools/.project +++ b/tools/.project @@ -1,22 +1,33 @@ - - - tools - Tools Project - - - - - org.eclipse.jdt.core.javabuilder - - - - - com.ibm.etools.validation.validationbuilder - - - - - - org.eclipse.jdt.core.javanature - - + + + tools + Tools Project + + + + + org.eclipse.jdt.core.javabuilder + + + + + com.ibm.etools.validation.validationbuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.pde.PluginNature + + diff --git a/tools/META-INF/MANIFEST.MF b/tools/META-INF/MANIFEST.MF new file mode 100644 index 0000000000..4443061b7d --- /dev/null +++ b/tools/META-INF/MANIFEST.MF @@ -0,0 +1,1293 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: org.adempiere.tools +Bundle-SymbolicName: org.adempiere.tools +Bundle-Version: 0.0.0.1 +Bundle-ClassPath: tools.jar, + lib/jstl.jar, + lib/Verisign.jar, + lib/standard.jar, + lib/barbecue-1.5-beta1.jar, + lib/poi-3.0.1-FINAL-20070705.jar, + lib/jnlp.jar, + lib/iText-2.1.7.jar, + lib/swingx-0.9.0.jar, + lib/miglayout-3.7.1-swing.jar, + lib/log4j.jar, + lib/activation.jar, + lib/mail.jar, + lib/jpayment.jar, + lib/bsh-2.0b5.jar, + lib/script-api.jar, + lib/bsh-engine.jar, + lib/groovy-all-1.5.1.jar, + lib/groovy-engine.jar, + lib/jython.jar, + lib/jython-engine.jar, + lib/jcommon-1.0.14.jar, + lib/jfreechart-1.0.11.jar, + lib/javaee.jar, + lib/c3p0-0.9.1.2.jar, + lib/activemq-core-5.0.0.jar, + lib/ant-commons-net.jar, + lib/ant-contrib-1.0b1.jar, + lib/ant-launcher.jar, + lib/ant.jar, + lib/c3p0-oracle-thin-extras-0.9.1.2.jar, + lib/cglib.jar, + lib/commons-codec.jar, + lib/commons-collections-3.1.jar, + lib/commons-logging.jar, + lib/commons-net-1.4.0.jar, + lib/jgraph.jar, + lib/jpedal.jar, + lib/jsp-api.jar, + lib/junit.jar, + lib/logkit.jar, + lib/looks-2.0.4.jar, + lib/ocrs12.jar, + lib/ojdbc14.jar, + lib/postgresql.jar, + lib/servlet-api.jar, + lib/wizard.jar, + lib/xercesImpl.jar, + lib/xjavadoc-1.1.jar, + lib/xml-apis.jar +Export-Package: Lib, + Lib.email, + Lib.encodings, + Lib.pawt, + Lib.xml, + Lib.xml.dom, + Lib.xml.sax, + Lib.xml.sax.drivers2, + bsh;uses:="bsh.org.objectweb.asm", + bsh.classpath;uses:="bsh", + bsh.collection;uses:="bsh", + bsh.commands;uses:="bsh", + bsh.engine;uses:="javax.script,bsh", + bsh.org.objectweb.asm, + bsh.reflect;uses:="bsh", + bsh.servlet;uses:="javax.servlet.http", + bsh.util; + uses:="bsh.classpath, + javax.swing.text, + javax.swing.tree, + javax.swing.event, + bsh, + org.apache.bsf.util, + org.apache.bsf, + javax.swing", + bsh.util.lib, + com.Verisign.payment;uses:="javax.security.cert,javax.net.ssl", + com.keypoint, + com.lowagie.text;uses:="com.lowagie.text.pdf.draw,com.lowagie.text.pdf", + com.lowagie.text.exceptions, + com.lowagie.text.factories;uses:="com.lowagie.text", + com.lowagie.text.html; + uses:="com.lowagie.text.xml, + org.xml.sax, + com.lowagie.text.pdf, + com.lowagie.text", + com.lowagie.text.html.simpleparser;uses:="com.lowagie.text.pdf,com.lowagie.text.xml.simpleparser,com.lowagie.text", + com.lowagie.text.pdf; + uses:="new com.lowagie.text.pdf, + org.bouncycastle.ocsp, + com.lowagie.text.pdf.interfaces, + org.bouncycastle.asn1, + com.lowagie.text, + com.lowagie.text.pdf.collection, + com.lowagie.text.pdf.crypto, + org.w3c.dom, + com.lowagie.text.pdf.hyphenation, + org.bouncycastle.tsp, + com.lowagie.text.pdf.internal, + com.lowagie.text.xml.simpleparser", + com.lowagie.text.pdf.codec;uses:="com.lowagie.text.pdf,com.lowagie.text", + com.lowagie.text.pdf.codec.wmf;uses:="com.lowagie.text.pdf,com.lowagie.text", + com.lowagie.text.pdf.collection;uses:="com.lowagie.text.pdf", + com.lowagie.text.pdf.crypto, + com.lowagie.text.pdf.draw;uses:="com.lowagie.text.pdf,com.lowagie.text", + com.lowagie.text.pdf.events;uses:="com.lowagie.text.pdf,com.lowagie.text", + com.lowagie.text.pdf.fonts, + com.lowagie.text.pdf.fonts.cmaps, + com.lowagie.text.pdf.hyphenation;uses:="com.lowagie.text.xml.simpleparser", + com.lowagie.text.pdf.interfaces;uses:="com.lowagie.text.pdf", + com.lowagie.text.pdf.internal;uses:="com.lowagie.text.pdf.interfaces,com.lowagie.text.pdf,com.lowagie.text", + com.lowagie.text.pdf.parser;uses:="com.lowagie.text.pdf", + com.lowagie.text.xml; + uses:="org.xml.sax, + javax.xml.parsers, + org.xml.sax.helpers, + org.w3c.dom, + com.lowagie.text.pdf, + com.lowagie.text.html, + com.lowagie.text", + com.lowagie.text.xml.simpleparser;uses:="com.lowagie.text", + com.lowagie.text.xml.xmp;uses:="org.w3c.dom,com.lowagie.text.pdf", + com.lowagie.tools, + com.mchange, + com.mchange.lang, + com.mchange.util, + com.mchange.v1, + com.mchange.v1.db, + com.mchange.v1.db.sql, + com.mchange.v1.identicator, + com.mchange.v1.io, + com.mchange.v1.lang, + com.mchange.v1.util, + com.mchange.v1.xml, + com.mchange.v2, + com.mchange.v2.async, + com.mchange.v2.beans, + com.mchange.v2.c3p0, + com.mchange.v2.c3p0.cfg, + com.mchange.v2.c3p0.filter, + com.mchange.v2.c3p0.impl, + com.mchange.v2.c3p0.jboss, + com.mchange.v2.c3p0.management, + com.mchange.v2.c3p0.mbean, + com.mchange.v2.c3p0.stmt, + com.mchange.v2.c3p0.subst, + com.mchange.v2.c3p0.util, + com.mchange.v2.cfg, + com.mchange.v2.coalesce, + com.mchange.v2.codegen, + com.mchange.v2.codegen.bean, + com.mchange.v2.codegen.intfc, + com.mchange.v2.debug, + com.mchange.v2.encounter, + com.mchange.v2.holders, + com.mchange.v2.io, + com.mchange.v2.lang, + com.mchange.v2.log, + com.mchange.v2.log.jdk14logging, + com.mchange.v2.log.log4j, + com.mchange.v2.management, + com.mchange.v2.naming, + com.mchange.v2.resourcepool, + com.mchange.v2.ser, + com.mchange.v2.sql, + com.mchange.v2.sql.filter, + com.mchange.v2.util, + com.sfcommerce.jpaymentcomponent.beans;uses:="com.sfcommerce.jpaymentcomponent.ssl", + com.sfcommerce.jpaymentcomponent.definitions, + com.sfcommerce.jpaymentcomponent.exceptions, + com.sfcommerce.jpaymentcomponent.messages, + com.sfcommerce.jpaymentcomponent.ssl; + uses:="com.sun.net.ssl, + javax.security.cert, + com.sfcommerce.jpaymentcomponent.messages, + javax.net, + com.sfcommerce.jpaymentcomponent.definitions, + javax.net.ssl", + com.sfcommerce.jpaymentcomponent.utilities;uses:="javax.servlet.http,com.sfcommerce.jpaymentcomponent.messages", + com.sun.activation.registries, + com.sun.activation.viewers;uses:="javax.activation", + com.sun.mail.handlers;uses:="javax.activation", + com.sun.mail.iap, + com.sun.mail.imap; + uses:="javax.mail.search, + javax.mail.internet, + javax.activation, + com.sun.mail.imap.protocol, + javax.mail, + com.sun.mail.iap", + com.sun.mail.imap.protocol; + uses:="javax.mail.search, + javax.mail.internet, + com.sun.mail.imap, + javax.mail, + com.sun.mail.iap, + javax.security.auth.callback", + com.sun.mail.pop3;uses:="javax.mail.internet,javax.mail", + com.sun.mail.smtp;uses:="javax.mail.internet,javax.mail,com.sun.mail.util", + com.sun.mail.util, + com.sun.script.groovy;uses:="javax.script,groovy.lang", + com.sun.script.jython;uses:="javax.script,org.python.core", + com.ziclix.python.sql;uses:="org.python.core", + com.ziclix.python.sql.connect;uses:="org.python.core", + com.ziclix.python.sql.handler;uses:="org.python.core,com.ziclix.python.sql", + com.ziclix.python.sql.pipe;uses:="org.python.core,com.ziclix.python.sql.util", + com.ziclix.python.sql.pipe.csv;uses:="org.python.core,com.ziclix.python.sql.pipe", + com.ziclix.python.sql.pipe.db;uses:="org.python.core,com.ziclix.python.sql,com.ziclix.python.sql.pipe", + com.ziclix.python.sql.procedure;uses:="org.python.core,com.ziclix.python.sql", + com.ziclix.python.sql.resource, + com.ziclix.python.sql.util;uses:="org.python.core,com.ziclix.python.sql", + groovy.inspect;uses:="groovy.lang", + groovy.inspect.swingui; + uses:="javax.swing.event, + javax.swing.table, + org.codehaus.groovy.runtime, + groovy.lang, + javax.swing", + groovy.io, + groovy.lang; + uses:="groovy.util, + org.codehaus.groovy.ast, + org.codehaus.groovy.control, + groovyjarjarasm.asm, + org.codehaus.groovy.runtime.metaclass, + org.codehaus.groovy.reflection, + junit.framework, + new groovy.lang", + groovy.mock;uses:="com.mockobjects,groovy.lang,com.mockobjects.constraint", + groovy.mock.interceptor;uses:="groovy.lang", + groovy.model;uses:="javax.swing.table,groovy.lang", + groovy.security, + groovy.servlet; + uses:="groovy.util, + javax.servlet.http, + javax.servlet, + groovy.lang, + groovy.text, + javax.servlet.jsp", + groovy.sql; + uses:="org.codehaus.groovy.ast, + javax.sql, + org.codehaus.groovy.ast.stmt, + org.codehaus.groovy.syntax, + org.codehaus.groovy.ast.expr, + groovy.lang", + groovy.swing; + uses:="groovy.util, + org.codehaus.groovy.runtime, + groovy.lang, + javax.swing", + groovy.swing.binding; + uses:="javax.swing.event, + javax.swing.text, + org.codehaus.groovy.binding, + javax.swing", + groovy.swing.factory;uses:="groovy.util,org.codehaus.groovy.runtime,groovy.lang", + groovy.swing.impl;uses:="groovy.lang,javax.swing", + groovy.text;uses:="groovy.util,groovy.lang", + groovy.time, + groovy.ui; + uses:="javax.swing.text, + javax.swing.event, + groovy.swing, + org.codehaus.groovy.runtime, + groovy.lang, + groovy.ui.text, + javax.swing", + groovy.ui.icons, + groovy.ui.text; + uses:="javax.swing.undo, + javax.swing.text, + org.xml.sax, + javax.swing.event, + org.xml.sax.helpers, + javax.swing", + groovy.ui.view;uses:="javax.swing.text,org.codehaus.groovy.runtime,groovy.lang", + groovy.util; + uses:="org.xml.sax, + org.apache.tools.ant, + javax.management, + new groovy.util, + org.xml.sax.helpers, + groovy.util.slurpersupport, + javax.xml.parsers, + org.codehaus.groovy.runtime, + groovy.xml, + groovy.lang, + junit.framework, + org.apache.commons.cli", + groovy.util.slurpersupport;uses:="groovy.lang", + groovy.xml; + uses:="groovy.util, + org.xml.sax, + javax.xml.parsers, + org.codehaus.groovy.runtime, + groovy.xml.streamingmarkupsupport, + org.w3c.dom, + groovy.lang", + groovy.xml.dom;uses:="org.w3c.dom", + groovy.xml.streamingmarkupsupport;uses:="org.codehaus.groovy.runtime,groovy.lang", + groovyjarjarantlr; + uses:="groovyjarjarantlr.debug, + groovyjarjarantlr.collections.impl, + groovyjarjarantlr.collections, + groovyjarjarantlr.ASdebug", + groovyjarjarantlr.ASdebug;uses:="groovyjarjarantlr", + groovyjarjarantlr.actions.cpp;uses:="groovyjarjarantlr,groovyjarjarantlr.collections.impl", + groovyjarjarantlr.actions.csharp;uses:="groovyjarjarantlr,groovyjarjarantlr.collections.impl", + groovyjarjarantlr.actions.java;uses:="groovyjarjarantlr,groovyjarjarantlr.collections.impl", + groovyjarjarantlr.actions.python;uses:="groovyjarjarantlr,groovyjarjarantlr.collections.impl", + groovyjarjarantlr.build, + groovyjarjarantlr.collections;uses:="groovyjarjarantlr", + groovyjarjarantlr.collections.impl;uses:="groovyjarjarantlr,groovyjarjarantlr.collections", + groovyjarjarantlr.debug;uses:="groovyjarjarantlr,groovyjarjarantlr.collections.impl", + groovyjarjarantlr.debug.misc; + uses:="javax.swing.event, + javax.swing.tree, + groovyjarjarantlr.collections, + javax.swing", + groovyjarjarantlr.preprocessor;uses:="groovyjarjarantlr,groovyjarjarantlr.collections.impl", + groovyjarjarasm.asm, + groovyjarjarasm.asm.signature, + groovyjarjarasm.asm.tree;uses:="groovyjarjarasm.asm", + groovyjarjarcommonscli, + javatests, + javax.activation, + javax.annotation, + javax.annotation.security, + javax.ejb;uses:="javax.xml.rpc.handler,javax.transaction", + javax.ejb.spi;uses:="javax.ejb", + javax.el, + javax.enterprise.deploy.model;uses:="javax.enterprise.deploy.shared", + javax.enterprise.deploy.model.exceptions, + javax.enterprise.deploy.shared, + javax.enterprise.deploy.shared.factories;uses:="javax.enterprise.deploy.spi,javax.enterprise.deploy.spi.factories", + javax.enterprise.deploy.spi;uses:="javax.enterprise.deploy.shared,javax.enterprise.deploy.model,javax.enterprise.deploy.spi.status", + javax.enterprise.deploy.spi.exceptions, + javax.enterprise.deploy.spi.factories;uses:="javax.enterprise.deploy.spi", + javax.enterprise.deploy.spi.status;uses:="javax.enterprise.deploy.spi,javax.enterprise.deploy.shared", + javax.faces, + javax.faces.application; + uses:="javax.faces, + javax.faces.context, + javax.faces.convert, + javax.faces.el, + javax.faces.event, + javax.faces.component, + javax.faces.validator, + javax.el, + new javax.faces.application", + javax.faces.component; + uses:="javax.faces.render, + javax.faces.context, + javax.faces.convert, + javax.faces.el, + javax.faces.event, + javax.faces.application, + javax.faces.validator, + javax.faces.model, + javax.el", + javax.faces.component.html;uses:="javax.faces.component,javax.faces.context", + javax.faces.context; + uses:="javax.faces.lifecycle, + javax.faces.render, + javax.faces.component, + javax.faces.application, + javax.el", + javax.faces.convert; + uses:="javax.faces, + javax.faces.component, + javax.faces.context, + javax.faces.application", + javax.faces.el;uses:="javax.faces,javax.faces.context", + javax.faces.event; + uses:="javax.faces.lifecycle, + javax.faces.component, + javax.faces, + javax.faces.context, + javax.el", + javax.faces.lifecycle;uses:="javax.faces.event,javax.faces.context", + javax.faces.model;uses:="javax.servlet.jsp.jstl.sql", + javax.faces.render;uses:="javax.faces.component,javax.faces.context,javax.faces.application", + javax.faces.validator; + uses:="javax.faces, + javax.faces.component, + javax.faces.context, + javax.faces.application, + javax.el", + javax.faces.webapp; + uses:="javax.servlet.jsp.tagext, + javax.faces.context, + javax.faces.convert, + javax.servlet.jsp, + javax.servlet, + javax.faces.component, + javax.faces.application, + javax.faces.validator, + javax.el", + javax.interceptor, + javax.jms;uses:="javax.transaction.xa", + javax.jnlp, + javax.jws, + javax.jws.soap, + javax.mail;uses:="javax.mail.search,javax.mail.event,javax.activation", + javax.mail.event;uses:="javax.mail", + javax.mail.internet;uses:="javax.activation,javax.mail", + javax.mail.search;uses:="javax.mail", + javax.mail.util;uses:="javax.mail.internet,javax.activation", + javax.management.j2ee;uses:="javax.ejb,javax.management", + javax.management.j2ee.statistics, + javax.persistence, + javax.persistence.spi;uses:="javax.persistence,javax.sql", + javax.resource;uses:="javax.naming", + javax.resource.cci;uses:="javax.resource", + javax.resource.spi; + uses:="javax.resource.spi.endpoint, + javax.resource.spi.work, + javax.resource, + javax.transaction.xa, + javax.security.auth", + javax.resource.spi.endpoint;uses:="javax.transaction.xa", + javax.resource.spi.security;uses:="javax.resource.spi", + javax.resource.spi.work;uses:="javax.resource,javax.transaction.xa", + javax.script, + javax.security.jacc;uses:="javax.servlet.http", + javax.servlet, + javax.servlet.http;uses:="javax.servlet", + javax.servlet.jsp; + uses:="javax.servlet.http, + javax.servlet, + javax.servlet.jsp.tagext, + javax.servlet.jsp.el, + javax.el", + javax.servlet.jsp.el; + uses:="javax.servlet.http, + javax.servlet, + javax.servlet.jsp, + javax.el", + javax.servlet.jsp.jstl.core; + uses:="javax.servlet.http, + javax.servlet, + javax.servlet.jsp.tagext, + javax.servlet.jsp, + javax.el", + javax.servlet.jsp.jstl.fmt;uses:="javax.servlet.jsp", + javax.servlet.jsp.jstl.sql, + javax.servlet.jsp.jstl.tlv;uses:="javax.servlet.jsp.tagext", + javax.servlet.jsp.tagext;uses:="javax.servlet.jsp", + javax.transaction;uses:="javax.transaction.xa", + javax.transaction.xa, + javax.xml.bind; + uses:="javax.xml.bind.attachment, + org.xml.sax, + javax.xml.namespace, + javax.xml.bind.annotation.adapters, + org.w3c.dom, + javax.xml.transform, + javax.xml.validation, + javax.xml.stream", + javax.xml.bind.annotation; + uses:="javax.xml.transform.dom, + javax.xml.parsers, + org.w3c.dom, + javax.xml.bind, + javax.xml.transform", + javax.xml.bind.annotation.adapters, + javax.xml.bind.attachment;uses:="javax.activation", + javax.xml.bind.helpers; + uses:="javax.xml.bind.attachment, + org.xml.sax, + javax.xml.validation, + javax.xml.bind.annotation.adapters, + org.w3c.dom, + javax.xml.bind, + javax.xml.transform, + javax.xml.stream", + javax.xml.bind.util;uses:="javax.xml.transform.sax,org.xml.sax,javax.xml.bind", + javax.xml.registry;uses:="javax.activation,javax.xml.registry.infomodel", + javax.xml.registry.infomodel;uses:="javax.activation,javax.xml.registry", + javax.xml.registry.samples;uses:="javax.xml.registry", + javax.xml.rpc;uses:="javax.xml.rpc.handler,javax.xml.rpc.encoding,javax.xml.namespace", + javax.xml.rpc.encoding;uses:="javax.xml.namespace", + javax.xml.rpc.handler;uses:="javax.xml.namespace", + javax.xml.rpc.handler.soap;uses:="javax.xml.soap,javax.xml.rpc.handler", + javax.xml.rpc.holders;uses:="javax.xml.namespace", + javax.xml.rpc.server;uses:="javax.servlet.http,javax.servlet,javax.xml.rpc.handler", + javax.xml.rpc.soap;uses:="javax.xml.soap,javax.xml.namespace", + javax.xml.soap; + uses:="javax.xml.transform.dom, + javax.xml.namespace, + javax.activation, + org.w3c.dom, + javax.xml.transform", + javax.xml.stream; + uses:="javax.xml.stream.events, + javax.xml.namespace, + javax.xml.transform, + javax.xml.stream.util", + javax.xml.stream.events;uses:="javax.xml.namespace,javax.xml.stream", + javax.xml.stream.util;uses:="javax.xml.stream.events,javax.xml.namespace,javax.xml.stream", + javax.xml.ws; + uses:="javax.xml.ws.handler, + javax.xml.namespace, + org.w3c.dom, + javax.xml.bind, + javax.xml.transform", + javax.xml.ws.handler;uses:="javax.xml.namespace,javax.xml.ws", + javax.xml.ws.handler.soap; + uses:="javax.xml.ws.handler, + javax.xml.soap, + javax.xml.namespace, + javax.xml.bind", + javax.xml.ws.http;uses:="javax.xml.ws", + javax.xml.ws.soap;uses:="javax.xml.soap,javax.xml.ws", + javax.xml.ws.spi; + uses:="javax.xml.ws.handler, + javax.xml.namespace, + javax.xml.ws.wsaddressing, + javax.xml.bind, + javax.xml.ws, + javax.xml.transform", + javax.xml.ws.wsaddressing; + uses:="javax.xml.namespace, + org.w3c.dom, + javax.xml.ws, + javax.xml.transform", + jxxload_help;uses:="org.python.core", + net.miginfocom.layout, + net.miginfocom.swing;uses:="net.miginfocom.layout", + net.sourceforge.barbecue; + uses:="javax.servlet.http, + javax.portlet, + javax.swing, + net.sourceforge.barbecue.output", + net.sourceforge.barbecue.env, + net.sourceforge.barbecue.formatter;uses:="net.sourceforge.barbecue", + net.sourceforge.barbecue.linear;uses:="net.sourceforge.barbecue,net.sourceforge.barbecue.output", + net.sourceforge.barbecue.linear.codabar;uses:="net.sourceforge.barbecue,net.sourceforge.barbecue.linear", + net.sourceforge.barbecue.linear.code128;uses:="net.sourceforge.barbecue,net.sourceforge.barbecue.linear", + net.sourceforge.barbecue.linear.code39;uses:="net.sourceforge.barbecue,net.sourceforge.barbecue.linear", + net.sourceforge.barbecue.linear.ean; + uses:="net.sourceforge.barbecue.linear.code128, + net.sourceforge.barbecue, + net.sourceforge.barbecue.linear.upc, + net.sourceforge.barbecue.output", + net.sourceforge.barbecue.linear.postnet;uses:="net.sourceforge.barbecue,net.sourceforge.barbecue.output,net.sourceforge.barbecue.linear", + net.sourceforge.barbecue.linear.twoOfFive;uses:="net.sourceforge.barbecue,net.sourceforge.barbecue.linear", + net.sourceforge.barbecue.linear.upc;uses:="net.sourceforge.barbecue,net.sourceforge.barbecue.output,net.sourceforge.barbecue.linear", + net.sourceforge.barbecue.output;uses:="org.jdom", + net.sourceforge.barbecue.twod.pdf417;uses:="net.sourceforge.barbecue,net.sourceforge.barbecue.output,net.sourceforge.barbecue.linear", + oracle.core.lmx, + oracle.core.lvf, + oracle.jdbc, + oracle.jdbc.aq, + oracle.jdbc.connector, + oracle.jdbc.dcn, + oracle.jdbc.driver, + oracle.jdbc.internal, + oracle.jdbc.oci, + oracle.jdbc.oracore, + oracle.jdbc.pool, + oracle.jdbc.rowset, + oracle.jdbc.util, + oracle.jdbc.xa, + oracle.jdbc.xa.client, + oracle.jpub.runtime, + oracle.net.TNSAddress, + oracle.net.ano, + oracle.net.aso, + oracle.net.jndi, + oracle.net.nl, + oracle.net.nl.mesg, + oracle.net.ns, + oracle.net.nt, + oracle.net.resolver, + oracle.security.o3logon, + oracle.security.o5logon, + oracle.sql, + oracle.sql.converter, + org.apache.ecs;uses:="org.apache.ecs.xhtml", + org.apache.ecs.filter;uses:="org.apache.ecs", + org.apache.ecs.storage, + org.apache.ecs.xhtml;uses:="org.apache.ecs", + org.apache.ecs.xml;uses:="org.apache.ecs", + org.apache.log4j;uses:="org.apache.log4j.or,org.apache.log4j.spi,org.apache.log4j.helpers", + org.apache.log4j.chainsaw; + uses:="javax.swing.event, + org.apache.log4j, + org.xml.sax, + org.apache.log4j.spi, + org.xml.sax.helpers, + javax.swing.table, + javax.swing", + org.apache.log4j.config;uses:="org.apache.log4j", + org.apache.log4j.helpers;uses:="org.apache.log4j,org.apache.log4j.spi", + org.apache.log4j.jdbc;uses:="org.apache.log4j,org.apache.log4j.spi", + org.apache.log4j.lf5;uses:="org.apache.log4j,org.apache.log4j.lf5.viewer,org.apache.log4j.spi", + org.apache.log4j.lf5.config, + org.apache.log4j.lf5.util;uses:="org.apache.log4j.lf5.viewer,org.apache.log4j.lf5", + org.apache.log4j.lf5.viewer; + uses:="javax.swing.table, + org.apache.log4j.lf5.viewer.categoryexplorer, + org.apache.log4j.lf5, + javax.swing.event, + org.apache.log4j.lf5.viewer.configure, + org.apache.log4j.lf5.util, + javax.swing", + org.apache.log4j.lf5.viewer.categoryexplorer; + uses:="javax.swing.event, + javax.swing.tree, + javax.swing.table, + org.apache.log4j.lf5, + javax.swing", + org.apache.log4j.lf5.viewer.configure;uses:="org.apache.log4j.lf5.viewer,javax.swing.tree,org.w3c.dom", + org.apache.log4j.lf5.viewer.images, + org.apache.log4j.net; + uses:="org.apache.log4j, + javax.naming, + org.apache.log4j.spi, + javax.mail.internet, + javax.mail, + javax.jms, + org.apache.log4j.helpers", + org.apache.log4j.nt;uses:="org.apache.log4j,org.apache.log4j.spi", + org.apache.log4j.or;uses:="org.apache.log4j.spi", + org.apache.log4j.or.jms;uses:="org.apache.log4j.or", + org.apache.log4j.or.sax;uses:="org.apache.log4j.or", + org.apache.log4j.spi;uses:="org.apache.log4j.or,org.apache.log4j", + org.apache.log4j.varia;uses:="org.apache.log4j,org.apache.log4j.spi", + org.apache.log4j.xml; + uses:="org.apache.log4j, + org.apache.log4j.spi, + org.xml.sax, + javax.xml.parsers, + org.w3c.dom, + org.apache.log4j.helpers, + org.apache.log4j.config", + org.apache.poi.ddf, + org.apache.poi.dev, + org.apache.poi.hpsf;uses:="org.apache.poi.poifs.filesystem", + org.apache.poi.hpsf.wellknown, + org.apache.poi.hssf.dev;uses:="org.apache.poi.hssf.eventusermodel,org.apache.poi.hssf.usermodel,org.apache.poi.hssf.record", + org.apache.poi.hssf.eventmodel;uses:="org.apache.poi.hssf.model,org.apache.poi.hssf.record", + org.apache.poi.hssf.eventusermodel;uses:="org.apache.poi.poifs.filesystem,org.apache.poi.hssf.record", + org.apache.poi.hssf.model; + uses:="org.apache.poi.hssf.util, + org.apache.poi.hssf.record.formula, + org.apache.poi.ddf, + org.apache.poi.hssf.record, + org.apache.poi.hssf.usermodel, + org.apache.poi.hssf.record.aggregates", + org.apache.poi.hssf.record; + uses:="org.apache.poi.util, + org.apache.poi.hssf.record.formula, + org.apache.poi.hssf.model, + org.apache.poi.ddf, + org.apache.poi.hssf.usermodel", + org.apache.poi.hssf.record.aggregates;uses:="org.apache.poi.hssf.record", + org.apache.poi.hssf.record.formula;uses:="org.apache.poi.util,org.apache.poi.hssf.model,org.apache.poi.hssf.record", + org.apache.poi.hssf.usermodel; + uses:="org.apache.poi.hssf.util, + org.apache.poi.hssf.model, + org.apache.poi.poifs.filesystem, + org.apache.poi.ddf, + org.apache.poi.hssf.record", + org.apache.poi.hssf.util;uses:="org.apache.poi.hssf.record", + org.apache.poi.poifs.common, + org.apache.poi.poifs.dev, + org.apache.poi.poifs.eventfilesystem;uses:="org.apache.poi.poifs.filesystem", + org.apache.poi.poifs.filesystem; + uses:="org.apache.poi.poifs.property, + org.apache.poi.hpsf, + org.apache.poi.poifs.storage, + org.apache.poi.poifs.dev", + org.apache.poi.poifs.property; + uses:="org.apache.poi.poifs.filesystem, + org.apache.poi.hpsf, + org.apache.poi.poifs.storage, + org.apache.poi.poifs.dev", + org.apache.poi.poifs.storage;uses:="org.apache.poi.poifs.filesystem,org.apache.poi.poifs.property", + org.apache.poi.util;uses:="new org.apache.poi.util", + org.apache.taglibs.standard, + org.apache.taglibs.standard.extra.spath;uses:="org.xml.sax,javax.servlet.jsp.tagext,org.xml.sax.helpers", + org.apache.taglibs.standard.functions, + org.apache.taglibs.standard.lang.jstl; + uses:="javax.servlet.http, + javax.servlet, + javax.servlet.jsp.tagext, + org.apache.taglibs.standard.lang.support, + org.apache.taglibs.standard.lang.jstl.parser, + javax.servlet.jsp", + org.apache.taglibs.standard.lang.jstl.parser;uses:="org.apache.taglibs.standard.lang.jstl", + org.apache.taglibs.standard.lang.jstl.test; + uses:="javax.servlet.http, + javax.servlet, + javax.servlet.jsp.el, + javax.servlet.jsp", + org.apache.taglibs.standard.lang.jstl.test.beans, + org.apache.taglibs.standard.lang.support;uses:="javax.servlet.jsp.tagext,javax.servlet.jsp", + org.apache.taglibs.standard.resources, + org.apache.taglibs.standard.tag.common.core; + uses:="javax.servlet.http, + javax.servlet.jsp.jstl.core, + javax.servlet, + javax.servlet.jsp.tagext, + javax.servlet.jsp.el, + javax.servlet.jsp", + org.apache.taglibs.standard.tag.common.fmt;uses:="javax.servlet.jsp.jstl.fmt,javax.servlet.jsp.tagext,javax.servlet.jsp", + org.apache.taglibs.standard.tag.common.sql; + uses:="javax.servlet.jsp.tagext, + javax.servlet.jsp.jstl.sql, + javax.servlet.jsp, + javax.sql", + org.apache.taglibs.standard.tag.common.xml; + uses:="org.apache.taglibs.standard.tag.common.core, + org.xml.sax, + javax.servlet.jsp.tagext, + org.w3c.dom, + javax.servlet.jsp, + javax.xml.transform, + org.apache.xml.utils, + org.w3c.dom.traversal, + javax.servlet.jsp.jstl.core, + javax.xml.parsers, + org.apache.xpath.objects, + org.apache.xpath", + org.apache.taglibs.standard.tag.el.core; + uses:="javax.servlet.jsp.jstl.core, + org.apache.taglibs.standard.tag.common.core, + javax.servlet.jsp.tagext, + javax.servlet.jsp", + org.apache.taglibs.standard.tag.el.fmt;uses:="org.apache.taglibs.standard.tag.common.fmt", + org.apache.taglibs.standard.tag.el.sql;uses:="org.apache.taglibs.standard.tag.common.sql", + org.apache.taglibs.standard.tag.el.xml;uses:="org.apache.taglibs.standard.tag.common.xml", + org.apache.taglibs.standard.tag.rt.core;uses:="javax.servlet.jsp.jstl.core,org.apache.taglibs.standard.tag.common.core,javax.servlet.jsp.tagext", + org.apache.taglibs.standard.tag.rt.fmt;uses:="javax.servlet.jsp.jstl.fmt,org.apache.taglibs.standard.tag.common.fmt", + org.apache.taglibs.standard.tag.rt.sql;uses:="org.apache.taglibs.standard.tag.common.sql", + org.apache.taglibs.standard.tag.rt.xml;uses:="org.xml.sax,org.apache.taglibs.standard.tag.common.xml,javax.xml.transform", + org.apache.taglibs.standard.tei;uses:="javax.servlet.jsp.tagext", + org.apache.taglibs.standard.tlv;uses:="org.xml.sax,javax.servlet.jsp.tagext,org.xml.sax.helpers", + org.codehaus.groovy, + org.codehaus.groovy.ant; + uses:="groovyjarjarasm.asm.tree, + org.apache.tools.ant.types, + org.apache.tools.ant.taskdefs, + org.apache.tools.ant, + org.codehaus.groovy.control, + groovyjarjarasm.asm.tree.analysis, + groovyjarjarasm.asm, + groovyjarjarasm.asm.util, + org.codehaus.groovy.tools.javac, + groovy.lang", + org.codehaus.groovy.antlr; + uses:="groovyjarjarantlr.debug.misc, + org.codehaus.groovy.antlr.parser, + org.codehaus.groovy.ast, + org.codehaus.groovy.control, + javax.swing.border, + groovyjarjarantlr, + org.codehaus.groovy.ast.stmt, + groovyjarjarantlr.collections, + org.codehaus.groovy.syntax, + org.codehaus.groovy.ast.expr, + javax.swing", + org.codehaus.groovy.antlr.java; + uses:="org.codehaus.groovy.antlr, + groovyjarjarantlr, + groovyjarjarantlr.collections.impl, + org.codehaus.groovy.antlr.parser, + groovyjarjarantlr.collections, + org.codehaus.groovy.antlr.treewalker", + org.codehaus.groovy.antlr.parser; + uses:="org.codehaus.groovy.antlr, + groovyjarjarantlr, + groovyjarjarantlr.collections.impl, + groovyjarjarantlr.collections", + org.codehaus.groovy.antlr.treewalker;uses:="org.codehaus.groovy.antlr,groovyjarjarantlr.collections", + org.codehaus.groovy.ast; + uses:="org.codehaus.groovy.ast.stmt, + org.codehaus.groovy.control, + org.codehaus.groovy.ast.expr, + groovy.lang, + groovyjarjarasm.asm", + org.codehaus.groovy.ast.expr; + uses:="org.codehaus.groovy.ast.stmt, + org.codehaus.groovy.syntax, + org.codehaus.groovy.ast, + groovy.lang", + org.codehaus.groovy.ast.stmt;uses:="org.codehaus.groovy.ast,org.codehaus.groovy.ast.expr", + org.codehaus.groovy.binding;uses:="groovy.lang,javax.swing", + org.codehaus.groovy.bsf;uses:="org.apache.bsf.util,org.apache.bsf,groovy.lang", + org.codehaus.groovy.classgen; + uses:="org.codehaus.groovy.reflection, + org.codehaus.groovy.ast.stmt, + org.codehaus.groovy.syntax, + org.codehaus.groovy.ast, + org.codehaus.groovy.ast.expr, + org.codehaus.groovy.control, + groovyjarjarasm.asm", + org.codehaus.groovy.control; + uses:="org.codehaus.groovy, + org.codehaus.groovy.classgen, + org.codehaus.groovy.control.messages, + org.codehaus.groovy.ast, + org.codehaus.groovy.control.io, + groovyjarjarasm.asm, + groovyjarjarantlr, + org.codehaus.groovy.ast.stmt, + org.codehaus.groovy.syntax, + org.codehaus.groovy.ast.expr, + groovy.lang, + org.codehaus.groovy.tools", + org.codehaus.groovy.control.io;uses:="org.codehaus.groovy.control", + org.codehaus.groovy.control.messages;uses:="org.codehaus.groovy.syntax,org.codehaus.groovy.control", + org.codehaus.groovy.groovydoc, + org.codehaus.groovy.reflection;uses:="org.codehaus.groovy.classgen,org.codehaus.groovy.runtime,groovy.lang", + org.codehaus.groovy.runtime; + uses:="org.w3c.dom, + groovy.time, + org.codehaus.groovy.reflection, + org.codehaus.groovy.runtime.wrappers, + junit.framework, + groovy.lang", + org.codehaus.groovy.runtime.metaclass;uses:="org.codehaus.groovy.reflection,org.codehaus.groovy.runtime,groovy.lang", + org.codehaus.groovy.runtime.typehandling, + org.codehaus.groovy.runtime.wrappers;uses:="groovy.lang", + org.codehaus.groovy.syntax; + uses:="org.codehaus.groovy, + org.codehaus.groovy.ast, + org.codehaus.groovy.control, + groovy.lang", + org.codehaus.groovy.tools;uses:="org.codehaus.groovy,org.codehaus.groovy.control,groovyjarjarcommonscli", + org.codehaus.groovy.tools.groovydoc;uses:="org.codehaus.groovy.antlr,org.codehaus.groovy.antlr.treewalker,org.codehaus.groovy.groovydoc", + org.codehaus.groovy.tools.javac; + uses:="org.codehaus.groovy.ast.stmt, + org.codehaus.groovy.classgen, + org.codehaus.groovy.ast, + org.codehaus.groovy.control, + groovy.lang", + org.codehaus.groovy.tools.shell; + uses:="org.codehaus.groovy.tools.shell.util, + org.codehaus.groovy.runtime, + jline, + groovy.lang", + org.codehaus.groovy.tools.shell.commands; + uses:="org.codehaus.groovy.tools.shell.util, + org.codehaus.groovy.tools.shell, + org.codehaus.groovy.runtime, + jline, + groovy.lang", + org.codehaus.groovy.tools.shell.util; + uses:="org.codehaus.groovy.tools.shell, + org.codehaus.groovy.runtime, + jline, + groovy.lang, + groovyjarjarcommonscli", + org.codehaus.groovy.tools.xml;uses:="groovy.util,org.w3c.dom", + org.codehaus.groovy.vmplugin;uses:="org.codehaus.groovy.ast", + org.codehaus.groovy.vmplugin.v4;uses:="org.codehaus.groovy.vmplugin,org.codehaus.groovy.ast", + org.codehaus.groovy.vmplugin.v5;uses:="org.codehaus.groovy.vmplugin,org.codehaus.groovy.ast", + org.jdesktop.beans, + org.jdesktop.swingx; + uses:="org.jdesktop.swingx.event, + org.jdesktop.swingx.multislider, + javax.swing.undo, + javax.swing.tree, + org.jdesktop.swingx.table, + javax.swing.table, + new org.jdesktop.swingx, + org.jdesktop.swingx.painter, + org.jdesktop.swingx.treetable, + org.jdesktop.swingx.tips, + org.jdesktop.swingx.calendar, + javax.swing, + org.apache.batik.ext.awt, + javax.swing.text, + org.jdesktop.swingx.error, + org.jdesktop.swingx.auth, + javax.swing.border, + org.jdesktop.swingx.decorator, + javax.swing.event, + org.jdesktop.swingx.action, + org.jdesktop.beans, + javax.swing.text.html, + javax.swing.plaf, + javax.accessibility, + org.jdesktop.swingx.plaf, + org.jdesktop.swingx.color", + org.jdesktop.swingx.action;uses:="org.jdesktop.swingx,javax.swing", + org.jdesktop.swingx.auth; + uses:="new org.jdesktop.swingx.auth, + org.jdesktop.beans, + org.jdesktop.swingworker, + javax.security.auth.callback", + org.jdesktop.swingx.auth.resources, + org.jdesktop.swingx.autocomplete; + uses:="javax.swing.event, + javax.swing.text, + javax.swing.table, + javax.swing", + org.jdesktop.swingx.autocomplete.workarounds;uses:="javax.swing", + org.jdesktop.swingx.border;uses:="javax.swing.border,javax.swing", + org.jdesktop.swingx.calendar;uses:="org.jdesktop.swingx.plaf,org.jdesktop.swingx,javax.swing", + org.jdesktop.swingx.calendar.resources, + org.jdesktop.swingx.color; + uses:="org.jdesktop.swingx.multislider, + org.apache.batik.ext.awt, + org.jdesktop.swingx, + javax.swing.colorchooser, + javax.swing.event, + javax.swing", + org.jdesktop.swingx.combobox;uses:="javax.swing.event,javax.swing", + org.jdesktop.swingx.decorator; + uses:="org.jdesktop.swingx.event, + javax.swing.event, + org.jdesktop.swingx.painter, + javax.swing", + org.jdesktop.swingx.editors; + uses:="org.jdesktop.swingx.decorator, + org.jdesktop.swingx, + javax.swing.event, + org.jdesktop.swingx.painter, + javax.swing", + org.jdesktop.swingx.error, + org.jdesktop.swingx.event;uses:="javax.swing.event", + org.jdesktop.swingx.geom, + org.jdesktop.swingx.graphics, + org.jdesktop.swingx.icon;uses:="javax.swing.plaf,javax.swing", + org.jdesktop.swingx.image;uses:="org.jdesktop.beans", + org.jdesktop.swingx.multislider;uses:="org.jdesktop.swingx,javax.swing", + org.jdesktop.swingx.multisplitpane;uses:="org.jdesktop.swingx", + org.jdesktop.swingx.painter; + uses:="org.jdesktop.swingx.editors, + org.jdesktop.swingx.painter.effects, + org.jdesktop.beans, + org.jdesktop.swingx, + javax.swing", + org.jdesktop.swingx.painter.effects;uses:="org.jdesktop.swingx.editors,org.jdesktop.swingx.painter,org.jdesktop.swingx", + org.jdesktop.swingx.plaf; + uses:="javax.swing.text, + org.jdesktop.swingx.painter, + javax.swing.plaf, + org.jdesktop.swingx, + javax.swing", + org.jdesktop.swingx.plaf.basic; + uses:="org.jdesktop.swingx.event, + javax.swing.plaf.basic, + javax.swing.text, + org.jdesktop.swingx.error, + javax.swing.border, + org.jdesktop.swingx, + javax.swing.event, + org.jdesktop.swingx.painter, + org.jdesktop.swingx.action, + javax.swing.text.html, + javax.swing.plaf, + org.jdesktop.swingx.calendar, + org.jdesktop.swingx.plaf, + javax.swing", + org.jdesktop.swingx.plaf.basic.resources, + org.jdesktop.swingx.plaf.linux;uses:="org.jdesktop.swingx.plaf.basic", + org.jdesktop.swingx.plaf.macosx; + uses:="org.jdesktop.swingx.plaf.basic, + org.jdesktop.swingx.painter, + org.jdesktop.swingx.action, + javax.swing.plaf, + org.jdesktop.swingx.plaf, + javax.swing", + org.jdesktop.swingx.plaf.metal; + uses:="org.jdesktop.swingx.plaf.basic, + javax.swing.border, + javax.swing.plaf, + org.jdesktop.swingx, + javax.swing", + org.jdesktop.swingx.plaf.misc; + uses:="org.jdesktop.swingx.plaf.basic, + javax.swing.border, + javax.swing.plaf, + org.jdesktop.swingx, + javax.swing", + org.jdesktop.swingx.plaf.motif;uses:="org.jdesktop.swingx.plaf.basic", + org.jdesktop.swingx.plaf.nimbus;uses:="org.jdesktop.swingx.plaf.basic", + org.jdesktop.swingx.plaf.resources, + org.jdesktop.swingx.plaf.windows; + uses:="org.jdesktop.swingx.plaf.basic, + javax.swing.border, + javax.swing.plaf, + org.jdesktop.swingx, + javax.swing", + org.jdesktop.swingx.plaf.windows.resources, + org.jdesktop.swingx.renderer; + uses:="javax.swing.tree, + javax.swing.table, + javax.swing.border, + org.jdesktop.swingx, + org.jdesktop.swingx.painter, + org.jdesktop.swingx.action, + javax.swing", + org.jdesktop.swingx.resources, + org.jdesktop.swingx.table; + uses:="javax.swing.tree, + javax.swing.table, + org.jdesktop.swingx, + javax.swing.event, + org.jdesktop.swingx.action, + javax.swing.plaf, + javax.swing", + org.jdesktop.swingx.table.resources, + org.jdesktop.swingx.tips, + org.jdesktop.swingx.tree;uses:="javax.swing.tree,javax.swing", + org.jdesktop.swingx.treetable;uses:="javax.swing.event,javax.swing.tree,javax.swing", + org.jdesktop.swingx.util;uses:="javax.swing.border,javax.swing", + org.jfree;uses:="org.jfree.ui.about", + org.jfree.base;uses:="org.jfree.util,org.jfree.base.modules,org.jfree.base.config", + org.jfree.base.config;uses:="org.jfree.util", + org.jfree.base.log;uses:="org.jfree.util,org.jfree.base.modules", + org.jfree.base.modules;uses:="org.jfree.util,org.jfree.base,org.jfree.base.config", + org.jfree.chart; + uses:="org.jfree.util, + org.jfree.chart.plot, + org.jfree.data.xy, + org.jfree.chart.annotations, + org.jfree.chart.renderer, + org.jfree.chart.renderer.xy, + org.jfree.chart.event, + org.jfree.data.category, + javax.swing, + org.jfree.ui.about, + org.jfree.chart.renderer.category, + org.jfree.data.general, + org.jfree.data.statistics, + org.jfree.chart.entity, + org.jfree.chart.block, + org.jfree.chart.imagemap, + org.jfree.chart.title, + org.jfree.chart.axis, + org.jfree.ui", + org.jfree.chart.annotations; + uses:="org.jfree.util, + org.jfree.chart.plot, + org.jfree.chart.util, + org.jfree.chart.title, + org.jfree.ui, + org.jfree.chart.axis", + org.jfree.chart.axis; + uses:="org.jfree.util, + org.jfree.data.time, + org.jfree.chart.plot, + org.jfree.text, + org.jfree.chart.event, + org.jfree.data.category, + org.jfree.data, + org.jfree.ui", + org.jfree.chart.block; + uses:="org.jfree.util, + org.jfree.chart.entity, + org.jfree.data, + org.jfree.ui", + org.jfree.chart.demo;uses:="javax.swing,org.jfree.ui", + org.jfree.chart.editor; + uses:="org.jfree.chart.plot, + org.jfree.chart, + org.jfree.chart.title, + javax.swing, + org.jfree.ui, + org.jfree.chart.axis", + org.jfree.chart.encoders, + org.jfree.chart.entity; + uses:="org.jfree.util, + org.jfree.chart.imagemap, + org.jfree.data.xy, + org.jfree.data.general, + org.jfree.data.category", + org.jfree.chart.event; + uses:="org.jfree.chart.plot, + org.jfree.chart, + org.jfree.chart.title, + org.jfree.chart.axis", + org.jfree.chart.imagemap;uses:="org.jfree.chart", + org.jfree.chart.labels; + uses:="org.jfree.util, + org.jfree.data.xy, + org.jfree.data.general, + org.jfree.data.category, + org.jfree.ui, + org.jfree.data.contour", + org.jfree.chart.needle, + org.jfree.chart.plot; + uses:="org.jfree.util, + org.jfree.chart.needle, + org.jfree.data.xy, + org.jfree.chart, + org.jfree.text, + org.jfree.data.contour, + org.jfree.chart.renderer, + org.jfree.chart.annotations, + org.jfree.chart.renderer.xy, + org.jfree.chart.urls, + org.jfree.chart.event, + org.jfree.chart.labels, + org.jfree.data.category, + javax.swing, + org.jfree.chart.renderer.category, + org.jfree.data.general, + org.jfree.chart.title, + org.jfree.ui, + org.jfree.chart.axis, + org.jfree.data", + org.jfree.chart.plot.dial; + uses:="org.jfree.util, + org.jfree.chart.plot, + org.jfree.data.general, + org.jfree.chart.event, + org.jfree.ui", + org.jfree.chart.renderer; + uses:="org.jfree.util, + org.jfree.chart.plot, + org.jfree.data.xy, + org.jfree.chart, + org.jfree.chart.entity, + org.jfree.chart.event, + org.jfree.chart.labels, + org.jfree.chart.axis", + org.jfree.chart.renderer.category; + uses:="org.jfree.util, + org.jfree.chart.plot, + org.jfree.chart, + org.jfree.data.statistics, + org.jfree.chart.renderer, + org.jfree.chart.entity, + org.jfree.chart.urls, + org.jfree.chart.event, + org.jfree.data.gantt, + org.jfree.chart.labels, + org.jfree.data.category, + javax.swing, + org.jfree.data, + org.jfree.chart.axis, + org.jfree.ui", + org.jfree.chart.renderer.xy; + uses:="org.jfree.util, + org.jfree.chart.plot, + org.jfree.data.general, + org.jfree.data.xy, + org.jfree.chart, + org.jfree.chart.renderer, + org.jfree.chart.annotations, + org.jfree.chart.entity, + org.jfree.chart.urls, + org.jfree.chart.event, + org.jfree.chart.labels, + org.jfree.ui, + org.jfree.data, + org.jfree.chart.axis", + org.jfree.chart.resources, + org.jfree.chart.servlet;uses:="javax.servlet.http,org.jfree.chart", + org.jfree.chart.title; + uses:="org.jfree.util, + org.jfree.data.general, + org.jfree.chart, + org.jfree.chart.renderer, + org.jfree.chart.block, + org.jfree.chart.event, + org.jfree.data, + org.jfree.ui, + org.jfree.chart.axis", + org.jfree.chart.urls; + uses:="org.jfree.util, + org.jfree.data.xy, + org.jfree.data.general, + org.jfree.data.category", + org.jfree.chart.util, + org.jfree.data;uses:="org.jfree.util,org.jfree.data.general", + org.jfree.data.category;uses:="org.jfree.util,org.jfree.data.general,org.jfree.data", + org.jfree.data.contour;uses:="org.jfree.data.xy,org.jfree.data", + org.jfree.data.function, + org.jfree.data.gantt; + uses:="org.jfree.util, + org.jfree.data.time, + org.jfree.data.xy, + org.jfree.data.general, + org.jfree.data.category", + org.jfree.data.general; + uses:="org.jfree.util, + org.jfree.data.xy, + org.jfree.data.function, + org.jfree.data.category, + org.jfree.data", + org.jfree.data.io;uses:="org.jfree.data.category", + org.jfree.data.jdbc; + uses:="org.jfree.data.xy, + org.jfree.data.general, + org.jfree.data.category, + org.jfree.data", + org.jfree.data.resources, + org.jfree.data.statistics; + uses:="org.jfree.util, + org.jfree.data.general, + org.jfree.data.xy, + org.jfree.data.category, + org.jfree.data", + org.jfree.data.time; + uses:="org.jfree.util, + javax.swing.table, + org.jfree.data.general, + org.jfree.data.xy, + org.jfree.date, + org.jfree.data", + org.jfree.data.time.ohlc;uses:="org.jfree.data.time,org.jfree.data.xy,org.jfree.data", + org.jfree.data.xml; + uses:="org.xml.sax, + org.jfree.data.general, + org.xml.sax.helpers, + org.jfree.data.category", + org.jfree.data.xy; + uses:="org.jfree.util, + javax.swing.table, + org.jfree.data.general, + org.jfree.data", + org.jfree.date, + org.jfree.io, + org.jfree.layout, + org.jfree.resources, + org.jfree.text;uses:="org.jfree.util,org.jfree.ui", + org.jfree.threads, + org.jfree.ui; + uses:="org.jfree.util, + javax.swing.text, + javax.swing.table, + javax.swing.filechooser, + javax.swing.event, + org.jfree.date, + javax.swing", + org.jfree.ui.about; + uses:="javax.swing.table, + javax.swing.border, + org.jfree.base, + org.jfree.ui, + javax.swing", + org.jfree.ui.about.resources, + org.jfree.ui.action;uses:="javax.swing", + org.jfree.ui.tabbedui;uses:="javax.swing", + org.jfree.util;uses:="org.jfree.base.config,org.jfree.ui,javax.swing", + org.postgresql, + org.postgresql.copy, + org.postgresql.core, + org.postgresql.core.types, + org.postgresql.core.v2, + org.postgresql.core.v3, + org.postgresql.ds, + org.postgresql.ds.common, + org.postgresql.ds.jdbc23, + org.postgresql.ds.jdbc4, + org.postgresql.fastpath, + org.postgresql.geometric, + org.postgresql.gss, + org.postgresql.jdbc2, + org.postgresql.jdbc2.optional, + org.postgresql.jdbc3, + org.postgresql.jdbc3g, + org.postgresql.jdbc4, + org.postgresql.largeobject, + org.postgresql.ssl, + org.postgresql.translation, + org.postgresql.util, + org.postgresql.xa, + org.python.compiler;uses:="org.python.parser,org.python.core,org.python.parser.ast", + org.python.core; + uses:="org.python.core.adapter, + org.python.parser.ast, + org.python.parser, + new org.python.core", + org.python.core.adapter;uses:="org.python.core", + org.python.modules;uses:="org.python.core,org.python.modules.sre", + org.python.modules.sets;uses:="org.python.core", + org.python.modules.sre;uses:="org.python.core", + org.python.modules.time;uses:="org.python.core", + org.python.parser;uses:="org.python.parser.ast", + org.python.parser.ast;uses:="org.python.parser", + org.python.rmi, + org.python.util; + uses:="javax.servlet.http, + javax.servlet, + org.apache.tools.ant.taskdefs, + org.apache.tools.ant.types, + org.python.core, + jline" diff --git a/tools/build.properties b/tools/build.properties new file mode 100644 index 0000000000..78fdf06548 --- /dev/null +++ b/tools/build.properties @@ -0,0 +1,53 @@ +source.tools.jar = src/ +bin.includes = META-INF/,\ + lib/jstl.jar,\ + lib/Verisign.jar,\ + lib/standard.jar,\ + lib/barbecue-1.5-beta1.jar,\ + lib/poi-3.0.1-FINAL-20070705.jar,\ + lib/jnlp.jar,\ + lib/iText-2.1.7.jar,\ + lib/swingx-0.9.0.jar,\ + lib/miglayout-3.7.1-swing.jar,\ + lib/log4j.jar,\ + lib/activation.jar,\ + lib/mail.jar,\ + lib/jpayment.jar,\ + lib/bsh-2.0b5.jar,\ + lib/script-api.jar,\ + lib/bsh-engine.jar,\ + lib/groovy-all-1.5.1.jar,\ + lib/groovy-engine.jar,\ + lib/jython.jar,\ + lib/jython-engine.jar,\ + lib/jcommon-1.0.14.jar,\ + lib/jfreechart-1.0.11.jar,\ + lib/javaee.jar,\ + tools.jar,\ + lib/activemq-core-5.0.0.jar,\ + lib/ant-commons-net.jar,\ + lib/ant-contrib-1.0b1.jar,\ + lib/ant-launcher.jar,\ + lib/ant.jar,\ + lib/c3p0-0.9.1.2.jar,\ + lib/c3p0-oracle-thin-extras-0.9.1.2.jar,\ + lib/cglib.jar,\ + lib/commons-codec.jar,\ + lib/commons-collections-3.1.jar,\ + lib/commons-logging.jar,\ + lib/commons-net-1.4.0.jar,\ + lib/copyLibraries.bat,\ + lib/jgraph.jar,\ + lib/jpedal.jar,\ + lib/jsp-api.jar,\ + lib/junit.jar,\ + lib/logkit.jar,\ + lib/looks-2.0.4.jar,\ + lib/ocrs12.jar,\ + lib/ojdbc14.jar,\ + lib/postgresql.jar,\ + lib/servlet-api.jar,\ + lib/wizard.jar,\ + lib/xercesImpl.jar,\ + lib/xjavadoc-1.1.jar,\ + lib/xml-apis.jar From a12ca7ee8e463a541ae928953eab65b6d81a8248 Mon Sep 17 00:00:00 2001 From: joergviola Date: Fri, 29 Jan 2010 11:14:01 +0000 Subject: [PATCH 02/46] Equinox Target-plattform --- equinox-target/.project | 11 +++++++++++ equinox-target/README.txt | 5 +++++ equinox-target/configuration/config.ini | 3 +++ equinox-target/equinox.target | 8 ++++++++ 4 files changed, 27 insertions(+) create mode 100644 equinox-target/.project create mode 100644 equinox-target/README.txt create mode 100644 equinox-target/configuration/config.ini create mode 100644 equinox-target/equinox.target diff --git a/equinox-target/.project b/equinox-target/.project new file mode 100644 index 0000000000..08165072a3 --- /dev/null +++ b/equinox-target/.project @@ -0,0 +1,11 @@ + + + equinox-target + + + + + + + + diff --git a/equinox-target/README.txt b/equinox-target/README.txt new file mode 100644 index 0000000000..4042b4fb3a --- /dev/null +++ b/equinox-target/README.txt @@ -0,0 +1,5 @@ +Currently this is a template. +Copy this folder to somewhere and use it there. + +Reason: This is the runtime environment. +Lots of files are created in various places, which are not supposed to be committed to svn. \ No newline at end of file diff --git a/equinox-target/configuration/config.ini b/equinox-target/configuration/config.ini new file mode 100644 index 0000000000..fde97e0abd --- /dev/null +++ b/equinox-target/configuration/config.ini @@ -0,0 +1,3 @@ +org.osgi.framework.bootdelegation=* +osgi.bundles=org.eclipse.equinox.common@2:start, org.eclipse.update.configurator@3:start, org.eclipse.core.runtime@4:start, org.adempiere.client@5:start + diff --git a/equinox-target/equinox.target b/equinox-target/equinox.target new file mode 100644 index 0000000000..af77c8ffae --- /dev/null +++ b/equinox-target/equinox.target @@ -0,0 +1,8 @@ + + + + + + + + From e2829e31fdece6e2cda2bf66b8f27c3ee5d97efe Mon Sep 17 00:00:00 2001 From: joergviola Date: Sat, 30 Jan 2010 13:24:45 +0000 Subject: [PATCH 03/46] Ups - problem with the looks library solved. https://sourceforge.net/tracker/?func=detail&aid=2700937&group_id=176962&atid=879334 --- base/META-INF/MANIFEST.MF | 7 +- tools/.classpath | 1 + tools/META-INF/MANIFEST.MF | 332 +++++++++++++++++++++++++++---------- 3 files changed, 250 insertions(+), 90 deletions(-) diff --git a/base/META-INF/MANIFEST.MF b/base/META-INF/MANIFEST.MF index 5934d99793..1f3a8841a3 100644 --- a/base/META-INF/MANIFEST.MF +++ b/base/META-INF/MANIFEST.MF @@ -23,12 +23,7 @@ Bundle-ClassPath: base.jar, lib/looks-2.0.4.jar, lib/commons-collections-3.1.jar, lib/activemq-core-5.0.0.jar -Export-Package: com.jgoodies.looks, - com.jgoodies.looks.common, - com.jgoodies.looks.plastic, - com.jgoodies.looks.plastic.theme, - com.jgoodies.looks.windows, - org.adempiere.apps.graph, +Export-Package: org.adempiere.apps.graph, org.adempiere.as, org.adempiere.base, org.adempiere.exceptions, diff --git a/tools/.classpath b/tools/.classpath index d1215fb9a1..e16067af75 100644 --- a/tools/.classpath +++ b/tools/.classpath @@ -29,5 +29,6 @@ + diff --git a/tools/META-INF/MANIFEST.MF b/tools/META-INF/MANIFEST.MF index 4443061b7d..704dcf4692 100644 --- a/tools/META-INF/MANIFEST.MF +++ b/tools/META-INF/MANIFEST.MF @@ -80,6 +80,35 @@ Export-Package: Lib, javax.swing", bsh.util.lib, com.Verisign.payment;uses:="javax.security.cert,javax.net.ssl", + com.jgoodies.looks;uses:="javax.swing.plaf,javax.swing", + com.jgoodies.looks.common; + uses:="javax.swing.plaf.basic, + javax.swing.text, + javax.swing.border, + javax.swing.plaf, + javax.swing", + com.jgoodies.looks.plastic; + uses:="com.jgoodies.looks, + javax.swing.plaf.basic, + javax.swing.text, + com.jgoodies.looks.common, + javax.swing.border, + javax.swing.plaf.metal, + javax.swing.event, + javax.swing.plaf, + javax.swing", + com.jgoodies.looks.plastic.theme;uses:="com.jgoodies.looks.plastic,javax.swing.plaf,javax.swing", + com.jgoodies.looks.windows; + uses:="com.jgoodies.looks, + javax.swing.plaf.basic, + com.jgoodies.looks.common, + javax.swing.text, + javax.swing.border, + javax.swing.plaf.metal, + com.sun.java.swing.plaf.windows, + javax.swing.event, + javax.swing.plaf, + javax.swing", com.keypoint, com.lowagie.text;uses:="com.lowagie.text.pdf.draw,com.lowagie.text.pdf", com.lowagie.text.exceptions, @@ -126,50 +155,102 @@ Export-Package: Lib, com.lowagie.text.xml.simpleparser;uses:="com.lowagie.text", com.lowagie.text.xml.xmp;uses:="org.w3c.dom,com.lowagie.text.pdf", com.lowagie.tools, - com.mchange, - com.mchange.lang, - com.mchange.util, - com.mchange.v1, - com.mchange.v1.db, - com.mchange.v1.db.sql, - com.mchange.v1.identicator, - com.mchange.v1.io, - com.mchange.v1.lang, - com.mchange.v1.util, - com.mchange.v1.xml, - com.mchange.v2, - com.mchange.v2.async, - com.mchange.v2.beans, - com.mchange.v2.c3p0, - com.mchange.v2.c3p0.cfg, - com.mchange.v2.c3p0.filter, - com.mchange.v2.c3p0.impl, - com.mchange.v2.c3p0.jboss, - com.mchange.v2.c3p0.management, - com.mchange.v2.c3p0.mbean, - com.mchange.v2.c3p0.stmt, - com.mchange.v2.c3p0.subst, - com.mchange.v2.c3p0.util, - com.mchange.v2.cfg, - com.mchange.v2.coalesce, - com.mchange.v2.codegen, - com.mchange.v2.codegen.bean, - com.mchange.v2.codegen.intfc, + com.mchange;uses:="com.mchange.v2.debug", + com.mchange.lang;uses:="com.mchange.v2.debug", + com.mchange.util;uses:="com.mchange.v2.debug", + com.mchange.v1;uses:="com.mchange.v2.debug", + com.mchange.v1.db;uses:="com.mchange.v2.debug", + com.mchange.v1.db.sql;uses:="com.mchange.v2.debug", + com.mchange.v1.identicator;uses:="com.mchange.v2.debug,new com.mchange.v1.identicator,com.mchange.v1.util", + com.mchange.v1.io;uses:="com.mchange.v2.debug", + com.mchange.v1.lang;uses:="com.mchange.v2.debug", + com.mchange.v1.util;uses:="com.mchange.v2.debug", + com.mchange.v1.xml;uses:="com.mchange.v2.debug,org.w3c.dom", + com.mchange.v2;uses:="com.mchange.v2.debug", + com.mchange.v2.async;uses:="com.mchange.v2.debug,com.mchange.v2.log,com.mchange.v1.util", + com.mchange.v2.beans;uses:="com.mchange.v2.debug,com.mchange.v2.log", + com.mchange.v2.c3p0; + uses:="com.mchange.v2.naming, + javax.sql, + com.mchange.v2.c3p0.impl, + com.mchange.v2.debug, + javax.naming, + com.mchange.v2.log", + com.mchange.v2.c3p0.cfg;uses:="com.mchange.v2.debug,com.mchange.v2.log,org.w3c.dom", + com.mchange.v2.c3p0.filter;uses:="com.mchange.v2.debug,javax.sql", + com.mchange.v2.c3p0.impl; + uses:="com.mchange.v2.sql.filter, + com.mchange.v2.c3p0, + com.mchange.v2.coalesce, + com.mchange.v2.naming, + new com.mchange.v2.c3p0.impl, + javax.sql, + com.mchange.v2.debug, + com.mchange.v2.resourcepool, + javax.naming, + com.mchange.v2.c3p0.stmt, + com.mchange.v2.c3p0.util, + com.mchange.v2.async, + com.mchange.v2.log, + com.mchange.v1.util", + com.mchange.v2.c3p0.jboss;uses:="com.mchange.v2.debug,com.mchange.v2.c3p0", + com.mchange.v2.c3p0.management; + uses:="com.mchange.v2.debug, + com.mchange.v2.c3p0, + javax.management, + com.mchange.v2.log, + javax.sql", + com.mchange.v2.c3p0.mbean;uses:="com.mchange.v2.debug,com.mchange.v2.c3p0", + com.mchange.v2.c3p0.stmt; + uses:="com.mchange.v2.debug, + com.mchange.v2.coalesce, + com.mchange.v2.async, + com.mchange.v2.log, + com.mchange.v1.util, + javax.sql", + com.mchange.v2.c3p0.subst;uses:="com.mchange.v2.debug", + com.mchange.v2.c3p0.util; + uses:="com.mchange.v2.c3p0, + com.mchange.v2.debug, + com.mchange.v2.sql.filter, + javax.sql", + com.mchange.v2.cfg;uses:="com.mchange.v2.debug,com.mchange.v2.log", + com.mchange.v2.coalesce;uses:="com.mchange.v2.debug,com.mchange.v1.identicator", + com.mchange.v2.codegen;uses:="com.mchange.v2.debug,com.mchange.v2.io", + com.mchange.v2.codegen.bean; + uses:="com.mchange.v2.debug, + com.mchange.v2.codegen, + com.mchange.v2.ser, + com.mchange.v2.log, + org.w3c.dom", + com.mchange.v2.codegen.intfc;uses:="com.mchange.v2.debug,com.mchange.v2.codegen", com.mchange.v2.debug, - com.mchange.v2.encounter, - com.mchange.v2.holders, - com.mchange.v2.io, - com.mchange.v2.lang, - com.mchange.v2.log, - com.mchange.v2.log.jdk14logging, - com.mchange.v2.log.log4j, - com.mchange.v2.management, - com.mchange.v2.naming, - com.mchange.v2.resourcepool, - com.mchange.v2.ser, - com.mchange.v2.sql, - com.mchange.v2.sql.filter, - com.mchange.v2.util, + com.mchange.v2.encounter;uses:="com.mchange.v2.debug", + com.mchange.v2.holders;uses:="com.mchange.v2.debug", + com.mchange.v2.io;uses:="com.mchange.v2.debug", + com.mchange.v2.lang;uses:="com.mchange.v2.debug", + com.mchange.v2.log;uses:="com.mchange.v2.debug,com.mchange.v2.cfg", + com.mchange.v2.log.jdk14logging;uses:="com.mchange.v2.debug,com.mchange.v2.log", + com.mchange.v2.log.log4j;uses:="com.mchange.v2.debug,com.mchange.v2.log", + com.mchange.v2.management;uses:="com.mchange.v2.debug", + com.mchange.v2.naming; + uses:="com.mchange.v2.debug, + javax.naming, + com.mchange.v2.ser, + com.mchange.v2.log, + new com.mchange.v2.naming, + javax.naming.spi", + com.mchange.v2.resourcepool; + uses:="com.mchange.v2.debug, + com.mchange.v2.async, + com.mchange.v2.log, + new com.mchange.v2.resourcepool, + com.mchange.v1.util, + com.mchange.lang", + com.mchange.v2.ser;uses:="com.mchange.v2.debug,com.mchange.v2.log", + com.mchange.v2.sql;uses:="com.mchange.v2.debug,com.mchange.v2.log", + com.mchange.v2.sql.filter;uses:="com.mchange.v2.debug", + com.mchange.v2.util;uses:="com.mchange.v2.debug,com.mchange.v1.util", com.sfcommerce.jpaymentcomponent.beans;uses:="com.sfcommerce.jpaymentcomponent.ssl", com.sfcommerce.jpaymentcomponent.definitions, com.sfcommerce.jpaymentcomponent.exceptions, @@ -556,33 +637,94 @@ Export-Package: Lib, net.sourceforge.barbecue.twod.pdf417;uses:="net.sourceforge.barbecue,net.sourceforge.barbecue.output,net.sourceforge.barbecue.linear", oracle.core.lmx, oracle.core.lvf, - oracle.jdbc, - oracle.jdbc.aq, - oracle.jdbc.connector, - oracle.jdbc.dcn, - oracle.jdbc.driver, - oracle.jdbc.internal, - oracle.jdbc.oci, - oracle.jdbc.oracore, - oracle.jdbc.pool, - oracle.jdbc.rowset, + oracle.jdbc; + uses:="oracle.jdbc.internal, + oracle.jdbc.dcn, + oracle.jdbc.aq, + oracle.jdbc.driver, + oracle.sql, + oracle.jdbc.pool", + oracle.jdbc.aq;uses:="oracle.jdbc,oracle.sql", + oracle.jdbc.connector; + uses:="javax.resource.spi.endpoint, + javax.resource.spi, + javax.resource.spi.security, + javax.transaction.xa, + javax.security.auth, + javax.sql", + oracle.jdbc.dcn;uses:="oracle.jdbc,oracle.sql", + oracle.jdbc.driver; + uses:="oracle.jdbc.internal, + oracle.net.ns, + oracle.jdbc.dcn, + oracle.jdbc.xa, + oracle.jdbc.pool, + oracle.jdbc.oracore, + javax.management, + oracle.jdbc.aq, + javax.transaction.xa, + oracle.jdbc, + oracle.sql, + oracle.jdbc.xa.client", + oracle.jdbc.internal; + uses:="oracle.jdbc, + oracle.jdbc.oracore, + oracle.sql, + javax.transaction.xa, + oracle.jdbc.pool", + oracle.jdbc.oci;uses:="oracle.jdbc.driver", + oracle.jdbc.oracore;uses:="oracle.jdbc.internal,oracle.sql", + oracle.jdbc.pool; + uses:="oracle.jdbc.internal, + javax.transaction.xa, + oracle.jdbc.oci, + javax.naming.spi, + javax.sql, + oracle.jdbc, + javax.naming, + oracle.jdbc.driver, + oracle.ons", + oracle.jdbc.rowset; + uses:="javax.sql.rowset, + oracle.jdbc.internal, + org.xml.sax, + org.w3c.dom, + javax.sql, + oracle.jdbc, + oracle.jdbc.driver, + org.xml.sax.helpers, + javax.sql.rowset.spi", oracle.jdbc.util, - oracle.jdbc.xa, - oracle.jdbc.xa.client, - oracle.jpub.runtime, - oracle.net.TNSAddress, - oracle.net.ano, + oracle.jdbc.xa;uses:="javax.transaction.xa,oracle.jdbc.pool,javax.sql", + oracle.jdbc.xa.client; + uses:="oracle.jdbc.internal, + oracle.jdbc.driver, + javax.transaction.xa, + oracle.jdbc.xa, + javax.sql", + oracle.jpub.runtime; + uses:="oracle.jdbc, + oracle.jdbc.internal, + oracle.jdbc.driver, + oracle.sql", + oracle.net.TNSAddress;uses:="oracle.net.nl", + oracle.net.ano;uses:="oracle.net.ns,oracle.net.aso", oracle.net.aso, - oracle.net.jndi, + oracle.net.jndi;uses:="javax.naming.directory,javax.net,javax.net.ssl", oracle.net.nl, oracle.net.nl.mesg, - oracle.net.ns, - oracle.net.nt, - oracle.net.resolver, + oracle.net.ns;uses:="oracle.net.ano,oracle.net.nt", + oracle.net.nt;uses:="javax.net.ssl", + oracle.net.resolver;uses:="oracle.net.TNSAddress,oracle.net.nt", oracle.security.o3logon, oracle.security.o5logon, - oracle.sql, - oracle.sql.converter, + oracle.sql; + uses:="oracle.jdbc, + oracle.jdbc.internal, + oracle.jdbc.oracore, + oracle.jdbc.driver, + oracle.sql.converter", + oracle.sql.converter;uses:="oracle.jdbc.internal,oracle.i18n.text,oracle.i18n.text.converter", org.apache.ecs;uses:="org.apache.ecs.xhtml", org.apache.ecs.filter;uses:="org.apache.ecs", org.apache.ecs.storage, @@ -1247,29 +1389,51 @@ Export-Package: Lib, org.jfree.ui.action;uses:="javax.swing", org.jfree.ui.tabbedui;uses:="javax.swing", org.jfree.util;uses:="org.jfree.base.config,org.jfree.ui,javax.swing", - org.postgresql, - org.postgresql.copy, - org.postgresql.core, + org.postgresql;uses:="org.postgresql.largeobject,org.postgresql.fastpath,org.postgresql.copy", + org.postgresql.copy;uses:="org.postgresql.core,org.postgresql", + org.postgresql.core;uses:="org.postgresql.jdbc2,org.postgresql.copy,org.postgresql", org.postgresql.core.types, - org.postgresql.core.v2, - org.postgresql.core.v3, - org.postgresql.ds, - org.postgresql.ds.common, - org.postgresql.ds.jdbc23, - org.postgresql.ds.jdbc4, - org.postgresql.fastpath, - org.postgresql.geometric, - org.postgresql.gss, - org.postgresql.jdbc2, - org.postgresql.jdbc2.optional, - org.postgresql.jdbc3, - org.postgresql.jdbc3g, - org.postgresql.jdbc4, - org.postgresql.largeobject, - org.postgresql.ssl, + org.postgresql.core.v2;uses:="org.postgresql.copy,org.postgresql.core,org.postgresql", + org.postgresql.core.v3;uses:="org.postgresql.copy,org.postgresql.core,org.postgresql", + org.postgresql.ds;uses:="org.postgresql.ds.jdbc4,org.postgresql.ds.common,javax.sql", + org.postgresql.ds.common;uses:="javax.naming,javax.naming.spi", + org.postgresql.ds.jdbc23; + uses:="javax.naming, + org.postgresql.ds.common, + org.postgresql.ds, + javax.sql", + org.postgresql.ds.jdbc4;uses:="org.postgresql.ds.jdbc23,javax.sql", + org.postgresql.fastpath;uses:="org.postgresql.core", + org.postgresql.geometric;uses:="org.postgresql.util", + org.postgresql.gss;uses:="org.postgresql.core,javax.security.auth.callback", + org.postgresql.jdbc2; + uses:="org.postgresql.fastpath, + org.postgresql.util, + org.postgresql.copy, + org.postgresql, + org.postgresql.largeobject, + org.postgresql.core", + org.postgresql.jdbc2.optional;uses:="org.postgresql.ds", + org.postgresql.jdbc3;uses:="org.postgresql.jdbc2,org.postgresql.core", + org.postgresql.jdbc3g;uses:="org.postgresql.jdbc3,org.postgresql.core", + org.postgresql.jdbc4; + uses:="org.postgresql.jdbc3, + org.xml.sax, + org.postgresql.jdbc3g, + org.postgresql.jdbc2, + org.postgresql.core, + javax.xml.transform", + org.postgresql.largeobject;uses:="org.postgresql.fastpath,org.postgresql.core", + org.postgresql.ssl;uses:="org.postgresql.core,javax.net.ssl", org.postgresql.translation, org.postgresql.util, - org.postgresql.xa, + org.postgresql.xa; + uses:="javax.naming, + org.postgresql.ds.common, + org.postgresql.ds, + org.postgresql.core, + javax.transaction.xa, + javax.sql", org.python.compiler;uses:="org.python.parser,org.python.core,org.python.parser.ast", org.python.core; uses:="org.python.core.adapter, From 73d866faadff1b9e0f5d5c4b40636243a7645892 Mon Sep 17 00:00:00 2001 From: joergviola Date: Sat, 30 Jan 2010 13:27:10 +0000 Subject: [PATCH 04/46] Webstart wrapper feature. https://sourceforge.net/tracker/?func=detail&aid=2700937&group_id=176962&atid=879334 --- webstart/.project | 17 ++++ webstart/build.properties | 1 + webstart/compile.org.adempiere.webstart.xml | 8 ++ webstart/feature.xml | 98 +++++++++++++++++++++ 4 files changed, 124 insertions(+) create mode 100644 webstart/.project create mode 100644 webstart/build.properties create mode 100644 webstart/compile.org.adempiere.webstart.xml create mode 100644 webstart/feature.xml diff --git a/webstart/.project b/webstart/.project new file mode 100644 index 0000000000..761dc7d2e3 --- /dev/null +++ b/webstart/.project @@ -0,0 +1,17 @@ + + + webstart + + + + + + org.eclipse.pde.FeatureBuilder + + + + + + org.eclipse.pde.FeatureNature + + diff --git a/webstart/build.properties b/webstart/build.properties new file mode 100644 index 0000000000..64f93a9f0b --- /dev/null +++ b/webstart/build.properties @@ -0,0 +1 @@ +bin.includes = feature.xml diff --git a/webstart/compile.org.adempiere.webstart.xml b/webstart/compile.org.adempiere.webstart.xml new file mode 100644 index 0000000000..a26dbda67a --- /dev/null +++ b/webstart/compile.org.adempiere.webstart.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/webstart/feature.xml b/webstart/feature.xml new file mode 100644 index 0000000000..c08674e4e4 --- /dev/null +++ b/webstart/feature.xml @@ -0,0 +1,98 @@ + + + + + [Enter Feature Description here.] + + + + [Enter Copyright Description here.] + + + + [Enter License Description here.] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 32a4ea21679c1434860f7f0f1b9be00972999c0d Mon Sep 17 00:00:00 2001 From: joergviola Date: Sat, 30 Jan 2010 13:44:25 +0000 Subject: [PATCH 05/46] Webstart ingredients in the target https://sourceforge.net/tracker/?func=detail&aid=2700937&group_id=176962&atid=879334 --- equinox-target/adempiere-equinox.jnlp | 57 +++++++++++++++++++++++++++ equinox-target/equinox.target | 2 +- 2 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 equinox-target/adempiere-equinox.jnlp diff --git a/equinox-target/adempiere-equinox.jnlp b/equinox-target/adempiere-equinox.jnlp new file mode 100644 index 0000000000..26177160ce --- /dev/null +++ b/equinox-target/adempiere-equinox.jnlp @@ -0,0 +1,57 @@ + + + + Adempiere Client 3.5.4a + ADempiere, Inc. + + + Adempiere ERP+CRM ($$context) - Smart Business Solution for Distribution and Service - globally + Adempiere ERP+CRM ($$context) + Adempiere ERP+CRM + Adempiere ERP+CRM ($$context) + + + + + + + + + + + -consoleLog + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/equinox-target/equinox.target b/equinox-target/equinox.target index af77c8ffae..b89f86c920 100644 --- a/equinox-target/equinox.target +++ b/equinox-target/equinox.target @@ -3,6 +3,6 @@ - + From c7e6ddefa1dbfea927a2c7c0e4d0589e0315442a Mon Sep 17 00:00:00 2001 From: joergviola Date: Fri, 5 Mar 2010 18:35:15 +0000 Subject: [PATCH 06/46] Equinox Bridge Setup https://sourceforge.net/tracker/?func=detail&aid=2700937&group_id=176962&atid=879334 --- equinox-bridge/.classpath | 12 +++ equinox-bridge/.project | 36 +++++++++ equinox-bridge/.settings/.jsdtscope | 11 +++ .../.settings/org.eclipse.jdt.core.prefs | 7 ++ .../org.eclipse.wst.common.component | 9 +++ ....eclipse.wst.common.project.facet.core.xml | 7 ++ ...rg.eclipse.wst.jsdt.ui.superType.container | 1 + .../org.eclipse.wst.jsdt.ui.superType.name | 1 + .../WebContent/META-INF/MANIFEST.MF | 3 + .../WEB-INF/eclipse/.eclipseproduct | 0 .../WEB-INF/eclipse/configuration/config.ini | 3 + .../feature.xml | 76 +++++++++++++++++++ .../WebContent/WEB-INF/eclipse/launch.ini | 11 +++ equinox-bridge/WebContent/WEB-INF/web.xml | 49 ++++++++++++ equinox-bridge/WebContent/index.html | 1 + 15 files changed, 227 insertions(+) create mode 100644 equinox-bridge/.classpath create mode 100644 equinox-bridge/.project create mode 100644 equinox-bridge/.settings/.jsdtscope create mode 100644 equinox-bridge/.settings/org.eclipse.jdt.core.prefs create mode 100644 equinox-bridge/.settings/org.eclipse.wst.common.component create mode 100644 equinox-bridge/.settings/org.eclipse.wst.common.project.facet.core.xml create mode 100644 equinox-bridge/.settings/org.eclipse.wst.jsdt.ui.superType.container create mode 100644 equinox-bridge/.settings/org.eclipse.wst.jsdt.ui.superType.name create mode 100644 equinox-bridge/WebContent/META-INF/MANIFEST.MF create mode 100644 equinox-bridge/WebContent/WEB-INF/eclipse/.eclipseproduct create mode 100644 equinox-bridge/WebContent/WEB-INF/eclipse/configuration/config.ini create mode 100644 equinox-bridge/WebContent/WEB-INF/eclipse/features/org.eclipse.equinox.servletbridge.feature_1.0.0/feature.xml create mode 100644 equinox-bridge/WebContent/WEB-INF/eclipse/launch.ini create mode 100644 equinox-bridge/WebContent/WEB-INF/web.xml create mode 100644 equinox-bridge/WebContent/index.html diff --git a/equinox-bridge/.classpath b/equinox-bridge/.classpath new file mode 100644 index 0000000000..fce8130690 --- /dev/null +++ b/equinox-bridge/.classpath @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/equinox-bridge/.project b/equinox-bridge/.project new file mode 100644 index 0000000000..2f78eca49c --- /dev/null +++ b/equinox-bridge/.project @@ -0,0 +1,36 @@ + + + equinox-bridge + + + + + + org.eclipse.wst.jsdt.core.javascriptValidator + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.wst.common.project.facet.core.builder + + + + + org.eclipse.wst.validation.validationbuilder + + + + + + org.eclipse.jem.workbench.JavaEMFNature + org.eclipse.wst.common.modulecore.ModuleCoreNature + org.eclipse.wst.common.project.facet.core.nature + org.eclipse.jdt.core.javanature + org.eclipse.wst.jsdt.core.jsNature + + diff --git a/equinox-bridge/.settings/.jsdtscope b/equinox-bridge/.settings/.jsdtscope new file mode 100644 index 0000000000..bbb8e68be8 --- /dev/null +++ b/equinox-bridge/.settings/.jsdtscope @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/equinox-bridge/.settings/org.eclipse.jdt.core.prefs b/equinox-bridge/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000000..8ccb8c7673 --- /dev/null +++ b/equinox-bridge/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,7 @@ +#Wed Feb 03 16:04:44 CET 2010 +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 +org.eclipse.jdt.core.compiler.compliance=1.5 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.5 diff --git a/equinox-bridge/.settings/org.eclipse.wst.common.component b/equinox-bridge/.settings/org.eclipse.wst.common.component new file mode 100644 index 0000000000..0d2e02512f --- /dev/null +++ b/equinox-bridge/.settings/org.eclipse.wst.common.component @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/equinox-bridge/.settings/org.eclipse.wst.common.project.facet.core.xml b/equinox-bridge/.settings/org.eclipse.wst.common.project.facet.core.xml new file mode 100644 index 0000000000..c477e06156 --- /dev/null +++ b/equinox-bridge/.settings/org.eclipse.wst.common.project.facet.core.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/equinox-bridge/.settings/org.eclipse.wst.jsdt.ui.superType.container b/equinox-bridge/.settings/org.eclipse.wst.jsdt.ui.superType.container new file mode 100644 index 0000000000..3bd5d0a480 --- /dev/null +++ b/equinox-bridge/.settings/org.eclipse.wst.jsdt.ui.superType.container @@ -0,0 +1 @@ +org.eclipse.wst.jsdt.launching.baseBrowserLibrary \ No newline at end of file diff --git a/equinox-bridge/.settings/org.eclipse.wst.jsdt.ui.superType.name b/equinox-bridge/.settings/org.eclipse.wst.jsdt.ui.superType.name new file mode 100644 index 0000000000..05bd71b6ec --- /dev/null +++ b/equinox-bridge/.settings/org.eclipse.wst.jsdt.ui.superType.name @@ -0,0 +1 @@ +Window \ No newline at end of file diff --git a/equinox-bridge/WebContent/META-INF/MANIFEST.MF b/equinox-bridge/WebContent/META-INF/MANIFEST.MF new file mode 100644 index 0000000000..5e9495128c --- /dev/null +++ b/equinox-bridge/WebContent/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Class-Path: + diff --git a/equinox-bridge/WebContent/WEB-INF/eclipse/.eclipseproduct b/equinox-bridge/WebContent/WEB-INF/eclipse/.eclipseproduct new file mode 100644 index 0000000000..e69de29bb2 diff --git a/equinox-bridge/WebContent/WEB-INF/eclipse/configuration/config.ini b/equinox-bridge/WebContent/WEB-INF/eclipse/configuration/config.ini new file mode 100644 index 0000000000..5a1ca3b458 --- /dev/null +++ b/equinox-bridge/WebContent/WEB-INF/eclipse/configuration/config.ini @@ -0,0 +1,3 @@ +#Eclipse Runtime Configuration File +osgi.bundles=org.eclipse.equinox.common@2:start, org.eclipse.update.configurator@start, org.eclipse.equinox.http.servletbridge@start, org.eclipse.equinox.http.registry@start, org.adempiere.zkwebui@start +osgi.bundles.defaultStartLevel=4 diff --git a/equinox-bridge/WebContent/WEB-INF/eclipse/features/org.eclipse.equinox.servletbridge.feature_1.0.0/feature.xml b/equinox-bridge/WebContent/WEB-INF/eclipse/features/org.eclipse.equinox.servletbridge.feature_1.0.0/feature.xml new file mode 100644 index 0000000000..a826af0699 --- /dev/null +++ b/equinox-bridge/WebContent/WEB-INF/eclipse/features/org.eclipse.equinox.servletbridge.feature_1.0.0/feature.xml @@ -0,0 +1,76 @@ + + + + + The Servletbridge feature is used to hold the default plugins and dependencies used to build the bridge WebARchive. + + + + 2006 Cognos Inc. + + + + ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT + + + + + + + + + + + + + + + + + + + diff --git a/equinox-bridge/WebContent/WEB-INF/eclipse/launch.ini b/equinox-bridge/WebContent/WEB-INF/eclipse/launch.ini new file mode 100644 index 0000000000..b850fe3c0f --- /dev/null +++ b/equinox-bridge/WebContent/WEB-INF/eclipse/launch.ini @@ -0,0 +1,11 @@ +# Eclipse Runtime Configuration Overrides +# These properties are loaded prior to starting the framework and can also be used to override System Properties +# @null is a special value used to override and clear the framework's copy of a System Property prior to starting the framework +# "*" can be used together with @null to clear System Properties that match a prefix name. + +osgi.*=@null +org.osgi.*=@null +eclipse.*=@null + +osgi.parentClassloader=ext +osgi.contextClassLoaderParent=ext diff --git a/equinox-bridge/WebContent/WEB-INF/web.xml b/equinox-bridge/WebContent/WEB-INF/web.xml new file mode 100644 index 0000000000..cc51ad9f99 --- /dev/null +++ b/equinox-bridge/WebContent/WEB-INF/web.xml @@ -0,0 +1,49 @@ + + + + + equinoxbridgeservlet + Equinox Bridge Servlet + Equinox Bridge Servlet + org.eclipse.equinox.servletbridge.BridgeServlet + + commandline + -console -clean + + + enableFrameworkControls + true + + + + extendedFrameworkExports + + + + + 1 + + + equinoxbridgeservlet + /* + + + + equinoxbridgeservlet + *.jsp + + diff --git a/equinox-bridge/WebContent/index.html b/equinox-bridge/WebContent/index.html new file mode 100644 index 0000000000..b6fc4c620b --- /dev/null +++ b/equinox-bridge/WebContent/index.html @@ -0,0 +1 @@ +hello \ No newline at end of file From 537796d39b299420d31a159e90b5ac545f21b8af Mon Sep 17 00:00:00 2001 From: joergviola Date: Fri, 5 Mar 2010 19:46:25 +0000 Subject: [PATCH 07/46] Ceonverted to Equinox Plugins: JasperReports, JasperReportsTools, tools https://sourceforge.net/tracker/?func=detail&aid=2700937&group_id=176962&atid=879334 --- JasperReports/.classpath | 31 +- JasperReports/.project | 59 +-- JasperReports/META-INF/MANIFEST.MF | 15 + JasperReports/build.properties | 7 + JasperReportsTools/.classpath | 1 + JasperReportsTools/.project | 45 ++- JasperReportsTools/META-INF/MANIFEST.MF | 199 ++++++++++ JasperReportsTools/build.properties | 6 + tools/META-INF/MANIFEST.MF | 25 +- tools/build.properties | 1 - tools/build.xml | 490 ------------------------ 11 files changed, 308 insertions(+), 571 deletions(-) create mode 100644 JasperReports/META-INF/MANIFEST.MF create mode 100644 JasperReports/build.properties create mode 100644 JasperReportsTools/META-INF/MANIFEST.MF create mode 100644 JasperReportsTools/build.properties delete mode 100644 tools/build.xml diff --git a/JasperReports/.classpath b/JasperReports/.classpath index e443184a47..64df02a4f1 100644 --- a/JasperReports/.classpath +++ b/JasperReports/.classpath @@ -1,15 +1,16 @@ - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + diff --git a/JasperReports/.project b/JasperReports/.project index 2295b1c3f3..8d2e1e88ed 100644 --- a/JasperReports/.project +++ b/JasperReports/.project @@ -1,24 +1,35 @@ - - - JasperReports - - - base - client - dbPort - lib - looks - print - utils - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - + + + JasperReports + + + base + client + dbPort + lib + looks + print + utils + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.pde.PluginNature + + diff --git a/JasperReports/META-INF/MANIFEST.MF b/JasperReports/META-INF/MANIFEST.MF new file mode 100644 index 0000000000..6ca8e39366 --- /dev/null +++ b/JasperReports/META-INF/MANIFEST.MF @@ -0,0 +1,15 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: JasperReports +Bundle-SymbolicName: JasperReports +Bundle-Version: 1.0.0.qualifier +Bundle-ClassPath: JasperReports.jar, + lib/postgresql.jar, + lib/ocrs12.jar, + lib/ojdbc14.jar, + lib/barbecue-1.5-beta1.jar +Export-Package: org.compiere.interfaces, + org.compiere.report, + org.compiere.utils +Require-Bundle: org.adempiere.base;bundle-version="0.0.0", + org.adempiere.JasperReportsTools;bundle-version="1.0.0" diff --git a/JasperReports/build.properties b/JasperReports/build.properties new file mode 100644 index 0000000000..4651ea48f1 --- /dev/null +++ b/JasperReports/build.properties @@ -0,0 +1,7 @@ +source.JasperReports.jar = src/ +bin.includes = META-INF/,\ + lib/postgresql.jar,\ + lib/ocrs12.jar,\ + lib/ojdbc14.jar,\ + lib/barbecue-1.5-beta1.jar,\ + JasperReports.jar diff --git a/JasperReportsTools/.classpath b/JasperReportsTools/.classpath index c272fc7fd0..7a5d3899a4 100644 --- a/JasperReportsTools/.classpath +++ b/JasperReportsTools/.classpath @@ -7,5 +7,6 @@ + diff --git a/JasperReportsTools/.project b/JasperReportsTools/.project index efb75418d8..c420329c89 100644 --- a/JasperReportsTools/.project +++ b/JasperReportsTools/.project @@ -1,17 +1,28 @@ - - - JasperReportsTools - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - + + + JasperReportsTools + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.pde.PluginNature + + diff --git a/JasperReportsTools/META-INF/MANIFEST.MF b/JasperReportsTools/META-INF/MANIFEST.MF new file mode 100644 index 0000000000..5132322ca4 --- /dev/null +++ b/JasperReportsTools/META-INF/MANIFEST.MF @@ -0,0 +1,199 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: JasperReportsTools +Bundle-SymbolicName: org.adempiere.JasperReportsTools +Bundle-Version: 1.0.0.qualifier +Bundle-ClassPath: lib/commons-beanutils-1.7.jar, + lib/commons-digester-1.7.jar, + lib/iReport.jar, + lib/jasperreports-3.5.3.jar, + lib/jfreechart-1.0.3.jar +Export-Package: ., + be.savat.components, + it.businesslogic.ireport, + it.businesslogic.ireport.barcode, + it.businesslogic.ireport.chart, + it.businesslogic.ireport.chart.gui, + it.businesslogic.ireport.compiler, + it.businesslogic.ireport.compiler.xml, + it.businesslogic.ireport.connection, + it.businesslogic.ireport.connection.gui, + it.businesslogic.ireport.crosstab, + it.businesslogic.ireport.crosstab.gui, + it.businesslogic.ireport.data, + it.businesslogic.ireport.data.ejbql, + it.businesslogic.ireport.data.hibernate, + it.businesslogic.ireport.data.olap, + it.businesslogic.ireport.data.xml, + it.businesslogic.ireport.dtds, + it.businesslogic.ireport.examples, + it.businesslogic.ireport.examples.beans, + it.businesslogic.ireport.examples.chart, + it.businesslogic.ireport.examples.queryexecuter, + it.businesslogic.ireport.export, + it.businesslogic.ireport.gui, + it.businesslogic.ireport.gui.actions, + it.businesslogic.ireport.gui.box, + it.businesslogic.ireport.gui.command, + it.businesslogic.ireport.gui.dnd, + it.businesslogic.ireport.gui.docking, + it.businesslogic.ireport.gui.documentstructure, + it.businesslogic.ireport.gui.event, + it.businesslogic.ireport.gui.expbuilder, + it.businesslogic.ireport.gui.export, + it.businesslogic.ireport.gui.fonts, + it.businesslogic.ireport.gui.library, + it.businesslogic.ireport.gui.library.objects, + it.businesslogic.ireport.gui.listview, + it.businesslogic.ireport.gui.locale, + it.businesslogic.ireport.gui.logpane, + it.businesslogic.ireport.gui.prompt, + it.businesslogic.ireport.gui.queryexecuters, + it.businesslogic.ireport.gui.sheet, + it.businesslogic.ireport.gui.style, + it.businesslogic.ireport.gui.subdataset, + it.businesslogic.ireport.gui.syntax, + it.businesslogic.ireport.gui.table, + it.businesslogic.ireport.gui.wizard, + it.businesslogic.ireport.icons, + it.businesslogic.ireport.icons.charts, + it.businesslogic.ireport.icons.crosstab, + it.businesslogic.ireport.icons.datasource, + it.businesslogic.ireport.icons.docking, + it.businesslogic.ireport.icons.layout, + it.businesslogic.ireport.icons.library, + it.businesslogic.ireport.icons.log, + it.businesslogic.ireport.icons.menu, + it.businesslogic.ireport.icons.newtoolbar, + it.businesslogic.ireport.icons.olap, + it.businesslogic.ireport.icons.palette, + it.businesslogic.ireport.icons.problems, + it.businesslogic.ireport.icons.sheet, + it.businesslogic.ireport.icons.styles, + it.businesslogic.ireport.icons.toolbars, + it.businesslogic.ireport.icons.toolbars.format, + it.businesslogic.ireport.icons.toolbars.text, + it.businesslogic.ireport.icons.tree, + it.businesslogic.ireport.icons.tree.editor, + it.businesslogic.ireport.icons.tree.elements, + it.businesslogic.ireport.icons.tree.javabean, + it.businesslogic.ireport.icons.xml, + it.businesslogic.ireport.locale, + it.businesslogic.ireport.plugin, + it.businesslogic.ireport.plugin.checkupdate, + it.businesslogic.ireport.plugin.examples, + it.businesslogic.ireport.plugin.jforg, + it.businesslogic.ireport.plugin.jrx, + it.businesslogic.ireport.plugin.locale, + it.businesslogic.ireport.plugin.massivecompiler, + it.businesslogic.ireport.plugin.oracle, + it.businesslogic.ireport.plugin.textwizard, + it.businesslogic.ireport.refactoring, + it.businesslogic.ireport.res, + it.businesslogic.ireport.rmi, + it.businesslogic.ireport.undo, + it.businesslogic.ireport.util, + net.sf.jasperreports.ant, + net.sf.jasperreports.charts, + net.sf.jasperreports.charts.base, + net.sf.jasperreports.charts.design, + net.sf.jasperreports.charts.fill, + net.sf.jasperreports.charts.util, + net.sf.jasperreports.charts.xml, + net.sf.jasperreports.compilers, + net.sf.jasperreports.components, + net.sf.jasperreports.components.barbecue, + net.sf.jasperreports.components.barcode4j, + net.sf.jasperreports.components.list, + net.sf.jasperreports.crosstabs, + net.sf.jasperreports.crosstabs.base, + net.sf.jasperreports.crosstabs.design, + net.sf.jasperreports.crosstabs.fill, + net.sf.jasperreports.crosstabs.fill.calculation, + net.sf.jasperreports.crosstabs.xml, + net.sf.jasperreports.engine, + net.sf.jasperreports.engine.base, + net.sf.jasperreports.engine.component, + net.sf.jasperreports.engine.convert, + net.sf.jasperreports.engine.data, + net.sf.jasperreports.engine.design, + net.sf.jasperreports.engine.design.events, + net.sf.jasperreports.engine.dtds, + net.sf.jasperreports.engine.export, + net.sf.jasperreports.engine.export.data, + net.sf.jasperreports.engine.export.draw, + net.sf.jasperreports.engine.export.legacy, + net.sf.jasperreports.engine.export.oasis, + net.sf.jasperreports.engine.export.ooxml, + net.sf.jasperreports.engine.export.xmlss, + net.sf.jasperreports.engine.export.zip, + net.sf.jasperreports.engine.fill, + net.sf.jasperreports.engine.fonts, + net.sf.jasperreports.engine.images, + net.sf.jasperreports.engine.print, + net.sf.jasperreports.engine.query, + net.sf.jasperreports.engine.scriptlets, + net.sf.jasperreports.engine.util, + net.sf.jasperreports.engine.util.xml, + net.sf.jasperreports.engine.xml, + net.sf.jasperreports.extensions, + net.sf.jasperreports.governors, + net.sf.jasperreports.j2ee.servlets, + net.sf.jasperreports.olap, + net.sf.jasperreports.olap.mapping, + net.sf.jasperreports.olap.mondrian, + net.sf.jasperreports.olap.result, + net.sf.jasperreports.olap.xmla, + net.sf.jasperreports.renderers, + net.sf.jasperreports.swing, + net.sf.jasperreports.view, + net.sf.jasperreports.view.images, + net.sf.jasperreports.view.save, + org.apache.commons.beanutils, + org.apache.commons.beanutils.converters, + org.apache.commons.beanutils.locale, + org.apache.commons.beanutils.locale.converters, + org.apache.commons.collections, + org.apache.commons.digester, + org.apache.commons.digester.parser, + org.apache.commons.digester.plugins, + org.apache.commons.digester.plugins.strategies, + org.apache.commons.digester.substitution, + org.apache.commons.digester.xmlrules, + org.jfree.chart, + org.jfree.chart.annotations, + org.jfree.chart.axis, + org.jfree.chart.block, + org.jfree.chart.demo, + org.jfree.chart.editor, + org.jfree.chart.encoders, + org.jfree.chart.entity, + org.jfree.chart.event, + org.jfree.chart.imagemap, + org.jfree.chart.labels, + org.jfree.chart.needle, + org.jfree.chart.plot, + org.jfree.chart.renderer, + org.jfree.chart.renderer.category, + org.jfree.chart.renderer.xy, + org.jfree.chart.resources, + org.jfree.chart.servlet, + org.jfree.chart.title, + org.jfree.chart.urls, + org.jfree.chart.util, + org.jfree.data, + org.jfree.data.category, + org.jfree.data.contour, + org.jfree.data.function, + org.jfree.data.gantt, + org.jfree.data.general, + org.jfree.data.io, + org.jfree.data.jdbc, + org.jfree.data.resources, + org.jfree.data.statistics, + org.jfree.data.time, + org.jfree.data.xml, + org.jfree.data.xy, + org.syntax.jedit, + org.syntax.jedit.tokenmarker, + org.w3c.tools.codec diff --git a/JasperReportsTools/build.properties b/JasperReportsTools/build.properties new file mode 100644 index 0000000000..628d6cfe13 --- /dev/null +++ b/JasperReportsTools/build.properties @@ -0,0 +1,6 @@ +bin.includes = META-INF/,\ + lib/commons-beanutils-1.7.jar,\ + lib/commons-digester-1.7.jar,\ + lib/iReport.jar,\ + lib/jasperreports-3.5.3.jar,\ + lib/jfreechart-1.0.3.jar diff --git a/tools/META-INF/MANIFEST.MF b/tools/META-INF/MANIFEST.MF index 704dcf4692..dc79ccc1b6 100644 --- a/tools/META-INF/MANIFEST.MF +++ b/tools/META-INF/MANIFEST.MF @@ -3,6 +3,7 @@ Bundle-ManifestVersion: 2 Bundle-Name: org.adempiere.tools Bundle-SymbolicName: org.adempiere.tools Bundle-Version: 0.0.0.1 +Eclipse-BuddyPolicy: dependent Bundle-ClassPath: tools.jar, lib/jstl.jar, lib/Verisign.jar, @@ -48,7 +49,6 @@ Bundle-ClassPath: tools.jar, lib/ocrs12.jar, lib/ojdbc14.jar, lib/postgresql.jar, - lib/servlet-api.jar, lib/wizard.jar, lib/xercesImpl.jar, lib/xjavadoc-1.1.jar, @@ -510,29 +510,6 @@ Export-Package: Lib, javax.resource.spi.work;uses:="javax.resource,javax.transaction.xa", javax.script, javax.security.jacc;uses:="javax.servlet.http", - javax.servlet, - javax.servlet.http;uses:="javax.servlet", - javax.servlet.jsp; - uses:="javax.servlet.http, - javax.servlet, - javax.servlet.jsp.tagext, - javax.servlet.jsp.el, - javax.el", - javax.servlet.jsp.el; - uses:="javax.servlet.http, - javax.servlet, - javax.servlet.jsp, - javax.el", - javax.servlet.jsp.jstl.core; - uses:="javax.servlet.http, - javax.servlet, - javax.servlet.jsp.tagext, - javax.servlet.jsp, - javax.el", - javax.servlet.jsp.jstl.fmt;uses:="javax.servlet.jsp", - javax.servlet.jsp.jstl.sql, - javax.servlet.jsp.jstl.tlv;uses:="javax.servlet.jsp.tagext", - javax.servlet.jsp.tagext;uses:="javax.servlet.jsp", javax.transaction;uses:="javax.transaction.xa", javax.transaction.xa, javax.xml.bind; diff --git a/tools/build.properties b/tools/build.properties index 78fdf06548..db996bc655 100644 --- a/tools/build.properties +++ b/tools/build.properties @@ -46,7 +46,6 @@ bin.includes = META-INF/,\ lib/ocrs12.jar,\ lib/ojdbc14.jar,\ lib/postgresql.jar,\ - lib/servlet-api.jar,\ lib/wizard.jar,\ lib/xercesImpl.jar,\ lib/xjavadoc-1.1.jar,\ diff --git a/tools/build.xml b/tools/build.xml deleted file mode 100644 index d6d73556f7..0000000000 --- a/tools/build.xml +++ /dev/null @@ -1,490 +0,0 @@ - - - - - - - - - The resulting CCTools.jar and CSTools.jar - repackage all third party libraries - in a single jar for simplified start and version control. - The resuling Server CSTools.jar is added to EARs - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - From 0945a8dba235a36f2754b74c5fc0a08603295448 Mon Sep 17 00:00:00 2001 From: joergviola Date: Fri, 5 Mar 2010 19:51:34 +0000 Subject: [PATCH 08/46] Converted to Equinox Plugins: zkwebui Had to move Webresources to /WebContent in order to pack bundle jar easily https://sourceforge.net/tracker/?func=detail&aid=2700937&group_id=176962&atid=879334 --- zkwebui/.classpath | 30 + zkwebui/.project | 11 + zkwebui/META-INF/MANIFEST.MF | 527 ++++++++++++++++++ .../src/org/adempiere/webui/Activator.java | 85 +++ .../adempiere/webui/DelegatingServlet.java | 82 +++ .../adempiere/webui/session/WebUIServlet.java | 8 +- zkwebui/{ => WebContent}/css/PAPanel.css | 0 zkwebui/{ => WebContent}/css/report.css | 0 zkwebui/{ => WebContent}/images/AD10030.png | Bin zkwebui/{ => WebContent}/images/AD10030HR.png | Bin zkwebui/{ => WebContent}/images/AD16.png | Bin zkwebui/{ => WebContent}/images/AD32.png | Bin zkwebui/{ => WebContent}/images/About16.png | Bin zkwebui/{ => WebContent}/images/About24.png | Bin zkwebui/{ => WebContent}/images/Account10.png | Bin zkwebui/{ => WebContent}/images/Account16.png | Bin zkwebui/{ => WebContent}/images/Account24.png | Bin .../images/AdemPiere150x50.png | Bin .../{ => WebContent}/images/AdemPiereCom.jpg | Bin .../{ => WebContent}/images/AdemPiereCom.png | Bin .../images/AdemPiereComHR.png | Bin .../{ => WebContent}/images/AdemPiereComx.png | Bin zkwebui/{ => WebContent}/images/Adempiere.jpg | Bin zkwebui/{ => WebContent}/images/Adempiere.png | Bin .../images/Adempiere120x60.png | Bin .../{ => WebContent}/images/AdempiereHR.png | Bin .../{ => WebContent}/images/Adempierex.png | Bin zkwebui/{ => WebContent}/images/Archive16.png | Bin zkwebui/{ => WebContent}/images/Archive24.png | Bin .../{ => WebContent}/images/Assignment10.png | Bin .../{ => WebContent}/images/Assignment16.png | Bin .../{ => WebContent}/images/Assignment24.png | Bin .../{ => WebContent}/images/Attachment16.png | Bin .../{ => WebContent}/images/Attachment24.png | Bin .../{ => WebContent}/images/Attachment24D.png | Bin .../{ => WebContent}/images/AttachmentX16.png | Bin .../{ => WebContent}/images/AttachmentX24.png | Bin .../{ => WebContent}/images/BPartner10.png | Bin .../{ => WebContent}/images/BPartner16.png | Bin .../{ => WebContent}/images/BPartner24.png | Bin zkwebui/{ => WebContent}/images/Bold16.png | Bin zkwebui/{ => WebContent}/images/C10030.jpg | Bin zkwebui/{ => WebContent}/images/C10030.png | Bin zkwebui/{ => WebContent}/images/C10030HR.png | Bin zkwebui/{ => WebContent}/images/C10030x.png | Bin zkwebui/{ => WebContent}/images/C10030xHR.png | Bin zkwebui/{ => WebContent}/images/C16.png | Bin zkwebui/{ => WebContent}/images/C32.png | Bin .../{ => WebContent}/images/Calculator10.png | Bin .../{ => WebContent}/images/Calculator16.png | Bin .../{ => WebContent}/images/Calculator24.png | Bin .../{ => WebContent}/images/Calendar10.png | Bin .../{ => WebContent}/images/Calendar16.png | Bin .../{ => WebContent}/images/Calendar24.png | Bin zkwebui/{ => WebContent}/images/Cancel10.png | Bin zkwebui/{ => WebContent}/images/Cancel16.png | Bin zkwebui/{ => WebContent}/images/Cancel24.png | Bin .../{ => WebContent}/images/ChangeLog16.png | Bin zkwebui/{ => WebContent}/images/Chat16.png | Bin zkwebui/{ => WebContent}/images/Chat24.png | Bin zkwebui/{ => WebContent}/images/ChatX16.png | Bin zkwebui/{ => WebContent}/images/ChatX24.png | Bin .../{ => WebContent}/images/ComPiereCom.jpg | Bin .../{ => WebContent}/images/ComPiereCom.png | Bin .../{ => WebContent}/images/ComPiereComHR.png | Bin .../{ => WebContent}/images/ComPiereComx.png | Bin zkwebui/{ => WebContent}/images/Compiere.jpg | Bin zkwebui/{ => WebContent}/images/Compiere.png | Bin .../{ => WebContent}/images/CompiereHR.png | Bin zkwebui/{ => WebContent}/images/Compierex.png | Bin zkwebui/{ => WebContent}/images/Copy16.png | Bin zkwebui/{ => WebContent}/images/Copy24.png | Bin .../{ => WebContent}/images/Customize16.png | Bin .../{ => WebContent}/images/Customize24.png | Bin zkwebui/{ => WebContent}/images/Delete16.png | Bin zkwebui/{ => WebContent}/images/Delete24.png | Bin .../images/DeleteSelection16.png | Bin .../images/DeleteSelection24.png | Bin zkwebui/{ => WebContent}/images/Detail16.png | Bin zkwebui/{ => WebContent}/images/Detail24.png | Bin .../images/EMailSupport16.png | Bin .../images/EMailSupport24.png | Bin zkwebui/{ => WebContent}/images/Edit16.png | Bin zkwebui/{ => WebContent}/images/Edit24.png | Bin zkwebui/{ => WebContent}/images/Editor16.png | Bin zkwebui/{ => WebContent}/images/Editor24.png | Bin zkwebui/{ => WebContent}/images/End16.png | Bin zkwebui/{ => WebContent}/images/End24.png | Bin zkwebui/{ => WebContent}/images/Error32.png | Bin zkwebui/{ => WebContent}/images/Exit16.png | Bin zkwebui/{ => WebContent}/images/Exit24.png | Bin zkwebui/{ => WebContent}/images/Export16.png | Bin zkwebui/{ => WebContent}/images/Export16X.png | Bin zkwebui/{ => WebContent}/images/Export24.png | Bin zkwebui/{ => WebContent}/images/Export24X.png | Bin zkwebui/{ => WebContent}/images/ExportX16.png | Bin zkwebui/{ => WebContent}/images/ExportX24.png | Bin .../{ => WebContent}/images/FastBack24.png | Bin .../{ => WebContent}/images/FastForward24.png | Bin zkwebui/{ => WebContent}/images/Find16.png | Bin zkwebui/{ => WebContent}/images/Find24.png | Bin zkwebui/{ => WebContent}/images/FindX16.png | Bin zkwebui/{ => WebContent}/images/FindX24.png | Bin zkwebui/{ => WebContent}/images/First16.png | Bin zkwebui/{ => WebContent}/images/First24.png | Bin zkwebui/{ => WebContent}/images/First24D.png | Bin zkwebui/{ => WebContent}/images/Folder16.png | Bin zkwebui/{ => WebContent}/images/Folder24.png | Bin zkwebui/{ => WebContent}/images/GetMail16.png | Bin zkwebui/{ => WebContent}/images/GetMail24.png | Bin zkwebui/{ => WebContent}/images/Help16.png | Bin zkwebui/{ => WebContent}/images/Help24.png | Bin zkwebui/{ => WebContent}/images/History16.png | Bin zkwebui/{ => WebContent}/images/History24.png | Bin .../{ => WebContent}/images/History24D.png | Bin .../{ => WebContent}/images/HistoryX16.png | Bin .../{ => WebContent}/images/HistoryX24.png | Bin zkwebui/{ => WebContent}/images/Home16.png | Bin zkwebui/{ => WebContent}/images/Home24.png | Bin zkwebui/{ => WebContent}/images/Ignore16.png | Bin zkwebui/{ => WebContent}/images/Ignore24.png | Bin zkwebui/{ => WebContent}/images/Import16.png | Bin zkwebui/{ => WebContent}/images/Import24.png | Bin zkwebui/{ => WebContent}/images/Info16.png | Bin zkwebui/{ => WebContent}/images/Info24.png | Bin .../{ => WebContent}/images/InfoAccount16.png | Bin .../{ => WebContent}/images/InfoAccount24.png | Bin .../images/InfoBPartner16.png | Bin .../images/InfoBPartner24.png | Bin .../{ => WebContent}/images/InfoProduct16.png | Bin .../{ => WebContent}/images/InfoProduct24.png | Bin .../images/InfoSchedule16.png | Bin .../images/InfoSchedule24.png | Bin zkwebui/{ => WebContent}/images/Inform32.png | Bin zkwebui/{ => WebContent}/images/Italic16.png | Bin zkwebui/{ => WebContent}/images/Java_logo.png | Bin zkwebui/{ => WebContent}/images/Last16.png | Bin zkwebui/{ => WebContent}/images/Last24.png | Bin zkwebui/{ => WebContent}/images/Last24D.png | Bin .../{ => WebContent}/images/Location10.png | Bin zkwebui/{ => WebContent}/images/Locator10.png | Bin zkwebui/{ => WebContent}/images/Lock16.png | Bin zkwebui/{ => WebContent}/images/Lock24.png | Bin zkwebui/{ => WebContent}/images/LockX16.png | Bin zkwebui/{ => WebContent}/images/LockX24.png | Bin zkwebui/{ => WebContent}/images/Logout16.png | Bin zkwebui/{ => WebContent}/images/Logout24.png | Bin zkwebui/{ => WebContent}/images/Minus16.png | Bin zkwebui/{ => WebContent}/images/Minus24.png | Bin zkwebui/{ => WebContent}/images/Multi16.png | Bin zkwebui/{ => WebContent}/images/Multi24.png | Bin zkwebui/{ => WebContent}/images/MultiX16.png | Bin zkwebui/{ => WebContent}/images/MultiX24.png | Bin zkwebui/{ => WebContent}/images/New16.png | Bin zkwebui/{ => WebContent}/images/New24.png | Bin zkwebui/{ => WebContent}/images/Next16.png | Bin zkwebui/{ => WebContent}/images/Next24.png | Bin zkwebui/{ => WebContent}/images/Next24D.png | Bin zkwebui/{ => WebContent}/images/Normal16.png | Bin zkwebui/{ => WebContent}/images/Ok16.png | Bin zkwebui/{ => WebContent}/images/Ok24.png | Bin zkwebui/{ => WebContent}/images/Online10.png | Bin zkwebui/{ => WebContent}/images/Online16.png | Bin zkwebui/{ => WebContent}/images/Online24.png | Bin zkwebui/{ => WebContent}/images/Open16.png | Bin zkwebui/{ => WebContent}/images/Open24.png | Bin .../{ => WebContent}/images/PAttribute10.png | Bin .../{ => WebContent}/images/PAttribute16.png | Bin .../{ => WebContent}/images/PAttribute24.png | Bin .../{ => WebContent}/images/PageSetup16.png | Bin .../{ => WebContent}/images/PageSetup24.png | Bin zkwebui/{ => WebContent}/images/Parent16.png | Bin zkwebui/{ => WebContent}/images/Parent24.png | Bin zkwebui/{ => WebContent}/images/Payment16.png | Bin zkwebui/{ => WebContent}/images/Payment24.png | Bin .../{ => WebContent}/images/PickOpen10.png | Bin zkwebui/{ => WebContent}/images/Plus16.png | Bin zkwebui/{ => WebContent}/images/Plus24.png | Bin zkwebui/{ => WebContent}/images/Posterita.jpg | Bin .../images/PosteritaAjaxUILogo.jpg | Bin .../{ => WebContent}/images/Preference16.png | Bin .../{ => WebContent}/images/Preference24.png | Bin .../{ => WebContent}/images/Previous16.png | Bin .../{ => WebContent}/images/Previous24.png | Bin .../{ => WebContent}/images/Previous24D.png | Bin zkwebui/{ => WebContent}/images/Print16.png | Bin zkwebui/{ => WebContent}/images/Print24.png | Bin .../{ => WebContent}/images/PrintScreen16.png | Bin .../{ => WebContent}/images/PrintScreen24.png | Bin zkwebui/{ => WebContent}/images/Process16.png | Bin zkwebui/{ => WebContent}/images/Process24.png | Bin zkwebui/{ => WebContent}/images/Product10.png | Bin zkwebui/{ => WebContent}/images/Product16.png | Bin zkwebui/{ => WebContent}/images/Product24.png | Bin .../{ => WebContent}/images/Question32.png | Bin zkwebui/{ => WebContent}/images/Redo16.png | Bin zkwebui/{ => WebContent}/images/Redo24.png | Bin zkwebui/{ => WebContent}/images/Refresh16.png | Bin zkwebui/{ => WebContent}/images/Refresh24.png | Bin .../{ => WebContent}/images/Register16.png | Bin .../{ => WebContent}/images/Register24.png | Bin zkwebui/{ => WebContent}/images/Report16.png | Bin zkwebui/{ => WebContent}/images/Report24.png | Bin zkwebui/{ => WebContent}/images/Request16.png | Bin zkwebui/{ => WebContent}/images/Request24.png | Bin zkwebui/{ => WebContent}/images/Reset16.png | Bin zkwebui/{ => WebContent}/images/Reset24.png | Bin zkwebui/{ => WebContent}/images/Save16.png | Bin zkwebui/{ => WebContent}/images/Save24.png | Bin .../{ => WebContent}/images/ScreenShot16.png | Bin .../{ => WebContent}/images/ScreenShot24.png | Bin zkwebui/{ => WebContent}/images/Script16.png | Bin zkwebui/{ => WebContent}/images/Script24.png | Bin .../{ => WebContent}/images/SelectAll16.png | Bin .../{ => WebContent}/images/SelectAll24.png | Bin .../{ => WebContent}/images/SendMail16.png | Bin .../{ => WebContent}/images/SendMail24.png | Bin zkwebui/{ => WebContent}/images/Server16.png | Bin zkwebui/{ => WebContent}/images/Server24.png | Bin zkwebui/{ => WebContent}/images/Setup16.png | Bin zkwebui/{ => WebContent}/images/Setup24.png | Bin .../{ => WebContent}/images/StepBack24.png | Bin .../{ => WebContent}/images/StepForward24.png | Bin zkwebui/{ => WebContent}/images/Summary16.png | Bin zkwebui/{ => WebContent}/images/Summary24.png | Bin .../{ => WebContent}/images/Translate16.png | Bin .../{ => WebContent}/images/Translate24.png | Bin .../{ => WebContent}/images/Underline16.png | Bin zkwebui/{ => WebContent}/images/Undo16.png | Bin zkwebui/{ => WebContent}/images/Undo24.png | Bin .../{ => WebContent}/images/VPreference16.png | Bin .../{ => WebContent}/images/VPreference24.png | Bin zkwebui/{ => WebContent}/images/Warn32.png | Bin zkwebui/{ => WebContent}/images/WinSize16.png | Bin zkwebui/{ => WebContent}/images/WinSize24.png | Bin .../{ => WebContent}/images/WorkFlow16.png | Bin .../{ => WebContent}/images/WorkFlow24.png | Bin .../{ => WebContent}/images/WorkFlow_16.png | Bin .../{ => WebContent}/images/WorkFlow_24.png | Bin zkwebui/{ => WebContent}/images/Zoom16.png | Bin zkwebui/{ => WebContent}/images/Zoom24.png | Bin .../{ => WebContent}/images/ZoomAcross16.png | Bin .../{ => WebContent}/images/ZoomAcross24.png | Bin zkwebui/{ => WebContent}/images/downarrow.png | Bin .../{ => WebContent}/images/gradient-bg.png | Bin zkwebui/{ => WebContent}/images/loading.png | Bin zkwebui/{ => WebContent}/images/logo.png | Bin zkwebui/{ => WebContent}/images/logo_ad.png | Bin zkwebui/{ => WebContent}/images/logoff.JPG | Bin zkwebui/{ => WebContent}/images/mClosed.png | Bin .../{ => WebContent}/images/mDocAction.png | Bin zkwebui/{ => WebContent}/images/mOpen.png | Bin zkwebui/{ => WebContent}/images/mProcess.png | Bin zkwebui/{ => WebContent}/images/mReport.png | Bin .../{ => WebContent}/images/mSetVariable.png | Bin .../{ => WebContent}/images/mUserChoice.png | Bin zkwebui/{ => WebContent}/images/mWindow.png | Bin zkwebui/{ => WebContent}/images/mWorkFlow.png | Bin .../{ => WebContent}/images/mWorkbench.png | Bin .../{ => WebContent}/images/ns-collapse.png | Bin zkwebui/{ => WebContent}/images/ns-expand.png | Bin zkwebui/{ => WebContent}/images/top.JPG | Bin zkwebui/{ => WebContent}/images/uparrow.png | Bin zkwebui/{ => WebContent}/images/wfBack24.png | Bin zkwebui/{ => WebContent}/images/wfEnd24.png | Bin zkwebui/{ => WebContent}/images/wfNext24.png | Bin zkwebui/{ => WebContent}/images/wfStart24.png | Bin zkwebui/{ => WebContent}/images/zip.png | Bin zkwebui/{ => WebContent}/index.zul | 0 zkwebui/{ => WebContent}/js/calc.js | 0 zkwebui/{ => WebContent}/js/layout.js | 0 zkwebui/{ => WebContent}/js/persist-min.js | 0 zkwebui/{ => WebContent}/js/report.js | 0 zkwebui/{ => WebContent}/js/token.js | 0 zkwebui/{ => WebContent}/release_notes.html | 0 zkwebui/{ => WebContent}/theme.zs | 0 .../theme/default/css/theme.css.dsp | 0 .../theme/default/css/themeie.css.dsp | 0 .../theme/default/images/adtab-left-bg.png | Bin .../theme/default/images/adtab-right-bg.png | Bin .../theme/default/images/header-bg.png | Bin .../theme/default/images/header-logo.png | Bin .../theme/default/images/icon.png | Bin .../theme/default/images/login-box-bg.png | Bin .../theme/default/images/login-box-footer.png | Bin .../theme/default/images/login-box-header.png | Bin .../theme/default/images/login-logo.png | Bin .../theme/default/login-info.zul | 0 .../theme/default/login-left.zul | 0 .../theme/default/login-links.zul | 0 .../theme/default/vendor-logo.zul | 0 .../theme/default/version-info.zul | 0 zkwebui/{ => WebContent}/zul/activities.zul | 0 zkwebui/{ => WebContent}/zul/calendar.zul | 0 zkwebui/{ => WebContent}/zul/favourites.zul | 0 zkwebui/{ => WebContent}/zul/menu.zul | 0 zkwebui/{ => WebContent}/zul/performance.zul | 0 zkwebui/{ => WebContent}/zul/views.zul | 0 zkwebui/build.properties | 56 ++ zkwebui/build.xml | 90 --- zkwebui/plugin.xml | 17 + 301 files changed, 815 insertions(+), 91 deletions(-) create mode 100644 zkwebui/META-INF/MANIFEST.MF create mode 100644 zkwebui/WEB-INF/src/org/adempiere/webui/Activator.java create mode 100644 zkwebui/WEB-INF/src/org/adempiere/webui/DelegatingServlet.java rename zkwebui/{ => WebContent}/css/PAPanel.css (100%) rename zkwebui/{ => WebContent}/css/report.css (100%) rename zkwebui/{ => WebContent}/images/AD10030.png (100%) rename zkwebui/{ => WebContent}/images/AD10030HR.png (100%) rename zkwebui/{ => WebContent}/images/AD16.png (100%) rename zkwebui/{ => WebContent}/images/AD32.png (100%) rename zkwebui/{ => WebContent}/images/About16.png (100%) rename zkwebui/{ => WebContent}/images/About24.png (100%) rename zkwebui/{ => WebContent}/images/Account10.png (100%) rename zkwebui/{ => WebContent}/images/Account16.png (100%) rename zkwebui/{ => WebContent}/images/Account24.png (100%) rename zkwebui/{ => WebContent}/images/AdemPiere150x50.png (100%) rename zkwebui/{ => WebContent}/images/AdemPiereCom.jpg (100%) rename zkwebui/{ => WebContent}/images/AdemPiereCom.png (100%) rename zkwebui/{ => WebContent}/images/AdemPiereComHR.png (100%) rename zkwebui/{ => WebContent}/images/AdemPiereComx.png (100%) rename zkwebui/{ => WebContent}/images/Adempiere.jpg (100%) rename zkwebui/{ => WebContent}/images/Adempiere.png (100%) rename zkwebui/{ => WebContent}/images/Adempiere120x60.png (100%) rename zkwebui/{ => WebContent}/images/AdempiereHR.png (100%) rename zkwebui/{ => WebContent}/images/Adempierex.png (100%) rename zkwebui/{ => WebContent}/images/Archive16.png (100%) rename zkwebui/{ => WebContent}/images/Archive24.png (100%) rename zkwebui/{ => WebContent}/images/Assignment10.png (100%) rename zkwebui/{ => WebContent}/images/Assignment16.png (100%) rename zkwebui/{ => WebContent}/images/Assignment24.png (100%) rename zkwebui/{ => WebContent}/images/Attachment16.png (100%) rename zkwebui/{ => WebContent}/images/Attachment24.png (100%) rename zkwebui/{ => WebContent}/images/Attachment24D.png (100%) rename zkwebui/{ => WebContent}/images/AttachmentX16.png (100%) rename zkwebui/{ => WebContent}/images/AttachmentX24.png (100%) rename zkwebui/{ => WebContent}/images/BPartner10.png (100%) rename zkwebui/{ => WebContent}/images/BPartner16.png (100%) rename zkwebui/{ => WebContent}/images/BPartner24.png (100%) rename zkwebui/{ => WebContent}/images/Bold16.png (100%) rename zkwebui/{ => WebContent}/images/C10030.jpg (100%) rename zkwebui/{ => WebContent}/images/C10030.png (100%) rename zkwebui/{ => WebContent}/images/C10030HR.png (100%) rename zkwebui/{ => WebContent}/images/C10030x.png (100%) rename zkwebui/{ => WebContent}/images/C10030xHR.png (100%) rename zkwebui/{ => WebContent}/images/C16.png (100%) rename zkwebui/{ => WebContent}/images/C32.png (100%) rename zkwebui/{ => WebContent}/images/Calculator10.png (100%) rename zkwebui/{ => WebContent}/images/Calculator16.png (100%) rename zkwebui/{ => WebContent}/images/Calculator24.png (100%) rename zkwebui/{ => WebContent}/images/Calendar10.png (100%) rename zkwebui/{ => WebContent}/images/Calendar16.png (100%) rename zkwebui/{ => WebContent}/images/Calendar24.png (100%) rename zkwebui/{ => WebContent}/images/Cancel10.png (100%) rename zkwebui/{ => WebContent}/images/Cancel16.png (100%) rename zkwebui/{ => WebContent}/images/Cancel24.png (100%) rename zkwebui/{ => WebContent}/images/ChangeLog16.png (100%) rename zkwebui/{ => WebContent}/images/Chat16.png (100%) rename zkwebui/{ => WebContent}/images/Chat24.png (100%) rename zkwebui/{ => WebContent}/images/ChatX16.png (100%) rename zkwebui/{ => WebContent}/images/ChatX24.png (100%) rename zkwebui/{ => WebContent}/images/ComPiereCom.jpg (100%) rename zkwebui/{ => WebContent}/images/ComPiereCom.png (100%) rename zkwebui/{ => WebContent}/images/ComPiereComHR.png (100%) rename zkwebui/{ => WebContent}/images/ComPiereComx.png (100%) rename zkwebui/{ => WebContent}/images/Compiere.jpg (100%) rename zkwebui/{ => WebContent}/images/Compiere.png (100%) rename zkwebui/{ => WebContent}/images/CompiereHR.png (100%) rename zkwebui/{ => WebContent}/images/Compierex.png (100%) rename zkwebui/{ => WebContent}/images/Copy16.png (100%) rename zkwebui/{ => WebContent}/images/Copy24.png (100%) rename zkwebui/{ => WebContent}/images/Customize16.png (100%) rename zkwebui/{ => WebContent}/images/Customize24.png (100%) rename zkwebui/{ => WebContent}/images/Delete16.png (100%) rename zkwebui/{ => WebContent}/images/Delete24.png (100%) rename zkwebui/{ => WebContent}/images/DeleteSelection16.png (100%) rename zkwebui/{ => WebContent}/images/DeleteSelection24.png (100%) rename zkwebui/{ => WebContent}/images/Detail16.png (100%) rename zkwebui/{ => WebContent}/images/Detail24.png (100%) rename zkwebui/{ => WebContent}/images/EMailSupport16.png (100%) rename zkwebui/{ => WebContent}/images/EMailSupport24.png (100%) rename zkwebui/{ => WebContent}/images/Edit16.png (100%) rename zkwebui/{ => WebContent}/images/Edit24.png (100%) rename zkwebui/{ => WebContent}/images/Editor16.png (100%) rename zkwebui/{ => WebContent}/images/Editor24.png (100%) rename zkwebui/{ => WebContent}/images/End16.png (100%) rename zkwebui/{ => WebContent}/images/End24.png (100%) rename zkwebui/{ => WebContent}/images/Error32.png (100%) rename zkwebui/{ => WebContent}/images/Exit16.png (100%) rename zkwebui/{ => WebContent}/images/Exit24.png (100%) rename zkwebui/{ => WebContent}/images/Export16.png (100%) rename zkwebui/{ => WebContent}/images/Export16X.png (100%) rename zkwebui/{ => WebContent}/images/Export24.png (100%) rename zkwebui/{ => WebContent}/images/Export24X.png (100%) rename zkwebui/{ => WebContent}/images/ExportX16.png (100%) rename zkwebui/{ => WebContent}/images/ExportX24.png (100%) rename zkwebui/{ => WebContent}/images/FastBack24.png (100%) rename zkwebui/{ => WebContent}/images/FastForward24.png (100%) rename zkwebui/{ => WebContent}/images/Find16.png (100%) rename zkwebui/{ => WebContent}/images/Find24.png (100%) rename zkwebui/{ => WebContent}/images/FindX16.png (100%) rename zkwebui/{ => WebContent}/images/FindX24.png (100%) rename zkwebui/{ => WebContent}/images/First16.png (100%) rename zkwebui/{ => WebContent}/images/First24.png (100%) rename zkwebui/{ => WebContent}/images/First24D.png (100%) rename zkwebui/{ => WebContent}/images/Folder16.png (100%) rename zkwebui/{ => WebContent}/images/Folder24.png (100%) rename zkwebui/{ => WebContent}/images/GetMail16.png (100%) rename zkwebui/{ => WebContent}/images/GetMail24.png (100%) rename zkwebui/{ => WebContent}/images/Help16.png (100%) rename zkwebui/{ => WebContent}/images/Help24.png (100%) rename zkwebui/{ => WebContent}/images/History16.png (100%) rename zkwebui/{ => WebContent}/images/History24.png (100%) rename zkwebui/{ => WebContent}/images/History24D.png (100%) rename zkwebui/{ => WebContent}/images/HistoryX16.png (100%) rename zkwebui/{ => WebContent}/images/HistoryX24.png (100%) rename zkwebui/{ => WebContent}/images/Home16.png (100%) rename zkwebui/{ => WebContent}/images/Home24.png (100%) rename zkwebui/{ => WebContent}/images/Ignore16.png (100%) rename zkwebui/{ => WebContent}/images/Ignore24.png (100%) rename zkwebui/{ => WebContent}/images/Import16.png (100%) rename zkwebui/{ => WebContent}/images/Import24.png (100%) rename zkwebui/{ => WebContent}/images/Info16.png (100%) rename zkwebui/{ => WebContent}/images/Info24.png (100%) rename zkwebui/{ => WebContent}/images/InfoAccount16.png (100%) rename zkwebui/{ => WebContent}/images/InfoAccount24.png (100%) rename zkwebui/{ => WebContent}/images/InfoBPartner16.png (100%) rename zkwebui/{ => WebContent}/images/InfoBPartner24.png (100%) rename zkwebui/{ => WebContent}/images/InfoProduct16.png (100%) rename zkwebui/{ => WebContent}/images/InfoProduct24.png (100%) rename zkwebui/{ => WebContent}/images/InfoSchedule16.png (100%) rename zkwebui/{ => WebContent}/images/InfoSchedule24.png (100%) rename zkwebui/{ => WebContent}/images/Inform32.png (100%) rename zkwebui/{ => WebContent}/images/Italic16.png (100%) rename zkwebui/{ => WebContent}/images/Java_logo.png (100%) rename zkwebui/{ => WebContent}/images/Last16.png (100%) rename zkwebui/{ => WebContent}/images/Last24.png (100%) rename zkwebui/{ => WebContent}/images/Last24D.png (100%) rename zkwebui/{ => WebContent}/images/Location10.png (100%) rename zkwebui/{ => WebContent}/images/Locator10.png (100%) rename zkwebui/{ => WebContent}/images/Lock16.png (100%) rename zkwebui/{ => WebContent}/images/Lock24.png (100%) rename zkwebui/{ => WebContent}/images/LockX16.png (100%) rename zkwebui/{ => WebContent}/images/LockX24.png (100%) rename zkwebui/{ => WebContent}/images/Logout16.png (100%) rename zkwebui/{ => WebContent}/images/Logout24.png (100%) rename zkwebui/{ => WebContent}/images/Minus16.png (100%) rename zkwebui/{ => WebContent}/images/Minus24.png (100%) rename zkwebui/{ => WebContent}/images/Multi16.png (100%) rename zkwebui/{ => WebContent}/images/Multi24.png (100%) rename zkwebui/{ => WebContent}/images/MultiX16.png (100%) rename zkwebui/{ => WebContent}/images/MultiX24.png (100%) rename zkwebui/{ => WebContent}/images/New16.png (100%) rename zkwebui/{ => WebContent}/images/New24.png (100%) rename zkwebui/{ => WebContent}/images/Next16.png (100%) rename zkwebui/{ => WebContent}/images/Next24.png (100%) rename zkwebui/{ => WebContent}/images/Next24D.png (100%) rename zkwebui/{ => WebContent}/images/Normal16.png (100%) rename zkwebui/{ => WebContent}/images/Ok16.png (100%) rename zkwebui/{ => WebContent}/images/Ok24.png (100%) rename zkwebui/{ => WebContent}/images/Online10.png (100%) rename zkwebui/{ => WebContent}/images/Online16.png (100%) rename zkwebui/{ => WebContent}/images/Online24.png (100%) rename zkwebui/{ => WebContent}/images/Open16.png (100%) rename zkwebui/{ => WebContent}/images/Open24.png (100%) rename zkwebui/{ => WebContent}/images/PAttribute10.png (100%) rename zkwebui/{ => WebContent}/images/PAttribute16.png (100%) rename zkwebui/{ => WebContent}/images/PAttribute24.png (100%) rename zkwebui/{ => WebContent}/images/PageSetup16.png (100%) rename zkwebui/{ => WebContent}/images/PageSetup24.png (100%) rename zkwebui/{ => WebContent}/images/Parent16.png (100%) rename zkwebui/{ => WebContent}/images/Parent24.png (100%) rename zkwebui/{ => WebContent}/images/Payment16.png (100%) rename zkwebui/{ => WebContent}/images/Payment24.png (100%) rename zkwebui/{ => WebContent}/images/PickOpen10.png (100%) rename zkwebui/{ => WebContent}/images/Plus16.png (100%) rename zkwebui/{ => WebContent}/images/Plus24.png (100%) rename zkwebui/{ => WebContent}/images/Posterita.jpg (100%) rename zkwebui/{ => WebContent}/images/PosteritaAjaxUILogo.jpg (100%) rename zkwebui/{ => WebContent}/images/Preference16.png (100%) rename zkwebui/{ => WebContent}/images/Preference24.png (100%) rename zkwebui/{ => WebContent}/images/Previous16.png (100%) rename zkwebui/{ => WebContent}/images/Previous24.png (100%) rename zkwebui/{ => WebContent}/images/Previous24D.png (100%) rename zkwebui/{ => WebContent}/images/Print16.png (100%) rename zkwebui/{ => WebContent}/images/Print24.png (100%) rename zkwebui/{ => WebContent}/images/PrintScreen16.png (100%) rename zkwebui/{ => WebContent}/images/PrintScreen24.png (100%) rename zkwebui/{ => WebContent}/images/Process16.png (100%) rename zkwebui/{ => WebContent}/images/Process24.png (100%) rename zkwebui/{ => WebContent}/images/Product10.png (100%) rename zkwebui/{ => WebContent}/images/Product16.png (100%) rename zkwebui/{ => WebContent}/images/Product24.png (100%) rename zkwebui/{ => WebContent}/images/Question32.png (100%) rename zkwebui/{ => WebContent}/images/Redo16.png (100%) rename zkwebui/{ => WebContent}/images/Redo24.png (100%) rename zkwebui/{ => WebContent}/images/Refresh16.png (100%) rename zkwebui/{ => WebContent}/images/Refresh24.png (100%) rename zkwebui/{ => WebContent}/images/Register16.png (100%) rename zkwebui/{ => WebContent}/images/Register24.png (100%) rename zkwebui/{ => WebContent}/images/Report16.png (100%) rename zkwebui/{ => WebContent}/images/Report24.png (100%) rename zkwebui/{ => WebContent}/images/Request16.png (100%) rename zkwebui/{ => WebContent}/images/Request24.png (100%) rename zkwebui/{ => WebContent}/images/Reset16.png (100%) rename zkwebui/{ => WebContent}/images/Reset24.png (100%) rename zkwebui/{ => WebContent}/images/Save16.png (100%) rename zkwebui/{ => WebContent}/images/Save24.png (100%) rename zkwebui/{ => WebContent}/images/ScreenShot16.png (100%) rename zkwebui/{ => WebContent}/images/ScreenShot24.png (100%) rename zkwebui/{ => WebContent}/images/Script16.png (100%) rename zkwebui/{ => WebContent}/images/Script24.png (100%) rename zkwebui/{ => WebContent}/images/SelectAll16.png (100%) rename zkwebui/{ => WebContent}/images/SelectAll24.png (100%) rename zkwebui/{ => WebContent}/images/SendMail16.png (100%) rename zkwebui/{ => WebContent}/images/SendMail24.png (100%) rename zkwebui/{ => WebContent}/images/Server16.png (100%) rename zkwebui/{ => WebContent}/images/Server24.png (100%) rename zkwebui/{ => WebContent}/images/Setup16.png (100%) rename zkwebui/{ => WebContent}/images/Setup24.png (100%) rename zkwebui/{ => WebContent}/images/StepBack24.png (100%) rename zkwebui/{ => WebContent}/images/StepForward24.png (100%) rename zkwebui/{ => WebContent}/images/Summary16.png (100%) rename zkwebui/{ => WebContent}/images/Summary24.png (100%) rename zkwebui/{ => WebContent}/images/Translate16.png (100%) rename zkwebui/{ => WebContent}/images/Translate24.png (100%) rename zkwebui/{ => WebContent}/images/Underline16.png (100%) rename zkwebui/{ => WebContent}/images/Undo16.png (100%) rename zkwebui/{ => WebContent}/images/Undo24.png (100%) rename zkwebui/{ => WebContent}/images/VPreference16.png (100%) rename zkwebui/{ => WebContent}/images/VPreference24.png (100%) rename zkwebui/{ => WebContent}/images/Warn32.png (100%) rename zkwebui/{ => WebContent}/images/WinSize16.png (100%) rename zkwebui/{ => WebContent}/images/WinSize24.png (100%) rename zkwebui/{ => WebContent}/images/WorkFlow16.png (100%) rename zkwebui/{ => WebContent}/images/WorkFlow24.png (100%) rename zkwebui/{ => WebContent}/images/WorkFlow_16.png (100%) rename zkwebui/{ => WebContent}/images/WorkFlow_24.png (100%) rename zkwebui/{ => WebContent}/images/Zoom16.png (100%) rename zkwebui/{ => WebContent}/images/Zoom24.png (100%) rename zkwebui/{ => WebContent}/images/ZoomAcross16.png (100%) rename zkwebui/{ => WebContent}/images/ZoomAcross24.png (100%) rename zkwebui/{ => WebContent}/images/downarrow.png (100%) rename zkwebui/{ => WebContent}/images/gradient-bg.png (100%) rename zkwebui/{ => WebContent}/images/loading.png (100%) rename zkwebui/{ => WebContent}/images/logo.png (100%) rename zkwebui/{ => WebContent}/images/logo_ad.png (100%) rename zkwebui/{ => WebContent}/images/logoff.JPG (100%) rename zkwebui/{ => WebContent}/images/mClosed.png (100%) rename zkwebui/{ => WebContent}/images/mDocAction.png (100%) rename zkwebui/{ => WebContent}/images/mOpen.png (100%) rename zkwebui/{ => WebContent}/images/mProcess.png (100%) rename zkwebui/{ => WebContent}/images/mReport.png (100%) rename zkwebui/{ => WebContent}/images/mSetVariable.png (100%) rename zkwebui/{ => WebContent}/images/mUserChoice.png (100%) rename zkwebui/{ => WebContent}/images/mWindow.png (100%) rename zkwebui/{ => WebContent}/images/mWorkFlow.png (100%) rename zkwebui/{ => WebContent}/images/mWorkbench.png (100%) rename zkwebui/{ => WebContent}/images/ns-collapse.png (100%) rename zkwebui/{ => WebContent}/images/ns-expand.png (100%) rename zkwebui/{ => WebContent}/images/top.JPG (100%) rename zkwebui/{ => WebContent}/images/uparrow.png (100%) rename zkwebui/{ => WebContent}/images/wfBack24.png (100%) rename zkwebui/{ => WebContent}/images/wfEnd24.png (100%) rename zkwebui/{ => WebContent}/images/wfNext24.png (100%) rename zkwebui/{ => WebContent}/images/wfStart24.png (100%) rename zkwebui/{ => WebContent}/images/zip.png (100%) rename zkwebui/{ => WebContent}/index.zul (100%) rename zkwebui/{ => WebContent}/js/calc.js (100%) rename zkwebui/{ => WebContent}/js/layout.js (100%) rename zkwebui/{ => WebContent}/js/persist-min.js (100%) rename zkwebui/{ => WebContent}/js/report.js (100%) rename zkwebui/{ => WebContent}/js/token.js (100%) rename zkwebui/{ => WebContent}/release_notes.html (100%) rename zkwebui/{ => WebContent}/theme.zs (100%) rename zkwebui/{ => WebContent}/theme/default/css/theme.css.dsp (100%) rename zkwebui/{ => WebContent}/theme/default/css/themeie.css.dsp (100%) rename zkwebui/{ => WebContent}/theme/default/images/adtab-left-bg.png (100%) rename zkwebui/{ => WebContent}/theme/default/images/adtab-right-bg.png (100%) rename zkwebui/{ => WebContent}/theme/default/images/header-bg.png (100%) rename zkwebui/{ => WebContent}/theme/default/images/header-logo.png (100%) rename zkwebui/{ => WebContent}/theme/default/images/icon.png (100%) rename zkwebui/{ => WebContent}/theme/default/images/login-box-bg.png (100%) rename zkwebui/{ => WebContent}/theme/default/images/login-box-footer.png (100%) rename zkwebui/{ => WebContent}/theme/default/images/login-box-header.png (100%) rename zkwebui/{ => WebContent}/theme/default/images/login-logo.png (100%) rename zkwebui/{ => WebContent}/theme/default/login-info.zul (100%) rename zkwebui/{ => WebContent}/theme/default/login-left.zul (100%) rename zkwebui/{ => WebContent}/theme/default/login-links.zul (100%) rename zkwebui/{ => WebContent}/theme/default/vendor-logo.zul (100%) rename zkwebui/{ => WebContent}/theme/default/version-info.zul (100%) rename zkwebui/{ => WebContent}/zul/activities.zul (100%) rename zkwebui/{ => WebContent}/zul/calendar.zul (100%) rename zkwebui/{ => WebContent}/zul/favourites.zul (100%) rename zkwebui/{ => WebContent}/zul/menu.zul (100%) rename zkwebui/{ => WebContent}/zul/performance.zul (100%) rename zkwebui/{ => WebContent}/zul/views.zul (100%) create mode 100644 zkwebui/build.properties delete mode 100644 zkwebui/build.xml create mode 100644 zkwebui/plugin.xml diff --git a/zkwebui/.classpath b/zkwebui/.classpath index 64018068ce..62840c5d7a 100644 --- a/zkwebui/.classpath +++ b/zkwebui/.classpath @@ -2,6 +2,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -32,5 +61,6 @@ + diff --git a/zkwebui/.project b/zkwebui/.project index 8f4f4a18dc..e727d85fa4 100644 --- a/zkwebui/.project +++ b/zkwebui/.project @@ -15,6 +15,16 @@ + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + org.eclipse.wst.common.project.facet.core.nature @@ -22,5 +32,6 @@ org.eclipse.wst.common.modulecore.ModuleCoreNature org.eclipse.jem.workbench.JavaEMFNature org.eclipse.wst.jsdt.core.jsNature + org.eclipse.pde.PluginNature diff --git a/zkwebui/META-INF/MANIFEST.MF b/zkwebui/META-INF/MANIFEST.MF new file mode 100644 index 0000000000..946a242e7a --- /dev/null +++ b/zkwebui/META-INF/MANIFEST.MF @@ -0,0 +1,527 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: zkwebui +Bundle-SymbolicName: org.adempiere.zkwebui;singleton:=true +Bundle-Version: 0.0.0.2 +Bundle-ClassPath: zkwebui.jar, + WEB-INF/lib/zk.jar, + WEB-INF/lib/zcommon.jar, + WEB-INF/lib/zul.jar, + WEB-INF/lib/junit.jar, + WEB-INF/lib/keylistener.jar, + lib/xercesImpl.jar, + WEB-INF/lib/zkmax.jar, + WEB-INF/lib/zkex.jar, + WEB-INF/lib/zkplus.jar, + WEB-INF/lib/zhtml.jar, + WEB-INF/lib/timelinez.jar, + WEB-INF/lib/zweb.jar, + lib/javaee.jar, + WEB-INF/lib/cglib.jar, + WEB-INF/lib/fckez.jar, + lib/jcommon-1.0.14.jar, + lib/jfreechart-1.0.11.jar, + WEB-INF/lib/asm.jar, + WEB-INF/lib/bsh.jar, + WEB-INF/lib/commons-el.jar, + WEB-INF/lib/commons-fileupload.jar, + WEB-INF/lib/commons-io.jar, + WEB-INF/lib/Filters.jar, + WEB-INF/lib/gmapsz.jar, + WEB-INF/lib/groovy.jar, + WEB-INF/lib/jruby.jar, + WEB-INF/lib/js.jar, + WEB-INF/lib/json_simple.jar, + WEB-INF/lib/jxl.jar, + WEB-INF/lib/jython.jar, + WEB-INF/lib/mvel.jar, + WEB-INF/lib/ognl.jar, + WEB-INF/lib/timelinez-sources.jar, + WEB-INF/lib/timeplotz.jar, + WEB-INF/lib/xercesImpl.jar, + WEB-INF/lib/zcommon-sources.jar, + WEB-INF/lib/zcommons-el.jar, + WEB-INF/lib/zhtml-sources.jar, + WEB-INF/lib/zk-sources.jar, + WEB-INF/lib/zkex-sources.jar, + WEB-INF/lib/zkmax-sources.jar, + WEB-INF/lib/zkplus-sources.jar, + WEB-INF/lib/zml-sources.jar, + WEB-INF/lib/zml.jar, + WEB-INF/lib/zul-sources.jar, + WEB-INF/lib/zweb-sources.jar +Export-Package: com.keypoint, + javax.activation, + javax.annotation, + javax.annotation.security, + javax.ejb, + javax.ejb.spi, + javax.el, + javax.enterprise.deploy.model, + javax.enterprise.deploy.model.exceptions, + javax.enterprise.deploy.shared, + javax.enterprise.deploy.shared.factories, + javax.enterprise.deploy.spi, + javax.enterprise.deploy.spi.exceptions, + javax.enterprise.deploy.spi.factories, + javax.enterprise.deploy.spi.status, + javax.faces, + javax.faces.application, + javax.faces.component, + javax.faces.component.html, + javax.faces.context, + javax.faces.convert, + javax.faces.el, + javax.faces.event, + javax.faces.lifecycle, + javax.faces.model, + javax.faces.render, + javax.faces.validator, + javax.faces.webapp, + javax.interceptor, + javax.jms, + javax.jws, + javax.jws.soap, + javax.mail, + javax.mail.event, + javax.mail.internet, + javax.mail.search, + javax.mail.util, + javax.management.j2ee, + javax.management.j2ee.statistics, + javax.persistence, + javax.persistence.spi, + javax.resource, + javax.resource.cci, + javax.resource.spi, + javax.resource.spi.endpoint, + javax.resource.spi.security, + javax.resource.spi.work, + javax.security.jacc, + javax.servlet, + javax.servlet.http, + javax.servlet.jsp, + javax.servlet.jsp.el, + javax.servlet.jsp.jstl.core, + javax.servlet.jsp.jstl.fmt, + javax.servlet.jsp.jstl.sql, + javax.servlet.jsp.jstl.tlv, + javax.servlet.jsp.tagext, + javax.transaction, + javax.transaction.xa, + javax.xml.bind, + javax.xml.bind.annotation, + javax.xml.bind.annotation.adapters, + javax.xml.bind.attachment, + javax.xml.bind.helpers, + javax.xml.bind.util, + javax.xml.registry, + javax.xml.registry.infomodel, + javax.xml.registry.samples, + javax.xml.rpc, + javax.xml.rpc.encoding, + javax.xml.rpc.handler, + javax.xml.rpc.handler.soap, + javax.xml.rpc.holders, + javax.xml.rpc.server, + javax.xml.rpc.soap, + javax.xml.soap, + javax.xml.stream, + javax.xml.stream.events, + javax.xml.stream.util, + javax.xml.ws, + javax.xml.ws.handler, + javax.xml.ws.handler.soap, + javax.xml.ws.http, + javax.xml.ws.soap, + javax.xml.ws.spi, + javax.xml.ws.wsaddressing, + junit.extensions, + junit.framework, + junit.runner, + junit.textui, + metainfo.mesg, + metainfo.org.zkoss.util.media, + metainfo.tld, + metainfo.xel, + metainfo.xml, + metainfo.zk, + net.sf.cglib.asm, + net.sf.cglib.asm.signature, + net.sf.cglib.beans, + net.sf.cglib.core, + net.sf.cglib.proxy, + net.sf.cglib.reflect, + net.sf.cglib.transform, + net.sf.cglib.transform.impl, + net.sf.cglib.util, + org.adempiere.webui, + org.adempiere.webui.acct, + org.adempiere.webui.apps, + org.adempiere.webui.apps.form, + org.adempiere.webui.apps.graph, + org.adempiere.webui.apps.wf, + org.adempiere.webui.component, + org.adempiere.webui.component.test, + org.adempiere.webui.dashboard, + org.adempiere.webui.desktop, + org.adempiere.webui.editor, + org.adempiere.webui.event, + org.adempiere.webui.exception, + org.adempiere.webui.grid, + org.adempiere.webui.install, + org.adempiere.webui.panel, + org.adempiere.webui.part, + org.adempiere.webui.process, + org.adempiere.webui.report, + org.adempiere.webui.session, + org.adempiere.webui.theme, + org.adempiere.webui.util, + org.adempiere.webui.window, + org.apache.html.dom, + org.apache.wml, + org.apache.wml.dom, + org.apache.xerces.dom, + org.apache.xerces.dom.events, + org.apache.xerces.dom3.as, + org.apache.xerces.impl, + org.apache.xerces.impl.dtd, + org.apache.xerces.impl.dtd.models, + org.apache.xerces.impl.dv, + org.apache.xerces.impl.dv.dtd, + org.apache.xerces.impl.dv.util, + org.apache.xerces.impl.dv.xs, + org.apache.xerces.impl.io, + org.apache.xerces.impl.msg, + org.apache.xerces.impl.validation, + org.apache.xerces.impl.xpath, + org.apache.xerces.impl.xpath.regex, + org.apache.xerces.impl.xs, + org.apache.xerces.impl.xs.identity, + org.apache.xerces.impl.xs.models, + org.apache.xerces.impl.xs.opti, + org.apache.xerces.impl.xs.traversers, + org.apache.xerces.impl.xs.util, + org.apache.xerces.jaxp, + org.apache.xerces.jaxp.datatype, + org.apache.xerces.jaxp.validation, + org.apache.xerces.parsers, + org.apache.xerces.util, + org.apache.xerces.xinclude, + org.apache.xerces.xni, + org.apache.xerces.xni.grammars, + org.apache.xerces.xni.parser, + org.apache.xerces.xpointer, + org.apache.xerces.xs, + org.apache.xerces.xs.datatypes, + org.apache.xml.serialize, + org.jfree, + org.jfree.base, + org.jfree.base.config, + org.jfree.base.log, + org.jfree.base.modules, + org.jfree.chart, + org.jfree.chart.annotations, + org.jfree.chart.axis, + org.jfree.chart.block, + org.jfree.chart.demo, + org.jfree.chart.editor, + org.jfree.chart.encoders, + org.jfree.chart.entity, + org.jfree.chart.event, + org.jfree.chart.imagemap, + org.jfree.chart.labels, + org.jfree.chart.needle, + org.jfree.chart.plot, + org.jfree.chart.plot.dial, + org.jfree.chart.renderer, + org.jfree.chart.renderer.category, + org.jfree.chart.renderer.xy, + org.jfree.chart.resources, + org.jfree.chart.servlet, + org.jfree.chart.title, + org.jfree.chart.urls, + org.jfree.chart.util, + org.jfree.data, + org.jfree.data.category, + org.jfree.data.contour, + org.jfree.data.function, + org.jfree.data.gantt, + org.jfree.data.general, + org.jfree.data.io, + org.jfree.data.jdbc, + org.jfree.data.resources, + org.jfree.data.statistics, + org.jfree.data.time, + org.jfree.data.time.ohlc, + org.jfree.data.xml, + org.jfree.data.xy, + org.jfree.date, + org.jfree.io, + org.jfree.layout, + org.jfree.resources, + org.jfree.text, + org.jfree.threads, + org.jfree.ui, + org.jfree.ui.about, + org.jfree.ui.about.resources, + org.jfree.ui.action, + org.jfree.ui.tabbedui, + org.jfree.util, + org.junit, + org.junit.internal, + org.junit.internal.requests, + org.junit.internal.runners, + org.junit.runner, + org.junit.runner.manipulation, + org.junit.runner.notification, + org.junit.runners, + org.w3c.dom.html, + org.zkforge.fckez, + org.zkforge.fckez.connector, + org.zkforge.fckez.uploader, + org.zkforge.json.simple, + org.zkforge.json.simple.parser, + org.zkforge.keylistener, + org.zkforge.timeline, + org.zkforge.timeline.data, + org.zkforge.timeline.decorator, + org.zkforge.timeline.event, + org.zkforge.timeline.impl, + org.zkforge.timeline.util, + org.zkoss, + org.zkoss.idom, + org.zkoss.idom.impl, + org.zkoss.idom.input, + org.zkoss.idom.transform, + org.zkoss.idom.util, + org.zkoss.image, + org.zkoss.image.encoder, + org.zkoss.io, + org.zkoss.lang, + org.zkoss.lang.reflect, + org.zkoss.math, + org.zkoss.mesg, + org.zkoss.net, + org.zkoss.sound, + org.zkoss.text, + org.zkoss.util, + org.zkoss.util.logging, + org.zkoss.util.media, + org.zkoss.util.resource, + org.zkoss.util.resource.impl, + org.zkoss.web, + org.zkoss.web.fn, + org.zkoss.web.init, + org.zkoss.web.mesg, + org.zkoss.web.portlet, + org.zkoss.web.servlet, + org.zkoss.web.servlet.dsp, + org.zkoss.web.servlet.dsp.action, + org.zkoss.web.servlet.dsp.action.html, + org.zkoss.web.servlet.dsp.impl, + org.zkoss.web.servlet.http, + org.zkoss.web.servlet.xel, + org.zkoss.web.util.resource, + org.zkoss.xel, + org.zkoss.xel.el, + org.zkoss.xel.fn, + org.zkoss.xel.taglib, + org.zkoss.xel.util, + org.zkoss.xml, + org.zkoss.zhtml, + org.zkoss.zhtml.impl, + org.zkoss.zk, + org.zkoss.zk.au, + org.zkoss.zk.au.http, + org.zkoss.zk.au.impl, + org.zkoss.zk.au.in, + org.zkoss.zk.au.out, + org.zkoss.zk.device, + org.zkoss.zk.fn, + org.zkoss.zk.mesg, + org.zkoss.zk.scripting, + org.zkoss.zk.scripting.bsh, + org.zkoss.zk.scripting.util, + org.zkoss.zk.ui, + org.zkoss.zk.ui.api, + org.zkoss.zk.ui.event, + org.zkoss.zk.ui.ext, + org.zkoss.zk.ui.ext.client, + org.zkoss.zk.ui.ext.render, + org.zkoss.zk.ui.http, + org.zkoss.zk.ui.impl, + org.zkoss.zk.ui.metainfo, + org.zkoss.zk.ui.metainfo.impl, + org.zkoss.zk.ui.render, + org.zkoss.zk.ui.sys, + org.zkoss.zk.ui.util, + org.zkoss.zk.xel, + org.zkoss.zk.xel.impl, + org.zkoss.zkex, + org.zkoss.zkex.ui.impl, + org.zkoss.zkex.zul, + org.zkoss.zkex.zul.api, + org.zkoss.zkex.zul.impl, + org.zkoss.zkmax, + org.zkoss.zkmax.au.http, + org.zkoss.zkmax.au.in, + org.zkoss.zkmax.event, + org.zkoss.zkmax.init, + org.zkoss.zkmax.scripting.groovy, + org.zkoss.zkmax.scripting.jruby, + org.zkoss.zkmax.scripting.jython, + org.zkoss.zkmax.scripting.rhino, + org.zkoss.zkmax.ui.comet, + org.zkoss.zkmax.ui.eq, + org.zkoss.zkmax.xel.el, + org.zkoss.zkmax.xel.el21, + org.zkoss.zkmax.xel.mvel, + org.zkoss.zkmax.xel.ognl, + org.zkoss.zkmax.xel.util, + org.zkoss.zkmax.zul, + org.zkoss.zkmax.zul.api, + org.zkoss.zkmax.zul.render, + org.zkoss.zkplus, + org.zkoss.zkplus.acegi, + org.zkoss.zkplus.databind, + org.zkoss.zkplus.hibernate, + org.zkoss.zkplus.jndi, + org.zkoss.zkplus.jpa, + org.zkoss.zkplus.seasar, + org.zkoss.zkplus.spring, + org.zkoss.zkplus.util, + org.zkoss.zul, + org.zkoss.zul.api, + org.zkoss.zul.au.in, + org.zkoss.zul.au.out, + org.zkoss.zul.event, + org.zkoss.zul.ext, + org.zkoss.zul.fn, + org.zkoss.zul.impl, + org.zkoss.zul.impl.api, + org.zkoss.zul.mesg, + web, + web.aud, + web.dsp.action.html, + web.fckez, + web.html, + web.img, + web.js.ext.FCKeditor, + web.js.ext.FCKeditor.editor, + web.js.ext.FCKeditor.editor.css, + web.js.ext.FCKeditor.editor.css.behaviors, + web.js.ext.FCKeditor.editor.css.images, + web.js.ext.FCKeditor.editor.dialog, + web.js.ext.FCKeditor.editor.dialog.common, + web.js.ext.FCKeditor.editor.dialog.common.images, + web.js.ext.FCKeditor.editor.dialog.fck_about, + web.js.ext.FCKeditor.editor.dialog.fck_about.sponsors, + web.js.ext.FCKeditor.editor.dialog.fck_docprops, + web.js.ext.FCKeditor.editor.dialog.fck_flash, + web.js.ext.FCKeditor.editor.dialog.fck_image, + web.js.ext.FCKeditor.editor.dialog.fck_link, + web.js.ext.FCKeditor.editor.dialog.fck_select, + web.js.ext.FCKeditor.editor.dialog.fck_spellerpages.spellerpages, + web.js.ext.FCKeditor.editor.dialog.fck_template.images, + web.js.ext.FCKeditor.editor.dtd, + web.js.ext.FCKeditor.editor.filemanager.browser, + web.js.ext.FCKeditor.editor.filemanager.connectors, + web.js.ext.FCKeditor.editor.filemanager.connectors.asp, + web.js.ext.FCKeditor.editor.filemanager.connectors.aspx, + web.js.ext.FCKeditor.editor.filemanager.connectors.cfm, + web.js.ext.FCKeditor.editor.filemanager.connectors.lasso, + web.js.ext.FCKeditor.editor.filemanager.connectors.perl, + web.js.ext.FCKeditor.editor.filemanager.connectors.php, + web.js.ext.FCKeditor.editor.filemanager.connectors.py, + web.js.ext.FCKeditor.editor.images, + web.js.ext.FCKeditor.editor.images.smiley.msn, + web.js.ext.FCKeditor.editor.js, + web.js.ext.FCKeditor.editor.lang, + web.js.ext.FCKeditor.editor.plugins.autogrow, + web.js.ext.FCKeditor.editor.plugins.bbcode, + web.js.ext.FCKeditor.editor.plugins.bbcode._sample, + web.js.ext.FCKeditor.editor.plugins.dragresizetable, + web.js.ext.FCKeditor.editor.plugins.placeholder, + web.js.ext.FCKeditor.editor.plugins.placeholder.lang, + web.js.ext.FCKeditor.editor.plugins.simplecommands, + web.js.ext.FCKeditor.editor.plugins.tablecommands, + web.js.ext.FCKeditor.editor.skins, + web.js.ext.FCKeditor.editor.skins.office2003, + web.js.ext.FCKeditor.editor.skins.office2003.images, + web.js.ext.FCKeditor.editor.skins.silver, + web.js.ext.FCKeditor.editor.skins.silver.images, + web.js.ext.aculo, + web.js.ext.prototype, + web.js.ext.timeline.api, + web.js.ext.timeline.api.ext.geochrono, + web.js.ext.timeline.api.ext.geochrono.scripts, + web.js.ext.timeline.api.ext.geochrono.scripts.l10n.en, + web.js.ext.timeline.api.ext.planning, + web.js.ext.timeline.api.ext.planning.scripts, + web.js.ext.timeline.api.ext.planning.scripts.l10n.en, + web.js.ext.timeline.api.images, + web.js.ext.timeline.api.scripts, + web.js.ext.timeline.api.scripts.ext, + web.js.ext.timeline.api.scripts.l10n.cs, + web.js.ext.timeline.api.scripts.l10n.de, + web.js.ext.timeline.api.scripts.l10n.en, + web.js.ext.timeline.api.scripts.l10n.es, + web.js.ext.timeline.api.scripts.l10n.fr, + web.js.ext.timeline.api.scripts.l10n.it, + web.js.ext.timeline.api.scripts.l10n.ru, + web.js.ext.timeline.api.scripts.l10n.se, + web.js.ext.timeline.api.scripts.l10n.vi, + web.js.ext.timeline.api.scripts.l10n.zh, + web.js.ext.timeline.api.scripts.util, + web.js.ext.timeline.api.styles, + web.js.fckez, + web.js.timelinez, + web.js.zhtml, + web.js.zk, + web.js.zk.html, + web.js.zk.html.lang, + web.js.zkex.ui, + web.js.zkex.zul, + web.js.zkmax.ui, + web.js.zkmax.zul, + web.js.zul, + web.js.zul.lang, + web.timeline, + web.zhtml, + web.zk, + web.zk.img, + web.zkex.zul.css, + web.zkex.zul.html, + web.zkex.zul.img.layout, + web.zkmax.zul.css, + web.zul.css, + web.zul.css.cmps, + web.zul.html, + web.zul.img, + web.zul.img.button, + web.zul.img.cal, + web.zul.img.common, + web.zul.img.grid, + web.zul.img.groupbox, + web.zul.img.menu, + web.zul.img.misc, + web.zul.img.msgbox, + web.zul.img.paging, + web.zul.img.popup, + web.zul.img.slider, + web.zul.img.sort, + web.zul.img.splt, + web.zul.img.tab, + web.zul.img.tree, + web.zul.img.vd, + web.zul.img.wnd +Eclipse-RegisterBuddy: org.adempiere.tools +Require-Bundle: org.eclipse.equinox.http.registry;bundle-version="1.0.0";resolution:=optional, + org.eclipse.osgi.services;bundle-version="3.1.100", + org.eclipse.core.runtime;bundle-version="3.5.0", + org.adempiere.client;bundle-version="0.0.0", + JasperReports;bundle-version="1.0.0", + org.adempiere.base;bundle-version="0.0.0", + org.adempiere.tools;bundle-version="0.0.0" +Bundle-Activator: org.adempiere.webui.Activator diff --git a/zkwebui/WEB-INF/src/org/adempiere/webui/Activator.java b/zkwebui/WEB-INF/src/org/adempiere/webui/Activator.java new file mode 100644 index 0000000000..3f8a208d0b --- /dev/null +++ b/zkwebui/WEB-INF/src/org/adempiere/webui/Activator.java @@ -0,0 +1,85 @@ +package org.adempiere.webui; + +import java.util.Arrays; +import java.util.Dictionary; +import java.util.HashMap; +import java.util.Hashtable; +import java.util.List; + +import javax.servlet.ServletConfig; +import javax.servlet.ServletException; + +import org.adempiere.webui.session.WebUIServlet; +import org.eclipse.core.runtime.Plugin; +import org.osgi.framework.BundleContext; +import org.osgi.framework.ServiceReference; +import org.osgi.service.http.HttpContext; +import org.osgi.service.http.HttpService; +import org.osgi.util.tracker.ServiceTracker; +import org.zkoss.zk.au.http.DHtmlUpdateServlet; + +public class Activator extends Plugin { + + private ServiceTracker httpServiceTracker; + + public void start(BundleContext context) throws Exception { + System.out.println("Starting WebUI"); + httpServiceTracker = new HttpServiceTracker(context); + httpServiceTracker.open(); + } + + public void stop(BundleContext context) throws Exception { + System.out.println("Stopping WebUI"); + httpServiceTracker.close(); + httpServiceTracker = null; + } + + private class HttpServiceTracker extends ServiceTracker { + + public HttpServiceTracker(BundleContext context) { + super(context, HttpService.class.getName(), null); + } + + public Object addingService(ServiceReference reference) { + HttpService httpService = (HttpService) context.getService(reference); + System.out.println("Adding zkLoader: "+httpService); + try { +// MappingServlet mapping = new MappingServlet(); + + Hashtable params = new Hashtable(); + params.put("update-uri", "/zkau"); + HttpContext ctx = httpService.createDefaultHttpContext(); + httpService.registerServlet("/*.zul", new WebUIServlet(), params , ctx); //$NON-NLS-1$ + httpService.registerServlet("/*.zhtml", new WebUIServlet(), params , ctx); //$NON-NLS-1$ + + DelegatingServlet updateServlet = new DelegatingServlet(new DHtmlUpdateServlet()) { + private ServletConfig cfg; + @Override + public void init(ServletConfig config) + throws ServletException { + super.init(config); + cfg = config; + } + @Override + public ServletConfig getServletConfig() { + return cfg; + } + }; + httpService.registerServlet("/zkau", updateServlet, params , ctx); //$NON-NLS-1$ + + httpService.registerResources("/", "/", ctx); + + System.out.println("zkLoader added: " + httpService.toString()); + } catch (Exception e) { + e.printStackTrace(); + } + return httpService; + } + + public void removedService(ServiceReference reference, Object service) { + HttpService httpService = (HttpService) service; + httpService.unregister("/"); //$NON-NLS-1$ + super.removedService(reference, service); + } + } +} diff --git a/zkwebui/WEB-INF/src/org/adempiere/webui/DelegatingServlet.java b/zkwebui/WEB-INF/src/org/adempiere/webui/DelegatingServlet.java new file mode 100644 index 0000000000..5c1c3d1bbf --- /dev/null +++ b/zkwebui/WEB-INF/src/org/adempiere/webui/DelegatingServlet.java @@ -0,0 +1,82 @@ +package org.adempiere.webui; + +import java.io.IOException; +import java.util.Enumeration; + +import javax.servlet.GenericServlet; +import javax.servlet.ServletConfig; +import javax.servlet.ServletContext; +import javax.servlet.ServletException; +import javax.servlet.ServletRequest; +import javax.servlet.ServletResponse; +import javax.servlet.http.HttpServlet; + +public class DelegatingServlet extends HttpServlet { + + private final HttpServlet delegate; + + public DelegatingServlet(HttpServlet delegate) { + this.delegate = delegate; + } + + public void destroy() { + delegate.destroy(); + } + + public boolean equals(Object obj) { + return delegate.equals(obj); + } + + public String getInitParameter(String name) { + return delegate.getInitParameter(name); + } + + public Enumeration getInitParameterNames() { + return delegate.getInitParameterNames(); + } + + public ServletConfig getServletConfig() { + return delegate.getServletConfig(); + } + + public ServletContext getServletContext() { + return delegate.getServletContext(); + } + + public String getServletInfo() { + return delegate.getServletInfo(); + } + + public String getServletName() { + return delegate.getServletName(); + } + + public int hashCode() { + return delegate.hashCode(); + } + + public void init() throws ServletException { + delegate.init(); + } + + public void init(ServletConfig config) throws ServletException { + delegate.init(config); + } + + public void log(String message, Throwable t) { + delegate.log(message, t); + } + + public void log(String msg) { + delegate.log(msg); + } + + public void service(ServletRequest arg0, ServletResponse arg1) + throws ServletException, IOException { + delegate.service(arg0, arg1); + } + + public String toString() { + return delegate.toString(); + } +} diff --git a/zkwebui/WEB-INF/src/org/adempiere/webui/session/WebUIServlet.java b/zkwebui/WEB-INF/src/org/adempiere/webui/session/WebUIServlet.java index bd256cff27..7a0b2196b1 100644 --- a/zkwebui/WEB-INF/src/org/adempiere/webui/session/WebUIServlet.java +++ b/zkwebui/WEB-INF/src/org/adempiere/webui/session/WebUIServlet.java @@ -60,10 +60,15 @@ public class WebUIServlet extends DHtmlLayoutServlet logger = CLogger.getCLogger(WebUIServlet.class); } + private ServletConfig servletConfig; + public void init(ServletConfig servletConfig) throws ServletException { super.init(servletConfig); + // HttpBrigde requires config + this.servletConfig = servletConfig; + /** Initialise context for the current thread*/ ServerContext.newInstance(); Env.setContextProvider(new ZkContextProvider()); @@ -118,7 +123,8 @@ public class WebUIServlet extends DHtmlLayoutServlet public ServletConfig getServletConfig() { - return super.getServletConfig(); + return servletConfig; +// return super.getServletConfig(); } public String getServletInfo() diff --git a/zkwebui/css/PAPanel.css b/zkwebui/WebContent/css/PAPanel.css similarity index 100% rename from zkwebui/css/PAPanel.css rename to zkwebui/WebContent/css/PAPanel.css diff --git a/zkwebui/css/report.css b/zkwebui/WebContent/css/report.css similarity index 100% rename from zkwebui/css/report.css rename to zkwebui/WebContent/css/report.css diff --git a/zkwebui/images/AD10030.png b/zkwebui/WebContent/images/AD10030.png similarity index 100% rename from zkwebui/images/AD10030.png rename to zkwebui/WebContent/images/AD10030.png diff --git a/zkwebui/images/AD10030HR.png b/zkwebui/WebContent/images/AD10030HR.png similarity index 100% rename from zkwebui/images/AD10030HR.png rename to zkwebui/WebContent/images/AD10030HR.png diff --git a/zkwebui/images/AD16.png b/zkwebui/WebContent/images/AD16.png similarity index 100% rename from zkwebui/images/AD16.png rename to zkwebui/WebContent/images/AD16.png diff --git a/zkwebui/images/AD32.png b/zkwebui/WebContent/images/AD32.png similarity index 100% rename from zkwebui/images/AD32.png rename to zkwebui/WebContent/images/AD32.png diff --git a/zkwebui/images/About16.png b/zkwebui/WebContent/images/About16.png similarity index 100% rename from zkwebui/images/About16.png rename to zkwebui/WebContent/images/About16.png diff --git a/zkwebui/images/About24.png b/zkwebui/WebContent/images/About24.png similarity index 100% rename from zkwebui/images/About24.png rename to zkwebui/WebContent/images/About24.png diff --git a/zkwebui/images/Account10.png b/zkwebui/WebContent/images/Account10.png similarity index 100% rename from zkwebui/images/Account10.png rename to zkwebui/WebContent/images/Account10.png diff --git a/zkwebui/images/Account16.png b/zkwebui/WebContent/images/Account16.png similarity index 100% rename from zkwebui/images/Account16.png rename to zkwebui/WebContent/images/Account16.png diff --git a/zkwebui/images/Account24.png b/zkwebui/WebContent/images/Account24.png similarity index 100% rename from zkwebui/images/Account24.png rename to zkwebui/WebContent/images/Account24.png diff --git a/zkwebui/images/AdemPiere150x50.png b/zkwebui/WebContent/images/AdemPiere150x50.png similarity index 100% rename from zkwebui/images/AdemPiere150x50.png rename to zkwebui/WebContent/images/AdemPiere150x50.png diff --git a/zkwebui/images/AdemPiereCom.jpg b/zkwebui/WebContent/images/AdemPiereCom.jpg similarity index 100% rename from zkwebui/images/AdemPiereCom.jpg rename to zkwebui/WebContent/images/AdemPiereCom.jpg diff --git a/zkwebui/images/AdemPiereCom.png b/zkwebui/WebContent/images/AdemPiereCom.png similarity index 100% rename from zkwebui/images/AdemPiereCom.png rename to zkwebui/WebContent/images/AdemPiereCom.png diff --git a/zkwebui/images/AdemPiereComHR.png b/zkwebui/WebContent/images/AdemPiereComHR.png similarity index 100% rename from zkwebui/images/AdemPiereComHR.png rename to zkwebui/WebContent/images/AdemPiereComHR.png diff --git a/zkwebui/images/AdemPiereComx.png b/zkwebui/WebContent/images/AdemPiereComx.png similarity index 100% rename from zkwebui/images/AdemPiereComx.png rename to zkwebui/WebContent/images/AdemPiereComx.png diff --git a/zkwebui/images/Adempiere.jpg b/zkwebui/WebContent/images/Adempiere.jpg similarity index 100% rename from zkwebui/images/Adempiere.jpg rename to zkwebui/WebContent/images/Adempiere.jpg diff --git a/zkwebui/images/Adempiere.png b/zkwebui/WebContent/images/Adempiere.png similarity index 100% rename from zkwebui/images/Adempiere.png rename to zkwebui/WebContent/images/Adempiere.png diff --git a/zkwebui/images/Adempiere120x60.png b/zkwebui/WebContent/images/Adempiere120x60.png similarity index 100% rename from zkwebui/images/Adempiere120x60.png rename to zkwebui/WebContent/images/Adempiere120x60.png diff --git a/zkwebui/images/AdempiereHR.png b/zkwebui/WebContent/images/AdempiereHR.png similarity index 100% rename from zkwebui/images/AdempiereHR.png rename to zkwebui/WebContent/images/AdempiereHR.png diff --git a/zkwebui/images/Adempierex.png b/zkwebui/WebContent/images/Adempierex.png similarity index 100% rename from zkwebui/images/Adempierex.png rename to zkwebui/WebContent/images/Adempierex.png diff --git a/zkwebui/images/Archive16.png b/zkwebui/WebContent/images/Archive16.png similarity index 100% rename from zkwebui/images/Archive16.png rename to zkwebui/WebContent/images/Archive16.png diff --git a/zkwebui/images/Archive24.png b/zkwebui/WebContent/images/Archive24.png similarity index 100% rename from zkwebui/images/Archive24.png rename to zkwebui/WebContent/images/Archive24.png diff --git a/zkwebui/images/Assignment10.png b/zkwebui/WebContent/images/Assignment10.png similarity index 100% rename from zkwebui/images/Assignment10.png rename to zkwebui/WebContent/images/Assignment10.png diff --git a/zkwebui/images/Assignment16.png b/zkwebui/WebContent/images/Assignment16.png similarity index 100% rename from zkwebui/images/Assignment16.png rename to zkwebui/WebContent/images/Assignment16.png diff --git a/zkwebui/images/Assignment24.png b/zkwebui/WebContent/images/Assignment24.png similarity index 100% rename from zkwebui/images/Assignment24.png rename to zkwebui/WebContent/images/Assignment24.png diff --git a/zkwebui/images/Attachment16.png b/zkwebui/WebContent/images/Attachment16.png similarity index 100% rename from zkwebui/images/Attachment16.png rename to zkwebui/WebContent/images/Attachment16.png diff --git a/zkwebui/images/Attachment24.png b/zkwebui/WebContent/images/Attachment24.png similarity index 100% rename from zkwebui/images/Attachment24.png rename to zkwebui/WebContent/images/Attachment24.png diff --git a/zkwebui/images/Attachment24D.png b/zkwebui/WebContent/images/Attachment24D.png similarity index 100% rename from zkwebui/images/Attachment24D.png rename to zkwebui/WebContent/images/Attachment24D.png diff --git a/zkwebui/images/AttachmentX16.png b/zkwebui/WebContent/images/AttachmentX16.png similarity index 100% rename from zkwebui/images/AttachmentX16.png rename to zkwebui/WebContent/images/AttachmentX16.png diff --git a/zkwebui/images/AttachmentX24.png b/zkwebui/WebContent/images/AttachmentX24.png similarity index 100% rename from zkwebui/images/AttachmentX24.png rename to zkwebui/WebContent/images/AttachmentX24.png diff --git a/zkwebui/images/BPartner10.png b/zkwebui/WebContent/images/BPartner10.png similarity index 100% rename from zkwebui/images/BPartner10.png rename to zkwebui/WebContent/images/BPartner10.png diff --git a/zkwebui/images/BPartner16.png b/zkwebui/WebContent/images/BPartner16.png similarity index 100% rename from zkwebui/images/BPartner16.png rename to zkwebui/WebContent/images/BPartner16.png diff --git a/zkwebui/images/BPartner24.png b/zkwebui/WebContent/images/BPartner24.png similarity index 100% rename from zkwebui/images/BPartner24.png rename to zkwebui/WebContent/images/BPartner24.png diff --git a/zkwebui/images/Bold16.png b/zkwebui/WebContent/images/Bold16.png similarity index 100% rename from zkwebui/images/Bold16.png rename to zkwebui/WebContent/images/Bold16.png diff --git a/zkwebui/images/C10030.jpg b/zkwebui/WebContent/images/C10030.jpg similarity index 100% rename from zkwebui/images/C10030.jpg rename to zkwebui/WebContent/images/C10030.jpg diff --git a/zkwebui/images/C10030.png b/zkwebui/WebContent/images/C10030.png similarity index 100% rename from zkwebui/images/C10030.png rename to zkwebui/WebContent/images/C10030.png diff --git a/zkwebui/images/C10030HR.png b/zkwebui/WebContent/images/C10030HR.png similarity index 100% rename from zkwebui/images/C10030HR.png rename to zkwebui/WebContent/images/C10030HR.png diff --git a/zkwebui/images/C10030x.png b/zkwebui/WebContent/images/C10030x.png similarity index 100% rename from zkwebui/images/C10030x.png rename to zkwebui/WebContent/images/C10030x.png diff --git a/zkwebui/images/C10030xHR.png b/zkwebui/WebContent/images/C10030xHR.png similarity index 100% rename from zkwebui/images/C10030xHR.png rename to zkwebui/WebContent/images/C10030xHR.png diff --git a/zkwebui/images/C16.png b/zkwebui/WebContent/images/C16.png similarity index 100% rename from zkwebui/images/C16.png rename to zkwebui/WebContent/images/C16.png diff --git a/zkwebui/images/C32.png b/zkwebui/WebContent/images/C32.png similarity index 100% rename from zkwebui/images/C32.png rename to zkwebui/WebContent/images/C32.png diff --git a/zkwebui/images/Calculator10.png b/zkwebui/WebContent/images/Calculator10.png similarity index 100% rename from zkwebui/images/Calculator10.png rename to zkwebui/WebContent/images/Calculator10.png diff --git a/zkwebui/images/Calculator16.png b/zkwebui/WebContent/images/Calculator16.png similarity index 100% rename from zkwebui/images/Calculator16.png rename to zkwebui/WebContent/images/Calculator16.png diff --git a/zkwebui/images/Calculator24.png b/zkwebui/WebContent/images/Calculator24.png similarity index 100% rename from zkwebui/images/Calculator24.png rename to zkwebui/WebContent/images/Calculator24.png diff --git a/zkwebui/images/Calendar10.png b/zkwebui/WebContent/images/Calendar10.png similarity index 100% rename from zkwebui/images/Calendar10.png rename to zkwebui/WebContent/images/Calendar10.png diff --git a/zkwebui/images/Calendar16.png b/zkwebui/WebContent/images/Calendar16.png similarity index 100% rename from zkwebui/images/Calendar16.png rename to zkwebui/WebContent/images/Calendar16.png diff --git a/zkwebui/images/Calendar24.png b/zkwebui/WebContent/images/Calendar24.png similarity index 100% rename from zkwebui/images/Calendar24.png rename to zkwebui/WebContent/images/Calendar24.png diff --git a/zkwebui/images/Cancel10.png b/zkwebui/WebContent/images/Cancel10.png similarity index 100% rename from zkwebui/images/Cancel10.png rename to zkwebui/WebContent/images/Cancel10.png diff --git a/zkwebui/images/Cancel16.png b/zkwebui/WebContent/images/Cancel16.png similarity index 100% rename from zkwebui/images/Cancel16.png rename to zkwebui/WebContent/images/Cancel16.png diff --git a/zkwebui/images/Cancel24.png b/zkwebui/WebContent/images/Cancel24.png similarity index 100% rename from zkwebui/images/Cancel24.png rename to zkwebui/WebContent/images/Cancel24.png diff --git a/zkwebui/images/ChangeLog16.png b/zkwebui/WebContent/images/ChangeLog16.png similarity index 100% rename from zkwebui/images/ChangeLog16.png rename to zkwebui/WebContent/images/ChangeLog16.png diff --git a/zkwebui/images/Chat16.png b/zkwebui/WebContent/images/Chat16.png similarity index 100% rename from zkwebui/images/Chat16.png rename to zkwebui/WebContent/images/Chat16.png diff --git a/zkwebui/images/Chat24.png b/zkwebui/WebContent/images/Chat24.png similarity index 100% rename from zkwebui/images/Chat24.png rename to zkwebui/WebContent/images/Chat24.png diff --git a/zkwebui/images/ChatX16.png b/zkwebui/WebContent/images/ChatX16.png similarity index 100% rename from zkwebui/images/ChatX16.png rename to zkwebui/WebContent/images/ChatX16.png diff --git a/zkwebui/images/ChatX24.png b/zkwebui/WebContent/images/ChatX24.png similarity index 100% rename from zkwebui/images/ChatX24.png rename to zkwebui/WebContent/images/ChatX24.png diff --git a/zkwebui/images/ComPiereCom.jpg b/zkwebui/WebContent/images/ComPiereCom.jpg similarity index 100% rename from zkwebui/images/ComPiereCom.jpg rename to zkwebui/WebContent/images/ComPiereCom.jpg diff --git a/zkwebui/images/ComPiereCom.png b/zkwebui/WebContent/images/ComPiereCom.png similarity index 100% rename from zkwebui/images/ComPiereCom.png rename to zkwebui/WebContent/images/ComPiereCom.png diff --git a/zkwebui/images/ComPiereComHR.png b/zkwebui/WebContent/images/ComPiereComHR.png similarity index 100% rename from zkwebui/images/ComPiereComHR.png rename to zkwebui/WebContent/images/ComPiereComHR.png diff --git a/zkwebui/images/ComPiereComx.png b/zkwebui/WebContent/images/ComPiereComx.png similarity index 100% rename from zkwebui/images/ComPiereComx.png rename to zkwebui/WebContent/images/ComPiereComx.png diff --git a/zkwebui/images/Compiere.jpg b/zkwebui/WebContent/images/Compiere.jpg similarity index 100% rename from zkwebui/images/Compiere.jpg rename to zkwebui/WebContent/images/Compiere.jpg diff --git a/zkwebui/images/Compiere.png b/zkwebui/WebContent/images/Compiere.png similarity index 100% rename from zkwebui/images/Compiere.png rename to zkwebui/WebContent/images/Compiere.png diff --git a/zkwebui/images/CompiereHR.png b/zkwebui/WebContent/images/CompiereHR.png similarity index 100% rename from zkwebui/images/CompiereHR.png rename to zkwebui/WebContent/images/CompiereHR.png diff --git a/zkwebui/images/Compierex.png b/zkwebui/WebContent/images/Compierex.png similarity index 100% rename from zkwebui/images/Compierex.png rename to zkwebui/WebContent/images/Compierex.png diff --git a/zkwebui/images/Copy16.png b/zkwebui/WebContent/images/Copy16.png similarity index 100% rename from zkwebui/images/Copy16.png rename to zkwebui/WebContent/images/Copy16.png diff --git a/zkwebui/images/Copy24.png b/zkwebui/WebContent/images/Copy24.png similarity index 100% rename from zkwebui/images/Copy24.png rename to zkwebui/WebContent/images/Copy24.png diff --git a/zkwebui/images/Customize16.png b/zkwebui/WebContent/images/Customize16.png similarity index 100% rename from zkwebui/images/Customize16.png rename to zkwebui/WebContent/images/Customize16.png diff --git a/zkwebui/images/Customize24.png b/zkwebui/WebContent/images/Customize24.png similarity index 100% rename from zkwebui/images/Customize24.png rename to zkwebui/WebContent/images/Customize24.png diff --git a/zkwebui/images/Delete16.png b/zkwebui/WebContent/images/Delete16.png similarity index 100% rename from zkwebui/images/Delete16.png rename to zkwebui/WebContent/images/Delete16.png diff --git a/zkwebui/images/Delete24.png b/zkwebui/WebContent/images/Delete24.png similarity index 100% rename from zkwebui/images/Delete24.png rename to zkwebui/WebContent/images/Delete24.png diff --git a/zkwebui/images/DeleteSelection16.png b/zkwebui/WebContent/images/DeleteSelection16.png similarity index 100% rename from zkwebui/images/DeleteSelection16.png rename to zkwebui/WebContent/images/DeleteSelection16.png diff --git a/zkwebui/images/DeleteSelection24.png b/zkwebui/WebContent/images/DeleteSelection24.png similarity index 100% rename from zkwebui/images/DeleteSelection24.png rename to zkwebui/WebContent/images/DeleteSelection24.png diff --git a/zkwebui/images/Detail16.png b/zkwebui/WebContent/images/Detail16.png similarity index 100% rename from zkwebui/images/Detail16.png rename to zkwebui/WebContent/images/Detail16.png diff --git a/zkwebui/images/Detail24.png b/zkwebui/WebContent/images/Detail24.png similarity index 100% rename from zkwebui/images/Detail24.png rename to zkwebui/WebContent/images/Detail24.png diff --git a/zkwebui/images/EMailSupport16.png b/zkwebui/WebContent/images/EMailSupport16.png similarity index 100% rename from zkwebui/images/EMailSupport16.png rename to zkwebui/WebContent/images/EMailSupport16.png diff --git a/zkwebui/images/EMailSupport24.png b/zkwebui/WebContent/images/EMailSupport24.png similarity index 100% rename from zkwebui/images/EMailSupport24.png rename to zkwebui/WebContent/images/EMailSupport24.png diff --git a/zkwebui/images/Edit16.png b/zkwebui/WebContent/images/Edit16.png similarity index 100% rename from zkwebui/images/Edit16.png rename to zkwebui/WebContent/images/Edit16.png diff --git a/zkwebui/images/Edit24.png b/zkwebui/WebContent/images/Edit24.png similarity index 100% rename from zkwebui/images/Edit24.png rename to zkwebui/WebContent/images/Edit24.png diff --git a/zkwebui/images/Editor16.png b/zkwebui/WebContent/images/Editor16.png similarity index 100% rename from zkwebui/images/Editor16.png rename to zkwebui/WebContent/images/Editor16.png diff --git a/zkwebui/images/Editor24.png b/zkwebui/WebContent/images/Editor24.png similarity index 100% rename from zkwebui/images/Editor24.png rename to zkwebui/WebContent/images/Editor24.png diff --git a/zkwebui/images/End16.png b/zkwebui/WebContent/images/End16.png similarity index 100% rename from zkwebui/images/End16.png rename to zkwebui/WebContent/images/End16.png diff --git a/zkwebui/images/End24.png b/zkwebui/WebContent/images/End24.png similarity index 100% rename from zkwebui/images/End24.png rename to zkwebui/WebContent/images/End24.png diff --git a/zkwebui/images/Error32.png b/zkwebui/WebContent/images/Error32.png similarity index 100% rename from zkwebui/images/Error32.png rename to zkwebui/WebContent/images/Error32.png diff --git a/zkwebui/images/Exit16.png b/zkwebui/WebContent/images/Exit16.png similarity index 100% rename from zkwebui/images/Exit16.png rename to zkwebui/WebContent/images/Exit16.png diff --git a/zkwebui/images/Exit24.png b/zkwebui/WebContent/images/Exit24.png similarity index 100% rename from zkwebui/images/Exit24.png rename to zkwebui/WebContent/images/Exit24.png diff --git a/zkwebui/images/Export16.png b/zkwebui/WebContent/images/Export16.png similarity index 100% rename from zkwebui/images/Export16.png rename to zkwebui/WebContent/images/Export16.png diff --git a/zkwebui/images/Export16X.png b/zkwebui/WebContent/images/Export16X.png similarity index 100% rename from zkwebui/images/Export16X.png rename to zkwebui/WebContent/images/Export16X.png diff --git a/zkwebui/images/Export24.png b/zkwebui/WebContent/images/Export24.png similarity index 100% rename from zkwebui/images/Export24.png rename to zkwebui/WebContent/images/Export24.png diff --git a/zkwebui/images/Export24X.png b/zkwebui/WebContent/images/Export24X.png similarity index 100% rename from zkwebui/images/Export24X.png rename to zkwebui/WebContent/images/Export24X.png diff --git a/zkwebui/images/ExportX16.png b/zkwebui/WebContent/images/ExportX16.png similarity index 100% rename from zkwebui/images/ExportX16.png rename to zkwebui/WebContent/images/ExportX16.png diff --git a/zkwebui/images/ExportX24.png b/zkwebui/WebContent/images/ExportX24.png similarity index 100% rename from zkwebui/images/ExportX24.png rename to zkwebui/WebContent/images/ExportX24.png diff --git a/zkwebui/images/FastBack24.png b/zkwebui/WebContent/images/FastBack24.png similarity index 100% rename from zkwebui/images/FastBack24.png rename to zkwebui/WebContent/images/FastBack24.png diff --git a/zkwebui/images/FastForward24.png b/zkwebui/WebContent/images/FastForward24.png similarity index 100% rename from zkwebui/images/FastForward24.png rename to zkwebui/WebContent/images/FastForward24.png diff --git a/zkwebui/images/Find16.png b/zkwebui/WebContent/images/Find16.png similarity index 100% rename from zkwebui/images/Find16.png rename to zkwebui/WebContent/images/Find16.png diff --git a/zkwebui/images/Find24.png b/zkwebui/WebContent/images/Find24.png similarity index 100% rename from zkwebui/images/Find24.png rename to zkwebui/WebContent/images/Find24.png diff --git a/zkwebui/images/FindX16.png b/zkwebui/WebContent/images/FindX16.png similarity index 100% rename from zkwebui/images/FindX16.png rename to zkwebui/WebContent/images/FindX16.png diff --git a/zkwebui/images/FindX24.png b/zkwebui/WebContent/images/FindX24.png similarity index 100% rename from zkwebui/images/FindX24.png rename to zkwebui/WebContent/images/FindX24.png diff --git a/zkwebui/images/First16.png b/zkwebui/WebContent/images/First16.png similarity index 100% rename from zkwebui/images/First16.png rename to zkwebui/WebContent/images/First16.png diff --git a/zkwebui/images/First24.png b/zkwebui/WebContent/images/First24.png similarity index 100% rename from zkwebui/images/First24.png rename to zkwebui/WebContent/images/First24.png diff --git a/zkwebui/images/First24D.png b/zkwebui/WebContent/images/First24D.png similarity index 100% rename from zkwebui/images/First24D.png rename to zkwebui/WebContent/images/First24D.png diff --git a/zkwebui/images/Folder16.png b/zkwebui/WebContent/images/Folder16.png similarity index 100% rename from zkwebui/images/Folder16.png rename to zkwebui/WebContent/images/Folder16.png diff --git a/zkwebui/images/Folder24.png b/zkwebui/WebContent/images/Folder24.png similarity index 100% rename from zkwebui/images/Folder24.png rename to zkwebui/WebContent/images/Folder24.png diff --git a/zkwebui/images/GetMail16.png b/zkwebui/WebContent/images/GetMail16.png similarity index 100% rename from zkwebui/images/GetMail16.png rename to zkwebui/WebContent/images/GetMail16.png diff --git a/zkwebui/images/GetMail24.png b/zkwebui/WebContent/images/GetMail24.png similarity index 100% rename from zkwebui/images/GetMail24.png rename to zkwebui/WebContent/images/GetMail24.png diff --git a/zkwebui/images/Help16.png b/zkwebui/WebContent/images/Help16.png similarity index 100% rename from zkwebui/images/Help16.png rename to zkwebui/WebContent/images/Help16.png diff --git a/zkwebui/images/Help24.png b/zkwebui/WebContent/images/Help24.png similarity index 100% rename from zkwebui/images/Help24.png rename to zkwebui/WebContent/images/Help24.png diff --git a/zkwebui/images/History16.png b/zkwebui/WebContent/images/History16.png similarity index 100% rename from zkwebui/images/History16.png rename to zkwebui/WebContent/images/History16.png diff --git a/zkwebui/images/History24.png b/zkwebui/WebContent/images/History24.png similarity index 100% rename from zkwebui/images/History24.png rename to zkwebui/WebContent/images/History24.png diff --git a/zkwebui/images/History24D.png b/zkwebui/WebContent/images/History24D.png similarity index 100% rename from zkwebui/images/History24D.png rename to zkwebui/WebContent/images/History24D.png diff --git a/zkwebui/images/HistoryX16.png b/zkwebui/WebContent/images/HistoryX16.png similarity index 100% rename from zkwebui/images/HistoryX16.png rename to zkwebui/WebContent/images/HistoryX16.png diff --git a/zkwebui/images/HistoryX24.png b/zkwebui/WebContent/images/HistoryX24.png similarity index 100% rename from zkwebui/images/HistoryX24.png rename to zkwebui/WebContent/images/HistoryX24.png diff --git a/zkwebui/images/Home16.png b/zkwebui/WebContent/images/Home16.png similarity index 100% rename from zkwebui/images/Home16.png rename to zkwebui/WebContent/images/Home16.png diff --git a/zkwebui/images/Home24.png b/zkwebui/WebContent/images/Home24.png similarity index 100% rename from zkwebui/images/Home24.png rename to zkwebui/WebContent/images/Home24.png diff --git a/zkwebui/images/Ignore16.png b/zkwebui/WebContent/images/Ignore16.png similarity index 100% rename from zkwebui/images/Ignore16.png rename to zkwebui/WebContent/images/Ignore16.png diff --git a/zkwebui/images/Ignore24.png b/zkwebui/WebContent/images/Ignore24.png similarity index 100% rename from zkwebui/images/Ignore24.png rename to zkwebui/WebContent/images/Ignore24.png diff --git a/zkwebui/images/Import16.png b/zkwebui/WebContent/images/Import16.png similarity index 100% rename from zkwebui/images/Import16.png rename to zkwebui/WebContent/images/Import16.png diff --git a/zkwebui/images/Import24.png b/zkwebui/WebContent/images/Import24.png similarity index 100% rename from zkwebui/images/Import24.png rename to zkwebui/WebContent/images/Import24.png diff --git a/zkwebui/images/Info16.png b/zkwebui/WebContent/images/Info16.png similarity index 100% rename from zkwebui/images/Info16.png rename to zkwebui/WebContent/images/Info16.png diff --git a/zkwebui/images/Info24.png b/zkwebui/WebContent/images/Info24.png similarity index 100% rename from zkwebui/images/Info24.png rename to zkwebui/WebContent/images/Info24.png diff --git a/zkwebui/images/InfoAccount16.png b/zkwebui/WebContent/images/InfoAccount16.png similarity index 100% rename from zkwebui/images/InfoAccount16.png rename to zkwebui/WebContent/images/InfoAccount16.png diff --git a/zkwebui/images/InfoAccount24.png b/zkwebui/WebContent/images/InfoAccount24.png similarity index 100% rename from zkwebui/images/InfoAccount24.png rename to zkwebui/WebContent/images/InfoAccount24.png diff --git a/zkwebui/images/InfoBPartner16.png b/zkwebui/WebContent/images/InfoBPartner16.png similarity index 100% rename from zkwebui/images/InfoBPartner16.png rename to zkwebui/WebContent/images/InfoBPartner16.png diff --git a/zkwebui/images/InfoBPartner24.png b/zkwebui/WebContent/images/InfoBPartner24.png similarity index 100% rename from zkwebui/images/InfoBPartner24.png rename to zkwebui/WebContent/images/InfoBPartner24.png diff --git a/zkwebui/images/InfoProduct16.png b/zkwebui/WebContent/images/InfoProduct16.png similarity index 100% rename from zkwebui/images/InfoProduct16.png rename to zkwebui/WebContent/images/InfoProduct16.png diff --git a/zkwebui/images/InfoProduct24.png b/zkwebui/WebContent/images/InfoProduct24.png similarity index 100% rename from zkwebui/images/InfoProduct24.png rename to zkwebui/WebContent/images/InfoProduct24.png diff --git a/zkwebui/images/InfoSchedule16.png b/zkwebui/WebContent/images/InfoSchedule16.png similarity index 100% rename from zkwebui/images/InfoSchedule16.png rename to zkwebui/WebContent/images/InfoSchedule16.png diff --git a/zkwebui/images/InfoSchedule24.png b/zkwebui/WebContent/images/InfoSchedule24.png similarity index 100% rename from zkwebui/images/InfoSchedule24.png rename to zkwebui/WebContent/images/InfoSchedule24.png diff --git a/zkwebui/images/Inform32.png b/zkwebui/WebContent/images/Inform32.png similarity index 100% rename from zkwebui/images/Inform32.png rename to zkwebui/WebContent/images/Inform32.png diff --git a/zkwebui/images/Italic16.png b/zkwebui/WebContent/images/Italic16.png similarity index 100% rename from zkwebui/images/Italic16.png rename to zkwebui/WebContent/images/Italic16.png diff --git a/zkwebui/images/Java_logo.png b/zkwebui/WebContent/images/Java_logo.png similarity index 100% rename from zkwebui/images/Java_logo.png rename to zkwebui/WebContent/images/Java_logo.png diff --git a/zkwebui/images/Last16.png b/zkwebui/WebContent/images/Last16.png similarity index 100% rename from zkwebui/images/Last16.png rename to zkwebui/WebContent/images/Last16.png diff --git a/zkwebui/images/Last24.png b/zkwebui/WebContent/images/Last24.png similarity index 100% rename from zkwebui/images/Last24.png rename to zkwebui/WebContent/images/Last24.png diff --git a/zkwebui/images/Last24D.png b/zkwebui/WebContent/images/Last24D.png similarity index 100% rename from zkwebui/images/Last24D.png rename to zkwebui/WebContent/images/Last24D.png diff --git a/zkwebui/images/Location10.png b/zkwebui/WebContent/images/Location10.png similarity index 100% rename from zkwebui/images/Location10.png rename to zkwebui/WebContent/images/Location10.png diff --git a/zkwebui/images/Locator10.png b/zkwebui/WebContent/images/Locator10.png similarity index 100% rename from zkwebui/images/Locator10.png rename to zkwebui/WebContent/images/Locator10.png diff --git a/zkwebui/images/Lock16.png b/zkwebui/WebContent/images/Lock16.png similarity index 100% rename from zkwebui/images/Lock16.png rename to zkwebui/WebContent/images/Lock16.png diff --git a/zkwebui/images/Lock24.png b/zkwebui/WebContent/images/Lock24.png similarity index 100% rename from zkwebui/images/Lock24.png rename to zkwebui/WebContent/images/Lock24.png diff --git a/zkwebui/images/LockX16.png b/zkwebui/WebContent/images/LockX16.png similarity index 100% rename from zkwebui/images/LockX16.png rename to zkwebui/WebContent/images/LockX16.png diff --git a/zkwebui/images/LockX24.png b/zkwebui/WebContent/images/LockX24.png similarity index 100% rename from zkwebui/images/LockX24.png rename to zkwebui/WebContent/images/LockX24.png diff --git a/zkwebui/images/Logout16.png b/zkwebui/WebContent/images/Logout16.png similarity index 100% rename from zkwebui/images/Logout16.png rename to zkwebui/WebContent/images/Logout16.png diff --git a/zkwebui/images/Logout24.png b/zkwebui/WebContent/images/Logout24.png similarity index 100% rename from zkwebui/images/Logout24.png rename to zkwebui/WebContent/images/Logout24.png diff --git a/zkwebui/images/Minus16.png b/zkwebui/WebContent/images/Minus16.png similarity index 100% rename from zkwebui/images/Minus16.png rename to zkwebui/WebContent/images/Minus16.png diff --git a/zkwebui/images/Minus24.png b/zkwebui/WebContent/images/Minus24.png similarity index 100% rename from zkwebui/images/Minus24.png rename to zkwebui/WebContent/images/Minus24.png diff --git a/zkwebui/images/Multi16.png b/zkwebui/WebContent/images/Multi16.png similarity index 100% rename from zkwebui/images/Multi16.png rename to zkwebui/WebContent/images/Multi16.png diff --git a/zkwebui/images/Multi24.png b/zkwebui/WebContent/images/Multi24.png similarity index 100% rename from zkwebui/images/Multi24.png rename to zkwebui/WebContent/images/Multi24.png diff --git a/zkwebui/images/MultiX16.png b/zkwebui/WebContent/images/MultiX16.png similarity index 100% rename from zkwebui/images/MultiX16.png rename to zkwebui/WebContent/images/MultiX16.png diff --git a/zkwebui/images/MultiX24.png b/zkwebui/WebContent/images/MultiX24.png similarity index 100% rename from zkwebui/images/MultiX24.png rename to zkwebui/WebContent/images/MultiX24.png diff --git a/zkwebui/images/New16.png b/zkwebui/WebContent/images/New16.png similarity index 100% rename from zkwebui/images/New16.png rename to zkwebui/WebContent/images/New16.png diff --git a/zkwebui/images/New24.png b/zkwebui/WebContent/images/New24.png similarity index 100% rename from zkwebui/images/New24.png rename to zkwebui/WebContent/images/New24.png diff --git a/zkwebui/images/Next16.png b/zkwebui/WebContent/images/Next16.png similarity index 100% rename from zkwebui/images/Next16.png rename to zkwebui/WebContent/images/Next16.png diff --git a/zkwebui/images/Next24.png b/zkwebui/WebContent/images/Next24.png similarity index 100% rename from zkwebui/images/Next24.png rename to zkwebui/WebContent/images/Next24.png diff --git a/zkwebui/images/Next24D.png b/zkwebui/WebContent/images/Next24D.png similarity index 100% rename from zkwebui/images/Next24D.png rename to zkwebui/WebContent/images/Next24D.png diff --git a/zkwebui/images/Normal16.png b/zkwebui/WebContent/images/Normal16.png similarity index 100% rename from zkwebui/images/Normal16.png rename to zkwebui/WebContent/images/Normal16.png diff --git a/zkwebui/images/Ok16.png b/zkwebui/WebContent/images/Ok16.png similarity index 100% rename from zkwebui/images/Ok16.png rename to zkwebui/WebContent/images/Ok16.png diff --git a/zkwebui/images/Ok24.png b/zkwebui/WebContent/images/Ok24.png similarity index 100% rename from zkwebui/images/Ok24.png rename to zkwebui/WebContent/images/Ok24.png diff --git a/zkwebui/images/Online10.png b/zkwebui/WebContent/images/Online10.png similarity index 100% rename from zkwebui/images/Online10.png rename to zkwebui/WebContent/images/Online10.png diff --git a/zkwebui/images/Online16.png b/zkwebui/WebContent/images/Online16.png similarity index 100% rename from zkwebui/images/Online16.png rename to zkwebui/WebContent/images/Online16.png diff --git a/zkwebui/images/Online24.png b/zkwebui/WebContent/images/Online24.png similarity index 100% rename from zkwebui/images/Online24.png rename to zkwebui/WebContent/images/Online24.png diff --git a/zkwebui/images/Open16.png b/zkwebui/WebContent/images/Open16.png similarity index 100% rename from zkwebui/images/Open16.png rename to zkwebui/WebContent/images/Open16.png diff --git a/zkwebui/images/Open24.png b/zkwebui/WebContent/images/Open24.png similarity index 100% rename from zkwebui/images/Open24.png rename to zkwebui/WebContent/images/Open24.png diff --git a/zkwebui/images/PAttribute10.png b/zkwebui/WebContent/images/PAttribute10.png similarity index 100% rename from zkwebui/images/PAttribute10.png rename to zkwebui/WebContent/images/PAttribute10.png diff --git a/zkwebui/images/PAttribute16.png b/zkwebui/WebContent/images/PAttribute16.png similarity index 100% rename from zkwebui/images/PAttribute16.png rename to zkwebui/WebContent/images/PAttribute16.png diff --git a/zkwebui/images/PAttribute24.png b/zkwebui/WebContent/images/PAttribute24.png similarity index 100% rename from zkwebui/images/PAttribute24.png rename to zkwebui/WebContent/images/PAttribute24.png diff --git a/zkwebui/images/PageSetup16.png b/zkwebui/WebContent/images/PageSetup16.png similarity index 100% rename from zkwebui/images/PageSetup16.png rename to zkwebui/WebContent/images/PageSetup16.png diff --git a/zkwebui/images/PageSetup24.png b/zkwebui/WebContent/images/PageSetup24.png similarity index 100% rename from zkwebui/images/PageSetup24.png rename to zkwebui/WebContent/images/PageSetup24.png diff --git a/zkwebui/images/Parent16.png b/zkwebui/WebContent/images/Parent16.png similarity index 100% rename from zkwebui/images/Parent16.png rename to zkwebui/WebContent/images/Parent16.png diff --git a/zkwebui/images/Parent24.png b/zkwebui/WebContent/images/Parent24.png similarity index 100% rename from zkwebui/images/Parent24.png rename to zkwebui/WebContent/images/Parent24.png diff --git a/zkwebui/images/Payment16.png b/zkwebui/WebContent/images/Payment16.png similarity index 100% rename from zkwebui/images/Payment16.png rename to zkwebui/WebContent/images/Payment16.png diff --git a/zkwebui/images/Payment24.png b/zkwebui/WebContent/images/Payment24.png similarity index 100% rename from zkwebui/images/Payment24.png rename to zkwebui/WebContent/images/Payment24.png diff --git a/zkwebui/images/PickOpen10.png b/zkwebui/WebContent/images/PickOpen10.png similarity index 100% rename from zkwebui/images/PickOpen10.png rename to zkwebui/WebContent/images/PickOpen10.png diff --git a/zkwebui/images/Plus16.png b/zkwebui/WebContent/images/Plus16.png similarity index 100% rename from zkwebui/images/Plus16.png rename to zkwebui/WebContent/images/Plus16.png diff --git a/zkwebui/images/Plus24.png b/zkwebui/WebContent/images/Plus24.png similarity index 100% rename from zkwebui/images/Plus24.png rename to zkwebui/WebContent/images/Plus24.png diff --git a/zkwebui/images/Posterita.jpg b/zkwebui/WebContent/images/Posterita.jpg similarity index 100% rename from zkwebui/images/Posterita.jpg rename to zkwebui/WebContent/images/Posterita.jpg diff --git a/zkwebui/images/PosteritaAjaxUILogo.jpg b/zkwebui/WebContent/images/PosteritaAjaxUILogo.jpg similarity index 100% rename from zkwebui/images/PosteritaAjaxUILogo.jpg rename to zkwebui/WebContent/images/PosteritaAjaxUILogo.jpg diff --git a/zkwebui/images/Preference16.png b/zkwebui/WebContent/images/Preference16.png similarity index 100% rename from zkwebui/images/Preference16.png rename to zkwebui/WebContent/images/Preference16.png diff --git a/zkwebui/images/Preference24.png b/zkwebui/WebContent/images/Preference24.png similarity index 100% rename from zkwebui/images/Preference24.png rename to zkwebui/WebContent/images/Preference24.png diff --git a/zkwebui/images/Previous16.png b/zkwebui/WebContent/images/Previous16.png similarity index 100% rename from zkwebui/images/Previous16.png rename to zkwebui/WebContent/images/Previous16.png diff --git a/zkwebui/images/Previous24.png b/zkwebui/WebContent/images/Previous24.png similarity index 100% rename from zkwebui/images/Previous24.png rename to zkwebui/WebContent/images/Previous24.png diff --git a/zkwebui/images/Previous24D.png b/zkwebui/WebContent/images/Previous24D.png similarity index 100% rename from zkwebui/images/Previous24D.png rename to zkwebui/WebContent/images/Previous24D.png diff --git a/zkwebui/images/Print16.png b/zkwebui/WebContent/images/Print16.png similarity index 100% rename from zkwebui/images/Print16.png rename to zkwebui/WebContent/images/Print16.png diff --git a/zkwebui/images/Print24.png b/zkwebui/WebContent/images/Print24.png similarity index 100% rename from zkwebui/images/Print24.png rename to zkwebui/WebContent/images/Print24.png diff --git a/zkwebui/images/PrintScreen16.png b/zkwebui/WebContent/images/PrintScreen16.png similarity index 100% rename from zkwebui/images/PrintScreen16.png rename to zkwebui/WebContent/images/PrintScreen16.png diff --git a/zkwebui/images/PrintScreen24.png b/zkwebui/WebContent/images/PrintScreen24.png similarity index 100% rename from zkwebui/images/PrintScreen24.png rename to zkwebui/WebContent/images/PrintScreen24.png diff --git a/zkwebui/images/Process16.png b/zkwebui/WebContent/images/Process16.png similarity index 100% rename from zkwebui/images/Process16.png rename to zkwebui/WebContent/images/Process16.png diff --git a/zkwebui/images/Process24.png b/zkwebui/WebContent/images/Process24.png similarity index 100% rename from zkwebui/images/Process24.png rename to zkwebui/WebContent/images/Process24.png diff --git a/zkwebui/images/Product10.png b/zkwebui/WebContent/images/Product10.png similarity index 100% rename from zkwebui/images/Product10.png rename to zkwebui/WebContent/images/Product10.png diff --git a/zkwebui/images/Product16.png b/zkwebui/WebContent/images/Product16.png similarity index 100% rename from zkwebui/images/Product16.png rename to zkwebui/WebContent/images/Product16.png diff --git a/zkwebui/images/Product24.png b/zkwebui/WebContent/images/Product24.png similarity index 100% rename from zkwebui/images/Product24.png rename to zkwebui/WebContent/images/Product24.png diff --git a/zkwebui/images/Question32.png b/zkwebui/WebContent/images/Question32.png similarity index 100% rename from zkwebui/images/Question32.png rename to zkwebui/WebContent/images/Question32.png diff --git a/zkwebui/images/Redo16.png b/zkwebui/WebContent/images/Redo16.png similarity index 100% rename from zkwebui/images/Redo16.png rename to zkwebui/WebContent/images/Redo16.png diff --git a/zkwebui/images/Redo24.png b/zkwebui/WebContent/images/Redo24.png similarity index 100% rename from zkwebui/images/Redo24.png rename to zkwebui/WebContent/images/Redo24.png diff --git a/zkwebui/images/Refresh16.png b/zkwebui/WebContent/images/Refresh16.png similarity index 100% rename from zkwebui/images/Refresh16.png rename to zkwebui/WebContent/images/Refresh16.png diff --git a/zkwebui/images/Refresh24.png b/zkwebui/WebContent/images/Refresh24.png similarity index 100% rename from zkwebui/images/Refresh24.png rename to zkwebui/WebContent/images/Refresh24.png diff --git a/zkwebui/images/Register16.png b/zkwebui/WebContent/images/Register16.png similarity index 100% rename from zkwebui/images/Register16.png rename to zkwebui/WebContent/images/Register16.png diff --git a/zkwebui/images/Register24.png b/zkwebui/WebContent/images/Register24.png similarity index 100% rename from zkwebui/images/Register24.png rename to zkwebui/WebContent/images/Register24.png diff --git a/zkwebui/images/Report16.png b/zkwebui/WebContent/images/Report16.png similarity index 100% rename from zkwebui/images/Report16.png rename to zkwebui/WebContent/images/Report16.png diff --git a/zkwebui/images/Report24.png b/zkwebui/WebContent/images/Report24.png similarity index 100% rename from zkwebui/images/Report24.png rename to zkwebui/WebContent/images/Report24.png diff --git a/zkwebui/images/Request16.png b/zkwebui/WebContent/images/Request16.png similarity index 100% rename from zkwebui/images/Request16.png rename to zkwebui/WebContent/images/Request16.png diff --git a/zkwebui/images/Request24.png b/zkwebui/WebContent/images/Request24.png similarity index 100% rename from zkwebui/images/Request24.png rename to zkwebui/WebContent/images/Request24.png diff --git a/zkwebui/images/Reset16.png b/zkwebui/WebContent/images/Reset16.png similarity index 100% rename from zkwebui/images/Reset16.png rename to zkwebui/WebContent/images/Reset16.png diff --git a/zkwebui/images/Reset24.png b/zkwebui/WebContent/images/Reset24.png similarity index 100% rename from zkwebui/images/Reset24.png rename to zkwebui/WebContent/images/Reset24.png diff --git a/zkwebui/images/Save16.png b/zkwebui/WebContent/images/Save16.png similarity index 100% rename from zkwebui/images/Save16.png rename to zkwebui/WebContent/images/Save16.png diff --git a/zkwebui/images/Save24.png b/zkwebui/WebContent/images/Save24.png similarity index 100% rename from zkwebui/images/Save24.png rename to zkwebui/WebContent/images/Save24.png diff --git a/zkwebui/images/ScreenShot16.png b/zkwebui/WebContent/images/ScreenShot16.png similarity index 100% rename from zkwebui/images/ScreenShot16.png rename to zkwebui/WebContent/images/ScreenShot16.png diff --git a/zkwebui/images/ScreenShot24.png b/zkwebui/WebContent/images/ScreenShot24.png similarity index 100% rename from zkwebui/images/ScreenShot24.png rename to zkwebui/WebContent/images/ScreenShot24.png diff --git a/zkwebui/images/Script16.png b/zkwebui/WebContent/images/Script16.png similarity index 100% rename from zkwebui/images/Script16.png rename to zkwebui/WebContent/images/Script16.png diff --git a/zkwebui/images/Script24.png b/zkwebui/WebContent/images/Script24.png similarity index 100% rename from zkwebui/images/Script24.png rename to zkwebui/WebContent/images/Script24.png diff --git a/zkwebui/images/SelectAll16.png b/zkwebui/WebContent/images/SelectAll16.png similarity index 100% rename from zkwebui/images/SelectAll16.png rename to zkwebui/WebContent/images/SelectAll16.png diff --git a/zkwebui/images/SelectAll24.png b/zkwebui/WebContent/images/SelectAll24.png similarity index 100% rename from zkwebui/images/SelectAll24.png rename to zkwebui/WebContent/images/SelectAll24.png diff --git a/zkwebui/images/SendMail16.png b/zkwebui/WebContent/images/SendMail16.png similarity index 100% rename from zkwebui/images/SendMail16.png rename to zkwebui/WebContent/images/SendMail16.png diff --git a/zkwebui/images/SendMail24.png b/zkwebui/WebContent/images/SendMail24.png similarity index 100% rename from zkwebui/images/SendMail24.png rename to zkwebui/WebContent/images/SendMail24.png diff --git a/zkwebui/images/Server16.png b/zkwebui/WebContent/images/Server16.png similarity index 100% rename from zkwebui/images/Server16.png rename to zkwebui/WebContent/images/Server16.png diff --git a/zkwebui/images/Server24.png b/zkwebui/WebContent/images/Server24.png similarity index 100% rename from zkwebui/images/Server24.png rename to zkwebui/WebContent/images/Server24.png diff --git a/zkwebui/images/Setup16.png b/zkwebui/WebContent/images/Setup16.png similarity index 100% rename from zkwebui/images/Setup16.png rename to zkwebui/WebContent/images/Setup16.png diff --git a/zkwebui/images/Setup24.png b/zkwebui/WebContent/images/Setup24.png similarity index 100% rename from zkwebui/images/Setup24.png rename to zkwebui/WebContent/images/Setup24.png diff --git a/zkwebui/images/StepBack24.png b/zkwebui/WebContent/images/StepBack24.png similarity index 100% rename from zkwebui/images/StepBack24.png rename to zkwebui/WebContent/images/StepBack24.png diff --git a/zkwebui/images/StepForward24.png b/zkwebui/WebContent/images/StepForward24.png similarity index 100% rename from zkwebui/images/StepForward24.png rename to zkwebui/WebContent/images/StepForward24.png diff --git a/zkwebui/images/Summary16.png b/zkwebui/WebContent/images/Summary16.png similarity index 100% rename from zkwebui/images/Summary16.png rename to zkwebui/WebContent/images/Summary16.png diff --git a/zkwebui/images/Summary24.png b/zkwebui/WebContent/images/Summary24.png similarity index 100% rename from zkwebui/images/Summary24.png rename to zkwebui/WebContent/images/Summary24.png diff --git a/zkwebui/images/Translate16.png b/zkwebui/WebContent/images/Translate16.png similarity index 100% rename from zkwebui/images/Translate16.png rename to zkwebui/WebContent/images/Translate16.png diff --git a/zkwebui/images/Translate24.png b/zkwebui/WebContent/images/Translate24.png similarity index 100% rename from zkwebui/images/Translate24.png rename to zkwebui/WebContent/images/Translate24.png diff --git a/zkwebui/images/Underline16.png b/zkwebui/WebContent/images/Underline16.png similarity index 100% rename from zkwebui/images/Underline16.png rename to zkwebui/WebContent/images/Underline16.png diff --git a/zkwebui/images/Undo16.png b/zkwebui/WebContent/images/Undo16.png similarity index 100% rename from zkwebui/images/Undo16.png rename to zkwebui/WebContent/images/Undo16.png diff --git a/zkwebui/images/Undo24.png b/zkwebui/WebContent/images/Undo24.png similarity index 100% rename from zkwebui/images/Undo24.png rename to zkwebui/WebContent/images/Undo24.png diff --git a/zkwebui/images/VPreference16.png b/zkwebui/WebContent/images/VPreference16.png similarity index 100% rename from zkwebui/images/VPreference16.png rename to zkwebui/WebContent/images/VPreference16.png diff --git a/zkwebui/images/VPreference24.png b/zkwebui/WebContent/images/VPreference24.png similarity index 100% rename from zkwebui/images/VPreference24.png rename to zkwebui/WebContent/images/VPreference24.png diff --git a/zkwebui/images/Warn32.png b/zkwebui/WebContent/images/Warn32.png similarity index 100% rename from zkwebui/images/Warn32.png rename to zkwebui/WebContent/images/Warn32.png diff --git a/zkwebui/images/WinSize16.png b/zkwebui/WebContent/images/WinSize16.png similarity index 100% rename from zkwebui/images/WinSize16.png rename to zkwebui/WebContent/images/WinSize16.png diff --git a/zkwebui/images/WinSize24.png b/zkwebui/WebContent/images/WinSize24.png similarity index 100% rename from zkwebui/images/WinSize24.png rename to zkwebui/WebContent/images/WinSize24.png diff --git a/zkwebui/images/WorkFlow16.png b/zkwebui/WebContent/images/WorkFlow16.png similarity index 100% rename from zkwebui/images/WorkFlow16.png rename to zkwebui/WebContent/images/WorkFlow16.png diff --git a/zkwebui/images/WorkFlow24.png b/zkwebui/WebContent/images/WorkFlow24.png similarity index 100% rename from zkwebui/images/WorkFlow24.png rename to zkwebui/WebContent/images/WorkFlow24.png diff --git a/zkwebui/images/WorkFlow_16.png b/zkwebui/WebContent/images/WorkFlow_16.png similarity index 100% rename from zkwebui/images/WorkFlow_16.png rename to zkwebui/WebContent/images/WorkFlow_16.png diff --git a/zkwebui/images/WorkFlow_24.png b/zkwebui/WebContent/images/WorkFlow_24.png similarity index 100% rename from zkwebui/images/WorkFlow_24.png rename to zkwebui/WebContent/images/WorkFlow_24.png diff --git a/zkwebui/images/Zoom16.png b/zkwebui/WebContent/images/Zoom16.png similarity index 100% rename from zkwebui/images/Zoom16.png rename to zkwebui/WebContent/images/Zoom16.png diff --git a/zkwebui/images/Zoom24.png b/zkwebui/WebContent/images/Zoom24.png similarity index 100% rename from zkwebui/images/Zoom24.png rename to zkwebui/WebContent/images/Zoom24.png diff --git a/zkwebui/images/ZoomAcross16.png b/zkwebui/WebContent/images/ZoomAcross16.png similarity index 100% rename from zkwebui/images/ZoomAcross16.png rename to zkwebui/WebContent/images/ZoomAcross16.png diff --git a/zkwebui/images/ZoomAcross24.png b/zkwebui/WebContent/images/ZoomAcross24.png similarity index 100% rename from zkwebui/images/ZoomAcross24.png rename to zkwebui/WebContent/images/ZoomAcross24.png diff --git a/zkwebui/images/downarrow.png b/zkwebui/WebContent/images/downarrow.png similarity index 100% rename from zkwebui/images/downarrow.png rename to zkwebui/WebContent/images/downarrow.png diff --git a/zkwebui/images/gradient-bg.png b/zkwebui/WebContent/images/gradient-bg.png similarity index 100% rename from zkwebui/images/gradient-bg.png rename to zkwebui/WebContent/images/gradient-bg.png diff --git a/zkwebui/images/loading.png b/zkwebui/WebContent/images/loading.png similarity index 100% rename from zkwebui/images/loading.png rename to zkwebui/WebContent/images/loading.png diff --git a/zkwebui/images/logo.png b/zkwebui/WebContent/images/logo.png similarity index 100% rename from zkwebui/images/logo.png rename to zkwebui/WebContent/images/logo.png diff --git a/zkwebui/images/logo_ad.png b/zkwebui/WebContent/images/logo_ad.png similarity index 100% rename from zkwebui/images/logo_ad.png rename to zkwebui/WebContent/images/logo_ad.png diff --git a/zkwebui/images/logoff.JPG b/zkwebui/WebContent/images/logoff.JPG similarity index 100% rename from zkwebui/images/logoff.JPG rename to zkwebui/WebContent/images/logoff.JPG diff --git a/zkwebui/images/mClosed.png b/zkwebui/WebContent/images/mClosed.png similarity index 100% rename from zkwebui/images/mClosed.png rename to zkwebui/WebContent/images/mClosed.png diff --git a/zkwebui/images/mDocAction.png b/zkwebui/WebContent/images/mDocAction.png similarity index 100% rename from zkwebui/images/mDocAction.png rename to zkwebui/WebContent/images/mDocAction.png diff --git a/zkwebui/images/mOpen.png b/zkwebui/WebContent/images/mOpen.png similarity index 100% rename from zkwebui/images/mOpen.png rename to zkwebui/WebContent/images/mOpen.png diff --git a/zkwebui/images/mProcess.png b/zkwebui/WebContent/images/mProcess.png similarity index 100% rename from zkwebui/images/mProcess.png rename to zkwebui/WebContent/images/mProcess.png diff --git a/zkwebui/images/mReport.png b/zkwebui/WebContent/images/mReport.png similarity index 100% rename from zkwebui/images/mReport.png rename to zkwebui/WebContent/images/mReport.png diff --git a/zkwebui/images/mSetVariable.png b/zkwebui/WebContent/images/mSetVariable.png similarity index 100% rename from zkwebui/images/mSetVariable.png rename to zkwebui/WebContent/images/mSetVariable.png diff --git a/zkwebui/images/mUserChoice.png b/zkwebui/WebContent/images/mUserChoice.png similarity index 100% rename from zkwebui/images/mUserChoice.png rename to zkwebui/WebContent/images/mUserChoice.png diff --git a/zkwebui/images/mWindow.png b/zkwebui/WebContent/images/mWindow.png similarity index 100% rename from zkwebui/images/mWindow.png rename to zkwebui/WebContent/images/mWindow.png diff --git a/zkwebui/images/mWorkFlow.png b/zkwebui/WebContent/images/mWorkFlow.png similarity index 100% rename from zkwebui/images/mWorkFlow.png rename to zkwebui/WebContent/images/mWorkFlow.png diff --git a/zkwebui/images/mWorkbench.png b/zkwebui/WebContent/images/mWorkbench.png similarity index 100% rename from zkwebui/images/mWorkbench.png rename to zkwebui/WebContent/images/mWorkbench.png diff --git a/zkwebui/images/ns-collapse.png b/zkwebui/WebContent/images/ns-collapse.png similarity index 100% rename from zkwebui/images/ns-collapse.png rename to zkwebui/WebContent/images/ns-collapse.png diff --git a/zkwebui/images/ns-expand.png b/zkwebui/WebContent/images/ns-expand.png similarity index 100% rename from zkwebui/images/ns-expand.png rename to zkwebui/WebContent/images/ns-expand.png diff --git a/zkwebui/images/top.JPG b/zkwebui/WebContent/images/top.JPG similarity index 100% rename from zkwebui/images/top.JPG rename to zkwebui/WebContent/images/top.JPG diff --git a/zkwebui/images/uparrow.png b/zkwebui/WebContent/images/uparrow.png similarity index 100% rename from zkwebui/images/uparrow.png rename to zkwebui/WebContent/images/uparrow.png diff --git a/zkwebui/images/wfBack24.png b/zkwebui/WebContent/images/wfBack24.png similarity index 100% rename from zkwebui/images/wfBack24.png rename to zkwebui/WebContent/images/wfBack24.png diff --git a/zkwebui/images/wfEnd24.png b/zkwebui/WebContent/images/wfEnd24.png similarity index 100% rename from zkwebui/images/wfEnd24.png rename to zkwebui/WebContent/images/wfEnd24.png diff --git a/zkwebui/images/wfNext24.png b/zkwebui/WebContent/images/wfNext24.png similarity index 100% rename from zkwebui/images/wfNext24.png rename to zkwebui/WebContent/images/wfNext24.png diff --git a/zkwebui/images/wfStart24.png b/zkwebui/WebContent/images/wfStart24.png similarity index 100% rename from zkwebui/images/wfStart24.png rename to zkwebui/WebContent/images/wfStart24.png diff --git a/zkwebui/images/zip.png b/zkwebui/WebContent/images/zip.png similarity index 100% rename from zkwebui/images/zip.png rename to zkwebui/WebContent/images/zip.png diff --git a/zkwebui/index.zul b/zkwebui/WebContent/index.zul similarity index 100% rename from zkwebui/index.zul rename to zkwebui/WebContent/index.zul diff --git a/zkwebui/js/calc.js b/zkwebui/WebContent/js/calc.js similarity index 100% rename from zkwebui/js/calc.js rename to zkwebui/WebContent/js/calc.js diff --git a/zkwebui/js/layout.js b/zkwebui/WebContent/js/layout.js similarity index 100% rename from zkwebui/js/layout.js rename to zkwebui/WebContent/js/layout.js diff --git a/zkwebui/js/persist-min.js b/zkwebui/WebContent/js/persist-min.js similarity index 100% rename from zkwebui/js/persist-min.js rename to zkwebui/WebContent/js/persist-min.js diff --git a/zkwebui/js/report.js b/zkwebui/WebContent/js/report.js similarity index 100% rename from zkwebui/js/report.js rename to zkwebui/WebContent/js/report.js diff --git a/zkwebui/js/token.js b/zkwebui/WebContent/js/token.js similarity index 100% rename from zkwebui/js/token.js rename to zkwebui/WebContent/js/token.js diff --git a/zkwebui/release_notes.html b/zkwebui/WebContent/release_notes.html similarity index 100% rename from zkwebui/release_notes.html rename to zkwebui/WebContent/release_notes.html diff --git a/zkwebui/theme.zs b/zkwebui/WebContent/theme.zs similarity index 100% rename from zkwebui/theme.zs rename to zkwebui/WebContent/theme.zs diff --git a/zkwebui/theme/default/css/theme.css.dsp b/zkwebui/WebContent/theme/default/css/theme.css.dsp similarity index 100% rename from zkwebui/theme/default/css/theme.css.dsp rename to zkwebui/WebContent/theme/default/css/theme.css.dsp diff --git a/zkwebui/theme/default/css/themeie.css.dsp b/zkwebui/WebContent/theme/default/css/themeie.css.dsp similarity index 100% rename from zkwebui/theme/default/css/themeie.css.dsp rename to zkwebui/WebContent/theme/default/css/themeie.css.dsp diff --git a/zkwebui/theme/default/images/adtab-left-bg.png b/zkwebui/WebContent/theme/default/images/adtab-left-bg.png similarity index 100% rename from zkwebui/theme/default/images/adtab-left-bg.png rename to zkwebui/WebContent/theme/default/images/adtab-left-bg.png diff --git a/zkwebui/theme/default/images/adtab-right-bg.png b/zkwebui/WebContent/theme/default/images/adtab-right-bg.png similarity index 100% rename from zkwebui/theme/default/images/adtab-right-bg.png rename to zkwebui/WebContent/theme/default/images/adtab-right-bg.png diff --git a/zkwebui/theme/default/images/header-bg.png b/zkwebui/WebContent/theme/default/images/header-bg.png similarity index 100% rename from zkwebui/theme/default/images/header-bg.png rename to zkwebui/WebContent/theme/default/images/header-bg.png diff --git a/zkwebui/theme/default/images/header-logo.png b/zkwebui/WebContent/theme/default/images/header-logo.png similarity index 100% rename from zkwebui/theme/default/images/header-logo.png rename to zkwebui/WebContent/theme/default/images/header-logo.png diff --git a/zkwebui/theme/default/images/icon.png b/zkwebui/WebContent/theme/default/images/icon.png similarity index 100% rename from zkwebui/theme/default/images/icon.png rename to zkwebui/WebContent/theme/default/images/icon.png diff --git a/zkwebui/theme/default/images/login-box-bg.png b/zkwebui/WebContent/theme/default/images/login-box-bg.png similarity index 100% rename from zkwebui/theme/default/images/login-box-bg.png rename to zkwebui/WebContent/theme/default/images/login-box-bg.png diff --git a/zkwebui/theme/default/images/login-box-footer.png b/zkwebui/WebContent/theme/default/images/login-box-footer.png similarity index 100% rename from zkwebui/theme/default/images/login-box-footer.png rename to zkwebui/WebContent/theme/default/images/login-box-footer.png diff --git a/zkwebui/theme/default/images/login-box-header.png b/zkwebui/WebContent/theme/default/images/login-box-header.png similarity index 100% rename from zkwebui/theme/default/images/login-box-header.png rename to zkwebui/WebContent/theme/default/images/login-box-header.png diff --git a/zkwebui/theme/default/images/login-logo.png b/zkwebui/WebContent/theme/default/images/login-logo.png similarity index 100% rename from zkwebui/theme/default/images/login-logo.png rename to zkwebui/WebContent/theme/default/images/login-logo.png diff --git a/zkwebui/theme/default/login-info.zul b/zkwebui/WebContent/theme/default/login-info.zul similarity index 100% rename from zkwebui/theme/default/login-info.zul rename to zkwebui/WebContent/theme/default/login-info.zul diff --git a/zkwebui/theme/default/login-left.zul b/zkwebui/WebContent/theme/default/login-left.zul similarity index 100% rename from zkwebui/theme/default/login-left.zul rename to zkwebui/WebContent/theme/default/login-left.zul diff --git a/zkwebui/theme/default/login-links.zul b/zkwebui/WebContent/theme/default/login-links.zul similarity index 100% rename from zkwebui/theme/default/login-links.zul rename to zkwebui/WebContent/theme/default/login-links.zul diff --git a/zkwebui/theme/default/vendor-logo.zul b/zkwebui/WebContent/theme/default/vendor-logo.zul similarity index 100% rename from zkwebui/theme/default/vendor-logo.zul rename to zkwebui/WebContent/theme/default/vendor-logo.zul diff --git a/zkwebui/theme/default/version-info.zul b/zkwebui/WebContent/theme/default/version-info.zul similarity index 100% rename from zkwebui/theme/default/version-info.zul rename to zkwebui/WebContent/theme/default/version-info.zul diff --git a/zkwebui/zul/activities.zul b/zkwebui/WebContent/zul/activities.zul similarity index 100% rename from zkwebui/zul/activities.zul rename to zkwebui/WebContent/zul/activities.zul diff --git a/zkwebui/zul/calendar.zul b/zkwebui/WebContent/zul/calendar.zul similarity index 100% rename from zkwebui/zul/calendar.zul rename to zkwebui/WebContent/zul/calendar.zul diff --git a/zkwebui/zul/favourites.zul b/zkwebui/WebContent/zul/favourites.zul similarity index 100% rename from zkwebui/zul/favourites.zul rename to zkwebui/WebContent/zul/favourites.zul diff --git a/zkwebui/zul/menu.zul b/zkwebui/WebContent/zul/menu.zul similarity index 100% rename from zkwebui/zul/menu.zul rename to zkwebui/WebContent/zul/menu.zul diff --git a/zkwebui/zul/performance.zul b/zkwebui/WebContent/zul/performance.zul similarity index 100% rename from zkwebui/zul/performance.zul rename to zkwebui/WebContent/zul/performance.zul diff --git a/zkwebui/zul/views.zul b/zkwebui/WebContent/zul/views.zul similarity index 100% rename from zkwebui/zul/views.zul rename to zkwebui/WebContent/zul/views.zul diff --git a/zkwebui/build.properties b/zkwebui/build.properties new file mode 100644 index 0000000000..d6b0947bc2 --- /dev/null +++ b/zkwebui/build.properties @@ -0,0 +1,56 @@ +source.zkwebui.jar = WEB-INF/src/,\ + WebContent/ + +bin.includes = META-INF/,\ + lib/xercesImpl.jar,\ + lib/javaee.jar,\ + lib/jcommon-1.0.14.jar,\ + lib/jfreechart-1.0.11.jar,\ + zkwebui.jar,\ + plugin.xml,\ + WEB-INF/lib/asm.jar,\ + WEB-INF/lib/bsh.jar,\ + WEB-INF/lib/commons-el.jar,\ + WEB-INF/lib/commons-fileupload.jar,\ + WEB-INF/lib/commons-io.jar,\ + WEB-INF/lib/Filters.jar,\ + WEB-INF/lib/gmapsz.jar,\ + WEB-INF/lib/groovy.jar,\ + WEB-INF/lib/jruby.jar,\ + WEB-INF/lib/js.jar,\ + WEB-INF/lib/json_simple.jar,\ + WEB-INF/lib/jxl.jar,\ + WEB-INF/lib/jython.jar,\ + WEB-INF/lib/mvel.jar,\ + WEB-INF/lib/ognl.jar,\ + WEB-INF/lib/timelinez-sources.jar,\ + WEB-INF/lib/timeplotz.jar,\ + WEB-INF/lib/xercesImpl.jar,\ + WEB-INF/lib/zcommon-sources.jar,\ + WEB-INF/lib/zcommons-el.jar,\ + WEB-INF/lib/zhtml-sources.jar,\ + WEB-INF/lib/zk-sources.jar,\ + WEB-INF/lib/zkex-sources.jar,\ + WEB-INF/lib/zkmax-sources.jar,\ + WEB-INF/lib/zkplus-sources.jar,\ + WEB-INF/lib/zml-sources.jar,\ + WEB-INF/lib/zml.jar,\ + WEB-INF/lib/zul-sources.jar,\ + WEB-INF/lib/zweb-sources.jar,\ + WEB-INF/lib/cglib.jar,\ + WEB-INF/lib/fckez.jar,\ + WEB-INF/lib/junit.jar,\ + WEB-INF/lib/keylistener.jar,\ + WEB-INF/lib/timelinez.jar,\ + WEB-INF/lib/zweb.jar,\ + WEB-INF/lib/zul.jar,\ + WEB-INF/lib/zkplus.jar,\ + WEB-INF/lib/zkmax.jar,\ + WEB-INF/lib/zkex.jar,\ + WEB-INF/lib/zk.jar,\ + WEB-INF/lib/zcommon.jar,\ + WEB-INF/lib/zhtml.jar,\ + +output.zkwebui.jar = bin/ +jars.compile.order = zkwebui.jar + diff --git a/zkwebui/build.xml b/zkwebui/build.xml deleted file mode 100644 index e5e4ceb508..0000000000 --- a/zkwebui/build.xml +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - - - This buildfile is used to build the Zk WebUI client. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/zkwebui/plugin.xml b/zkwebui/plugin.xml new file mode 100644 index 0000000000..13657a83af --- /dev/null +++ b/zkwebui/plugin.xml @@ -0,0 +1,17 @@ + + + + + From 22b88a7b52fdba3e92e52bd56eea880ef6112485 Mon Sep 17 00:00:00 2001 From: trifonnt Date: Sat, 6 Mar 2010 10:58:04 +0000 Subject: [PATCH 09/46] Change JRE to standard JVM, instead of MAC OS specific. Joerg, please let me know if this is ok and if it breaks anything? Please feel free to fix it in case of issues. --- equinox-bridge/.classpath | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/equinox-bridge/.classpath b/equinox-bridge/.classpath index fce8130690..6432cecd40 100644 --- a/equinox-bridge/.classpath +++ b/equinox-bridge/.classpath @@ -1,11 +1,7 @@ - - - - - + From e11cc21c52a14d3c3dfd924d13c962f04615bade Mon Sep 17 00:00:00 2001 From: joergviola Date: Mon, 8 Mar 2010 14:13:45 +0000 Subject: [PATCH 10/46] Standalone plugin build now possible. https://sourceforge.net/tracker/?func=detail&aid=2700937&group_id=176962&atid=879334 --- JasperReports/META-INF/MANIFEST.MF | 3 ++- zkwebui/META-INF/MANIFEST.MF | 10 +--------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/JasperReports/META-INF/MANIFEST.MF b/JasperReports/META-INF/MANIFEST.MF index 6ca8e39366..348e4ecf69 100644 --- a/JasperReports/META-INF/MANIFEST.MF +++ b/JasperReports/META-INF/MANIFEST.MF @@ -12,4 +12,5 @@ Export-Package: org.compiere.interfaces, org.compiere.report, org.compiere.utils Require-Bundle: org.adempiere.base;bundle-version="0.0.0", - org.adempiere.JasperReportsTools;bundle-version="1.0.0" + org.adempiere.JasperReportsTools;bundle-version="1.0.0", + org.adempiere.client;bundle-version="0.0.0" diff --git a/zkwebui/META-INF/MANIFEST.MF b/zkwebui/META-INF/MANIFEST.MF index 946a242e7a..cc9f130ba3 100644 --- a/zkwebui/META-INF/MANIFEST.MF +++ b/zkwebui/META-INF/MANIFEST.MF @@ -98,15 +98,6 @@ Export-Package: com.keypoint, javax.resource.spi.security, javax.resource.spi.work, javax.security.jacc, - javax.servlet, - javax.servlet.http, - javax.servlet.jsp, - javax.servlet.jsp.el, - javax.servlet.jsp.jstl.core, - javax.servlet.jsp.jstl.fmt, - javax.servlet.jsp.jstl.sql, - javax.servlet.jsp.jstl.tlv, - javax.servlet.jsp.tagext, javax.transaction, javax.transaction.xa, javax.xml.bind, @@ -525,3 +516,4 @@ Require-Bundle: org.eclipse.equinox.http.registry;bundle-version="1.0.0";resolut org.adempiere.base;bundle-version="0.0.0", org.adempiere.tools;bundle-version="0.0.0" Bundle-Activator: org.adempiere.webui.Activator +Bundle-RequiredExecutionEnvironment: JavaSE-1.6 From f73caa3e98a12e6f21be197cb74912af02677c55 Mon Sep 17 00:00:00 2001 From: joergviola Date: Mon, 8 Mar 2010 20:27:33 +0000 Subject: [PATCH 11/46] More flexible service locator interface. https://sourceforge.net/tracker/?func=detail&aid=2700937&group_id=176962&atid=879334 --- base/plugin.xml | 3 +- base/schema/org.adempiere.base.Callout.exsd | 119 ++++++++++++++++++ base/src/org/adempiere/base/Core.java | 41 ++++++ .../org/adempiere/base/IResourceFinder.java | 2 +- base/src/org/adempiere/base/IService.java | 5 + .../org/adempiere/base/IServiceLocator.java | 14 ++- base/src/org/adempiere/base/Service.java | 26 +++- base/src/org/adempiere/base/ServiceQuery.java | 9 ++ .../base/equinox/EquinoxResourceFinder.java | 35 ------ .../base/equinox/EquinoxServiceLocator.java | 33 ++++- .../adempiere/base/equinox/ExtensionList.java | 63 ++++++++++ base/src/org/compiere/Adempiere.java | 7 +- base/src/org/compiere/model/Callout.java | 4 +- base/src/org/compiere/model/GridTab.java | 11 +- base/src/org/compiere/util/Env.java | 7 +- client/plugin.xml | 2 +- 16 files changed, 326 insertions(+), 55 deletions(-) create mode 100644 base/schema/org.adempiere.base.Callout.exsd create mode 100644 base/src/org/adempiere/base/Core.java create mode 100644 base/src/org/adempiere/base/IService.java create mode 100644 base/src/org/adempiere/base/ServiceQuery.java delete mode 100644 base/src/org/adempiere/base/equinox/EquinoxResourceFinder.java diff --git a/base/plugin.xml b/base/plugin.xml index cb6b8fe432..a02eda5e25 100644 --- a/base/plugin.xml +++ b/base/plugin.xml @@ -1,6 +1,7 @@ - + + diff --git a/base/schema/org.adempiere.base.Callout.exsd b/base/schema/org.adempiere.base.Callout.exsd new file mode 100644 index 0000000000..a4657b6ea9 --- /dev/null +++ b/base/schema/org.adempiere.base.Callout.exsd @@ -0,0 +1,119 @@ + + + + + + + + + This is the ADempiere Call extension point. + +Callouts provided by plugins are not entered into the application dictionary. +Instead, you specify Table and Column in the extension declaration. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + [Enter the first release in which this extension point appears.] + + + + + + + + + [Enter extension point usage example here.] + + + + + + + + + [Enter API information here.] + + + + + + + + + [Enter information about supplied implementation of this extension point.] + + + + + diff --git a/base/src/org/adempiere/base/Core.java b/base/src/org/adempiere/base/Core.java new file mode 100644 index 0000000000..df6ce32268 --- /dev/null +++ b/base/src/org/adempiere/base/Core.java @@ -0,0 +1,41 @@ +package org.adempiere.base; + +import java.net.URL; +import java.util.List; + +import org.adempiere.base.equinox.ExtensionList; +import org.compiere.model.Callout; + +/** + * This is a facade class for the Service Locator. + * It provides simple access to all core services. + * + * @author viola + */ +public class Core { + + public static IResourceFinder getResourceFinder() { + return new IResourceFinder() { + + public URL getResource(String name) { + List f = Service.list(IResourceFinder.class); + for (IResourceFinder finder : f) { + URL url = finder.getResource(name); + if (url!=null) + return url; + } + return null; + } + }; + } + + public static Callout getCallout(String tableName, String columnName) { + ServiceQuery query = new ServiceQuery(); + query.put("tableName", tableName); + query.put("columnName", columnName); + + return Service.locate(Callout.class, query); + } + + +} diff --git a/base/src/org/adempiere/base/IResourceFinder.java b/base/src/org/adempiere/base/IResourceFinder.java index a99ea7b76b..12d751d355 100644 --- a/base/src/org/adempiere/base/IResourceFinder.java +++ b/base/src/org/adempiere/base/IResourceFinder.java @@ -18,7 +18,7 @@ package org.adempiere.base; import java.net.URL; -public interface IResourceFinder { +public interface IResourceFinder extends IService { URL getResource(String name); diff --git a/base/src/org/adempiere/base/IService.java b/base/src/org/adempiere/base/IService.java new file mode 100644 index 0000000000..5745fce41f --- /dev/null +++ b/base/src/org/adempiere/base/IService.java @@ -0,0 +1,5 @@ +package org.adempiere.base; + +public interface IService { + +} diff --git a/base/src/org/adempiere/base/IServiceLocator.java b/base/src/org/adempiere/base/IServiceLocator.java index 7b127bfd4d..3d75392dd1 100644 --- a/base/src/org/adempiere/base/IServiceLocator.java +++ b/base/src/org/adempiere/base/IServiceLocator.java @@ -16,16 +16,24 @@ *****************************************************************************/ package org.adempiere.base; +import java.util.List; + +import org.compiere.model.Callout; + /** * A service locator looks up services. * This is the central authority for adempiere service definition, * because each service defined has to be looked up via this interface. + * + * A service in adempiere is an interface extended from the tagging interface IService. + * * @author viola * */ public interface IServiceLocator { - - IResourceFinder getResourceFinder(); - + T locate(Class type); + T locate(Class type, ServiceQuery query); + List list(Class type); + List list(Class type, ServiceQuery query); } diff --git a/base/src/org/adempiere/base/Service.java b/base/src/org/adempiere/base/Service.java index 4ab5206ec8..bc397e5c24 100644 --- a/base/src/org/adempiere/base/Service.java +++ b/base/src/org/adempiere/base/Service.java @@ -16,26 +16,46 @@ *****************************************************************************/ package org.adempiere.base; +import java.util.List; + import org.adempiere.base.equinox.EquinoxServiceLocator; /** * This is a very simple factory for service locators + * * @author viola - * + * */ public class Service { private static IServiceLocator theLocator; public static IServiceLocator locator() { - if (theLocator==null) { + if (theLocator == null) { synchronized (Service.class) { - if (theLocator==null) { + if (theLocator == null) { theLocator = new EquinoxServiceLocator(); + System.out + .println("Started service locator: " + theLocator); } } } return theLocator; } + public static T locate(Class type) { + return locator().locate(type); + } + + public static T locate(Class type, ServiceQuery query) { + return locator().locate(type, query); + } + + public static List list(Class type) { + return locator().list(type); + } + + public static List list(Class type, ServiceQuery query) { + return locator().list(type, query); + } } diff --git a/base/src/org/adempiere/base/ServiceQuery.java b/base/src/org/adempiere/base/ServiceQuery.java new file mode 100644 index 0000000000..3cb1f42a6e --- /dev/null +++ b/base/src/org/adempiere/base/ServiceQuery.java @@ -0,0 +1,9 @@ +package org.adempiere.base; + +import java.util.HashMap; + +public class ServiceQuery extends HashMap { + + private static final long serialVersionUID = -3624488575106821781L; + +} diff --git a/base/src/org/adempiere/base/equinox/EquinoxResourceFinder.java b/base/src/org/adempiere/base/equinox/EquinoxResourceFinder.java deleted file mode 100644 index b720e95006..0000000000 --- a/base/src/org/adempiere/base/equinox/EquinoxResourceFinder.java +++ /dev/null @@ -1,35 +0,0 @@ -/****************************************************************************** - * Product: Adempiere ERP & CRM Smart Business Solution * - * Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it * - * under the terms version 2 of the GNU General Public License as published * - * by the Free Software Foundation. This program is distributed in the hope * - * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * - * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * - * See the GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License along * - * with this program; if not, write to the Free Software Foundation, Inc., * - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * - * For the text or an alternative of this public license, you may reach us * - * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * - * or via info@compiere.org or http://www.compiere.org/license.html * - *****************************************************************************/ -package org.adempiere.base.equinox; - -import java.net.URL; - -import org.adempiere.base.IResourceFinder; - -public class EquinoxResourceFinder implements IResourceFinder { - - public URL getResource(String name) { - ExtensionList list = new ExtensionList(IResourceFinder.class, "org.adempiere.base.ResourceFinder"); - for (IResourceFinder rf : list) { - URL url = rf.getResource(name); - if (url!=null) - return url; - } - return null; - } - -} \ No newline at end of file diff --git a/base/src/org/adempiere/base/equinox/EquinoxServiceLocator.java b/base/src/org/adempiere/base/equinox/EquinoxServiceLocator.java index 907ef8e7ed..fe13648039 100644 --- a/base/src/org/adempiere/base/equinox/EquinoxServiceLocator.java +++ b/base/src/org/adempiere/base/equinox/EquinoxServiceLocator.java @@ -16,14 +16,41 @@ *****************************************************************************/ package org.adempiere.base.equinox; -import org.adempiere.base.IResourceFinder; +import java.util.List; + +import org.adempiere.base.IService; import org.adempiere.base.IServiceLocator; +import org.adempiere.base.ServiceQuery; +/** + * This is the Equinox implementation of the ADempiere Service Locator. + * It delegates work to the ExtensionList that lookups up services as extensions. + * The ids of extension points have to correspond to the interface names of the services. + * + * @author viola + * + */ public class EquinoxServiceLocator implements IServiceLocator { - public IResourceFinder getResourceFinder() { - return new EquinoxResourceFinder(); + public List list(Class type) { + ExtensionList list = new ExtensionList(type, type.getName()); + return list.asList(); + } + + public List list(Class type, ServiceQuery query) { + ExtensionList list = new ExtensionList(type, type.getName(), query); + return list.asList(); + } + + public T locate(Class type) { + ExtensionList list = new ExtensionList(type, type.getName()); + return list.first(); + } + + public T locate(Class type, ServiceQuery query) { + ExtensionList list = new ExtensionList(type, type.getName(), query); + return list.first(); } } diff --git a/base/src/org/adempiere/base/equinox/ExtensionList.java b/base/src/org/adempiere/base/equinox/ExtensionList.java index 760a36e4f8..02a2bebc7e 100644 --- a/base/src/org/adempiere/base/equinox/ExtensionList.java +++ b/base/src/org/adempiere/base/equinox/ExtensionList.java @@ -16,12 +16,28 @@ *****************************************************************************/ package org.adempiere.base.equinox; +import java.util.ArrayList; +import java.util.HashMap; import java.util.Iterator; +import java.util.List; +import org.adempiere.base.ServiceQuery; +import org.compiere.model.Callout; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IConfigurationElement; import org.eclipse.core.runtime.Platform; +/** + * This List looks up services as extensions in equinox. + * The extension point must be the class name of the service interface. + * The query attributes are checked against the attributes + * of the extension configuration element. + * + * In order to minimize equinox lookups, a filtering iterator is used. + * @author viola + * + * @param The service this list holds implementations of. + */ public class ExtensionList implements Iterable{ public class ExtensionIterator implements Iterator { @@ -29,11 +45,31 @@ public class ExtensionList implements Iterable{ private int index = 0; public boolean hasNext() { + iterateUntilAccepted(); return index implements Iterable{ } private IConfigurationElement[] elements; + private HashMap filters = new HashMap(); public ExtensionList(Class clazz, String id) { try { @@ -58,8 +95,34 @@ public class ExtensionList implements Iterable{ } } + public ExtensionList(Class type, String name, ServiceQuery query) { + this(type, name); + for (String key : query.keySet()) { + addFilter(key, query.get(key)); + } + } + public Iterator iterator() { return new ExtensionIterator(); } + public void addFilter(String name, String value) { + filters.put(name, value); + } + + public T first() { + Iterator i = iterator(); + if (!i.hasNext()) + return null; + return i.next(); + } + + public List asList() { + List result = new ArrayList(); + for (T t : this) { + result.add(t); + } + return result; + } + } diff --git a/base/src/org/compiere/Adempiere.java b/base/src/org/compiere/Adempiere.java index a306fef357..787ee1fc30 100644 --- a/base/src/org/compiere/Adempiere.java +++ b/base/src/org/compiere/Adempiere.java @@ -22,6 +22,7 @@ import java.io.File; import java.io.IOException; import java.io.InputStream; import java.net.URL; +import java.util.List; import java.util.Properties; import java.util.logging.Level; @@ -30,6 +31,8 @@ import javax.jnlp.ServiceManager; import javax.jnlp.UnavailableServiceException; import javax.swing.ImageIcon; +import org.adempiere.base.Core; +import org.adempiere.base.IResourceFinder; import org.adempiere.base.Service; import org.compiere.db.CConnection; import org.compiere.model.MClient; @@ -337,7 +340,7 @@ public final class Adempiere if (s_imageLogo == null) { Toolkit tk = Toolkit.getDefaultToolkit(); - URL url = Service.locator().getResourceFinder().getResource(s_file100x30); + URL url = Core.getResourceFinder().getResource(s_file100x30); // URL url = org.compiere.Adempiere.class.getResource(s_file100x30); // System.out.println(url); if (url == null) @@ -583,7 +586,7 @@ public final class Adempiere } // startupEnvironment public static URL getResource(String name) { - return Service.locator().getResourceFinder().getResource(name); + return Core.getResourceFinder().getResource(name); } diff --git a/base/src/org/compiere/model/Callout.java b/base/src/org/compiere/model/Callout.java index 59501e7024..1709ed74df 100644 --- a/base/src/org/compiere/model/Callout.java +++ b/base/src/org/compiere/model/Callout.java @@ -18,6 +18,8 @@ package org.compiere.model; import java.util.Properties; +import org.adempiere.base.IService; + /** * Callout Interface for Callout. * Used in MTab and ImpFormatRow @@ -25,7 +27,7 @@ import java.util.Properties; * @author Jorg Janke * @version $Id: Callout.java,v 1.2 2006/07/30 00:51:05 jjanke Exp $ */ -public interface Callout +public interface Callout extends IService { /** * Start Callout. diff --git a/base/src/org/compiere/model/GridTab.java b/base/src/org/compiere/model/GridTab.java index bfda81e985..041ede129a 100644 --- a/base/src/org/compiere/model/GridTab.java +++ b/base/src/org/compiere/model/GridTab.java @@ -37,6 +37,8 @@ import java.util.logging.Level; import javax.script.ScriptEngine; import javax.swing.event.EventListenerList; +import org.adempiere.base.Core; +import org.adempiere.base.Service; import org.compiere.util.CLogMgt; import org.compiere.util.CLogger; import org.compiere.util.DB; @@ -2682,6 +2684,13 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable */ public String processCallout (GridField field) { + Object value = field.getValue(); + Object oldValue = field.getOldValue(); + Callout co = Core.getCallout(getTableName(), field.getColumnName()); + if (co!=null) { + return co.start(m_vo.ctx, "", m_vo.WindowNo, this, field, value, oldValue); + } + String callout = field.getCallout(); if (callout.length() == 0) return ""; @@ -2689,8 +2698,6 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable if (isProcessed() && !field.isAlwaysUpdateable()) // only active records return ""; // "DocProcessed"; - Object value = field.getValue(); - Object oldValue = field.getOldValue(); log.fine(field.getColumnName() + "=" + value + " (" + callout + ") - old=" + oldValue); diff --git a/base/src/org/compiere/util/Env.java b/base/src/org/compiere/util/Env.java index 076e681113..aa25b4e9ea 100644 --- a/base/src/org/compiere/util/Env.java +++ b/base/src/org/compiere/util/Env.java @@ -46,6 +46,7 @@ import javax.swing.JFrame; import javax.swing.RepaintManager; import javax.swing.SwingUtilities; +import org.adempiere.base.Core; import org.adempiere.base.IResourceFinder; import org.adempiere.base.Service; import org.compiere.Adempiere; @@ -1485,7 +1486,7 @@ public final class Env */ public static Image getImage (String fileNameInImageDir) { - IResourceFinder rf = Service.locator().getResourceFinder(); + IResourceFinder rf = Core.getResourceFinder(); URL url = rf.getResource("images/" + fileNameInImageDir); // URL url = Adempiere.class.getResource("images/" + fileNameInImageDir); @@ -1506,7 +1507,7 @@ public final class Env */ public static ImageIcon getImageIcon (String fileNameInImageDir) { - IResourceFinder rf = Service.locator().getResourceFinder(); + IResourceFinder rf = Core.getResourceFinder(); URL url = rf.getResource("images/" + fileNameInImageDir); // URL url = Adempiere.class.getResource("images/" + fileNameInImageDir); if (url == null) @@ -1528,7 +1529,7 @@ public final class Env */ public static ImageIcon getImageIcon2 (String fileName) { - IResourceFinder rf = Service.locator().getResourceFinder(); + IResourceFinder rf = Core.getResourceFinder(); URL url = rf.getResource("images/" + fileName+".gif"); // URL url = Adempiere.class.getResource("images/" + fileName+".gif"); if (url == null) diff --git a/client/plugin.xml b/client/plugin.xml index 41786b2054..071f08d40f 100644 --- a/client/plugin.xml +++ b/client/plugin.xml @@ -4,7 +4,7 @@ + point="org.adempiere.base.IResourceFinder"> From 052a829023fa6e213239afa74cb4a6353964ae9f Mon Sep 17 00:00:00 2001 From: Heng Sin Low Date: Tue, 9 Mar 2010 00:27:33 +0000 Subject: [PATCH 12/46] * Separate the new callout extension interface from the classic callout interface. this is to avoid confusion since the methodName argument is not used here and implementation is expected to implement the start method. * Change the getCallout method to findCallout and return a list of registered callout for a column. Callout is not a singleton service and developer can register multiple callout per column * Make consistent with current semantic where callout is not invoke if record is processed and not always updateable. * Make consistent with current semantic where only non empty string return from the callout instance is return to the caller as an error message string. --- base/schema/org.adempiere.base.Callout.exsd | 2 +- base/src/org/adempiere/base/Core.java | 14 +- .../org/adempiere/base/IColumnCallout.java | 48 ++++ base/src/org/compiere/model/Callout.java | 2 +- base/src/org/compiere/model/GridTab.java | 211 ++++++++++-------- 5 files changed, 177 insertions(+), 100 deletions(-) create mode 100755 base/src/org/adempiere/base/IColumnCallout.java diff --git a/base/schema/org.adempiere.base.Callout.exsd b/base/schema/org.adempiere.base.Callout.exsd index a4657b6ea9..f80d1e9141 100644 --- a/base/schema/org.adempiere.base.Callout.exsd +++ b/base/schema/org.adempiere.base.Callout.exsd @@ -58,7 +58,7 @@ Instead, you specify Table and Column in the extension declaration. - + diff --git a/base/src/org/adempiere/base/Core.java b/base/src/org/adempiere/base/Core.java index df6ce32268..643292bc85 100644 --- a/base/src/org/adempiere/base/Core.java +++ b/base/src/org/adempiere/base/Core.java @@ -9,14 +9,14 @@ import org.compiere.model.Callout; /** * This is a facade class for the Service Locator. * It provides simple access to all core services. - * + * * @author viola */ public class Core { public static IResourceFinder getResourceFinder() { return new IResourceFinder() { - + public URL getResource(String name) { List f = Service.list(IResourceFinder.class); for (IResourceFinder finder : f) { @@ -29,13 +29,13 @@ public class Core { }; } - public static Callout getCallout(String tableName, String columnName) { + public static List findCallout(String tableName, String columnName) { ServiceQuery query = new ServiceQuery(); query.put("tableName", tableName); query.put("columnName", columnName); - - return Service.locate(Callout.class, query); + + return Service.list(IColumnCallout.class, query); } - - + + } diff --git a/base/src/org/adempiere/base/IColumnCallout.java b/base/src/org/adempiere/base/IColumnCallout.java new file mode 100755 index 0000000000..baaa3bed4a --- /dev/null +++ b/base/src/org/adempiere/base/IColumnCallout.java @@ -0,0 +1,48 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. * + * This program is free software; you can redistribute it and/or modify it * + * under the terms version 2 of the GNU General Public License as published * + * by the Free Software Foundation. This program is distributed in the hope * + * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * + * See the GNU General Public License for more details. * + * You should have received a copy of the GNU General Public License along * + * with this program; if not, write to the Free Software Foundation, Inc., * + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * + * For the text or an alternative of this public license, you may reach us * + * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * + * or via info@compiere.org or http://www.compiere.org/license.html * + *****************************************************************************/ +package org.adempiere.base; + +import java.util.Properties; + +import org.compiere.model.GridField; +import org.compiere.model.GridTab; + +/** + * Column Callout Interface + */ +public interface IColumnCallout extends IService +{ + /** + * Start Callout. + *

+ * Callout's are used for cross field validation and setting values in other fields + * when returning a non empty (error message) string, an exception is raised + *

+ * When invoked, the Tab model has the new value! + * + * @param ctx Context + * @param WindowNo current Window No + * @param mTab Model Tab + * @param mField Model Field + * @param value The new value + * @param oldValue The old value + * @return Error message or "" + */ + public String start (Properties ctx, int WindowNo, + GridTab mTab, GridField mField, Object value, Object oldValue); + +} diff --git a/base/src/org/compiere/model/Callout.java b/base/src/org/compiere/model/Callout.java index 1709ed74df..3ddfcf7b20 100644 --- a/base/src/org/compiere/model/Callout.java +++ b/base/src/org/compiere/model/Callout.java @@ -27,7 +27,7 @@ import org.adempiere.base.IService; * @author Jorg Janke * @version $Id: Callout.java,v 1.2 2006/07/30 00:51:05 jjanke Exp $ */ -public interface Callout extends IService +public interface Callout { /** * Start Callout. diff --git a/base/src/org/compiere/model/GridTab.java b/base/src/org/compiere/model/GridTab.java index 041ede129a..40ff01a1b3 100644 --- a/base/src/org/compiere/model/GridTab.java +++ b/base/src/org/compiere/model/GridTab.java @@ -38,6 +38,7 @@ import javax.script.ScriptEngine; import javax.swing.event.EventListenerList; import org.adempiere.base.Core; +import org.adempiere.base.IColumnCallout; import org.adempiere.base.Service; import org.compiere.util.CLogMgt; import org.compiere.util.CLogger; @@ -72,7 +73,7 @@ import org.compiere.util.ValueNamePair; * * @author Jorg Janke * @version $Id: GridTab.java,v 1.10 2006/10/02 05:18:39 jjanke Exp $ - * + * * @author Teo Sarca, SC ARHIPAC SERVICE SRL *

  • BF [ 1742159 ] Editable number field for inactive record *
  • BF [ 1968598 ] Callout is not called if tab is processed @@ -86,7 +87,7 @@ import org.compiere.util.ValueNamePair; * https://sourceforge.net/tracker/?func=detail&aid=2874109&group_id=176962&atid=879332 *
  • BF [ 2905287 ] GridTab query is not build correctly * https://sourceforge.net/tracker/?func=detail&aid=2905287&group_id=176962&atid=879332 - * @author Victor Perez , e-Evolution.SC + * @author Victor Perez , e-Evolution.SC *
  • FR [1877902] Implement JSR 223 Scripting APIs to Callout *
  • BF [ 2910358 ] Error in context when a field is found in different tabs. * https://sourceforge.net/tracker/?func=detail&aid=2910358&group_id=176962&atid=879332 @@ -102,12 +103,12 @@ import org.compiere.util.ValueNamePair; public class GridTab implements DataStatusListener, Evaluatee, Serializable { /** - * + * */ private static final long serialVersionUID = -8762357519103152929L; public static final String DEFAULT_STATUS_MESSAGE = "NavigateOrUpdate"; - + /** * Create Tab (Model) from Value Object. *

    @@ -120,7 +121,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable { this(vo, w, false); } - + /** * Create Tab (Model) from Value Object. *

    @@ -196,13 +197,13 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable /** Logger */ protected CLogger log = CLogger.getCLogger(getClass()); - + private boolean m_parentNeedSave = false; private long m_lastDataStatusEventTime; private DataStatusEvent m_lastDataStatusEvent; - + // Context property names: public static final String CTX_KeyColumnName = "_TabInfo_KeyColumnName"; public static final String CTX_LinkColumnName = "_TabInfo_LinkColumnName"; @@ -213,7 +214,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable public static final String CTX_AD_Table_ID = "_TabInfo_AD_Table_ID"; public static final String CTX_FindSQL = "_TabInfo_FindSQL"; public static final String CTX_SQL = "_TabInfo_SQL"; - + /************************************************************************** @@ -258,7 +259,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable { return m_loadComplete; } - + /** * Initialize Tab with record from AD_Tab_v * @param async async @@ -268,7 +269,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable { log.fine("#" + m_vo.TabNo + " - Async=" + async + " - Where=" + m_vo.WhereClause); if (isLoadComplete()) return true; - + if (m_loader != null && m_loader.isAlive()) { waitLoadCompete(); @@ -289,9 +290,9 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable } // initTab protected boolean loadTab() - { + { m_extendedWhere = m_vo.WhereClause; - + // Get Field Data if (!loadFields()) { @@ -305,7 +306,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable m_loadComplete = true; return true; } - + /** * Dispose - clean up resources */ @@ -412,7 +413,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable } } // for all fields - if (! m_mTable.getTableName().equals(X_AD_PInstance_Log.Table_Name)) { // globalqss, bug 1662433 + if (! m_mTable.getTableName().equals(X_AD_PInstance_Log.Table_Name)) { // globalqss, bug 1662433 // Add Standard Fields if (m_mTable.getField("Created") == null) { @@ -609,7 +610,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable public void query (boolean onlyCurrentRows, int onlyCurrentDays, int maxRows) { if (!m_loadComplete) initTab(false); - + log.fine("#" + m_vo.TabNo + " - Only Current Rows=" + onlyCurrentRows + ", Days=" + onlyCurrentDays + ", Detail=" + isDetail()); @@ -645,7 +646,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable { String value = null; if ( m_parentColumnName.length() > 0 ) - { + { // explicit parent link defined value = Env.getContext(m_vo.ctx, m_vo.WindowNo, getParentTabNo(), m_parentColumnName, true); if (value == null || value.length() == 0) @@ -654,8 +655,8 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable value = Env.getContext(m_vo.ctx, m_vo.WindowNo, getParentTabNo(), lc, true); if (value == null || value.length() == 0) value = Env.getContext(m_vo.ctx, m_vo.WindowNo, lc, true); // back compatibility - } - + } + // Same link value? if (refresh) refresh = m_linkValue.equals(value); @@ -933,25 +934,25 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable { if (hasChangedCurrentTabAndParents()) return false; - + boolean retValue = (m_mTable.dataSave(manualCmd) == GridTable.SAVE_OK); if (manualCmd) { setCurrentRow(m_currentRow, false); - if (m_lastDataStatusEvent != null && m_lastDataStatusEvent.getCurrentRow() == m_currentRow - && ((m_lastDataStatusEvent.Record_ID != null && m_lastDataStatusEvent.Record_ID instanceof Integer + if (m_lastDataStatusEvent != null && m_lastDataStatusEvent.getCurrentRow() == m_currentRow + && ((m_lastDataStatusEvent.Record_ID != null && m_lastDataStatusEvent.Record_ID instanceof Integer && (Integer) m_lastDataStatusEvent.Record_ID == 0) || m_lastDataStatusEvent.Record_ID == null)) { updateDataStatusEventProperties(m_lastDataStatusEvent); } } fireStateChangeEvent(new StateChangeEvent(this, StateChangeEvent.DATA_SAVE)); - + if (retValue) { // refresh parent tabs refreshParents(); } - + return retValue; } catch (Exception e) @@ -1052,7 +1053,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable log.fine("#" + m_vo.TabNo); m_mTable.dataIgnore(); setCurrentRow(m_currentRow, false); // re-load data - + fireStateChangeEvent(new StateChangeEvent(this, StateChangeEvent.DATA_IGNORE)); log.fine("#" + m_vo.TabNo + "- fini"); } // dataIgnore @@ -1085,11 +1086,11 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable } log.finest("Processed=" + processed); } - + //hengsin, dont create new when parent is empty if (isDetail() && m_parentNeedSave) return false; - + /** * temporary set currentrow to point to the new row to ensure even cause by m_mTable.dataNew * is handle properly. @@ -1101,7 +1102,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable if (!retValue) return retValue; setCurrentRow(m_currentRow + 1, true); - + // process all Callouts (no dependency check - assumed that settings are valid) for (int i = 0; i < getFieldCount(); i++) processCallout(getField(i)); @@ -1112,7 +1113,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable getField(i).validateValue(); } m_mTable.setChanged(false); - + fireStateChangeEvent(new StateChangeEvent(this, StateChangeEvent.DATA_NEW)); return retValue; } // dataNew @@ -1193,7 +1194,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable { return m_keyColumnName; } // getKeyColumnName - + /** * Set Name of the Key Column * @param keyColumnName @@ -1226,9 +1227,9 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable m_parentColumnName = DB.getSQLValueString(null, sql, m_vo.Parent_Column_ID ); if ( m_parentColumnName == null ) m_parentColumnName = ""; - - - + + + if (linkColumnName != null) m_linkColumnName = linkColumnName; else @@ -1344,7 +1345,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable */ public boolean isDetail() { - // First Tab Level is not a detail + // First Tab Level is not a detail if (m_vo.TabLevel == 0) return false; // We have IsParent columns and/or a link column @@ -1406,7 +1407,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable { if (m_vo.IsReadOnly) return true; - + //hengsin, make detail readonly when parent is empty if (m_parentNeedSave) return true; @@ -1790,7 +1791,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable DB.close(rs, pstmt); rs = null; pstmt = null; } - + if (filled) return mf.format (arguments); return " "; @@ -1857,7 +1858,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable DB.close(rs, pstmt); rs = null; pstmt = null; } - + if (filled) return mf.format (arguments); return " "; @@ -1935,7 +1936,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable if (colFax != null && (colFax.getVFormat() == null || colFax.getVFormat().length() == 0)) fFax.setVFormat(phone_frm); } - + } // loadDependentInfo @@ -2202,11 +2203,11 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable } else // Redistribute Info with current row info fireDataStatusChanged(m_DataStatusEvent); - + //reset m_lastDataStatusEventTime = System.currentTimeMillis(); m_lastDataStatusEvent = m_DataStatusEvent; - m_DataStatusEvent = null; + m_DataStatusEvent = null; // log.fine("dataStatusChanged #" + m_vo.TabNo + "- fini", e.toString()); } // dataStatusChanged @@ -2325,9 +2326,9 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable // Row range check int newRow = verifyRow(targetRow); - + // Check, if we have old uncommitted data - if (m_mTable.dataSave(newRow, false) == false) + if (m_mTable.dataSave(newRow, false) == false) return m_currentRow; //remove/ignore new and unchange row @@ -2337,7 +2338,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable newRow--; dataIgnore(); } - + // new position return setCurrentRow(newRow, true); } // navigate @@ -2427,7 +2428,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable // Object value = null; // if (mField.isKey() || mField.isParent() || mField.getColumnName().equals(m_linkColumnName)) // value = mField.getDefault(); - + // CarlosRuiz - globalqss [ 1881480 ] Navigation problem between tabs // the implementation of linking with window context variables is very weak // you must be careful when defining a column in a detail tab with a field @@ -2453,7 +2454,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable { m_DataStatusEvent = m_lastDataStatusEvent; } - + // inform APanel/.. -> dataStatus with row updated if (m_DataStatusEvent == null) m_DataStatusEvent = new DataStatusEvent(this, getRowCount(), @@ -2465,10 +2466,10 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable if (status == null || status.length() == 0) m_DataStatusEvent.setInfo(DEFAULT_STATUS_MESSAGE, null, false,false); fireDataStatusChanged(m_DataStatusEvent); - + //reset m_DataStatusEvent = null; - + return m_currentRow; } // setCurrentRow @@ -2565,10 +2566,10 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable return "NoField"; log.fine(field.getColumnName() + "=" + value + " - Row=" + m_currentRow); - + if (DisplayType.isID(field.getDisplayType()) && value instanceof Integer && ((Integer)value).intValue() < 0) value = null; - + int col = m_mTable.findColumn(field.getColumnName()); m_mTable.setValueAt(value, m_currentRow, col, false); // @@ -2643,12 +2644,12 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable } // for all dependent fields } // processDependencies - + private List activeCallouts = new ArrayList(); private List activeCalloutInstance = new ArrayList(); - + /** - * + * * @return list of active call out for this tab */ public String[] getActiveCallouts() @@ -2656,9 +2657,9 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable String[] list = new String[activeCallouts.size()]; return activeCallouts.toArray(list); } - + /** - * + * * @return list of active call out instance for this tab */ public Callout[] getActiveCalloutInstance() @@ -2684,20 +2685,48 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable */ public String processCallout (GridField field) { - Object value = field.getValue(); - Object oldValue = field.getOldValue(); - Callout co = Core.getCallout(getTableName(), field.getColumnName()); - if (co!=null) { - return co.start(m_vo.ctx, "", m_vo.WindowNo, this, field, value, oldValue); - } - - String callout = field.getCallout(); - if (callout.length() == 0) - return ""; // if (isProcessed() && !field.isAlwaysUpdateable()) // only active records return ""; // "DocProcessed"; + Object value = field.getValue(); + Object oldValue = field.getOldValue(); + List callouts = Core.findCallout(getTableName(), field.getColumnName()); + if (callouts != null && !callouts.isEmpty()) { + for(IColumnCallout co : callouts) + { + String retValue = ""; + + String cmd = co.getClass().getName(); + //detect infinite loop + if (activeCallouts.contains(cmd)) continue; + try + { + activeCallouts.add(cmd); + retValue = co.start(m_vo.ctx, m_vo.WindowNo, this, field, value, oldValue); + } + catch (Exception e) + { + log.log(Level.SEVERE, "start", e); + retValue = "Callout Invalid: " + e.toString(); + return retValue; + } + finally + { + activeCallouts.remove(cmd); + } + if (!Util.isEmpty(retValue)) // interrupt on first error + { + log.severe (retValue); + return retValue; + } + } + } + + String callout = field.getCallout(); + if (callout.length() == 0) + return ""; + log.fine(field.getColumnName() + "=" + value + " (" + callout + ") - old=" + oldValue); @@ -2705,26 +2734,26 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable while (st.hasMoreTokens()) // for each callout { String cmd = st.nextToken().trim(); - + //detect infinite loop if (activeCallouts.contains(cmd)) continue; - + String retValue = ""; // FR [1877902] // CarlosRuiz - globalqss - implement beanshell callout // Victor Perez - vpj-cd implement JSR 223 Scripting if (cmd.toLowerCase().startsWith(MRule.SCRIPT_PREFIX)) { - + MRule rule = MRule.get(m_vo.ctx, cmd.substring(MRule.SCRIPT_PREFIX.length())); if (rule == null) { - retValue = "Callout " + cmd + " not found"; + retValue = "Callout " + cmd + " not found"; log.log(Level.SEVERE, retValue); return retValue; } - if ( ! (rule.getEventType().equals(MRule.EVENTTYPE_Callout) + if ( ! (rule.getEventType().equals(MRule.EVENTTYPE_Callout) && rule.getRuleType().equals(MRule.RULETYPE_JSR223ScriptingAPIs))) { retValue = "Callout " + cmd - + " must be of type JSR 223 and event Callout"; + + " must be of type JSR 223 and event Callout"; log.log(Level.SEVERE, retValue); return retValue; } @@ -2734,7 +2763,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable // Window context are W_ // Login context are G_ MRule.setContext(engine, m_vo.ctx, m_vo.WindowNo); - // now add the callout parameters windowNo, tab, field, value, oldValue to the engine + // now add the callout parameters windowNo, tab, field, value, oldValue to the engine // Method arguments context are A_ engine.put(MRule.ARGUMENTS_PREFIX + "WindowNo", m_vo.WindowNo); engine.put(MRule.ARGUMENTS_PREFIX + "Tab", this); @@ -2743,7 +2772,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable engine.put(MRule.ARGUMENTS_PREFIX + "OldValue", oldValue); engine.put(MRule.ARGUMENTS_PREFIX + "Ctx", m_vo.ctx); - try + try { activeCallouts.add(cmd); retValue = engine.eval(rule.getScript()).toString(); @@ -2758,7 +2787,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable { activeCallouts.remove(cmd); } - + } else { Callout call = null; @@ -2799,9 +2828,9 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable activeCallouts.remove(cmd); activeCalloutInstance.remove(call); } - - } - + + } + if (!Util.isEmpty(retValue)) // interrupt on first error { log.severe (retValue); @@ -2870,7 +2899,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable return null; return m_mTable.getValueAt(row, col); } // getValue - + /* public boolean isNeedToSaveParent() { @@ -2924,11 +2953,11 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable { m_listenerList.add(DataStatusListener.class, l); } - + /** * @param l */ - public synchronized void addStateChangeListener(StateChangeListener l) + public synchronized void addStateChangeListener(StateChangeListener l) { m_listenerList.add(StateChangeListener.class, l); } @@ -2936,11 +2965,11 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable /** * @param l */ - public synchronized void removeStateChangeListener(StateChangeListener l) + public synchronized void removeStateChangeListener(StateChangeListener l) { m_listenerList.remove(StateChangeListener.class, l); } - + /** * Feature Request [1707462] * Enable runtime change of VFormat @@ -2951,7 +2980,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable public void setFieldVFormat (String identifier, String strNewFormat) { m_mTable.setFieldVFormat(identifier, strNewFormat); - } // setFieldVFormat + } // setFieldVFormat /** * Switches the line/seqNo of the two rows @@ -3010,10 +3039,10 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable if (lineNoCurrentRow >= 9900 || lineNoNextRow >= 9900) { log.fine("don't sort - might be special lines"); - return; + return; } // switch the line numbers and save new values - + m_mTable.setValueAt(lineNoCurrentRow, to, lineCol); setCurrentRow(to, false); m_mTable.dataSave(true); @@ -3028,7 +3057,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable } navigate(to); } - + private void fireStateChangeEvent(StateChangeEvent e) { StateChangeListener[] listeners = m_listenerList.getListeners(StateChangeListener.class); @@ -3037,11 +3066,11 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable for(int i = 0; i < listeners.length; i++) { listeners[i].stateChange(e); } - + } - + /** - * + * * @return list of all tabs included in this tab */ public List getIncludedTabs() @@ -3064,8 +3093,8 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable } return list; } - - //BF [ 2910358 ] + + //BF [ 2910358 ] /** * get Parent Tab No * @return Tab No @@ -3079,9 +3108,9 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable return tabNo; while (parentLevel != currentLevel) { - tabNo--; + tabNo--; currentLevel = Env.getContextAsInt(m_vo.ctx, m_vo.WindowNo, tabNo, GridTab.CTX_TabLevel); } return tabNo; - } + } } // GridTab From 783b3d767f0e98794922c26ed62863f1b001d9d2 Mon Sep 17 00:00:00 2001 From: joergviola Date: Wed, 10 Mar 2010 19:10:24 +0000 Subject: [PATCH 13/46] Added vendor information https://sourceforge.net/tracker/?func=detail&aid=2700937&group_id=176962&atid=879334 --- webstart/feature.xml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/webstart/feature.xml b/webstart/feature.xml index c08674e4e4..7a9f8c7450 100644 --- a/webstart/feature.xml +++ b/webstart/feature.xml @@ -2,7 +2,8 @@ + version="0.0.0.1" + provider-name="Adempiere"> [Enter Feature Description here.] @@ -95,4 +96,11 @@ version="0.0.0" unpack="false"/> + + From 52edb1d22a7f6b0eb3cd8ec97a1c7416fa4aca7f Mon Sep 17 00:00:00 2001 From: joergviola Date: Wed, 10 Mar 2010 19:11:36 +0000 Subject: [PATCH 14/46] Added vendor information https://sourceforge.net/tracker/?func=detail&aid=2700937&group_id=176962&atid=879334 --- webstart/compile.org.adempiere.webstart.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/webstart/compile.org.adempiere.webstart.xml b/webstart/compile.org.adempiere.webstart.xml index a26dbda67a..fe7b83ade1 100644 --- a/webstart/compile.org.adempiere.webstart.xml +++ b/webstart/compile.org.adempiere.webstart.xml @@ -1,8 +1,8 @@ - - - + + + From a93cb8db5fb153f97d985d2e597b881eb67b0c70 Mon Sep 17 00:00:00 2001 From: joergviola Date: Wed, 10 Mar 2010 19:17:42 +0000 Subject: [PATCH 15/46] Complete restructuring of equinox-target, equinox-bridge no longer used. https://sourceforge.net/tracker/?func=detail&aid=2700937&group_id=176962&atid=879334 --- equinox-target/README.txt | 5 -- equinox-target/build.xml | 72 +++++++++++++++++++ equinox-target/configuration/config.ini | 2 +- equinox-target/webapp/WEB-INF/web.xml | 49 +++++++++++++ .../{ => webstart}/adempiere-equinox.jnlp | 2 +- 5 files changed, 123 insertions(+), 7 deletions(-) delete mode 100644 equinox-target/README.txt create mode 100644 equinox-target/build.xml create mode 100644 equinox-target/webapp/WEB-INF/web.xml rename equinox-target/{ => webstart}/adempiere-equinox.jnlp (96%) diff --git a/equinox-target/README.txt b/equinox-target/README.txt deleted file mode 100644 index 4042b4fb3a..0000000000 --- a/equinox-target/README.txt +++ /dev/null @@ -1,5 +0,0 @@ -Currently this is a template. -Copy this folder to somewhere and use it there. - -Reason: This is the runtime environment. -Lots of files are created in various places, which are not supposed to be committed to svn. \ No newline at end of file diff --git a/equinox-target/build.xml b/equinox-target/build.xml new file mode 100644 index 0000000000..fb545857f8 --- /dev/null +++ b/equinox-target/build.xml @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/equinox-target/configuration/config.ini b/equinox-target/configuration/config.ini index fde97e0abd..edb7b17978 100644 --- a/equinox-target/configuration/config.ini +++ b/equinox-target/configuration/config.ini @@ -1,3 +1,3 @@ org.osgi.framework.bootdelegation=* -osgi.bundles=org.eclipse.equinox.common@2:start, org.eclipse.update.configurator@3:start, org.eclipse.core.runtime@4:start, org.adempiere.client@5:start +osgi.bundles=org.eclipse.equinox.common@2:start, org.eclipse.update.configurator@3:start, org.eclipse.core.runtime@4:start, org.adempiere.client@start diff --git a/equinox-target/webapp/WEB-INF/web.xml b/equinox-target/webapp/WEB-INF/web.xml new file mode 100644 index 0000000000..cc51ad9f99 --- /dev/null +++ b/equinox-target/webapp/WEB-INF/web.xml @@ -0,0 +1,49 @@ + + + + + equinoxbridgeservlet + Equinox Bridge Servlet + Equinox Bridge Servlet + org.eclipse.equinox.servletbridge.BridgeServlet + + commandline + -console -clean + + + enableFrameworkControls + true + + + + extendedFrameworkExports + + + + + 1 + + + equinoxbridgeservlet + /* + + + + equinoxbridgeservlet + *.jsp + + diff --git a/equinox-target/adempiere-equinox.jnlp b/equinox-target/webstart/adempiere-equinox.jnlp similarity index 96% rename from equinox-target/adempiere-equinox.jnlp rename to equinox-target/webstart/adempiere-equinox.jnlp index 26177160ce..8660f359a1 100644 --- a/equinox-target/adempiere-equinox.jnlp +++ b/equinox-target/webstart/adempiere-equinox.jnlp @@ -1,7 +1,7 @@ Adempiere Client 3.5.4a From 23cd19d13cb7a09bc6177f463eea9ed722b68679 Mon Sep 17 00:00:00 2001 From: joergviola Date: Wed, 10 Mar 2010 19:24:23 +0000 Subject: [PATCH 16/46] Complete restructuring of equinox-target, equinox-bridge no longer used. https://sourceforge.net/tracker/?func=detail&aid=2700937&group_id=176962&atid=879334 --- .../WEB-INF/eclipse/configuration/config.ini | 3 + .../feature.xml | 76 +++++++++++++++++++ 2 files changed, 79 insertions(+) create mode 100644 equinox-target/webapp/WEB-INF/eclipse/configuration/config.ini create mode 100644 equinox-target/webapp/WEB-INF/eclipse/features/org.eclipse.equinox.servletbridge.feature_1.0.0/feature.xml diff --git a/equinox-target/webapp/WEB-INF/eclipse/configuration/config.ini b/equinox-target/webapp/WEB-INF/eclipse/configuration/config.ini new file mode 100644 index 0000000000..5a1ca3b458 --- /dev/null +++ b/equinox-target/webapp/WEB-INF/eclipse/configuration/config.ini @@ -0,0 +1,3 @@ +#Eclipse Runtime Configuration File +osgi.bundles=org.eclipse.equinox.common@2:start, org.eclipse.update.configurator@start, org.eclipse.equinox.http.servletbridge@start, org.eclipse.equinox.http.registry@start, org.adempiere.zkwebui@start +osgi.bundles.defaultStartLevel=4 diff --git a/equinox-target/webapp/WEB-INF/eclipse/features/org.eclipse.equinox.servletbridge.feature_1.0.0/feature.xml b/equinox-target/webapp/WEB-INF/eclipse/features/org.eclipse.equinox.servletbridge.feature_1.0.0/feature.xml new file mode 100644 index 0000000000..a826af0699 --- /dev/null +++ b/equinox-target/webapp/WEB-INF/eclipse/features/org.eclipse.equinox.servletbridge.feature_1.0.0/feature.xml @@ -0,0 +1,76 @@ + + + + + The Servletbridge feature is used to hold the default plugins and dependencies used to build the bridge WebARchive. + + + + 2006 Cognos Inc. + + + + ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT + + + + + + + + + + + + + + + + + + + From 5cee378e9a59880439ea3a1d30e1fbf7e6869b35 Mon Sep 17 00:00:00 2001 From: joergviola Date: Wed, 10 Mar 2010 19:50:39 +0000 Subject: [PATCH 17/46] equinox-bridge is no longer in use - contained in equinox-target now --- equinox-bridge/.classpath | 8 -- equinox-bridge/.project | 36 --------- equinox-bridge/.settings/.jsdtscope | 11 --- .../.settings/org.eclipse.jdt.core.prefs | 7 -- .../org.eclipse.wst.common.component | 9 --- ....eclipse.wst.common.project.facet.core.xml | 7 -- ...rg.eclipse.wst.jsdt.ui.superType.container | 1 - .../org.eclipse.wst.jsdt.ui.superType.name | 1 - .../WebContent/META-INF/MANIFEST.MF | 3 - .../WEB-INF/eclipse/.eclipseproduct | 0 .../WEB-INF/eclipse/configuration/config.ini | 3 - .../feature.xml | 76 ------------------- .../WebContent/WEB-INF/eclipse/launch.ini | 11 --- equinox-bridge/WebContent/WEB-INF/web.xml | 49 ------------ equinox-bridge/WebContent/index.html | 1 - 15 files changed, 223 deletions(-) delete mode 100644 equinox-bridge/.classpath delete mode 100644 equinox-bridge/.project delete mode 100644 equinox-bridge/.settings/.jsdtscope delete mode 100644 equinox-bridge/.settings/org.eclipse.jdt.core.prefs delete mode 100644 equinox-bridge/.settings/org.eclipse.wst.common.component delete mode 100644 equinox-bridge/.settings/org.eclipse.wst.common.project.facet.core.xml delete mode 100644 equinox-bridge/.settings/org.eclipse.wst.jsdt.ui.superType.container delete mode 100644 equinox-bridge/.settings/org.eclipse.wst.jsdt.ui.superType.name delete mode 100644 equinox-bridge/WebContent/META-INF/MANIFEST.MF delete mode 100644 equinox-bridge/WebContent/WEB-INF/eclipse/.eclipseproduct delete mode 100644 equinox-bridge/WebContent/WEB-INF/eclipse/configuration/config.ini delete mode 100644 equinox-bridge/WebContent/WEB-INF/eclipse/features/org.eclipse.equinox.servletbridge.feature_1.0.0/feature.xml delete mode 100644 equinox-bridge/WebContent/WEB-INF/eclipse/launch.ini delete mode 100644 equinox-bridge/WebContent/WEB-INF/web.xml delete mode 100644 equinox-bridge/WebContent/index.html diff --git a/equinox-bridge/.classpath b/equinox-bridge/.classpath deleted file mode 100644 index 6432cecd40..0000000000 --- a/equinox-bridge/.classpath +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/equinox-bridge/.project b/equinox-bridge/.project deleted file mode 100644 index 2f78eca49c..0000000000 --- a/equinox-bridge/.project +++ /dev/null @@ -1,36 +0,0 @@ - - - equinox-bridge - - - - - - org.eclipse.wst.jsdt.core.javascriptValidator - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.wst.common.project.facet.core.builder - - - - - org.eclipse.wst.validation.validationbuilder - - - - - - org.eclipse.jem.workbench.JavaEMFNature - org.eclipse.wst.common.modulecore.ModuleCoreNature - org.eclipse.wst.common.project.facet.core.nature - org.eclipse.jdt.core.javanature - org.eclipse.wst.jsdt.core.jsNature - - diff --git a/equinox-bridge/.settings/.jsdtscope b/equinox-bridge/.settings/.jsdtscope deleted file mode 100644 index bbb8e68be8..0000000000 --- a/equinox-bridge/.settings/.jsdtscope +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/equinox-bridge/.settings/org.eclipse.jdt.core.prefs b/equinox-bridge/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 8ccb8c7673..0000000000 --- a/equinox-bridge/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,7 +0,0 @@ -#Wed Feb 03 16:04:44 CET 2010 -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 -org.eclipse.jdt.core.compiler.compliance=1.5 -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.5 diff --git a/equinox-bridge/.settings/org.eclipse.wst.common.component b/equinox-bridge/.settings/org.eclipse.wst.common.component deleted file mode 100644 index 0d2e02512f..0000000000 --- a/equinox-bridge/.settings/org.eclipse.wst.common.component +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/equinox-bridge/.settings/org.eclipse.wst.common.project.facet.core.xml b/equinox-bridge/.settings/org.eclipse.wst.common.project.facet.core.xml deleted file mode 100644 index c477e06156..0000000000 --- a/equinox-bridge/.settings/org.eclipse.wst.common.project.facet.core.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/equinox-bridge/.settings/org.eclipse.wst.jsdt.ui.superType.container b/equinox-bridge/.settings/org.eclipse.wst.jsdt.ui.superType.container deleted file mode 100644 index 3bd5d0a480..0000000000 --- a/equinox-bridge/.settings/org.eclipse.wst.jsdt.ui.superType.container +++ /dev/null @@ -1 +0,0 @@ -org.eclipse.wst.jsdt.launching.baseBrowserLibrary \ No newline at end of file diff --git a/equinox-bridge/.settings/org.eclipse.wst.jsdt.ui.superType.name b/equinox-bridge/.settings/org.eclipse.wst.jsdt.ui.superType.name deleted file mode 100644 index 05bd71b6ec..0000000000 --- a/equinox-bridge/.settings/org.eclipse.wst.jsdt.ui.superType.name +++ /dev/null @@ -1 +0,0 @@ -Window \ No newline at end of file diff --git a/equinox-bridge/WebContent/META-INF/MANIFEST.MF b/equinox-bridge/WebContent/META-INF/MANIFEST.MF deleted file mode 100644 index 5e9495128c..0000000000 --- a/equinox-bridge/WebContent/META-INF/MANIFEST.MF +++ /dev/null @@ -1,3 +0,0 @@ -Manifest-Version: 1.0 -Class-Path: - diff --git a/equinox-bridge/WebContent/WEB-INF/eclipse/.eclipseproduct b/equinox-bridge/WebContent/WEB-INF/eclipse/.eclipseproduct deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/equinox-bridge/WebContent/WEB-INF/eclipse/configuration/config.ini b/equinox-bridge/WebContent/WEB-INF/eclipse/configuration/config.ini deleted file mode 100644 index 5a1ca3b458..0000000000 --- a/equinox-bridge/WebContent/WEB-INF/eclipse/configuration/config.ini +++ /dev/null @@ -1,3 +0,0 @@ -#Eclipse Runtime Configuration File -osgi.bundles=org.eclipse.equinox.common@2:start, org.eclipse.update.configurator@start, org.eclipse.equinox.http.servletbridge@start, org.eclipse.equinox.http.registry@start, org.adempiere.zkwebui@start -osgi.bundles.defaultStartLevel=4 diff --git a/equinox-bridge/WebContent/WEB-INF/eclipse/features/org.eclipse.equinox.servletbridge.feature_1.0.0/feature.xml b/equinox-bridge/WebContent/WEB-INF/eclipse/features/org.eclipse.equinox.servletbridge.feature_1.0.0/feature.xml deleted file mode 100644 index a826af0699..0000000000 --- a/equinox-bridge/WebContent/WEB-INF/eclipse/features/org.eclipse.equinox.servletbridge.feature_1.0.0/feature.xml +++ /dev/null @@ -1,76 +0,0 @@ - - - - - The Servletbridge feature is used to hold the default plugins and dependencies used to build the bridge WebARchive. - - - - 2006 Cognos Inc. - - - - ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT - - - - - - - - - - - - - - - - - - - diff --git a/equinox-bridge/WebContent/WEB-INF/eclipse/launch.ini b/equinox-bridge/WebContent/WEB-INF/eclipse/launch.ini deleted file mode 100644 index b850fe3c0f..0000000000 --- a/equinox-bridge/WebContent/WEB-INF/eclipse/launch.ini +++ /dev/null @@ -1,11 +0,0 @@ -# Eclipse Runtime Configuration Overrides -# These properties are loaded prior to starting the framework and can also be used to override System Properties -# @null is a special value used to override and clear the framework's copy of a System Property prior to starting the framework -# "*" can be used together with @null to clear System Properties that match a prefix name. - -osgi.*=@null -org.osgi.*=@null -eclipse.*=@null - -osgi.parentClassloader=ext -osgi.contextClassLoaderParent=ext diff --git a/equinox-bridge/WebContent/WEB-INF/web.xml b/equinox-bridge/WebContent/WEB-INF/web.xml deleted file mode 100644 index cc51ad9f99..0000000000 --- a/equinox-bridge/WebContent/WEB-INF/web.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - - - equinoxbridgeservlet - Equinox Bridge Servlet - Equinox Bridge Servlet - org.eclipse.equinox.servletbridge.BridgeServlet - - commandline - -console -clean - - - enableFrameworkControls - true - - - - extendedFrameworkExports - - - - - 1 - - - equinoxbridgeservlet - /* - - - - equinoxbridgeservlet - *.jsp - - diff --git a/equinox-bridge/WebContent/index.html b/equinox-bridge/WebContent/index.html deleted file mode 100644 index b6fc4c620b..0000000000 --- a/equinox-bridge/WebContent/index.html +++ /dev/null @@ -1 +0,0 @@ -hello \ No newline at end of file From 87447f5c6c4cef4bd80bec7c6c7b93d946aa5926 Mon Sep 17 00:00:00 2001 From: joergviola Date: Thu, 11 Mar 2010 20:37:31 +0000 Subject: [PATCH 18/46] IColumnCallout extension point - experimentally ready --- base/plugin.xml | 2 +- base/src/org/adempiere/base/Core.java | 3 --- .../src/org/compiere/grid/GridController.java | 17 +++++++++++------ equinox-target/build.xml | 4 +++- 4 files changed, 15 insertions(+), 11 deletions(-) diff --git a/base/plugin.xml b/base/plugin.xml index a02eda5e25..f751974f4f 100644 --- a/base/plugin.xml +++ b/base/plugin.xml @@ -2,6 +2,6 @@ - + diff --git a/base/src/org/adempiere/base/Core.java b/base/src/org/adempiere/base/Core.java index 643292bc85..c5e5431ada 100644 --- a/base/src/org/adempiere/base/Core.java +++ b/base/src/org/adempiere/base/Core.java @@ -3,9 +3,6 @@ package org.adempiere.base; import java.net.URL; import java.util.List; -import org.adempiere.base.equinox.ExtensionList; -import org.compiere.model.Callout; - /** * This is a facade class for the Service Locator. * It provides simple access to all core services. diff --git a/client/src/org/compiere/grid/GridController.java b/client/src/org/compiere/grid/GridController.java index 843123af3b..c4a5c3689d 100644 --- a/client/src/org/compiere/grid/GridController.java +++ b/client/src/org/compiere/grid/GridController.java @@ -33,6 +33,7 @@ import java.beans.PropertyVetoException; import java.beans.VetoableChangeListener; import java.util.ArrayList; import java.util.HashSet; +import java.util.List; import java.util.Properties; import java.util.Set; import java.util.logging.Level; @@ -48,6 +49,8 @@ import javax.swing.table.DefaultTableModel; import javax.swing.table.TableColumn; import javax.swing.table.TableColumnModel; +import org.adempiere.base.Core; +import org.adempiere.base.IColumnCallout; import org.adempiere.plaf.AdempiereLookAndFeel; import org.adempiere.plaf.AdempierePLAF; import org.compiere.apps.ADialog; @@ -786,12 +789,14 @@ public class GridController extends CPanel // Process Callout GridField mField = m_mTab.getField(col); - if (mField != null - && (mField.getCallout().length() > 0 || m_mTab.hasDependants(mField.getColumnName()))) - { - String msg = m_mTab.processFieldChange(mField); // Dependencies & Callout - if (msg.length() > 0) - ADialog.error(m_WindowNo, this, msg); + if (mField!=null) { + List callouts = Core.findCallout(m_mTab.getTableName(), mField.getColumnName()); + if (mField.getCallout().length() > 0 || callouts.size()>0 || m_mTab.hasDependants(mField.getColumnName())) + { + String msg = m_mTab.processFieldChange(mField); // Dependencies & Callout + if (msg.length() > 0) + ADialog.error(m_WindowNo, this, msg); + } } //if (col >= 0) dynamicDisplay(col); diff --git a/equinox-target/build.xml b/equinox-target/build.xml index fb545857f8..e4addb3f5f 100644 --- a/equinox-target/build.xml +++ b/equinox-target/build.xml @@ -40,9 +40,11 @@ the following responsibilities: - + + + From 35233b22947cd019de5981c88d906342e3ef81fa Mon Sep 17 00:00:00 2001 From: joergviola Date: Thu, 11 Mar 2010 20:42:41 +0000 Subject: [PATCH 19/46] Test plugin --- plugins/TestPlugin/.classpath | 7 +++++ plugins/TestPlugin/.project | 28 +++++++++++++++++++ .../.settings/org.eclipse.jdt.core.prefs | 8 ++++++ .../.settings/org.eclipse.pde.core.prefs | 4 +++ plugins/TestPlugin/META-INF/MANIFEST.MF | 10 +++++++ plugins/TestPlugin/build.properties | 5 ++++ plugins/TestPlugin/plugin.xml | 13 +++++++++ .../org/adempiere/testplugin/Activator.java | 22 +++++++++++++++ .../org/adempiere/testplugin/MyCallout1.java | 18 ++++++++++++ 9 files changed, 115 insertions(+) create mode 100644 plugins/TestPlugin/.classpath create mode 100644 plugins/TestPlugin/.project create mode 100644 plugins/TestPlugin/.settings/org.eclipse.jdt.core.prefs create mode 100644 plugins/TestPlugin/.settings/org.eclipse.pde.core.prefs create mode 100644 plugins/TestPlugin/META-INF/MANIFEST.MF create mode 100644 plugins/TestPlugin/build.properties create mode 100644 plugins/TestPlugin/plugin.xml create mode 100644 plugins/TestPlugin/src/org/adempiere/testplugin/Activator.java create mode 100644 plugins/TestPlugin/src/org/adempiere/testplugin/MyCallout1.java diff --git a/plugins/TestPlugin/.classpath b/plugins/TestPlugin/.classpath new file mode 100644 index 0000000000..64c5e31b7a --- /dev/null +++ b/plugins/TestPlugin/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/plugins/TestPlugin/.project b/plugins/TestPlugin/.project new file mode 100644 index 0000000000..c076fb0c19 --- /dev/null +++ b/plugins/TestPlugin/.project @@ -0,0 +1,28 @@ + + + TestPlugin + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + + diff --git a/plugins/TestPlugin/.settings/org.eclipse.jdt.core.prefs b/plugins/TestPlugin/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000000..534f9e484d --- /dev/null +++ b/plugins/TestPlugin/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,8 @@ +#Sat Jan 30 21:34:42 CET 2010 +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 +org.eclipse.jdt.core.compiler.compliance=1.5 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.5 diff --git a/plugins/TestPlugin/.settings/org.eclipse.pde.core.prefs b/plugins/TestPlugin/.settings/org.eclipse.pde.core.prefs new file mode 100644 index 0000000000..72573f1b9d --- /dev/null +++ b/plugins/TestPlugin/.settings/org.eclipse.pde.core.prefs @@ -0,0 +1,4 @@ +#Sat Jan 30 21:35:00 CET 2010 +eclipse.preferences.version=1 +pluginProject.extensions=true +resolve.requirebundle=false diff --git a/plugins/TestPlugin/META-INF/MANIFEST.MF b/plugins/TestPlugin/META-INF/MANIFEST.MF new file mode 100644 index 0000000000..9434561756 --- /dev/null +++ b/plugins/TestPlugin/META-INF/MANIFEST.MF @@ -0,0 +1,10 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: TestPlugin +Bundle-SymbolicName: org.adempiere.base.TestPlugin;singleton:=true +Bundle-Version: 0.0.0.1 +Bundle-Activator: org.adempiere.testplugin.Activator +Bundle-ActivationPolicy: lazy +Bundle-RequiredExecutionEnvironment: J2SE-1.5 +Import-Package: org.osgi.framework;version="1.3.0" +Require-Bundle: org.adempiere.base;bundle-version="0.0.0" diff --git a/plugins/TestPlugin/build.properties b/plugins/TestPlugin/build.properties new file mode 100644 index 0000000000..e9863e281e --- /dev/null +++ b/plugins/TestPlugin/build.properties @@ -0,0 +1,5 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + plugin.xml diff --git a/plugins/TestPlugin/plugin.xml b/plugins/TestPlugin/plugin.xml new file mode 100644 index 0000000000..9abc5ee788 --- /dev/null +++ b/plugins/TestPlugin/plugin.xml @@ -0,0 +1,13 @@ + + + + + + + + + diff --git a/plugins/TestPlugin/src/org/adempiere/testplugin/Activator.java b/plugins/TestPlugin/src/org/adempiere/testplugin/Activator.java new file mode 100644 index 0000000000..5df28ad1b2 --- /dev/null +++ b/plugins/TestPlugin/src/org/adempiere/testplugin/Activator.java @@ -0,0 +1,22 @@ +package org.adempiere.testplugin; + +import org.osgi.framework.BundleActivator; +import org.osgi.framework.BundleContext; + +public class Activator implements BundleActivator { + + /* + * (non-Javadoc) + * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext) + */ + public void start(BundleContext context) throws Exception { + } + + /* + * (non-Javadoc) + * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext) + */ + public void stop(BundleContext context) throws Exception { + } + +} diff --git a/plugins/TestPlugin/src/org/adempiere/testplugin/MyCallout1.java b/plugins/TestPlugin/src/org/adempiere/testplugin/MyCallout1.java new file mode 100644 index 0000000000..34bc7d1afb --- /dev/null +++ b/plugins/TestPlugin/src/org/adempiere/testplugin/MyCallout1.java @@ -0,0 +1,18 @@ +package org.adempiere.testplugin; + +import java.util.Properties; + +import org.adempiere.base.IColumnCallout; +import org.compiere.model.Callout; +import org.compiere.model.GridField; +import org.compiere.model.GridTab; + +public class MyCallout1 implements IColumnCallout { + + public String start(Properties ctx, int WindowNo, GridTab mTab, + GridField mField, Object value, Object oldValue) { + System.out.println("Callout on C_Order.Description: "+oldValue+"->"+value); + return null; + } + +} From 21d6e6a8a2b996f308cc2f3e87650e359467114c Mon Sep 17 00:00:00 2001 From: joergviola Date: Fri, 12 Mar 2010 18:07:05 +0000 Subject: [PATCH 20/46] pipo (2pack) dictionary service implementation --- plugins/pipo/.classpath | 7 ++ plugins/pipo/.project | 28 +++++++ .../pipo/.settings/org.eclipse.jdt.core.prefs | 8 ++ .../pipo/.settings/org.eclipse.pde.core.prefs | 4 + plugins/pipo/META-INF/MANIFEST.MF | 10 +++ plugins/pipo/build.properties | 5 ++ plugins/pipo/plugin.xml | 11 +++ .../adempiere/pipo/PipoDictionaryService.java | 74 +++++++++++++++++++ 8 files changed, 147 insertions(+) create mode 100644 plugins/pipo/.classpath create mode 100644 plugins/pipo/.project create mode 100644 plugins/pipo/.settings/org.eclipse.jdt.core.prefs create mode 100644 plugins/pipo/.settings/org.eclipse.pde.core.prefs create mode 100644 plugins/pipo/META-INF/MANIFEST.MF create mode 100644 plugins/pipo/build.properties create mode 100644 plugins/pipo/plugin.xml create mode 100644 plugins/pipo/src/org/adempiere/pipo/PipoDictionaryService.java diff --git a/plugins/pipo/.classpath b/plugins/pipo/.classpath new file mode 100644 index 0000000000..ad32c83a78 --- /dev/null +++ b/plugins/pipo/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/plugins/pipo/.project b/plugins/pipo/.project new file mode 100644 index 0000000000..3c9fc47d88 --- /dev/null +++ b/plugins/pipo/.project @@ -0,0 +1,28 @@ + + + pipo + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + + diff --git a/plugins/pipo/.settings/org.eclipse.jdt.core.prefs b/plugins/pipo/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000000..ceb61221f1 --- /dev/null +++ b/plugins/pipo/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,8 @@ +#Fri Mar 12 08:48:46 CET 2010 +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 +org.eclipse.jdt.core.compiler.compliance=1.6 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.6 diff --git a/plugins/pipo/.settings/org.eclipse.pde.core.prefs b/plugins/pipo/.settings/org.eclipse.pde.core.prefs new file mode 100644 index 0000000000..173c0ad34c --- /dev/null +++ b/plugins/pipo/.settings/org.eclipse.pde.core.prefs @@ -0,0 +1,4 @@ +#Fri Mar 12 15:16:08 CET 2010 +eclipse.preferences.version=1 +pluginProject.extensions=true +resolve.requirebundle=false diff --git a/plugins/pipo/META-INF/MANIFEST.MF b/plugins/pipo/META-INF/MANIFEST.MF new file mode 100644 index 0000000000..7614ebbee9 --- /dev/null +++ b/plugins/pipo/META-INF/MANIFEST.MF @@ -0,0 +1,10 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: PiPo +Bundle-SymbolicName: org.adempiere.pipo;singleton:=true +Bundle-Version: 0.0.0.1 +Bundle-RequiredExecutionEnvironment: JavaSE-1.6 +Import-Package: org.adempiere.base, + org.adempiere.pipo, + org.compiere, + org.compiere.util diff --git a/plugins/pipo/build.properties b/plugins/pipo/build.properties new file mode 100644 index 0000000000..e9863e281e --- /dev/null +++ b/plugins/pipo/build.properties @@ -0,0 +1,5 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + plugin.xml diff --git a/plugins/pipo/plugin.xml b/plugins/pipo/plugin.xml new file mode 100644 index 0000000000..61312c4cbb --- /dev/null +++ b/plugins/pipo/plugin.xml @@ -0,0 +1,11 @@ + + + + + + + + + diff --git a/plugins/pipo/src/org/adempiere/pipo/PipoDictionaryService.java b/plugins/pipo/src/org/adempiere/pipo/PipoDictionaryService.java new file mode 100644 index 0000000000..300fc164a6 --- /dev/null +++ b/plugins/pipo/src/org/adempiere/pipo/PipoDictionaryService.java @@ -0,0 +1,74 @@ +package org.adempiere.pipo; + +import java.io.File; +import java.io.InputStream; +import java.util.logging.Level; +import java.util.logging.Logger; + +import javax.xml.parsers.SAXParser; +import javax.xml.parsers.SAXParserFactory; + +import org.adempiere.base.IDictionaryService; +import org.compiere.Adempiere; +import org.compiere.util.DB; +import org.compiere.util.Trx; + +public class PipoDictionaryService implements IDictionaryService { + + Logger logger = Logger.getLogger(PipoDictionaryService.class.getName()); + + @Override + public void merge(InputStream model) throws Exception { + if (model == null) { + logger.info("No PackIn Model found"); + return; + } + try { + String trxName = Trx.createTrxName(); + logger.info("starting " + trxName); + PackIn.m_UpdateMode = "true"; + if (DB.isOracle()) + PackIn.m_Database = "Oracle"; + else if (DB.isPostgreSQL()) + PackIn.m_Database = "PostgreSQL"; + PackIn.m_Package_Dir = getPackageDir(); + + System.setProperty("javax.xml.parsers.SAXParserFactory", + "org.apache.xerces.jaxp.SAXParserFactoryImpl"); + PackInHandler handler = new PackInHandler(); + handler.set_TrxName(trxName); + handler.setCtx(null); + PackIn packIn = new PackIn(); + handler.setProcess(packIn); + SAXParserFactory factory = SAXParserFactory.newInstance(); + SAXParser parser = factory.newSAXParser(); + logger.info("Start Parser"); + parser.parse(model, handler); + logger.info("End Parser"); + Trx.get(trxName, false).commit(); + logger.info("commit " + trxName); + } catch (Exception e) { + logger.log(Level.SEVERE, "importXML:", e); + throw e; + } + + } + + private String getPackageDir() { + + // Create Target directory if required + String packageDirectory = Adempiere.getAdempiereHome(); + String result = packageDirectory + File.separator + + "packages"; + File docDir = new File( result+File.separator+"doc"); + + if (!docDir.exists()) { + boolean success = docDir.mkdirs(); + if (!success) { + logger.info("Target directory creation failed"); + } + } + return result; + } + +} From 72418fa47cd3b24513e0529843a5f419998e140a Mon Sep 17 00:00:00 2001 From: joergviola Date: Fri, 12 Mar 2010 18:15:16 +0000 Subject: [PATCH 21/46] Plugin Utility Bundle --- plugins/pluginUtils/.classpath | 7 ++ plugins/pluginUtils/.project | 28 +++++ .../.settings/org.eclipse.jdt.core.prefs | 8 ++ .../.settings/org.eclipse.pde.core.prefs | 4 + plugins/pluginUtils/META-INF/MANIFEST.MF | 11 ++ plugins/pluginUtils/build.properties | 4 + .../plugin/utils/AdempiereActivator.java | 103 ++++++++++++++++++ 7 files changed, 165 insertions(+) create mode 100644 plugins/pluginUtils/.classpath create mode 100644 plugins/pluginUtils/.project create mode 100644 plugins/pluginUtils/.settings/org.eclipse.jdt.core.prefs create mode 100644 plugins/pluginUtils/.settings/org.eclipse.pde.core.prefs create mode 100644 plugins/pluginUtils/META-INF/MANIFEST.MF create mode 100644 plugins/pluginUtils/build.properties create mode 100644 plugins/pluginUtils/src/org/adempiere/plugin/utils/AdempiereActivator.java diff --git a/plugins/pluginUtils/.classpath b/plugins/pluginUtils/.classpath new file mode 100644 index 0000000000..ad32c83a78 --- /dev/null +++ b/plugins/pluginUtils/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/plugins/pluginUtils/.project b/plugins/pluginUtils/.project new file mode 100644 index 0000000000..29dc1d61a3 --- /dev/null +++ b/plugins/pluginUtils/.project @@ -0,0 +1,28 @@ + + + pluginUtils + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + + diff --git a/plugins/pluginUtils/.settings/org.eclipse.jdt.core.prefs b/plugins/pluginUtils/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000000..ef6af465ad --- /dev/null +++ b/plugins/pluginUtils/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,8 @@ +#Fri Mar 12 08:32:19 CET 2010 +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 +org.eclipse.jdt.core.compiler.compliance=1.6 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.6 diff --git a/plugins/pluginUtils/.settings/org.eclipse.pde.core.prefs b/plugins/pluginUtils/.settings/org.eclipse.pde.core.prefs new file mode 100644 index 0000000000..e72eeee76a --- /dev/null +++ b/plugins/pluginUtils/.settings/org.eclipse.pde.core.prefs @@ -0,0 +1,4 @@ +#Fri Mar 12 08:32:19 CET 2010 +eclipse.preferences.version=1 +pluginProject.extensions=false +resolve.requirebundle=false diff --git a/plugins/pluginUtils/META-INF/MANIFEST.MF b/plugins/pluginUtils/META-INF/MANIFEST.MF new file mode 100644 index 0000000000..b2e9d65818 --- /dev/null +++ b/plugins/pluginUtils/META-INF/MANIFEST.MF @@ -0,0 +1,11 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: PluginUtils +Bundle-SymbolicName: org.adempiere.pluginUtils +Bundle-Version: 0.0.0.1 +Bundle-RequiredExecutionEnvironment: JavaSE-1.6 +Import-Package: org.adempiere.base, + org.compiere.model, + org.compiere.util, + org.osgi.framework;version="1.5.0" +Export-Package: org.adempiere.plugin.utils diff --git a/plugins/pluginUtils/build.properties b/plugins/pluginUtils/build.properties new file mode 100644 index 0000000000..34d2e4d2da --- /dev/null +++ b/plugins/pluginUtils/build.properties @@ -0,0 +1,4 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + . diff --git a/plugins/pluginUtils/src/org/adempiere/plugin/utils/AdempiereActivator.java b/plugins/pluginUtils/src/org/adempiere/plugin/utils/AdempiereActivator.java new file mode 100644 index 0000000000..33cacb20a4 --- /dev/null +++ b/plugins/pluginUtils/src/org/adempiere/plugin/utils/AdempiereActivator.java @@ -0,0 +1,103 @@ +package org.adempiere.plugin.utils; + +import java.io.InputStream; +import java.util.logging.Level; +import java.util.logging.Logger; + +import org.adempiere.base.IDictionaryService; +import org.adempiere.base.Service; +import org.compiere.model.Query; +import org.compiere.model.X_AD_Package_Imp; +import org.compiere.model.X_AD_Package_Imp_Inst; +import org.compiere.util.Env; +import org.compiere.util.Trx; +import org.osgi.framework.BundleActivator; +import org.osgi.framework.BundleContext; + +public class AdempiereActivator implements BundleActivator { + + private final static Logger logger = Logger + .getLogger(AdempiereActivator.class.getName()); + private BundleContext context; + + @Override + public void start(BundleContext context) throws Exception { + this.context = context; + logger.info(getName() + " " + getVersion() + " starting..."); + installPackage(); + start(); + logger.info(getName() + " " + getVersion() + " ready."); + } + + public String getName() { + return context.getBundle().getSymbolicName(); + } + + public String getVersion() { + return (String) context.getBundle().getHeaders().get("Bundle-Version"); + } + + public String getDescription() { + return getName(); + } + + private void installPackage() { + String trxName = Trx.createTrxName(); + String where = "Name=? AND PK_Version=?"; + Query q = new Query(Env.getCtx(), X_AD_Package_Imp.Table_Name, + where.toString(), trxName); + q.setParameters(new Object[] { getName(), getVersion() }); + X_AD_Package_Imp pkg = q.first(); + if (pkg == null) { + packIn(trxName); + install(); + logger.info(getName() + " " + getVersion() + " installed."); + } else { + logger.info(getName() + " " + getVersion() + " was installed: " + + pkg.getCreated()); + } + Trx.get(trxName, false).commit(); + } + + protected void packIn(String trxName) { + InputStream packout = this.getClass().getResourceAsStream( + "/META-INF/PackOut.xml"); + if (packout != null) { + IDictionaryService service = Service.locate(IDictionaryService.class); + try { + service.merge(packout); + } catch (Exception e) { + logger.log(Level.WARNING, "Error on Dictionary service", e); + } + } + X_AD_Package_Imp pkg = new X_AD_Package_Imp(Env.getCtx(), + 0, trxName); + pkg.setName(getName()); + pkg.setPK_Version(getVersion()); + pkg.setPK_Status("Installed."); + pkg.setDescription(getDescription()); + pkg.save(trxName); + } + + protected BundleContext getContext() { + return context; + } + + @Override + public void stop(BundleContext context) throws Exception { + stop(); + logger.info(context.getBundle().getSymbolicName() + " " + + context.getBundle().getHeaders().get("Bundle-Version") + + " stopped."); + } + + protected void install() { + }; + + protected void start() { + }; + + protected void stop() { + }; + +} From c33f850d6d0538758a25bfea15fd91dab15945af Mon Sep 17 00:00:00 2001 From: joergviola Date: Fri, 12 Mar 2010 18:48:33 +0000 Subject: [PATCH 22/46] Pipo Dictionary Service implementation (2pack) https://sourceforge.net/tracker/?func=detail&aid=2700937&group_id=176962&atid=879334 --- base/plugin.xml | 1 + ...org.adempiere.base.IDictionaryService.exsd | 102 ++++++++++++++++++ .../adempiere/base/IDictionaryService.java | 29 +++++ plugins/TestPlugin/META-INF/MANIFEST.MF | 3 +- .../org/adempiere/testplugin/Activator.java | 23 ++-- 5 files changed, 144 insertions(+), 14 deletions(-) create mode 100644 base/schema/org.adempiere.base.IDictionaryService.exsd create mode 100644 base/src/org/adempiere/base/IDictionaryService.java diff --git a/base/plugin.xml b/base/plugin.xml index f751974f4f..d960b2b036 100644 --- a/base/plugin.xml +++ b/base/plugin.xml @@ -3,5 +3,6 @@ + diff --git a/base/schema/org.adempiere.base.IDictionaryService.exsd b/base/schema/org.adempiere.base.IDictionaryService.exsd new file mode 100644 index 0000000000..a5da49f38e --- /dev/null +++ b/base/schema/org.adempiere.base.IDictionaryService.exsd @@ -0,0 +1,102 @@ + + + + + + + + + [Enter description of this extension point.] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + [Enter the first release in which this extension point appears.] + + + + + + + + + [Enter extension point usage example here.] + + + + + + + + + [Enter API information here.] + + + + + + + + + [Enter information about supplied implementation of this extension point.] + + + + + diff --git a/base/src/org/adempiere/base/IDictionaryService.java b/base/src/org/adempiere/base/IDictionaryService.java new file mode 100644 index 0000000000..00b894c91a --- /dev/null +++ b/base/src/org/adempiere/base/IDictionaryService.java @@ -0,0 +1,29 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * This program is free software; you can redistribute it and/or modify it * + * under the terms version 2 of the GNU General Public License as published * + * by the Free Software Foundation. This program is distributed in the hope * + * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * + * See the GNU General Public License for more details. * + * You should have received a copy of the GNU General Public License along * + * with this program; if not, write to the Free Software Foundation, Inc., * + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * + * For the text or an alternative of this public license, you may reach us * + * Copyright (C) 2009 ObjectCode GmbH * + * Contributor(s): Joerg Viola www.objectcode.de * + *****************************************************************************/ +package org.adempiere.base; + +import java.io.InputStream; + +/** + * A dictionary service provides for easy handling of dynamic Adempiere + * dictionary. + * + * @author Joerg Viola + * + */ +public interface IDictionaryService extends IService { + void merge(InputStream model) throws Exception; +} diff --git a/plugins/TestPlugin/META-INF/MANIFEST.MF b/plugins/TestPlugin/META-INF/MANIFEST.MF index 9434561756..36a9037756 100644 --- a/plugins/TestPlugin/META-INF/MANIFEST.MF +++ b/plugins/TestPlugin/META-INF/MANIFEST.MF @@ -6,5 +6,6 @@ Bundle-Version: 0.0.0.1 Bundle-Activator: org.adempiere.testplugin.Activator Bundle-ActivationPolicy: lazy Bundle-RequiredExecutionEnvironment: J2SE-1.5 -Import-Package: org.osgi.framework;version="1.3.0" +Import-Package: org.adempiere.plugin.utils, + org.osgi.framework;version="1.3.0" Require-Bundle: org.adempiere.base;bundle-version="0.0.0" diff --git a/plugins/TestPlugin/src/org/adempiere/testplugin/Activator.java b/plugins/TestPlugin/src/org/adempiere/testplugin/Activator.java index 5df28ad1b2..17824addd1 100644 --- a/plugins/TestPlugin/src/org/adempiere/testplugin/Activator.java +++ b/plugins/TestPlugin/src/org/adempiere/testplugin/Activator.java @@ -1,22 +1,19 @@ package org.adempiere.testplugin; +import org.adempiere.base.Service; +import org.adempiere.plugin.utils.AdempiereActivator; import org.osgi.framework.BundleActivator; import org.osgi.framework.BundleContext; -public class Activator implements BundleActivator { +public class Activator extends AdempiereActivator { - /* - * (non-Javadoc) - * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext) - */ - public void start(BundleContext context) throws Exception { + @Override + protected void start() { + System.out.println("Testplugin starting..."); } - - /* - * (non-Javadoc) - * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext) - */ - public void stop(BundleContext context) throws Exception { + + @Override + protected void stop() { + System.out.println("Testplugin stopping..."); } - } From 0798948086230ec38ea0878927ac5bb9be3c45c6 Mon Sep 17 00:00:00 2001 From: joergviola Date: Sun, 14 Mar 2010 14:38:00 +0000 Subject: [PATCH 23/46] Merged trunk 11345 to 11658 into branches/osgi/approach2 --- .classpath | 2 + .../org/compiere/report/ReportStarter.java | 29 +- base/.classpath | 1 + base/build.xml | 1 + .../adempiere/model/ExportModelValidator.java | 62 +- .../org/adempiere/model/GridTabWrapper.java | 6 +- .../org/adempiere/model/PromotionRule.java | 47 +- .../adempiere/model/PromotionValidator.java | 9 +- .../process/ClientAcctProcessor.java | 120 +- .../process/ExpenseTypesFromAccounts.java | 46 +- .../adempiere/process/InOutGenerateRMA.java | 7 +- .../process/rpl/exp/ExportHelper.java | 312 +-- .../process/rpl/imp/ImportHelper.java | 177 +- base/src/org/compiere/acct/Doc.java | 85 +- base/src/org/compiere/acct/DocLine.java | 2244 +++++++++-------- base/src/org/compiere/acct/Doc_MatchInv.java | 6 + base/src/org/compiere/acct/Doc_MatchPO.java | 4 + base/src/org/compiere/acct/FactLine.java | 10 + .../compiere/model/AdempiereProcessor2.java | 28 + base/src/org/compiere/model/CalloutOrder.java | 21 +- base/src/org/compiere/model/GridField.java | 46 +- base/src/org/compiere/model/GridTable.java | 24 +- .../org/compiere/model/I_AD_Scheduler.java | 26 + .../model/I_C_AcctSchema_Default.java | 19 +- .../org/compiere/model/I_C_AllocationHdr.java | 13 + .../org/compiere/model/I_C_BankStatement.java | 13 + base/src/org/compiere/model/I_C_Cash.java | 13 + base/src/org/compiere/model/I_C_Invoice.java | 17 +- base/src/org/compiere/model/I_C_Order.java | 21 +- base/src/org/compiere/model/I_C_Payment.java | 13 + .../org/compiere/model/I_C_ProjectIssue.java | 13 + base/src/org/compiere/model/I_GL_Journal.java | 13 + .../org/compiere/model/I_I_ReportLine.java | 39 +- base/src/org/compiere/model/I_M_InOut.java | 13 + .../src/org/compiere/model/I_M_Inventory.java | 13 + base/src/org/compiere/model/I_M_MatchInv.java | 13 + base/src/org/compiere/model/I_M_MatchPO.java | 13 + base/src/org/compiere/model/I_M_Movement.java | 13 + .../org/compiere/model/I_M_Product_Acct.java | 15 + .../model/I_M_Product_Category_Acct.java | 15 + .../org/compiere/model/I_M_Production.java | 13 + .../org/compiere/model/I_M_Requisition.java | 13 + .../org/compiere/model/I_PA_ReportColumn.java | 39 +- .../org/compiere/model/I_PA_ReportLine.java | 39 +- base/src/org/compiere/model/MAccount.java | 12 +- .../org/compiere/model/MAccountLookup.java | 12 +- .../org/compiere/model/MAcctProcessor.java | 6 +- base/src/org/compiere/model/MAcctSchema.java | 2 +- .../compiere/model/MAcctSchemaDefault.java | 16 +- .../compiere/model/MAcctSchemaElement.java | 17 +- .../src/org/compiere/model/MAcctSchemaGL.java | 16 +- base/src/org/compiere/model/MAchievement.java | 12 +- base/src/org/compiere/model/MAlert.java | 12 +- .../org/compiere/model/MAlertProcessor.java | 85 +- .../org/compiere/model/MAllocationHdr.java | 8 +- base/src/org/compiere/model/MAttachment.java | 37 +- .../src/org/compiere/model/MAttributeSet.java | 10 +- base/src/org/compiere/model/MBOM.java | 40 +- base/src/org/compiere/model/MBOMProduct.java | 38 +- .../org/compiere/model/MBPBankAccount.java | 41 +- base/src/org/compiere/model/MBPartner.java | 49 +- .../org/compiere/model/MBPartnerLocation.java | 2 +- .../org/compiere/model/MBankStatement.java | 40 +- base/src/org/compiere/model/MCash.java | 18 +- base/src/org/compiere/model/MCommission.java | 6 +- .../org/compiere/model/MCommissionAmt.java | 38 +- .../org/compiere/model/MCommissionRun.java | 48 +- base/src/org/compiere/model/MContainer.java | 32 +- .../org/compiere/model/MContainerElement.java | 43 +- .../org/compiere/model/MConversionRate.java | 12 +- base/src/org/compiere/model/MCost.java | 9 +- base/src/org/compiere/model/MCostElement.java | 168 +- base/src/org/compiere/model/MCurrency.java | 4 +- base/src/org/compiere/model/MDocType.java | 9 +- base/src/org/compiere/model/MDunningRun.java | 6 +- base/src/org/compiere/model/MEXPFormat.java | 24 +- .../src/org/compiere/model/MElementValue.java | 8 +- base/src/org/compiere/model/MFactAcct.java | 17 +- .../org/compiere/model/MFreightCategory.java | 6 +- base/src/org/compiere/model/MInOut.java | 17 +- .../src/org/compiere/model/MInOutConfirm.java | 6 +- base/src/org/compiere/model/MInOutLine.java | 4 +- base/src/org/compiere/model/MInOutLineMA.java | 4 +- base/src/org/compiere/model/MInventory.java | 7 +- .../org/compiere/model/MInventoryLine.java | 7 +- base/src/org/compiere/model/MInvoice.java | 24 +- base/src/org/compiere/model/MInvoiceTax.java | 2 +- base/src/org/compiere/model/MJournal.java | 6 +- .../src/org/compiere/model/MJournalBatch.java | 11 +- base/src/org/compiere/model/MLanguage.java | 7 +- base/src/org/compiere/model/MLot.java | 35 +- base/src/org/compiere/model/MMatchInv.java | 26 +- base/src/org/compiere/model/MMatchPO.java | 1 - base/src/org/compiere/model/MMovement.java | 8 +- .../src/org/compiere/model/MMovementLine.java | 2 +- base/src/org/compiere/model/MOrder.java | 32 +- base/src/org/compiere/model/MOrg.java | 2 +- base/src/org/compiere/model/MOrgInfo.java | 2 +- base/src/org/compiere/model/MPInstance.java | 48 +- base/src/org/compiere/model/MPOS.java | 2 +- .../src/org/compiere/model/MPaySelection.java | 49 +- .../compiere/model/MPaySelectionCheck.java | 7 +- base/src/org/compiere/model/MPayment.java | 45 +- .../org/compiere/model/MPaymentAllocate.java | 4 +- base/src/org/compiere/model/MPeriod.java | 10 +- base/src/org/compiere/model/MPriceList.java | 17 +- base/src/org/compiere/model/MProcess.java | 15 +- base/src/org/compiere/model/MProduct.java | 36 +- base/src/org/compiere/model/MProductBOM.java | 41 +- .../compiere/model/MProductCategoryAcct.java | 2 +- .../org/compiere/model/MProductCosting.java | 15 +- base/src/org/compiere/model/MProductPO.java | 5 +- .../src/org/compiere/model/MProductPrice.java | 39 +- .../org/compiere/model/MProductPricing.java | 30 +- base/src/org/compiere/model/MProject.java | 112 +- base/src/org/compiere/model/MQuery.java | 136 +- base/src/org/compiere/model/MRMA.java | 4 +- base/src/org/compiere/model/MRMALine.java | 4 +- base/src/org/compiere/model/MRefList.java | 2 +- base/src/org/compiere/model/MReplenish.java | 7 +- .../compiere/model/MReplicationStrategy.java | 69 +- base/src/org/compiere/model/MRequest.java | 11 +- base/src/org/compiere/model/MRequestType.java | 52 +- base/src/org/compiere/model/MRequisition.java | 8 +- .../org/compiere/model/MRequisitionLine.java | 10 +- .../compiere/model/MResourceUnAvailable.java | 7 +- base/src/org/compiere/model/MRule.java | 66 +- base/src/org/compiere/model/MScheduler.java | 69 +- base/src/org/compiere/model/MSetup.java | 8 + base/src/org/compiere/model/MShipper.java | 4 +- .../compiere/model/MTableScriptValidator.java | 2 +- base/src/org/compiere/model/MTax.java | 38 +- base/src/org/compiere/model/MTaxCategory.java | 8 +- .../org/compiere/model/MUOMConversion.java | 2 +- base/src/org/compiere/model/MUser.java | 14 +- base/src/org/compiere/model/MUserRoles.java | 69 +- base/src/org/compiere/model/MWarehouse.java | 17 +- base/src/org/compiere/model/MWindow.java | 62 +- base/src/org/compiere/model/M_Element.java | 17 +- .../compiere/model/ModelValidationEngine.java | 11 +- base/src/org/compiere/model/PO.java | 46 +- .../org/compiere/model/PP_PayFlowPro4.java | 272 ++ base/src/org/compiere/model/ProductCost.java | 19 +- base/src/org/compiere/model/Query.java | 3 +- .../org/compiere/model/X_AD_Scheduler.java | 47 +- .../model/X_C_AcctSchema_Default.java | 31 +- .../org/compiere/model/X_C_AllocationHdr.java | 22 +- .../org/compiere/model/X_C_BankStatement.java | 22 +- base/src/org/compiere/model/X_C_Cash.java | 22 +- base/src/org/compiere/model/X_C_Invoice.java | 30 +- base/src/org/compiere/model/X_C_Order.java | 33 +- base/src/org/compiere/model/X_C_Payment.java | 22 +- .../org/compiere/model/X_C_ProjectIssue.java | 22 +- base/src/org/compiere/model/X_GL_Journal.java | 22 +- .../org/compiere/model/X_I_ReportLine.java | 108 +- base/src/org/compiere/model/X_M_InOut.java | 22 +- .../src/org/compiere/model/X_M_Inventory.java | 22 +- base/src/org/compiere/model/X_M_MatchInv.java | 22 +- base/src/org/compiere/model/X_M_MatchPO.java | 22 +- base/src/org/compiere/model/X_M_Movement.java | 22 +- .../org/compiere/model/X_M_Product_Acct.java | 27 +- .../model/X_M_Product_Category_Acct.java | 27 +- .../org/compiere/model/X_M_Production.java | 24 +- .../org/compiere/model/X_M_Requisition.java | 22 +- .../org/compiere/model/X_PA_ReportColumn.java | 108 +- .../org/compiere/model/X_PA_ReportLine.java | 108 +- .../process/AcctSchemaDefaultCopy.java | 9 +- .../org/compiere/process/AllocationReset.java | 6 + .../compiere/process/BPartnerValidate.java | 7 +- .../org/compiere/process/DistributionRun.java | 5 +- .../org/compiere/process/DocumentEngine.java | 20 +- .../org/compiere/process/ImportBPartner.java | 28 +- .../src/org/compiere/process/ImportOrder.java | 15 + .../compiere/process/ImportReportLine.java | 30 +- base/src/org/compiere/process/InvoiceNGL.java | 7 +- .../compiere/process/M_PriceList_Create.java | 153 +- .../compiere/process/M_Production_Run.java | 4 +- .../process/PaySelectionCreateFrom.java | 15 +- .../process/ProductCategoryAcctCopy.java | 8 +- .../process/RequestEMailProcessor.java | 47 +- .../compiere/process/RequisitionPOCreate.java | 6 +- base/src/org/compiere/report/FinReport.java | 28 +- .../org/compiere/report/MReportColumn.java | 62 +- base/src/org/compiere/report/MReportLine.java | 65 +- base/src/org/compiere/util/CLogFile.java | 6 +- base/src/org/compiere/util/Language.java | 18 +- base/src/org/compiere/wf/MWFActivity.java | 43 +- base/src/org/eevolution/model/I_DD_Order.java | 13 + .../org/eevolution/model/I_HR_Process.java | 13 + .../eevolution/model/I_I_ProductPlanning.java | 652 +++++ .../eevolution/model/I_PP_Cost_Collector.java | 31 +- base/src/org/eevolution/model/I_PP_Order.java | 69 +- .../model/I_PP_Product_Planning.java | 50 +- base/src/org/eevolution/model/MDDOrder.java | 8 +- base/src/org/eevolution/model/X_DD_Order.java | 27 +- .../org/eevolution/model/X_HR_Process.java | 24 +- .../eevolution/model/X_I_ProductPlanning.java | 994 ++++++++ .../eevolution/model/X_PP_Cost_Collector.java | 41 +- base/src/org/eevolution/model/X_PP_Order.java | 88 +- .../model/X_PP_Product_Planning.java | 96 +- .../process/ExportFormatGenerator.java | 6 +- client/src/org/compiere/apps/AGlassPane.java | 15 +- client/src/org/compiere/apps/ALogin.java | 9 + client/src/org/compiere/apps/APanel.java | 422 ++-- client/src/org/compiere/apps/form/Match.java | 32 +- client/src/org/compiere/apps/form/Merge.java | 7 +- client/src/org/compiere/apps/search/Find.java | 224 +- .../compiere/apps/search/FindValueEditor.java | 7 + client/src/org/compiere/apps/search/Info.java | 12 +- .../compiere/apps/search/InfoPAttribute.java | 81 +- .../org/compiere/apps/search/InfoProduct.java | 50 +- .../src/org/compiere/grid/GridController.java | 170 +- .../org/compiere/grid/GridSynchronizer.java | 21 +- .../src/org/compiere/grid/ed/Calculator.java | 2 +- client/src/org/compiere/grid/ed/Calendar.java | 33 +- .../src/org/compiere/grid/ed/MDocNumber.java | 55 +- client/src/org/compiere/grid/ed/VNumber.java | 26 +- client/src/org/compiere/print/ReportCtl.java | 16 +- data/de_DE/AD_Element_Trl_de_DE.xml | 8 +- data/de_DE/AD_Tab_Trl_de_DE.xml | 12 +- data/de_DE/AD_Window_Trl_de_DE.xml | 8 +- data/import/AccountingUS.csv | 1 + data/import/AccountingUS.xls | Bin 78848 -> 79360 bytes data/import/ExampleProductPlanning.csv | 2 + data/import/ExampleProductPlanning.xls | Bin 0 -> 7680 bytes .../views/M_PRODUCT_SUBSTITUTERELATED_V.sql | 96 +- .../views/M_PRODUCT_SUBSTITUTERELATED_V.sql | 133 +- extend/src/test/functional/AlertTest.java | 14 + extend/src/test/functional/MBPartnerTest.java | 10 +- .../src/test/functional/MCostElementTest.java | 69 + extend/src/test/functional/MLotTest.java | 46 + .../src/test/functional/MPInstanceTest.java | 46 + .../test/functional/MPaySelectionTest.java | 44 + extend/src/test/functional/MPaymentTest.java | 45 + .../src/test/functional/MProductBOMTest.java | 59 + extend/src/test/functional/MProductTest.java | 20 +- extend/src/test/functional/MProjectTest.java | 55 + .../src/test/functional/MRequestTypeTest.java | 40 + extend/src/test/functional/MRuleTest.java | 46 + .../functional/inventory/InventoryUtil.java | 26 +- .../jboss-web.deployer/serverTemplate.xml | 4 +- .../oracle/659_FR2871676_ReportAmountType.sql | 412 +++ ...944056_FixSubstituteRelatedInfoProduct.sql | 28 + .../661_FR_2945715_AdvancedSearchMsg.sql | 30 + .../354a-trunk/oracle/662_BT_2944388.sql | 5 + .../oracle/663_FR2949534_ResetAllocation.sql | 35 + .../664_FR2934358_FixedTyposOnElements.sql | 261 ++ .../665_FR2952245_ImportDataPlanning.sql | 2069 +++++++++++++++ .../oracle/666_BF2952456_PP_Identifiers.sql | 20 + .../667_FR2956390_SchedulerEnhancement.sql | 160 ++ ...68_FR2957782_PaySelection_DueDate_Para.sql | 10 + migration/354a-trunk/oracle/669_BF2904257.sql | 5 + .../670_FR2962094_AddProcesssedOnColumn.sql | 237 ++ .../oracle/671_FR2962094_FillProcesssedOn.sql | 421 ++++ migration/354a-trunk/oracle/672_BF2948897.sql | 15 + migration/354a-trunk/oracle/673_BF2948897.sql | 105 + migration/354a-trunk/oracle/674_FR2965494.sql | 311 +++ ...2094_AddAverageCostVarianceDefaultAcct.sql | 413 +++ ...676_FR2962094_SetAverageCostVarianceGW.sql | 56 + .../677_BT2092712_Unalloc_payment_report.sql | 1 + .../354a-trunk/oracle/678_BF_1774758.sql | 9 + .../oracle/679_BF2042466FixProductURL.sql | 8 + migration/354a-trunk/oracle/680_BF2970013.sql | 82 + migration/354a-trunk/oracle/681_BF2968442.sql | 146 ++ .../659_FR2871676_ReportAmountType.sql | 411 +++ ...944056_FixSubstituteRelatedInfoProduct.sql | 28 + .../661_FR_2945715_AdvancedSearchMsg.sql | 30 + .../354a-trunk/postgresql/662_BT_2944388.sql | 5 + .../663_FR2949534_ResetAllocation.sql | 35 + .../664_FR2934358_FixedTyposOnElements.sql | 260 ++ .../665_FR2952245_ImportDataPlanning.sql | 2069 +++++++++++++++ .../666_BF2952456_PP_Identifiers.sql | 20 + .../667_FR2956390_SchedulerEnhancement.sql | 160 ++ ...68_FR2957782_PaySelection_DueDate_Para.sql | 10 + .../354a-trunk/postgresql/669_BF2904257.sql | 5 + .../670_FR2962094_AddProcesssedOnColumn.sql | 237 ++ .../671_FR2962094_FillProcesssedOn.sql | 421 ++++ .../354a-trunk/postgresql/672_BF2948897.sql | 15 + .../354a-trunk/postgresql/673_BF2948897.sql | 105 + .../354a-trunk/postgresql/674_FR2965494.sql | 311 +++ ...2094_AddAverageCostVarianceDefaultAcct.sql | 413 +++ ...676_FR2962094_SetAverageCostVarianceGW.sql | 56 + .../677_BT_2092712_Unalloc_payment_report.sql | 1 + .../354a-trunk/postgresql/678_BF_1774758.sql | 9 + .../postgresql/679_BF2042466FixProductURL.sql | 8 + .../354a-trunk/postgresql/680_BF2970013.sql | 82 + .../354a-trunk/postgresql/681_BF2968442.sql | 146 ++ plugins/TestPlugin/plugin.xml | 5 + serverRoot/.classpath | 1 + serverRoot/build.xml | 1 + .../server/rpl/imp/TopicListener.java | 49 +- .../org/compiere/server/AcctProcessor.java | 114 +- .../org/compiere/server/AdempiereServer.java | 88 +- .../compiere/server/ReplicationProcessor.java | 86 +- .../server/org/compiere/server/Scheduler.java | 266 +- tools/.classpath | 2 + .../org/adempiere/webui/ValuePreference.java | 10 +- .../src/org/adempiere/webui/apps/AEnv.java | 50 +- .../src/org/adempiere/webui/apps/WReport.java | 2 +- .../apps/form/WCreateFromShipmentUI.java | 2 +- .../adempiere/webui/apps/form/WPayment.java | 246 +- .../adempiere/webui/apps/graph/WGraph.java | 2 +- .../adempiere/webui/apps/wf/WWFActivity.java | 1 + .../webui/component/AbstractADTab.java | 62 + .../webui/editor/WTableDirEditor.java | 45 +- .../org/adempiere/webui/panel/ADSortTab.java | 4 +- .../org/adempiere/webui/panel/ADTabpanel.java | 22 +- .../webui/panel/AbstractADWindowPanel.java | 186 +- .../webui/panel/InfoPAttributePanel.java | 138 +- .../org/adempiere/webui/panel/InfoPanel.java | 23 +- .../webui/panel/InfoProductPanel.java | 60 +- .../org/adempiere/webui/panel/RolePanel.java | 3 - .../webui/panel/WDocActionPanel.java | 9 +- 313 files changed, 18320 insertions(+), 4606 deletions(-) create mode 100644 base/src/org/compiere/model/AdempiereProcessor2.java create mode 100644 base/src/org/compiere/model/PP_PayFlowPro4.java create mode 100644 base/src/org/eevolution/model/I_I_ProductPlanning.java create mode 100644 base/src/org/eevolution/model/X_I_ProductPlanning.java create mode 100644 data/import/ExampleProductPlanning.csv create mode 100644 data/import/ExampleProductPlanning.xls create mode 100644 extend/src/test/functional/MCostElementTest.java create mode 100644 extend/src/test/functional/MLotTest.java create mode 100644 extend/src/test/functional/MPInstanceTest.java create mode 100644 extend/src/test/functional/MPaySelectionTest.java create mode 100644 extend/src/test/functional/MPaymentTest.java create mode 100644 extend/src/test/functional/MProductBOMTest.java create mode 100644 extend/src/test/functional/MProjectTest.java create mode 100644 extend/src/test/functional/MRequestTypeTest.java create mode 100644 extend/src/test/functional/MRuleTest.java create mode 100644 migration/354a-trunk/oracle/659_FR2871676_ReportAmountType.sql create mode 100644 migration/354a-trunk/oracle/660_BF_2944056_FixSubstituteRelatedInfoProduct.sql create mode 100644 migration/354a-trunk/oracle/661_FR_2945715_AdvancedSearchMsg.sql create mode 100644 migration/354a-trunk/oracle/662_BT_2944388.sql create mode 100644 migration/354a-trunk/oracle/663_FR2949534_ResetAllocation.sql create mode 100644 migration/354a-trunk/oracle/664_FR2934358_FixedTyposOnElements.sql create mode 100644 migration/354a-trunk/oracle/665_FR2952245_ImportDataPlanning.sql create mode 100644 migration/354a-trunk/oracle/666_BF2952456_PP_Identifiers.sql create mode 100644 migration/354a-trunk/oracle/667_FR2956390_SchedulerEnhancement.sql create mode 100644 migration/354a-trunk/oracle/668_FR2957782_PaySelection_DueDate_Para.sql create mode 100644 migration/354a-trunk/oracle/669_BF2904257.sql create mode 100644 migration/354a-trunk/oracle/670_FR2962094_AddProcesssedOnColumn.sql create mode 100644 migration/354a-trunk/oracle/671_FR2962094_FillProcesssedOn.sql create mode 100644 migration/354a-trunk/oracle/672_BF2948897.sql create mode 100644 migration/354a-trunk/oracle/673_BF2948897.sql create mode 100644 migration/354a-trunk/oracle/674_FR2965494.sql create mode 100644 migration/354a-trunk/oracle/675_FR2962094_AddAverageCostVarianceDefaultAcct.sql create mode 100644 migration/354a-trunk/oracle/676_FR2962094_SetAverageCostVarianceGW.sql create mode 100644 migration/354a-trunk/oracle/677_BT2092712_Unalloc_payment_report.sql create mode 100644 migration/354a-trunk/oracle/678_BF_1774758.sql create mode 100644 migration/354a-trunk/oracle/679_BF2042466FixProductURL.sql create mode 100644 migration/354a-trunk/oracle/680_BF2970013.sql create mode 100644 migration/354a-trunk/oracle/681_BF2968442.sql create mode 100644 migration/354a-trunk/postgresql/659_FR2871676_ReportAmountType.sql create mode 100644 migration/354a-trunk/postgresql/660_BF_2944056_FixSubstituteRelatedInfoProduct.sql create mode 100644 migration/354a-trunk/postgresql/661_FR_2945715_AdvancedSearchMsg.sql create mode 100644 migration/354a-trunk/postgresql/662_BT_2944388.sql create mode 100644 migration/354a-trunk/postgresql/663_FR2949534_ResetAllocation.sql create mode 100644 migration/354a-trunk/postgresql/664_FR2934358_FixedTyposOnElements.sql create mode 100644 migration/354a-trunk/postgresql/665_FR2952245_ImportDataPlanning.sql create mode 100644 migration/354a-trunk/postgresql/666_BF2952456_PP_Identifiers.sql create mode 100644 migration/354a-trunk/postgresql/667_FR2956390_SchedulerEnhancement.sql create mode 100644 migration/354a-trunk/postgresql/668_FR2957782_PaySelection_DueDate_Para.sql create mode 100644 migration/354a-trunk/postgresql/669_BF2904257.sql create mode 100644 migration/354a-trunk/postgresql/670_FR2962094_AddProcesssedOnColumn.sql create mode 100644 migration/354a-trunk/postgresql/671_FR2962094_FillProcesssedOn.sql create mode 100644 migration/354a-trunk/postgresql/672_BF2948897.sql create mode 100644 migration/354a-trunk/postgresql/673_BF2948897.sql create mode 100644 migration/354a-trunk/postgresql/674_FR2965494.sql create mode 100644 migration/354a-trunk/postgresql/675_FR2962094_AddAverageCostVarianceDefaultAcct.sql create mode 100644 migration/354a-trunk/postgresql/676_FR2962094_SetAverageCostVarianceGW.sql create mode 100644 migration/354a-trunk/postgresql/677_BT_2092712_Unalloc_payment_report.sql create mode 100644 migration/354a-trunk/postgresql/678_BF_1774758.sql create mode 100644 migration/354a-trunk/postgresql/679_BF2042466FixProductURL.sql create mode 100644 migration/354a-trunk/postgresql/680_BF2970013.sql create mode 100644 migration/354a-trunk/postgresql/681_BF2968442.sql diff --git a/.classpath b/.classpath index 15bed53638..0c7ff55404 100644 --- a/.classpath +++ b/.classpath @@ -137,5 +137,7 @@ + + diff --git a/JasperReports/src/org/compiere/report/ReportStarter.java b/JasperReports/src/org/compiere/report/ReportStarter.java index 091d48ec8e..58034ead2d 100644 --- a/JasperReports/src/org/compiere/report/ReportStarter.java +++ b/JasperReports/src/org/compiere/report/ReportStarter.java @@ -37,6 +37,7 @@ import java.sql.Timestamp; import java.util.ArrayList; import java.util.HashMap; import java.util.Hashtable; +import java.util.Locale; import java.util.Map; import java.util.Properties; import java.util.PropertyResourceBundle; @@ -60,6 +61,7 @@ import org.compiere.db.CConnection; import org.compiere.interfaces.MD5; import org.compiere.model.MAttachment; import org.compiere.model.MAttachmentEntry; +import org.compiere.model.MBPartner; import org.compiere.model.MProcess; import org.compiere.model.X_AD_PInstance_Para; import org.compiere.process.ClientProcess; @@ -368,6 +370,7 @@ public class ReportStarter implements ProcessCall, ClientProcess String Name=pi.getTitle(); int AD_PInstance_ID=pi.getAD_PInstance_ID(); int Record_ID=pi.getRecord_ID(); + log.info( "Name="+Name+" AD_PInstance_ID="+AD_PInstance_ID+" Record_ID="+Record_ID); String trxName = null; if (trx != null) { @@ -423,6 +426,15 @@ public class ReportStarter implements ProcessCall, ClientProcess String jasperName = data.getJasperName(); String name = jasperReport.getName(); File reportDir = data.getReportDir(); + + // Add reportDir to class path + ClassLoader scl = ClassLoader.getSystemClassLoader(); + try { + java.net.URLClassLoader ucl = new java.net.URLClassLoader(new java.net.URL[]{reportDir.toURI().toURL()}, scl); + net.sf.jasperreports.engine.util.JRResourcesUtil.setThreadClassLoader(ucl); + } catch (MalformedURLException me) { + log.warning("Could not add report directory to classpath: "+ me.getMessage()); + } if (jasperReport != null) { File[] subreports; @@ -462,9 +474,20 @@ public class ReportStarter implements ProcessCall, ClientProcess // in iReports you can 'SELECT' AD_Client_ID, AD_Org_ID and AD_User_ID using only AD_PINSTANCE_ID params.put("AD_PINSTANCE_ID", new Integer( AD_PInstance_ID)); - Language currLang = Env.getLanguage(Env.getCtx()); - params.put("CURRENT_LANG", currLang.getAD_Language()); - params.put(JRParameter.REPORT_LOCALE, currLang.getLocale()); + Language currLang = Env.getLanguage(Env.getCtx()); + ProcessInfoParameter[] pip = pi.getParameter(); + // Check for language parameter + if (pip!=null) { + for (int i=0; i + diff --git a/base/build.xml b/base/build.xml index 5112f12526..c1a02a9fda 100644 --- a/base/build.xml +++ b/base/build.xml @@ -31,6 +31,7 @@ + diff --git a/base/src/org/adempiere/model/ExportModelValidator.java b/base/src/org/adempiere/model/ExportModelValidator.java index 5f4b0e6b84..9e33cbc9d5 100644 --- a/base/src/org/adempiere/model/ExportModelValidator.java +++ b/base/src/org/adempiere/model/ExportModelValidator.java @@ -24,7 +24,7 @@ * - Trifon Trifonov (trifonnt@users.sourceforge.net) * * * * Sponsors: * -* - E-evolution (http://www.e-evolution.com) * +* - e-Evolution (http://www.e-evolution.com) * ***********************************************************************/ package org.adempiere.model; @@ -39,6 +39,7 @@ import org.compiere.model.PO; import org.compiere.model.X_AD_ReplicationDocument; import org.compiere.model.X_AD_ReplicationTable; import org.compiere.util.CLogger; +import org.compiere.util.Env; /** @@ -50,11 +51,15 @@ import org.compiere.util.CLogger; *

  • https://sourceforge.net/tracker/?func=detail&aid=2875989&group_id=176962&atid=879332 *
  • [ 2195090 ] Stabilization of replication *
  • https://sourceforge.net/tracker/?func=detail&atid=879332&aid=2936561&group_id=176962 + *
  • BF2947615 The document recplicacion not working + *
  • https://sourceforge.net/tracker/?func=detail&aid=2947615&group_id=176962&atid=879332 * * @version $Id$ */ public class ExportModelValidator implements ModelValidator { + /** Context variable which says if replication is enabled */ + public static final String CTX_IsReplicationEnabled = "#IsReplicationEnabled"; /** Logger */ private static CLogger log = CLogger.getCLogger(ExportModelValidator.class); @@ -129,8 +134,8 @@ public class ExportModelValidator implements ModelValidator if (X_AD_ReplicationTable.REPLICATIONTYPE_Merge.equals(rplTable.getReplicationType()) || X_AD_ReplicationTable.REPLICATIONTYPE_Reference.equals(rplTable.getReplicationType())) { - MTable table = MTable.get (client.getCtx(), rplTable.getAD_Table_ID()); - engine.addModelChange(table.getTableName(), this); + String tableName = MTable.getTableName(client.getCtx(), rplTable.getAD_Table_ID()); + engine.addModelChange(tableName, this); } } } @@ -140,10 +145,9 @@ public class ExportModelValidator implements ModelValidator for (X_AD_ReplicationDocument rplDocument : rplStrategy.getReplicationDocuments()) { if (X_AD_ReplicationDocument.REPLICATIONTYPE_Merge.equals(rplDocument.getReplicationType()) || X_AD_ReplicationDocument.REPLICATIONTYPE_Reference.equals(rplDocument.getReplicationType())) - { - //MDocType docType = MDocType.get(client.getCtx(), rplDocuments[i].getC_DocType_ID()); - MTable table = MTable.get (client.getCtx(), rplDocument.getAD_Table_ID()); - engine.addDocValidate(table.getTableName(), this); + { + String tableName = MTable.getTableName(client.getCtx(), rplDocument.getAD_Table_ID()); + engine.addDocValidate(tableName, this); } } } @@ -167,10 +171,16 @@ public class ExportModelValidator implements ModelValidator || type == TYPE_AFTER_NEW || type == TYPE_BEFORE_DELETE) // After Change or After New { - expHelper.exportRecord( po, - MReplicationStrategy.REPLICATION_TABLE, - MReplicationStrategy.getReplicationTable(po.getCtx(), m_AD_ReplicationStrategy_ID, po.get_Table_ID()).getReplicationType(), - type); + X_AD_ReplicationTable replicationTable = MReplicationStrategy.getReplicationTable( + po.getCtx(), m_AD_ReplicationStrategy_ID, po.get_Table_ID()); + if (replicationTable != null) + { + expHelper.exportRecord( + po, + MReplicationStrategy.REPLICATION_TABLE, + replicationTable.getReplicationType(), + type); + } } } @@ -188,7 +198,7 @@ public class ExportModelValidator implements ModelValidator */ public String docValidate (PO po, int type) { - log.info("po.get_TableName() = " + po.get_TableName()); + log.info("Replicate the Document = " + po.get_TableName() + " with Type = " + type); String result = null; if (expHelper != null) { try { @@ -196,13 +206,30 @@ public class ExportModelValidator implements ModelValidator || type == TIMING_AFTER_CLOSE || type == TIMING_AFTER_REVERSECORRECT || type == TIMING_AFTER_VOID - || type == TIMING_AFTER_PREPARE + //|| type == TIMING_AFTER_PREPARE ) { - expHelper.exportRecord( po, - MReplicationStrategy.REPLICATION_DOCUMENT , - MReplicationStrategy.getReplicationDocument(po.getCtx(), m_AD_ReplicationStrategy_ID, po.get_Table_ID()).getReplicationType(), - type); + X_AD_ReplicationDocument replicationDocument = null; + int C_DocType_ID = po.get_ValueAsInt("C_DocType_ID"); + if (C_DocType_ID > 0) + { + replicationDocument = MReplicationStrategy.getReplicationDocument( + po.getCtx(), m_AD_ReplicationStrategy_ID, po.get_Table_ID(), C_DocType_ID); + } + else + { + replicationDocument = MReplicationStrategy.getReplicationDocument( + po.getCtx(), m_AD_ReplicationStrategy_ID, po.get_Table_ID()); + } + + + if (replicationDocument != null) { + expHelper.exportRecord( + po, + MReplicationStrategy.REPLICATION_DOCUMENT, + replicationDocument.getReplicationType(), + type); + } } } catch (Exception e) { @@ -223,6 +250,7 @@ public class ExportModelValidator implements ModelValidator */ public String login (int AD_Org_ID, int AD_Role_ID, int AD_User_ID) { + Env.setContext(Env.getCtx(), CTX_IsReplicationEnabled, true); m_AD_Org_ID = AD_Org_ID; m_AD_Role_ID = AD_Role_ID; m_AD_User_ID = AD_User_ID; diff --git a/base/src/org/adempiere/model/GridTabWrapper.java b/base/src/org/adempiere/model/GridTabWrapper.java index d8f5e465be..385bcc5616 100644 --- a/base/src/org/adempiere/model/GridTabWrapper.java +++ b/base/src/org/adempiere/model/GridTabWrapper.java @@ -102,13 +102,15 @@ public class GridTabWrapper implements InvocationHandler GridField field = m_gridTab.getField(propertyName); if (field != null) { - return field.getValue(); + final Object value = field.getValue(); + return value instanceof Boolean ? value : "Y".equals(value); } // field = m_gridTab.getField("Is"+propertyName); if (field != null) { - return field.getValue(); + final Object value = field.getValue(); + return value instanceof Boolean ? value : "Y".equals(value); } // throw new IllegalArgumentException("Method not supported - "+methodName); diff --git a/base/src/org/adempiere/model/PromotionRule.java b/base/src/org/adempiere/model/PromotionRule.java index af1aa37f0c..55cd1fc815 100644 --- a/base/src/org/adempiere/model/PromotionRule.java +++ b/base/src/org/adempiere/model/PromotionRule.java @@ -37,9 +37,6 @@ import org.compiere.model.MOrder; import org.compiere.model.MOrderLine; import org.compiere.model.MTable; import org.compiere.model.Query; -import org.compiere.model.X_M_PromotionDistribution; -import org.compiere.model.X_M_PromotionLine; -import org.compiere.model.X_M_PromotionReward; import org.compiere.util.DB; import org.compiere.util.Env; @@ -97,17 +94,17 @@ public class PromotionRule { "M_PromotionDistribution.M_Promotion_ID = ? AND M_PromotionDistribution.IsActive = 'Y'", order.get_TrxName()); query.setParameters(new Object[]{entry.getKey()}); query.setOrderBy("SeqNo"); - List list = query.list(); + List list = query.list(); Query rewardQuery = new Query(Env.getCtx(), MTable.get(order.getCtx(), I_M_PromotionReward.Table_ID), "M_PromotionReward.M_Promotion_ID = ? AND M_PromotionReward.IsActive = 'Y'", order.get_TrxName()); rewardQuery.setParameters(new Object[]{entry.getKey()}); rewardQuery.setOrderBy("SeqNo"); - List rewardList = rewardQuery.list(); + List rewardList = rewardQuery.list(); - List promotionLines = new ArrayList(); + List promotionLines = new ArrayList(); for (Integer M_PromotionLine_ID : entry.getValue()) { - X_M_PromotionLine promotionLine = new X_M_PromotionLine(order.getCtx(), M_PromotionLine_ID, order.get_TrxName()); + MPromotionLine promotionLine = new MPromotionLine(order.getCtx(), M_PromotionLine_ID, order.get_TrxName()); promotionLines.add(promotionLine); } while (true) { @@ -116,8 +113,8 @@ public class PromotionRule { SetmandatoryLineSet = new HashSet(); boolean mandatoryLineNotFound = false; List validPromotionLineIDs = new ArrayList(); - for (X_M_PromotionLine promotionLine : promotionLines) { - if (promotionLine.getM_PromotionGroup_ID() == 0 && promotionLine.getMinimumAmt() != null && promotionLine.getMinimumAmt().signum() > 0) { + for (MPromotionLine promotionLine : promotionLines) { + if (promotionLine.getM_PromotionGroup_ID() == 0 && promotionLine.getMinimumAmt() != null && promotionLine.getMinimumAmt().signum() >= 0) { if (orderAmount.compareTo(promotionLine.getMinimumAmt()) >= 0) { orderAmount = orderAmount.subtract(promotionLine.getMinimumAmt()); validPromotionLineIDs.add(promotionLine.getM_PromotionLine_ID()); @@ -130,14 +127,14 @@ public class PromotionRule { if (mandatoryLineNotFound) { break; } - for (X_M_PromotionDistribution pd : list) { + for (MPromotionDistribution pd : list) { if (entry.getValue().contains(pd.getM_PromotionLine_ID())) { //sort available orderline base on distribution sorting type List orderLineIdList = new ArrayList(); orderLineIdList.addAll(orderLineQty.keySet()); if (pd.getDistributionSorting() != null) { Comparator cmp = olComparator; - if (pd.getDistributionSorting().equals(X_M_PromotionDistribution.DISTRIBUTIONSORTING_Descending)) + if (pd.getDistributionSorting().equals(MPromotionDistribution.DISTRIBUTIONSORTING_Descending)) cmp = Collections.reverseOrder(cmp); Collections.sort(orderLineIdList, cmp); } @@ -171,7 +168,7 @@ public class PromotionRule { } } - for (X_M_PromotionReward pr : rewardList) { + for (MPromotionReward pr : rewardList) { if (pr.isForAllDistribution()) { Collection all = distributions.values(); BigDecimal totalPrice = BigDecimal.ZERO; @@ -189,13 +186,13 @@ public class PromotionRule { } } BigDecimal discount = BigDecimal.ZERO; - if (pr.getRewardType().equals(X_M_PromotionReward.REWARDTYPE_AbsoluteAmount)) { + if (pr.getRewardType().equals(MPromotionReward.REWARDTYPE_AbsoluteAmount)) { if (pr.getAmount().compareTo(totalPrice) < 0) { discount = totalPrice.subtract(pr.getAmount()); } - } else if (pr.getRewardType().equals(X_M_PromotionReward.REWARDTYPE_FlatDiscount)) { + } else if (pr.getRewardType().equals(MPromotionReward.REWARDTYPE_FlatDiscount)) { discount = pr.getAmount(); - } else if (pr.getRewardType().equals(X_M_PromotionReward.REWARDTYPE_Percentage)) { + } else if (pr.getRewardType().equals(MPromotionReward.REWARDTYPE_Percentage)) { discount = pr.getAmount().divide(BigDecimal.valueOf(100.00)).multiply(totalPrice); } if (discount.signum() > 0) { @@ -216,7 +213,7 @@ public class PromotionRule { //sort by reward distribution sorting if (pr.getDistributionSorting() != null ) { Comparator cmp = new OrderLineComparator(orderLineIndex); - if (pr.getDistributionSorting().equals(X_M_PromotionReward.DISTRIBUTIONSORTING_Descending)) + if (pr.getDistributionSorting().equals(MPromotionReward.DISTRIBUTIONSORTING_Descending)) cmp = Collections.reverseOrder(cmp); Set keySet = distributionSet.orderLines.keySet(); List keyList = new ArrayList(); @@ -261,13 +258,13 @@ public class PromotionRule { } for (MOrderLine ol : lines) { if (ol.getC_OrderLine_ID() == C_OrderLine_ID) { - if (pr.getRewardType().equals(X_M_PromotionReward.REWARDTYPE_Percentage)) { + if (pr.getRewardType().equals(MPromotionReward.REWARDTYPE_Percentage)) { BigDecimal priceActual = ol.getPriceActual(); BigDecimal discount = priceActual.multiply(pr.getAmount().divide(BigDecimal.valueOf(100.00))); addDiscountLine(order, ol, discount, qty, pr.getC_Charge_ID(), pr.getM_Promotion()); - } else if (pr.getRewardType().equals(X_M_PromotionReward.REWARDTYPE_FlatDiscount)) { + } else if (pr.getRewardType().equals(MPromotionReward.REWARDTYPE_FlatDiscount)) { addDiscountLine(order, ol, pr.getAmount(), BigDecimal.valueOf(1.00), pr.getC_Charge_ID(), pr.getM_Promotion()); - } else if (pr.getRewardType().equals(X_M_PromotionReward.REWARDTYPE_AbsoluteAmount)) { + } else if (pr.getRewardType().equals(MPromotionReward.REWARDTYPE_AbsoluteAmount)) { BigDecimal priceActual = ol.getPriceActual(); totalPrice = totalPrice.add(priceActual.multiply(qty)); } @@ -279,7 +276,7 @@ public class PromotionRule { if (setBalance.signum() == 0) break; } - if (pr.getRewardType().equals(X_M_PromotionReward.REWARDTYPE_AbsoluteAmount)) { + if (pr.getRewardType().equals(MPromotionReward.REWARDTYPE_AbsoluteAmount)) { if (pr.getAmount().compareTo(totalPrice) < 0) { addDiscountLine(order, null, totalPrice.subtract(pr.getAmount()), BigDecimal.valueOf(1.00), pr.getC_Charge_ID(), pr.getM_Promotion()); } @@ -414,7 +411,7 @@ public class PromotionRule { * @return Distribution Qty * @throws Exception */ - private static DistributionSet calculateDistributionQty(X_M_PromotionDistribution distribution, + private static DistributionSet calculateDistributionQty(MPromotionDistribution distribution, DistributionSet prevSet, List validPromotionLineIDs, Map orderLineQty, List orderLineIdList, String trxName) throws Exception { String sql = "SELECT C_OrderLine.C_OrderLine_ID FROM M_PromotionLine" @@ -474,9 +471,9 @@ public class PromotionRule { match = true; } if (match) { - if (X_M_PromotionDistribution.DISTRIBUTIONTYPE_Max.equals(distribution.getDistributionType())) { + if (MPromotionDistribution.DISTRIBUTIONTYPE_Max.equals(distribution.getDistributionType())) { setQty = compare > 0 ? totalOrderLineQty : distribution.getQty(); - } else if (X_M_PromotionDistribution.DISTRIBUTIONTYPE_Min.equals(distribution.getDistributionType())) { + } else if (MPromotionDistribution.DISTRIBUTIONTYPE_Min.equals(distribution.getDistributionType())) { setQty = compare < 0 ? totalOrderLineQty : distribution.getQty(); } else { setQty = compare > 0 ? totalOrderLineQty.subtract(distribution.getQty()) @@ -543,11 +540,11 @@ public class PromotionRule { private static List findPromotionLine(int promotion_ID, MOrder order) throws SQLException { Query query = new Query(Env.getCtx(), MTable.get(order.getCtx(), I_M_PromotionLine.Table_ID), " M_PromotionLine.M_Promotion_ID = ? AND M_PromotionLine.IsActive = 'Y'", order.get_TrxName()); query.setParameters(new Object[]{promotion_ID}); - Listplist = query.list(); + Listplist = query.list(); //List Listapplicable = new ArrayList(); MOrderLine[] lines = order.getLines(); - for (X_M_PromotionLine pl : plist) { + for (MPromotionLine pl : plist) { boolean match = false; if (pl.getM_PromotionGroup_ID() > 0) { String sql = "SELECT DISTINCT C_OrderLine.C_OrderLine_ID FROM M_PromotionGroup INNER JOIN M_PromotionGroupLine" diff --git a/base/src/org/adempiere/model/PromotionValidator.java b/base/src/org/adempiere/model/PromotionValidator.java index ee6d594858..c233bcd502 100644 --- a/base/src/org/adempiere/model/PromotionValidator.java +++ b/base/src/org/adempiere/model/PromotionValidator.java @@ -14,14 +14,14 @@ package org.adempiere.model; import org.adempiere.exceptions.AdempiereException; +import org.compiere.model.I_C_Order; +import org.compiere.model.I_C_OrderLine; import org.compiere.model.MClient; import org.compiere.model.MOrder; import org.compiere.model.MOrderLine; import org.compiere.model.ModelValidationEngine; import org.compiere.model.ModelValidator; import org.compiere.model.PO; -import org.compiere.model.X_C_Order; -import org.compiere.model.X_C_OrderLine; import org.compiere.util.DB; /** @@ -140,10 +140,11 @@ public class PromotionValidator implements ModelValidator { } public void initialize(ModelValidationEngine engine, MClient client) { - engine.addDocValidate(X_C_Order.Table_Name, this); - engine.addModelChange(X_C_OrderLine.Table_Name, this); if (client != null) m_AD_Client_ID = client.getAD_Client_ID(); + engine.addDocValidate(I_C_Order.Table_Name, this); + engine.addModelChange(I_C_OrderLine.Table_Name, this); + } public String login(int AD_Org_ID, int AD_Role_ID, int AD_User_ID) { diff --git a/base/src/org/adempiere/process/ClientAcctProcessor.java b/base/src/org/adempiere/process/ClientAcctProcessor.java index e47688cca7..b6f10ac6e6 100644 --- a/base/src/org/adempiere/process/ClientAcctProcessor.java +++ b/base/src/org/adempiere/process/ClientAcctProcessor.java @@ -29,8 +29,13 @@ package org.adempiere.process; +import java.math.BigDecimal; import java.sql.PreparedStatement; import java.sql.ResultSet; +import java.sql.Timestamp; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; import java.util.logging.Level; import org.compiere.acct.Doc; @@ -41,6 +46,7 @@ import org.compiere.process.ProcessInfoParameter; import org.compiere.process.SvrProcess; import org.compiere.util.AdempiereUserError; import org.compiere.util.DB; +import org.compiere.util.Env; import org.compiere.util.Msg; import org.compiere.util.Trx; @@ -115,32 +121,101 @@ public class ClientAcctProcessor extends SvrProcess */ private void postSession() { - for (int i = 0; i < Doc.getDocumentsTableID().length; i++) + List listProcessedOn = new ArrayList(); + listProcessedOn.add(Env.ZERO); // to include potential null values + + //get current time from db + Timestamp ts = DB.getSQLValueTS(get_TrxName(), "SELECT CURRENT_TIMESTAMP FROM DUAL"); + + //go back 2 second to be safe (to avoid posting documents being completed at this precise moment) + long ms = ts.getTime()- (2 * 1000); + ts = new Timestamp(ms); + long mili = ts.getTime(); + BigDecimal value = new BigDecimal(Long.toString(mili)); + + //first pass, collect all ts (FR 2962094 - required for weighted average costing) + int[] documentsTableID = Doc.getDocumentsTableID(); + String[] documentsTableName = Doc.getDocumentsTableName(); + for (int i = 0; i < documentsTableID.length; i++) { - int AD_Table_ID = Doc.getDocumentsTableID()[i]; - String TableName = Doc.getDocumentsTableName()[i]; + int AD_Table_ID = documentsTableID[i]; + String TableName = documentsTableName[i]; // Post only special documents - if (p_AD_Table_ID != 0 + if (p_AD_Table_ID != 0 && p_AD_Table_ID != AD_Table_ID) continue; - // SELECT * FROM table - StringBuffer sql = new StringBuffer ("SELECT * FROM ").append(TableName) - .append(" WHERE AD_Client_ID=?") - .append(" AND Processed='Y' AND Posted='N' AND IsActive='Y'") - .append(" ORDER BY Created"); - // - int count = 0; - int countError = 0; + + StringBuffer sql = new StringBuffer ("SELECT DISTINCT ProcessedOn FROM ").append(TableName) + .append(" WHERE AD_Client_ID=? AND ProcessedOn 0) + } // for tableID + + } // for processedOn + + for (int i = 0; i < documentsTableID.length; i++) + { + String TableName = documentsTableName[i]; + if (count[i] > 0) { - m_summary.append(TableName).append("=").append(count); - if (countError > 0) - m_summary.append("(Errors=").append(countError).append(")"); + m_summary.append(TableName).append("=").append(count[i]); + if (countError[i] > 0) + m_summary.append("(Errors=").append(countError[i]).append(")"); m_summary.append(" - "); log.finer(getName() + ": " + m_summary.toString()); } else log.finer(getName() + ": " + TableName + " - no work"); } + } // postSession } // ClientAcctProcessor diff --git a/base/src/org/adempiere/process/ExpenseTypesFromAccounts.java b/base/src/org/adempiere/process/ExpenseTypesFromAccounts.java index 8b6139fc67..8036029d88 100644 --- a/base/src/org/adempiere/process/ExpenseTypesFromAccounts.java +++ b/base/src/org/adempiere/process/ExpenseTypesFromAccounts.java @@ -1,4 +1,4 @@ -/********************************************************************** +/*********************************************************************** * This file is part of Adempiere ERP Bazaar * * http://www.adempiere.org * * * @@ -23,16 +23,32 @@ * Sponsors: * * - Company (http://www.notima.se) * * - Company (http://www.cyberphoto.se) * - ***********************************************************************/ + **********************************************************************/ package org.adempiere.process; import java.math.BigDecimal; -import java.util.*; -import java.util.logging.*; -import org.compiere.model.*; -import org.compiere.process.*; -import org.compiere.util.*; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.TreeMap; +import java.util.logging.Level; + +import org.compiere.model.I_C_ElementValue; +import org.compiere.model.I_C_ValidCombination; +import org.compiere.model.I_M_Product; +import org.compiere.model.I_M_Product_Acct; +import org.compiere.model.MAccount; +import org.compiere.model.MElementValue; +import org.compiere.model.MPriceList; +import org.compiere.model.MPriceListVersion; +import org.compiere.model.MProduct; +import org.compiere.model.MProductPrice; +import org.compiere.model.Query; +import org.compiere.model.X_M_Product_Acct; +import org.compiere.process.ProcessInfoParameter; +import org.compiere.process.SvrProcess; +import org.compiere.util.Env; /** * Creates expense type products from a given range of expense account @@ -107,8 +123,8 @@ public class ExpenseTypesFromAccounts extends SvrProcess { MProduct product; // Read all existing applicable products into memory for quick comparison. - List products = new Query(getCtx(), MProduct.Table_Name, "ProductType=?", get_TrxName()) - .setParameters(new Object[]{MProduct.PRODUCTTYPE_ExpenseType}) + List products = new Query(getCtx(), I_M_Product.Table_Name, "ProductType=?", get_TrxName()) + .setParameters(MProduct.PRODUCTTYPE_ExpenseType) .list(); Map productMap = new TreeMap(); @@ -121,10 +137,10 @@ public class ExpenseTypesFromAccounts extends SvrProcess { MAccount validComb; List validCombs = new Query( getCtx(), - MAccount.Table_Name, + I_C_ValidCombination.Table_Name, "C_AcctSchema_ID=? and AD_Client_ID=? and AD_Org_ID=0", get_TrxName()) - .setParameters(new Object[]{m_acctSchemaId, m_clientId}) + .setParameters(m_acctSchemaId, m_clientId) .list(); Map validCombMap = new TreeMap(); @@ -136,10 +152,10 @@ public class ExpenseTypesFromAccounts extends SvrProcess { // Read all accounttypes that fit the given criteria. List result = new Query( getCtx(), - MElementValue.Table_Name, + I_C_ElementValue.Table_Name, "AccountType=? and isSummary='N' and Value>=? and Value<=? and AD_Client_ID=?", get_TrxName()) - .setParameters(new Object[]{MElementValue.ACCOUNTTYPE_Expense, m_startElement, m_endElement, m_clientId}) + .setParameters(MElementValue.ACCOUNTTYPE_Expense, m_startElement, m_endElement, m_clientId) .list(); MElementValue elem; @@ -195,8 +211,8 @@ public class ExpenseTypesFromAccounts extends SvrProcess { // TODO: It might be needed to make the accounting more specific, but the purpose // of the process now is to create general accounts so this is intentional. - productAcct = new Query(getCtx(), X_M_Product_Acct.Table_Name, "M_Product_ID=? and C_AcctSchema_ID=?", get_TrxName()) - .setParameters(new Object[]{product.get_ID(), m_acctSchemaId}) + productAcct = new Query(getCtx(), I_M_Product_Acct.Table_Name, "M_Product_ID=? and C_AcctSchema_ID=?", get_TrxName()) + .setParameters(product.get_ID(), m_acctSchemaId) .first(); productAcct.setP_Expense_Acct(validComb.get_ID()); productAcct.setP_Revenue_Acct(validComb.get_ID()); diff --git a/base/src/org/adempiere/process/InOutGenerateRMA.java b/base/src/org/adempiere/process/InOutGenerateRMA.java index e7e5c8513c..bb686c2fa6 100644 --- a/base/src/org/adempiere/process/InOutGenerateRMA.java +++ b/base/src/org/adempiere/process/InOutGenerateRMA.java @@ -23,6 +23,7 @@ import java.sql.Timestamp; import java.util.ArrayList; import java.util.logging.Level; +import org.compiere.model.I_C_InvoiceLine; import org.compiere.model.MInOut; import org.compiere.model.MInOutLine; import org.compiere.model.MInvoiceLine; @@ -204,10 +205,10 @@ public class InOutGenerateRMA extends SvrProcess // // Link to corresponding Invoice Line (if any) - teo_sarca [ 2818523 ] // The MMatchInv records will be automatically generated on MInOut.completeIt() - final MInvoiceLine invoiceLine = new Query(shipment.getCtx(), MInvoiceLine.Table_Name, - MInvoiceLine.COLUMNNAME_M_RMALine_ID+"=?", + MInvoiceLine invoiceLine = new Query(shipment.getCtx(), I_C_InvoiceLine.Table_Name, + I_C_InvoiceLine.COLUMNNAME_M_RMALine_ID+"=?", shipment.get_TrxName()) - .setParameters(new Object[]{rmaLine.getM_RMALine_ID()}) + .setParameters(rmaLine.getM_RMALine_ID()) .firstOnly(); if (invoiceLine != null) { diff --git a/base/src/org/adempiere/process/rpl/exp/ExportHelper.java b/base/src/org/adempiere/process/rpl/exp/ExportHelper.java index 486fb931fe..875d79a496 100644 --- a/base/src/org/adempiere/process/rpl/exp/ExportHelper.java +++ b/base/src/org/adempiere/process/rpl/exp/ExportHelper.java @@ -26,11 +26,9 @@ * * * Sponsors: * * - E-evolution (http://www.e-evolution.com/) * - **********************************************************************/ + *********************************************************************/ package org.adempiere.process.rpl.exp; -import java.sql.PreparedStatement; -import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Timestamp; import java.text.SimpleDateFormat; @@ -45,22 +43,19 @@ import javax.xml.parsers.ParserConfigurationException; import org.adempiere.process.rpl.IExportProcessor; import org.compiere.model.MClient; import org.compiere.model.MColumn; +import org.compiere.model.MEXPFormat; +import org.compiere.model.MEXPFormatLine; +import org.compiere.model.MEXPProcessor; +import org.compiere.model.MEXPProcessorType; import org.compiere.model.MReplicationStrategy; import org.compiere.model.MTable; import org.compiere.model.PO; import org.compiere.model.Query; import org.compiere.model.X_EXP_FormatLine; import org.compiere.util.CLogger; -import org.compiere.util.DB; import org.compiere.util.DisplayType; -import org.compiere.util.Env; -import org.compiere.util.Language; import org.compiere.util.Msg; import org.compiere.util.Trx; -import org.compiere.model.MEXPFormat; -import org.compiere.model.MEXPFormatLine; -import org.compiere.model.MEXPProcessor; -import org.compiere.model.MEXPProcessorType; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Text; @@ -74,6 +69,8 @@ import org.w3c.dom.Text; * @author victor.perez@e-evolution.com, e-Evolution *
  • [ 2195090 ] Stabilization of replication *
  • https://sourceforge.net/tracker/?func=detail&atid=879332&aid=2936561&group_id=176962 + *
  • BF [2947622] The replication ID (Primary Key) is not working + *
  • https://sourceforge.net/tracker/?func=detail&aid=2947622&group_id=176962&atid=879332 * */ public class ExportHelper { @@ -84,12 +81,6 @@ public class ExportHelper { /** XML Document */ private Document outDocument = null; - /** Date Time Format */ - private SimpleDateFormat m_dateTimeFormat = null; - - /** Date Format */ - private SimpleDateFormat m_dateFormat = null; - /** Custom Date Format */ private SimpleDateFormat m_customDateFormat = null; @@ -103,15 +94,10 @@ public class ExportHelper { public ExportHelper(MClient client, MReplicationStrategy rplStrategy) { m_AD_Client_ID = client.getAD_Client_ID(); m_rplStrategy = rplStrategy; - - m_dateTimeFormat = DisplayType.getDateFormat(DisplayType.DateTime, Language.getLanguage(Env.getAD_Language(client.getCtx()))); - m_dateFormat = DisplayType.getDateFormat(DisplayType.Date, Language.getLanguage(Env.getAD_Language(client.getCtx()))); } public ExportHelper(Properties ctx , int AD_Client_ID) { m_AD_Client_ID = AD_Client_ID; - m_dateTimeFormat = DisplayType.getDateFormat(DisplayType.DateTime, Language.getLanguage(Env.getAD_Language(ctx))); - m_dateFormat = DisplayType.getDateFormat(DisplayType.Date, Language.getLanguage(Env.getAD_Language(ctx))); } /** @@ -157,49 +143,21 @@ public class ExportHelper { outDocument = createNewDocument(); - StringBuffer sql = new StringBuffer("SELECT * ") - .append("FROM ").append(po.get_TableName()).append(" ") - .append("WHERE ").append(po.get_KeyColumns()[0]).append("=?") - ; - - if (exportFormat.getWhereClause() != null & !"".equals(exportFormat.getWhereClause())) { - sql.append(" AND ").append(exportFormat.getWhereClause()); - } - - ResultSet rs = null; - PreparedStatement pstmt = null; - try + HashMap variableMap = new HashMap(); + + Element rootElement = outDocument.createElement(exportFormat.getValue()); + if (exportFormat.getDescription() != null && !"".equals(exportFormat.getDescription())) { - pstmt = DB.prepareStatement(sql.toString(), po.get_TrxName()); - pstmt.setInt(1, po.get_ID()); - rs = pstmt.executeQuery(); - if (rs.next()) - { - HashMap variableMap = new HashMap(); - //variableMap.put(TOTAL_SEGMENTS, new Integer(1)); - - Element rootElement = outDocument.createElement(exportFormat.getValue()); - if (exportFormat.getDescription() != null && !"".equals(exportFormat.getDescription())) { - rootElement.appendChild(outDocument.createComment(exportFormat.getDescription())); - } - rootElement.setAttribute("AD_Client_Value", client.getValue()); - rootElement.setAttribute("Version", exportFormat.getVersion()); - rootElement.setAttribute("ReplicationMode", ReplicationMode.toString()); - rootElement.setAttribute("ReplicationType", ReplicationType); - rootElement.setAttribute("ReplicationEvent", ReplicationEvent.toString()); - outDocument.appendChild(rootElement); - generateExportFormat(rootElement, exportFormat, rs, po, po.get_ID(), variableMap); - } - - } finally { - try { - if (rs != null) rs.close(); - if (pstmt != null) pstmt.close(); - } catch (SQLException ex) {/*ignored*/} - rs = null; - pstmt = null; - } - + rootElement.appendChild(outDocument.createComment(exportFormat.getDescription())); + } + rootElement.setAttribute("AD_Client_Value", client.getValue()); + rootElement.setAttribute("Version", exportFormat.getVersion()); + rootElement.setAttribute("ReplicationMode", ReplicationMode.toString()); + rootElement.setAttribute("ReplicationType", ReplicationType); + rootElement.setAttribute("ReplicationEvent", ReplicationEvent.toString()); + outDocument.appendChild(rootElement); + generateExportFormat(rootElement, exportFormat, po, po.get_ID(), variableMap); + MEXPProcessor mExportProcessor = null; mExportProcessor = new MEXPProcessor (po.getCtx(), m_rplStrategy.getEXP_Processor_ID(), po.get_TrxName() ); log.fine("ExportProcessor = " + mExportProcessor); @@ -236,11 +194,11 @@ public class ExportHelper { MTable table = MTable.get(exportFormat.getCtx(), exportFormat.getAD_Table_ID()); log.info("Table = " + table); - Collection datas = new Query(exportFormat.getCtx(),table.getTableName(), exportFormat.getWhereClause(), exportFormat.get_TrxName()) + Collection records = new Query(exportFormat.getCtx(),table.getTableName(), exportFormat.getWhereClause(), exportFormat.get_TrxName()) .setOnlyActiveRecords(true) .list(); - for (PO po : datas) + for (PO po : records) { log.info("Client = " + client.toString()); log.finest("po.getAD_Org_ID() = " + po.getAD_Org_ID()); @@ -253,52 +211,22 @@ public class ExportHelper { throw new Exception(Msg.getMsg (po.getCtx(), "ExportNoneColumnKeyNotSupported"));//TODO: Create Mesagge. } - // TODO - get proper Export Format! - String version = "3.2.0"; outDocument = createNewDocument(); - StringBuffer sql = new StringBuffer("SELECT * ") - .append("FROM ").append(table.getTableName()).append(" ") - .append("WHERE ").append(po.get_KeyColumns()[0]).append("=?") - ; - - if (exportFormat.getWhereClause() != null & !"".equals(exportFormat.getWhereClause())) { - sql.append(" AND ").append(exportFormat.getWhereClause()); - } - - ResultSet rs = null; - PreparedStatement pstmt = null; - try + + HashMap variableMap = new HashMap(); + Element rootElement = outDocument.createElement(exportFormat.getValue()); + if (exportFormat.getDescription() != null && !"".equals(exportFormat.getDescription())) { - pstmt = DB.prepareStatement(sql.toString(), po.get_TrxName()); - pstmt.setInt(1, po.get_ID()); - rs = pstmt.executeQuery(); - if (rs.next()) - { - HashMap variableMap = new HashMap(); - //variableMap.put(TOTAL_SEGMENTS, new Integer(1)); - - Element rootElement = outDocument.createElement(exportFormat.getValue()); - if (exportFormat.getDescription() != null && !"".equals(exportFormat.getDescription())) { - rootElement.appendChild(outDocument.createComment(exportFormat.getDescription())); - } - rootElement.setAttribute("AD_Client_Value", client.getValue()); - rootElement.setAttribute("Version", exportFormat.getVersion()); - rootElement.setAttribute("ReplicationMode", ReplicationMode.toString()); - rootElement.setAttribute("ReplicationType", ReplicationType); - rootElement.setAttribute("ReplicationEvent", ReplicationEvent.toString()); - outDocument.appendChild(rootElement); - generateExportFormat(rootElement, exportFormat, rs, po, po.get_ID(), variableMap); - } - - } finally { - try { - if (rs != null) rs.close(); - if (pstmt != null) pstmt.close(); - } catch (SQLException ex) {/*ignored*/} - rs = null; - pstmt = null; - } + rootElement.appendChild(outDocument.createComment(exportFormat.getDescription())); + } + rootElement.setAttribute("AD_Client_Value", client.getValue()); + rootElement.setAttribute("Version", exportFormat.getVersion()); + rootElement.setAttribute("ReplicationMode", ReplicationMode.toString()); + rootElement.setAttribute("ReplicationType", ReplicationType); + rootElement.setAttribute("ReplicationEvent", ReplicationEvent.toString()); + outDocument.appendChild(rootElement); + generateExportFormat(rootElement, exportFormat, po, po.get_ID(), variableMap); }// finish record read return outDocument; } @@ -310,7 +238,7 @@ public class ExportHelper { * 101 * */ - private void generateExportFormat(Element rootElement, MEXPFormat exportFormat, ResultSet rs, PO masterPO, int masterID, HashMap variableMap) throws SQLException, Exception + private void generateExportFormat(Element rootElement, MEXPFormat exportFormat, PO masterPO, int masterID, HashMap variableMap) throws SQLException, Exception { Collection formatLines = exportFormat.getFormatLines(); @SuppressWarnings("unused") @@ -323,7 +251,7 @@ public class ExportHelper { // process single XML Attribute // Create new element Element newElement = outDocument.createElement(formatLine.getValue()); - + log.info("Format Line Seach key"+ formatLine.getValue()); if (formatLine.getAD_Column_ID() == 0) { throw new Exception(Msg.getMsg (masterPO.getCtx(), "EXPColumnMandatory")); } @@ -336,7 +264,7 @@ public class ExportHelper { } else { } //log.info("["+column.getColumnName()+"]"); - Object value = rs.getObject(column.getColumnName()); + Object value = masterPO.get_Value(column.getColumnName()); String valueString = null; if (value != null) { valueString = value.toString(); @@ -350,14 +278,12 @@ public class ExportHelper { if (valueString != null) { if (formatLine.getDateFormat() != null && !"".equals(formatLine.getDateFormat())) { m_customDateFormat = new SimpleDateFormat( formatLine.getDateFormat() ); // "MM/dd/yyyy" - //Date date = m_customDateFormat.parse ( valueString ); + valueString = m_customDateFormat.format(Timestamp.valueOf (valueString)); newElement.setAttribute("DateFormat", m_customDateFormat.toPattern()); // Add "DateForamt attribute" - } else { - //valueString = m_dateFormat.format (Timestamp.valueOf (valueString)); - //newElement.setAttribute("DateFormat", m_dateTimeFormat.toPattern()); // Add "DateForamt attribute - //Standard Japanese Format (default) works better (yyyy-mm-dd) - newElement.setAttribute("DateFormat", valueString); + } else + { + newElement.setAttribute("DateFormat", valueString); } } @@ -365,13 +291,9 @@ public class ExportHelper { if (valueString != null) { if (formatLine.getDateFormat() != null && !"".equals(formatLine.getDateFormat())) { m_customDateFormat = new SimpleDateFormat( formatLine.getDateFormat() ); // "MM/dd/yyyy" - //Date date = m_customDateFormat.parse ( valueString ); valueString = m_customDateFormat.format(Timestamp.valueOf (valueString)); newElement.setAttribute("DateFormat", m_customDateFormat.toPattern()); // Add "DateForamt attribute" } else { - //valueString = m_dateTimeFormat.format (Timestamp.valueOf (valueString)); - //newElement.setAttribute("DateFormat", m_dateTimeFormat.toPattern()); // Add "DateForamt attribute - //Standard Japanese Format (default) works better (yyyy-mm-dd hh:mm:ss m.mm) newElement.setAttribute("DateFormat", valueString); } } @@ -382,8 +304,6 @@ public class ExportHelper { newElement.appendChild(newText); rootElement.appendChild(newElement); elementHasValue = true; - //increaseVariable(variableMap, formatLines[i].getVariableName()); // Increase value of Variable if any Variable - //increaseVariable(variableMap, TOTAL_SEGMENTS); } else { // Empty field. if (formatLine.isMandatory()) { @@ -407,7 +327,7 @@ public class ExportHelper { } else { } //log.info("["+column.getColumnName()+"]"); - Object value = rs.getObject(column.getColumnName()); + Object value = masterPO.get_Value(column.getColumnName()); String valueString = null; if (value != null) { valueString = value.toString(); @@ -442,8 +362,7 @@ public class ExportHelper { if (valueString != null && !"".equals(valueString) && !"null".equals(valueString)) { rootElement.setAttribute(formatLine.getValue(), valueString); elementHasValue = true; - //increaseVariable(variableMap, formatLines[i].getVariableName()); // Increase value of Variable if any Variable - //increaseVariable(variableMap, TOTAL_SEGMENTS); + } else { // Empty field. } @@ -458,44 +377,30 @@ public class ExportHelper { MTable tableEmbedded = MTable.get(masterPO.getCtx(), embeddedFormat.getAD_Table_ID()); log.info("Table Embedded = " + tableEmbedded); - StringBuffer sql = new StringBuffer("SELECT * ") - .append("FROM ").append(tableEmbedded.getTableName()).append(" ") - .append("WHERE ").append(masterPO.get_KeyColumns()[0]).append("=?") - //+ "WHERE " + po.get_WhereClause(false) - ; - if (embeddedFormat.getWhereClause() != null & !"".equals(embeddedFormat.getWhereClause())) { - sql.append(" AND ").append(embeddedFormat.getWhereClause()); - } - log.info(sql.toString()); - ResultSet rsEmbedded = null; - PreparedStatement pstmt = null; - try + + final StringBuffer whereClause = new StringBuffer(masterPO.get_KeyColumns()[0] +"=?"); + + if (embeddedFormat.getWhereClause() != null & !"".equals(embeddedFormat.getWhereClause())) { - pstmt = DB.prepareStatement(sql.toString(), masterPO.get_TrxName()); - pstmt.setInt(1, masterID); - rsEmbedded = pstmt.executeQuery(); - while (rsEmbedded.next()) - { - //System.out.println("Trifon - tableEmbedded.getTableName()_ID = "+ tableEmbedded.getTableName() + "_ID"); - int embeddedID = rsEmbedded.getInt(tableEmbedded.getTableName() + "_ID"); - PO poEmbedded = tableEmbedded.getPO (embeddedID, masterPO.get_TrxName()); - - Element embeddedElement = outDocument.createElement(formatLine.getValue()); - if (formatLine.getDescription() != null && !"".equals(formatLine.getDescription())) { - embeddedElement.appendChild(outDocument.createComment(formatLine.getDescription())); - } - generateExportFormat(embeddedElement, embeddedFormat, rsEmbedded, poEmbedded, embeddedID, variableMap); - rootElement.appendChild(embeddedElement); - } - - } finally { - try { - if (rsEmbedded != null) rsEmbedded.close(); - if (pstmt != null) pstmt.close(); - } catch (SQLException ex) { } - rsEmbedded = null; - pstmt = null; + whereClause.append(" AND ").append(embeddedFormat.getWhereClause()); } + Collection instances = new Query(masterPO.getCtx(), + tableEmbedded.getTableName(), whereClause.toString(), + masterPO.get_TrxName()).setClient_ID().setParameters( + new Object[] { masterID }).list(); + + for (PO instance : instances) + { + Element embeddedElement = outDocument.createElement(formatLine.getValue()); + if (formatLine.getDescription() != null && !"".equals(formatLine.getDescription())) + { + embeddedElement.appendChild(outDocument.createComment(formatLine.getDescription())); + } + + generateExportFormat(embeddedElement, embeddedFormat, instance, instance.get_ID(), variableMap); + rootElement.appendChild(embeddedElement); + } + } else if ( formatLine.getType().equals(X_EXP_FormatLine.TYPE_ReferencedEXPFormat) ) @@ -508,64 +413,35 @@ public class ExportHelper { MTable tableEmbedded = MTable.get(masterPO.getCtx(), embeddedFormat.getAD_Table_ID()); log.info("Table Embedded = " + tableEmbedded); - StringBuffer sql = new StringBuffer("SELECT * ") - .append("FROM ").append(tableEmbedded.getTableName()).append(" ") - .append("WHERE ").append(tableEmbedded.getTableName() + "_ID").append("=?") - //+ "WHERE " + po.get_WhereClause(false) - ; - if (embeddedFormat.getWhereClause() != null & !"".equals(embeddedFormat.getWhereClause())) { - sql.append(" AND ").append(embeddedFormat.getWhereClause()); - } - log.info(sql.toString()); - if (formatLine.getAD_Column_ID() == 0) { - throw new Exception(Msg.getMsg (masterPO.getCtx(), "EXPColumnMandatory")); - } - MColumn column = MColumn.get(masterPO.getCtx(), formatLine.getAD_Column_ID()); - if (column == null) { - throw new Exception(Msg.getMsg (masterPO.getCtx(), "EXPColumnMandatory")); - } - if ( column.isVirtualColumn() ) { - log.info("This is Virtual Column!"); - } else { } - //log.info("["+column.getColumnName()+"]"); - Object value = rs.getObject(column.getColumnName()); -/* String valueString = null; - if (value != null) { - valueString = value.toString(); - } else { - throw new Exception(Msg.getMsg (masterPO.getCtx(), "EXPFieldMandatory")); - } -*/ - log.info(sql.toString()); - ResultSet rsEmbedded = null; - PreparedStatement pstmt = null; - try + + final StringBuffer whereClause = new StringBuffer(tableEmbedded.getTableName() + "_ID =?"); + if (embeddedFormat.getWhereClause() != null & !"".equals(embeddedFormat.getWhereClause())) { - pstmt = DB.prepareStatement(sql.toString(), masterPO.get_TrxName()); - pstmt.setObject(1, value); - rsEmbedded = pstmt.executeQuery(); - while (rsEmbedded.next()) - { - //System.out.println("Trifon - tableEmbedded.getTableName()_ID = "+ tableEmbedded.getTableName() + "_ID"); - int embeddedID = rsEmbedded.getInt(tableEmbedded.getTableName() + "_ID"); - PO poEmbedded = tableEmbedded.getPO (embeddedID, masterPO.get_TrxName()); - - Element embeddedElement = outDocument.createElement(formatLine.getValue()); - if (formatLine.getDescription() != null && !"".equals(formatLine.getDescription())) { - embeddedElement.appendChild(outDocument.createComment(formatLine.getDescription())); - } - generateExportFormat(embeddedElement, embeddedFormat, rsEmbedded, poEmbedded, embeddedID, variableMap); - rootElement.appendChild(embeddedElement); - } - - } finally { - try { - if (rsEmbedded != null) rsEmbedded.close(); - if (pstmt != null) pstmt.close(); - } catch (SQLException ex) { } - rsEmbedded = null; - pstmt = null; + whereClause.append(" AND ").append(embeddedFormat.getWhereClause()); } + + Object value = masterPO.get_Value(tableEmbedded.getTableName() + "_ID"); + if (value == null) + { + continue; + } + + Collection instances = new Query(masterPO.getCtx(),tableEmbedded.getTableName(), whereClause.toString(),masterPO.get_TrxName()) + .setClient_ID() + .setParameters(value) + .list(); + + for (PO instance : instances) + { + Element embeddedElement = outDocument.createElement(formatLine.getValue()); + if (formatLine.getDescription() != null && !"".equals(formatLine.getDescription())) + { + embeddedElement.appendChild(outDocument.createComment(formatLine.getDescription())); + } + + generateExportFormat(embeddedElement, embeddedFormat, instance, instance.get_ID(), variableMap); + rootElement.appendChild(embeddedElement); + } } diff --git a/base/src/org/adempiere/process/rpl/imp/ImportHelper.java b/base/src/org/adempiere/process/rpl/imp/ImportHelper.java index 8575540c3b..29b96dd70e 100755 --- a/base/src/org/adempiere/process/rpl/imp/ImportHelper.java +++ b/base/src/org/adempiere/process/rpl/imp/ImportHelper.java @@ -25,7 +25,7 @@ * * * Sponsors: * * - E-evolution (http://www.e-evolution.com/) * - **********************************************************************/ + *********************************************************************/ package org.adempiere.process.rpl.imp; import java.math.BigDecimal; @@ -40,8 +40,8 @@ import java.util.Properties; import javax.xml.xpath.XPathExpressionException; import org.adempiere.exceptions.AdempiereException; -import org.adempiere.process.rpl.exp.ExportHelper; import org.adempiere.process.rpl.XMLHelper; +import org.adempiere.process.rpl.exp.ExportHelper; import org.compiere.model.I_AD_Client; import org.compiere.model.MClient; import org.compiere.model.MColumn; @@ -52,7 +52,9 @@ import org.compiere.model.MTable; import org.compiere.model.ModelValidator; import org.compiere.model.PO; import org.compiere.model.Query; +import org.compiere.model.X_AD_ReplicationDocument; import org.compiere.model.X_AD_ReplicationTable; +import org.compiere.process.DocAction; import org.compiere.util.CLogger; import org.compiere.util.DisplayType; import org.compiere.util.Env; @@ -69,6 +71,8 @@ import org.w3c.dom.NodeList; * @author victor.perez@e-evolution.com, e-Evolution *
  • [ 2195090 ] Stabilization of replication *
  • https://sourceforge.net/tracker/?func=detail&atid=879332&aid=2936561&group_id=176962 + *
  • BF [2947622] The replication ID (Primary Key) is not working + *
  • https://sourceforge.net/tracker/?func=detail&aid=2947622&group_id=176962&atid=879332 * */ public class ImportHelper { @@ -79,12 +83,6 @@ public class ImportHelper { /** Static Logger */ private static CLogger s_log = CLogger.getCLogger(ImportHelper.class); - /** Date Time Format */ - private SimpleDateFormat m_dateTimeFormat = null; - - /** Date Format */ - private SimpleDateFormat m_dateFormat = null; - /** Custom Date Format */ private SimpleDateFormat m_customDateFormat = null; @@ -94,9 +92,6 @@ public class ImportHelper { public ImportHelper(Properties ctx) { this.ctx = ctx; - // Construct DateFromat and DateTimeFormat - m_dateTimeFormat = DisplayType.getDateFormat(DisplayType.DateTime, Env.getLanguage(ctx)); - m_dateFormat = DisplayType.getDateFormat(DisplayType.Date, Env.getLanguage(ctx)); } /** @@ -171,65 +166,62 @@ public class ImportHelper { if(po != null) { - // Here must invoke other method else we get cycle... - if (ModelValidator.TYPE_BEFORE_DELETE == ReplicationEvent - || ModelValidator.TYPE_BEFORE_DELETE_REPLICATION == ReplicationEvent - || ModelValidator.TYPE_DELETE == ReplicationEvent) - { - po.deleteEx(true); - } - else - { - if(X_AD_ReplicationTable.REPLICATIONTYPE_Broadcast.equals(ReplicationType)) - { - po.saveReplica(true); - MReplicationStrategy rplStrategy = new MReplicationStrategy(client.getCtx(), client.getAD_ReplicationStrategy_ID(), null); - ExportHelper expHelper = new ExportHelper(client, rplStrategy); - expHelper.exportRecord( po, - MReplicationStrategy.REPLICATION_TABLE, - X_AD_ReplicationTable.REPLICATIONTYPE_Merge, - ModelValidator.TYPE_AFTER_CHANGE); - } - else if(X_AD_ReplicationTable.REPLICATIONTYPE_Merge.equals(ReplicationType) - || X_AD_ReplicationTable.REPLICATIONTYPE_Reference.equals(ReplicationType)) - { - po.saveReplica(true); - } - /*else if (X_AD_ReplicationTable.REPLICATIONTYPE_Reference.equals(ReplicationType)) - { - //Do nothing?? - }*/ - else if(X_AD_ReplicationTable.REPLICATIONTYPE_Local.equals(ReplicationType)) - { - //Do nothing?? - } - else - { - // Replication Type is not one of the possible values...ERROR - throw new Exception(Msg.getMsg(ctx, "EXPReplicationTypeNonValidType")); - } - - - } - } - result.append("Save Successful ;"); - /*if (resultSave) - { - if(ReplicationMode == MReplicationStrategy.REPLICATION_DOCUMENT && - ReplicationType == X_AD_ReplicationDocument.REPLICATIONTYPE_Merge) - { - String status = po.get_ValueAsString("DocStatus"); - String action = po.get_ValueAsString("DocAction"); - DocAction m_document; - m_document=(DocAction) po; - DocumentEngine engine = new DocumentEngine (m_document, status); - engine.processIt (action); - } - // Success in save - } else { - // Failed in save - throw new Exception(Msg.getMsg(ctx, "EXPFormatFailedSave")); - }*/ + if(MReplicationStrategy.REPLICATION_TABLE==ReplicationMode) + { + // Here must invoke other method else we get cycle... + if ( ModelValidator.TYPE_BEFORE_DELETE == ReplicationEvent + || ModelValidator.TYPE_BEFORE_DELETE_REPLICATION == ReplicationEvent + || ModelValidator.TYPE_DELETE == ReplicationEvent) + { + po.deleteEx(true); + } + else + { + if(X_AD_ReplicationTable.REPLICATIONTYPE_Broadcast.equals(ReplicationType)) + { + po.saveReplica(true); + MReplicationStrategy rplStrategy = new MReplicationStrategy(client.getCtx(), client.getAD_ReplicationStrategy_ID(), null); + ExportHelper expHelper = new ExportHelper(client, rplStrategy); + expHelper.exportRecord( po, + MReplicationStrategy.REPLICATION_TABLE, + X_AD_ReplicationTable.REPLICATIONTYPE_Merge, + ModelValidator.TYPE_AFTER_CHANGE); + + } + else if(X_AD_ReplicationTable.REPLICATIONTYPE_Merge.equals(ReplicationType) + || X_AD_ReplicationTable.REPLICATIONTYPE_Reference.equals(ReplicationType)) + { + if(po.is_Changed()) + { + po.saveReplica(true); + } + } + /*else if (X_AD_ReplicationTable.REPLICATIONTYPE_Reference.equals(ReplicationType)) + { + //Do nothing?? + }*/ + else if(X_AD_ReplicationTable.REPLICATIONTYPE_Local.equals(ReplicationType)) + { + //Do nothing?? + } + else + { + // Replication Type is not one of the possible values...ERROR + throw new Exception(Msg.getMsg(ctx, "EXPReplicationTypeNonValidType")); + } + } + } + else if(MReplicationStrategy.REPLICATION_DOCUMENT == ReplicationMode + && X_AD_ReplicationDocument.REPLICATIONTYPE_Merge.equals(ReplicationType) + && po instanceof DocAction) + { + Env.setContext(po.getCtx(), "#AD_Client_ID", po.getAD_Client_ID()); + DocAction document = (DocAction)po; + document.processIt(document.getDocAction()); + po.saveEx(); + } + } + result.append("Save Successful ;"); } /** @@ -239,7 +231,6 @@ public class ImportHelper { * @throws Exception * @throws XPathExpressionException */ - @SuppressWarnings("unchecked") private PO importElement(Properties ctx, StringBuffer result, Element rootElement, MEXPFormat expFormat, String ReplicationType, String trxName) throws Exception, XPathExpressionException { @@ -279,7 +270,7 @@ public class ImportHelper { log.info("=================== Beginnig of Format Line ==============================="); log.info("formatLine: [" + formatLine.toString() + "]"); //Get the value - Object value = getValueFromFormat(formatLine,po,rootElement,result,ReplicationType,trxName); + Object value = getValueFromFormat(formatLine,po,rootElement,result,ReplicationType); if (value == null || value.toString().equals("")) continue; //Set the value @@ -300,7 +291,7 @@ public class ImportHelper { * @throws Exception */ private Object getValueFromFormat(MEXPFormatLine line,PO po,Element rootElement, - StringBuffer result, String ReplicationType, String trxName) throws Exception + StringBuffer result, String ReplicationType) throws Exception { Object value = null; @@ -315,7 +306,7 @@ public class ImportHelper { { // Referenced Export Format //get from cache - MEXPFormat referencedExpFormat = MEXPFormat.get(ctx, line.getEXP_EmbeddedFormat_ID(), trxName); + MEXPFormat referencedExpFormat = MEXPFormat.get(ctx, line.getEXP_EmbeddedFormat_ID(), po.get_TrxName()); log.info("referencedExpFormat = " + referencedExpFormat); int refRecord_ID = 0; @@ -329,7 +320,7 @@ public class ImportHelper { log.info("referencedNode = " + referencedNode); if(referencedNode!=null) { - refRecord_ID = getID(ctx, referencedExpFormat, referencedNode, line.getValue(), trxName); + refRecord_ID = getID(ctx, referencedExpFormat, referencedNode, line.getValue(), po.get_TrxName()); log.info("refRecord_ID = " + refRecord_ID); value = new Integer(refRecord_ID); } @@ -349,7 +340,7 @@ public class ImportHelper { // Embedded Export Format It is used for Parent-Son records like Order&OrderLine //get from cache - MEXPFormat referencedExpFormat = MEXPFormat.get(ctx, line.getEXP_EmbeddedFormat_ID(), trxName); + MEXPFormat referencedExpFormat = MEXPFormat.get(ctx, line.getEXP_EmbeddedFormat_ID(), po.get_TrxName()); log.info("embeddedExpFormat = " + referencedExpFormat); NodeList nodeList = XMLHelper.getNodeList("/"+rootElement.getNodeName() + "/" + line.getValue(), rootElement); @@ -361,7 +352,7 @@ public class ImportHelper { PO embeddedPo = null; // Import embedded PO log.info("=== BEGIN RECURSION CALL ==="); - embeddedPo = importElement(ctx, result, referencedElement, referencedExpFormat,ReplicationType, trxName); + embeddedPo = importElement(ctx, result, referencedElement, referencedExpFormat,ReplicationType, po.get_TrxName()); log.info("embeddedPo = " + embeddedPo); embeddedPo.saveReplica(true); result.append(" Embedded Save Successful ; "); @@ -394,15 +385,16 @@ public class ImportHelper { */ private void setReplicaValues(Object value,MEXPFormatLine line,PO po,StringBuffer result)throws Exception { + MColumn column = MColumn.get(ctx, line.getAD_Column_ID()); + log.info("column=[" + column + "]"); + if (value !=null) { if (!MEXPFormatLine.TYPE_EmbeddedEXPFormat.equals(line.getType()) ) { - MColumn column = MColumn.get(ctx, line.getAD_Column_ID()); - log.info("column=[" + column + "]"); // Clazz - Class clazz = DisplayType.getClass(column.getAD_Reference_ID(), true); + Class clazz = DisplayType.getClass(column.getAD_Reference_ID(), true); // Handle Posted if (column.getColumnName().equalsIgnoreCase("Posted") @@ -481,7 +473,11 @@ public class ImportHelper { } else if(DisplayType.YesNo == column.getAD_Reference_ID()) { - po.set_ValueOfColumn(line.getAD_Column_ID(), value); + if(clazz == Boolean.class) + { + String v = value.toString().equals("true") ? "Y" : "N"; + po.set_ValueOfColumn(line.getAD_Column_ID(), v); + } } else { @@ -491,7 +487,8 @@ public class ImportHelper { if(clazz == Boolean.class) { - po.set_ValueOfColumn(line.getAD_Column_ID(), value); + String v = value.toString().equals("true") ? "Y" : "N"; + po.set_ValueOfColumn(line.getAD_Column_ID(), v); } else { @@ -519,7 +516,7 @@ public class ImportHelper { { final String whereClause = I_AD_Client.COLUMNNAME_Value + "= ? "; MClient result = new Query(ctx,I_AD_Client.Table_Name,whereClause,trxName) - .setParameters(new Object[]{value}) + .setParameters(value) .firstOnly(); s_log.info("Client_Value =[" + value + "]"); @@ -565,6 +562,7 @@ public class ImportHelper { throw new AdempiereException(Msg.getMsg(ctx, "EXPFormatLineNoUniqueColumns")); } + int replication_id = 0; Object[] cols = new Object[uniqueFormatLines.size()]; Object[] params = new Object[uniqueFormatLines.size()]; StringBuffer whereClause= new StringBuffer(""); @@ -634,6 +632,10 @@ public class ImportHelper { { //double doubleValue = Double.parseDouble(value.toString()); value = new Integer(value.toString()); + if (DisplayType.ID == column.getAD_Reference_ID()) + { + replication_id = (Integer) value; + } } else { @@ -671,7 +673,14 @@ public class ImportHelper { if(values.size()<=0)//Means that is a new record { - return MTable.get(ctx, expFormat.getAD_Table_ID()).getPO(0,trxName); + PO po = po = MTable.get(ctx, expFormat.getAD_Table_ID()).getPO(0,trxName); + + if (replication_id > 0 ) + { + po.set_CustomColumn(po.get_KeyColumns()[0], replication_id); + } + + return po; } return values.get(0);//Return the first (unique) record. diff --git a/base/src/org/compiere/acct/Doc.java b/base/src/org/compiere/acct/Doc.java index f7c1410fc9..b69747e099 100644 --- a/base/src/org/compiere/acct/Doc.java +++ b/base/src/org/compiere/acct/Doc.java @@ -31,7 +31,6 @@ import java.util.logging.Level; import org.adempiere.exceptions.DBException; import org.compiere.model.MAccount; import org.compiere.model.MAcctSchema; -import org.compiere.model.MClient; import org.compiere.model.MConversionRate; import org.compiere.model.MDocType; import org.compiere.model.MNote; @@ -358,6 +357,9 @@ public abstract class Doc /** Log per Document */ protected CLogger log = CLogger.getCLogger(getClass()); + /* If the transaction must be managed locally (false if it's managed externally by the caller) */ + private boolean m_manageLocalTrx; + /************************************************************************** * Constructor @@ -396,8 +398,11 @@ public abstract class Doc // Document Type setDocumentType (defaultDocumentType); m_trxName = trxName; - if (m_trxName == null) + m_manageLocalTrx = false; + if (m_trxName == null) { m_trxName = "Post" + m_DocumentType + p_po.get_ID(); + m_manageLocalTrx = true; + } p_po.set_TrxName(m_trxName); // Amounts @@ -551,7 +556,7 @@ public abstract class Doc // Lock Record ---- String trxName = null; // outside trx if on server - if (MClient.isClientAccounting()) + if (! m_manageLocalTrx) trxName = getTrxName(); // on trx if it's in client StringBuffer sql = new StringBuffer ("UPDATE "); sql.append(get_TableName()).append( " SET Processing='Y' WHERE ") @@ -830,8 +835,10 @@ public abstract class Doc else { log.log(Level.SEVERE, "(fact not saved) ... rolling back"); - trx.rollback(); - trx.close(); + if (m_manageLocalTrx) { + trx.rollback(); + trx.close(); + } unlock(); return STATUS_Error; } @@ -841,30 +848,36 @@ public abstract class Doc if (!save(getTrxName())) // contains unlock & document status update { log.log(Level.SEVERE, "(doc not saved) ... rolling back"); - trx.rollback(); - trx.close(); + if (m_manageLocalTrx) { + trx.rollback(); + trx.close(); + } unlock(); return STATUS_Error; } // Success - trx.commit(true); - trx.close(); - trx = null; + if (m_manageLocalTrx) { + trx.commit(true); + trx.close(); + trx = null; + } // *** Transaction End *** } catch (Exception e) { log.log(Level.SEVERE, "... rolling back", e); status = STATUS_Error; - try { - if (trx != null) - trx.rollback(); - } catch (Exception e2) {} - try { - if (trx != null) - trx.close(); - trx = null; - } catch (Exception e3) {} + if (m_manageLocalTrx) { + try { + if (trx != null) + trx.rollback(); + } catch (Exception e2) {} + try { + if (trx != null) + trx.close(); + trx = null; + } catch (Exception e3) {} + } unlock(); } p_Status = status; @@ -886,7 +899,7 @@ public abstract class Doc private void unlock() { String trxName = null; // outside trx if on server - if (MClient.isClientAccounting()) + if (! m_manageLocalTrx) trxName = getTrxName(); // on trx if it's in client StringBuffer sql = new StringBuffer ("UPDATE "); sql.append(get_TableName()).append( " SET Processing='N' WHERE ") @@ -2013,6 +2026,38 @@ public abstract class Doc return 0; } // getC_Project_ID + /** + * Get C_ProjectPhase_ID + * @return Project Phase + */ + public int getC_ProjectPhase_ID() + { + int index = p_po.get_ColumnIndex("C_ProjectPhase_ID"); + if (index != -1) + { + Integer ii = (Integer)p_po.get_Value(index); + if (ii != null) + return ii.intValue(); + } + return 0; + } // getC_ProjectPhase_ID + + /** + * Get C_ProjectTask_ID + * @return Project Task + */ + public int getC_ProjectTask_ID() + { + int index = p_po.get_ColumnIndex("C_ProjectTask_ID"); + if (index != -1) + { + Integer ii = (Integer)p_po.get_Value(index); + if (ii != null) + return ii.intValue(); + } + return 0; + } // getC_ProjectTask_ID + /** * Get C_SalesRegion_ID * @return Sales Region diff --git a/base/src/org/compiere/acct/DocLine.java b/base/src/org/compiere/acct/DocLine.java index 339b269240..fec7b9a5df 100644 --- a/base/src/org/compiere/acct/DocLine.java +++ b/base/src/org/compiere/acct/DocLine.java @@ -1,1108 +1,1140 @@ -/****************************************************************************** - * Product: Adempiere ERP & CRM Smart Business Solution * - * Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it * - * under the terms version 2 of the GNU General Public License as published * - * by the Free Software Foundation. This program is distributed in the hope * - * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * - * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * - * See the GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License along * - * with this program; if not, write to the Free Software Foundation, Inc., * - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * - * For the text or an alternative of this public license, you may reach us * - * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * - * or via info@compiere.org or http://www.compiere.org/license.html * - *****************************************************************************/ -package org.compiere.acct; - -import java.math.BigDecimal; -import java.sql.Timestamp; - -import org.compiere.model.MAccount; -import org.compiere.model.MAcctSchema; -import org.compiere.model.MCharge; -import org.compiere.model.MCostDetail; -import org.compiere.model.MProduct; -import org.compiere.model.PO; -import org.compiere.model.ProductCost; -import org.compiere.util.CLogger; -import org.compiere.util.DB; -import org.compiere.util.Env; - -/** - * Standard Document Line - * - * @author Jorg Janke - * @author Armen Rizal, Goodwill Consulting - *
  • BF [ 1745154 ] Cost in Reversing Material Related Docs - * @version $Id: DocLine.java,v 1.2 2006/07/30 00:53:33 jjanke Exp $ - */ -public class DocLine -{ - /** - * Create Document Line - * @param po line persistent object - * @param doc header - */ - public DocLine (PO po, Doc doc) - { - if (po == null) - throw new IllegalArgumentException("PO is null"); - p_po = po; - m_doc = doc; - // - // Document Consistency - if (p_po.getAD_Org_ID() == 0) - p_po.setAD_Org_ID(m_doc.getAD_Org_ID()); - } // DocLine - - /** Persistent Object */ - protected PO p_po = null; - /** Parent */ - private Doc m_doc = null; - /** Log */ - protected CLogger log = CLogger.getCLogger(getClass()); - - /** Qty */ - private BigDecimal m_qty = null; - - // -- GL Amounts - /** Debit Journal Amt */ - private BigDecimal m_AmtSourceDr = Env.ZERO; - /** Credit Journal Amt */ - private BigDecimal m_AmtSourceCr = Env.ZERO; - /** Net Line Amt */ - private BigDecimal m_LineNetAmt = null; - /** List Amount */ - private BigDecimal m_ListAmt = Env.ZERO; - /** Discount Amount */ - private BigDecimal m_DiscountAmt = Env.ZERO; - - /** Converted Amounts */ - private BigDecimal m_AmtAcctDr = null; - private BigDecimal m_AmtAcctCr = null; - /** Acct Schema */ - private int m_C_AcctSchema_ID = 0; - - /** Product Costs */ - private ProductCost m_productCost = null; - /** Production indicator */ - private boolean m_productionBOM = false; - /** Outside Processing */ - private int m_PP_Cost_Collector_ID = 0; - /** Account used only for GL Journal */ - private MAccount m_account = null; - - /** Accounting Date */ - private Timestamp m_DateAcct = null; - /** Document Date */ - private Timestamp m_DateDoc = null; - /** Sales Region */ - private int m_C_SalesRegion_ID = -1; - /** Sales Region */ - private int m_C_BPartner_ID = -1; - /** Location From */ - private int m_C_LocFrom_ID = 0; - /** Location To */ - private int m_C_LocTo_ID = 0; - /** Item */ - private Boolean m_isItem = null; - /** Currency */ - private int m_C_Currency_ID = -1; - /** Conversion Type */ - private int m_C_ConversionType_ID = -1; - /** Period */ - private int m_C_Period_ID = -1; - - /** - * Get Currency - * @return c_Currency_ID - */ - public int getC_Currency_ID () - { - if (m_C_Currency_ID == -1) - { - int index = p_po.get_ColumnIndex("C_Currency_ID"); - if (index != -1) - { - Integer ii = (Integer)p_po.get_Value(index); - if (ii != null) - m_C_Currency_ID = ii.intValue(); - } - if (m_C_Currency_ID <= 0) - m_C_Currency_ID = m_doc.getC_Currency_ID(); - } - return m_C_Currency_ID; - } // getC_Currency_ID - - /** - * Get Conversion Type - * @return C_ConversionType_ID - */ - public int getC_ConversionType_ID () - { - if (m_C_ConversionType_ID == -1) - { - int index = p_po.get_ColumnIndex("C_ConversionType_ID"); - if (index != -1) - { - Integer ii = (Integer)p_po.get_Value(index); - if (ii != null) - m_C_ConversionType_ID = ii.intValue(); - } - if (m_C_ConversionType_ID <= 0) - m_C_ConversionType_ID = m_doc.getC_ConversionType_ID(); - } - return m_C_ConversionType_ID; - } // getC_ConversionType_ID - - /** - * Set C_ConversionType_ID - * @param C_ConversionType_ID id - */ - protected void setC_ConversionType_ID(int C_ConversionType_ID) - { - m_C_ConversionType_ID = C_ConversionType_ID; - } // setC_ConversionType_ID - - /** - * Set Amount (DR) - * @param sourceAmt source amt - */ - public void setAmount (BigDecimal sourceAmt) - { - m_AmtSourceDr = sourceAmt == null ? Env.ZERO : sourceAmt; - m_AmtSourceCr = Env.ZERO; - } // setAmounts - - /** - * Set Amounts - * @param amtSourceDr source amount dr - * @param amtSourceCr source amount cr - */ - public void setAmount (BigDecimal amtSourceDr, BigDecimal amtSourceCr) - { - m_AmtSourceDr = amtSourceDr == null ? Env.ZERO : amtSourceDr; - m_AmtSourceCr = amtSourceCr == null ? Env.ZERO : amtSourceCr; - } // setAmounts - - /** - * Set Converted Amounts - * @param C_AcctSchema_ID acct schema - * @param amtAcctDr acct amount dr - * @param amtAcctCr acct amount cr - */ - public void setConvertedAmt (int C_AcctSchema_ID, BigDecimal amtAcctDr, BigDecimal amtAcctCr) - { - m_C_AcctSchema_ID = C_AcctSchema_ID; - m_AmtAcctDr = amtAcctDr; - m_AmtAcctCr = amtAcctCr; - } // setConvertedAmt - - /** - * Line Net Amount or Dr-Cr - * @return balance - */ - public BigDecimal getAmtSource() - { - return m_AmtSourceDr.subtract(m_AmtSourceCr); - } // getAmount - - /** - * Get (Journal) Line Source Dr Amount - * @return DR source amount - */ - public BigDecimal getAmtSourceDr() - { - return m_AmtSourceDr; - } // getAmtSourceDr - - /** - * Get (Journal) Line Source Cr Amount - * @return CR source amount - */ - public BigDecimal getAmtSourceCr() - { - return m_AmtSourceCr; - } // getAmtSourceCr - - /** - * Line Journal Accounted Dr Amount - * @return DR accounted amount - */ - public BigDecimal getAmtAcctDr() - { - return m_AmtAcctDr; - } // getAmtAcctDr - - /** - * Line Journal Accounted Cr Amount - * @return CR accounted amount - */ - public BigDecimal getAmtAcctCr() - { - return m_AmtAcctCr; - } // getAmtAccrCr - - /** - * Charge Amount - * @return charge amount - */ - public BigDecimal getChargeAmt() - { - int index = p_po.get_ColumnIndex("ChargeAmt"); - if (index != -1) - { - BigDecimal bd = (BigDecimal)p_po.get_Value(index); - if (bd != null) - return bd; - } - return Env.ZERO; - } // getChargeAmt - - /** - * Set Product Amounts - * @param LineNetAmt Line Net Amt - * @param PriceList Price List - * @param Qty Qty for discount calc - */ - public void setAmount (BigDecimal LineNetAmt, BigDecimal PriceList, BigDecimal Qty) - { - m_LineNetAmt = LineNetAmt == null ? Env.ZERO : LineNetAmt; - - if (PriceList != null && Qty != null) - m_ListAmt = PriceList.multiply(Qty); +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. * + * This program is free software; you can redistribute it and/or modify it * + * under the terms version 2 of the GNU General Public License as published * + * by the Free Software Foundation. This program is distributed in the hope * + * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * + * See the GNU General Public License for more details. * + * You should have received a copy of the GNU General Public License along * + * with this program; if not, write to the Free Software Foundation, Inc., * + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * + * For the text or an alternative of this public license, you may reach us * + * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * + * or via info@compiere.org or http://www.compiere.org/license.html * + *****************************************************************************/ +package org.compiere.acct; + +import java.math.BigDecimal; +import java.sql.Timestamp; + +import org.compiere.model.MAccount; +import org.compiere.model.MAcctSchema; +import org.compiere.model.MCharge; +import org.compiere.model.MCostDetail; +import org.compiere.model.MProduct; +import org.compiere.model.PO; +import org.compiere.model.ProductCost; +import org.compiere.util.CLogger; +import org.compiere.util.DB; +import org.compiere.util.Env; + +/** + * Standard Document Line + * + * @author Jorg Janke + * @author Armen Rizal, Goodwill Consulting + *
  • BF [ 1745154 ] Cost in Reversing Material Related Docs + * @version $Id: DocLine.java,v 1.2 2006/07/30 00:53:33 jjanke Exp $ + */ +public class DocLine +{ + /** + * Create Document Line + * @param po line persistent object + * @param doc header + */ + public DocLine (PO po, Doc doc) + { + if (po == null) + throw new IllegalArgumentException("PO is null"); + p_po = po; + m_doc = doc; + // + // Document Consistency + if (p_po.getAD_Org_ID() == 0) + p_po.setAD_Org_ID(m_doc.getAD_Org_ID()); + } // DocLine + + /** Persistent Object */ + protected PO p_po = null; + /** Parent */ + private Doc m_doc = null; + /** Log */ + protected CLogger log = CLogger.getCLogger(getClass()); + + /** Qty */ + private BigDecimal m_qty = null; + + // -- GL Amounts + /** Debit Journal Amt */ + private BigDecimal m_AmtSourceDr = Env.ZERO; + /** Credit Journal Amt */ + private BigDecimal m_AmtSourceCr = Env.ZERO; + /** Net Line Amt */ + private BigDecimal m_LineNetAmt = null; + /** List Amount */ + private BigDecimal m_ListAmt = Env.ZERO; + /** Discount Amount */ + private BigDecimal m_DiscountAmt = Env.ZERO; + + /** Converted Amounts */ + private BigDecimal m_AmtAcctDr = null; + private BigDecimal m_AmtAcctCr = null; + /** Acct Schema */ + private int m_C_AcctSchema_ID = 0; + + /** Product Costs */ + private ProductCost m_productCost = null; + /** Production indicator */ + private boolean m_productionBOM = false; + /** Outside Processing */ + private int m_PP_Cost_Collector_ID = 0; + /** Account used only for GL Journal */ + private MAccount m_account = null; + + /** Accounting Date */ + private Timestamp m_DateAcct = null; + /** Document Date */ + private Timestamp m_DateDoc = null; + /** Sales Region */ + private int m_C_SalesRegion_ID = -1; + /** Sales Region */ + private int m_C_BPartner_ID = -1; + /** Location From */ + private int m_C_LocFrom_ID = 0; + /** Location To */ + private int m_C_LocTo_ID = 0; + /** Item */ + private Boolean m_isItem = null; + /** Currency */ + private int m_C_Currency_ID = -1; + /** Conversion Type */ + private int m_C_ConversionType_ID = -1; + /** Period */ + private int m_C_Period_ID = -1; + + /** + * Get Currency + * @return c_Currency_ID + */ + public int getC_Currency_ID () + { + if (m_C_Currency_ID == -1) + { + int index = p_po.get_ColumnIndex("C_Currency_ID"); + if (index != -1) + { + Integer ii = (Integer)p_po.get_Value(index); + if (ii != null) + m_C_Currency_ID = ii.intValue(); + } + if (m_C_Currency_ID <= 0) + m_C_Currency_ID = m_doc.getC_Currency_ID(); + } + return m_C_Currency_ID; + } // getC_Currency_ID + + /** + * Get Conversion Type + * @return C_ConversionType_ID + */ + public int getC_ConversionType_ID () + { + if (m_C_ConversionType_ID == -1) + { + int index = p_po.get_ColumnIndex("C_ConversionType_ID"); + if (index != -1) + { + Integer ii = (Integer)p_po.get_Value(index); + if (ii != null) + m_C_ConversionType_ID = ii.intValue(); + } + if (m_C_ConversionType_ID <= 0) + m_C_ConversionType_ID = m_doc.getC_ConversionType_ID(); + } + return m_C_ConversionType_ID; + } // getC_ConversionType_ID + + /** + * Set C_ConversionType_ID + * @param C_ConversionType_ID id + */ + protected void setC_ConversionType_ID(int C_ConversionType_ID) + { + m_C_ConversionType_ID = C_ConversionType_ID; + } // setC_ConversionType_ID + + /** + * Set Amount (DR) + * @param sourceAmt source amt + */ + public void setAmount (BigDecimal sourceAmt) + { + m_AmtSourceDr = sourceAmt == null ? Env.ZERO : sourceAmt; + m_AmtSourceCr = Env.ZERO; + } // setAmounts + + /** + * Set Amounts + * @param amtSourceDr source amount dr + * @param amtSourceCr source amount cr + */ + public void setAmount (BigDecimal amtSourceDr, BigDecimal amtSourceCr) + { + m_AmtSourceDr = amtSourceDr == null ? Env.ZERO : amtSourceDr; + m_AmtSourceCr = amtSourceCr == null ? Env.ZERO : amtSourceCr; + } // setAmounts + + /** + * Set Converted Amounts + * @param C_AcctSchema_ID acct schema + * @param amtAcctDr acct amount dr + * @param amtAcctCr acct amount cr + */ + public void setConvertedAmt (int C_AcctSchema_ID, BigDecimal amtAcctDr, BigDecimal amtAcctCr) + { + m_C_AcctSchema_ID = C_AcctSchema_ID; + m_AmtAcctDr = amtAcctDr; + m_AmtAcctCr = amtAcctCr; + } // setConvertedAmt + + /** + * Line Net Amount or Dr-Cr + * @return balance + */ + public BigDecimal getAmtSource() + { + return m_AmtSourceDr.subtract(m_AmtSourceCr); + } // getAmount + + /** + * Get (Journal) Line Source Dr Amount + * @return DR source amount + */ + public BigDecimal getAmtSourceDr() + { + return m_AmtSourceDr; + } // getAmtSourceDr + + /** + * Get (Journal) Line Source Cr Amount + * @return CR source amount + */ + public BigDecimal getAmtSourceCr() + { + return m_AmtSourceCr; + } // getAmtSourceCr + + /** + * Line Journal Accounted Dr Amount + * @return DR accounted amount + */ + public BigDecimal getAmtAcctDr() + { + return m_AmtAcctDr; + } // getAmtAcctDr + + /** + * Line Journal Accounted Cr Amount + * @return CR accounted amount + */ + public BigDecimal getAmtAcctCr() + { + return m_AmtAcctCr; + } // getAmtAccrCr + + /** + * Charge Amount + * @return charge amount + */ + public BigDecimal getChargeAmt() + { + int index = p_po.get_ColumnIndex("ChargeAmt"); + if (index != -1) + { + BigDecimal bd = (BigDecimal)p_po.get_Value(index); + if (bd != null) + return bd; + } + return Env.ZERO; + } // getChargeAmt + + /** + * Set Product Amounts + * @param LineNetAmt Line Net Amt + * @param PriceList Price List + * @param Qty Qty for discount calc + */ + public void setAmount (BigDecimal LineNetAmt, BigDecimal PriceList, BigDecimal Qty) + { + m_LineNetAmt = LineNetAmt == null ? Env.ZERO : LineNetAmt; + + if (PriceList != null && Qty != null) + m_ListAmt = PriceList.multiply(Qty); if (m_ListAmt.compareTo(Env.ZERO) == 0) - m_ListAmt = m_LineNetAmt; - m_DiscountAmt = m_ListAmt.subtract(m_LineNetAmt); - // - setAmount (m_ListAmt, m_DiscountAmt); - // Log.trace(this,Log.l6_Database, "DocLine_Invoice.setAmount", - // "LineNet=" + m_LineNetAmt + ", List=" + m_ListAmt + ", Discount=" + m_DiscountAmt - // + " => Amount=" + getAmount()); - } // setAmounts - - /** - * Line Discount - * @return discount amount - */ - public BigDecimal getDiscount() - { - return m_DiscountAmt; - } // getDiscount - - /** - * Line List Amount - * @return list amount - */ - public BigDecimal getListAmount() - { - return m_ListAmt; - } // getListAmount - - /** - * Set Line Net Amt Difference - * @param diff difference (to be subtracted) - */ - public void setLineNetAmtDifference (BigDecimal diff) - { - String msg = "Diff=" + diff - + " - LineNetAmt=" + m_LineNetAmt; - m_LineNetAmt = m_LineNetAmt.subtract(diff); - m_DiscountAmt = m_ListAmt.subtract(m_LineNetAmt); - setAmount (m_ListAmt, m_DiscountAmt); - msg += " -> " + m_LineNetAmt; - log.fine(msg); - } // setLineNetAmtDifference - - /************************************************************************** - * Set Accounting Date - * @param dateAcct acct date - */ - public void setDateAcct (Timestamp dateAcct) - { - m_DateAcct = dateAcct; - } // setDateAcct - - /** - * Get Accounting Date - * @return accounting date - */ - public Timestamp getDateAcct () - { - if (m_DateAcct != null) - return m_DateAcct; - int index = p_po.get_ColumnIndex("DateAcct"); - if (index != -1) - { - m_DateAcct = (Timestamp)p_po.get_Value(index); - if (m_DateAcct != null) - return m_DateAcct; - } - m_DateAcct = m_doc.getDateAcct(); - return m_DateAcct; - } // getDateAcct - - /** - * Set Document Date - * @param dateDoc doc date - */ - public void setDateDoc (Timestamp dateDoc) - { - m_DateDoc = dateDoc; - } // setDateDoc - - /** - * Get Document Date - * @return document date - */ - public Timestamp getDateDoc () - { - if (m_DateDoc != null) - return m_DateDoc; - int index = p_po.get_ColumnIndex("DateDoc"); - if (index != -1) - { - m_DateDoc = (Timestamp)p_po.get_Value(index); - if (m_DateDoc != null) - return m_DateDoc; - } - m_DateDoc = m_doc.getDateDoc(); - return m_DateDoc; - } // getDateDoc - - - /************************************************************************** - * Set GL Journal Account - * @param acct account - */ - public void setAccount (MAccount acct) - { - m_account = acct; - } // setAccount - - /** - * Get GL Journal Account - * @return account - */ - public MAccount getAccount() - { - return m_account; - } // getAccount - - /** - * Line Account from Product (or Charge). - * - * @param AcctType see ProductCost.ACCTTYPE_* (0..3) - * @param as Accounting schema - * @return Requested Product Account - */ - public MAccount getAccount (int AcctType, MAcctSchema as) - { - // Charge Account - if (getM_Product_ID() == 0 && getC_Charge_ID() != 0) - { - BigDecimal amt = new BigDecimal (-1); // Revenue (-) - if (!m_doc.isSOTrx()) - amt = new BigDecimal (+1); // Expense (+) - MAccount acct = getChargeAccount(as, amt); - if (acct != null) - return acct; - } - // Product Account - return getProductCost().getAccount (AcctType, as); - } // getAccount - - /** - * Get Charge - * @return C_Charge_ID - */ - protected int getC_Charge_ID() - { - int index = p_po.get_ColumnIndex("C_Charge_ID"); - if (index != -1) - { - Integer ii = (Integer)p_po.get_Value(index); - if (ii != null) - return ii.intValue(); - } - return 0; - } // getC_Charge_ID - - /** - * Get Charge Account - * @param as account schema - * @param amount amount for expense(+)/revenue(-) - * @return Charge Account or null - */ - public MAccount getChargeAccount (MAcctSchema as, BigDecimal amount) - { - int C_Charge_ID = getC_Charge_ID(); - if (C_Charge_ID == 0) - return null; - return MCharge.getAccount(C_Charge_ID, as, amount); - } // getChargeAccount - - /** - * Get Period - * @return C_Period_ID - */ - protected int getC_Period_ID() - { - if (m_C_Period_ID == -1) - { - int index = p_po.get_ColumnIndex("C_Period_ID"); - if (index != -1) - { - Integer ii = (Integer)p_po.get_Value(index); - if (ii != null) - m_C_Period_ID = ii.intValue(); - } - if (m_C_Period_ID == -1) - m_C_Period_ID = 0; - } - return m_C_Period_ID; - } // getC_Period_ID - - /** - * Set C_Period_ID - * @param C_Period_ID id - */ - protected void setC_Period_ID (int C_Period_ID) - { - m_C_Period_ID = C_Period_ID; - } // setC_Period_ID - - /************************************************************************** - * Get (Journal) AcctSchema - * @return C_AcctSchema_ID - */ - public int getC_AcctSchema_ID() - { - return m_C_AcctSchema_ID; - } // getC_AcctSchema_ID - - /** - * Get Line ID - * @return id - */ - public int get_ID() - { - return p_po.get_ID(); - } // get_ID - - /** - * Get AD_Org_ID - * @return org - */ - public int getAD_Org_ID() - { - return p_po.getAD_Org_ID(); - } // getAD_Org_ID - - /** - * Get Order AD_Org_ID - * @return order org if defined - */ - public int getOrder_Org_ID() - { - int C_OrderLine_ID = getC_OrderLine_ID(); - if (C_OrderLine_ID != 0) - { - String sql = "SELECT AD_Org_ID FROM C_OrderLine WHERE C_OrderLine_ID=?"; - int AD_Org_ID = DB.getSQLValue(null, sql, C_OrderLine_ID); - if (AD_Org_ID > 0) - return AD_Org_ID; - } - return getAD_Org_ID(); - } // getOrder_Org_ID - - /** - * Product - * @return M_Product_ID - */ - public int getM_Product_ID() - { - int index = p_po.get_ColumnIndex("M_Product_ID"); - if (index != -1) - { - Integer ii = (Integer)p_po.get_Value(index); - if (ii != null) - return ii.intValue(); - } - return 0; - } // getM_Product_ID - - /** - * Is this an Item Product (vs. not a Service, a charge) - * @return true if product - */ - public boolean isItem() - { - if (m_isItem != null) - return m_isItem.booleanValue(); - - m_isItem = Boolean.FALSE; - if (getM_Product_ID() != 0) - { - MProduct product = MProduct.get(Env.getCtx(), getM_Product_ID()); - if (product.get_ID() == getM_Product_ID() && product.isItem()) - m_isItem = Boolean.TRUE; - } - return m_isItem.booleanValue(); - } // isItem - - /** - * ASI - * @return M_AttributeSetInstance_ID - */ - public int getM_AttributeSetInstance_ID() - { - int index = p_po.get_ColumnIndex("M_AttributeSetInstance_ID"); - if (index != -1) - { - Integer ii = (Integer)p_po.get_Value(index); - if (ii != null) - return ii.intValue(); - } - return 0; - } // getM_AttributeSetInstance_ID - - /** - * Get Warehouse Locator (from) - * @return M_Locator_ID - */ - public int getM_Locator_ID() - { - int index = p_po.get_ColumnIndex("M_Locator_ID"); - if (index != -1) - { - Integer ii = (Integer)p_po.get_Value(index); - if (ii != null) - return ii.intValue(); - } - return 0; - } // getM_Locator_ID - - /** - * Get Warehouse Locator To - * @return M_Locator_ID - */ - public int getM_LocatorTo_ID() - { - int index = p_po.get_ColumnIndex("M_LocatorTo_ID"); - if (index != -1) - { - Integer ii = (Integer)p_po.get_Value(index); - if (ii != null) - return ii.intValue(); - } - return 0; - } // getM_LocatorTo_ID - - /** - * Set Production BOM flag - * @param productionBOM flag - */ - public void setProductionBOM(boolean productionBOM) - { - m_productionBOM = productionBOM; - } // setProductionBOM - - /** - * Is this the BOM to be produced - * @return true if BOM - */ - public boolean isProductionBOM() - { - return m_productionBOM; - } // isProductionBOM - - /** - * Get Production Plan - * @return M_ProductionPlan_ID - */ - public int getM_ProductionPlan_ID() - { - int index = p_po.get_ColumnIndex("M_ProductionPlan_ID"); - if (index != -1) - { - Integer ii = (Integer)p_po.get_Value(index); - if (ii != null) - return ii.intValue(); - } - return 0; - } // getM_ProductionPlan_ID - - /** - * Get Order Line Reference - * @return C_OrderLine_ID - */ - public int getC_OrderLine_ID() - { - int index = p_po.get_ColumnIndex("C_OrderLine_ID"); - if (index != -1) - { - Integer ii = (Integer)p_po.get_Value(index); - if (ii != null) - return ii.intValue(); - } - return 0; - } // getC_OrderLine_ID - - /** - * Get C_LocFrom_ID - * @return loc from - */ - public int getC_LocFrom_ID() - { - return m_C_LocFrom_ID; - } // getC_LocFrom_ID - - /** - * Set C_LocFrom_ID - * @param C_LocFrom_ID loc from - */ - public void setC_LocFrom_ID(int C_LocFrom_ID) - { - m_C_LocFrom_ID = C_LocFrom_ID; - } // setC_LocFrom_ID - - /** - * Get PP_Cost_Collector_ID - * @return Cost Collector ID - */ - public int getPP_Cost_Collector_ID() - { - return m_PP_Cost_Collector_ID; - } // getC_LocFrom_ID - - /** - * Get PP_Cost_Collector_ID - * @return Cost Collector ID - */ - public int setPP_Cost_Collector_ID(int PP_Cost_Collector_ID) - { - return m_PP_Cost_Collector_ID; - } // getC_LocFrom_ID - - /** - * Get C_LocTo_ID - * @return loc to - */ - public int getC_LocTo_ID() - { - return m_C_LocTo_ID; - } // getC_LocTo_ID - - /** - * Set C_LocTo_ID - * @param C_LocTo_ID loc to - */ - public void setC_LocTo_ID(int C_LocTo_ID) - { - m_C_LocTo_ID = C_LocTo_ID; - } // setC_LocTo_ID - - /** - * Get Product Cost Info - * @return product cost - */ - public ProductCost getProductCost() - { - if (m_productCost == null) - m_productCost = new ProductCost (Env.getCtx(), - getM_Product_ID(), getM_AttributeSetInstance_ID(), p_po.get_TrxName()); - return m_productCost; - } // getProductCost - - // MZ Goodwill - /** - * Get Total Product Costs from Cost Detail or from Current Cost - * @param as accounting schema - * @param AD_Org_ID trx org - * @param zeroCostsOK zero/no costs are OK - * @param whereClause null are OK - * @return costs - */ - public BigDecimal getProductCosts (MAcctSchema as, int AD_Org_ID, boolean zeroCostsOK, String whereClause) - { + m_ListAmt = m_LineNetAmt; + m_DiscountAmt = m_ListAmt.subtract(m_LineNetAmt); + // + setAmount (m_ListAmt, m_DiscountAmt); + // Log.trace(this,Log.l6_Database, "DocLine_Invoice.setAmount", + // "LineNet=" + m_LineNetAmt + ", List=" + m_ListAmt + ", Discount=" + m_DiscountAmt + // + " => Amount=" + getAmount()); + } // setAmounts + + /** + * Line Discount + * @return discount amount + */ + public BigDecimal getDiscount() + { + return m_DiscountAmt; + } // getDiscount + + /** + * Line List Amount + * @return list amount + */ + public BigDecimal getListAmount() + { + return m_ListAmt; + } // getListAmount + + /** + * Set Line Net Amt Difference + * @param diff difference (to be subtracted) + */ + public void setLineNetAmtDifference (BigDecimal diff) + { + String msg = "Diff=" + diff + + " - LineNetAmt=" + m_LineNetAmt; + m_LineNetAmt = m_LineNetAmt.subtract(diff); + m_DiscountAmt = m_ListAmt.subtract(m_LineNetAmt); + setAmount (m_ListAmt, m_DiscountAmt); + msg += " -> " + m_LineNetAmt; + log.fine(msg); + } // setLineNetAmtDifference + + /************************************************************************** + * Set Accounting Date + * @param dateAcct acct date + */ + public void setDateAcct (Timestamp dateAcct) + { + m_DateAcct = dateAcct; + } // setDateAcct + + /** + * Get Accounting Date + * @return accounting date + */ + public Timestamp getDateAcct () + { + if (m_DateAcct != null) + return m_DateAcct; + int index = p_po.get_ColumnIndex("DateAcct"); + if (index != -1) + { + m_DateAcct = (Timestamp)p_po.get_Value(index); + if (m_DateAcct != null) + return m_DateAcct; + } + m_DateAcct = m_doc.getDateAcct(); + return m_DateAcct; + } // getDateAcct + + /** + * Set Document Date + * @param dateDoc doc date + */ + public void setDateDoc (Timestamp dateDoc) + { + m_DateDoc = dateDoc; + } // setDateDoc + + /** + * Get Document Date + * @return document date + */ + public Timestamp getDateDoc () + { + if (m_DateDoc != null) + return m_DateDoc; + int index = p_po.get_ColumnIndex("DateDoc"); + if (index != -1) + { + m_DateDoc = (Timestamp)p_po.get_Value(index); + if (m_DateDoc != null) + return m_DateDoc; + } + m_DateDoc = m_doc.getDateDoc(); + return m_DateDoc; + } // getDateDoc + + + /************************************************************************** + * Set GL Journal Account + * @param acct account + */ + public void setAccount (MAccount acct) + { + m_account = acct; + } // setAccount + + /** + * Get GL Journal Account + * @return account + */ + public MAccount getAccount() + { + return m_account; + } // getAccount + + /** + * Line Account from Product (or Charge). + * + * @param AcctType see ProductCost.ACCTTYPE_* (0..3) + * @param as Accounting schema + * @return Requested Product Account + */ + public MAccount getAccount (int AcctType, MAcctSchema as) + { + // Charge Account + if (getM_Product_ID() == 0 && getC_Charge_ID() != 0) + { + BigDecimal amt = new BigDecimal (-1); // Revenue (-) + if (!m_doc.isSOTrx()) + amt = new BigDecimal (+1); // Expense (+) + MAccount acct = getChargeAccount(as, amt); + if (acct != null) + return acct; + } + // Product Account + return getProductCost().getAccount (AcctType, as); + } // getAccount + + /** + * Get Charge + * @return C_Charge_ID + */ + protected int getC_Charge_ID() + { + int index = p_po.get_ColumnIndex("C_Charge_ID"); + if (index != -1) + { + Integer ii = (Integer)p_po.get_Value(index); + if (ii != null) + return ii.intValue(); + } + return 0; + } // getC_Charge_ID + + /** + * Get Charge Account + * @param as account schema + * @param amount amount for expense(+)/revenue(-) + * @return Charge Account or null + */ + public MAccount getChargeAccount (MAcctSchema as, BigDecimal amount) + { + int C_Charge_ID = getC_Charge_ID(); + if (C_Charge_ID == 0) + return null; + return MCharge.getAccount(C_Charge_ID, as, amount); + } // getChargeAccount + + /** + * Get Period + * @return C_Period_ID + */ + protected int getC_Period_ID() + { + if (m_C_Period_ID == -1) + { + int index = p_po.get_ColumnIndex("C_Period_ID"); + if (index != -1) + { + Integer ii = (Integer)p_po.get_Value(index); + if (ii != null) + m_C_Period_ID = ii.intValue(); + } + if (m_C_Period_ID == -1) + m_C_Period_ID = 0; + } + return m_C_Period_ID; + } // getC_Period_ID + + /** + * Set C_Period_ID + * @param C_Period_ID id + */ + protected void setC_Period_ID (int C_Period_ID) + { + m_C_Period_ID = C_Period_ID; + } // setC_Period_ID + + /************************************************************************** + * Get (Journal) AcctSchema + * @return C_AcctSchema_ID + */ + public int getC_AcctSchema_ID() + { + return m_C_AcctSchema_ID; + } // getC_AcctSchema_ID + + /** + * Get Line ID + * @return id + */ + public int get_ID() + { + return p_po.get_ID(); + } // get_ID + + /** + * Get AD_Org_ID + * @return org + */ + public int getAD_Org_ID() + { + return p_po.getAD_Org_ID(); + } // getAD_Org_ID + + /** + * Get Order AD_Org_ID + * @return order org if defined + */ + public int getOrder_Org_ID() + { + int C_OrderLine_ID = getC_OrderLine_ID(); + if (C_OrderLine_ID != 0) + { + String sql = "SELECT AD_Org_ID FROM C_OrderLine WHERE C_OrderLine_ID=?"; + int AD_Org_ID = DB.getSQLValue(null, sql, C_OrderLine_ID); + if (AD_Org_ID > 0) + return AD_Org_ID; + } + return getAD_Org_ID(); + } // getOrder_Org_ID + + /** + * Product + * @return M_Product_ID + */ + public int getM_Product_ID() + { + int index = p_po.get_ColumnIndex("M_Product_ID"); + if (index != -1) + { + Integer ii = (Integer)p_po.get_Value(index); + if (ii != null) + return ii.intValue(); + } + return 0; + } // getM_Product_ID + + /** + * Is this an Item Product (vs. not a Service, a charge) + * @return true if product + */ + public boolean isItem() + { + if (m_isItem != null) + return m_isItem.booleanValue(); + + m_isItem = Boolean.FALSE; + if (getM_Product_ID() != 0) + { + MProduct product = MProduct.get(Env.getCtx(), getM_Product_ID()); + if (product.get_ID() == getM_Product_ID() && product.isItem()) + m_isItem = Boolean.TRUE; + } + return m_isItem.booleanValue(); + } // isItem + + /** + * ASI + * @return M_AttributeSetInstance_ID + */ + public int getM_AttributeSetInstance_ID() + { + int index = p_po.get_ColumnIndex("M_AttributeSetInstance_ID"); + if (index != -1) + { + Integer ii = (Integer)p_po.get_Value(index); + if (ii != null) + return ii.intValue(); + } + return 0; + } // getM_AttributeSetInstance_ID + + /** + * Get Warehouse Locator (from) + * @return M_Locator_ID + */ + public int getM_Locator_ID() + { + int index = p_po.get_ColumnIndex("M_Locator_ID"); + if (index != -1) + { + Integer ii = (Integer)p_po.get_Value(index); + if (ii != null) + return ii.intValue(); + } + return 0; + } // getM_Locator_ID + + /** + * Get Warehouse Locator To + * @return M_Locator_ID + */ + public int getM_LocatorTo_ID() + { + int index = p_po.get_ColumnIndex("M_LocatorTo_ID"); + if (index != -1) + { + Integer ii = (Integer)p_po.get_Value(index); + if (ii != null) + return ii.intValue(); + } + return 0; + } // getM_LocatorTo_ID + + /** + * Set Production BOM flag + * @param productionBOM flag + */ + public void setProductionBOM(boolean productionBOM) + { + m_productionBOM = productionBOM; + } // setProductionBOM + + /** + * Is this the BOM to be produced + * @return true if BOM + */ + public boolean isProductionBOM() + { + return m_productionBOM; + } // isProductionBOM + + /** + * Get Production Plan + * @return M_ProductionPlan_ID + */ + public int getM_ProductionPlan_ID() + { + int index = p_po.get_ColumnIndex("M_ProductionPlan_ID"); + if (index != -1) + { + Integer ii = (Integer)p_po.get_Value(index); + if (ii != null) + return ii.intValue(); + } + return 0; + } // getM_ProductionPlan_ID + + /** + * Get Order Line Reference + * @return C_OrderLine_ID + */ + public int getC_OrderLine_ID() + { + int index = p_po.get_ColumnIndex("C_OrderLine_ID"); + if (index != -1) + { + Integer ii = (Integer)p_po.get_Value(index); + if (ii != null) + return ii.intValue(); + } + return 0; + } // getC_OrderLine_ID + + /** + * Get C_LocFrom_ID + * @return loc from + */ + public int getC_LocFrom_ID() + { + return m_C_LocFrom_ID; + } // getC_LocFrom_ID + + /** + * Set C_LocFrom_ID + * @param C_LocFrom_ID loc from + */ + public void setC_LocFrom_ID(int C_LocFrom_ID) + { + m_C_LocFrom_ID = C_LocFrom_ID; + } // setC_LocFrom_ID + + /** + * Get PP_Cost_Collector_ID + * @return Cost Collector ID + */ + public int getPP_Cost_Collector_ID() + { + return m_PP_Cost_Collector_ID; + } // getC_LocFrom_ID + + /** + * Get PP_Cost_Collector_ID + * @return Cost Collector ID + */ + public int setPP_Cost_Collector_ID(int PP_Cost_Collector_ID) + { + return m_PP_Cost_Collector_ID; + } // getC_LocFrom_ID + + /** + * Get C_LocTo_ID + * @return loc to + */ + public int getC_LocTo_ID() + { + return m_C_LocTo_ID; + } // getC_LocTo_ID + + /** + * Set C_LocTo_ID + * @param C_LocTo_ID loc to + */ + public void setC_LocTo_ID(int C_LocTo_ID) + { + m_C_LocTo_ID = C_LocTo_ID; + } // setC_LocTo_ID + + /** + * Get Product Cost Info + * @return product cost + */ + public ProductCost getProductCost() + { + if (m_productCost == null) + m_productCost = new ProductCost (Env.getCtx(), + getM_Product_ID(), getM_AttributeSetInstance_ID(), p_po.get_TrxName()); + return m_productCost; + } // getProductCost + + // MZ Goodwill + /** + * Get Total Product Costs from Cost Detail or from Current Cost + * @param as accounting schema + * @param AD_Org_ID trx org + * @param zeroCostsOK zero/no costs are OK + * @param whereClause null are OK + * @return costs + */ + public BigDecimal getProductCosts (MAcctSchema as, int AD_Org_ID, boolean zeroCostsOK, String whereClause) + { if (whereClause != null) - { - MCostDetail cd = MCostDetail.get (Env.getCtx(), whereClause, - get_ID(), getM_AttributeSetInstance_ID(), as.getC_AcctSchema_ID(), p_po.get_TrxName()); - if (cd != null) - return cd.getAmt(); - } - return getProductCosts(as, AD_Org_ID, zeroCostsOK); - } // getProductCosts - // end MZ - - /** - * Get Total Product Costs - * @param as accounting schema - * @param AD_Org_ID trx org - * @param zeroCostsOK zero/no costs are OK - * @return costs - */ - public BigDecimal getProductCosts (MAcctSchema as, int AD_Org_ID, boolean zeroCostsOK) - { - ProductCost pc = getProductCost(); - int C_OrderLine_ID = getC_OrderLine_ID(); - String costingMethod = null; - BigDecimal costs = pc.getProductCosts(as, AD_Org_ID, costingMethod, - C_OrderLine_ID, zeroCostsOK); - if (costs != null) - return costs; - return Env.ZERO; - } // getProductCosts - - /** - * Get Product - * @return product or null if no product - */ - public MProduct getProduct() - { - if (m_productCost == null) - m_productCost = new ProductCost (Env.getCtx(), - getM_Product_ID(), getM_AttributeSetInstance_ID(), p_po.get_TrxName()); - if (m_productCost != null) - return m_productCost.getProduct(); - return null; - } // getProduct - - /** - * Get Revenue Recognition - * @return C_RevenueRecognition_ID or 0 - */ - public int getC_RevenueRecognition_ID() - { - MProduct product = getProduct(); - if (product != null) - return product.getC_RevenueRecognition_ID(); - return 0; - } // getC_RevenueRecognition_ID - - /** - * Quantity UOM - * @return Transaction or Storage M_UOM_ID - */ - public int getC_UOM_ID() - { - // Trx UOM - int index = p_po.get_ColumnIndex("C_UOM_ID"); - if (index != -1) - { - Integer ii = (Integer)p_po.get_Value(index); - if (ii != null) - return ii.intValue(); - } - // Storage UOM - MProduct product = getProduct(); - if (product != null) - return product.getC_UOM_ID(); - // - return 0; - } // getC_UOM - - /** - * Quantity - * @param qty transaction Qty - * @param isSOTrx SL order trx (i.e. negative qty) - */ - public void setQty (BigDecimal qty, boolean isSOTrx) - { - if (qty == null) - m_qty = Env.ZERO; - else if (isSOTrx) - m_qty = qty.negate(); - else - m_qty = qty; - getProductCost().setQty (qty); - } // setQty - - /** - * Quantity - * @return transaction Qty - */ - public BigDecimal getQty() - { - return m_qty; - } // getQty - - - - /** - * Description - * @return doc line description - */ - public String getDescription() - { - int index = p_po.get_ColumnIndex("Description"); - if (index != -1) - return (String)p_po.get_Value(index); - return null; - } // getDescription - - /** - * Line Tax - * @return C_Tax_ID - */ - public int getC_Tax_ID() - { - int index = p_po.get_ColumnIndex("C_Tax_ID"); - if (index != -1) - { - Integer ii = (Integer)p_po.get_Value(index); - if (ii != null) - return ii.intValue(); - } - return 0; - } // getC_Tax_ID - - /** - * Get Line Number - * @return line no - */ - public int getLine() - { - int index = p_po.get_ColumnIndex("Line"); - if (index != -1) - { - Integer ii = (Integer)p_po.get_Value(index); - if (ii != null) - return ii.intValue(); - } - return 0; - } // getLine - - /** - * Get BPartner - * @return C_BPartner_ID - */ - public int getC_BPartner_ID() - { - if (m_C_BPartner_ID == -1) - { - int index = p_po.get_ColumnIndex("C_BPartner_ID"); - if (index != -1) - { - Integer ii = (Integer)p_po.get_Value(index); - if (ii != null) - m_C_BPartner_ID = ii.intValue(); - } - if (m_C_BPartner_ID <= 0) - m_C_BPartner_ID = m_doc.getC_BPartner_ID(); - } - return m_C_BPartner_ID; - } // getC_BPartner_ID - - /** - * Set C_BPartner_ID - * @param C_BPartner_ID id - */ - protected void setC_BPartner_ID (int C_BPartner_ID) - { - m_C_BPartner_ID = C_BPartner_ID; - } // setC_BPartner_ID - - - /** - * Get C_BPartner_Location_ID - * @return BPartner Location - */ - public int getC_BPartner_Location_ID() - { - int index = p_po.get_ColumnIndex("C_BPartner_Location_ID"); - if (index != -1) - { - Integer ii = (Integer)p_po.get_Value(index); - if (ii != null) - return ii.intValue(); - } - return m_doc.getC_BPartner_Location_ID(); - } // getC_BPartner_Location_ID - - /** - * Get TrxOrg - * @return AD_OrgTrx_ID - */ - public int getAD_OrgTrx_ID() - { - int index = p_po.get_ColumnIndex("AD_OrgTrx_ID"); - if (index != -1) - { - Integer ii = (Integer)p_po.get_Value(index); - if (ii != null) - return ii.intValue(); - } - return 0; - } // getAD_OrgTrx_ID - - /** - * Get SalesRegion. - * - get Sales Region from BPartner - * @return C_SalesRegion_ID - */ - public int getC_SalesRegion_ID() - { - if (m_C_SalesRegion_ID == -1) // never tried - { - if (getC_BPartner_Location_ID() != 0) - // && m_acctSchema.isAcctSchemaElement(MAcctSchemaElement.ELEMENTTYPE_SalesRegion)) - { - String sql = "SELECT COALESCE(C_SalesRegion_ID,0) FROM C_BPartner_Location WHERE C_BPartner_Location_ID=?"; - m_C_SalesRegion_ID = DB.getSQLValue (null, - sql, getC_BPartner_Location_ID()); - log.fine("C_SalesRegion_ID=" + m_C_SalesRegion_ID + " (from BPL)" ); - if (m_C_SalesRegion_ID == 0) - m_C_SalesRegion_ID = -2; // don't try again - } - else - m_C_SalesRegion_ID = -2; // don't try again - } - if (m_C_SalesRegion_ID < 0) // invalid - return 0; - return m_C_SalesRegion_ID; - } // getC_SalesRegion_ID - - /** - * Get Project - * @return C_Project_ID - */ - public int getC_Project_ID() - { - int index = p_po.get_ColumnIndex("C_Project_ID"); - if (index != -1) - { - Integer ii = (Integer)p_po.get_Value(index); - if (ii != null) - return ii.intValue(); - } - return 0; - } // getC_Project_ID - - /** - * Get Campaign - * @return C_Campaign_ID - */ - public int getC_Campaign_ID() - { - int index = p_po.get_ColumnIndex("C_Campaign_ID"); - if (index != -1) - { - Integer ii = (Integer)p_po.get_Value(index); - if (ii != null) - return ii.intValue(); - } - return 0; - } // getC_Campaign_ID - - /** - * Get Activity - * @return C_Activity_ID - */ - public int getC_Activity_ID() - { - int index = p_po.get_ColumnIndex("C_Activity_ID"); - if (index != -1) - { - Integer ii = (Integer)p_po.get_Value(index); - if (ii != null) - return ii.intValue(); - } - return 0; - } // getC_Activity_ID - - /** - * Get User 1 - * @return user defined 1 - */ - public int getUser1_ID() - { - int index = p_po.get_ColumnIndex("User1_ID"); - if (index != -1) - { - Integer ii = (Integer)p_po.get_Value(index); - if (ii != null) - return ii.intValue(); - } - return 0; - } // getUser1_ID - - /** - * Get User 2 - * @return user defined 2 - */ - public int getUser2_ID() - { - int index = p_po.get_ColumnIndex("User2_ID"); - if (index != -1) - { - Integer ii = (Integer)p_po.get_Value(index); - if (ii != null) - return ii.intValue(); - } - return 0; - } // getUser2_ID - - /** - * Get User Defined Column - * @param ColumnName column name - * @return user defined column value - */ - public int getValue(String ColumnName) - { - int index = p_po.get_ColumnIndex(ColumnName); - if (index != -1) - { - Integer ii = (Integer)p_po.get_Value(index); - if (ii != null) - return ii.intValue(); - } - return 0; - } // getValue - - //AZ Goodwill - private int m_ReversalLine_ID = 0; - /** - * Set ReversalLine_ID - * store original (voided/reversed) document line - * @param ReversalLine_ID - */ - public void setReversalLine_ID (int ReversalLine_ID) - { - m_ReversalLine_ID = ReversalLine_ID; - } // setReversalLine_ID - - /** - * Get ReversalLine_ID - * get original (voided/reversed) document line - * @return ReversalLine_ID - */ - public int getReversalLine_ID() - { - return m_ReversalLine_ID; - } // getReversalLine_ID - //end AZ Goodwill - - /** - * String representation - * @return String - */ - public String toString() - { - StringBuffer sb = new StringBuffer("DocLine=["); - sb.append(p_po.get_ID()); - if (getDescription() != null) - sb.append(",").append(getDescription()); - if (getM_Product_ID() != 0) - sb.append(",M_Product_ID=").append(getM_Product_ID()); - sb.append(",Qty=").append(m_qty) - .append(",Amt=").append(getAmtSource()) - .append("]"); - return sb.toString(); - } // toString - -} // DocumentLine + { + MCostDetail cd = MCostDetail.get (Env.getCtx(), whereClause, + get_ID(), getM_AttributeSetInstance_ID(), as.getC_AcctSchema_ID(), p_po.get_TrxName()); + if (cd != null) + return cd.getAmt(); + } + return getProductCosts(as, AD_Org_ID, zeroCostsOK); + } // getProductCosts + // end MZ + + /** + * Get Total Product Costs + * @param as accounting schema + * @param AD_Org_ID trx org + * @param zeroCostsOK zero/no costs are OK + * @return costs + */ + public BigDecimal getProductCosts (MAcctSchema as, int AD_Org_ID, boolean zeroCostsOK) + { + ProductCost pc = getProductCost(); + int C_OrderLine_ID = getC_OrderLine_ID(); + String costingMethod = null; + BigDecimal costs = pc.getProductCosts(as, AD_Org_ID, costingMethod, + C_OrderLine_ID, zeroCostsOK); + if (costs != null) + return costs; + return Env.ZERO; + } // getProductCosts + + /** + * Get Product + * @return product or null if no product + */ + public MProduct getProduct() + { + if (m_productCost == null) + m_productCost = new ProductCost (Env.getCtx(), + getM_Product_ID(), getM_AttributeSetInstance_ID(), p_po.get_TrxName()); + if (m_productCost != null) + return m_productCost.getProduct(); + return null; + } // getProduct + + /** + * Get Revenue Recognition + * @return C_RevenueRecognition_ID or 0 + */ + public int getC_RevenueRecognition_ID() + { + MProduct product = getProduct(); + if (product != null) + return product.getC_RevenueRecognition_ID(); + return 0; + } // getC_RevenueRecognition_ID + + /** + * Quantity UOM + * @return Transaction or Storage M_UOM_ID + */ + public int getC_UOM_ID() + { + // Trx UOM + int index = p_po.get_ColumnIndex("C_UOM_ID"); + if (index != -1) + { + Integer ii = (Integer)p_po.get_Value(index); + if (ii != null) + return ii.intValue(); + } + // Storage UOM + MProduct product = getProduct(); + if (product != null) + return product.getC_UOM_ID(); + // + return 0; + } // getC_UOM + + /** + * Quantity + * @param qty transaction Qty + * @param isSOTrx SL order trx (i.e. negative qty) + */ + public void setQty (BigDecimal qty, boolean isSOTrx) + { + if (qty == null) + m_qty = Env.ZERO; + else if (isSOTrx) + m_qty = qty.negate(); + else + m_qty = qty; + getProductCost().setQty (qty); + } // setQty + + /** + * Quantity + * @return transaction Qty + */ + public BigDecimal getQty() + { + return m_qty; + } // getQty + + + + /** + * Description + * @return doc line description + */ + public String getDescription() + { + int index = p_po.get_ColumnIndex("Description"); + if (index != -1) + return (String)p_po.get_Value(index); + return null; + } // getDescription + + /** + * Line Tax + * @return C_Tax_ID + */ + public int getC_Tax_ID() + { + int index = p_po.get_ColumnIndex("C_Tax_ID"); + if (index != -1) + { + Integer ii = (Integer)p_po.get_Value(index); + if (ii != null) + return ii.intValue(); + } + return 0; + } // getC_Tax_ID + + /** + * Get Line Number + * @return line no + */ + public int getLine() + { + int index = p_po.get_ColumnIndex("Line"); + if (index != -1) + { + Integer ii = (Integer)p_po.get_Value(index); + if (ii != null) + return ii.intValue(); + } + return 0; + } // getLine + + /** + * Get BPartner + * @return C_BPartner_ID + */ + public int getC_BPartner_ID() + { + if (m_C_BPartner_ID == -1) + { + int index = p_po.get_ColumnIndex("C_BPartner_ID"); + if (index != -1) + { + Integer ii = (Integer)p_po.get_Value(index); + if (ii != null) + m_C_BPartner_ID = ii.intValue(); + } + if (m_C_BPartner_ID <= 0) + m_C_BPartner_ID = m_doc.getC_BPartner_ID(); + } + return m_C_BPartner_ID; + } // getC_BPartner_ID + + /** + * Set C_BPartner_ID + * @param C_BPartner_ID id + */ + protected void setC_BPartner_ID (int C_BPartner_ID) + { + m_C_BPartner_ID = C_BPartner_ID; + } // setC_BPartner_ID + + + /** + * Get C_BPartner_Location_ID + * @return BPartner Location + */ + public int getC_BPartner_Location_ID() + { + int index = p_po.get_ColumnIndex("C_BPartner_Location_ID"); + if (index != -1) + { + Integer ii = (Integer)p_po.get_Value(index); + if (ii != null) + return ii.intValue(); + } + return m_doc.getC_BPartner_Location_ID(); + } // getC_BPartner_Location_ID + + /** + * Get TrxOrg + * @return AD_OrgTrx_ID + */ + public int getAD_OrgTrx_ID() + { + int index = p_po.get_ColumnIndex("AD_OrgTrx_ID"); + if (index != -1) + { + Integer ii = (Integer)p_po.get_Value(index); + if (ii != null) + return ii.intValue(); + } + return 0; + } // getAD_OrgTrx_ID + + /** + * Get SalesRegion. + * - get Sales Region from BPartner + * @return C_SalesRegion_ID + */ + public int getC_SalesRegion_ID() + { + if (m_C_SalesRegion_ID == -1) // never tried + { + if (getC_BPartner_Location_ID() != 0) + // && m_acctSchema.isAcctSchemaElement(MAcctSchemaElement.ELEMENTTYPE_SalesRegion)) + { + String sql = "SELECT COALESCE(C_SalesRegion_ID,0) FROM C_BPartner_Location WHERE C_BPartner_Location_ID=?"; + m_C_SalesRegion_ID = DB.getSQLValue (null, + sql, getC_BPartner_Location_ID()); + log.fine("C_SalesRegion_ID=" + m_C_SalesRegion_ID + " (from BPL)" ); + if (m_C_SalesRegion_ID == 0) + m_C_SalesRegion_ID = -2; // don't try again + } + else + m_C_SalesRegion_ID = -2; // don't try again + } + if (m_C_SalesRegion_ID < 0) // invalid + return 0; + return m_C_SalesRegion_ID; + } // getC_SalesRegion_ID + + /** + * Get Project + * @return C_Project_ID + */ + public int getC_Project_ID() + { + int index = p_po.get_ColumnIndex("C_Project_ID"); + if (index != -1) + { + Integer ii = (Integer)p_po.get_Value(index); + if (ii != null) + return ii.intValue(); + } + return 0; + } // getC_Project_ID + + /** + * Get Project Phase + * @return C_ProjectPhase_ID + */ + public int getC_ProjectPhase_ID() + { + int index = p_po.get_ColumnIndex("C_ProjectPhase_ID"); + if (index != -1) + { + Integer ii = (Integer)p_po.get_Value(index); + if (ii != null) + return ii.intValue(); + } + return 0; + } // getC_ProjectPhase_ID + + /** + * Get Project Task + * @return C_ProjectTask_ID + */ + public int getC_ProjectTask_ID() + { + int index = p_po.get_ColumnIndex("C_ProjectTask_ID"); + if (index != -1) + { + Integer ii = (Integer)p_po.get_Value(index); + if (ii != null) + return ii.intValue(); + } + return 0; + } // getC_ProjectTask_ID + + /** + * Get Campaign + * @return C_Campaign_ID + */ + public int getC_Campaign_ID() + { + int index = p_po.get_ColumnIndex("C_Campaign_ID"); + if (index != -1) + { + Integer ii = (Integer)p_po.get_Value(index); + if (ii != null) + return ii.intValue(); + } + return 0; + } // getC_Campaign_ID + + /** + * Get Activity + * @return C_Activity_ID + */ + public int getC_Activity_ID() + { + int index = p_po.get_ColumnIndex("C_Activity_ID"); + if (index != -1) + { + Integer ii = (Integer)p_po.get_Value(index); + if (ii != null) + return ii.intValue(); + } + return 0; + } // getC_Activity_ID + + /** + * Get User 1 + * @return user defined 1 + */ + public int getUser1_ID() + { + int index = p_po.get_ColumnIndex("User1_ID"); + if (index != -1) + { + Integer ii = (Integer)p_po.get_Value(index); + if (ii != null) + return ii.intValue(); + } + return 0; + } // getUser1_ID + + /** + * Get User 2 + * @return user defined 2 + */ + public int getUser2_ID() + { + int index = p_po.get_ColumnIndex("User2_ID"); + if (index != -1) + { + Integer ii = (Integer)p_po.get_Value(index); + if (ii != null) + return ii.intValue(); + } + return 0; + } // getUser2_ID + + /** + * Get User Defined Column + * @param ColumnName column name + * @return user defined column value + */ + public int getValue(String ColumnName) + { + int index = p_po.get_ColumnIndex(ColumnName); + if (index != -1) + { + Integer ii = (Integer)p_po.get_Value(index); + if (ii != null) + return ii.intValue(); + } + return 0; + } // getValue + + //AZ Goodwill + private int m_ReversalLine_ID = 0; + /** + * Set ReversalLine_ID + * store original (voided/reversed) document line + * @param ReversalLine_ID + */ + public void setReversalLine_ID (int ReversalLine_ID) + { + m_ReversalLine_ID = ReversalLine_ID; + } // setReversalLine_ID + + /** + * Get ReversalLine_ID + * get original (voided/reversed) document line + * @return ReversalLine_ID + */ + public int getReversalLine_ID() + { + return m_ReversalLine_ID; + } // getReversalLine_ID + //end AZ Goodwill + + /** + * String representation + * @return String + */ + public String toString() + { + StringBuffer sb = new StringBuffer("DocLine=["); + sb.append(p_po.get_ID()); + if (getDescription() != null) + sb.append(",").append(getDescription()); + if (getM_Product_ID() != 0) + sb.append(",M_Product_ID=").append(getM_Product_ID()); + sb.append(",Qty=").append(m_qty) + .append(",Amt=").append(getAmtSource()) + .append("]"); + return sb.toString(); + } // toString + +} // DocumentLine diff --git a/base/src/org/compiere/acct/Doc_MatchInv.java b/base/src/org/compiere/acct/Doc_MatchInv.java index 887496688d..70330d0c2b 100644 --- a/base/src/org/compiere/acct/Doc_MatchInv.java +++ b/base/src/org/compiere/acct/Doc_MatchInv.java @@ -216,6 +216,8 @@ public class Doc_MatchInv extends Doc pv.setC_Activity_ID(m_invoiceLine.getC_Activity_ID()); pv.setC_Campaign_ID(m_invoiceLine.getC_Campaign_ID()); pv.setC_Project_ID(m_invoiceLine.getC_Project_ID()); + pv.setC_ProjectPhase_ID(m_invoiceLine.getC_ProjectPhase_ID()); + pv.setC_ProjectTask_ID(m_invoiceLine.getC_ProjectTask_ID()); pv.setC_UOM_ID(m_invoiceLine.getC_UOM_ID()); pv.setUser1_ID(m_invoiceLine.getUser1_ID()); pv.setUser2_ID(m_invoiceLine.getUser2_ID()); @@ -251,6 +253,8 @@ public class Doc_MatchInv extends Doc cr.setC_Activity_ID(m_invoiceLine.getC_Activity_ID()); cr.setC_Campaign_ID(m_invoiceLine.getC_Campaign_ID()); cr.setC_Project_ID(m_invoiceLine.getC_Project_ID()); + cr.setC_ProjectPhase_ID(m_invoiceLine.getC_ProjectPhase_ID()); + cr.setC_ProjectTask_ID(m_invoiceLine.getC_ProjectTask_ID()); cr.setC_UOM_ID(m_invoiceLine.getC_UOM_ID()); cr.setUser1_ID(m_invoiceLine.getUser1_ID()); cr.setUser2_ID(m_invoiceLine.getUser2_ID()); @@ -293,6 +297,8 @@ public class Doc_MatchInv extends Doc pv.setC_Activity_ID(m_invoiceLine.getC_Activity_ID()); pv.setC_Campaign_ID(m_invoiceLine.getC_Campaign_ID()); pv.setC_Project_ID(m_invoiceLine.getC_Project_ID()); + pv.setC_ProjectPhase_ID(m_invoiceLine.getC_ProjectPhase_ID()); + pv.setC_ProjectTask_ID(m_invoiceLine.getC_ProjectTask_ID()); pv.setC_UOM_ID(m_invoiceLine.getC_UOM_ID()); pv.setUser1_ID(m_invoiceLine.getUser1_ID()); pv.setUser2_ID(m_invoiceLine.getUser2_ID()); diff --git a/base/src/org/compiere/acct/Doc_MatchPO.java b/base/src/org/compiere/acct/Doc_MatchPO.java index e43ea4ba3a..2889f8d8aa 100644 --- a/base/src/org/compiere/acct/Doc_MatchPO.java +++ b/base/src/org/compiere/acct/Doc_MatchPO.java @@ -204,6 +204,8 @@ public class Doc_MatchPO extends Doc cr.setC_Activity_ID(m_oLine.getC_Activity_ID()); cr.setC_Campaign_ID(m_oLine.getC_Campaign_ID()); cr.setC_Project_ID(m_oLine.getC_Project_ID()); + cr.setC_ProjectPhase_ID(m_oLine.getC_ProjectPhase_ID()); + cr.setC_ProjectTask_ID(m_oLine.getC_ProjectTask_ID()); cr.setC_UOM_ID(m_oLine.getC_UOM_ID()); cr.setUser1_ID(m_oLine.getUser1_ID()); cr.setUser2_ID(m_oLine.getUser2_ID()); @@ -220,6 +222,8 @@ public class Doc_MatchPO extends Doc dr.setC_Activity_ID(m_oLine.getC_Activity_ID()); dr.setC_Campaign_ID(m_oLine.getC_Campaign_ID()); dr.setC_Project_ID(m_oLine.getC_Project_ID()); + dr.setC_ProjectPhase_ID(m_oLine.getC_ProjectPhase_ID()); + dr.setC_ProjectTask_ID(m_oLine.getC_ProjectTask_ID()); dr.setC_UOM_ID(m_oLine.getC_UOM_ID()); dr.setUser1_ID(m_oLine.getUser1_ID()); dr.setUser2_ID(m_oLine.getUser2_ID()); diff --git a/base/src/org/compiere/acct/FactLine.java b/base/src/org/compiere/acct/FactLine.java index d612e596c6..0141d7827b 100644 --- a/base/src/org/compiere/acct/FactLine.java +++ b/base/src/org/compiere/acct/FactLine.java @@ -394,6 +394,14 @@ public final class FactLine extends X_Fact_Acct setC_Project_ID (m_docLine.getC_Project_ID()); if (getC_Project_ID() == 0) setC_Project_ID (m_doc.getC_Project_ID()); + if (m_docLine != null) + setC_ProjectPhase_ID(m_docLine.getC_ProjectPhase_ID()); + if (getC_ProjectPhase_ID() == 0) + setC_ProjectPhase_ID (m_doc.getC_ProjectPhase_ID()); + if (m_docLine != null) + setC_ProjectTask_ID(m_docLine.getC_ProjectTask_ID()); + if (getC_ProjectTask_ID() == 0) + setC_ProjectTask_ID (m_doc.getC_ProjectTask_ID()); // Campaign if (m_docLine != null) setC_Campaign_ID (m_docLine.getC_Campaign_ID()); @@ -1092,6 +1100,8 @@ public final class FactLine extends X_Fact_Acct // Dimensions setAD_OrgTrx_ID(fact.getAD_OrgTrx_ID()); setC_Project_ID (fact.getC_Project_ID()); + setC_ProjectPhase_ID(fact.getC_ProjectPhase_ID()); + setC_ProjectTask_ID(fact.getC_ProjectTask_ID()); setC_Activity_ID(fact.getC_Activity_ID()); setC_Campaign_ID(fact.getC_Campaign_ID()); setC_SalesRegion_ID(fact.getC_SalesRegion_ID()); diff --git a/base/src/org/compiere/model/AdempiereProcessor2.java b/base/src/org/compiere/model/AdempiereProcessor2.java new file mode 100644 index 0000000000..3b3d17dbf6 --- /dev/null +++ b/base/src/org/compiere/model/AdempiereProcessor2.java @@ -0,0 +1,28 @@ +/****************************************************************************** + * Copyright (C) 2010 Low Heng Sin * + * Copyright (C) 2010 Idalica Corporation * + * This program is free software; you can redistribute it and/or modify it * + * under the terms version 2 of the GNU General Public License as published * + * by the Free Software Foundation. This program is distributed in the hope * + * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * + * See the GNU General Public License for more details. * + * You should have received a copy of the GNU General Public License along * + * with this program; if not, write to the Free Software Foundation, Inc., * + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * + *****************************************************************************/ +package org.compiere.model; + +/** + * + * @author hengsin + * + */ +public interface AdempiereProcessor2 { + /** + * @return true if previous DateNextRun should be use as base to calculate the new + * DateNextRun value. False to follow the legacy behaviour where current + * server time is use as the base to the new DateNextRun value. + */ + public boolean isIgnoreProcessingTime(); +} diff --git a/base/src/org/compiere/model/CalloutOrder.java b/base/src/org/compiere/model/CalloutOrder.java index 907bf371d2..65316d7ef0 100644 --- a/base/src/org/compiere/model/CalloutOrder.java +++ b/base/src/org/compiere/model/CalloutOrder.java @@ -633,12 +633,16 @@ public class CalloutOrder extends CalloutEngine + "WHERE pl.C_Currency_ID=c.C_Currency_ID" + " AND pl.M_PriceList_ID=plv.M_PriceList_ID" + " AND pl.M_PriceList_ID=? " // 1 + + " AND plv.ValidFrom <= ? " + "ORDER BY plv.ValidFrom DESC"; // Use newest price list - may not be future try { pstmt = DB.prepareStatement(sql, null); pstmt.setInt(1, M_PriceList_ID.intValue()); + Timestamp date = Env.getContextAsDate(ctx, WindowNo, "DateOrdered"); + pstmt.setTimestamp(2, date); + rs = pstmt.executeQuery(); if (rs.next()) { @@ -706,10 +710,25 @@ public class CalloutOrder extends CalloutEngine // int M_PriceList_ID = Env.getContextAsInt(ctx, WindowNo, "M_PriceList_ID"); pp.setM_PriceList_ID(M_PriceList_ID); + Timestamp orderDate = (Timestamp)mTab.getValue("DateOrdered"); /** PLV is only accurate if PL selected in header */ int M_PriceList_Version_ID = Env.getContextAsInt(ctx, WindowNo, "M_PriceList_Version_ID"); + if ( M_PriceList_Version_ID == 0 && M_PriceList_ID > 0) + { + PreparedStatement pstmt = null; + ResultSet rs = null; + String sql = "SELECT plv.M_PriceList_Version_ID " + + "FROM M_PriceList_Version plv " + + "WHERE plv.M_PriceList_ID=? " // 1 + + " AND plv.ValidFrom <= ? " + + "ORDER BY plv.ValidFrom DESC"; + // Use newest price list - may not be future + + M_PriceList_Version_ID = DB.getSQLValueEx(null, sql, M_PriceList_ID, orderDate); + if ( M_PriceList_Version_ID > 0 ) + Env.setContext(ctx, WindowNo, "M_PriceList_Version_ID", M_PriceList_Version_ID ); + } pp.setM_PriceList_Version_ID(M_PriceList_Version_ID); - Timestamp orderDate = (Timestamp)mTab.getValue("DateOrdered"); pp.setPriceDate(orderDate); // mTab.setValue("PriceList", pp.getPriceList()); diff --git a/base/src/org/compiere/model/GridField.java b/base/src/org/compiere/model/GridField.java index 270df78ee4..aafe5c8c24 100644 --- a/base/src/org/compiere/model/GridField.java +++ b/base/src/org/compiere/model/GridField.java @@ -323,21 +323,16 @@ public class GridField return false; // Numeric Keys and Created/Updated as well as - // DocumentNo/Value/ASI are not mandatory (persistence layer manages them) - if (m_vo.ColumnName.equals("DocumentNo") && m_vo.AD_Column_ID == 53251){ - // TODO - Find why Report Parameter marked as Mandatory is not displayed as Mandatory? - // Find better solution? - // https://sourceforge.net/tracker/?func=detail&aid=2902292&group_id=176962&atid=879334 - // https://sourceforge.net/tracker/?func=detail&aid=2897730&group_id=176962&atid=879332 - return true; - } else if ((m_vo.IsKey && m_vo.ColumnName.endsWith("_ID")) + // DocumentNo/Value/ASI ars not mandatory (persistency layer manages them) + if (m_gridTab != null && // if gridtab doesn't exist then it's not a window field (probably a process parameter field) + ( (m_vo.IsKey && m_vo.ColumnName.endsWith("_ID")) || m_vo.ColumnName.startsWith("Created") || m_vo.ColumnName.startsWith("Updated") || m_vo.ColumnName.equals("Value") || m_vo.ColumnName.equals("DocumentNo") - || m_vo.ColumnName.equals("M_AttributeSetInstance_ID")) // 0 is valid - { + || m_vo.ColumnName.equals("M_AttributeSetInstance_ID") // 0 is valid + ) + ) return false; - } // Mandatory if displayed return isDisplayed (checkContext); @@ -1286,6 +1281,19 @@ public class GridField m_inserting = inserting; m_error = false; // reset error + updateContext(); + + // Does not fire, if same value + Object oldValue = m_oldValue; + if (inserting) + oldValue = INSERTING; + m_propertyChangeListeners.firePropertyChange(PROPERTY, oldValue, m_value); + } // setValue + + /** + * Update env. context with current value + */ + public void updateContext() { // Set Context if (m_vo.displayType == DisplayType.Text || m_vo.displayType == DisplayType.Memo @@ -1294,15 +1302,15 @@ public class GridField || m_vo.displayType == DisplayType.RowID || isEncrypted()) ; // ignore - else if (newValue instanceof Boolean) + else if (m_value instanceof Boolean) { backupValue(); // teo_sarca [ 1699826 ] Env.setContext(m_vo.ctx, m_vo.WindowNo, m_vo.ColumnName, - ((Boolean)newValue).booleanValue()); + ((Boolean)m_value).booleanValue()); Env.setContext(m_vo.ctx, m_vo.WindowNo, m_vo.TabNo, m_vo.ColumnName, m_value==null ? null : (((Boolean)m_value) ? "Y" : "N")); } - else if (newValue instanceof Timestamp) + else if (m_value instanceof Timestamp) { backupValue(); // teo_sarca [ 1699826 ] Env.setContext(m_vo.ctx, m_vo.WindowNo, m_vo.ColumnName, (Timestamp)m_value); @@ -1316,14 +1324,8 @@ public class GridField m_value==null ? null : m_value.toString()); Env.setContext(m_vo.ctx, m_vo.WindowNo, m_vo.TabNo, m_vo.ColumnName, m_value==null ? null : m_value.toString()); - } - - // Does not fire, if same value - Object oldValue = m_oldValue; - if (inserting) - oldValue = INSERTING; - m_propertyChangeListeners.firePropertyChange(PROPERTY, oldValue, m_value); - } // setValue + } + } /** * Set Value and Validate diff --git a/base/src/org/compiere/model/GridTable.java b/base/src/org/compiere/model/GridTable.java index 03ae676554..b1c39f9a68 100644 --- a/base/src/org/compiere/model/GridTable.java +++ b/base/src/org/compiere/model/GridTable.java @@ -48,6 +48,7 @@ import org.compiere.util.Env; import org.compiere.util.Ini; import org.compiere.util.MSort; import org.compiere.util.SecureEngine; +import org.compiere.util.Trx; import org.compiere.util.ValueNamePair; /** @@ -3201,6 +3202,7 @@ private Object[] getDataAtRow(int row) private PreparedStatement m_pstmt = null; private ResultSet m_rs = null; + private Trx trx = null; /** * Open ResultSet @@ -3213,7 +3215,7 @@ private Object[] getDataAtRow(int row) // Get Number of Rows int rows = 0; PreparedStatement pstmt = null; - ResultSet rs = null; + ResultSet rs = null; try { pstmt = DB.prepareStatement(m_SQL_Count, null); @@ -3233,24 +3235,29 @@ private Object[] getDataAtRow(int row) } finally { - DB.close(rs, pstmt); + DB.close(rs, pstmt); } StringBuffer info = new StringBuffer("Rows="); info.append(rows); if (rows == 0) info.append(" - ").append(m_SQL_Count); - + + //postgresql need trx to use cursor based resultset + String trxName = m_virtual ? Trx.createTrxName("Loader") : null; + trx = trxName != null ? Trx.get(trxName, true) : null; // open Statement (closed by Loader.close) try { - m_pstmt = DB.prepareStatement(m_SQL, null); + m_pstmt = DB.prepareStatement(m_SQL, trxName); if (maxRows > 0 && rows > maxRows) { m_pstmt.setMaxRows(maxRows); info.append(" - MaxRows=").append(maxRows); rows = maxRows; } - // m_pstmt.setFetchSize(20); + //ensure not all row is fectch into memory for virtual table + if (m_virtual) + m_pstmt.setFetchSize(100); setParameter (m_pstmt, false); m_rs = m_pstmt.executeQuery(); } @@ -3272,6 +3279,8 @@ private Object[] getDataAtRow(int row) DB.close(m_rs, m_pstmt); m_rs = null; m_pstmt = null; + if (trx != null) + trx.close(); } // close /** @@ -3335,7 +3344,10 @@ private Object[] getDataAtRow(int row) { log.log(Level.SEVERE, "run", e); } - close(); + finally + { + close(); + } fireDataStatusIEvent("", ""); } // run diff --git a/base/src/org/compiere/model/I_AD_Scheduler.java b/base/src/org/compiere/model/I_AD_Scheduler.java index d7e50513d4..d5dc593a02 100644 --- a/base/src/org/compiere/model/I_AD_Scheduler.java +++ b/base/src/org/compiere/model/I_AD_Scheduler.java @@ -106,6 +106,19 @@ public interface I_AD_Scheduler */ public int getCreatedBy(); + /** Column name CronPattern */ + public static final String COLUMNNAME_CronPattern = "CronPattern"; + + /** Set Cron Scheduling Pattern. + * Cron pattern to define when the process should be invoked. + */ + public void setCronPattern (String CronPattern); + + /** Get Cron Scheduling Pattern. + * Cron pattern to define when the process should be invoked. + */ + public String getCronPattern(); + /** Column name DateLastRun */ public static final String COLUMNNAME_DateLastRun = "DateLastRun"; @@ -184,6 +197,19 @@ public interface I_AD_Scheduler */ public boolean isActive(); + /** Column name IsIgnoreProcessingTime */ + public static final String COLUMNNAME_IsIgnoreProcessingTime = "IsIgnoreProcessingTime"; + + /** Set Ignore Processing Time. + * Do not include processing time for the DateNextRun calculation + */ + public void setIsIgnoreProcessingTime (boolean IsIgnoreProcessingTime); + + /** Get Ignore Processing Time. + * Do not include processing time for the DateNextRun calculation + */ + public boolean isIgnoreProcessingTime(); + /** Column name KeepLogDays */ public static final String COLUMNNAME_KeepLogDays = "KeepLogDays"; diff --git a/base/src/org/compiere/model/I_C_AcctSchema_Default.java b/base/src/org/compiere/model/I_C_AcctSchema_Default.java index dee577bb19..72e5bb3c6e 100644 --- a/base/src/org/compiere/model/I_C_AcctSchema_Default.java +++ b/base/src/org/compiere/model/I_C_AcctSchema_Default.java @@ -526,6 +526,21 @@ public interface I_C_AcctSchema_Default public I_C_ValidCombination getP_Asset_A() throws RuntimeException; + /** Column name P_AverageCostVariance_Acct */ + public static final String COLUMNNAME_P_AverageCostVariance_Acct = "P_AverageCostVariance_Acct"; + + /** Set Average Cost Variance. + * Average Cost Variance + */ + public void setP_AverageCostVariance_Acct (int P_AverageCostVariance_Acct); + + /** Get Average Cost Variance. + * Average Cost Variance + */ + public int getP_AverageCostVariance_Acct(); + + public I_C_ValidCombination getP_AverageCostVariance_A() throws RuntimeException; + /** Column name PayDiscount_Exp_Acct */ public static final String COLUMNNAME_PayDiscount_Exp_Acct = "PayDiscount_Exp_Acct"; @@ -1095,12 +1110,12 @@ public interface I_C_AcctSchema_Default public static final String COLUMNNAME_V_Liability_Services_Acct = "V_Liability_Services_Acct"; /** Set Vendor Service Liability. - * Account for Vender Service Liability + * Account for Vendor Service Liability */ public void setV_Liability_Services_Acct (int V_Liability_Services_Acct); /** Get Vendor Service Liability. - * Account for Vender Service Liability + * Account for Vendor Service Liability */ public int getV_Liability_Services_Acct(); diff --git a/base/src/org/compiere/model/I_C_AllocationHdr.java b/base/src/org/compiere/model/I_C_AllocationHdr.java index fee54caa6b..290df5c5d7 100644 --- a/base/src/org/compiere/model/I_C_AllocationHdr.java +++ b/base/src/org/compiere/model/I_C_AllocationHdr.java @@ -262,6 +262,19 @@ public interface I_C_AllocationHdr */ public boolean isProcessed(); + /** Column name ProcessedOn */ + public static final String COLUMNNAME_ProcessedOn = "ProcessedOn"; + + /** Set Processed On. + * The date+time (expressed in decimal format) when the document has been processed + */ + public void setProcessedOn (BigDecimal ProcessedOn); + + /** Get Processed On. + * The date+time (expressed in decimal format) when the document has been processed + */ + public BigDecimal getProcessedOn(); + /** Column name Processing */ public static final String COLUMNNAME_Processing = "Processing"; diff --git a/base/src/org/compiere/model/I_C_BankStatement.java b/base/src/org/compiere/model/I_C_BankStatement.java index 0ff80d43f6..771a78a3e8 100644 --- a/base/src/org/compiere/model/I_C_BankStatement.java +++ b/base/src/org/compiere/model/I_C_BankStatement.java @@ -297,6 +297,19 @@ public interface I_C_BankStatement */ public boolean isProcessed(); + /** Column name ProcessedOn */ + public static final String COLUMNNAME_ProcessedOn = "ProcessedOn"; + + /** Set Processed On. + * The date+time (expressed in decimal format) when the document has been processed + */ + public void setProcessedOn (BigDecimal ProcessedOn); + + /** Get Processed On. + * The date+time (expressed in decimal format) when the document has been processed + */ + public BigDecimal getProcessedOn(); + /** Column name Processing */ public static final String COLUMNNAME_Processing = "Processing"; diff --git a/base/src/org/compiere/model/I_C_Cash.java b/base/src/org/compiere/model/I_C_Cash.java index 2b4eac0245..e19fecefb5 100644 --- a/base/src/org/compiere/model/I_C_Cash.java +++ b/base/src/org/compiere/model/I_C_Cash.java @@ -307,6 +307,19 @@ public interface I_C_Cash */ public boolean isProcessed(); + /** Column name ProcessedOn */ + public static final String COLUMNNAME_ProcessedOn = "ProcessedOn"; + + /** Set Processed On. + * The date+time (expressed in decimal format) when the document has been processed + */ + public void setProcessedOn (BigDecimal ProcessedOn); + + /** Get Processed On. + * The date+time (expressed in decimal format) when the document has been processed + */ + public BigDecimal getProcessedOn(); + /** Column name Processing */ public static final String COLUMNNAME_Processing = "Processing"; diff --git a/base/src/org/compiere/model/I_C_Invoice.java b/base/src/org/compiere/model/I_C_Invoice.java index d592e78f7a..f791f47442 100644 --- a/base/src/org/compiere/model/I_C_Invoice.java +++ b/base/src/org/compiere/model/I_C_Invoice.java @@ -486,10 +486,10 @@ public interface I_C_Invoice /** Column name DunningGrace */ public static final String COLUMNNAME_DunningGrace = "DunningGrace"; - /** Set Dunning Grace */ + /** Set Dunning Grace Date */ public void setDunningGrace (Timestamp DunningGrace); - /** Get Dunning Grace */ + /** Get Dunning Grace Date */ public Timestamp getDunningGrace(); /** Column name GenerateTo */ @@ -756,6 +756,19 @@ public interface I_C_Invoice */ public boolean isProcessed(); + /** Column name ProcessedOn */ + public static final String COLUMNNAME_ProcessedOn = "ProcessedOn"; + + /** Set Processed On. + * The date+time (expressed in decimal format) when the document has been processed + */ + public void setProcessedOn (BigDecimal ProcessedOn); + + /** Get Processed On. + * The date+time (expressed in decimal format) when the document has been processed + */ + public BigDecimal getProcessedOn(); + /** Column name Processing */ public static final String COLUMNNAME_Processing = "Processing"; diff --git a/base/src/org/compiere/model/I_C_Order.java b/base/src/org/compiere/model/I_C_Order.java index 3763aeaebb..943dba684f 100644 --- a/base/src/org/compiere/model/I_C_Order.java +++ b/base/src/org/compiere/model/I_C_Order.java @@ -895,10 +895,14 @@ public interface I_C_Order /** Column name OrderType */ public static final String COLUMNNAME_OrderType = "OrderType"; - /** Set OrderType */ + /** Set Order Type. + * Type of Order: MRP records grouped by source (Sales Order, Purchase Order, Distribution Order, Requisition) + */ public void setOrderType (String OrderType); - /** Get OrderType */ + /** Get Order Type. + * Type of Order: MRP records grouped by source (Sales Order, Purchase Order, Distribution Order, Requisition) + */ public String getOrderType(); /** Column name Pay_BPartner_ID */ @@ -992,6 +996,19 @@ public interface I_C_Order */ public boolean isProcessed(); + /** Column name ProcessedOn */ + public static final String COLUMNNAME_ProcessedOn = "ProcessedOn"; + + /** Set Processed On. + * The date+time (expressed in decimal format) when the document has been processed + */ + public void setProcessedOn (BigDecimal ProcessedOn); + + /** Get Processed On. + * The date+time (expressed in decimal format) when the document has been processed + */ + public BigDecimal getProcessedOn(); + /** Column name Processing */ public static final String COLUMNNAME_Processing = "Processing"; diff --git a/base/src/org/compiere/model/I_C_Payment.java b/base/src/org/compiere/model/I_C_Payment.java index 89c65c952b..8b87d6269f 100644 --- a/base/src/org/compiere/model/I_C_Payment.java +++ b/base/src/org/compiere/model/I_C_Payment.java @@ -860,6 +860,19 @@ public interface I_C_Payment */ public boolean isProcessed(); + /** Column name ProcessedOn */ + public static final String COLUMNNAME_ProcessedOn = "ProcessedOn"; + + /** Set Processed On. + * The date+time (expressed in decimal format) when the document has been processed + */ + public void setProcessedOn (BigDecimal ProcessedOn); + + /** Get Processed On. + * The date+time (expressed in decimal format) when the document has been processed + */ + public BigDecimal getProcessedOn(); + /** Column name Processing */ public static final String COLUMNNAME_Processing = "Processing"; diff --git a/base/src/org/compiere/model/I_C_ProjectIssue.java b/base/src/org/compiere/model/I_C_ProjectIssue.java index 861bc8e12c..ed222d0b54 100644 --- a/base/src/org/compiere/model/I_C_ProjectIssue.java +++ b/base/src/org/compiere/model/I_C_ProjectIssue.java @@ -257,6 +257,19 @@ public interface I_C_ProjectIssue */ public boolean isProcessed(); + /** Column name ProcessedOn */ + public static final String COLUMNNAME_ProcessedOn = "ProcessedOn"; + + /** Set Processed On. + * The date+time (expressed in decimal format) when the document has been processed + */ + public void setProcessedOn (BigDecimal ProcessedOn); + + /** Get Processed On. + * The date+time (expressed in decimal format) when the document has been processed + */ + public BigDecimal getProcessedOn(); + /** Column name Processing */ public static final String COLUMNNAME_Processing = "Processing"; diff --git a/base/src/org/compiere/model/I_GL_Journal.java b/base/src/org/compiere/model/I_GL_Journal.java index b9c26397ed..9c9f3934a9 100644 --- a/base/src/org/compiere/model/I_GL_Journal.java +++ b/base/src/org/compiere/model/I_GL_Journal.java @@ -393,6 +393,19 @@ public interface I_GL_Journal */ public boolean isProcessed(); + /** Column name ProcessedOn */ + public static final String COLUMNNAME_ProcessedOn = "ProcessedOn"; + + /** Set Processed On. + * The date+time (expressed in decimal format) when the document has been processed + */ + public void setProcessedOn (BigDecimal ProcessedOn); + + /** Get Processed On. + * The date+time (expressed in decimal format) when the document has been processed + */ + public BigDecimal getProcessedOn(); + /** Column name Processing */ public static final String COLUMNNAME_Processing = "Processing"; diff --git a/base/src/org/compiere/model/I_I_ReportLine.java b/base/src/org/compiere/model/I_I_ReportLine.java index 43c245562a..6038ee6b8e 100644 --- a/base/src/org/compiere/model/I_I_ReportLine.java +++ b/base/src/org/compiere/model/I_I_ReportLine.java @@ -62,19 +62,6 @@ public interface I_I_ReportLine */ public int getAD_Org_ID(); - /** Column name AmountType */ - public static final String COLUMNNAME_AmountType = "AmountType"; - - /** Set Amount Type. - * Type of amount to report - */ - public void setAmountType (String AmountType); - - /** Get Amount Type. - * Type of amount to report - */ - public String getAmountType(); - /** Column name CalculationType */ public static final String COLUMNNAME_CalculationType = "CalculationType"; @@ -241,6 +228,32 @@ public interface I_I_ReportLine */ public String getName(); + /** Column name PAAmountType */ + public static final String COLUMNNAME_PAAmountType = "PAAmountType"; + + /** Set Amount Type. + * PA Amount Type for reporting + */ + public void setPAAmountType (String PAAmountType); + + /** Get Amount Type. + * PA Amount Type for reporting + */ + public String getPAAmountType(); + + /** Column name PAPeriodType */ + public static final String COLUMNNAME_PAPeriodType = "PAPeriodType"; + + /** Set Period Type. + * PA Period Type + */ + public void setPAPeriodType (String PAPeriodType); + + /** Get Period Type. + * PA Period Type + */ + public String getPAPeriodType(); + /** Column name PA_ReportLine_ID */ public static final String COLUMNNAME_PA_ReportLine_ID = "PA_ReportLine_ID"; diff --git a/base/src/org/compiere/model/I_M_InOut.java b/base/src/org/compiere/model/I_M_InOut.java index 4c741ee398..402bfa69b8 100644 --- a/base/src/org/compiere/model/I_M_InOut.java +++ b/base/src/org/compiere/model/I_M_InOut.java @@ -752,6 +752,19 @@ public interface I_M_InOut */ public boolean isProcessed(); + /** Column name ProcessedOn */ + public static final String COLUMNNAME_ProcessedOn = "ProcessedOn"; + + /** Set Processed On. + * The date+time (expressed in decimal format) when the document has been processed + */ + public void setProcessedOn (BigDecimal ProcessedOn); + + /** Get Processed On. + * The date+time (expressed in decimal format) when the document has been processed + */ + public BigDecimal getProcessedOn(); + /** Column name Processing */ public static final String COLUMNNAME_Processing = "Processing"; diff --git a/base/src/org/compiere/model/I_M_Inventory.java b/base/src/org/compiere/model/I_M_Inventory.java index 38c0e90475..0115d55353 100644 --- a/base/src/org/compiere/model/I_M_Inventory.java +++ b/base/src/org/compiere/model/I_M_Inventory.java @@ -337,6 +337,19 @@ public interface I_M_Inventory */ public boolean isProcessed(); + /** Column name ProcessedOn */ + public static final String COLUMNNAME_ProcessedOn = "ProcessedOn"; + + /** Set Processed On. + * The date+time (expressed in decimal format) when the document has been processed + */ + public void setProcessedOn (BigDecimal ProcessedOn); + + /** Get Processed On. + * The date+time (expressed in decimal format) when the document has been processed + */ + public BigDecimal getProcessedOn(); + /** Column name Processing */ public static final String COLUMNNAME_Processing = "Processing"; diff --git a/base/src/org/compiere/model/I_M_MatchInv.java b/base/src/org/compiere/model/I_M_MatchInv.java index 9916069090..796520d8f0 100644 --- a/base/src/org/compiere/model/I_M_MatchInv.java +++ b/base/src/org/compiere/model/I_M_MatchInv.java @@ -242,6 +242,19 @@ public interface I_M_MatchInv */ public boolean isProcessed(); + /** Column name ProcessedOn */ + public static final String COLUMNNAME_ProcessedOn = "ProcessedOn"; + + /** Set Processed On. + * The date+time (expressed in decimal format) when the document has been processed + */ + public void setProcessedOn (BigDecimal ProcessedOn); + + /** Get Processed On. + * The date+time (expressed in decimal format) when the document has been processed + */ + public BigDecimal getProcessedOn(); + /** Column name Processing */ public static final String COLUMNNAME_Processing = "Processing"; diff --git a/base/src/org/compiere/model/I_M_MatchPO.java b/base/src/org/compiere/model/I_M_MatchPO.java index 9bf2d99498..285b4b0481 100644 --- a/base/src/org/compiere/model/I_M_MatchPO.java +++ b/base/src/org/compiere/model/I_M_MatchPO.java @@ -283,6 +283,19 @@ public interface I_M_MatchPO */ public boolean isProcessed(); + /** Column name ProcessedOn */ + public static final String COLUMNNAME_ProcessedOn = "ProcessedOn"; + + /** Set Processed On. + * The date+time (expressed in decimal format) when the document has been processed + */ + public void setProcessedOn (BigDecimal ProcessedOn); + + /** Get Processed On. + * The date+time (expressed in decimal format) when the document has been processed + */ + public BigDecimal getProcessedOn(); + /** Column name Processing */ public static final String COLUMNNAME_Processing = "Processing"; diff --git a/base/src/org/compiere/model/I_M_Movement.java b/base/src/org/compiere/model/I_M_Movement.java index 491bd83936..6a797062b2 100644 --- a/base/src/org/compiere/model/I_M_Movement.java +++ b/base/src/org/compiere/model/I_M_Movement.java @@ -510,6 +510,19 @@ public interface I_M_Movement */ public boolean isProcessed(); + /** Column name ProcessedOn */ + public static final String COLUMNNAME_ProcessedOn = "ProcessedOn"; + + /** Set Processed On. + * The date+time (expressed in decimal format) when the document has been processed + */ + public void setProcessedOn (BigDecimal ProcessedOn); + + /** Get Processed On. + * The date+time (expressed in decimal format) when the document has been processed + */ + public BigDecimal getProcessedOn(); + /** Column name Processing */ public static final String COLUMNNAME_Processing = "Processing"; diff --git a/base/src/org/compiere/model/I_M_Product_Acct.java b/base/src/org/compiere/model/I_M_Product_Acct.java index b75c98a543..490729962e 100644 --- a/base/src/org/compiere/model/I_M_Product_Acct.java +++ b/base/src/org/compiere/model/I_M_Product_Acct.java @@ -136,6 +136,21 @@ public interface I_M_Product_Acct public I_C_ValidCombination getP_Asset_A() throws RuntimeException; + /** Column name P_AverageCostVariance_Acct */ + public static final String COLUMNNAME_P_AverageCostVariance_Acct = "P_AverageCostVariance_Acct"; + + /** Set Average Cost Variance. + * Average Cost Variance + */ + public void setP_AverageCostVariance_Acct (int P_AverageCostVariance_Acct); + + /** Get Average Cost Variance. + * Average Cost Variance + */ + public int getP_AverageCostVariance_Acct(); + + public I_C_ValidCombination getP_AverageCostVariance_A() throws RuntimeException; + /** Column name P_Burden_Acct */ public static final String COLUMNNAME_P_Burden_Acct = "P_Burden_Acct"; diff --git a/base/src/org/compiere/model/I_M_Product_Category_Acct.java b/base/src/org/compiere/model/I_M_Product_Category_Acct.java index 6aab360f9c..fe3fa0ad26 100644 --- a/base/src/org/compiere/model/I_M_Product_Category_Acct.java +++ b/base/src/org/compiere/model/I_M_Product_Category_Acct.java @@ -162,6 +162,21 @@ public interface I_M_Product_Category_Acct public I_C_ValidCombination getP_Asset_A() throws RuntimeException; + /** Column name P_AverageCostVariance_Acct */ + public static final String COLUMNNAME_P_AverageCostVariance_Acct = "P_AverageCostVariance_Acct"; + + /** Set Average Cost Variance. + * Average Cost Variance + */ + public void setP_AverageCostVariance_Acct (int P_AverageCostVariance_Acct); + + /** Get Average Cost Variance. + * Average Cost Variance + */ + public int getP_AverageCostVariance_Acct(); + + public I_C_ValidCombination getP_AverageCostVariance_A() throws RuntimeException; + /** Column name P_Burden_Acct */ public static final String COLUMNNAME_P_Burden_Acct = "P_Burden_Acct"; diff --git a/base/src/org/compiere/model/I_M_Production.java b/base/src/org/compiere/model/I_M_Production.java index 10e46a012f..0a91c7ec58 100644 --- a/base/src/org/compiere/model/I_M_Production.java +++ b/base/src/org/compiere/model/I_M_Production.java @@ -236,6 +236,19 @@ public interface I_M_Production */ public boolean isProcessed(); + /** Column name ProcessedOn */ + public static final String COLUMNNAME_ProcessedOn = "ProcessedOn"; + + /** Set Processed On. + * The date+time (expressed in decimal format) when the document has been processed + */ + public void setProcessedOn (BigDecimal ProcessedOn); + + /** Get Processed On. + * The date+time (expressed in decimal format) when the document has been processed + */ + public BigDecimal getProcessedOn(); + /** Column name Processing */ public static final String COLUMNNAME_Processing = "Processing"; diff --git a/base/src/org/compiere/model/I_M_Requisition.java b/base/src/org/compiere/model/I_M_Requisition.java index df92db26eb..69603394f2 100644 --- a/base/src/org/compiere/model/I_M_Requisition.java +++ b/base/src/org/compiere/model/I_M_Requisition.java @@ -307,6 +307,19 @@ public interface I_M_Requisition */ public boolean isProcessed(); + /** Column name ProcessedOn */ + public static final String COLUMNNAME_ProcessedOn = "ProcessedOn"; + + /** Set Processed On. + * The date+time (expressed in decimal format) when the document has been processed + */ + public void setProcessedOn (BigDecimal ProcessedOn); + + /** Get Processed On. + * The date+time (expressed in decimal format) when the document has been processed + */ + public BigDecimal getProcessedOn(); + /** Column name Processing */ public static final String COLUMNNAME_Processing = "Processing"; diff --git a/base/src/org/compiere/model/I_PA_ReportColumn.java b/base/src/org/compiere/model/I_PA_ReportColumn.java index 0fac3f3459..15530e0dc1 100644 --- a/base/src/org/compiere/model/I_PA_ReportColumn.java +++ b/base/src/org/compiere/model/I_PA_ReportColumn.java @@ -75,19 +75,6 @@ public interface I_PA_ReportColumn */ public int getAD_OrgTrx_ID(); - /** Column name AmountType */ - public static final String COLUMNNAME_AmountType = "AmountType"; - - /** Set Amount Type. - * Type of amount to report - */ - public void setAmountType (String AmountType); - - /** Get Amount Type. - * Type of amount to report - */ - public String getAmountType(); - /** Column name C_Activity_ID */ public static final String COLUMNNAME_C_Activity_ID = "C_Activity_ID"; @@ -584,6 +571,32 @@ public interface I_PA_ReportColumn */ public int getOrg_ID(); + /** Column name PAAmountType */ + public static final String COLUMNNAME_PAAmountType = "PAAmountType"; + + /** Set Amount Type. + * PA Amount Type for reporting + */ + public void setPAAmountType (String PAAmountType); + + /** Get Amount Type. + * PA Amount Type for reporting + */ + public String getPAAmountType(); + + /** Column name PAPeriodType */ + public static final String COLUMNNAME_PAPeriodType = "PAPeriodType"; + + /** Set Period Type. + * PA Period Type + */ + public void setPAPeriodType (String PAPeriodType); + + /** Get Period Type. + * PA Period Type + */ + public String getPAPeriodType(); + /** Column name PA_ReportColumn_ID */ public static final String COLUMNNAME_PA_ReportColumn_ID = "PA_ReportColumn_ID"; diff --git a/base/src/org/compiere/model/I_PA_ReportLine.java b/base/src/org/compiere/model/I_PA_ReportLine.java index c7a6d01f76..3303b26f87 100644 --- a/base/src/org/compiere/model/I_PA_ReportLine.java +++ b/base/src/org/compiere/model/I_PA_ReportLine.java @@ -62,19 +62,6 @@ public interface I_PA_ReportLine */ public int getAD_Org_ID(); - /** Column name AmountType */ - public static final String COLUMNNAME_AmountType = "AmountType"; - - /** Set Amount Type. - * Type of amount to report - */ - public void setAmountType (String AmountType); - - /** Get Amount Type. - * Type of amount to report - */ - public String getAmountType(); - /** Column name CalculationType */ public static final String COLUMNNAME_CalculationType = "CalculationType"; @@ -206,6 +193,32 @@ public interface I_PA_ReportLine public I_PA_ReportLine getOper_2() throws RuntimeException; + /** Column name PAAmountType */ + public static final String COLUMNNAME_PAAmountType = "PAAmountType"; + + /** Set Amount Type. + * PA Amount Type for reporting + */ + public void setPAAmountType (String PAAmountType); + + /** Get Amount Type. + * PA Amount Type for reporting + */ + public String getPAAmountType(); + + /** Column name PAPeriodType */ + public static final String COLUMNNAME_PAPeriodType = "PAPeriodType"; + + /** Set Period Type. + * PA Period Type + */ + public void setPAPeriodType (String PAPeriodType); + + /** Get Period Type. + * PA Period Type + */ + public String getPAPeriodType(); + /** Column name PA_ReportLine_ID */ public static final String COLUMNNAME_PA_ReportLine_ID = "PA_ReportLine_ID"; diff --git a/base/src/org/compiere/model/MAccount.java b/base/src/org/compiere/model/MAccount.java index 9cf01e404d..173adc77ec 100644 --- a/base/src/org/compiere/model/MAccount.java +++ b/base/src/org/compiere/model/MAccount.java @@ -41,9 +41,7 @@ public class MAccount extends X_C_ValidCombination /** * */ - private static final long serialVersionUID = -8887316767838767993L; - - + private static final long serialVersionUID = -1936396369349550834L; /** * Get existing Account or create it @@ -242,9 +240,9 @@ public class MAccount extends X_C_ValidCombination */ public static MAccount get (Properties ctx, int C_AcctSchema_ID, String alias) { - String whereClause = "C_AcctSchema_ID=? AND Alias=?"; - MAccount retValue = new Query(ctx,MAccount.Table_Name,whereClause.toString(),null) - .setParameters(new Object[]{C_AcctSchema_ID,alias}) + final String whereClause = "C_AcctSchema_ID=? AND Alias=?"; + MAccount retValue = new Query(ctx,I_C_ValidCombination.Table_Name,whereClause,null) + .setParameters(C_AcctSchema_ID,alias) .firstOnly(); return retValue; } // get @@ -358,7 +356,7 @@ public class MAccount extends X_C_ValidCombination * @param where where clause * @param trxName transaction */ - public static void updateValueDescription (Properties ctx, String where, String trxName) + public static void updateValueDescription (Properties ctx, final String where, String trxName) { List accounts= new Query(ctx,MAccount.Table_Name,where,trxName) .setOrderBy(MAccount.COLUMNNAME_C_ValidCombination_ID).list(); diff --git a/base/src/org/compiere/model/MAccountLookup.java b/base/src/org/compiere/model/MAccountLookup.java index b364e29145..af7169b88e 100644 --- a/base/src/org/compiere/model/MAccountLookup.java +++ b/base/src/org/compiere/model/MAccountLookup.java @@ -138,9 +138,9 @@ public final class MAccountLookup extends Lookup implements Serializable if (ID == C_ValidCombination_ID) // already loaded return true; - String whereClause = "C_ValidCombination_ID=?"; - MAccount account = new Query(Env.getCtx(),MAccount.Table_Name,whereClause,null) - .setParameters(new Object[]{ID}) + final String whereClause = "C_ValidCombination_ID=?"; + MAccount account = new Query(Env.getCtx(),I_C_ValidCombination.Table_Name,whereClause,null) + .setParameters(ID) .firstOnly(); if(account == null) @@ -178,12 +178,12 @@ public final class MAccountLookup extends Lookup implements Serializable list.add(new KeyNamePair (-1, "")); // ArrayList params = new ArrayList(); - String whereClause = "AD_Client_ID=?"; + final String whereClause = "AD_Client_ID=?"; params.add(Env.getAD_Client_ID(m_ctx)); - List accounts = new Query(Env.getCtx(),MAccount.Table_Name,whereClause,null) + List accounts = new Query(Env.getCtx(),I_C_ValidCombination.Table_Name,whereClause,null) .setParameters(params) - .setOrderBy(MAccount.COLUMNNAME_Combination) + .setOrderBy(I_C_ValidCombination.COLUMNNAME_Combination) .setOnlyActiveRecords(onlyActive) .list(); diff --git a/base/src/org/compiere/model/MAcctProcessor.java b/base/src/org/compiere/model/MAcctProcessor.java index c09ab4fb59..d57a359468 100644 --- a/base/src/org/compiere/model/MAcctProcessor.java +++ b/base/src/org/compiere/model/MAcctProcessor.java @@ -49,7 +49,7 @@ public class MAcctProcessor extends X_C_AcctProcessor */ public static MAcctProcessor[] getActive (Properties ctx) { - List list = new Query(ctx, MAcctProcessor.Table_Name, null, null) + List list = new Query(ctx, I_C_AcctProcessor.Table_Name, null, null) .setOnlyActiveRecords(true) .list(); return list.toArray(new MAcctProcessor[list.size()]); @@ -129,8 +129,8 @@ public class MAcctProcessor extends X_C_AcctProcessor public AdempiereProcessorLog[] getLogs () { String whereClause = "C_AcctProcessor_ID=? "; - List list = new Query(getCtx(), MAcctProcessorLog.Table_Name,whereClause,get_TrxName()) - .setParameters(new Object[]{getC_AcctProcessor_ID()}) + List list = new Query(getCtx(), I_C_AcctProcessorLog.Table_Name,whereClause,get_TrxName()) + .setParameters(getC_AcctProcessor_ID()) .setOrderBy("Created DESC") .list(); return list.toArray(new MAcctProcessorLog[list.size()]); diff --git a/base/src/org/compiere/model/MAcctSchema.java b/base/src/org/compiere/model/MAcctSchema.java index f75cdc4838..3d0ee9b452 100644 --- a/base/src/org/compiere/model/MAcctSchema.java +++ b/base/src/org/compiere/model/MAcctSchema.java @@ -115,7 +115,7 @@ public class MAcctSchema extends X_C_AcctSchema params.add(AD_Client_ID); } - List ass = new Query(ctx, MAcctSchema.Table_Name,whereClause,trxName) + List ass = new Query(ctx, I_C_AcctSchema.Table_Name,whereClause,trxName) .setParameters(params) .setOrderBy(MAcctSchema.COLUMNNAME_C_AcctSchema_ID) .list(); diff --git a/base/src/org/compiere/model/MAcctSchemaDefault.java b/base/src/org/compiere/model/MAcctSchemaDefault.java index f8f9afbc02..c5aec04768 100644 --- a/base/src/org/compiere/model/MAcctSchemaDefault.java +++ b/base/src/org/compiere/model/MAcctSchemaDefault.java @@ -33,10 +33,12 @@ import org.compiere.util.KeyNamePair; */ public class MAcctSchemaDefault extends X_C_AcctSchema_Default { - /** - * - */ - private static final long serialVersionUID = 199959007595802866L; + + + /** + * + */ + private static final long serialVersionUID = 199959007595802866L; /** * Get Accounting Schema Default Info @@ -46,9 +48,9 @@ public class MAcctSchemaDefault extends X_C_AcctSchema_Default */ public static MAcctSchemaDefault get (Properties ctx, int C_AcctSchema_ID) { - String whereClause = "C_AcctSchema_ID=?"; - return new Query(ctx,MAcctSchemaDefault.Table_Name,whereClause,null) - .setParameters(new Object[]{C_AcctSchema_ID}) + final String whereClause = "C_AcctSchema_ID=?"; + return new Query(ctx,I_C_AcctSchema_Default.Table_Name,whereClause,null) + .setParameters(C_AcctSchema_ID) .firstOnly(); } // get diff --git a/base/src/org/compiere/model/MAcctSchemaElement.java b/base/src/org/compiere/model/MAcctSchemaElement.java index c76e33c671..b99c422dbf 100644 --- a/base/src/org/compiere/model/MAcctSchemaElement.java +++ b/base/src/org/compiere/model/MAcctSchemaElement.java @@ -40,10 +40,12 @@ import org.compiere.util.Msg; */ public final class MAcctSchemaElement extends X_C_AcctSchema_Element { - /** - * - */ - private static final long serialVersionUID = 4215184252533527719L; + + + /** + * + */ + private static final long serialVersionUID = 4215184252533527719L; /** @@ -61,9 +63,10 @@ public final class MAcctSchemaElement extends X_C_AcctSchema_Element s_log.fine("C_AcctSchema_ID=" + as.getC_AcctSchema_ID()); ArrayList list = new ArrayList(); - String whereClause = "C_AcctSchema_ID=? AND IsActive=?"; - List elements= new Query(as.getCtx(), MAcctSchemaElement.Table_Name,whereClause,as.get_TrxName()) - .setParameters(new Object[]{as.getC_AcctSchema_ID(),"Y"}).setOrderBy("SeqNo") + final String whereClause = "C_AcctSchema_ID=? AND IsActive=?"; + List elements= new Query(as.getCtx(), I_C_AcctSchema_Element.Table_Name,whereClause,as.get_TrxName()) + .setParameters(as.getC_AcctSchema_ID(),"Y") + .setOrderBy("SeqNo") .list(); for(MAcctSchemaElement ase : elements) diff --git a/base/src/org/compiere/model/MAcctSchemaGL.java b/base/src/org/compiere/model/MAcctSchemaGL.java index 28ebeed12f..a2453a688f 100644 --- a/base/src/org/compiere/model/MAcctSchemaGL.java +++ b/base/src/org/compiere/model/MAcctSchemaGL.java @@ -35,10 +35,12 @@ import org.compiere.util.KeyNamePair; */ public class MAcctSchemaGL extends X_C_AcctSchema_GL { - /** - * - */ - private static final long serialVersionUID = 5303102649110271896L; + + + /** + * + */ + private static final long serialVersionUID = 5303102649110271896L; /** @@ -49,9 +51,9 @@ public class MAcctSchemaGL extends X_C_AcctSchema_GL */ public static MAcctSchemaGL get (Properties ctx, int C_AcctSchema_ID) { - String whereClause = "C_AcctSchema_ID=?"; - return new Query(ctx,MAcctSchemaGL.Table_Name,whereClause,null) - .setParameters(new Object[]{C_AcctSchema_ID}) + final String whereClause = "C_AcctSchema_ID=?"; + return new Query(ctx,I_C_AcctSchema_GL.Table_Name,whereClause,null) + .setParameters(C_AcctSchema_ID) .firstOnly(); } // get diff --git a/base/src/org/compiere/model/MAchievement.java b/base/src/org/compiere/model/MAchievement.java index f48b1e9663..8c2a90d2da 100644 --- a/base/src/org/compiere/model/MAchievement.java +++ b/base/src/org/compiere/model/MAchievement.java @@ -33,9 +33,7 @@ import org.compiere.util.Env; */ public class MAchievement extends X_PA_Achievement { - /** - * - */ + private static final long serialVersionUID = -1438593600498523664L; /** @@ -56,9 +54,11 @@ public class MAchievement extends X_PA_Achievement */ public static MAchievement[] getOfMeasure (Properties ctx, int PA_Measure_ID) { - String whereClause ="PA_Measure_ID=? AND IsAchieved='Y'"; - List list = new Query(ctx,MAchievement.Table_Name, whereClause, null) - .setParameters(new Object[]{PA_Measure_ID}).setOrderBy("SeqNo, DateDoc").list(); + final String whereClause ="PA_Measure_ID=? AND IsAchieved='Y'"; + List list = new Query(ctx,I_PA_Achievement.Table_Name, whereClause, null) + .setParameters(PA_Measure_ID) + .setOrderBy("SeqNo, DateDoc") + .list(); MAchievement[] retValue = new MAchievement[list.size ()]; retValue = list.toArray (retValue); diff --git a/base/src/org/compiere/model/MAlert.java b/base/src/org/compiere/model/MAlert.java index 1c1bb465fc..f5857dd4b6 100644 --- a/base/src/org/compiere/model/MAlert.java +++ b/base/src/org/compiere/model/MAlert.java @@ -88,9 +88,9 @@ public class MAlert extends X_AD_Alert if (m_rules != null && !reload) return m_rules; //FR: [ 2214883 ] Remove SQL code and Replace for Query - red1 - String whereClause = "AD_Alert_ID=?"; - List list = new Query(getCtx(), MAlertRule.Table_Name, whereClause, null) - .setParameters(new Object[]{getAD_Alert_ID()}) + final String whereClause = "AD_Alert_ID=?"; + List list = new Query(getCtx(), I_AD_AlertRule.Table_Name, whereClause, null) + .setParameters(getAD_Alert_ID()) .setOrderBy("Name, AD_AlertRule_ID") .setOnlyActiveRecords(true) .list() @@ -115,9 +115,9 @@ public class MAlert extends X_AD_Alert if (m_recipients != null && !reload) return m_recipients; //FR: [ 2214883 ] Remove SQL code and Replace for Query - red1 - String whereClause = "AD_Alert_ID=?"; - List list = new Query(getCtx(), MAlertRecipient.Table_Name, whereClause, null) - .setParameters(new Object[]{getAD_Alert_ID()}) + final String whereClause = "AD_Alert_ID=?"; + List list = new Query(getCtx(), I_AD_AlertRecipient.Table_Name, whereClause, null) + .setParameters(getAD_Alert_ID()) .setOnlyActiveRecords(true) .list() ; diff --git a/base/src/org/compiere/model/MAlertProcessor.java b/base/src/org/compiere/model/MAlertProcessor.java index dc9599495d..c8da6d700f 100644 --- a/base/src/org/compiere/model/MAlertProcessor.java +++ b/base/src/org/compiere/model/MAlertProcessor.java @@ -16,12 +16,10 @@ *****************************************************************************/ package org.compiere.model; -import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.Timestamp; -import java.util.ArrayList; +import java.util.List; import java.util.Properties; -import java.util.logging.Level; import org.compiere.util.CCache; import org.compiere.util.CLogger; @@ -50,26 +48,9 @@ public class MAlertProcessor extends X_AD_AlertProcessor */ public static MAlertProcessor[] getActive (Properties ctx) { - ArrayList list = new ArrayList(); - String sql = "SELECT * FROM AD_AlertProcessor WHERE IsActive='Y'"; - PreparedStatement pstmt = null; - ResultSet rs = null; - try - { - pstmt = DB.prepareStatement (sql, null); - rs = pstmt.executeQuery (); - while (rs.next ()) - list.add (new MAlertProcessor (ctx, rs, null)); - } - catch (Exception e) - { - s_log.log(Level.SEVERE, sql, e); - } - finally - { - DB.close(rs, pstmt); - rs = null; pstmt = null; - } + List list = new Query(ctx,I_AD_AlertProcessor.Table_Name, null, null) + .setOnlyActiveRecords(true) + .list(); MAlertProcessor[] retValue = new MAlertProcessor[list.size ()]; list.toArray (retValue); return retValue; @@ -131,30 +112,11 @@ public class MAlertProcessor extends X_AD_AlertProcessor */ public AdempiereProcessorLog[] getLogs () { - ArrayList list = new ArrayList(); - String sql = "SELECT * " - + "FROM AD_AlertProcessorLog " - + "WHERE AD_AlertProcessor_ID=? " - + "ORDER BY Created DESC"; - PreparedStatement pstmt = null; - ResultSet rs = null; - try - { - pstmt = DB.prepareStatement (sql, null); - pstmt.setInt (1, getAD_AlertProcessor_ID()); - rs = pstmt.executeQuery (); - while (rs.next ()) - list.add (new MAlertProcessorLog (getCtx(), rs, null)); - } - catch (Exception e) - { - log.log(Level.SEVERE, sql, e); - } - finally - { - DB.close(rs, pstmt); - rs = null; pstmt = null; - } + final String whereClause ="AD_AlertProcessor_ID=?"; + List list = new Query(getCtx(), I_AD_AlertProcessorLog.Table_Name, whereClause, null) + .setParameters(getAD_AlertProcessor_ID()) + .setOrderBy("Created DESC") + .list(); MAlertProcessorLog[] retValue = new MAlertProcessorLog[list.size ()]; list.toArray (retValue); return retValue; @@ -186,28 +148,13 @@ public class MAlertProcessor extends X_AD_AlertProcessor MAlert[] alerts = s_cacheAlerts.get(get_ID()); if (alerts != null && !reload) return alerts; - String sql = "SELECT * FROM AD_Alert " - + "WHERE AD_AlertProcessor_ID=? AND IsActive='Y' "; - ArrayList list = new ArrayList(); - PreparedStatement pstmt = null; - ResultSet rs = null; - try - { - pstmt = DB.prepareStatement (sql, null); - pstmt.setInt (1, getAD_AlertProcessor_ID()); - rs = pstmt.executeQuery (); - while (rs.next ()) - list.add (new MAlert (getCtx(), rs, null)); - } - catch (Exception e) - { - log.log(Level.SEVERE, sql, e); - } - finally - { - DB.close(rs, pstmt); - rs = null; pstmt = null; - } + + final String whereClause ="AD_AlertProcessor_ID=?"; + List list = new Query(getCtx(), I_AD_Alert.Table_Name, whereClause, null) + .setParameters(getAD_AlertProcessor_ID()) + .setOnlyActiveRecords(true) + .list(); + // alerts = new MAlert[list.size ()]; list.toArray (alerts); diff --git a/base/src/org/compiere/model/MAllocationHdr.java b/base/src/org/compiere/model/MAllocationHdr.java index 266ffa33e7..23567fa751 100644 --- a/base/src/org/compiere/model/MAllocationHdr.java +++ b/base/src/org/compiere/model/MAllocationHdr.java @@ -144,13 +144,13 @@ public final class MAllocationHdr extends X_C_AllocationHdr implements DocAction */ public static MAllocationHdr[] getOfCash (Properties ctx, int C_Cash_ID, String trxName) { - String whereClause = "IsActive='Y'" + final String whereClause = "IsActive='Y'" + " AND EXISTS (SELECT 1 FROM C_CashLine cl, C_AllocationLine al " + "where cl.C_Cash_ID=? and al.C_CashLine_ID=cl.C_CashLine_ID " + "and C_AllocationHdr.C_AllocationHdr_ID=al.C_AllocationHdr_ID)"; - Query query = MTable.get(ctx, MAllocationHdr.Table_ID) + Query query = MTable.get(ctx, I_C_AllocationHdr.Table_ID) .createQuery(whereClause, trxName); - query.setParameters(new Object[]{C_Cash_ID}); + query.setParameters(C_Cash_ID); List list = query.list(); MAllocationHdr[] retValue = new MAllocationHdr[list.size()]; list.toArray(retValue); @@ -416,7 +416,7 @@ public final class MAllocationHdr extends X_C_AllocationHdr implements DocAction + I_C_Invoice.COLUMNNAME_DocStatus + " NOT IN (?,?)"; boolean InvoiceIsPaid = new Query(getCtx(), I_C_Invoice.Table_Name, whereClause, get_TrxName()) .setClient_ID() - .setParameters(new Object[]{line.getC_Invoice_ID(), "Y", MInvoice.DOCSTATUS_Voided, MInvoice.DOCSTATUS_Reversed}) + .setParameters(line.getC_Invoice_ID(), "Y", X_C_Invoice.DOCSTATUS_Voided, X_C_Invoice.DOCSTATUS_Reversed) .match(); if(InvoiceIsPaid) throw new AdempiereException("@ValidationError@ @C_Invoice_ID@ @IsPaid@"); diff --git a/base/src/org/compiere/model/MAttachment.java b/base/src/org/compiere/model/MAttachment.java index a6d0191c6b..15e0cb9865 100644 --- a/base/src/org/compiere/model/MAttachment.java +++ b/base/src/org/compiere/model/MAttachment.java @@ -24,7 +24,6 @@ import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.nio.channels.FileChannel; -import java.sql.PreparedStatement; import java.sql.ResultSet; import java.util.ArrayList; import java.util.Properties; @@ -45,7 +44,6 @@ import javax.xml.transform.dom.DOMSource; import javax.xml.transform.stream.StreamResult; import org.compiere.util.CLogger; -import org.compiere.util.DB; import org.compiere.util.Env; import org.compiere.util.MimeType; import org.w3c.dom.Document; @@ -72,7 +70,7 @@ public class MAttachment extends X_AD_Attachment /** - * Get Attachment + * Get Attachment (if there are more than one attachment it gets the first in no specific order) * @param ctx context * @param AD_Table_ID table * @param Record_ID record @@ -80,35 +78,10 @@ public class MAttachment extends X_AD_Attachment */ public static MAttachment get (Properties ctx, int AD_Table_ID, int Record_ID) { - MAttachment retValue = null; - PreparedStatement pstmt = null; - String sql = "SELECT * FROM AD_Attachment WHERE AD_Table_ID=? AND Record_ID=?"; - try - { - pstmt = DB.prepareStatement (sql, null); - pstmt.setInt (1, AD_Table_ID); - pstmt.setInt (2, Record_ID); - ResultSet rs = pstmt.executeQuery (); - if (rs.next ()) - retValue = new MAttachment (ctx, rs, null); - rs.close (); - pstmt.close (); - pstmt = null; - } - catch (Exception e) - { - s_log.log(Level.SEVERE, sql, e); - } - try - { - if (pstmt != null) - pstmt.close (); - pstmt = null; - } - catch (Exception e) - { - pstmt = null; - } + final String whereClause = I_AD_Attachment.COLUMNNAME_AD_Table_ID+"=? AND "+I_AD_Attachment.COLUMNNAME_Record_ID+"=?"; + MAttachment retValue = new Query(ctx,I_AD_Attachment.Table_Name,whereClause, null) + .setParameters(AD_Table_ID, Record_ID) + .first(); return retValue; } // get diff --git a/base/src/org/compiere/model/MAttributeSet.java b/base/src/org/compiere/model/MAttributeSet.java index 48b81c021e..3be494673e 100644 --- a/base/src/org/compiere/model/MAttributeSet.java +++ b/base/src/org/compiere/model/MAttributeSet.java @@ -221,7 +221,7 @@ public class MAttributeSet extends X_M_AttributeSet { final String whereClause = X_M_AttributeSetExclude.COLUMNNAME_M_AttributeSet_ID+"=?"; List list = new Query(getCtx(), X_M_AttributeSetExclude.Table_Name, whereClause, null) - .setParameters(new Object[]{get_ID()}) + .setParameters(get_ID()) .setOnlyActiveRecords(true) .list(); m_excludes = new X_M_AttributeSetExclude[list.size ()]; @@ -253,9 +253,9 @@ public class MAttributeSet extends X_M_AttributeSet return true; if (m_excludeLots == null) { - String whereClause = X_M_LotCtlExclude.COLUMNNAME_M_LotCtl_ID+"=?"; + final String whereClause = X_M_LotCtlExclude.COLUMNNAME_M_LotCtl_ID+"=?"; List list = new Query(getCtx(), X_M_LotCtlExclude.Table_Name, whereClause, null) - .setParameters(new Object[]{getM_LotCtl_ID()}) + .setParameters(getM_LotCtl_ID()) .setOnlyActiveRecords(true) .list(); m_excludeLots = new X_M_LotCtlExclude[list.size ()]; @@ -287,9 +287,9 @@ public class MAttributeSet extends X_M_AttributeSet return true; if (m_excludeSerNos == null) { - String whereClause = X_M_SerNoCtlExclude.COLUMNNAME_M_SerNoCtl_ID+"=?"; + final String whereClause = X_M_SerNoCtlExclude.COLUMNNAME_M_SerNoCtl_ID+"=?"; List list = new Query(getCtx(), X_M_SerNoCtlExclude.Table_Name, whereClause, null) - .setParameters(new Object[]{getM_SerNoCtl_ID()}) + .setParameters(getM_SerNoCtl_ID()) .setOnlyActiveRecords(true) .list(); m_excludeSerNos = new X_M_SerNoCtlExclude[list.size ()]; diff --git a/base/src/org/compiere/model/MBOM.java b/base/src/org/compiere/model/MBOM.java index a97741ae75..b64698ee82 100644 --- a/base/src/org/compiere/model/MBOM.java +++ b/base/src/org/compiere/model/MBOM.java @@ -16,15 +16,12 @@ *****************************************************************************/ package org.compiere.model; -import java.sql.PreparedStatement; import java.sql.ResultSet; -import java.util.ArrayList; +import java.util.List; import java.util.Properties; -import java.util.logging.Level; import org.compiere.util.CCache; import org.compiere.util.CLogger; -import org.compiere.util.DB; import org.compiere.util.Msg; /** @@ -69,36 +66,13 @@ public class MBOM extends X_M_BOM public static MBOM[] getOfProduct (Properties ctx, int M_Product_ID, String trxName, String whereClause) { - ArrayList list = new ArrayList(); - String sql = "SELECT * FROM M_BOM WHERE M_Product_ID=?"; + //FR: [ 2214883 ] Remove SQL code and Replace for Query - red1 + String where = "M_Product_ID=?"; if (whereClause != null && whereClause.length() > 0) - sql += " AND " + whereClause; - PreparedStatement pstmt = null; - try - { - pstmt = DB.prepareStatement (sql, trxName); - pstmt.setInt (1, M_Product_ID); - ResultSet rs = pstmt.executeQuery (); - while (rs.next ()) - list.add (new MBOM (ctx, rs, trxName)); - rs.close (); - pstmt.close (); - pstmt = null; - } - catch (Exception e) - { - s_log.log (Level.SEVERE, sql, e); - } - try - { - if (pstmt != null) - pstmt.close (); - pstmt = null; - } - catch (Exception e) - { - pstmt = null; - } + where += " AND " + whereClause; + List list = new Query(ctx, I_M_BOM.Table_Name, where, trxName) + .setParameters(M_Product_ID) + .list(); MBOM[] retValue = new MBOM[list.size ()]; list.toArray (retValue); diff --git a/base/src/org/compiere/model/MBOMProduct.java b/base/src/org/compiere/model/MBOMProduct.java index 16c95f93af..66467c7469 100644 --- a/base/src/org/compiere/model/MBOMProduct.java +++ b/base/src/org/compiere/model/MBOMProduct.java @@ -16,11 +16,9 @@ *****************************************************************************/ package org.compiere.model; -import java.sql.PreparedStatement; import java.sql.ResultSet; -import java.util.ArrayList; +import java.util.List; import java.util.Properties; -import java.util.logging.Level; import org.compiere.util.CLogger; import org.compiere.util.DB; @@ -47,34 +45,12 @@ public class MBOMProduct extends X_M_BOMProduct */ public static MBOMProduct[] getOfBOM (MBOM bom) { - ArrayList list = new ArrayList(); - String sql = "SELECT * FROM M_BOMProduct WHERE M_BOM_ID=? ORDER BY SeqNo"; - PreparedStatement pstmt = null; - try - { - pstmt = DB.prepareStatement (sql, bom.get_TrxName()); - pstmt.setInt (1, bom.getM_BOM_ID()); - ResultSet rs = pstmt.executeQuery (); - while (rs.next ()) - list.add (new MBOMProduct (bom.getCtx(), rs, bom.get_TrxName())); - rs.close (); - pstmt.close (); - pstmt = null; - } - catch (Exception e) - { - s_log.log (Level.SEVERE, sql, e); - } - try - { - if (pstmt != null) - pstmt.close (); - pstmt = null; - } - catch (Exception e) - { - pstmt = null; - } + //FR: [ 2214883 ] Remove SQL code and Replace for Query - red1 + String whereClause = "M_BOM_ID=?"; + List list = new Query(bom.getCtx(), I_M_BOMProduct.Table_Name, whereClause, bom.get_TrxName()) + .setParameters(bom.getM_BOM_ID()) + .setOrderBy("SeqNo") + .list(); MBOMProduct[] retValue = new MBOMProduct[list.size ()]; list.toArray (retValue); diff --git a/base/src/org/compiere/model/MBPBankAccount.java b/base/src/org/compiere/model/MBPBankAccount.java index e55a24f46f..c233231438 100644 --- a/base/src/org/compiere/model/MBPBankAccount.java +++ b/base/src/org/compiere/model/MBPBankAccount.java @@ -16,14 +16,11 @@ *****************************************************************************/ package org.compiere.model; -import java.sql.PreparedStatement; import java.sql.ResultSet; -import java.util.ArrayList; +import java.util.List; import java.util.Properties; -import java.util.logging.Level; import org.compiere.util.CLogger; -import org.compiere.util.DB; /** * BP Bank Account Model @@ -33,48 +30,24 @@ import org.compiere.util.DB; */ public class MBPBankAccount extends X_C_BP_BankAccount { - /** * */ private static final long serialVersionUID = 2580706419593695062L; /** - * Get Accounst Of BPartner + * Get Accounts Of BPartner * @param ctx context * @param C_BPartner_ID bpartner * @return */ public static MBPBankAccount[] getOfBPartner (Properties ctx, int C_BPartner_ID) { - String sql = "SELECT * FROM C_BP_BankAccount WHERE C_BPartner_ID=? AND IsActive='Y'"; - ArrayList list = new ArrayList(); - PreparedStatement pstmt = null; - try - { - pstmt = DB.prepareStatement(sql, null); - pstmt.setInt(1, C_BPartner_ID); - ResultSet rs = pstmt.executeQuery(); - while (rs.next()) - { - list.add(new MBPBankAccount(ctx, rs, null)); - } - rs.close(); - pstmt.close(); - pstmt = null; - } - catch (Exception e) - { - s_log.log(Level.SEVERE, sql, e); - } - try { - if (pstmt != null) - pstmt.close(); - pstmt = null; - } catch (Exception e) { - pstmt = null; - } - + final String whereClause = MBPBankAccount.COLUMNNAME_C_BPartner_ID+"=?"; + Listlist = new Query(ctx,I_C_BP_BankAccount.Table_Name,whereClause,null) + .setParameters(C_BPartner_ID) + .setOnlyActiveRecords(true) + .list(); MBPBankAccount[] retValue = new MBPBankAccount[list.size()]; list.toArray(retValue); diff --git a/base/src/org/compiere/model/MBPartner.java b/base/src/org/compiere/model/MBPartner.java index 5514950549..1e0fb8064d 100644 --- a/base/src/org/compiere/model/MBPartner.java +++ b/base/src/org/compiere/model/MBPartner.java @@ -49,7 +49,6 @@ public class MBPartner extends X_C_BPartner */ private static final long serialVersionUID = -3669895599574182217L; - /** * Get Empty Template Business Partner * @param ctx context @@ -97,38 +96,10 @@ public class MBPartner extends X_C_BPartner */ public static MBPartner getBPartnerCashTrx (Properties ctx, int AD_Client_ID) { - MBPartner retValue = null; - String sql = "SELECT * FROM C_BPartner " - + "WHERE C_BPartner_ID IN (SELECT C_BPartnerCashTrx_ID FROM AD_ClientInfo WHERE AD_Client_ID=?)"; - PreparedStatement pstmt = null; - try - { - pstmt = DB.prepareStatement(sql, null); - pstmt.setInt(1, AD_Client_ID); - ResultSet rs = pstmt.executeQuery(); - if (rs.next()) - retValue = new MBPartner (ctx, rs, null); - else - s_log.log(Level.SEVERE, "Not found for AD_Client_ID=" + AD_Client_ID); - rs.close(); - pstmt.close(); - pstmt = null; - } - catch (Exception e) - { - s_log.log(Level.SEVERE, sql, e); - } - finally - { - try - { - if (pstmt != null) - pstmt.close (); - } - catch (Exception e) - {} - pstmt = null; - } + MBPartner retValue = (MBPartner) MClientInfo.get(ctx, AD_Client_ID).getC_BPartnerCashTrx(); + if (retValue == null) + s_log.log(Level.SEVERE, "Not found for AD_Client_ID=" + AD_Client_ID); + return retValue; } // getBPartnerCashTrx @@ -142,9 +113,9 @@ public class MBPartner extends X_C_BPartner { if (Value == null || Value.length() == 0) return null; - String whereClause = "Value=? AND AD_Client_ID=?"; - MBPartner retValue = new Query(ctx,MBPartner.Table_Name,whereClause.toString(),null) - .setParameters(new Object[]{Value,Env.getAD_Client_ID(ctx)}) + final String whereClause = "Value=? AND AD_Client_ID=?"; + MBPartner retValue = new Query(ctx, I_C_BPartner.Table_Name, whereClause, null) + .setParameters(Value,Env.getAD_Client_ID(ctx)) .firstOnly(); return retValue; } // get @@ -157,9 +128,9 @@ public class MBPartner extends X_C_BPartner */ public static MBPartner get (Properties ctx, int C_BPartner_ID) { - String whereClause = "C_BPartner_ID=? AND AD_Client_ID=?"; - MBPartner retValue = new Query(ctx,MBPartner.Table_Name,whereClause.toString(),null) - .setParameters(new Object[]{C_BPartner_ID,Env.getAD_Client_ID(ctx)}) + final String whereClause = "C_BPartner_ID=? AND AD_Client_ID=?"; + MBPartner retValue = new Query(ctx,I_C_BPartner.Table_Name,whereClause,null) + .setParameters(C_BPartner_ID,Env.getAD_Client_ID(ctx)) .firstOnly(); return retValue; } // get diff --git a/base/src/org/compiere/model/MBPartnerLocation.java b/base/src/org/compiere/model/MBPartnerLocation.java index 3fc7334305..a438a35d10 100644 --- a/base/src/org/compiere/model/MBPartnerLocation.java +++ b/base/src/org/compiere/model/MBPartnerLocation.java @@ -59,7 +59,7 @@ public class MBPartnerLocation extends X_C_BPartner_Location public static MBPartnerLocation[] getForBPartner (Properties ctx, int C_BPartner_ID, String trxName) { List list = new Query(ctx, Table_Name, "C_BPartner_ID=?", trxName) - .setParameters(new Object[]{C_BPartner_ID}) + .setParameters(C_BPartner_ID) .list(); MBPartnerLocation[] retValue = new MBPartnerLocation[list.size ()]; list.toArray (retValue); diff --git a/base/src/org/compiere/model/MBankStatement.java b/base/src/org/compiere/model/MBankStatement.java index 46e7870eee..ba703ee4e2 100644 --- a/base/src/org/compiere/model/MBankStatement.java +++ b/base/src/org/compiere/model/MBankStatement.java @@ -18,12 +18,10 @@ package org.compiere.model; import java.io.File; import java.math.BigDecimal; -import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.Timestamp; -import java.util.ArrayList; +import java.util.List; import java.util.Properties; -import java.util.logging.Level; import org.compiere.process.DocAction; import org.compiere.process.DocumentEngine; @@ -131,37 +129,11 @@ public class MBankStatement extends X_C_BankStatement implements DocAction return m_lines; } // - ArrayList list = new ArrayList(); - String sql = "SELECT * FROM C_BankStatementLine " - + "WHERE C_BankStatement_ID=?" - + "ORDER BY Line"; - PreparedStatement pstmt = null; - try - { - pstmt = DB.prepareStatement(sql, get_TrxName()); - pstmt.setInt(1, getC_BankStatement_ID()); - ResultSet rs = pstmt.executeQuery(); - while (rs.next()) - list.add (new MBankStatementLine(getCtx(), rs, get_TrxName())); - rs.close(); - pstmt.close(); - pstmt = null; - } - catch (Exception e) - { - log.log(Level.SEVERE, "getLines", e); - } - try - { - if (pstmt != null) - pstmt.close(); - pstmt = null; - } - catch (Exception e) - { - pstmt = null; - } - + final String whereClause = I_C_BankStatementLine.COLUMNNAME_C_BankStatement_ID+"=?"; + List list = new Query(getCtx(),I_C_BankStatementLine.Table_Name,whereClause,get_TrxName()) + .setParameters(getC_BankStatement_ID()) + .setOrderBy("Line") + .list(); MBankStatementLine[] retValue = new MBankStatementLine[list.size()]; list.toArray(retValue); return retValue; diff --git a/base/src/org/compiere/model/MCash.java b/base/src/org/compiere/model/MCash.java index 59a472669c..ba74971354 100644 --- a/base/src/org/compiere/model/MCash.java +++ b/base/src/org/compiere/model/MCash.java @@ -69,14 +69,14 @@ public class MCash extends X_C_Cash implements DocAction Timestamp dateAcct, int C_Currency_ID, String trxName) { // Existing Journal - String whereClause = "C_Cash.AD_Org_ID=?" // #1 + final String whereClause = "C_Cash.AD_Org_ID=?" // #1 + " AND TRUNC(C_Cash.StatementDate)=?" // #2 + " AND C_Cash.Processed='N'" + " AND EXISTS (SELECT * FROM C_CashBook cb " + "WHERE C_Cash.C_CashBook_ID=cb.C_CashBook_ID AND cb.AD_Org_ID=C_Cash.AD_Org_ID" + " AND cb.C_Currency_ID=?)"; // #3 - MCash retValue = new Query(ctx, MCash.Table_Name, whereClause, trxName) - .setParameters(new Object[]{AD_Org_ID,TimeUtil.getDay(dateAcct),C_Currency_ID}) + MCash retValue = new Query(ctx, I_C_Cash.Table_Name, whereClause, trxName) + .setParameters(AD_Org_ID,TimeUtil.getDay(dateAcct),C_Currency_ID) .first() ; @@ -108,12 +108,12 @@ public class MCash extends X_C_Cash implements DocAction public static MCash get (Properties ctx, int C_CashBook_ID, Timestamp dateAcct, String trxName) { - String whereClause ="C_CashBook_ID=?" // #1 + final String whereClause ="C_CashBook_ID=?" // #1 + " AND TRUNC(StatementDate)=?" // #2 + " AND Processed='N'"; MCash retValue = new Query(ctx, MCash.Table_Name, whereClause, trxName) - .setParameters(new Object[]{C_CashBook_ID, TimeUtil.getDay(dateAcct)}) + .setParameters(C_CashBook_ID, TimeUtil.getDay(dateAcct)) .first() ; @@ -217,10 +217,10 @@ public class MCash extends X_C_Cash implements DocAction return m_lines; } - String whereClause =MCashLine.COLUMNNAME_C_Cash_ID+"=?"; - List list = new Query(getCtx(),MCashLine.Table_Name, whereClause, get_TrxName()) - .setParameters(new Object[]{getC_Cash_ID()}) - .setOrderBy(MCashLine.COLUMNNAME_Line) + final String whereClause =MCashLine.COLUMNNAME_C_Cash_ID+"=?"; + List list = new Query(getCtx(),I_C_CashLine.Table_Name, whereClause, get_TrxName()) + .setParameters(getC_Cash_ID()) + .setOrderBy(I_C_CashLine.COLUMNNAME_Line) .setOnlyActiveRecords(true) .list(); diff --git a/base/src/org/compiere/model/MCommission.java b/base/src/org/compiere/model/MCommission.java index abcdd56623..034dac6f9a 100644 --- a/base/src/org/compiere/model/MCommission.java +++ b/base/src/org/compiere/model/MCommission.java @@ -80,9 +80,9 @@ public class MCommission extends X_C_Commission { //[ 1867477 ] //FR: [ 2214883 ] Remove SQL code and Replace for Query - red1 - String whereClause = "IsActive='Y' AND C_Commission_ID=?"; - List list = new Query(getCtx(), MCommissionLine.Table_Name, whereClause, get_TrxName()) - .setParameters(new Object[]{getC_Commission_ID()}) + final String whereClause = "IsActive='Y' AND C_Commission_ID=?"; + List list = new Query(getCtx(), I_C_CommissionLine.Table_Name, whereClause, get_TrxName()) + .setParameters(getC_Commission_ID()) .setOrderBy("Line") .list(); // Convert diff --git a/base/src/org/compiere/model/MCommissionAmt.java b/base/src/org/compiere/model/MCommissionAmt.java index fc937d7ac7..0de0ae2589 100644 --- a/base/src/org/compiere/model/MCommissionAmt.java +++ b/base/src/org/compiere/model/MCommissionAmt.java @@ -17,13 +17,10 @@ package org.compiere.model; import java.math.BigDecimal; -import java.sql.PreparedStatement; import java.sql.ResultSet; -import java.util.ArrayList; +import java.util.List; import java.util.Properties; -import java.util.logging.Level; -import org.compiere.util.DB; import org.compiere.util.Env; /** @@ -88,35 +85,10 @@ public class MCommissionAmt extends X_C_CommissionAmt */ public MCommissionDetail[] getDetails() { - String sql = "SELECT * FROM C_CommissionDetail WHERE C_CommissionAmt_ID=?"; - ArrayList list = new ArrayList(); - PreparedStatement pstmt = null; - try - { - pstmt = DB.prepareStatement(sql, get_TrxName()); - pstmt.setInt(1, getC_CommissionAmt_ID()); - ResultSet rs = pstmt.executeQuery(); - while (rs.next()) - list.add(new MCommissionDetail(getCtx(), rs, get_TrxName())); - rs.close(); - pstmt.close(); - pstmt = null; - } - catch (Exception e) - { - log.log(Level.SEVERE, sql, e); - } - try - { - if (pstmt != null) - pstmt.close(); - pstmt = null; - } - catch (Exception e) - { - pstmt = null; - } - + final String whereClause = I_C_CommissionDetail.COLUMNNAME_C_CommissionAmt_ID+"=?"; + List list = new Query(getCtx(),I_C_CommissionDetail.Table_Name, whereClause, get_TrxName()) + .setParameters(getC_CommissionAmt_ID()) + .list(); // Convert MCommissionDetail[] retValue = new MCommissionDetail[list.size()]; list.toArray(retValue); diff --git a/base/src/org/compiere/model/MCommissionRun.java b/base/src/org/compiere/model/MCommissionRun.java index 263b514547..4de9652bd1 100644 --- a/base/src/org/compiere/model/MCommissionRun.java +++ b/base/src/org/compiere/model/MCommissionRun.java @@ -17,13 +17,10 @@ package org.compiere.model; import java.math.BigDecimal; -import java.sql.PreparedStatement; import java.sql.ResultSet; -import java.util.ArrayList; +import java.util.List; import java.util.Properties; -import java.util.logging.Level; -import org.compiere.util.DB; import org.compiere.util.Env; /** @@ -34,10 +31,12 @@ import org.compiere.util.Env; */ public class MCommissionRun extends X_C_CommissionRun { - /** - * - */ - private static final long serialVersionUID = -3103035295526318283L; + + + /** + * + */ + private static final long serialVersionUID = -3103035295526318283L; /** * Standard Constructor @@ -86,35 +85,10 @@ public class MCommissionRun extends X_C_CommissionRun */ public MCommissionAmt[] getAmts() { - String sql = "SELECT * FROM C_CommissionAmt WHERE C_CommissionRun_ID=?"; - ArrayList list = new ArrayList(); - PreparedStatement pstmt = null; - try - { - pstmt = DB.prepareStatement(sql, get_TrxName()); - pstmt.setInt(1, getC_CommissionRun_ID()); - ResultSet rs = pstmt.executeQuery(); - while (rs.next()) - list.add(new MCommissionAmt(getCtx(), rs, get_TrxName())); - rs.close(); - pstmt.close(); - pstmt = null; - } - catch (Exception e) - { - log.log(Level.SEVERE, sql, e); - } - try - { - if (pstmt != null) - pstmt.close(); - pstmt = null; - } - catch (Exception e) - { - pstmt = null; - } - + final String whereClause = I_C_CommissionAmt.COLUMNNAME_C_CommissionRun_ID+"=?"; + List list = new Query(getCtx(),I_C_CommissionAmt.Table_Name,whereClause,get_TrxName()) + .setParameters(getC_CommissionRun_ID()) + .list(); // Convert MCommissionAmt[] retValue = new MCommissionAmt[list.size()]; list.toArray(retValue); diff --git a/base/src/org/compiere/model/MContainer.java b/base/src/org/compiere/model/MContainer.java index 1096f88ef1..ac22bf2d05 100644 --- a/base/src/org/compiere/model/MContainer.java +++ b/base/src/org/compiere/model/MContainer.java @@ -32,9 +32,11 @@ import org.compiere.util.DB; */ public class MContainer extends X_CM_Container { - /** serialVersionUID */ - private static final long serialVersionUID = 395679572291279730L; - + /** + * + */ + private static final long serialVersionUID = 3999588662066631303L; + /** * get Container by Relative URL * @param ctx @@ -46,9 +48,9 @@ public class MContainer extends X_CM_Container public static MContainer get(Properties ctx, String relURL, int CM_WebProject_Id, String trxName) { MContainer thisContainer = null; //FR: [ 2214883 ] Remove SQL code and Replace for Query - red1/trifon - String whereClause = "(RelativeURL LIKE ? OR RelativeURL LIKE ?) AND CM_WebProject_ID=?"; - thisContainer = new Query(ctx, MContainer.Table_Name, whereClause, trxName) - .setParameters(new Object[]{relURL, relURL+"/",CM_WebProject_Id}) + final String whereClause = "(RelativeURL LIKE ? OR RelativeURL LIKE ?) AND CM_WebProject_ID=?"; + thisContainer = new Query(ctx, I_CM_Container.Table_Name, whereClause, trxName) + .setParameters(relURL, relURL+"/",CM_WebProject_Id) .first(); return thisContainer; @@ -66,9 +68,9 @@ public class MContainer extends X_CM_Container public static MContainer get(Properties ctx, int CM_Container_ID, int CM_WebProject_Id, String trxName) { MContainer thisContainer = null; //FR: [ 2214883 ] Remove SQL code and Replace for Query - red1/trifon - String whereClause = "CM_Container_ID=? AND CM_WebProject_ID=?"; - thisContainer = new Query(ctx, MContainer.Table_Name, whereClause, trxName) - .setParameters(new Object[]{CM_Container_ID, CM_WebProject_Id}) + final String whereClause = "CM_Container_ID=? AND CM_WebProject_ID=?"; + thisContainer = new Query(ctx, I_CM_Container.Table_Name, whereClause, trxName) + .setParameters(CM_Container_ID, CM_WebProject_Id) .first(); // return thisContainer; @@ -112,9 +114,9 @@ public class MContainer extends X_CM_Container { MContainer cc = null; //FR: [ 2214883 ] Remove SQL code and Replace for Query - red1/trifon - String whereClause = "CM_Container_ID=?"; - cc = new Query(ctx, MContainer.Table_Name, whereClause, trxName) - .setParameters(new Object[]{CM_Container_ID}) + final String whereClause = "CM_Container_ID=?"; + cc = new Query(ctx, I_CM_Container.Table_Name, whereClause, trxName) + .setParameters(CM_Container_ID) .first(); // return cc; @@ -130,9 +132,9 @@ public class MContainer extends X_CM_Container public static MContainer[] getContainers (MWebProject project) { //FR: [ 2214883 ] Remove SQL code and Replace for Query - red1/trifon - String whereClause = "CM_WebProject_ID=?"; - List list = new Query(project.getCtx(), MContainer.Table_Name, whereClause, project.get_TrxName()) - .setParameters(new Object[]{project.getCM_WebProject_ID ()}) + final String whereClause = "CM_WebProject_ID=?"; + List list = new Query(project.getCtx(), I_CM_Container.Table_Name, whereClause, project.get_TrxName()) + .setParameters(project.getCM_WebProject_ID ()) .setOrderBy("CM_Container_ID") .list(); // diff --git a/base/src/org/compiere/model/MContainerElement.java b/base/src/org/compiere/model/MContainerElement.java index 6b7574dcb0..676835c254 100644 --- a/base/src/org/compiere/model/MContainerElement.java +++ b/base/src/org/compiere/model/MContainerElement.java @@ -16,13 +16,10 @@ *****************************************************************************/ package org.compiere.model; -import java.sql.PreparedStatement; import java.sql.ResultSet; import java.util.Properties; -import java.util.logging.Level; import org.compiere.util.CLogger; -import org.compiere.util.DB; /** * CStage Element @@ -32,11 +29,13 @@ import org.compiere.util.DB; */ public class MContainerElement extends X_CM_Container_Element { - /** serialVersionUID */ - private static final long serialVersionUID = 7230036377422361941L; - + /** + * + */ + private static final long serialVersionUID = 8487403111353473486L; + /** Logger */ - private static CLogger s_log = CLogger.getCLogger (MContainer.class); + private static CLogger s_log = CLogger.getCLogger (MContainerElement.class); /** * get Container Element by ID @@ -46,35 +45,7 @@ public class MContainerElement extends X_CM_Container_Element * @return ContainerElement */ public static MContainerElement get(Properties ctx, int CM_ContainerElement_ID, String trxName) { - MContainerElement thisContainerElement = null; - String sql = "SELECT * FROM CM_Container_Element WHERE CM_Container_Element_ID=?"; - PreparedStatement pstmt = null; - try - { - pstmt = DB.prepareStatement(sql, trxName); - pstmt.setInt(1, CM_ContainerElement_ID); - ResultSet rs = pstmt.executeQuery(); - if (rs.next()) - thisContainerElement = (new MContainerElement(ctx, rs, trxName)); - rs.close(); - pstmt.close(); - pstmt = null; - } - catch (Exception e) - { - s_log.log(Level.SEVERE, sql, e); - } - try - { - if (pstmt != null) - pstmt.close(); - pstmt = null; - } - catch (Exception e) - { - pstmt = null; - } - return thisContainerElement; + return new MContainerElement(ctx, CM_ContainerElement_ID, trxName); } /*************************************************************************** diff --git a/base/src/org/compiere/model/MConversionRate.java b/base/src/org/compiere/model/MConversionRate.java index 4fcbb96764..225dadb3f2 100644 --- a/base/src/org/compiere/model/MConversionRate.java +++ b/base/src/org/compiere/model/MConversionRate.java @@ -23,6 +23,7 @@ import java.sql.Timestamp; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Iterator; +import java.util.List; import java.util.Properties; import java.util.logging.Level; @@ -45,7 +46,8 @@ public class MConversionRate extends X_C_Conversion_Rate /** * */ - private static final long serialVersionUID = -2753651400799848008L; + private static final long serialVersionUID = -8171829790483133141L; + /** Logger */ private static CLogger s_log = CLogger.getCLogger (MConversionRate.class); @@ -156,12 +158,10 @@ public class MConversionRate extends X_C_Conversion_Rate spotCal.set(Calendar.SECOND, 0); spotCal.set(Calendar.MILLISECOND, 0); startTs = new java.sql.Timestamp(spotCal.getTimeInMillis()); - + final String whereClause = "C_Currency_ID=? and C_Currency_ID_To=? and ValidFrom>=? and ValidTo<=? and C_ConversionType_ID=?"; MConversionRate rate, updateRate = null; - java.util.List rates = new Query(ctx, MConversionRate.Table_Name, - "C_Currency_ID=? and C_Currency_ID_To=? and ValidFrom>=? and ValidTo<=? and C_ConversionType_ID=?", - trxName) - .setParameters(new Object[]{curFrom.get_ID(), curTo.get_ID(), startTs, startTs, MConversionType.TYPE_SPOT}) + List rates = new Query(ctx, I_C_Conversion_Rate.Table_Name, whereClause,trxName) + .setParameters(curFrom.get_ID(), curTo.get_ID(), startTs, startTs, MConversionType.TYPE_SPOT) .list(); if (rates.size()>0) { diff --git a/base/src/org/compiere/model/MCost.java b/base/src/org/compiere/model/MCost.java index 6836479493..f68c2d8641 100644 --- a/base/src/org/compiere/model/MCost.java +++ b/base/src/org/compiere/model/MCost.java @@ -1289,20 +1289,19 @@ public class MCost extends X_M_Cost { MCost cost = null; //FR: [ 2214883 ] Remove SQL code and Replace for Query - red1 - String whereClause = "AD_Client_ID=? AND AD_Org_ID=?" + final String whereClause = "AD_Client_ID=? AND AD_Org_ID=?" + " AND M_Product_ID=?" + " AND M_AttributeSetInstance_ID=?" + " AND M_CostType_ID=? AND C_AcctSchema_ID=?" + " AND M_CostElement_ID=?"; - cost = new Query(product.getCtx(), MCost.Table_Name, whereClause, trxName) - .setParameters(new Object[]{ - product.getAD_Client_ID(), + cost = new Query(product.getCtx(), I_M_Cost.Table_Name, whereClause, trxName) + .setParameters( product.getAD_Client_ID(), AD_Org_ID, product.getM_Product_ID(), M_AttributeSetInstance_ID, as.getM_CostType_ID(), as.getC_AcctSchema_ID(), - M_CostElement_ID}) + M_CostElement_ID) .firstOnly(); //FR: [ 2214883 ] - end - // New diff --git a/base/src/org/compiere/model/MCostElement.java b/base/src/org/compiere/model/MCostElement.java index 3a8a9349eb..9837b969f7 100644 --- a/base/src/org/compiere/model/MCostElement.java +++ b/base/src/org/compiere/model/MCostElement.java @@ -16,13 +16,10 @@ *****************************************************************************/ package org.compiere.model; -import java.sql.PreparedStatement; import java.sql.ResultSet; -import java.util.ArrayList; import java.util.Collection; import java.util.List; import java.util.Properties; -import java.util.logging.Level; import org.compiere.util.CCache; import org.compiere.util.CLogger; @@ -38,6 +35,8 @@ import org.compiere.util.Msg; * @author Teo Sarca, www.arhipac.ro *
  • BF [ 2664529 ] More then one Labor/Burden//Overhead is not allowed *
  • BF [ 2667470 ] MCostElement.getMaterialCostElement should check only material + * @author red1 + *
  • FR: [ 2214883 ] Remove SQL code and Replace for Query -- JUnit tested */ public class MCostElement extends X_M_CostElement { @@ -61,9 +60,10 @@ public class MCostElement extends X_M_CostElement return null; } // - final String whereClause = "AD_Client_ID=? AND CostingMethod=? AND CostElementType=?"; + final String whereClause = "CostingMethod=? AND CostElementType=?"; MCostElement retValue = new Query(po.getCtx(), Table_Name, whereClause, po.get_TrxName()) - .setParameters(new Object[]{po.getAD_Client_ID(), CostingMethod, COSTELEMENTTYPE_Material}) + .setParameters(CostingMethod, COSTELEMENTTYPE_Material) + .setClient_ID() .setOrderBy("AD_Org_ID") .firstOnly(); if (retValue != null) @@ -92,37 +92,17 @@ public class MCostElement extends X_M_CostElement */ public static MCostElement getMaterialCostElement(Properties ctx, String CostingMethod) { + final String whereClause = "CostingMethod=?"; + List list = new Query(ctx, I_M_CostElement.Table_Name, whereClause, null) + .setParameters(CostingMethod) + .setClient_ID() + .setOrderBy(I_M_CostElement.COLUMNNAME_AD_Org_ID) + .list(); MCostElement retValue = null; - String sql = "SELECT * FROM M_CostElement WHERE AD_Client_ID=? AND CostingMethod=? ORDER BY AD_Org_ID"; - PreparedStatement pstmt = null; - try - { - pstmt = DB.prepareStatement (sql, null); - pstmt.setInt (1, Env.getAD_Client_ID(ctx)); - pstmt.setString(2, CostingMethod); - ResultSet rs = pstmt.executeQuery (); - if (rs.next ()) - retValue = new MCostElement (ctx, rs, null); - if (rs.next()) - s_log.info("More then one Material Cost Element for CostingMethod=" + CostingMethod); - rs.close (); - pstmt.close (); - pstmt = null; - } - catch (Exception e) - { - s_log.log (Level.SEVERE, sql, e); - } - try - { - if (pstmt != null) - pstmt.close (); - pstmt = null; - } - catch (Exception e) - { - pstmt = null; - } + if (list.size() > 0) + retValue = list.get(0); + if (list.size() > 1) + s_log.info("More then one Material Cost Element for CostingMethod=" + CostingMethod); return retValue; } // getMaterialCostElement @@ -147,36 +127,12 @@ public class MCostElement extends X_M_CostElement */ public static MCostElement[] getCostingMethods (PO po) { - ArrayList list = new ArrayList(); - String sql = "SELECT * FROM M_CostElement " - + "WHERE AD_Client_ID=?" - + " AND IsActive='Y' AND CostElementType='M' AND CostingMethod IS NOT NULL"; - PreparedStatement pstmt = null; - try - { - pstmt = DB.prepareStatement (sql, po.get_TrxName()); - pstmt.setInt (1, po.getAD_Client_ID()); - ResultSet rs = pstmt.executeQuery (); - while (rs.next ()) - list.add(new MCostElement (po.getCtx(), rs, po.get_TrxName())); - rs.close (); - pstmt.close (); - pstmt = null; - } - catch (Exception e) - { - s_log.log (Level.SEVERE, sql, e); - } - try - { - if (pstmt != null) - pstmt.close (); - pstmt = null; - } - catch (Exception e) - { - pstmt = null; - } + final String whereClause ="CostElementType=? AND CostingMethod IS NOT NULL"; + List list = new Query(po.getCtx(), I_M_CostElement.Table_Name, whereClause, po.get_TrxName()) + .setParameters(COSTELEMENTTYPE_Material) + .setClient_ID() + .setOnlyActiveRecords(true) + .list(); // MCostElement[] retValue = new MCostElement[list.size ()]; list.toArray (retValue); @@ -191,36 +147,11 @@ public class MCostElement extends X_M_CostElement */ public static MCostElement[] getNonCostingMethods (PO po) { - ArrayList list = new ArrayList(); - String sql = "SELECT * FROM M_CostElement " - + "WHERE AD_Client_ID=?" - + " AND IsActive='Y' AND CostingMethod IS NULL"; - PreparedStatement pstmt = null; - try - { - pstmt = DB.prepareStatement (sql, po.get_TrxName()); - pstmt.setInt (1, po.getAD_Client_ID()); - ResultSet rs = pstmt.executeQuery (); - while (rs.next ()) - list.add(new MCostElement (po.getCtx(), rs, po.get_TrxName())); - rs.close (); - pstmt.close (); - pstmt = null; - } - catch (Exception e) - { - s_log.log (Level.SEVERE, sql, e); - } - try - { - if (pstmt != null) - pstmt.close (); - pstmt = null; - } - catch (Exception e) - { - pstmt = null; - } + final String whereClause = "CostingMethod IS NULL"; + Listlist = new Query(po.getCtx(),I_M_CostElement.Table_Name, whereClause, po.get_TrxName()) + .setClient_ID() + .setOnlyActiveRecords(true) + .list(); // MCostElement[] retValue = new MCostElement[list.size ()]; list.toArray (retValue); @@ -255,12 +186,12 @@ public class MCostElement extends X_M_CostElement */ public static MCostElement[] getElements (Properties ctx, String trxName) { - int AD_Client_ID = Env.getAD_Client_ID(ctx); int AD_Org_ID = 0; // Org is always ZERO - see beforeSave - String whereClause = "AD_Client_ID = ? AND AD_Org_ID = ?"; + final String whereClause = "AD_Org_ID=?"; List list = new Query(ctx, Table_Name, whereClause, trxName) - .setParameters(new Object[]{AD_Client_ID, AD_Org_ID}) + .setParameters(AD_Org_ID) + .setClient_ID() .list(); MCostElement[] retValue = new MCostElement[list.size()]; list.toArray(retValue); @@ -279,7 +210,7 @@ public class MCostElement extends X_M_CostElement return new Query(ctx, Table_Name, whereClause, null) .setClient_ID() .setOnlyActiveRecords(true) - .setParameters(new Object[]{CostingMethod}) + .setParameters(CostingMethod) .list(); } @@ -345,7 +276,7 @@ public class MCostElement extends X_M_CostElement } } - // Maintain Calclated + // Maintain Calculated /* if (COSTELEMENTTYPE_Material.equals(getCostElementType())) { @@ -393,37 +324,14 @@ public class MCostElement extends X_M_CostElement } // Costing Methods on PC level - String sql = "SELECT M_Product_Category_ID FROM M_Product_Category_Acct WHERE AD_Client_ID=? AND CostingMethod=?"; int M_Product_Category_ID = 0; - PreparedStatement pstmt = null; - try - { - pstmt = DB.prepareStatement (sql, null); - pstmt.setInt (1, getAD_Client_ID()); - pstmt.setString (2, getCostingMethod()); - ResultSet rs = pstmt.executeQuery (); - if (rs.next ()) - { - M_Product_Category_ID = rs.getInt(1); - } - rs.close (); - pstmt.close (); - pstmt = null; - } - catch (Exception e) - { - log.log (Level.SEVERE, sql, e); - } - try - { - if (pstmt != null) - pstmt.close (); - pstmt = null; - } - catch (Exception e) - { - pstmt = null; - } + final String whereClause ="CostingMethod=?"; + MProductCategoryAcct retValue = new Query(getCtx(), I_M_Product_Category_Acct.Table_Name, whereClause, null) + .setParameters(getCostingMethod()) + .setClient_ID() + .first(); + if (retValue != null) + M_Product_Category_ID = retValue.getM_Product_Category_ID(); if (M_Product_Category_ID != 0) { log.saveError("CannotDeleteUsed", Msg.getElement(getCtx(), "M_Product_Category_ID") diff --git a/base/src/org/compiere/model/MCurrency.java b/base/src/org/compiere/model/MCurrency.java index 8563c2c27b..493af59a88 100644 --- a/base/src/org/compiere/model/MCurrency.java +++ b/base/src/org/compiere/model/MCurrency.java @@ -105,8 +105,8 @@ public class MCurrency extends X_C_Currency return retValue; // Try database - Query query = new Query(ctx, MCurrency.Table_Name, "iso_code=?", null); - query.setParameters(new Object[]{ISOcode}); + Query query = new Query(ctx, I_C_Currency.Table_Name, "ISO_Code=?", null); + query.setParameters(ISOcode); retValue = (MCurrency)query.firstOnly(); // Save diff --git a/base/src/org/compiere/model/MDocType.java b/base/src/org/compiere/model/MDocType.java index 5e9aed367f..927700fb48 100644 --- a/base/src/org/compiere/model/MDocType.java +++ b/base/src/org/compiere/model/MDocType.java @@ -61,9 +61,9 @@ public class MDocType extends X_C_DocType */ static public MDocType[] getOfDocBaseType (Properties ctx, String DocBaseType) { - String whereClause = "AD_Client_ID=? AND DocBaseType=?"; + final String whereClause = "AD_Client_ID=? AND DocBaseType=?"; List list = new Query(ctx, Table_Name, whereClause, null) - .setParameters(new Object[]{Env.getAD_Client_ID(ctx), DocBaseType}) + .setParameters(Env.getAD_Client_ID(ctx), DocBaseType) .setOnlyActiveRecords(true) .setOrderBy("IsDefault DESC, C_DocType_ID") .list(); @@ -77,9 +77,8 @@ public class MDocType extends X_C_DocType */ static public MDocType[] getOfClient (Properties ctx) { - String whereClause = "AD_Client_ID=?"; - List list = new Query(ctx, Table_Name, whereClause, null) - .setParameters(new Object[]{Env.getAD_Client_ID(ctx)}) + List list = new Query(ctx, Table_Name, null, null) + .setClient_ID() .setOnlyActiveRecords(true) .list(); return list.toArray(new MDocType[list.size()]); diff --git a/base/src/org/compiere/model/MDunningRun.java b/base/src/org/compiere/model/MDunningRun.java index 9b1b4c1dca..eb16da2123 100644 --- a/base/src/org/compiere/model/MDunningRun.java +++ b/base/src/org/compiere/model/MDunningRun.java @@ -85,11 +85,11 @@ public class MDunningRun extends X_C_DunningRun // just one level levels = new Query( getCtx(), - MDunningLevel.Table_Name, + I_C_DunningLevel.Table_Name, "C_Dunning_ID=? AND C_DunningLevel_ID=?", get_TrxName()) .setOnlyActiveRecords(true) - .setParameters(new Object[]{getC_Dunning_ID(), getC_DunningLevel_ID()}) + .setParameters(getC_Dunning_ID(), getC_DunningLevel_ID()) .setOrderBy("DaysAfterDue DESC, C_DunningLevel_ID") .list(); } else { @@ -100,7 +100,7 @@ public class MDunningRun extends X_C_DunningRun "C_Dunning_ID=?", get_TrxName()) .setOnlyActiveRecords(true) - .setParameters(new Object[]{getC_Dunning_ID()}) + .setParameters(getC_Dunning_ID()) .setOrderBy("DaysAfterDue DESC, C_DunningLevel_ID") .list(); } diff --git a/base/src/org/compiere/model/MEXPFormat.java b/base/src/org/compiere/model/MEXPFormat.java index 961b108497..02d38c7960 100644 --- a/base/src/org/compiere/model/MEXPFormat.java +++ b/base/src/org/compiere/model/MEXPFormat.java @@ -87,7 +87,7 @@ public class MEXPFormat extends X_EXP_Format { final String clauseWhere = X_EXP_FormatLine.COLUMNNAME_EXP_Format_ID + "=?"; m_lines = new Query(getCtx() , I_EXP_FormatLine.Table_Name, clauseWhere , get_TrxName()) .setOnlyActiveRecords(true) - .setParameters(new Object[]{getEXP_Format_ID()}) + .setParameters(getEXP_Format_ID()) .setOrderBy(orderBy) .list(); return m_lines; @@ -102,7 +102,7 @@ public class MEXPFormat extends X_EXP_Format { + " AND " + X_EXP_FormatLine.COLUMNNAME_IsPartUniqueIndex +"= ?"; m_lines_unique = new Query(getCtx(), I_EXP_FormatLine.Table_Name, clauseWhere, get_TrxName()) .setOnlyActiveRecords(true) - .setParameters(new Object[]{getEXP_Format_ID(), "Y"}) + .setParameters(getEXP_Format_ID(), "Y") .setOrderBy(X_EXP_FormatLine.COLUMNNAME_Position) .list(); return m_lines_unique; @@ -130,18 +130,18 @@ public class MEXPFormat extends X_EXP_Format { if(retValue!=null) return retValue; - StringBuffer whereCluse = new StringBuffer(X_EXP_Format.COLUMNNAME_Value).append("=?") + StringBuffer whereClause = new StringBuffer(X_EXP_Format.COLUMNNAME_Value).append("=?") .append(" AND AD_Client_ID = ?") .append(" AND ").append(X_EXP_Format.COLUMNNAME_Version).append(" = ?"); - retValue = (MEXPFormat) new Query(ctx,X_EXP_Format.Table_Name,whereCluse.toString(),trxName) - .setParameters(new Object[] {value,AD_Client_ID,version}).first(); + retValue = (MEXPFormat) new Query(ctx,X_EXP_Format.Table_Name,whereClause.toString(),trxName) + .setParameters(value,AD_Client_ID,version).first(); if(retValue != null) { - retValue.getFormatLines(); - s_cache.put (key, retValue); - exp_format_by_id_cache.put(retValue.getEXP_Format_ID(), retValue); + retValue.getFormatLines(); + s_cache.put (key, retValue); + exp_format_by_id_cache.put(retValue.getEXP_Format_ID(), retValue); } return retValue; @@ -161,13 +161,13 @@ public class MEXPFormat extends X_EXP_Format { .append(" AND ").append(X_EXP_Format.COLUMNNAME_Version).append(" = ?"); retValue = (MEXPFormat) new Query(ctx,X_EXP_Format.Table_Name,whereClause.toString(),trxName) - .setParameters(new Object[] {AD_Client_ID,AD_Table_ID,version}) + .setParameters(AD_Client_ID,AD_Table_ID,version) .first(); if(retValue!=null) { - retValue.getFormatLines(); - s_cache.put (key, retValue); - exp_format_by_id_cache.put(retValue.getEXP_Format_ID(), retValue); + retValue.getFormatLines(); + s_cache.put (key, retValue); + exp_format_by_id_cache.put(retValue.getEXP_Format_ID(), retValue); } return retValue; diff --git a/base/src/org/compiere/model/MElementValue.java b/base/src/org/compiere/model/MElementValue.java index dc22b34655..767f86bb3f 100644 --- a/base/src/org/compiere/model/MElementValue.java +++ b/base/src/org/compiere/model/MElementValue.java @@ -213,8 +213,8 @@ public class MElementValue extends X_C_ElementValue { // // Check if we have accounting facts - boolean match = new Query(getCtx(), MFactAcct.Table_Name, MFactAcct.COLUMNNAME_Account_ID+"=?", get_TrxName()) - .setParameters(new Object[]{getC_ElementValue_ID()}) + boolean match = new Query(getCtx(), I_Fact_Acct.Table_Name, I_Fact_Acct.COLUMNNAME_Account_ID+"=?", get_TrxName()) + .setParameters(getC_ElementValue_ID()) .match(); if (match) { @@ -223,8 +223,8 @@ public class MElementValue extends X_C_ElementValue // // Check Valid Combinations - teo_sarca FR [ 1883533 ] String whereClause = MAccount.COLUMNNAME_Account_ID+"=?"; - POResultSet rs = new Query(getCtx(), MAccount.Table_Name, whereClause, get_TrxName()) - .setParameters(new Object[]{get_ID()}) + POResultSet rs = new Query(getCtx(), I_C_ValidCombination.Table_Name, whereClause, get_TrxName()) + .setParameters(get_ID()) .scroll(); try { while(rs.hasNext()) { diff --git a/base/src/org/compiere/model/MFactAcct.java b/base/src/org/compiere/model/MFactAcct.java index d295557550..0dfed656cb 100644 --- a/base/src/org/compiere/model/MFactAcct.java +++ b/base/src/org/compiere/model/MFactAcct.java @@ -39,7 +39,7 @@ public class MFactAcct extends X_Fact_Acct /** * */ - private static final long serialVersionUID = 756203818233903671L; + private static final long serialVersionUID = 5251847162314796574L; /** * Delete Accounting @@ -135,19 +135,4 @@ public class MFactAcct extends X_Fact_Acct return acct; } // getMAccount - /** - * Check if a document is already posted - * @param AD_Table_ID table - * @param Record_ID record - * @param trxName transaction - * @return boolean indicating if the document has already accounting facts - * @throws DBException on database exception - */ - public static boolean alreadyPosted(int AD_Table_ID, int Record_ID, String trxName) throws DBException - { - final String sql = "SELECT 1 FROM Fact_Acct WHERE AD_Table_ID=? AND Record_ID=?"; - int one = DB.getSQLValue(trxName, sql, new Object[]{AD_Table_ID, Record_ID}); - return (one == 1); - } - } // MFactAcct diff --git a/base/src/org/compiere/model/MFreightCategory.java b/base/src/org/compiere/model/MFreightCategory.java index f9f5d59356..fc48cd6de4 100644 --- a/base/src/org/compiere/model/MFreightCategory.java +++ b/base/src/org/compiere/model/MFreightCategory.java @@ -32,8 +32,6 @@ package org.compiere.model; import java.sql.ResultSet; import java.util.Properties; - -import org.compiere.util.Env; /** * * @author Daniel Tamm @@ -80,8 +78,8 @@ public class MFreightCategory extends X_M_FreightCategory { */ public static MFreightCategory getByValue(Properties ctx, String value, String trxName) { - Query q = new Query(ctx, MFreightCategory.Table_Name, "Value=? AND AD_Client_ID=?", trxName); - q.setParameters(new Object[]{value, Env.getAD_Client_ID(ctx)}); + Query q = new Query(ctx, I_M_FreightCategory.Table_Name, "Value=?", trxName); + q.setParameters(value).setClient_ID(); return q.first(); } diff --git a/base/src/org/compiere/model/MInOut.java b/base/src/org/compiere/model/MInOut.java index 63a298b694..14f2f2ed1b 100644 --- a/base/src/org/compiere/model/MInOut.java +++ b/base/src/org/compiere/model/MInOut.java @@ -623,8 +623,8 @@ public class MInOut extends X_M_InOut implements DocAction set_TrxName(m_lines, get_TrxName()); return m_lines; } - List list = new Query(getCtx(), MInOutLine.Table_Name, "M_InOut_ID=?", get_TrxName()) - .setParameters(new Object[]{getM_InOut_ID()}) + List list = new Query(getCtx(), I_M_InOutLine.Table_Name, "M_InOut_ID=?", get_TrxName()) + .setParameters(getM_InOut_ID()) .setOrderBy(MInOutLine.COLUMNNAME_Line) .list(); // @@ -655,8 +655,8 @@ public class MInOut extends X_M_InOut implements DocAction set_TrxName(m_confirms, get_TrxName()); return m_confirms; } - List list = new Query(getCtx(), MInOutConfirm.Table_Name, "M_InOut_ID=?", get_TrxName()) - .setParameters(new Object[]{getM_InOut_ID()}) + List list = new Query(getCtx(), I_M_InOutConfirm.Table_Name, "M_InOut_ID=?", get_TrxName()) + .setParameters(getM_InOut_ID()) .list(); m_confirms = new MInOutConfirm[list.size ()]; list.toArray (m_confirms); @@ -1486,6 +1486,9 @@ public class MInOut extends X_M_InOut implements DocAction m_processMsg = CLogger.retrieveErrorString("Could not create Inv Matching"); return DocAction.STATUS_Invalid; } + if (MClient.isClientAccountingImmediate()) { + String ignoreError = DocumentEngine.postImmediate(inv.getCtx(), inv.getAD_Client_ID(), inv.get_Table_ID(), inv.get_ID(), true, inv.get_TrxName()); + } } } @@ -1500,6 +1503,9 @@ public class MInOut extends X_M_InOut implements DocAction m_processMsg = "Could not create PO Matching"; return DocAction.STATUS_Invalid; } + if (MClient.isClientAccountingImmediate()) { + String ignoreError = DocumentEngine.postImmediate(po.getCtx(), po.getAD_Client_ID(), po.get_Table_ID(), po.get_ID(), true, po.get_TrxName()); + } // Update PO with ASI if ( oLine != null && oLine.getM_AttributeSetInstance_ID() == 0 && sLine.getMovementQty().compareTo(oLine.getQtyOrdered()) == 0) // just if full match [ 1876965 ] @@ -1523,6 +1529,9 @@ public class MInOut extends X_M_InOut implements DocAction m_processMsg = "Could not create PO(Inv) Matching"; return DocAction.STATUS_Invalid; } + if (MClient.isClientAccountingImmediate()) { + String ignoreError = DocumentEngine.postImmediate(po.getCtx(), po.getAD_Client_ID(), po.get_Table_ID(), po.get_ID(), true, po.get_TrxName()); + } // Update PO with ASI oLine = new MOrderLine (getCtx(), po.getC_OrderLine_ID(), get_TrxName()); if ( oLine != null && oLine.getM_AttributeSetInstance_ID() == 0 diff --git a/base/src/org/compiere/model/MInOutConfirm.java b/base/src/org/compiere/model/MInOutConfirm.java index 52aa998696..29c027ca58 100644 --- a/base/src/org/compiere/model/MInOutConfirm.java +++ b/base/src/org/compiere/model/MInOutConfirm.java @@ -151,9 +151,9 @@ public class MInOutConfirm extends X_M_InOutConfirm implements DocAction set_TrxName(m_lines, get_TrxName()); return m_lines; } - final String whereClause = MInOutLineConfirm.COLUMNNAME_M_InOutConfirm_ID+"=?"; - List list = new Query(getCtx(), MInOutLineConfirm.Table_Name, whereClause, get_TrxName()) - .setParameters(new Object[]{getM_InOutConfirm_ID()}) + final String whereClause = I_M_InOutLineConfirm.COLUMNNAME_M_InOutConfirm_ID+"=?"; + List list = new Query(getCtx(), I_M_InOutLineConfirm.Table_Name, whereClause, get_TrxName()) + .setParameters(getM_InOutConfirm_ID()) .list(); m_lines = new MInOutLineConfirm[list.size ()]; list.toArray (m_lines); diff --git a/base/src/org/compiere/model/MInOutLine.java b/base/src/org/compiere/model/MInOutLine.java index 73e481aa7e..2843290c54 100644 --- a/base/src/org/compiere/model/MInOutLine.java +++ b/base/src/org/compiere/model/MInOutLine.java @@ -60,7 +60,7 @@ public class MInOutLine extends X_M_InOutLine { String whereClause = "C_OrderLine_ID=?" + (!Util.isEmpty(where, true) ? " AND "+where : ""); List list = new Query(ctx, Table_Name, whereClause, trxName) - .setParameters(new Object[]{C_OrderLine_ID}) + .setParameters(C_OrderLine_ID) .list(); return list.toArray (new MInOutLine[list.size()]); } // getOfOrderLine @@ -78,7 +78,7 @@ public class MInOutLine extends X_M_InOutLine { String whereClause = "M_RMALine_ID=? " + (!Util.isEmpty(where, true) ? " AND "+where : ""); List list = new Query(ctx, Table_Name, whereClause, trxName) - .setParameters(new Object[]{M_RMALine_ID}) + .setParameters(M_RMALine_ID) .list(); return list.toArray (new MInOutLine[list.size()]); } // getOfRMALine diff --git a/base/src/org/compiere/model/MInOutLineMA.java b/base/src/org/compiere/model/MInOutLineMA.java index eb7bd4d43e..c1d422aa61 100644 --- a/base/src/org/compiere/model/MInOutLineMA.java +++ b/base/src/org/compiere/model/MInOutLineMA.java @@ -46,8 +46,8 @@ public class MInOutLineMA extends X_M_InOutLineMA public static MInOutLineMA[] get (Properties ctx, int M_InOutLine_ID, String trxName) { Query query = MTable.get(ctx, MInOutLineMA.Table_Name) - .createQuery(MInOutLineMA.COLUMNNAME_M_InOutLine_ID+"=?", trxName); - query.setParameters(new Object[]{M_InOutLine_ID}); + .createQuery(I_M_InOutLineMA.COLUMNNAME_M_InOutLine_ID+"=?", trxName); + query.setParameters(M_InOutLine_ID); List list = query.list(); MInOutLineMA[] retValue = new MInOutLineMA[list.size ()]; list.toArray (retValue); diff --git a/base/src/org/compiere/model/MInventory.java b/base/src/org/compiere/model/MInventory.java index dc5a45ffc8..5ca61f46c5 100644 --- a/base/src/org/compiere/model/MInventory.java +++ b/base/src/org/compiere/model/MInventory.java @@ -48,8 +48,7 @@ public class MInventory extends X_M_Inventory implements DocAction /** * */ - private static final long serialVersionUID = 910998472569265447L; - + private static final long serialVersionUID = -7137974064086172763L; /** * Get Inventory from Cache @@ -145,8 +144,8 @@ public class MInventory extends X_M_Inventory implements DocAction return m_lines; } // - List list = new Query(getCtx(), MInventoryLine.Table_Name, "M_Inventory_ID=?", get_TrxName()) - .setParameters(new Object[]{get_ID()}) + List list = new Query(getCtx(), I_M_InventoryLine.Table_Name, "M_Inventory_ID=?", get_TrxName()) + .setParameters(get_ID()) .setOrderBy(MInventoryLine.COLUMNNAME_Line) .list(); m_lines = list.toArray(new MInventoryLine[list.size()]); diff --git a/base/src/org/compiere/model/MInventoryLine.java b/base/src/org/compiere/model/MInventoryLine.java index c3b356d20b..057ee893dc 100644 --- a/base/src/org/compiere/model/MInventoryLine.java +++ b/base/src/org/compiere/model/MInventoryLine.java @@ -39,8 +39,7 @@ public class MInventoryLine extends X_M_InventoryLine /** * */ - private static final long serialVersionUID = 1336000922103246463L; - + private static final long serialVersionUID = 5649152656460089476L; /** * Get Inventory Line with parameters @@ -55,8 +54,8 @@ public class MInventoryLine extends X_M_InventoryLine { final String whereClause = "M_Inventory_ID=? AND M_Locator_ID=?" +" AND M_Product_ID=? AND M_AttributeSetInstance_ID=?"; - return new Query(inventory.getCtx(), MInventoryLine.Table_Name, whereClause, inventory.get_TrxName()) - .setParameters(new Object[]{inventory.get_ID(), M_Locator_ID, M_Product_ID, M_AttributeSetInstance_ID}) + return new Query(inventory.getCtx(), I_M_InventoryLine.Table_Name, whereClause, inventory.get_TrxName()) + .setParameters(inventory.get_ID(), M_Locator_ID, M_Product_ID, M_AttributeSetInstance_ID) .firstOnly(); } // get diff --git a/base/src/org/compiere/model/MInvoice.java b/base/src/org/compiere/model/MInvoice.java index 29b1393375..ba04c2c418 100644 --- a/base/src/org/compiere/model/MInvoice.java +++ b/base/src/org/compiere/model/MInvoice.java @@ -74,7 +74,7 @@ public class MInvoice extends X_C_Invoice implements DocAction public static MInvoice[] getOfBPartner (Properties ctx, int C_BPartner_ID, String trxName) { List list = new Query(ctx, Table_Name, COLUMNNAME_C_BPartner_ID+"=?", trxName) - .setParameters(new Object[]{C_BPartner_ID}) + .setParameters(C_BPartner_ID) .list(); return list.toArray(new MInvoice[list.size()]); } // getOfBPartner @@ -630,9 +630,9 @@ public class MInvoice extends X_C_Invoice implements DocAction String whereClauseFinal = "C_Invoice_ID=? "; if (whereClause != null) whereClauseFinal += whereClause; - List list = new Query(getCtx(), MInvoiceLine.Table_Name, whereClauseFinal, get_TrxName()) - .setParameters(new Object[]{getC_Invoice_ID()}) - .setOrderBy(MInvoiceLine.COLUMNNAME_Line) + List list = new Query(getCtx(), I_C_InvoiceLine.Table_Name, whereClauseFinal, get_TrxName()) + .setParameters(getC_Invoice_ID()) + .setOrderBy(I_C_InvoiceLine.COLUMNNAME_Line) .list(); return list.toArray(new MInvoiceLine[list.size()]); } // getLines @@ -784,8 +784,8 @@ public class MInvoice extends X_C_Invoice implements DocAction return m_taxes; final String whereClause = MInvoiceTax.COLUMNNAME_C_Invoice_ID+"=?"; - List list = new Query(getCtx(), MInvoiceTax.Table_Name, whereClause, get_TrxName()) - .setParameters(new Object[]{get_ID()}) + List list = new Query(getCtx(), I_C_InvoiceTax.Table_Name, whereClause, get_TrxName()) + .setParameters(get_ID()) .list(); m_taxes = list.toArray(new MInvoiceTax[list.size()]); return m_taxes; @@ -1681,8 +1681,12 @@ public class MInvoice extends X_C_Invoice implements DocAction m_processMsg = "Could not create PO Matching"; return DocAction.STATUS_Invalid; } - else + else { matchPO++; + if (MClient.isClientAccountingImmediate()) { + String ignoreError = DocumentEngine.postImmediate(po.getCtx(), po.getAD_Client_ID(), po.get_Table_ID(), po.get_ID(), true, po.get_TrxName()); + } + } } } @@ -1720,8 +1724,12 @@ public class MInvoice extends X_C_Invoice implements DocAction m_processMsg = CLogger.retrieveErrorString("Could not create Invoice Matching"); return DocAction.STATUS_Invalid; } - else + else { matchInv++; + if (MClient.isClientAccountingImmediate()) { + String ignoreError = DocumentEngine.postImmediate(inv.getCtx(), inv.getAD_Client_ID(), inv.get_Table_ID(), inv.get_ID(), true, inv.get_TrxName()); + } + } } } // for all lines if (matchInv > 0) diff --git a/base/src/org/compiere/model/MInvoiceTax.java b/base/src/org/compiere/model/MInvoiceTax.java index 30ba02884c..d1eee99490 100644 --- a/base/src/org/compiere/model/MInvoiceTax.java +++ b/base/src/org/compiere/model/MInvoiceTax.java @@ -74,7 +74,7 @@ public class MInvoiceTax extends X_C_InvoiceTax } retValue = new Query(line.getCtx(), Table_Name, "C_Invoice_ID=? AND C_Tax_ID=?", trxName) - .setParameters(new Object[]{line.getC_Invoice_ID(), C_Tax_ID}) + .setParameters(line.getC_Invoice_ID(), C_Tax_ID) .firstOnly(); if (retValue != null) { diff --git a/base/src/org/compiere/model/MJournal.java b/base/src/org/compiere/model/MJournal.java index 270fbf736a..55d52c0e34 100644 --- a/base/src/org/compiere/model/MJournal.java +++ b/base/src/org/compiere/model/MJournal.java @@ -215,9 +215,9 @@ public class MJournal extends X_GL_Journal implements DocAction public MJournalLine[] getLines (boolean requery) { //FR: [ 2214883 ] Remove SQL code and Replace for Query - red1 - String whereClause = "GL_Journal_ID=?"; - List list = new Query(getCtx(), MJournalLine.Table_Name, whereClause.toString(), null) - .setParameters(new Object[]{getGL_Journal_ID()}) + final String whereClause = "GL_Journal_ID=?"; + List list = new Query(getCtx(), I_GL_JournalLine.Table_Name, whereClause, null) + .setParameters(getGL_Journal_ID()) .setOrderBy("Line") .list(); // diff --git a/base/src/org/compiere/model/MJournalBatch.java b/base/src/org/compiere/model/MJournalBatch.java index e4cbc56ce3..05b42770a9 100644 --- a/base/src/org/compiere/model/MJournalBatch.java +++ b/base/src/org/compiere/model/MJournalBatch.java @@ -474,16 +474,13 @@ public class MJournalBatch extends X_GL_JournalBatch implements DocAction ; else { - String status = journal.completeIt(); - if (!DocAction.STATUS_Completed.equals(status)) + journal.processIt(DocAction.ACTION_Complete); + journal.saveEx(); + if (!DocAction.STATUS_Completed.equals(journal.getDocStatus())) { - journal.setDocStatus(status); - journal.save(); m_processMsg = journal.getProcessMsg(); - return status; + return journal.getDocStatus(); } - journal.setDocStatus(DOCSTATUS_Completed); - journal.save(); } // TotalDr = TotalDr.add(journal.getTotalDr()); diff --git a/base/src/org/compiere/model/MLanguage.java b/base/src/org/compiere/model/MLanguage.java index 5904b5a4d0..9ed15c0d5f 100644 --- a/base/src/org/compiere/model/MLanguage.java +++ b/base/src/org/compiere/model/MLanguage.java @@ -70,7 +70,7 @@ public class MLanguage extends X_AD_Language public static MLanguage get (Properties ctx, String AD_Language) { return new Query(ctx, Table_Name, COLUMNNAME_AD_Language+"=?", null) - .setParameters(new Object[]{AD_Language}) + .setParameters(AD_Language) .firstOnly(); } // get @@ -83,7 +83,7 @@ public class MLanguage extends X_AD_Language public static MLanguage[] getWithLanguage (Properties ctx, String LanguageISO) { List list = new Query(ctx, Table_Name, COLUMNNAME_LanguageISO+"=?", null) - .setParameters(new Object[]{LanguageISO}) + .setParameters(LanguageISO) .list(); return list.toArray(new MLanguage[list.size()]); } // get @@ -95,7 +95,7 @@ public class MLanguage extends X_AD_Language public static void maintain (Properties ctx) { List list = new Query(ctx, Table_Name, "IsSystemLanguage=? AND IsBaseLanguage=?", null) - .setParameters(new Object[]{true, false}) + .setParameters(true, false) .setOnlyActiveRecords(true) .list(); for (MLanguage language : list) { @@ -138,7 +138,6 @@ public class MLanguage extends X_AD_Language * @param LanguageISO language code * @param trxName transaction */ - @SuppressWarnings("unused") private MLanguage (Properties ctx, String AD_Language, String Name, String CountryCode, String LanguageISO, String trxName) { diff --git a/base/src/org/compiere/model/MLot.java b/base/src/org/compiere/model/MLot.java index e151044902..04ea86ca13 100644 --- a/base/src/org/compiere/model/MLot.java +++ b/base/src/org/compiere/model/MLot.java @@ -54,9 +54,9 @@ public class MLot extends X_M_Lot public static MLot[] getProductLots (Properties ctx, int M_Product_ID, String trxName) { //FR: [ 2214883 ] Remove SQL code and Replace for Query - red1 - String whereClause = "M_Product_ID=?"; - List list = new Query(ctx, MLot.Table_Name, whereClause, trxName) - .setParameters(new Object[]{M_Product_ID}) + final String whereClause = "M_Product_ID=?"; + List list = new Query(ctx, I_M_Lot.Table_Name, whereClause, trxName) + .setParameters(M_Product_ID) .list(); // MLot[] retValue = new MLot[list.size()]; @@ -70,32 +70,15 @@ public class MLot extends X_M_Lot * @param M_Product_ID product * @param lot * @param trxName transaction - * @return Array of Lots for Product + * @return Last Lot for Product */ public static MLot getProductLot (Properties ctx, int M_Product_ID, String lot, String trxName) { - String sql = "SELECT * FROM M_Lot WHERE M_Product_ID=? AND Name=?"; - MLot retValue = null; - PreparedStatement pstmt = null; - ResultSet rs = null; - try - { - pstmt = DB.prepareStatement (sql, trxName); - pstmt.setInt (1, M_Product_ID); - pstmt.setString(2, lot); - rs = pstmt.executeQuery (); - while (rs.next ()) - retValue = new MLot (ctx, rs, trxName); - } - catch (SQLException ex) - { - s_log.log(Level.SEVERE, sql, ex); - } - finally - { - DB.close(rs, pstmt); - rs = null; pstmt = null; - } + final String whereClause = "M_Product_ID=? AND Name=?"; + MLot retValue = new Query(ctx, I_M_Lot.Table_Name, whereClause, trxName) + .setParameters(M_Product_ID, lot) + .setOrderBy(I_M_Lot.COLUMNNAME_M_Lot_ID + " DESC") + .first(); return retValue; } // getProductLot diff --git a/base/src/org/compiere/model/MMatchInv.java b/base/src/org/compiere/model/MMatchInv.java index ea5665ecb3..fec69d6f2b 100644 --- a/base/src/org/compiere/model/MMatchInv.java +++ b/base/src/org/compiere/model/MMatchInv.java @@ -66,8 +66,8 @@ public class MMatchInv extends X_M_MatchInv return new MMatchInv[]{}; // final String whereClause = "M_InOutLine_ID=? AND C_InvoiceLine_ID=?"; - List list = new Query(ctx, MMatchInv.Table_Name, whereClause, trxName) - .setParameters(new Object[]{M_InOutLine_ID, C_InvoiceLine_ID}) + List list = new Query(ctx, I_M_MatchInv.Table_Name, whereClause, trxName) + .setParameters(M_InOutLine_ID, C_InvoiceLine_ID) .list(); return list.toArray (new MMatchInv[list.size()]); } // get @@ -86,8 +86,8 @@ public class MMatchInv extends X_M_MatchInv return new MMatchInv[]{}; // String whereClause = "C_InvoiceLine_ID=?"; - List list = new Query(ctx, MMatchInv.Table_Name, whereClause, trxName) - .setParameters(new Object[]{C_InvoiceLine_ID}) + List list = new Query(ctx, I_M_MatchInv.Table_Name, whereClause, trxName) + .setParameters(C_InvoiceLine_ID) .list(); return list.toArray (new MMatchInv[list.size()]); } // getInvoiceLine @@ -107,8 +107,8 @@ public class MMatchInv extends X_M_MatchInv // final String whereClause = "EXISTS (SELECT 1 FROM M_InOutLine l" +" WHERE M_MatchInv.M_InOutLine_ID=l.M_InOutLine_ID AND l.M_InOut_ID=?)"; - List list = new Query(ctx, MMatchInv.Table_Name, whereClause, trxName) - .setParameters(new Object[]{M_InOut_ID}) + List list = new Query(ctx, I_M_MatchInv.Table_Name, whereClause, trxName) + .setParameters(M_InOut_ID) .list(); return list.toArray (new MMatchInv[list.size()]); } // getInOut @@ -128,8 +128,8 @@ public class MMatchInv extends X_M_MatchInv // final String whereClause = " EXISTS (SELECT 1 FROM C_InvoiceLine il" +" WHERE M_MatchInv.C_InvoiceLine_ID=il.C_InvoiceLine_ID AND il.C_Invoice_ID=?)"; - List list = new Query(ctx, MMatchInv.Table_Name, whereClause, trxName) - .setParameters(new Object[]{C_Invoice_ID}) + List list = new Query(ctx, I_M_MatchInv.Table_Name, whereClause, trxName) + .setParameters(C_Invoice_ID) .list(); return list.toArray (new MMatchInv[list.size()]); } // getInvoice @@ -429,7 +429,11 @@ public class MMatchInv extends X_M_MatchInv if (receipt.getMovementType().equals(MInOut.MOVEMENTTYPE_VendorReturns)) qty = getQty().negate(); // - BigDecimal price = cd.getAmt().divide(cd.getQty(),12,BigDecimal.ROUND_HALF_UP); + BigDecimal price = null; + if (cd.getQty().compareTo(Env.ZERO) == 0) // avoid division by zero + price = Env.ZERO; + else + price = cd.getAmt().divide(cd.getQty(),12,BigDecimal.ROUND_HALF_UP); cd.setDeltaAmt(price.multiply(qty.negate())); cd.setDeltaQty(qty.negate()); cd.setProcessed(false); @@ -470,8 +474,8 @@ public class MMatchInv extends X_M_MatchInv } // final String whereClause = MMatchInv.COLUMNNAME_M_InOutLine_ID+"=?"; - List list = new Query(ctx, MMatchInv.Table_Name, whereClause, trxName) - .setParameters(new Object[]{M_InOutLine_ID}) + List list = new Query(ctx, I_M_MatchInv.Table_Name, whereClause, trxName) + .setParameters(M_InOutLine_ID) .list(); return list.toArray (new MMatchInv[list.size()]); } // getInOutLine diff --git a/base/src/org/compiere/model/MMatchPO.java b/base/src/org/compiere/model/MMatchPO.java index b3ea1c4257..f1deeacda7 100644 --- a/base/src/org/compiere/model/MMatchPO.java +++ b/base/src/org/compiere/model/MMatchPO.java @@ -24,7 +24,6 @@ import java.util.ArrayList; import java.util.Properties; import java.util.logging.Level; -import org.compiere.report.MReportTree; import org.compiere.util.CLogger; import org.compiere.util.DB; import org.compiere.util.Env; diff --git a/base/src/org/compiere/model/MMovement.java b/base/src/org/compiere/model/MMovement.java index f8e1f9fbf1..f8055ef365 100644 --- a/base/src/org/compiere/model/MMovement.java +++ b/base/src/org/compiere/model/MMovement.java @@ -102,8 +102,8 @@ public class MMovement extends X_M_Movement implements DocAction } // final String whereClause = "M_Movement_ID=?"; - List list = new Query(getCtx(), MMovementLine.Table_Name, whereClause, get_TrxName()) - .setParameters(new Object[]{getM_Movement_ID()}) + List list = new Query(getCtx(), I_M_MovementLine.Table_Name, whereClause, get_TrxName()) + .setParameters(getM_Movement_ID()) .setOrderBy(MMovementLine.COLUMNNAME_Line) .list(); m_lines = new MMovementLine[list.size ()]; @@ -121,8 +121,8 @@ public class MMovement extends X_M_Movement implements DocAction if (m_confirms != null && !requery) return m_confirms; - List list = new Query(getCtx(), MMovementConfirm.Table_Name, "M_Movement_ID=?", get_TrxName()) - .setParameters(new Object[]{get_ID()}) + List list = new Query(getCtx(), I_M_MovementConfirm.Table_Name, "M_Movement_ID=?", get_TrxName()) + .setParameters(get_ID()) .list(); m_confirms = list.toArray(new MMovementConfirm[list.size()]); return m_confirms; diff --git a/base/src/org/compiere/model/MMovementLine.java b/base/src/org/compiere/model/MMovementLine.java index d6989c15c0..b47398df55 100644 --- a/base/src/org/compiere/model/MMovementLine.java +++ b/base/src/org/compiere/model/MMovementLine.java @@ -335,7 +335,7 @@ public class MMovementLine extends X_M_MovementLine whereClause += " AND (" + where + ")"; // List list = new Query(ctx, Table_Name, whereClause, trxName) - .setParameters(new Object[]{DD_OrderLine_ID}) + .setParameters(DD_OrderLine_ID) .list(); return list.toArray(new MMovementLine[list.size()]); } // getOfOrderLine diff --git a/base/src/org/compiere/model/MOrder.java b/base/src/org/compiere/model/MOrder.java index 79e2772ce4..b383a282c7 100644 --- a/base/src/org/compiere/model/MOrder.java +++ b/base/src/org/compiere/model/MOrder.java @@ -639,14 +639,14 @@ public class MOrder extends X_C_Order implements DocAction public MOrderLine[] getLines (String whereClause, String orderClause) { //red1 - using new Query class from Teo / Victor's MDDOrder.java implementation - StringBuffer whereClauseFinal = new StringBuffer(MOrderLine.COLUMNNAME_C_Order_ID+"=?"); + StringBuffer whereClauseFinal = new StringBuffer(MOrderLine.COLUMNNAME_C_Order_ID+"=? "); if (!Util.isEmpty(whereClause, true)) whereClauseFinal.append(whereClause); if (orderClause.length() == 0) orderClause = MOrderLine.COLUMNNAME_Line; // - List list = new Query(getCtx(), MOrderLine.Table_Name, whereClauseFinal.toString(), get_TrxName()) - .setParameters(new Object[]{get_ID()}) + List list = new Query(getCtx(), I_C_OrderLine.Table_Name, whereClauseFinal.toString(), get_TrxName()) + .setParameters(get_ID()) .setOrderBy(orderClause) .list(); for (MOrderLine ol : list) { @@ -731,8 +731,8 @@ public class MOrder extends X_C_Order implements DocAction if (m_taxes != null && !requery) return m_taxes; // - List list = new Query(getCtx(), MOrderTax.Table_Name, "C_Order_ID=?", get_TrxName()) - .setParameters(new Object[]{get_ID()}) + List list = new Query(getCtx(), I_C_OrderTax.Table_Name, "C_Order_ID=?", get_TrxName()) + .setParameters(get_ID()) .list(); m_taxes = list.toArray(new MOrderTax[list.size()]); return m_taxes; @@ -749,8 +749,8 @@ public class MOrder extends X_C_Order implements DocAction +" WHERE il.C_Invoice_ID=C_Invoice.C_Invoice_ID" +" AND il.C_OrderLine_ID=ol.C_OrderLine_ID" +" AND ol.C_Order_ID=?)"; - List list = new Query(getCtx(), MInvoice.Table_Name, whereClause, get_TrxName()) - .setParameters(new Object[]{get_ID()}) + List list = new Query(getCtx(), I_C_Invoice.Table_Name, whereClause, get_TrxName()) + .setParameters(get_ID()) .setOrderBy("C_Invoice_ID DESC") .list(); return list.toArray(new MInvoice[list.size()]); @@ -780,8 +780,8 @@ public class MOrder extends X_C_Order implements DocAction +" WHERE iol.M_InOut_ID=M_InOut.M_InOut_ID" +" AND iol.C_OrderLine_ID=ol.C_OrderLine_ID" +" AND ol.C_Order_ID=?)"; - List list = new Query(getCtx(), MInOut.Table_Name, whereClause, get_TrxName()) - .setParameters(new Object[]{get_ID()}) + List list = new Query(getCtx(), I_M_InOut.Table_Name, whereClause, get_TrxName()) + .setParameters(get_ID()) .setOrderBy("M_InOut_ID DESC") .list(); return list.toArray(new MInOut[list.size()]); @@ -1790,10 +1790,9 @@ public class MOrder extends X_C_Order implements DocAction } } // Manually Process Shipment - String status = shipment.completeIt(); - shipment.setDocStatus(status); - shipment.save(get_TrxName()); - if (!DOCSTATUS_Completed.equals(status)) + shipment.processIt(DocAction.ACTION_Complete); + shipment.saveEx(get_TrxName()); + if (!DOCSTATUS_Completed.equals(shipment.getDocStatus())) { m_processMsg = "@M_InOut_ID@: " + shipment.getProcessMsg(); return null; @@ -1877,11 +1876,10 @@ public class MOrder extends X_C_Order implements DocAction } } // Manually Process Invoice - String status = invoice.completeIt(); - invoice.setDocStatus(status); - invoice.save(get_TrxName()); + invoice.processIt(DocAction.ACTION_Complete); + invoice.saveEx(get_TrxName()); setC_CashLine_ID(invoice.getC_CashLine_ID()); - if (!DOCSTATUS_Completed.equals(status)) + if (!DOCSTATUS_Completed.equals(invoice.getDocStatus())) { m_processMsg = "@C_Invoice_ID@: " + invoice.getProcessMsg(); return null; diff --git a/base/src/org/compiere/model/MOrg.java b/base/src/org/compiere/model/MOrg.java index e102263840..79ae84fd2b 100644 --- a/base/src/org/compiere/model/MOrg.java +++ b/base/src/org/compiere/model/MOrg.java @@ -48,7 +48,7 @@ public class MOrg extends X_AD_Org List list = new Query(po.getCtx(), Table_Name, "AD_Client_ID=?", null) .setOrderBy(COLUMNNAME_Value) .setOnlyActiveRecords(true) - .setParameters(new Object[]{po.getAD_Client_ID()}) + .setParameters(po.getAD_Client_ID()) .list(); for (MOrg org : list) { diff --git a/base/src/org/compiere/model/MOrgInfo.java b/base/src/org/compiere/model/MOrgInfo.java index 1910178e80..88c4647c71 100644 --- a/base/src/org/compiere/model/MOrgInfo.java +++ b/base/src/org/compiere/model/MOrgInfo.java @@ -52,7 +52,7 @@ public class MOrgInfo extends X_AD_OrgInfo return retValue; } retValue = new Query(ctx, Table_Name, "AD_Org_ID=?", null) - .setParameters(new Object[]{AD_Org_ID}) + .setParameters(AD_Org_ID) .firstOnly(); if (retValue != null) { diff --git a/base/src/org/compiere/model/MPInstance.java b/base/src/org/compiere/model/MPInstance.java index 4d89e50e11..8b6160a3d5 100644 --- a/base/src/org/compiere/model/MPInstance.java +++ b/base/src/org/compiere/model/MPInstance.java @@ -21,6 +21,7 @@ import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.Timestamp; import java.util.ArrayList; +import java.util.List; import java.util.Properties; import java.util.logging.Level; @@ -39,10 +40,11 @@ import org.compiere.util.Env; */ public class MPInstance extends X_AD_PInstance { - /** - * - */ - private static final long serialVersionUID = 209806970824523840L; + + /** + * + */ + private static final long serialVersionUID = -5848424269552679604L; /** * Standard Constructor @@ -124,38 +126,12 @@ public class MPInstance extends X_AD_PInstance { if (m_parameters != null) return m_parameters; - ArrayList list = new ArrayList(); - // - String sql = "SELECT * FROM AD_PInstance_Para WHERE AD_PInstance_ID=?"; - PreparedStatement pstmt = null; - try - { - pstmt = DB.prepareStatement(sql, null); - pstmt.setInt(1, getAD_PInstance_ID()); - ResultSet rs = pstmt.executeQuery(); - while (rs.next()) - { - list.add(new MPInstancePara(getCtx(), rs, null)); - } - rs.close(); - pstmt.close(); - pstmt = null; - } - catch (Exception e) - { - log.log(Level.SEVERE, sql, e); - } - finally - { - try - { - if (pstmt != null) - pstmt.close (); - } - catch (Exception e) - {} - pstmt = null; - } + //FR: [ 2214883 ] Remove SQL code and Replace for Query - red1 + final String whereClause = "AD_PInstance_ID=?"; + List list = new Query(getCtx(), I_AD_PInstance_Para.Table_Name, whereClause, null) // @TODO: Review implications of using transaction + .setParameters(getAD_PInstance_ID()) + .list(); + // m_parameters = new MPInstancePara[list.size()]; list.toArray(m_parameters); diff --git a/base/src/org/compiere/model/MPOS.java b/base/src/org/compiere/model/MPOS.java index b405ba7d1b..556f5dfa04 100644 --- a/base/src/org/compiere/model/MPOS.java +++ b/base/src/org/compiere/model/MPOS.java @@ -64,7 +64,7 @@ public class MPOS extends X_C_POS { String whereClause = field+"=?"; List list = new Query(ctx, Table_Name, whereClause, null) - .setParameters(new Object[]{ID}) + .setParameters(ID) .setOnlyActiveRecords(true) .setOrderBy(COLUMNNAME_Name) .list(); diff --git a/base/src/org/compiere/model/MPaySelection.java b/base/src/org/compiere/model/MPaySelection.java index a683d73066..5e5fa68e2f 100644 --- a/base/src/org/compiere/model/MPaySelection.java +++ b/base/src/org/compiere/model/MPaySelection.java @@ -16,12 +16,9 @@ *****************************************************************************/ package org.compiere.model; -import java.sql.PreparedStatement; import java.sql.ResultSet; -import java.util.ArrayList; +import java.util.List; import java.util.Properties; -import java.util.logging.Level; - import org.compiere.util.DB; import org.compiere.util.Env; @@ -33,10 +30,11 @@ import org.compiere.util.Env; */ public class MPaySelection extends X_C_PaySelection { - /** - * - */ - private static final long serialVersionUID = -6521282913549455131L; + + /** + * + */ + private static final long serialVersionUID = -6521282913549455131L; /** * Default Constructor @@ -86,34 +84,13 @@ public class MPaySelection extends X_C_PaySelection set_TrxName(m_lines, get_TrxName()); return m_lines; } - ArrayList list = new ArrayList(); - String sql = "SELECT * FROM C_PaySelectionLine WHERE C_PaySelection_ID=? ORDER BY Line"; - PreparedStatement pstmt = null; - try - { - pstmt = DB.prepareStatement (sql, get_TrxName()); - pstmt.setInt (1, getC_PaySelection_ID()); - ResultSet rs = pstmt.executeQuery (); - while (rs.next ()) - list.add (new MPaySelectionLine(getCtx(), rs, get_TrxName())); - rs.close (); - pstmt.close (); - pstmt = null; - } - catch (Exception e) - { - log.log(Level.SEVERE, "getLines", e); - } - try - { - if (pstmt != null) - pstmt.close (); - pstmt = null; - } - catch (Exception e) - { - pstmt = null; - } + //FR: [ 2214883 ] Remove SQL code and Replace for Query - red1 + final String whereClause = "C_PaySelection_ID=?"; + List list = new Query(getCtx(), I_C_PaySelectionLine.Table_Name, whereClause, get_TrxName()) + .setParameters(getC_PaySelection_ID()) + .setOrderBy("Line") + .list() + ; // m_lines = new MPaySelectionLine[list.size ()]; list.toArray (m_lines); diff --git a/base/src/org/compiere/model/MPaySelectionCheck.java b/base/src/org/compiere/model/MPaySelectionCheck.java index a65e06f0e6..926df393fc 100644 --- a/base/src/org/compiere/model/MPaySelectionCheck.java +++ b/base/src/org/compiere/model/MPaySelectionCheck.java @@ -226,8 +226,9 @@ public final class MPaySelectionCheck extends X_C_PaySelectionCheck while (rs.next()) { MPaySelectionCheck check = new MPaySelectionCheck (Env.getCtx(), rs, trxName); - // Set new Check Document No - saved in confirmPrint + // Set new Check Document No check.setDocumentNo(String.valueOf(docNo++)); + check.save(); list.add(check); } rs.close(); @@ -436,7 +437,7 @@ public final class MPaySelectionCheck extends X_C_PaySelectionCheck for (int i = 0; i < checks.length; i++) { MPaySelectionCheck check = checks[i]; - MPayment payment = new MPayment(check.getCtx(), check.getC_Payment_ID(), null); + MPayment payment = new MPayment(check.getCtx(), check.getC_Payment_ID(), check.get_TrxName()); // Existing Payment if (check.getC_Payment_ID() != 0) { @@ -450,7 +451,7 @@ public final class MPaySelectionCheck extends X_C_PaySelectionCheck } else // New Payment { - payment = new MPayment(check.getCtx(), 0, null); + payment = new MPayment(check.getCtx(), 0, check.get_TrxName()); payment.setAD_Org_ID(check.getAD_Org_ID()); // if (check.getPaymentRule().equals(PAYMENTRULE_Check)) diff --git a/base/src/org/compiere/model/MPayment.java b/base/src/org/compiere/model/MPayment.java index 9745df4f2a..ab69dc1dfd 100644 --- a/base/src/org/compiere/model/MPayment.java +++ b/base/src/org/compiere/model/MPayment.java @@ -22,8 +22,8 @@ import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Timestamp; -import java.util.ArrayList; import java.util.HashMap; +import java.util.List; import java.util.Properties; import java.util.logging.Level; @@ -77,10 +77,12 @@ import org.compiere.util.ValueNamePair; public final class MPayment extends X_C_Payment implements DocAction, ProcessCall { - /** - * - */ - private static final long serialVersionUID = 5273805787122033169L; + + + /** + * + */ + private static final long serialVersionUID = 6200327948230438741L; /** * Get Payments Of BPartner @@ -91,28 +93,11 @@ public final class MPayment extends X_C_Payment */ public static MPayment[] getOfBPartner (Properties ctx, int C_BPartner_ID, String trxName) { - ArrayList list = new ArrayList(); - String sql = "SELECT * FROM C_Payment WHERE C_BPartner_ID=?"; - PreparedStatement pstmt = null; - ResultSet rs = null; - try - { - pstmt = DB.prepareStatement(sql, trxName); - pstmt.setInt(1, C_BPartner_ID); - rs = pstmt.executeQuery(); - while (rs.next()) - list.add(new MPayment(ctx,rs, trxName)); - } - catch (Exception e) - { - s_log.log(Level.SEVERE, sql, e); - } - finally - { - DB.close(rs, pstmt); - rs = null; - pstmt = null; - } + //FR: [ 2214883 ] Remove SQL code and Replace for Query - red1 + final String whereClause = "C_BPartner_ID=?"; + List list = new Query(ctx, I_C_Payment.Table_Name, whereClause, trxName) + .setParameters(C_BPartner_ID) + .list(); // MPayment[] retValue = new MPayment[list.size()]; @@ -288,6 +273,10 @@ public final class MPayment extends X_C_Payment setAccountNo(ba.getAccountNo()); setIsReceipt (X_C_Order.PAYMENTRULE_DirectDebit.equals // AR only (preparedPayment.getPaymentRule())); + if ( MPaySelectionCheck.PAYMENTRULE_DirectDebit.equals(preparedPayment.getPaymentRule()) ) + setTenderType(MPayment.TENDERTYPE_DirectDebit); + else if ( MPaySelectionCheck.PAYMENTRULE_DirectDeposit.equals(preparedPayment.getPaymentRule())) + setTenderType(MPayment.TENDERTYPE_DirectDeposit); // int check = MPaymentValidate.validateRoutingNo(getRoutingNo()).length() + MPaymentValidate.validateAccountNo(getAccountNo()).length(); @@ -1277,7 +1266,7 @@ public final class MPayment extends X_C_Payment public void setC_DocType_ID (boolean isReceipt) { setIsReceipt(isReceipt); - String sql = "SELECT C_DocType_ID FROM C_DocType WHERE AD_Client_ID=? AND DocBaseType=? ORDER BY IsDefault DESC"; + String sql = "SELECT C_DocType_ID FROM C_DocType WHERE IsActive='Y' AND AD_Client_ID=? AND DocBaseType=? ORDER BY IsDefault DESC"; PreparedStatement pstmt = null; ResultSet rs = null; try diff --git a/base/src/org/compiere/model/MPaymentAllocate.java b/base/src/org/compiere/model/MPaymentAllocate.java index af6cc3aee2..6a93168800 100644 --- a/base/src/org/compiere/model/MPaymentAllocate.java +++ b/base/src/org/compiere/model/MPaymentAllocate.java @@ -44,9 +44,9 @@ public class MPaymentAllocate extends X_C_PaymentAllocate */ public static MPaymentAllocate[] get (MPayment parent) { - final String whereClause = "C_Payment_ID=? AND IsActive=?"; + final String whereClause = "C_Payment_ID=?"; Query query = MTable.get(parent.getCtx(), Table_ID).createQuery(whereClause, parent.get_TrxName()); - query.setParameters(new Object[]{parent.getC_Payment_ID(), "Y"}); + query.setParameters(parent.getC_Payment_ID()).setOnlyActiveRecords(true); List list = query.list(); return list.toArray(new MPaymentAllocate[list.size()]); } // get diff --git a/base/src/org/compiere/model/MPeriod.java b/base/src/org/compiere/model/MPeriod.java index 4797a89b01..b68f8d60fb 100644 --- a/base/src/org/compiere/model/MPeriod.java +++ b/base/src/org/compiere/model/MPeriod.java @@ -51,12 +51,10 @@ import org.compiere.util.TimeUtil; */ public class MPeriod extends X_C_Period { - /** * */ - private static final long serialVersionUID = -4342181292848531751L; - + private static final long serialVersionUID = 6498973218391994963L; /** * Get Period from Cache @@ -515,7 +513,7 @@ public class MPeriod extends X_C_Period } if (date2.after(last)) { - log.warning ("Automatic Period Control:" + date2 + " after last day - " + first); + log.warning ("Automatic Period Control:" + date2 + " after last day - " + last); return false; } // We are OK @@ -589,9 +587,9 @@ public class MPeriod extends X_C_Period " AND (? BETWEEN StartDate AND EndDate" + " OR ? BETWEEN StartDate AND EndDate)" + " AND PeriodType=?",get_TrxName()); - query.setParameters(new Object[] {year.getC_Calendar_ID(), + query.setParameters(year.getC_Calendar_ID(), getStartDate(), getEndDate(), - getPeriodType()}); + getPeriodType()); List periods = query.list(); diff --git a/base/src/org/compiere/model/MPriceList.java b/base/src/org/compiere/model/MPriceList.java index c92a1042a6..6f8de4330f 100644 --- a/base/src/org/compiere/model/MPriceList.java +++ b/base/src/org/compiere/model/MPriceList.java @@ -16,7 +16,6 @@ *****************************************************************************/ package org.compiere.model; -import java.math.BigDecimal; import java.sql.ResultSet; import java.sql.Timestamp; import java.util.Iterator; @@ -39,8 +38,7 @@ public class MPriceList extends X_M_PriceList /** * */ - private static final long serialVersionUID = 221716795566010352L; - + private static final long serialVersionUID = -5096935348390226068L; /** * Get Price List (cached) @@ -87,7 +85,8 @@ public class MPriceList extends X_M_PriceList // Get from DB final String whereClause = "AD_Client_ID=? AND IsDefault=? AND IsSOPriceList=?"; retValue = new Query(ctx, Table_Name, whereClause, null) - .setParameters(new Object[]{AD_Client_ID, "Y", IsSOPriceList ? "Y" : "N"}) + .setParameters(AD_Client_ID, "Y", IsSOPriceList ? "Y" : "N") + .setOnlyActiveRecords(true) .setOrderBy("M_PriceList_ID") .first(); @@ -134,7 +133,8 @@ public class MPriceList extends X_M_PriceList // Get from DB final String whereClause = "AD_Client_ID=? AND IsDefault=? AND IsSOPriceList=? AND C_Currency_ID=?"; retValue = new Query(ctx, Table_Name, whereClause, null) - .setParameters(new Object[]{AD_Client_ID, "Y", IsSOPriceList ? "Y" : "N", Integer.valueOf(M_Currency_ID)}) + .setParameters(AD_Client_ID, "Y", IsSOPriceList ? "Y" : "N", M_Currency_ID) + .setOnlyActiveRecords(true) .setOrderBy("M_PriceList_ID") .first(); @@ -243,9 +243,10 @@ public class MPriceList extends X_M_PriceList if (m_plv != null && m_plv.getValidFrom().before(valid)) return m_plv; - final String whereClause = "M_PriceList_ID=? AND TRUNC(ValidFrom)<=? AND IsActive=?"; - m_plv = new Query(getCtx(), MPriceListVersion.Table_Name, whereClause, get_TrxName()) - .setParameters(new Object[]{getM_PriceList_ID(), valid, "Y"}) + final String whereClause = "M_PriceList_ID=? AND TRUNC(ValidFrom)<=?"; + m_plv = new Query(getCtx(), I_M_PriceList_Version.Table_Name, whereClause, get_TrxName()) + .setParameters(getM_PriceList_ID(), valid) + .setOnlyActiveRecords(true) .setOrderBy("ValidFrom DESC") .first(); if (m_plv == null) diff --git a/base/src/org/compiere/model/MProcess.java b/base/src/org/compiere/model/MProcess.java index 122c53e22b..a6700bead3 100644 --- a/base/src/org/compiere/model/MProcess.java +++ b/base/src/org/compiere/model/MProcess.java @@ -26,6 +26,7 @@ import org.compiere.process.ProcessInfo; import org.compiere.util.CCache; import org.compiere.util.DB; import org.compiere.util.Trx; +import org.compiere.wf.MWFNode; /** * Process Model @@ -71,10 +72,10 @@ public class MProcess extends X_AD_Process */ public static MProcess getFromMenu (Properties ctx, int AD_Menu_ID) { - String whereClause = "EXISTS (SELECT 1 FROM AD_Menu m" + final String whereClause = "EXISTS (SELECT 1 FROM AD_Menu m" +" WHERE m.AD_Process_ID=AD_Process.AD_Process_ID AND m.AD_Menu_ID=?)"; - MProcess p = new Query(ctx, MProcess.Table_Name, whereClause, null) - .setParameters(new Object[]{AD_Menu_ID}) + MProcess p = new Query(ctx, I_AD_Process.Table_Name, whereClause, null) + .setParameters(AD_Menu_ID) .firstOnly(); if (p != null) { @@ -133,9 +134,9 @@ public class MProcess extends X_AD_Process if (m_parameters != null) return m_parameters; // - String whereClause = MProcessPara.COLUMNNAME_AD_Process_ID+"=?"; - List list = new Query(getCtx(), MProcessPara.Table_Name, whereClause, get_TrxName()) - .setParameters(new Object[]{get_ID()}) + final String whereClause = MProcessPara.COLUMNNAME_AD_Process_ID+"=?"; + List list = new Query(getCtx(), I_AD_Process_Para.Table_Name, whereClause, get_TrxName()) + .setParameters(get_ID()) .setOrderBy(MProcessPara.COLUMNNAME_SeqNo) .list(); // @@ -372,7 +373,7 @@ public class MProcess extends X_AD_Process menues[i].setDescription(getDescription()); menues[i].saveEx(); } - X_AD_WF_Node[] nodes = MWindow.getWFNodes(getCtx(), "AD_Process_ID=" + getAD_Process_ID(), get_TrxName()); + MWFNode[] nodes = MWindow.getWFNodes(getCtx(), "AD_Process_ID=" + getAD_Process_ID(), get_TrxName()); for (int i = 0; i < nodes.length; i++) { boolean changed = false; diff --git a/base/src/org/compiere/model/MProduct.java b/base/src/org/compiere/model/MProduct.java index cc3d4bbec8..72134f20d1 100644 --- a/base/src/org/compiere/model/MProduct.java +++ b/base/src/org/compiere/model/MProduct.java @@ -86,9 +86,8 @@ public class MProduct extends X_M_Product */ public static MProduct[] get (Properties ctx, String whereClause, String trxName) { - int AD_Client_ID = Env.getAD_Client_ID(ctx); - List list = new Query(ctx, Table_Name, "AD_Client_ID=? AND "+whereClause, trxName) - .setParameters(new Object[]{AD_Client_ID}) + List list = new Query(ctx, Table_Name, whereClause, trxName) + .setClient_ID() .list(); return list.toArray(new MProduct[list.size()]); } // get @@ -102,9 +101,9 @@ public class MProduct extends X_M_Product */ public static List getByUPC(Properties ctx, String upc, String trxName) { - String whereClause = "AD_Client_ID=? AND UPC=?"; + final String whereClause = "UPC=?"; Query q = new Query(ctx, Table_Name, whereClause, trxName); - q.setParameters(new Object[]{Env.getAD_Client_ID(ctx), upc}); + q.setParameters(upc).setClient_ID(); return(q.list()); } @@ -533,10 +532,10 @@ public class MProduct extends X_M_Product if (m_downloads != null && !requery) return m_downloads; // - List list = new Query(getCtx(), MProductDownload.Table_Name, "M_Product_ID=?", get_TrxName()) + List list = new Query(getCtx(), I_M_ProductDownload.Table_Name, "M_Product_ID=?", get_TrxName()) .setOnlyActiveRecords(true) - .setOrderBy(MProductDownload.COLUMNNAME_Name) - .setParameters(new Object[]{get_ID()}) + .setOrderBy(I_M_ProductDownload.COLUMNNAME_Name) + .setParameters(get_ID()) .list(); m_downloads = list.toArray(new MProductDownload[list.size()]); return m_downloads; @@ -610,6 +609,21 @@ public class MProduct extends X_M_Product if (m_precision != null && is_ValueChanged("C_UOM_ID")) m_precision = null; + // AttributeSetInstance reset + if (is_ValueChanged(COLUMNNAME_M_AttributeSet_ID)) + { + MAttributeSetInstance asi = new MAttributeSetInstance(getCtx(), getM_AttributeSetInstance_ID(), get_TrxName()); + setM_AttributeSetInstance_ID(0); + // Delete the old m_attributesetinstance + try { + asi.deleteEx(true, get_TrxName()); + } catch (AdempiereException ex) + { + log.saveError("Error", "Error deleting the AttributeSetInstance"); + return false; + } + } + return true; } // beforeSave @@ -631,10 +645,10 @@ public class MProduct extends X_M_Product } //check if it has cost - boolean hasCosts = new Query(getCtx(), MCostDetail.Table_Name, - MCostDetail.COLUMNNAME_M_Product_ID+"=?", get_TrxName()) + boolean hasCosts = new Query(getCtx(), I_M_CostDetail.Table_Name, + I_M_CostDetail.COLUMNNAME_M_Product_ID+"=?", get_TrxName()) .setOnlyActiveRecords(true) - .setParameters(new Object[]{get_ID()}) + .setParameters(get_ID()) .match(); if (hasCosts) { diff --git a/base/src/org/compiere/model/MProductBOM.java b/base/src/org/compiere/model/MProductBOM.java index fae68f4e83..dbe0b8ccca 100644 --- a/base/src/org/compiere/model/MProductBOM.java +++ b/base/src/org/compiere/model/MProductBOM.java @@ -16,14 +16,11 @@ *****************************************************************************/ package org.compiere.model; -import java.sql.PreparedStatement; import java.sql.ResultSet; -import java.util.ArrayList; +import java.util.List; import java.util.Properties; -import java.util.logging.Level; import org.compiere.util.CLogger; -import org.compiere.util.DB; import org.compiere.util.Env; /** @@ -62,35 +59,13 @@ public class MProductBOM extends X_M_Product_BOM */ public static MProductBOM[] getBOMLines (Properties ctx, int M_Product_ID, String trxName) { - String sql = "SELECT * FROM M_Product_BOM WHERE M_Product_ID=? ORDER BY Line"; - ArrayList list = new ArrayList(); - PreparedStatement pstmt = null; - try - { - pstmt = DB.prepareStatement(sql, trxName); - pstmt.setInt(1, M_Product_ID); - ResultSet rs = pstmt.executeQuery(); - while (rs.next()) - list.add(new MProductBOM (ctx, rs, trxName)); - rs.close(); - pstmt.close(); - pstmt = null; - } - catch (Exception e) - { - s_log.log(Level.SEVERE, sql, e); - } - try - { - if (pstmt != null) - pstmt.close(); - pstmt = null; - } - catch (Exception e) - { - pstmt = null; - } - // + //FR: [ 2214883 ] Remove SQL code and Replace for Query - red1 + final String whereClause = "M_Product_ID=?"; + List list = new Query(ctx, I_M_Product_BOM.Table_Name, whereClause, trxName) + .setParameters(M_Product_ID) + .setOrderBy("Line") + .list(); + // s_log.fine("getBOMLines - #" + list.size() + " - M_Product_ID=" + M_Product_ID); MProductBOM[] retValue = new MProductBOM[list.size()]; list.toArray(retValue); diff --git a/base/src/org/compiere/model/MProductCategoryAcct.java b/base/src/org/compiere/model/MProductCategoryAcct.java index 2a993a74a7..594b7567aa 100644 --- a/base/src/org/compiere/model/MProductCategoryAcct.java +++ b/base/src/org/compiere/model/MProductCategoryAcct.java @@ -54,7 +54,7 @@ public class MProductCategoryAcct extends X_M_Product_Category_Acct final String whereClause = "M_Product_Category_ID=? AND C_AcctSchema_ID=?"; acct = new Query(ctx, Table_Name, whereClause, trxName) - .setParameters(new Object[]{M_Product_Category_ID, C_AcctSchema_ID}) + .setParameters(M_Product_Category_ID, C_AcctSchema_ID) .firstOnly(); if (acct != null) { diff --git a/base/src/org/compiere/model/MProductCosting.java b/base/src/org/compiere/model/MProductCosting.java index 773a488f31..1940ea87aa 100644 --- a/base/src/org/compiere/model/MProductCosting.java +++ b/base/src/org/compiere/model/MProductCosting.java @@ -34,8 +34,7 @@ public class MProductCosting extends X_M_Product_Costing /** * */ - private static final long serialVersionUID = -7980130899951986948L; - + private static final long serialVersionUID = 5563448335633481151L; /** * Get Costing Of Product @@ -46,10 +45,10 @@ public class MProductCosting extends X_M_Product_Costing */ public static MProductCosting[] getOfProduct (Properties ctx, int M_Product_ID, String trxName) { - String whereClause = "M_Product_ID=?"; + final String whereClause = "M_Product_ID=?"; - List costs =new Query(ctx, MProductCosting.Table_Name,whereClause, trxName ) - .setParameters(new Object[]{M_Product_ID}) + List costs =new Query(ctx, I_M_Product_Costing.Table_Name,whereClause, trxName ) + .setParameters(M_Product_ID) .list(); return costs.toArray(new MProductCosting[costs.size()]); } // getOfProduct @@ -65,10 +64,10 @@ public class MProductCosting extends X_M_Product_Costing public static MProductCosting get (Properties ctx, int M_Product_ID, int C_AcctSchema_ID, String trxName) { - String whereClause = "M_Product_ID=? AND C_AcctSchema_ID=?"; + final String whereClause = "M_Product_ID=? AND C_AcctSchema_ID=?"; - return new Query(ctx, MProductCosting.Table_Name,whereClause, trxName ) - .setParameters(new Object[]{M_Product_ID, C_AcctSchema_ID}) + return new Query(ctx, I_M_Product_Costing.Table_Name,whereClause, trxName ) + .setParameters(M_Product_ID, C_AcctSchema_ID) .firstOnly(); } // get diff --git a/base/src/org/compiere/model/MProductPO.java b/base/src/org/compiere/model/MProductPO.java index 76837c59c3..dde9a5356b 100644 --- a/base/src/org/compiere/model/MProductPO.java +++ b/base/src/org/compiere/model/MProductPO.java @@ -43,9 +43,10 @@ public class MProductPO extends X_M_Product_PO */ public static MProductPO[] getOfProduct (Properties ctx, int M_Product_ID, String trxName) { - final String whereClause = "M_Product_ID=? AND IsActive=?"; + final String whereClause = "M_Product_ID=?"; List list = new Query(ctx, Table_Name, whereClause, trxName) - .setParameters(new Object[]{M_Product_ID, "Y"}) + .setParameters(M_Product_ID) + .setOnlyActiveRecords(true) .setOrderBy("IsCurrentVendor DESC") .list(); return list.toArray(new MProductPO[list.size()]); diff --git a/base/src/org/compiere/model/MProductPrice.java b/base/src/org/compiere/model/MProductPrice.java index 009e231725..e35bef4eb9 100644 --- a/base/src/org/compiere/model/MProductPrice.java +++ b/base/src/org/compiere/model/MProductPrice.java @@ -17,13 +17,10 @@ package org.compiere.model; import java.math.BigDecimal; -import java.sql.PreparedStatement; import java.sql.ResultSet; import java.util.Properties; -import java.util.logging.Level; import org.compiere.util.CLogger; -import org.compiere.util.DB; import org.compiere.util.Env; /** @@ -34,7 +31,6 @@ import org.compiere.util.Env; */ public class MProductPrice extends X_M_ProductPrice { - /** * */ @@ -51,37 +47,10 @@ public class MProductPrice extends X_M_ProductPrice public static MProductPrice get (Properties ctx, int M_PriceList_Version_ID, int M_Product_ID, String trxName) { - MProductPrice retValue = null; - String sql = "SELECT * FROM M_ProductPrice WHERE M_PriceList_Version_ID=? AND M_Product_ID=?"; - PreparedStatement pstmt = null; - try - { - pstmt = DB.prepareStatement (sql, trxName); - pstmt.setInt (1, M_PriceList_Version_ID); - pstmt.setInt (2, M_Product_ID); - ResultSet rs = pstmt.executeQuery (); - if (rs.next ()) - { - retValue = new MProductPrice (ctx, rs, trxName); - } - rs.close (); - pstmt.close (); - pstmt = null; - } - catch (Exception e) - { - s_log.log (Level.SEVERE, sql, e); - } - try - { - if (pstmt != null) - pstmt.close (); - pstmt = null; - } - catch (Exception e) - { - pstmt = null; - } + final String whereClause = MProductPrice.COLUMNNAME_M_PriceList_Version_ID +"=? AND "+MProductPrice.COLUMNNAME_M_Product_ID+"=?"; + MProductPrice retValue = new Query(ctx,I_M_ProductPrice.Table_Name, whereClause, trxName) + .setParameters(M_PriceList_Version_ID, M_Product_ID) + .first(); return retValue; } // get diff --git a/base/src/org/compiere/model/MProductPricing.java b/base/src/org/compiere/model/MProductPricing.java index 6f77e6b9cc..163d48896b 100644 --- a/base/src/org/compiere/model/MProductPricing.java +++ b/base/src/org/compiere/model/MProductPricing.java @@ -716,31 +716,13 @@ public class MProductPricing { if (m_M_Product_ID == 0) return; - // - String sql = "SELECT C_UOM_ID, M_Product_Category_ID FROM M_Product WHERE M_Product_ID=?"; - PreparedStatement pstmt = null; - ResultSet rs = null; - try - { - pstmt = DB.prepareStatement(sql, null); - pstmt.setInt(1, m_M_Product_ID); - rs = pstmt.executeQuery(); - if (rs.next()) - { - m_C_UOM_ID = rs.getInt (1); - m_M_Product_Category_ID = rs.getInt(2); - } - } - catch (Exception e) - { - log.log(Level.SEVERE, sql, e); - } - finally - { - DB.close(rs, pstmt); - rs = null; - pstmt = null; + + MProduct product = MProduct.get(Env.getCtx(), m_M_Product_ID); + if (product != null) { + m_C_UOM_ID = product.getC_UOM_ID(); + m_M_Product_Category_ID = product.getM_Product_Category_ID(); } + } // setBaseInfo /** diff --git a/base/src/org/compiere/model/MProject.java b/base/src/org/compiere/model/MProject.java index f42309ac3a..984dfe4ed5 100644 --- a/base/src/org/compiere/model/MProject.java +++ b/base/src/org/compiere/model/MProject.java @@ -16,11 +16,9 @@ *****************************************************************************/ package org.compiere.model; -import java.sql.PreparedStatement; import java.sql.ResultSet; -import java.sql.SQLException; import java.sql.Timestamp; -import java.util.ArrayList; +import java.util.List; import java.util.Properties; import java.util.logging.Level; @@ -35,10 +33,11 @@ import org.compiere.util.Env; */ public class MProject extends X_C_Project { - /** - * - */ - private static final long serialVersionUID = -1781787100948563589L; + + /** + * + */ + private static final long serialVersionUID = -1781787100948563589L; /** * Create new Project by copying @@ -204,33 +203,12 @@ public class MProject extends X_C_Project */ public MProjectLine[] getLines() { - ArrayList list = new ArrayList(); - String sql = "SELECT * FROM C_ProjectLine WHERE C_Project_ID=? ORDER BY Line"; - PreparedStatement pstmt = null; - try - { - pstmt = DB.prepareStatement(sql, get_TrxName()); - pstmt.setInt(1, getC_Project_ID()); - ResultSet rs = pstmt.executeQuery(); - while (rs.next()) - list.add(new MProjectLine (getCtx(), rs, get_TrxName())); - rs.close(); - pstmt.close(); - pstmt = null; - } - catch (SQLException ex) - { - log.log(Level.SEVERE, sql, ex); - } - try - { - if (pstmt != null) - pstmt.close(); - } - catch (SQLException ex1) - { - } - pstmt = null; + //FR: [ 2214883 ] Remove SQL code and Replace for Query - red1 + final String whereClause = "C_Project_ID=?"; + List list = new Query(getCtx(), I_C_ProjectLine.Table_Name, whereClause, get_TrxName()) + .setParameters(getC_Project_ID()) + .setOrderBy("Line") + .list(); // MProjectLine[] retValue = new MProjectLine[list.size()]; list.toArray(retValue); @@ -243,33 +221,12 @@ public class MProject extends X_C_Project */ public MProjectIssue[] getIssues() { - ArrayList list = new ArrayList(); - String sql = "SELECT * FROM C_ProjectIssue WHERE C_Project_ID=? ORDER BY Line"; - PreparedStatement pstmt = null; - try - { - pstmt = DB.prepareStatement(sql, get_TrxName()); - pstmt.setInt(1, getC_Project_ID()); - ResultSet rs = pstmt.executeQuery(); - while (rs.next()) - list.add(new MProjectIssue (getCtx(), rs, get_TrxName())); - rs.close(); - pstmt.close(); - pstmt = null; - } - catch (SQLException ex) - { - log.log(Level.SEVERE, sql, ex); - } - try - { - if (pstmt != null) - pstmt.close(); - } - catch (SQLException ex1) - { - } - pstmt = null; + //FR: [ 2214883 ] Remove SQL code and Replace for Query - red1 + String whereClause = "C_Project_ID=?"; + List list = new Query(getCtx(), I_C_ProjectIssue.Table_Name, whereClause, get_TrxName()) + .setParameters(getC_Project_ID()) + .setOrderBy("Line") + .list(); // MProjectIssue[] retValue = new MProjectIssue[list.size()]; list.toArray(retValue); @@ -282,33 +239,12 @@ public class MProject extends X_C_Project */ public MProjectPhase[] getPhases() { - ArrayList list = new ArrayList(); - String sql = "SELECT * FROM C_ProjectPhase WHERE C_Project_ID=? ORDER BY SeqNo"; - PreparedStatement pstmt = null; - try - { - pstmt = DB.prepareStatement(sql, get_TrxName()); - pstmt.setInt(1, getC_Project_ID()); - ResultSet rs = pstmt.executeQuery(); - while (rs.next()) - list.add(new MProjectPhase (getCtx(), rs, get_TrxName())); - rs.close(); - pstmt.close(); - pstmt = null; - } - catch (SQLException ex) - { - log.log(Level.SEVERE, sql, ex); - } - try - { - if (pstmt != null) - pstmt.close(); - } - catch (SQLException ex1) - { - } - pstmt = null; + //FR: [ 2214883 ] Remove SQL code and Replace for Query - red1 + String whereClause = "C_Project_ID=?"; + List list = new Query(getCtx(), I_C_ProjectPhase.Table_Name, whereClause, get_TrxName()) + .setParameters(getC_Project_ID()) + .setOrderBy("SeqNo") + .list(); // MProjectPhase[] retValue = new MProjectPhase[list.size()]; list.toArray(retValue); diff --git a/base/src/org/compiere/model/MQuery.java b/base/src/org/compiere/model/MQuery.java index e2b02ff18d..a6b91173e0 100644 --- a/base/src/org/compiere/model/MQuery.java +++ b/base/src/org/compiere/model/MQuery.java @@ -40,7 +40,7 @@ import org.compiere.util.ValueNamePair; * @version $Id: MQuery.java,v 1.4 2006/07/30 00:58:04 jjanke Exp $ * * @author Teo Sarca - *
  • BF [ 2860022 ] MQuery.get() is generating restictions for unexisting column + *
  • BF [ 2860022 ] MQuery.get() is generating restrictions for non-existent column * https://sourceforge.net/tracker/?func=detail&aid=2860022&group_id=176962&atid=879332 */ public class MQuery implements Serializable @@ -298,7 +298,7 @@ public class MQuery implements Serializable * Creates columnName=value * @param columnName columnName * @param value value - * @return quary + * @return query */ public static MQuery getEqualQuery (String columnName, int value) { @@ -357,7 +357,7 @@ public class MQuery implements Serializable } // MQuery /** Serialization Info **/ - private static final long serialVersionUID = 4883859385509199305L; + private static final long serialVersionUID = 4883859385509199306L; /** Table Name */ private String m_TableName = ""; @@ -403,6 +403,8 @@ public class MQuery implements Serializable public static final int EQUAL_INDEX = 0; /** Not Equal */ public static final String NOT_EQUAL = "!="; + /** Not Equal - 1 */ + public static final int NOT_EQUAL_INDEX = 1; /** Like */ public static final String LIKE = " LIKE "; /** Not Like */ @@ -442,6 +444,23 @@ public class MQuery implements Serializable new ValueNamePair (EQUAL, " = ") }; + /************************************************************************* + * Add Restriction + * @param ColumnName ColumnName + * @param Operator Operator, e.g. = != .. + * @param Code Code, e.g 0, All% + * @param InfoName Display Name + * @param InfoDisplay Display of Code (Lookup) + * @param andCondition true=and, false=or + * @param depth ( = no open brackets ) + */ + public void addRestriction (String ColumnName, String Operator, + Object Code, String InfoName, String InfoDisplay, boolean andCondition, int depth) + { + Restriction r = new Restriction (ColumnName, Operator, + Code, InfoName, InfoDisplay, andCondition, depth); + m_list.add(r); + } // addRestriction /************************************************************************* * Add Restriction @@ -455,7 +474,7 @@ public class MQuery implements Serializable Object Code, String InfoName, String InfoDisplay) { Restriction r = new Restriction (ColumnName, Operator, - Code, InfoName, InfoDisplay); + Code, InfoName, InfoDisplay, true, 0); m_list.add(r); } // addRestriction @@ -469,7 +488,7 @@ public class MQuery implements Serializable Object Code) { Restriction r = new Restriction (ColumnName, Operator, - Code, null, null); + Code, null, null, true, 0); m_list.add(r); } // addRestriction @@ -483,10 +502,30 @@ public class MQuery implements Serializable int Code) { Restriction r = new Restriction (ColumnName, Operator, - new Integer(Code), null, null); + new Integer(Code), null, null, true, 0); m_list.add(r); } // addRestriction + /** + * Add Range Restriction (BETWEEN) + * @param ColumnName ColumnName + * @param Code Code, e.g 0, All% + * @param Code_to Code, e.g 0, All% + * @param InfoName Display Name + * @param InfoDisplay Display of Code (Lookup) + * @param InfoDisplay_to Display of Code (Lookup) + * @param andCondition true=and, false=or + * @param depth ( = no open brackets ) + */ + public void addRangeRestriction (String ColumnName, + Object Code, Object Code_to, + String InfoName, String InfoDisplay, String InfoDisplay_to, boolean andCondition, int depth) + { + Restriction r = new Restriction (ColumnName, Code, Code_to, + InfoName, InfoDisplay, InfoDisplay_to, andCondition, depth); + m_list.add(r); + } // addRestriction + /** * Add Range Restriction (BETWEEN) * @param ColumnName ColumnName @@ -501,7 +540,7 @@ public class MQuery implements Serializable String InfoName, String InfoDisplay, String InfoDisplay_to) { Restriction r = new Restriction (ColumnName, Code, Code_to, - InfoName, InfoDisplay, InfoDisplay_to); + InfoName, InfoDisplay, InfoDisplay_to, true, 0); m_list.add(r); } // addRestriction @@ -515,7 +554,7 @@ public class MQuery implements Serializable Object Code, Object Code_to) { Restriction r = new Restriction (ColumnName, Code, Code_to, - null, null, null); + null, null, null, true, 0); m_list.add(r); } // addRestriction @@ -528,6 +567,18 @@ public class MQuery implements Serializable m_list.add(r); } // addRestriction + /** + * Add Restriction + * @param whereClause SQL WHERE clause + */ + public void addRestriction (String whereClause, boolean andCondition, int joinDepth) + { + if (whereClause == null || whereClause.trim().length() == 0) + return; + Restriction r = new Restriction (whereClause, andCondition, joinDepth); + m_list.add(r); + m_newRecord = whereClause.equals(NEWRECORD); + } // addRestriction /** * Add Restriction * @param whereClause SQL WHERE clause @@ -536,14 +587,14 @@ public class MQuery implements Serializable { if (whereClause == null || whereClause.trim().length() == 0) return; - Restriction r = new Restriction (whereClause); + Restriction r = new Restriction (whereClause, true, 0); m_list.add(r); m_newRecord = whereClause.equals(NEWRECORD); } // addRestriction /** * New Record Query - * @return true if new nercord query + * @return true if new record query */ public boolean isNewRecordQuery() { @@ -566,21 +617,39 @@ public class MQuery implements Serializable */ public String getWhereClause (boolean fullyQualified) { + int currentDepth = 0; boolean qualified = fullyQualified; if (qualified && (m_TableName == null || m_TableName.length() == 0)) qualified = false; // StringBuffer sb = new StringBuffer(); + sb.append('('); for (int i = 0; i < m_list.size(); i++) { Restriction r = (Restriction)m_list.get(i); if (i != 0) sb.append(r.andCondition ? " AND " : " OR "); + for ( ; currentDepth < r.joinDepth; currentDepth++ ) + { + sb.append('('); + } if (qualified) sb.append(r.getSQL(m_TableName)); else sb.append(r.getSQL(null)); + + for ( ; currentDepth > r.joinDepth; currentDepth-- ) + { + sb.append(')'); + } } + + // close brackets + for ( ; currentDepth > 0; currentDepth-- ) + { + sb.append(')'); + } + sb.append(')'); return sb.toString(); } // getWhereClause @@ -591,12 +660,21 @@ public class MQuery implements Serializable public String getInfo () { StringBuffer sb = new StringBuffer(); + int currentDepth = 0; if (m_TableName != null) sb.append(m_TableName).append(": "); // for (int i = 0; i < m_list.size(); i++) { Restriction r = (Restriction)m_list.get(i); + for ( ; currentDepth < r.joinDepth; currentDepth++ ) + { + sb.append('('); + } + for ( ; currentDepth > r.joinDepth; currentDepth-- ) + { + sb.append(')'); + } if (i != 0) sb.append(r.andCondition ? " AND " : " OR "); // @@ -604,6 +682,11 @@ public class MQuery implements Serializable .append(r.getInfoOperator()) .append(r.getInfoDisplayAll()); } + // close brackets + for ( ; currentDepth > 0; currentDepth-- ) + { + sb.append(')'); + } return sb.toString(); } // getInfo @@ -627,7 +710,7 @@ public class MQuery implements Serializable /** * Get Restriction Count - * @return number of restricctions + * @return number of restrictions */ public int getRestrictionCount() { @@ -636,7 +719,7 @@ public class MQuery implements Serializable /** * Is Query Active - * @return true if number of restricctions > 0 + * @return true if number of restrictions > 0 */ public boolean isActive() { @@ -884,7 +967,7 @@ class Restriction implements Serializable /** * */ - private static final long serialVersionUID = -4521978087587321242L; + private static final long serialVersionUID = -4521978087587321243L; /** * Restriction @@ -895,13 +978,18 @@ class Restriction implements Serializable * @param infoDisplay Display of Code (Lookup) */ Restriction (String columnName, String operator, - Object code, String infoName, String infoDisplay) + Object code, String infoName, String infoDisplay, boolean andCondition, int depth) { this.ColumnName = columnName.trim(); if (infoName != null) InfoName = infoName; else InfoName = ColumnName; + + + this.andCondition = andCondition; + this.joinDepth = depth < 0 ? 0 : depth; + // this.Operator = operator; // Boolean @@ -938,9 +1026,9 @@ class Restriction implements Serializable */ Restriction (String columnName, Object code, Object code_to, - String infoName, String infoDisplay, String infoDisplay_to) + String infoName, String infoDisplay, String infoDisplay_to, boolean andCondition, int depth) { - this (columnName, MQuery.BETWEEN, code, infoName, infoDisplay); + this (columnName, MQuery.BETWEEN, code, infoName, infoDisplay, andCondition, depth); // Code_to Code_to = code_to; @@ -959,16 +1047,18 @@ class Restriction implements Serializable } // Restriction /** - * Create Restriction with dircet WHERE clause + * Create Restriction with direct WHERE clause * @param whereClause SQL WHERE Clause */ - Restriction (String whereClause) + Restriction (String whereClause, boolean andCondition, int depth) { - DircetWhereClause = whereClause; + DirectWhereClause = whereClause; + this.andCondition = andCondition; + this.joinDepth = depth; } // Restriction /** Direct Where Clause */ - protected String DircetWhereClause = null; + protected String DirectWhereClause = null; /** Column Name */ protected String ColumnName; /** Name */ @@ -985,6 +1075,8 @@ class Restriction implements Serializable protected String InfoDisplay_to; /** And/Or Condition */ protected boolean andCondition = true; + /** And/Or condition nesting depth ( = number of open brackets at and/or) */ + protected int joinDepth = 0; /** * Return SQL construct for this restriction @@ -993,8 +1085,8 @@ class Restriction implements Serializable */ public String getSQL (String tableName) { - if (DircetWhereClause != null) - return DircetWhereClause; + if (DirectWhereClause != null) + return DirectWhereClause; // StringBuffer sb = new StringBuffer(); if (tableName != null && tableName.length() > 0) diff --git a/base/src/org/compiere/model/MRMA.java b/base/src/org/compiere/model/MRMA.java index 4f553f713b..986c1730a5 100644 --- a/base/src/org/compiere/model/MRMA.java +++ b/base/src/org/compiere/model/MRMA.java @@ -95,8 +95,8 @@ public class MRMA extends X_M_RMA implements DocAction set_TrxName(m_lines, get_TrxName()); return m_lines; } - List list = new Query(getCtx(), MRMALine.Table_Name, "M_RMA_ID=?", get_TrxName()) - .setParameters(new Object[]{getM_RMA_ID()}) + List list = new Query(getCtx(), I_M_RMALine.Table_Name, "M_RMA_ID=?", get_TrxName()) + .setParameters(getM_RMA_ID()) .setOrderBy(MRMALine.COLUMNNAME_Line) .list(); diff --git a/base/src/org/compiere/model/MRMALine.java b/base/src/org/compiere/model/MRMALine.java index fb50495aed..f763b8cdf0 100644 --- a/base/src/org/compiere/model/MRMALine.java +++ b/base/src/org/compiere/model/MRMALine.java @@ -168,8 +168,8 @@ public class MRMALine extends X_M_RMALine */ private int getInvoiceLineId() { - int invoiceLine_ID = new Query(getCtx(), MInvoiceLine.Table_Name, "M_InOutLine_ID=?", get_TrxName()) - .setParameters(new Object[]{getM_InOutLine_ID()}) + int invoiceLine_ID = new Query(getCtx(), I_C_InvoiceLine.Table_Name, "M_InOutLine_ID=?", get_TrxName()) + .setParameters(getM_InOutLine_ID()) .firstIdOnly(); return invoiceLine_ID <= 0 ? 0 : invoiceLine_ID; } diff --git a/base/src/org/compiere/model/MRefList.java b/base/src/org/compiere/model/MRefList.java index d7e9f0e9bf..5ad9de57b8 100644 --- a/base/src/org/compiere/model/MRefList.java +++ b/base/src/org/compiere/model/MRefList.java @@ -58,7 +58,7 @@ public class MRefList extends X_AD_Ref_List public static MRefList get (Properties ctx, int AD_Reference_ID, String Value, String trxName) { return new Query(ctx, Table_Name, "AD_Reference_ID=? AND Value=?", trxName) - .setParameters(new Object[]{AD_Reference_ID, Value}) + .setParameters(AD_Reference_ID, Value) .firstOnly(); } // get diff --git a/base/src/org/compiere/model/MReplenish.java b/base/src/org/compiere/model/MReplenish.java index eee90d9b4d..7f50fabc8f 100644 --- a/base/src/org/compiere/model/MReplenish.java +++ b/base/src/org/compiere/model/MReplenish.java @@ -78,9 +78,10 @@ public class MReplenish extends X_M_Replenish { * @return A list of active replenish lines for given product. */ public static List getForProduct(Properties ctx, int M_ProductID, String trxName) { - String whereClause= "M_Product_ID=? AND AD_Client_ID=? AND AD_Org_ID IN (0, ?) "; - return new Query(ctx, MReplenish.Table_Name, whereClause, trxName) - .setParameters(new Object[]{M_ProductID, Env.getAD_Client_ID(ctx), Env.getAD_Org_ID(ctx)}) + final String whereClause= "M_Product_ID=? AND AD_Org_ID IN (0, ?) "; + return new Query(ctx, I_M_Replenish.Table_Name, whereClause, trxName) + .setParameters(M_ProductID, Env.getAD_Org_ID(ctx)) + .setClient_ID() .setOrderBy("AD_Org_ID") .setOnlyActiveRecords(true) .list(); diff --git a/base/src/org/compiere/model/MReplicationStrategy.java b/base/src/org/compiere/model/MReplicationStrategy.java index 005edbe44d..1f4ee365a7 100644 --- a/base/src/org/compiere/model/MReplicationStrategy.java +++ b/base/src/org/compiere/model/MReplicationStrategy.java @@ -17,7 +17,7 @@ package org.compiere.model; -import java.util.Collection; +import java.util.List; import java.util.Properties; import org.compiere.util.CLogger; @@ -27,12 +27,15 @@ import org.compiere.util.CLogger; * @author victor.perez@e-evolution.com, e-Evolution *
  • BF2875989 Deactivate replication records are include to replication *
  • https://sourceforge.net/tracker/?func=detail&aid=2875989&group_id=176962&atid=879332 + *
  • BF2947615 The document recplicacion not working + *
  • https://sourceforge.net/tracker/?func=detail&aid=2947615&group_id=176962&atid=879332 */ public class MReplicationStrategy extends X_AD_ReplicationStrategy { - /** - * - */ - private static final long serialVersionUID = 1921892820183119329L; + + /** + * + */ + private static final long serialVersionUID = -3017484140206284805L; public static final int REPLICATION_TABLE =0; public static final int REPLICATION_DOCUMENT =1; @@ -52,12 +55,13 @@ public class MReplicationStrategy extends X_AD_ReplicationStrategy { } /** - * @return the collection the X_AD_ReplicationTable + * @return the list the X_AD_ReplicationTable */ - public Collection getReplicationTables() { - String whereClause = new StringBuffer(X_AD_ReplicationTable.COLUMNNAME_AD_ReplicationStrategy_ID)+"=?"; // #1 - return new Query(getCtx(), X_AD_ReplicationTable.Table_Name, whereClause, get_TrxName()) - .setParameters(new Object[]{getAD_ReplicationStrategy_ID()}) + public List getReplicationTables() { + final String whereClause = I_AD_ReplicationTable.COLUMNNAME_AD_ReplicationStrategy_ID+"=?"; // #1 + return new Query(getCtx(), I_AD_ReplicationTable.Table_Name, whereClause, get_TrxName()) + .setClient_ID() + .setParameters(getAD_ReplicationStrategy_ID()) .setOnlyActiveRecords(true) .setApplyAccessFilter(false) .list() @@ -65,12 +69,13 @@ public class MReplicationStrategy extends X_AD_ReplicationStrategy { } /** - * @return the collection the X_AD_ReplicationDocument + * @return the list the X_AD_ReplicationDocument */ - public Collection getReplicationDocuments() { - String whereClause = "AD_ReplicationStrategy_ID=?"; // #1 - return new Query(getCtx(),X_AD_ReplicationDocument.Table_Name,whereClause,get_TrxName()) - .setParameters(new Object[]{getAD_ReplicationStrategy_ID()}) + public List getReplicationDocuments() { + final String whereClause = I_AD_ReplicationDocument.COLUMNNAME_AD_ReplicationStrategy_ID+"=?"; // #1 + return new Query(getCtx(),I_AD_ReplicationDocument.Table_Name,whereClause,get_TrxName()) + .setClient_ID() + .setParameters(getAD_ReplicationStrategy_ID()) .setOnlyActiveRecords(true) .setApplyAccessFilter(false) .list() @@ -84,11 +89,13 @@ public class MReplicationStrategy extends X_AD_ReplicationStrategy { */ public static X_AD_ReplicationTable getReplicationTable(Properties ctx ,int AD_ReplicationStrategy_ID, int AD_Table_ID) { - String whereClause = "AD_ReplicationStrategy_ID=? AND AD_Table_ID=?"; - return new Query(ctx, X_AD_ReplicationTable.Table_Name, whereClause, null) + final String whereClause = I_AD_ReplicationTable.COLUMNNAME_AD_ReplicationStrategy_ID + "=? AND " + + I_AD_ReplicationTable.COLUMNNAME_AD_Table_ID + "=?"; + return new Query(ctx, I_AD_ReplicationTable.Table_Name, whereClause, null) + .setClient_ID() .setOnlyActiveRecords(true) .setApplyAccessFilter(false) - .setParameters(new Object[]{AD_ReplicationStrategy_ID, AD_Table_ID}) + .setParameters(AD_ReplicationStrategy_ID, AD_Table_ID) .first() ; } @@ -100,13 +107,33 @@ public class MReplicationStrategy extends X_AD_ReplicationStrategy { */ public static X_AD_ReplicationDocument getReplicationDocument(Properties ctx ,int AD_ReplicationStrategy_ID , int AD_Table_ID) { - String whereClause = "AD_ReplicationStrategy_ID=? AND AD_Table_ID=?"; - return new Query(ctx, X_AD_ReplicationDocument.Table_Name, whereClause, null) + final String whereClause = I_AD_ReplicationDocument.COLUMNNAME_AD_ReplicationStrategy_ID + "=? AND " + + I_AD_ReplicationDocument.COLUMNNAME_AD_Table_ID + "=?"; + return new Query(ctx, I_AD_ReplicationDocument.Table_Name, whereClause, null) + .setClient_ID() .setOnlyActiveRecords(true) .setApplyAccessFilter(false) - .setParameters(new Object[]{AD_ReplicationStrategy_ID, AD_Table_ID}) + .setParameters(AD_ReplicationStrategy_ID, AD_Table_ID) .first() ; } + + /** + * + * @param AD_Table_ID + * @return X_AD_ReplicationDocument Document to replication + */ + public static X_AD_ReplicationDocument getReplicationDocument(Properties ctx ,int AD_ReplicationStrategy_ID , int AD_Table_ID, int C_DocType_ID) + { + final String whereClause = I_AD_ReplicationDocument.COLUMNNAME_AD_ReplicationStrategy_ID + "=? AND " + + I_AD_ReplicationDocument.COLUMNNAME_AD_Table_ID + "=? AND " + + I_AD_ReplicationDocument.COLUMNNAME_C_DocType_ID + "=?"; + return new Query(ctx, X_AD_ReplicationDocument.Table_Name, whereClause, null) + .setClient_ID() + .setOnlyActiveRecords(true) + .setApplyAccessFilter(false) + .setParameters(AD_ReplicationStrategy_ID, AD_Table_ID, C_DocType_ID) + .first(); + } } diff --git a/base/src/org/compiere/model/MRequest.java b/base/src/org/compiere/model/MRequest.java index 0543ef33bc..258be57869 100644 --- a/base/src/org/compiere/model/MRequest.java +++ b/base/src/org/compiere/model/MRequest.java @@ -43,8 +43,7 @@ public class MRequest extends X_R_Request /** * */ - private static final long serialVersionUID = 3989278951102963994L; - + private static final long serialVersionUID = -6049674214655497548L; /** * Get Request ID from mail text @@ -237,8 +236,8 @@ public class MRequest extends X_R_Request public MRequestAction[] getActions() { final String whereClause = MRequestAction.COLUMNNAME_R_Request_ID+"=?"; - List list = new Query(getCtx(), MRequestAction.Table_Name, whereClause, get_TrxName()) - .setParameters(new Object[]{get_ID()}) + List list = new Query(getCtx(), I_R_RequestAction.Table_Name, whereClause, get_TrxName()) + .setParameters(get_ID()) .setOrderBy("Created DESC") .list(); return list.toArray(new MRequestAction[list.size()]); @@ -252,8 +251,8 @@ public class MRequest extends X_R_Request public MRequestUpdate[] getUpdates(String confidentialType) { final String whereClause = MRequestUpdate.COLUMNNAME_R_Request_ID+"=?"; - List listUpdates = new Query(getCtx(), MRequestUpdate.Table_Name, whereClause, get_TrxName()) - .setParameters(new Object[]{get_ID()}) + List listUpdates = new Query(getCtx(), I_R_RequestUpdate.Table_Name, whereClause, get_TrxName()) + .setParameters(get_ID()) .setOrderBy("Created DESC") .list(); ArrayList list = new ArrayList(); diff --git a/base/src/org/compiere/model/MRequestType.java b/base/src/org/compiere/model/MRequestType.java index be9ba2be5c..cec5b81a6d 100644 --- a/base/src/org/compiere/model/MRequestType.java +++ b/base/src/org/compiere/model/MRequestType.java @@ -18,7 +18,6 @@ package org.compiere.model; import java.sql.PreparedStatement; import java.sql.ResultSet; -import java.sql.SQLException; import java.sql.Timestamp; import java.util.ArrayList; import java.util.Properties; @@ -39,10 +38,11 @@ import org.compiere.util.Env; */ public class MRequestType extends X_R_RequestType { - /** - * - */ - private static final long serialVersionUID = 6235793036503665638L; + + /** + * + */ + private static final long serialVersionUID = 6235793036503665638L; /** * Get Request Type (cached) @@ -74,39 +74,17 @@ public class MRequestType extends X_R_RequestType */ public static MRequestType getDefault (Properties ctx) { - MRequestType retValue = null; int AD_Client_ID = Env.getAD_Client_ID(ctx); - String sql = "SELECT * FROM R_RequestType " - + "WHERE AD_Client_ID IN (0," + AD_Client_ID + ") " - + "ORDER BY IsDefault DESC, AD_Client_ID DESC"; - PreparedStatement pstmt = null; - try - { - pstmt = DB.prepareStatement (sql, null); - ResultSet rs = pstmt.executeQuery (); - if (rs.next ()) - { - retValue = new MRequestType (ctx, rs, null); - if (!retValue.isDefault()) - retValue = null; - } - rs.close (); - pstmt.close (); - pstmt = null; - } - catch (SQLException ex) - { - s_log.log(Level.SEVERE, sql, ex); - } - try - { - if (pstmt != null) - pstmt.close (); - } - catch (SQLException ex1) - { - } - pstmt = null; + + //FR: [ 2214883 ] Remove SQL code and Replace for Query - red1 + final String whereClause = "AD_Client_ID IN (0," + AD_Client_ID + ")"; + MRequestType retValue = new Query(ctx, I_R_RequestType.Table_Name, whereClause, null) + .setOrderBy("IsDefault DESC, AD_Client_ID DESC") + .first(); + + if (retValue != null && !retValue.isDefault()) + retValue = null; + return retValue; } // get diff --git a/base/src/org/compiere/model/MRequisition.java b/base/src/org/compiere/model/MRequisition.java index 2d64f5f48a..7a898efe06 100644 --- a/base/src/org/compiere/model/MRequisition.java +++ b/base/src/org/compiere/model/MRequisition.java @@ -102,10 +102,10 @@ public class MRequisition extends X_M_Requisition implements DocAction } //red1 - FR: [ 2214883 ] Remove SQL code and Replace for Query - String whereClause = MRequisitionLine.COLUMNNAME_M_Requisition_ID+"=?"; - List list = new Query(getCtx(), MRequisitionLine.Table_Name, whereClause, get_TrxName()) - .setParameters(new Object[]{get_ID()}) - .setOrderBy(MRequisitionLine.COLUMNNAME_Line) + final String whereClause = I_M_RequisitionLine.COLUMNNAME_M_Requisition_ID+"=?"; + List list = new Query(getCtx(), I_M_RequisitionLine.Table_Name, whereClause, get_TrxName()) + .setParameters(get_ID()) + .setOrderBy(I_M_RequisitionLine.COLUMNNAME_Line) .list(); // red1 - end - diff --git a/base/src/org/compiere/model/MRequisitionLine.java b/base/src/org/compiere/model/MRequisitionLine.java index 26aeadb974..29ef5384ce 100644 --- a/base/src/org/compiere/model/MRequisitionLine.java +++ b/base/src/org/compiere/model/MRequisitionLine.java @@ -45,7 +45,7 @@ public class MRequisitionLine extends X_M_RequisitionLine /** * */ - private static final long serialVersionUID = 3556301115666692794L; + private static final long serialVersionUID = -2567343619431184322L; /** * Get corresponding Requisition Line for given Order Line @@ -59,8 +59,8 @@ public class MRequisitionLine extends X_M_RequisitionLine final String whereClause = "EXISTS (SELECT 1 FROM C_OrderLine ol" +" WHERE ol.C_OrderLine_ID=M_RequisitionLine.C_OrderLine_ID" +" AND ol.C_Order_ID=?)"; - List list = new Query(ctx, MRequisitionLine.Table_Name, whereClause, trxName) - .setParameters(new Object[]{C_Order_ID}) + List list = new Query(ctx, I_M_RequisitionLine.Table_Name, whereClause, trxName) + .setParameters(C_Order_ID) .list(); return list.toArray(new MRequisitionLine[list.size()]); } @@ -91,8 +91,8 @@ public class MRequisitionLine extends X_M_RequisitionLine public static MRequisitionLine[] forC_OrderLine_ID(Properties ctx, int C_OrderLine_ID, String trxName) { final String whereClause = COLUMNNAME_C_OrderLine_ID+"=?"; - List list = new Query(ctx, MRequisitionLine.Table_Name, whereClause, trxName) - .setParameters(new Object[]{C_OrderLine_ID}) + List list = new Query(ctx, I_M_RequisitionLine.Table_Name, whereClause, trxName) + .setParameters(C_OrderLine_ID) .list(); return list.toArray(new MRequisitionLine[list.size()]); } diff --git a/base/src/org/compiere/model/MResourceUnAvailable.java b/base/src/org/compiere/model/MResourceUnAvailable.java index b9b44b3704..5c7254d91b 100644 --- a/base/src/org/compiere/model/MResourceUnAvailable.java +++ b/base/src/org/compiere/model/MResourceUnAvailable.java @@ -38,8 +38,7 @@ public class MResourceUnAvailable extends X_S_ResourceUnAvailable /** * */ - private static final long serialVersionUID = 5532695704071630122L; - + private static final long serialVersionUID = 1087763356022282086L; /** * Check if a resource is not available @@ -54,8 +53,8 @@ public class MResourceUnAvailable extends X_S_ResourceUnAvailable +" AND TRUNC("+COLUMNNAME_DateFrom+") <= ?" +" AND TRUNC("+COLUMNNAME_DateTo+") >= ?"; Properties ctx = r instanceof PO ? ((PO)r).getCtx() : Env.getCtx(); - return new Query(ctx, MResourceUnAvailable.Table_Name, whereClause, null) - .setParameters(new Object[]{r.getS_Resource_ID(), r.getAD_Client_ID(), date, date}) + return new Query(ctx, I_S_ResourceUnAvailable.Table_Name, whereClause, null) + .setParameters(r.getS_Resource_ID(), r.getAD_Client_ID(), date, date) .match(); } diff --git a/base/src/org/compiere/model/MRule.java b/base/src/org/compiere/model/MRule.java index 2559f434ad..72d1180b8e 100644 --- a/base/src/org/compiere/model/MRule.java +++ b/base/src/org/compiere/model/MRule.java @@ -17,20 +17,17 @@ *****************************************************************************/ package org.compiere.model; -import java.sql.PreparedStatement; import java.sql.ResultSet; -import java.util.ArrayList; import java.util.Enumeration; import java.util.Iterator; +import java.util.List; import java.util.Properties; -import java.util.logging.Level; import javax.script.ScriptEngine; import javax.script.ScriptEngineManager; import org.compiere.util.CCache; import org.compiere.util.CLogger; -import org.compiere.util.DB; import org.compiere.util.Msg; import org.compiere.util.Util; @@ -44,7 +41,8 @@ public class MRule extends X_AD_Rule /** * */ - private static final long serialVersionUID = 343261652226641676L; + private static final long serialVersionUID = -9166262780531877045L; + //global or login context variable prefix public final static String GLOBAL_CONTEXT_PREFIX = "G_"; //window context variable prefix @@ -84,7 +82,7 @@ public class MRule extends X_AD_Rule { if (ruleValue == null) return null; - Iterator it = s_cache.values().iterator(); + Iterator it = s_cache.values().iterator(); while (it.hasNext()) { MRule retValue = (MRule)it.next(); @@ -92,26 +90,11 @@ public class MRule extends X_AD_Rule return retValue; } // - MRule retValue = null; - String sql = "SELECT * FROM AD_Rule WHERE Value=? AND IsActive='Y'"; - PreparedStatement pstmt = null; - ResultSet rs = null; - try - { - pstmt = DB.prepareStatement (sql, null); - pstmt.setString(1, ruleValue); - rs = pstmt.executeQuery (); - if (rs.next ()) - retValue = new MRule (ctx, rs, null); - } - catch (Exception e) - { - s_log.log(Level.SEVERE, sql, e); - } - finally { - DB.close(rs, pstmt); - rs = null; pstmt = null; - } + final String whereClause = "Value=?"; + MRule retValue = new Query(ctx,I_AD_Rule.Table_Name,whereClause,null) + .setParameters(ruleValue) + .setOnlyActiveRecords(true) + .first(); if (retValue != null) { @@ -126,32 +109,13 @@ public class MRule extends X_AD_Rule * @param ctx context * @return Rule */ - public static ArrayList getModelValidatorLoginRules (Properties ctx) + public static List getModelValidatorLoginRules (Properties ctx) { - ArrayList rules = new ArrayList(); - MRule rule = null; - String sql = "SELECT * FROM AD_Rule WHERE EventType=? AND IsActive='Y'"; - PreparedStatement pstmt = null; - ResultSet rs = null; - try - { - pstmt = DB.prepareStatement (sql, null); - pstmt.setString(1, EVENTTYPE_ModelValidatorLoginEvent); - rs = pstmt.executeQuery (); - while (rs.next ()) { - rule = new MRule (ctx, rs, null); - rules.add(rule); - } - } - catch (Exception e) - { - s_log.log(Level.SEVERE, sql, e); - } - finally { - DB.close(rs, pstmt); - rs = null; pstmt = null; - } - + final String whereClause = "EventType=?"; + List rules = new Query(ctx,I_AD_Rule.Table_Name,whereClause,null) + .setParameters(EVENTTYPE_ModelValidatorLoginEvent) + .setOnlyActiveRecords(true) + .list(); if (rules != null && rules.size() > 0) return rules; else diff --git a/base/src/org/compiere/model/MScheduler.java b/base/src/org/compiere/model/MScheduler.java index 0e438fd725..32ea7bd1f9 100644 --- a/base/src/org/compiere/model/MScheduler.java +++ b/base/src/org/compiere/model/MScheduler.java @@ -16,6 +16,8 @@ *****************************************************************************/ package org.compiere.model; +import it.sauronsoftware.cron4j.SchedulingPattern; + import java.sql.ResultSet; import java.sql.Timestamp; import java.util.List; @@ -27,18 +29,17 @@ import org.compiere.util.DB; /** * Scheduler Model - * + * * @author Jorg Janke * @version $Id: MScheduler.java,v 1.3 2006/07/30 00:51:03 jjanke Exp $ */ public class MScheduler extends X_AD_Scheduler - implements AdempiereProcessor + implements AdempiereProcessor, AdempiereProcessor2 { /** * */ - private static final long serialVersionUID = 1887276680441074725L; - + private static final long serialVersionUID = 6563650236096742870L; /** * Get Active @@ -54,7 +55,7 @@ public class MScheduler extends X_AD_Scheduler list.toArray (retValue); return retValue; } // getActive - + /** * Standard Constructor * @param ctx context @@ -94,7 +95,7 @@ public class MScheduler extends X_AD_Scheduler private MSchedulerPara[] m_parameter = null; /** Process Recipients */ private MSchedulerRecipient[] m_recipients = null; - + /** * Get Server ID * @return id @@ -123,8 +124,8 @@ public class MScheduler extends X_AD_Scheduler public AdempiereProcessorLog[] getLogs () { final String whereClause = MSchedulerLog.COLUMNNAME_AD_Scheduler_ID+"=?"; - List list = new Query(getCtx(), MSchedulerLog.Table_Name, whereClause, get_TrxName()) - .setParameters(new Object[]{getAD_Scheduler_ID()}) + List list = new Query(getCtx(), I_AD_SchedulerLog.Table_Name, whereClause, get_TrxName()) + .setParameters(getAD_Scheduler_ID()) .setOrderBy("Created DESC") .list(); MSchedulerLog[] retValue = new MSchedulerLog[list.size ()]; @@ -141,7 +142,7 @@ public class MScheduler extends X_AD_Scheduler if (getKeepLogDays() < 1) return 0; String sql = "DELETE AD_SchedulerLog " - + "WHERE AD_Scheduler_ID=" + getAD_Scheduler_ID() + + "WHERE AD_Scheduler_ID=" + getAD_Scheduler_ID() + " AND (Created+" + getKeepLogDays() + ") < SysDate"; int no = DB.executeUpdateEx(sql, get_TrxName()); return no; @@ -155,7 +156,7 @@ public class MScheduler extends X_AD_Scheduler { return MProcess.get(getCtx(), getAD_Process_ID()); } // getProcess - + /** * Get Parameters * @param reload reload @@ -167,15 +168,15 @@ public class MScheduler extends X_AD_Scheduler return m_parameter; // final String whereClause = MSchedulerPara.COLUMNNAME_AD_Scheduler_ID+"=?"; - List list = new Query(getCtx(), MSchedulerPara.Table_Name, whereClause, get_TrxName()) - .setParameters(new Object[]{getAD_Scheduler_ID()}) + List list = new Query(getCtx(), I_AD_Scheduler_Para.Table_Name, whereClause, get_TrxName()) + .setParameters(getAD_Scheduler_ID()) .setOnlyActiveRecords(true) .list(); m_parameter = new MSchedulerPara[list.size()]; list.toArray(m_parameter); return m_parameter; } // getParameter - + /** * Get Recipients * @param reload reload @@ -186,16 +187,16 @@ public class MScheduler extends X_AD_Scheduler if (!reload && m_recipients != null) return m_recipients; // - String whereClause = MSchedulerRecipient.COLUMNNAME_AD_Scheduler_ID+"=?"; - final List list = new Query(getCtx(), MSchedulerRecipient.Table_Name, whereClause, get_TrxName()) - .setParameters(new Object[]{getAD_Scheduler_ID()}) + final String whereClause = MSchedulerRecipient.COLUMNNAME_AD_Scheduler_ID+"=?"; + List list = new Query(getCtx(), I_AD_SchedulerRecipient.Table_Name, whereClause, get_TrxName()) + .setParameters(getAD_Scheduler_ID()) .setOnlyActiveRecords(true) .list(); m_recipients = new MSchedulerRecipient[list.size()]; list.toArray(m_recipients); return m_recipients; } // getRecipients - + /** * Get Recipient AD_User_IDs * @return array of user IDs @@ -221,25 +222,26 @@ public class MScheduler extends X_AD_Scheduler MUserRoles ur = urs[j]; if (!ur.isActive()) continue; - list.add(ur.getAD_User_ID()); + if (!list.contains(ur.getAD_User_ID())) + list.add(ur.getAD_User_ID()); } } } // Add Updater if (list.size() == 0) { - list.add(getUpdatedBy()); + list.add(getCreatedBy()); } // return list.toArray(new Integer[list.size()]); } // getRecipientAD_User_IDs - + /** * Before Save * @param newRecord new * @return true */ - protected boolean beforeSave(boolean newRecord) + protected boolean beforeSave(boolean newRecord) { // Set Schedule Type & Frequencies if (SCHEDULETYPE_Frequency.equals(getScheduleType())) @@ -248,22 +250,23 @@ public class MScheduler extends X_AD_Scheduler setFrequencyType(FREQUENCYTYPE_Day); if (getFrequency() < 1) setFrequency(1); + setCronPattern(null); } - else if (SCHEDULETYPE_MonthDay.equals(getScheduleType())) + else if (SCHEDULETYPE_CronSchedulingPattern.equals(getScheduleType())) { - if (getMonthDay() < 1 || getMonthDay() > 31) - setMonthDay(1); - } - else // SCHEDULETYPE_WeekDay - { - if (getScheduleType() == null) - setScheduleType(SCHEDULETYPE_WeekDay); - if (getWeekDay() == null) - setWeekDay(WEEKDAY_Monday); + String pattern = getCronPattern(); + if (pattern != null && pattern.trim().length() > 0) + { + if (!SchedulingPattern.validate(pattern)) + { + log.saveError("Error", "InvalidCronPattern"); + return false; + } + } } return true; } // beforeSave - + /** * String Representation * @return info @@ -274,5 +277,5 @@ public class MScheduler extends X_AD_Scheduler sb.append (get_ID ()).append ("-").append (getName()).append ("]"); return sb.toString (); } // toString - + } // MScheduler diff --git a/base/src/org/compiere/model/MSetup.java b/base/src/org/compiere/model/MSetup.java index c63a13eb60..04ddba9ecc 100644 --- a/base/src/org/compiere/model/MSetup.java +++ b/base/src/org/compiere/model/MSetup.java @@ -1030,6 +1030,14 @@ public final class MSetup no = DB.executeUpdate(sqlCmd.toString(), m_trx.getTrxName()); if (no != 1) log.log(Level.SEVERE, "TaxCategory NOT inserted"); + + sqlCmd = new StringBuffer ("INSERT INTO C_TaxCategory_Trl (AD_Language,C_TaxCategory_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy)"); + sqlCmd.append(" SELECT l.AD_Language,t.C_TaxCategory_ID, t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, C_TaxCategory t"); + sqlCmd.append(" WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.C_TaxCategory_ID=").append(C_TaxCategory_ID); + sqlCmd.append(" AND NOT EXISTS (SELECT * FROM C_TaxCategory_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.C_TaxCategory_ID=t.C_TaxCategory_ID)"); + no = DB.executeUpdate(sqlCmd.toString(), m_trx.getTrxName()); + if (no < 0) + log.log(Level.SEVERE, "TaxCategory Translation NOT inserted"); // Tax - Zero Rate MTax tax = new MTax (m_ctx, "Standard", Env.ZERO, C_TaxCategory_ID, m_trx.getTrxName()); diff --git a/base/src/org/compiere/model/MShipper.java b/base/src/org/compiere/model/MShipper.java index 3b48aef543..0937795fc6 100644 --- a/base/src/org/compiere/model/MShipper.java +++ b/base/src/org/compiere/model/MShipper.java @@ -67,10 +67,10 @@ public class MShipper extends X_M_Shipper * @return A list of shippers having the given freight category */ public static List getShippersForFreightCategory(Properties ctx, int FreightCategory_ID, String trxName) { - Query q = new Query(ctx, MShipper.Table_Name, + Query q = new Query(ctx, I_M_Shipper.Table_Name, "M_Shipper.AD_Client_ID=? AND M_Shipper.AD_Org_ID IN (0,?) AND M_Shipper_ID " + "IN (SELECT M_Shipper_ID FROM M_Freight WHERE M_FreightCategory_ID=?)", trxName); - q.setParameters(new Object[]{Env.getAD_Client_ID(ctx), Env.getAD_Org_ID(ctx), FreightCategory_ID}); + q.setParameters(Env.getAD_Client_ID(ctx), Env.getAD_Org_ID(ctx), FreightCategory_ID); List result = q.list(); return(result); } diff --git a/base/src/org/compiere/model/MTableScriptValidator.java b/base/src/org/compiere/model/MTableScriptValidator.java index 297e4586e5..b8f9634ebf 100644 --- a/base/src/org/compiere/model/MTableScriptValidator.java +++ b/base/src/org/compiere/model/MTableScriptValidator.java @@ -83,7 +83,7 @@ public class MTableScriptValidator extends X_AD_Table_ScriptValidator // Fetch now final String whereClause = "AD_Table_ID=? AND EventModelValidator=?"; mvrs = new Query(ctx, Table_Name, whereClause, null) - .setParameters(new Object[]{ad_table_id, event}) + .setParameters(ad_table_id, event) .setOnlyActiveRecords(true) .setOrderBy(COLUMNNAME_SeqNo) .list(); diff --git a/base/src/org/compiere/model/MTax.java b/base/src/org/compiere/model/MTax.java index ab949e8d42..ef4abcbe52 100644 --- a/base/src/org/compiere/model/MTax.java +++ b/base/src/org/compiere/model/MTax.java @@ -31,15 +31,17 @@ import org.compiere.util.TimeUtil; * * @author Jorg Janke * @version $Id: MTax.java,v 1.3 2006/07/30 00:51:02 jjanke Exp $ - * red1 - FR: [ 2214883 ] Remove SQL code and Replace for Query + * red1 - FR: [ 2214883 ] Remove SQL code and Replace for Query + * trifonnt - BF [2913276] - Allow only one Default Tax Rate per Tax Category + * mjmckay - BF [2948632] - Allow edits to the Defautl Tax Rate */ public class MTax extends X_C_Tax -{ +{ /** * */ - private static final long serialVersionUID = 4140382472528327237L; - + private static final long serialVersionUID = 6423328193350641479L; + /** Cache */ private static CCache s_cache = new CCache(Table_Name, 5); /** Cache of Client */ @@ -67,9 +69,8 @@ public class MTax extends X_C_Tax // Create it //FR: [ 2214883 ] Remove SQL code and Replace for Query - red1 - String whereClause = "AD_Client_ID=?"; - List list = new Query(ctx, MTax.Table_Name, whereClause, null) - .setParameters(new Object[]{AD_Client_ID}) + List list = new Query(ctx, I_C_Tax.Table_Name, null, null) + .setClient_ID() .setOrderBy("C_Country_ID, C_Region_ID, To_Country_ID, To_Region_ID") .setOnlyActiveRecords(true) .list(); @@ -167,9 +168,9 @@ public class MTax extends X_C_Tax return m_childTaxes; // //FR: [ 2214883 ] Remove SQL code and Replace for Query - red1 - String whereClause = COLUMNNAME_Parent_Tax_ID+"=?"; - List list = new Query(getCtx(), MTax.Table_Name, whereClause, get_TrxName()) - .setParameters(new Object[]{getC_Tax_ID()}) + final String whereClause = COLUMNNAME_Parent_Tax_ID+"=?"; + List list = new Query(getCtx(), I_C_Tax.Table_Name, whereClause, get_TrxName()) + .setParameters(getC_Tax_ID()) .setOnlyActiveRecords(true) .list(); //red1 - end - @@ -190,11 +191,11 @@ public class MTax extends X_C_Tax return m_postals; //FR: [ 2214883 ] Remove SQL code and Replace for Query - red1 - String whereClause = MTaxPostal.COLUMNNAME_C_Tax_ID+"=?"; - List list = new Query(getCtx(), MTaxPostal.Table_Name, whereClause, get_TrxName()) - .setParameters(new Object[]{getC_Tax_ID()}) + final String whereClause = MTaxPostal.COLUMNNAME_C_Tax_ID+"=?"; + List list = new Query(getCtx(), I_C_TaxPostal.Table_Name, whereClause, get_TrxName()) + .setParameters(getC_Tax_ID()) .setOnlyActiveRecords(true) - .setOrderBy(MTaxPostal.COLUMNNAME_Postal+", "+MTaxPostal.COLUMNNAME_Postal_To) + .setOrderBy(I_C_TaxPostal.COLUMNNAME_Postal+", "+I_C_TaxPostal.COLUMNNAME_Postal_To) .list(); //red1 - end - @@ -280,9 +281,12 @@ public class MTax extends X_C_Tax protected boolean beforeSave(boolean newRecord) { if (isDefault()) { // @Trifon - Ensure that only one tax rate is set as Default! - String whereClause = MTax.COLUMNNAME_C_TaxCategory_ID+"=? AND IsDefault='Y'"; - List list = new Query(getCtx(), MTax.Table_Name, whereClause, get_TrxName()) - .setParameters(new Object[]{getC_TaxCategory_ID()}) + // @Mckay - Allow edits to the Default tax rate + String whereClause = MTax.COLUMNNAME_C_TaxCategory_ID+"=? AND " + + MTax.COLUMNNAME_C_Tax_ID+"<>? AND "+ + "IsDefault='Y'"; + List list = new Query(getCtx(), I_C_Tax.Table_Name, whereClause, get_TrxName()) + .setParameters(getC_TaxCategory_ID(), getC_Tax_ID()) .setOnlyActiveRecords(true) .list(); if (list.size() >= 1) { diff --git a/base/src/org/compiere/model/MTaxCategory.java b/base/src/org/compiere/model/MTaxCategory.java index 5206fc42ed..9285c57a1a 100644 --- a/base/src/org/compiere/model/MTaxCategory.java +++ b/base/src/org/compiere/model/MTaxCategory.java @@ -33,7 +33,7 @@ public class MTaxCategory extends X_C_TaxCategory /** * */ - private static final long serialVersionUID = 2154364435808111060L; + private static final long serialVersionUID = -5521670797405300136L; /** * Standard Constructor @@ -71,9 +71,9 @@ public class MTaxCategory extends X_C_TaxCategory { MTax m_tax = new MTax(getCtx(), 0, get_TrxName()); - String whereClause = COLUMNNAME_C_TaxCategory_ID+"=? AND "+ COLUMNNAME_IsDefault+"='Y'"; - List list = new Query(getCtx(), MTax.Table_Name, whereClause, get_TrxName()) - .setParameters(new Object[]{getC_TaxCategory_ID()}) + final String whereClause = COLUMNNAME_C_TaxCategory_ID+"=? AND "+ COLUMNNAME_IsDefault+"='Y'"; + List list = new Query(getCtx(), I_C_Tax.Table_Name, whereClause, get_TrxName()) + .setParameters(getC_TaxCategory_ID()) .setOnlyActiveRecords(true) .list(); if (list.size() == 0) { diff --git a/base/src/org/compiere/model/MUOMConversion.java b/base/src/org/compiere/model/MUOMConversion.java index c95cefb0c2..b9737c7391 100644 --- a/base/src/org/compiere/model/MUOMConversion.java +++ b/base/src/org/compiere/model/MUOMConversion.java @@ -604,7 +604,7 @@ public class MUOMConversion extends X_C_UOM_Conversion + " AND EXISTS (SELECT 1 FROM M_Product p " + "WHERE C_UOM_Conversion.M_Product_ID=p.M_Product_ID AND C_UOM_Conversion.C_UOM_ID=p.C_UOM_ID)"; List conversions = new Query(ctx, Table_Name, whereClause, null) - .setParameters(new Object[]{M_Product_ID}) + .setParameters(M_Product_ID) .setOnlyActiveRecords(true) .list(); list.addAll(conversions); diff --git a/base/src/org/compiere/model/MUser.java b/base/src/org/compiere/model/MUser.java index 28a66d28c9..e7a5de22e0 100644 --- a/base/src/org/compiere/model/MUser.java +++ b/base/src/org/compiere/model/MUser.java @@ -74,8 +74,8 @@ public class MUser extends X_AD_User */ public static MUser[] getOfBPartner (Properties ctx, int C_BPartner_ID, String trxName) { - List list = new Query(ctx, MUser.Table_Name, "C_BPartner_ID=?", trxName) - .setParameters(new Object[]{C_BPartner_ID}) + List list = new Query(ctx, I_AD_User.Table_Name, "C_BPartner_ID=?", trxName) + .setParameters(C_BPartner_ID) .setOnlyActiveRecords(true) .list(); @@ -171,10 +171,12 @@ public class MUser extends X_AD_User int AD_Client_ID = Env.getAD_Client_ID(ctx); MUser retValue = null; - /* TODO: Implement same validation as in Login.java - - * about (SELECT IsEncrypted FROM AD_Column WHERE AD_Column_ID=417)='N') */ String sql = "SELECT * FROM AD_User " - + "WHERE Name=? AND (Password=? OR Password=?) AND IsActive='Y' AND AD_Client_ID=?"; + + "WHERE COALESCE(LDAPUser, Name)=? " // #1 + + " AND ((Password=? AND (SELECT IsEncrypted FROM AD_Column WHERE AD_Column_ID=417)='N') " // #2 + + "OR (Password=? AND (SELECT IsEncrypted FROM AD_Column WHERE AD_Column_ID=417)='Y'))" // #3 + + " AND IsActive='Y' AND AD_Client_ID=?" // #4 + ; PreparedStatement pstmt = null; ResultSet rs = null; try @@ -182,7 +184,7 @@ public class MUser extends X_AD_User pstmt = DB.prepareStatement (sql, null); pstmt.setString (1, name); pstmt.setString (2, password); - pstmt.setString(3, SecureEngine.encrypt(password)); + pstmt.setString (3, SecureEngine.encrypt(password)); pstmt.setInt(4, AD_Client_ID); rs = pstmt.executeQuery (); if (rs.next ()) diff --git a/base/src/org/compiere/model/MUserRoles.java b/base/src/org/compiere/model/MUserRoles.java index b8aa581094..9376910d70 100644 --- a/base/src/org/compiere/model/MUserRoles.java +++ b/base/src/org/compiere/model/MUserRoles.java @@ -16,14 +16,11 @@ *****************************************************************************/ package org.compiere.model; -import java.sql.PreparedStatement; import java.sql.ResultSet; -import java.util.ArrayList; +import java.util.List; import java.util.Properties; -import java.util.logging.Level; import org.compiere.util.CLogger; -import org.compiere.util.DB; /** * User Roles Model @@ -47,34 +44,10 @@ public class MUserRoles extends X_AD_User_Roles */ public static MUserRoles[] getOfRole (Properties ctx, int AD_Role_ID) { - String sql = "SELECT * FROM AD_User_Roles WHERE AD_Role_ID=?"; - ArrayList list = new ArrayList(); - PreparedStatement pstmt = null; - try - { - pstmt = DB.prepareStatement (sql, null); - pstmt.setInt (1, AD_Role_ID); - ResultSet rs = pstmt.executeQuery (); - while (rs.next ()) - list.add (new MUserRoles (ctx, rs, null)); - rs.close (); - pstmt.close (); - pstmt = null; - } - catch (Exception e) - { - s_log.log(Level.SEVERE, "getOfRole", e); - } - try - { - if (pstmt != null) - pstmt.close (); - pstmt = null; - } - catch (Exception e) - { - pstmt = null; - } + final String whereClause = I_AD_User_Roles.COLUMNNAME_AD_Role_ID+"=?"; + List list = new Query(ctx,I_AD_User_Roles.Table_Name,whereClause,null) + .setParameters(AD_Role_ID) + .list(); MUserRoles[] retValue = new MUserRoles[list.size ()]; list.toArray (retValue); return retValue; @@ -88,34 +61,10 @@ public class MUserRoles extends X_AD_User_Roles */ public static MUserRoles[] getOfUser (Properties ctx, int AD_User_ID) { - String sql = "SELECT * FROM AD_User_Roles WHERE AD_User_ID=?"; - ArrayList list = new ArrayList(); - PreparedStatement pstmt = null; - try - { - pstmt = DB.prepareStatement (sql, null); - pstmt.setInt (1, AD_User_ID); - ResultSet rs = pstmt.executeQuery (); - while (rs.next ()) - list.add (new MUserRoles (ctx, rs, null)); - rs.close (); - pstmt.close (); - pstmt = null; - } - catch (Exception e) - { - s_log.log(Level.SEVERE, "getOfUser", e); - } - try - { - if (pstmt != null) - pstmt.close (); - pstmt = null; - } - catch (Exception e) - { - pstmt = null; - } + final String whereClause = I_AD_User_Roles.COLUMNNAME_AD_User_ID+"=?"; + List list = new Query(ctx,I_AD_User_Roles.Table_Name,whereClause,null) + .setParameters(AD_User_ID) + .list(); MUserRoles[] retValue = new MUserRoles[list.size ()]; list.toArray (retValue); return retValue; diff --git a/base/src/org/compiere/model/MWarehouse.java b/base/src/org/compiere/model/MWarehouse.java index b6b15a7f4b..2fb48c8513 100644 --- a/base/src/org/compiere/model/MWarehouse.java +++ b/base/src/org/compiere/model/MWarehouse.java @@ -76,9 +76,10 @@ public class MWarehouse extends X_M_Warehouse */ public static MWarehouse[] getForOrg (Properties ctx, int AD_Org_ID) { - String whereClause = "IsActive=? AND AD_Org_ID=?"; + final String whereClause = "AD_Org_ID=?"; List list = new Query(ctx, Table_Name, whereClause, null) - .setParameters(new Object[]{"Y", AD_Org_ID}) + .setParameters(AD_Org_ID) + .setOnlyActiveRecords(true) .setOrderBy(COLUMNNAME_M_Warehouse_ID) .list(); return list.toArray(new MWarehouse[list.size()]); @@ -93,9 +94,10 @@ public class MWarehouse extends X_M_Warehouse */ public static MWarehouse[] getInTransitForOrg (Properties ctx, int AD_Org_ID) { - String whereClause = "IsActive=? AND IsInTransit=? AND AD_Org_ID=?"; + final String whereClause = "IsInTransit=? AND AD_Org_ID=?"; List list = new Query(ctx, Table_Name, whereClause, null) - .setParameters(new Object[]{"Y", "Y", AD_Org_ID}) + .setParameters("Y", AD_Org_ID) + .setOnlyActiveRecords(true) .setOrderBy(COLUMNNAME_M_Warehouse_ID) .list(); return list.toArray(new MWarehouse[list.size()]); @@ -159,9 +161,10 @@ public class MWarehouse extends X_M_Warehouse if (!reload && m_locators != null) return m_locators; // - final String whereClause = "IsActive=? AND M_Warehouse_ID=?"; - List list = new Query(getCtx(), MLocator.Table_Name, whereClause, null) - .setParameters(new Object[]{"Y", getM_Warehouse_ID()}) + final String whereClause = "M_Warehouse_ID=?"; + List list = new Query(getCtx(), I_M_Locator.Table_Name, whereClause, null) + .setParameters(getM_Warehouse_ID()) + .setOnlyActiveRecords(true) .setOrderBy("X,Y,Z") .list(); m_locators = list.toArray(new MLocator[list.size()]); diff --git a/base/src/org/compiere/model/MWindow.java b/base/src/org/compiere/model/MWindow.java index e0f957b653..4bc5c9ed02 100644 --- a/base/src/org/compiere/model/MWindow.java +++ b/base/src/org/compiere/model/MWindow.java @@ -20,12 +20,13 @@ import java.awt.Dimension; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; -import java.util.ArrayList; +import java.util.List; import java.util.Properties; import java.util.logging.Level; import org.compiere.util.CLogger; import org.compiere.util.DB; +import org.compiere.wf.MWFNode; /** * Window Model @@ -38,7 +39,7 @@ public class MWindow extends X_AD_Window /** * */ - private static final long serialVersionUID = 6783399136841920556L; + private static final long serialVersionUID = -7604318488890368565L; /** Static Logger */ private static CLogger s_log = CLogger.getCLogger (MWindow.class); @@ -97,27 +98,11 @@ public class MWindow extends X_AD_Window { if (m_tabs != null && !reload) return m_tabs; - String sql = "SELECT * FROM AD_Tab WHERE AD_Window_ID=? ORDER BY SeqNo"; - ArrayList list = new ArrayList(); - PreparedStatement pstmt = null; - ResultSet rs = null; - try - { - pstmt = DB.prepareStatement (sql, trxName); - pstmt.setInt (1, getAD_Window_ID()); - rs = pstmt.executeQuery (); - while (rs.next ()) - list.add (new MTab (getCtx(), rs, trxName)); - } - catch (Exception e) - { - log.log(Level.SEVERE, sql, e); - } - finally - { - DB.close(rs, pstmt); - rs = null; pstmt = null; - } + final String whereClause = I_AD_Tab.COLUMNNAME_AD_Window_ID+"=?"; + List list = new Query(getCtx(),I_AD_Tab.Table_Name,whereClause,trxName) + .setParameters(getAD_Window_ID()) + .setOrderBy(I_AD_Tab.COLUMNNAME_SeqNo) + .list(); // m_tabs = new MTab[list.size ()]; list.toArray (m_tabs); @@ -155,7 +140,7 @@ public class MWindow extends X_AD_Window menues[i].save(); } // - X_AD_WF_Node[] nodes = getWFNodes(getCtx(), "AD_Window_ID=" + getAD_Window_ID(), get_TrxName()); + MWFNode[] nodes = getWFNodes(getCtx(), "AD_Window_ID=" + getAD_Window_ID(), get_TrxName()); for (int i = 0; i < nodes.length; i++) { boolean changed = false; @@ -187,30 +172,11 @@ public class MWindow extends X_AD_Window * @param trxName transaction * @return nodes */ - public static X_AD_WF_Node[] getWFNodes (Properties ctx, String whereClause, String trxName) - { - String sql = "SELECT * FROM AD_WF_Node"; - if (whereClause != null && whereClause.length() > 0) - sql += " WHERE " + whereClause; - ArrayList list = new ArrayList(); - PreparedStatement pstmt = null; - ResultSet rs = null; - try - { - pstmt = DB.prepareStatement (sql, trxName); - rs = pstmt.executeQuery (); - while (rs.next ()) - list.add (new X_AD_WF_Node (ctx, rs, trxName)); - } - catch (Exception e) - { - s_log.log(Level.SEVERE, sql, e); - } - finally { - DB.close(rs, pstmt); - rs = null; pstmt = null; - } - X_AD_WF_Node[] retValue = new X_AD_WF_Node[list.size()]; + public static MWFNode[] getWFNodes (Properties ctx, String whereClause, String trxName) + { + List list = new Query(ctx,I_AD_WF_Node.Table_Name,whereClause,trxName) + .list(); + MWFNode[] retValue = new MWFNode[list.size()]; list.toArray (retValue); return retValue; } // getWFNode diff --git a/base/src/org/compiere/model/M_Element.java b/base/src/org/compiere/model/M_Element.java index 7f24ec1335..033c2f3ccd 100644 --- a/base/src/org/compiere/model/M_Element.java +++ b/base/src/org/compiere/model/M_Element.java @@ -33,10 +33,11 @@ import org.compiere.util.Msg; */ public class M_Element extends X_AD_Element { - /** - * - */ - private static final long serialVersionUID = -7426812810619889250L; + + /** + * + */ + private static final long serialVersionUID = -6644398794862560030L; /** * Get case sensitive Column Name @@ -90,8 +91,8 @@ public class M_Element extends X_AD_Element // // TODO: caching if trxName == null final String whereClause = "UPPER(ColumnName)=?"; - M_Element retValue = new Query(ctx, M_Element.Table_Name, whereClause, trxName) - .setParameters(new Object[]{columnName.toUpperCase()}) + M_Element retValue = new Query(ctx, I_AD_Element.Table_Name, whereClause, trxName) + .setParameters(columnName.toUpperCase()) .firstOnly(); return retValue; } // get @@ -107,10 +108,10 @@ public class M_Element extends X_AD_Element { if (AD_Column_ID ==0) return null; - String whereClause = "EXISTS (SELECT 1 FROM AD_Column c " + final String whereClause = "EXISTS (SELECT 1 FROM AD_Column c " + "WHERE c.AD_Element_ID=AD_Element.AD_Element_ID AND c.AD_Column_ID=?)"; M_Element retValue = new Query(ctx, Table_Name, whereClause, trxName) - .setParameters(new Object[]{AD_Column_ID}) + .setParameters(AD_Column_ID) .firstOnly(); return retValue; } // get diff --git a/base/src/org/compiere/model/ModelValidationEngine.java b/base/src/org/compiere/model/ModelValidationEngine.java index b8b7e8829a..eb03c4be62 100644 --- a/base/src/org/compiere/model/ModelValidationEngine.java +++ b/base/src/org/compiere/model/ModelValidationEngine.java @@ -49,6 +49,8 @@ import org.compiere.util.KeyNamePair; * https://sourceforge.net/tracker/?func=detail&aid=2804135&group_id=176962&atid=879332 *
  • BF [ 2819617 ] NPE if script validator rule returns null * https://sourceforge.net/tracker/?func=detail&aid=2819617&group_id=176962&atid=879332 + * @author victor.perez@e-evolution.com, www.e-evolution.com + *
  • BF [ 2947607 ] Model Validator Engine duplicate listeners */ public class ModelValidationEngine { @@ -213,7 +215,7 @@ public class ModelValidationEngine } // now process the script model validator login - ArrayList loginRules = MRule.getModelValidatorLoginRules (Env.getCtx()); + List loginRules = MRule.getModelValidatorLoginRules (Env.getCtx()); if (loginRules != null) { for (MRule loginRule : loginRules) { // currently just JSR 223 supported @@ -431,8 +433,10 @@ public class ModelValidationEngine list.add(listener); m_docValidateListeners.put(propertyName, list); } - else - list.add(listener); + else if (!list.contains(listener)) + { + list.add(listener); + } } // addDocValidate /** @@ -848,5 +852,4 @@ public class ModelValidationEngine } } } - } // ModelValidatorEngine diff --git a/base/src/org/compiere/model/PO.java b/base/src/org/compiere/model/PO.java index bc22517a0e..1927d1ebc7 100644 --- a/base/src/org/compiere/model/PO.java +++ b/base/src/org/compiere/model/PO.java @@ -86,6 +86,8 @@ import org.w3c.dom.Element; * @author Victor Perez, e-Evolution SC *
  • [ 2195894 ] Improve performance in PO engine *
  • http://sourceforge.net/tracker/index.php?func=detail&aid=2195894&group_id=176962&atid=879335 + *
  • BF [2947622] The replication ID (Primary Key) is not working + *
  • https://sourceforge.net/tracker/?func=detail&aid=2947622&group_id=176962&atid=879332 */ public abstract class PO implements Serializable, Comparator, Evaluatee @@ -682,7 +684,7 @@ public abstract class PO value = Integer.parseInt((String)value); } } - + return set_Value (index, value); } // setValue @@ -719,6 +721,7 @@ public abstract class PO log.log(Level.WARNING, "Virtual Column" + colInfo); return false; } + // // globalqss -- Bug 1618469 - is throwing not updateable even on new records // if (!p_info.isColumnUpdateable(index)) @@ -816,9 +819,36 @@ public abstract class PO log.finest(ColumnName + " = " + m_newValues[index] + " (OldValue="+m_oldValues[index]+")"); } set_Keys (ColumnName, m_newValues[index]); + + // FR 2962094 Fill ProcessedOn when the Processed column is changing from N to Y + setProcessedOn(ColumnName, value, m_oldValues[index]); + return true; } // setValue + /* FR 2962094 - Finish implementation of weighted average costing + Fill the column ProcessedOn (if it exists) with a bigdecimal representation of current timestamp (with nanoseconds) + */ + private void setProcessedOn(String ColumnName, Object value, Object oldValue) { + if ("Processed".equals(ColumnName) + && value instanceof Boolean + && ((Boolean)value).booleanValue() == true + && (oldValue == null + || (oldValue instanceof Boolean + && ((Boolean)oldValue).booleanValue() == false))) { + if (get_ColumnIndex("ProcessedOn") > 0) { + // fill processed on column + //get current time from db + Timestamp ts = DB.getSQLValueTS(null, "SELECT CURRENT_TIMESTAMP FROM DUAL"); + long mili = ts.getTime(); + int nano = ts.getNanos(); + double doublets = Double.parseDouble(Long.toString(mili) + "." + Integer.toString(nano)); + BigDecimal bdtimestamp = new BigDecimal(doublets); + set_Value("ProcessedOn", bdtimestamp); + } + } + } + /** * Set Value w/o check (update, r/o, ..). * Used when Column is R/O @@ -893,6 +923,10 @@ public abstract class PO log.finest(ColumnName + " = " + m_newValues[index] + " (" + (m_newValues[index]==null ? "-" : m_newValues[index].getClass().getName()) + ")"); set_Keys (ColumnName, m_newValues[index]); + + // FR 2962094 Fill ProcessedOn when the Processed column is changing from N to Y + setProcessedOn(ColumnName, value, m_oldValues[index]); + return true; } // set_ValueNoCheck @@ -906,7 +940,7 @@ public abstract class PO */ protected final boolean set_ValueNoCheckE (String ColumnName, Object value) { - return set_ValueNoCheckE (ColumnName, value); + return set_ValueNoCheck (ColumnName, value); } // set_ValueNoCheckE /** @@ -2512,6 +2546,14 @@ public abstract class PO int no = saveNew_getID(); if (no <= 0) no = DB.getNextID(getAD_Client_ID(), p_info.getTableName(), m_trxName); + // the primary key is not overwrite with the local sequence + if (isReplication()) + { + if (get_ID() > 0) + { + no = get_ID(); + } + } if (no <= 0) { log.severe("No NextID (" + no + ")"); diff --git a/base/src/org/compiere/model/PP_PayFlowPro4.java b/base/src/org/compiere/model/PP_PayFlowPro4.java new file mode 100644 index 0000000000..7b2e1772c3 --- /dev/null +++ b/base/src/org/compiere/model/PP_PayFlowPro4.java @@ -0,0 +1,272 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. * + * This program is free software; you can redistribute it and/or modify it * + * under the terms version 2 of the GNU General Public License as published * + * by the Free Software Foundation. This program is distributed in the hope * + * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * + * See the GNU General Public License for more details. * + * You should have received a copy of the GNU General Public License along * + * with this program; if not, write to the Free Software Foundation, Inc., * + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * + * For the text or an alternative of this public license, you may reach us * + * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * + * or via info@compiere.org or http://www.compiere.org/license.html * + *****************************************************************************/ +package org.compiere.model; + +import java.io.*; +import java.math.RoundingMode; +import java.util.*; +import java.util.logging.*; + +import org.compiere.util.Util; + +import paypal.payflow.ClientInfo; +import paypal.payflow.PayflowAPI; +import paypal.payflow.SDKProperties; + + +/** + * Payment Processor for PayPal PayFlow Pro SDK 4. + * + * @author Jorg Janke + * @author Paul Bowden updated to SDK version 4 + */ +public final class PP_PayFlowPro4 extends PaymentProcessor + implements Serializable +{ + /** + * + */ + private static final long serialVersionUID = -3904174878402449633L; + + /** + * PayFowPro Constructor + */ + public PP_PayFlowPro4() + { + super(); + + } // PP_PayFowPro + + // Payment System */ + private PayflowAPI m_pp = null; + private boolean m_ok = false; + + protected final static String RESULT_OK = "0"; + protected final static String RESULT_DECLINED = "12"; + protected final static String RESULT_INVALID_NO = "23"; + protected final static String RESULT_INVALID_EXP = "24"; + protected final static String RESULT_INSUFFICIENT_FUNDS = "50"; + protected final static String RESULT_TIMEOUT_PROCESSOR = "104"; + protected final static String RESULT_TIMEOUT_HOST = "109"; + + /** + * Get Version + * @return version + */ + public String getVersion() + { + return "PayFlowPro " + m_pp.getVersion(); + } // getVersion + + /** + * Process CreditCard (no date check) + * @return true if processed successfully + * @throws IllegalArgumentException + */ + public boolean processCC () throws IllegalArgumentException + { + log.fine(p_mpp.getHostAddress() + " " + p_mpp.getHostPort() + ", Timeout=" + getTimeout() + + "; Proxy=" + p_mpp.getProxyAddress() + " " + p_mpp.getProxyPort() + " " + p_mpp.getProxyLogon() + " " + p_mpp.getProxyPassword()); + + if ( p_mpp.getC_Currency_ID() != 0 && p_mpp.getC_Currency_ID() != p_mp.getC_Currency_ID() ) + throw new IllegalArgumentException("Payment currency not supported by processor."); + if ( p_mpp.getMinimumAmt().compareTo(p_mp.getPayAmt()) > 0) + throw new IllegalArgumentException("Payment amount is less than minimum accepted."); + if ( p_mpp.isRequireVV() && Util.isEmpty(p_mp.getCreditCardVV(), true) ) + throw new IllegalArgumentException("Credit card verification code required."); + + + // + StringBuffer param = new StringBuffer(); + // Transaction Type + if (p_mp.getTrxType().equals(MPayment.TRXTYPE_Sales)) + param.append("TRXTYPE=").append(p_mp.getTrxType()); + else + throw new IllegalArgumentException("PP_PayFlowPro TrxType not supported - " + p_mp.getTrxType()); + + // Mandatory Fields + param.append("&TENDER=C") // CreditCard + .append("&ACCT=").append(MPaymentValidate.checkNumeric(p_mp.getCreditCardNumber())); // CreditCard No + param.append("&EXPDATE="); // ExpNo + String month = String.valueOf(p_mp.getCreditCardExpMM()); + if (month.length() == 1) + param.append("0"); + param.append(month); + int expYY = p_mp.getCreditCardExpYY(); + if (expYY > 2000) + expYY -= 2000; + String year = String.valueOf(expYY); + if (year.length() == 1) + param.append("0"); + param.append(year); + + // CURRENCY + int precision = 2; // cents + I_C_Currency currency = null; + currency = p_mp.getC_Currency(); + if ( currency != null ) + { + precision = currency.getStdPrecision(); + param.append(createPair("&CURRENCY", currency.getISO_Code(), 3)); + } + // rounded to cent + param.append("&AMT=").append(p_mp.getPayAmt().setScale(precision, RoundingMode.HALF_UP)); // Amount + + // Optional Control Fields - AuthCode & Orig ID + param.append(createPair("&AUTHCODE", p_mp.getVoiceAuthCode(), 6)); + param.append(createPair("&ORIGID", p_mp.getOrig_TrxID(), 12)); // PNREF - returned + // CVV + param.append(createPair("&CVV2", p_mp.getCreditCardVV(), 4)); + // param.append(createPair("&SWIPE", p_mp.getXXX(), 80)); // Track 1+2 + + // Address + param.append(createPair("&NAME", p_mp.getA_Name(), 30)); + param.append(createPair("&STREET", p_mp.getA_Street(), 30)); // Street + param.append(createPair("&ZIP", p_mp.getA_Zip(), 9)); // Zip 5-9 + // CITY 20, STATE 2, + param.append(createPair("&EMAIL", p_mp.getA_EMail(), 64)); // EMail + + // Amex Fields + // DESC, SHIPTOZIP, TAXAMT + // param.append(createPair("&DESC", p_mp.getXXX(), 23)); // Description + param.append(createPair("&SHIPTOZIP", p_mp.getA_Zip(), 6)); // Zip 6 + param.append(createPair("&TAXAMT", p_mp.getTaxAmt(), 10)); // Tax + + // Invoice No + param.append(createPair("&INVNUM", p_mp.getC_Invoice_ID(), 9)); + + // COMMENT1/2 + param.append(createPair("&COMMENT1", p_mp.getC_Payment_ID(), 128)); // Comment + param.append(createPair("&COMMENT2", p_mp.getC_BPartner_ID(), 128)); // Comment2 + + return process(param.toString()); + + } + // processCC + + /** + * Process Transaction + * @param parameter Command String + * @return true if processed successfully + */ + public boolean process (String parameter) + { + long start = System.currentTimeMillis(); + StringBuffer param = new StringBuffer(parameter); + // Usr/Pwd + param + .append("&PARTNER=").append(p_mpp.getPartnerID()) + .append("&VENDOR=").append(p_mpp.getVendorID()) + .append("&USER=").append(p_mpp.getUserID()) + .append("&PWD=").append(p_mpp.getPassword()); + // PCI DSS don't log private data + // log.fine("-> " + param.toString()); + + + SDKProperties.setHostAddress(p_mpp.getHostAddress()); + SDKProperties.setHostPort(p_mpp.getHostPort()); + SDKProperties.setTimeOut(getTimeout()); + + SDKProperties.setProxyAddress(p_mpp.getProxyAddress()); + SDKProperties.setProxyPort(p_mpp.getProxyPort()); + SDKProperties.setProxyLogin(p_mpp.getProxyLogon()); + SDKProperties.setProxyPassword(p_mpp.getProxyPassword()); + + //Logging is by default off. To turn logging on uncomment the following lines: + //SDKProperties.setLogFileName("payflow_java.log"); + //SDKProperties.setLoggingLevel(PayflowConstants.SEVERITY_DEBUG); + //SDKProperties.setMaxLogFileSize(1000000); + //SDKProperties.setStackTraceOn(true); + // Create an instance of PayflowAPI. + + m_pp = new PayflowAPI(); + + + // RequestId is a unique string that is required for each & every transaction. + // The merchant can use her/his own algorithm to generate this unique request id or + // use the SDK provided API to generate this as shown below (PayflowAPI.generateRequestId). + String requestId = m_pp.generateRequestId(); + String response = m_pp.submitTransaction(param.toString(), requestId); + + // Create a new Client Information data object. + ClientInfo clInfo = new ClientInfo(); + + // Set the ClientInfo object of the PayflowAPI. + m_pp.setClientInfo(clInfo); + + + // Following lines of code are optional. + // Begin optional code for displaying SDK errors ... + // It is used to read any errors that might have occured in the SDK. + // Get the transaction errors. + + String transErrors = m_pp.getTransactionContext().toString(); + if (transErrors != null && transErrors.length() > 0) { + log.log(Level.SEVERE, "Transaction Errors from SDK = \n" + transErrors); + } + + + p_mp.setR_Result(""); + p_mp.setR_Info(response); // complete info + + // RESULT=1&PNREF=PN0001480030&RESPMSG=Invalid User Authentication + // RESULT=0&PNREF=P60501480167&RESPMSG=Approved&AUTHCODE=010101&AVSADDR=X&AVSZIP=X + // RESULT=-31&RESPMSG=The certificate chain did not validate, no local certificate found, javax.net.ssl.SSLException: Cert Path = C:\Adempiere\lib, Working Directory = C:\Adempiere\adempiere-all2\client\temp + StringTokenizer st = new StringTokenizer(response, "&", false); + while (st.hasMoreTokens()) + { + String token = st.nextToken(); + int pos = token.indexOf('='); + String name = token.substring(0, pos); + String value = token.substring(pos+1); + // + if (name.equals("RESULT")) + { + p_mp.setR_Result (value); + m_ok = RESULT_OK.equals(value); + } + else if (name.equals("PNREF")) + p_mp.setR_PnRef(value); + else if (name.equals("RESPMSG")) + p_mp.setR_RespMsg(value); + else if (name.equals("AUTHCODE")) + p_mp.setR_AuthCode(value); + else if (name.equals("AVSADDR")) + p_mp.setR_AvsAddr(value); + else if (name.equals("AVSZIP")) + p_mp.setR_AvsZip(value); + else if (name.equals("IAVS")) // N=YSA, Y=International + ; + else if (name.equals("CVV2MATCH")) // Y/N X=not supported + ; + else + log.log(Level.SEVERE, "Response unknown = " + token); + } + // Problems with rc (e.g. 0 with Result=24) + return m_ok; + } // process + + /** + * Payment is processed successfully + * @return true if OK + */ + public boolean isProcessedOK() + { + return m_ok; + } // isProcessedOK + +} // PP_PayFowPro diff --git a/base/src/org/compiere/model/ProductCost.java b/base/src/org/compiere/model/ProductCost.java index a811927a31..232595fee5 100644 --- a/base/src/org/compiere/model/ProductCost.java +++ b/base/src/org/compiere/model/ProductCost.java @@ -161,7 +161,8 @@ public class ProductCost public static final int ACCTTYPE_P_Overhead = 21; /** Outside Processing */ public static final int ACCTTYPE_P_Scrap = 22; - + /** Outside Processing */ + public static final int ACCTTYPE_P_AverageCostVariance = 23; /** * Line Account from Product @@ -172,7 +173,7 @@ public class ProductCost */ public MAccount getAccount(int AcctType, MAcctSchema as) { - if (AcctType < 1 || AcctType > 22) + if (AcctType < 1 || AcctType > 23) return null; // No Product - get Default from Product Category @@ -183,10 +184,10 @@ public class ProductCost + "P_PurchasePriceVariance_Acct, P_InvoicePriceVariance_Acct, " // 5..6 + "P_TradeDiscountRec_Acct, P_TradeDiscountGrant_Acct," // 7..8 + "P_CostAdjustment_Acct, P_InventoryClearing_Acct," // 9..10 - + "P_WIP_Acct,P_MethodChangeVariance_Acct,P_UsageVariance_Acct," // 11.12.13 - + "P_RateVariance_Acct,P_MixVariance_Acct,P_FloorStock_Acct," // 14.15.16 + + "P_WIP_Acct,P_MethodChangeVariance_Acct,P_UsageVariance_Acct," // 11.12.13 + + "P_RateVariance_Acct,P_MixVariance_Acct,P_FloorStock_Acct," // 14.15.16 + "P_CostOfProduction_Acct,P_Labor_Acct,P_Burden_Acct,P_OutsideProcessing_Acct," // 17.18,19,20 - + "P_Overhead_Acct,P_Scrap_Acct " // 21,22 + + "P_Overhead_Acct,P_Scrap_Acct,P_AverageCostVariance_Acct " // 21,23 + "FROM M_Product_Acct " + "WHERE M_Product_ID=? AND C_AcctSchema_ID=?"; // @@ -224,7 +225,7 @@ public class ProductCost */ public MAccount getAccountDefault (int AcctType, MAcctSchema as) { - if (AcctType < 1 || AcctType > 22) + if (AcctType < 1 || AcctType > 23) return null; String sql = "SELECT P_Revenue_Acct, P_Expense_Acct, P_Asset_Acct, P_Cogs_Acct, " @@ -232,9 +233,9 @@ public class ProductCost + "P_TradeDiscountRec_Acct, P_TradeDiscountGrant_Acct, " + "P_CostAdjustment_Acct, P_InventoryClearing_Acct, " + "P_WIP_Acct,P_MethodChangeVariance_Acct,P_UsageVariance_Acct," // 11.12.13 - + "P_RateVariance_Acct,P_MixVariance_Acct,P_FloorStock_Acct," // 14.15.16 - + "P_CostOfProduction_Acct,P_Labor_Acct,P_Burden_Acct,P_OutsideProcessing_Acct" // 17.18,19,20 - + "P_Overhead_Acct,P_Scrap_Acct " // 21,22 + + "P_RateVariance_Acct,P_MixVariance_Acct,P_FloorStock_Acct," // 14.15.16 + + "P_CostOfProduction_Acct,P_Labor_Acct,P_Burden_Acct,P_OutsideProcessing_Acct," // 17.18,19,20 + + "P_Overhead_Acct,P_Scrap_Acct,P_AverageCostVariance_Acct " // 21,23 + "FROM M_Product_Category pc, M_Product_Category_Acct pca " + "WHERE pc.M_Product_Category_ID=pca.M_Product_Category_ID" + " AND pca.C_AcctSchema_ID=? " diff --git a/base/src/org/compiere/model/Query.java b/base/src/org/compiere/model/Query.java index 263c38a9f1..fd767e7b02 100644 --- a/base/src/org/compiere/model/Query.java +++ b/base/src/org/compiere/model/Query.java @@ -126,7 +126,7 @@ public class Query * Set query parameters * @param parameters */ - public Query setParameters(Object[] parameters) + public Query setParameters(Object ...parameters) { this.parameters = parameters; return this; @@ -754,4 +754,5 @@ public class Query } return retValue; } // get_IDs + } diff --git a/base/src/org/compiere/model/X_AD_Scheduler.java b/base/src/org/compiere/model/X_AD_Scheduler.java index 07dfcdc7b7..84d8ac2c78 100644 --- a/base/src/org/compiere/model/X_AD_Scheduler.java +++ b/base/src/org/compiere/model/X_AD_Scheduler.java @@ -31,7 +31,7 @@ public class X_AD_Scheduler extends PO implements I_AD_Scheduler, I_Persistent /** * */ - private static final long serialVersionUID = 20090915L; + private static final long serialVersionUID = 20100219L; /** Standard Constructor */ public X_AD_Scheduler (Properties ctx, int AD_Scheduler_ID, String trxName) @@ -41,8 +41,6 @@ public class X_AD_Scheduler extends PO implements I_AD_Scheduler, I_Persistent { setAD_Process_ID (0); setAD_Scheduler_ID (0); - setFrequency (0); - setFrequencyType (null); setKeepLogDays (0); // 7 setName (null); @@ -131,6 +129,23 @@ public class X_AD_Scheduler extends PO implements I_AD_Scheduler, I_Persistent return ii.intValue(); } + /** Set Cron Scheduling Pattern. + @param CronPattern + Cron pattern to define when the process should be invoked. + */ + public void setCronPattern (String CronPattern) + { + set_Value (COLUMNNAME_CronPattern, CronPattern); + } + + /** Get Cron Scheduling Pattern. + @return Cron pattern to define when the process should be invoked. + */ + public String getCronPattern () + { + return (String)get_Value(COLUMNNAME_CronPattern); + } + /** Set Date last run. @param DateLastRun Date the process was last run. @@ -228,6 +243,30 @@ public class X_AD_Scheduler extends PO implements I_AD_Scheduler, I_Persistent return (String)get_Value(COLUMNNAME_FrequencyType); } + /** Set Ignore Processing Time. + @param IsIgnoreProcessingTime + Do not include processing time for the DateNextRun calculation + */ + public void setIsIgnoreProcessingTime (boolean IsIgnoreProcessingTime) + { + set_Value (COLUMNNAME_IsIgnoreProcessingTime, Boolean.valueOf(IsIgnoreProcessingTime)); + } + + /** Get Ignore Processing Time. + @return Do not include processing time for the DateNextRun calculation + */ + public boolean isIgnoreProcessingTime () + { + Object oo = get_Value(COLUMNNAME_IsIgnoreProcessingTime); + if (oo != null) + { + if (oo instanceof Boolean) + return ((Boolean)oo).booleanValue(); + return "Y".equals(oo); + } + return false; + } + /** Set Days to keep Log. @param KeepLogDays Number of days to keep the log entries @@ -322,6 +361,8 @@ public class X_AD_Scheduler extends PO implements I_AD_Scheduler, I_Persistent public static final String SCHEDULETYPE_WeekDay = "W"; /** Month Day = M */ public static final String SCHEDULETYPE_MonthDay = "M"; + /** Cron Scheduling Pattern = C */ + public static final String SCHEDULETYPE_CronSchedulingPattern = "C"; /** Set Schedule Type. @param ScheduleType Type of schedule diff --git a/base/src/org/compiere/model/X_C_AcctSchema_Default.java b/base/src/org/compiere/model/X_C_AcctSchema_Default.java index 2e86892d93..0958c084bb 100644 --- a/base/src/org/compiere/model/X_C_AcctSchema_Default.java +++ b/base/src/org/compiere/model/X_C_AcctSchema_Default.java @@ -30,7 +30,7 @@ public class X_C_AcctSchema_Default extends PO implements I_C_AcctSchema_Default /** * */ - private static final long serialVersionUID = 20090915L; + private static final long serialVersionUID = 20100308L; /** Standard Constructor */ public X_C_AcctSchema_Default (Properties ctx, int C_AcctSchema_Default_ID, String trxName) @@ -878,6 +878,31 @@ public class X_C_AcctSchema_Default extends PO implements I_C_AcctSchema_Default return ii.intValue(); } + public I_C_ValidCombination getP_AverageCostVariance_A() throws RuntimeException + { + return (I_C_ValidCombination)MTable.get(getCtx(), I_C_ValidCombination.Table_Name) + .getPO(getP_AverageCostVariance_Acct(), get_TrxName()); } + + /** Set Average Cost Variance. + @param P_AverageCostVariance_Acct + Average Cost Variance + */ + public void setP_AverageCostVariance_Acct (int P_AverageCostVariance_Acct) + { + set_Value (COLUMNNAME_P_AverageCostVariance_Acct, Integer.valueOf(P_AverageCostVariance_Acct)); + } + + /** Get Average Cost Variance. + @return Average Cost Variance + */ + public int getP_AverageCostVariance_Acct () + { + Integer ii = (Integer)get_Value(COLUMNNAME_P_AverageCostVariance_Acct); + if (ii == null) + return 0; + return ii.intValue(); + } + public I_C_ValidCombination getPayDiscount_Exp_A() throws RuntimeException { return (I_C_ValidCombination)MTable.get(getCtx(), I_C_ValidCombination.Table_Name) @@ -1806,7 +1831,7 @@ public class X_C_AcctSchema_Default extends PO implements I_C_AcctSchema_Default /** Set Vendor Service Liability. @param V_Liability_Services_Acct - Account for Vender Service Liability + Account for Vendor Service Liability */ public void setV_Liability_Services_Acct (int V_Liability_Services_Acct) { @@ -1814,7 +1839,7 @@ public class X_C_AcctSchema_Default extends PO implements I_C_AcctSchema_Default } /** Get Vendor Service Liability. - @return Account for Vender Service Liability + @return Account for Vendor Service Liability */ public int getV_Liability_Services_Acct () { diff --git a/base/src/org/compiere/model/X_C_AllocationHdr.java b/base/src/org/compiere/model/X_C_AllocationHdr.java index 3bf8b4529b..f1585b8324 100644 --- a/base/src/org/compiere/model/X_C_AllocationHdr.java +++ b/base/src/org/compiere/model/X_C_AllocationHdr.java @@ -33,7 +33,7 @@ public class X_C_AllocationHdr extends PO implements I_C_AllocationHdr, I_Persis /** * */ - private static final long serialVersionUID = 20090915L; + private static final long serialVersionUID = 20100302L; /** Standard Constructor */ public X_C_AllocationHdr (Properties ctx, int C_AllocationHdr_ID, String trxName) @@ -421,6 +421,26 @@ public class X_C_AllocationHdr extends PO implements I_C_AllocationHdr, I_Persis return false; } + /** Set Processed On. + @param ProcessedOn + The date+time (expressed in decimal format) when the document has been processed + */ + public void setProcessedOn (BigDecimal ProcessedOn) + { + set_Value (COLUMNNAME_ProcessedOn, ProcessedOn); + } + + /** Get Processed On. + @return The date+time (expressed in decimal format) when the document has been processed + */ + public BigDecimal getProcessedOn () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_ProcessedOn); + if (bd == null) + return Env.ZERO; + return bd; + } + /** Set Process Now. @param Processing Process Now */ public void setProcessing (boolean Processing) diff --git a/base/src/org/compiere/model/X_C_BankStatement.java b/base/src/org/compiere/model/X_C_BankStatement.java index 334a24fb1d..fea0ed269a 100644 --- a/base/src/org/compiere/model/X_C_BankStatement.java +++ b/base/src/org/compiere/model/X_C_BankStatement.java @@ -33,7 +33,7 @@ public class X_C_BankStatement extends PO implements I_C_BankStatement, I_Persis /** * */ - private static final long serialVersionUID = 20090915L; + private static final long serialVersionUID = 20100302L; /** Standard Constructor */ public X_C_BankStatement (Properties ctx, int C_BankStatement_ID, String trxName) @@ -476,6 +476,26 @@ public class X_C_BankStatement extends PO implements I_C_BankStatement, I_Persis return false; } + /** Set Processed On. + @param ProcessedOn + The date+time (expressed in decimal format) when the document has been processed + */ + public void setProcessedOn (BigDecimal ProcessedOn) + { + set_Value (COLUMNNAME_ProcessedOn, ProcessedOn); + } + + /** Get Processed On. + @return The date+time (expressed in decimal format) when the document has been processed + */ + public BigDecimal getProcessedOn () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_ProcessedOn); + if (bd == null) + return Env.ZERO; + return bd; + } + /** Set Process Now. @param Processing Process Now */ public void setProcessing (boolean Processing) diff --git a/base/src/org/compiere/model/X_C_Cash.java b/base/src/org/compiere/model/X_C_Cash.java index 355b101de9..48a0eb5608 100644 --- a/base/src/org/compiere/model/X_C_Cash.java +++ b/base/src/org/compiere/model/X_C_Cash.java @@ -33,7 +33,7 @@ public class X_C_Cash extends PO implements I_C_Cash, I_Persistent /** * */ - private static final long serialVersionUID = 20090915L; + private static final long serialVersionUID = 20100302L; /** Standard Constructor */ public X_C_Cash (Properties ctx, int C_Cash_ID, String trxName) @@ -511,6 +511,26 @@ public class X_C_Cash extends PO implements I_C_Cash, I_Persistent return false; } + /** Set Processed On. + @param ProcessedOn + The date+time (expressed in decimal format) when the document has been processed + */ + public void setProcessedOn (BigDecimal ProcessedOn) + { + set_Value (COLUMNNAME_ProcessedOn, ProcessedOn); + } + + /** Get Processed On. + @return The date+time (expressed in decimal format) when the document has been processed + */ + public BigDecimal getProcessedOn () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_ProcessedOn); + if (bd == null) + return Env.ZERO; + return bd; + } + /** Set Process Now. @param Processing Process Now */ public void setProcessing (boolean Processing) diff --git a/base/src/org/compiere/model/X_C_Invoice.java b/base/src/org/compiere/model/X_C_Invoice.java index fcafb6a521..64a4d3d79f 100644 --- a/base/src/org/compiere/model/X_C_Invoice.java +++ b/base/src/org/compiere/model/X_C_Invoice.java @@ -33,7 +33,7 @@ public class X_C_Invoice extends PO implements I_C_Invoice, I_Persistent /** * */ - private static final long serialVersionUID = 20090915L; + private static final long serialVersionUID = 20100302L; /** Standard Constructor */ public X_C_Invoice (Properties ctx, int C_Invoice_ID, String trxName) @@ -859,15 +859,15 @@ public class X_C_Invoice extends PO implements I_C_Invoice, I_Persistent return new KeyNamePair(get_ID(), getDocumentNo()); } - /** Set Dunning Grace. - @param DunningGrace Dunning Grace */ + /** Set Dunning Grace Date. + @param DunningGrace Dunning Grace Date */ public void setDunningGrace (Timestamp DunningGrace) { set_Value (COLUMNNAME_DunningGrace, DunningGrace); } - /** Get Dunning Grace. - @return Dunning Grace */ + /** Get Dunning Grace Date. + @return Dunning Grace Date */ public Timestamp getDunningGrace () { return (Timestamp)get_Value(COLUMNNAME_DunningGrace); @@ -1333,6 +1333,26 @@ public class X_C_Invoice extends PO implements I_C_Invoice, I_Persistent return false; } + /** Set Processed On. + @param ProcessedOn + The date+time (expressed in decimal format) when the document has been processed + */ + public void setProcessedOn (BigDecimal ProcessedOn) + { + set_Value (COLUMNNAME_ProcessedOn, ProcessedOn); + } + + /** Get Processed On. + @return The date+time (expressed in decimal format) when the document has been processed + */ + public BigDecimal getProcessedOn () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_ProcessedOn); + if (bd == null) + return Env.ZERO; + return bd; + } + /** Set Process Now. @param Processing Process Now */ public void setProcessing (boolean Processing) diff --git a/base/src/org/compiere/model/X_C_Order.java b/base/src/org/compiere/model/X_C_Order.java index 225650790d..448266cb51 100644 --- a/base/src/org/compiere/model/X_C_Order.java +++ b/base/src/org/compiere/model/X_C_Order.java @@ -33,7 +33,7 @@ public class X_C_Order extends PO implements I_C_Order, I_Persistent /** * */ - private static final long serialVersionUID = 20091216L; + private static final long serialVersionUID = 20100302L; /** Standard Constructor */ public X_C_Order (Properties ctx, int C_Order_ID, String trxName) @@ -1637,15 +1637,18 @@ public class X_C_Order extends PO implements I_C_Order, I_Persistent return ii.intValue(); } - /** Set OrderType. - @param OrderType OrderType */ + /** Set Order Type. + @param OrderType + Type of Order: MRP records grouped by source (Sales Order, Purchase Order, Distribution Order, Requisition) + */ public void setOrderType (String OrderType) { set_Value (COLUMNNAME_OrderType, OrderType); } - /** Get OrderType. - @return OrderType */ + /** Get Order Type. + @return Type of Order: MRP records grouped by source (Sales Order, Purchase Order, Distribution Order, Requisition) + */ public String getOrderType () { return (String)get_Value(COLUMNNAME_OrderType); @@ -1826,6 +1829,26 @@ public class X_C_Order extends PO implements I_C_Order, I_Persistent return false; } + /** Set Processed On. + @param ProcessedOn + The date+time (expressed in decimal format) when the document has been processed + */ + public void setProcessedOn (BigDecimal ProcessedOn) + { + set_Value (COLUMNNAME_ProcessedOn, ProcessedOn); + } + + /** Get Processed On. + @return The date+time (expressed in decimal format) when the document has been processed + */ + public BigDecimal getProcessedOn () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_ProcessedOn); + if (bd == null) + return Env.ZERO; + return bd; + } + /** Set Process Now. @param Processing Process Now */ public void setProcessing (boolean Processing) diff --git a/base/src/org/compiere/model/X_C_Payment.java b/base/src/org/compiere/model/X_C_Payment.java index 68f9ae9358..eec15f6f78 100644 --- a/base/src/org/compiere/model/X_C_Payment.java +++ b/base/src/org/compiere/model/X_C_Payment.java @@ -33,7 +33,7 @@ public class X_C_Payment extends PO implements I_C_Payment, I_Persistent /** * */ - private static final long serialVersionUID = 20090915L; + private static final long serialVersionUID = 20100302L; /** Standard Constructor */ public X_C_Payment (Properties ctx, int C_Payment_ID, String trxName) @@ -1418,6 +1418,26 @@ public class X_C_Payment extends PO implements I_C_Payment, I_Persistent return false; } + /** Set Processed On. + @param ProcessedOn + The date+time (expressed in decimal format) when the document has been processed + */ + public void setProcessedOn (BigDecimal ProcessedOn) + { + set_Value (COLUMNNAME_ProcessedOn, ProcessedOn); + } + + /** Get Processed On. + @return The date+time (expressed in decimal format) when the document has been processed + */ + public BigDecimal getProcessedOn () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_ProcessedOn); + if (bd == null) + return Env.ZERO; + return bd; + } + /** Set Process Now. @param Processing Process Now */ public void setProcessing (boolean Processing) diff --git a/base/src/org/compiere/model/X_C_ProjectIssue.java b/base/src/org/compiere/model/X_C_ProjectIssue.java index ea7e046b71..6a5ef66833 100644 --- a/base/src/org/compiere/model/X_C_ProjectIssue.java +++ b/base/src/org/compiere/model/X_C_ProjectIssue.java @@ -33,7 +33,7 @@ public class X_C_ProjectIssue extends PO implements I_C_ProjectIssue, I_Persiste /** * */ - private static final long serialVersionUID = 20090915L; + private static final long serialVersionUID = 20100302L; /** Standard Constructor */ public X_C_ProjectIssue (Properties ctx, int C_ProjectIssue_ID, String trxName) @@ -377,6 +377,26 @@ public class X_C_ProjectIssue extends PO implements I_C_ProjectIssue, I_Persiste return false; } + /** Set Processed On. + @param ProcessedOn + The date+time (expressed in decimal format) when the document has been processed + */ + public void setProcessedOn (BigDecimal ProcessedOn) + { + set_Value (COLUMNNAME_ProcessedOn, ProcessedOn); + } + + /** Get Processed On. + @return The date+time (expressed in decimal format) when the document has been processed + */ + public BigDecimal getProcessedOn () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_ProcessedOn); + if (bd == null) + return Env.ZERO; + return bd; + } + /** Set Process Now. @param Processing Process Now */ public void setProcessing (boolean Processing) diff --git a/base/src/org/compiere/model/X_GL_Journal.java b/base/src/org/compiere/model/X_GL_Journal.java index 3e756bfa2c..c7048096bb 100644 --- a/base/src/org/compiere/model/X_GL_Journal.java +++ b/base/src/org/compiere/model/X_GL_Journal.java @@ -33,7 +33,7 @@ public class X_GL_Journal extends PO implements I_GL_Journal, I_Persistent /** * */ - private static final long serialVersionUID = 20090915L; + private static final long serialVersionUID = 20100302L; /** Standard Constructor */ public X_GL_Journal (Properties ctx, int GL_Journal_ID, String trxName) @@ -689,6 +689,26 @@ public class X_GL_Journal extends PO implements I_GL_Journal, I_Persistent return false; } + /** Set Processed On. + @param ProcessedOn + The date+time (expressed in decimal format) when the document has been processed + */ + public void setProcessedOn (BigDecimal ProcessedOn) + { + set_Value (COLUMNNAME_ProcessedOn, ProcessedOn); + } + + /** Get Processed On. + @return The date+time (expressed in decimal format) when the document has been processed + */ + public BigDecimal getProcessedOn () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_ProcessedOn); + if (bd == null) + return Env.ZERO; + return bd; + } + /** Set Process Now. @param Processing Process Now */ public void setProcessing (boolean Processing) diff --git a/base/src/org/compiere/model/X_I_ReportLine.java b/base/src/org/compiere/model/X_I_ReportLine.java index 97b0168b37..065c9a089d 100644 --- a/base/src/org/compiere/model/X_I_ReportLine.java +++ b/base/src/org/compiere/model/X_I_ReportLine.java @@ -30,7 +30,7 @@ public class X_I_ReportLine extends PO implements I_I_ReportLine, I_Persistent /** * */ - private static final long serialVersionUID = 20090915L; + private static final long serialVersionUID = 20100201L; /** Standard Constructor */ public X_I_ReportLine (Properties ctx, int I_ReportLine_ID, String trxName) @@ -71,52 +71,6 @@ public class X_I_ReportLine extends PO implements I_I_ReportLine, I_Persistent return sb.toString(); } - /** AmountType AD_Reference_ID=235 */ - public static final int AMOUNTTYPE_AD_Reference_ID=235; - /** Total Debit Only = DT */ - public static final String AMOUNTTYPE_TotalDebitOnly = "DT"; - /** Total Credit Only = CT */ - public static final String AMOUNTTYPE_TotalCreditOnly = "CT"; - /** Total Balance = BT */ - public static final String AMOUNTTYPE_TotalBalance = "BT"; - /** Period Balance = BP */ - public static final String AMOUNTTYPE_PeriodBalance = "BP"; - /** Period Credit Only = CP */ - public static final String AMOUNTTYPE_PeriodCreditOnly = "CP"; - /** Period Debit Only = DP */ - public static final String AMOUNTTYPE_PeriodDebitOnly = "DP"; - /** Period Quantity = QP */ - public static final String AMOUNTTYPE_PeriodQuantity = "QP"; - /** Total Quantity = QT */ - public static final String AMOUNTTYPE_TotalQuantity = "QT"; - /** Year Balance = BY */ - public static final String AMOUNTTYPE_YearBalance = "BY"; - /** Year Credit Only = CY */ - public static final String AMOUNTTYPE_YearCreditOnly = "CY"; - /** Year Debit Only = DY */ - public static final String AMOUNTTYPE_YearDebitOnly = "DY"; - /** Year Quantity = QY */ - public static final String AMOUNTTYPE_YearQuantity = "QY"; - /** Natural Balance = BN */ - public static final String AMOUNTTYPE_NaturalBalance = "BN"; - /** Set Amount Type. - @param AmountType - Type of amount to report - */ - public void setAmountType (String AmountType) - { - - set_Value (COLUMNNAME_AmountType, AmountType); - } - - /** Get Amount Type. - @return Type of amount to report - */ - public String getAmountType () - { - return (String)get_Value(COLUMNNAME_AmountType); - } - /** CalculationType AD_Reference_ID=236 */ public static final int CALCULATIONTYPE_AD_Reference_ID=236; /** Add (Op1+Op2) = A */ @@ -362,6 +316,66 @@ public class X_I_ReportLine extends PO implements I_I_ReportLine, I_Persistent return new KeyNamePair(get_ID(), getName()); } + /** PAAmountType AD_Reference_ID=53328 */ + public static final int PAAMOUNTTYPE_AD_Reference_ID=53328; + /** Balance (expected sign) = B */ + public static final String PAAMOUNTTYPE_BalanceExpectedSign = "B"; + /** Credit Only = C */ + public static final String PAAMOUNTTYPE_CreditOnly = "C"; + /** Debit Only = D */ + public static final String PAAMOUNTTYPE_DebitOnly = "D"; + /** Quantity (expected sign) = Q */ + public static final String PAAMOUNTTYPE_QuantityExpectedSign = "Q"; + /** Balance (accounted sign) = S */ + public static final String PAAMOUNTTYPE_BalanceAccountedSign = "S"; + /** Quantity (accounted sign) = R */ + public static final String PAAMOUNTTYPE_QuantityAccountedSign = "R"; + /** Set Amount Type. + @param PAAmountType + PA Amount Type for reporting + */ + public void setPAAmountType (String PAAmountType) + { + + set_Value (COLUMNNAME_PAAmountType, PAAmountType); + } + + /** Get Amount Type. + @return PA Amount Type for reporting + */ + public String getPAAmountType () + { + return (String)get_Value(COLUMNNAME_PAAmountType); + } + + /** PAPeriodType AD_Reference_ID=53327 */ + public static final int PAPERIODTYPE_AD_Reference_ID=53327; + /** Total = T */ + public static final String PAPERIODTYPE_Total = "T"; + /** Year = Y */ + public static final String PAPERIODTYPE_Year = "Y"; + /** Period = P */ + public static final String PAPERIODTYPE_Period = "P"; + /** Natural = N */ + public static final String PAPERIODTYPE_Natural = "N"; + /** Set Period Type. + @param PAPeriodType + PA Period Type + */ + public void setPAPeriodType (String PAPeriodType) + { + + set_Value (COLUMNNAME_PAPeriodType, PAPeriodType); + } + + /** Get Period Type. + @return PA Period Type + */ + public String getPAPeriodType () + { + return (String)get_Value(COLUMNNAME_PAPeriodType); + } + public I_PA_ReportLine getPA_ReportLine() throws RuntimeException { return (I_PA_ReportLine)MTable.get(getCtx(), I_PA_ReportLine.Table_Name) diff --git a/base/src/org/compiere/model/X_M_InOut.java b/base/src/org/compiere/model/X_M_InOut.java index 2d287d1e9d..1d93cc4396 100644 --- a/base/src/org/compiere/model/X_M_InOut.java +++ b/base/src/org/compiere/model/X_M_InOut.java @@ -33,7 +33,7 @@ public class X_M_InOut extends PO implements I_M_InOut, I_Persistent /** * */ - private static final long serialVersionUID = 20090915L; + private static final long serialVersionUID = 20100302L; /** Standard Constructor */ public X_M_InOut (Properties ctx, int M_InOut_ID, String trxName) @@ -1325,6 +1325,26 @@ public class X_M_InOut extends PO implements I_M_InOut, I_Persistent return false; } + /** Set Processed On. + @param ProcessedOn + The date+time (expressed in decimal format) when the document has been processed + */ + public void setProcessedOn (BigDecimal ProcessedOn) + { + set_Value (COLUMNNAME_ProcessedOn, ProcessedOn); + } + + /** Get Processed On. + @return The date+time (expressed in decimal format) when the document has been processed + */ + public BigDecimal getProcessedOn () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_ProcessedOn); + if (bd == null) + return Env.ZERO; + return bd; + } + /** Set Process Now. @param Processing Process Now */ public void setProcessing (boolean Processing) diff --git a/base/src/org/compiere/model/X_M_Inventory.java b/base/src/org/compiere/model/X_M_Inventory.java index 548ad8320b..ad66fcecd5 100644 --- a/base/src/org/compiere/model/X_M_Inventory.java +++ b/base/src/org/compiere/model/X_M_Inventory.java @@ -33,7 +33,7 @@ public class X_M_Inventory extends PO implements I_M_Inventory, I_Persistent /** * */ - private static final long serialVersionUID = 20090915L; + private static final long serialVersionUID = 20100302L; /** Standard Constructor */ public X_M_Inventory (Properties ctx, int M_Inventory_ID, String trxName) @@ -559,6 +559,26 @@ public class X_M_Inventory extends PO implements I_M_Inventory, I_Persistent return false; } + /** Set Processed On. + @param ProcessedOn + The date+time (expressed in decimal format) when the document has been processed + */ + public void setProcessedOn (BigDecimal ProcessedOn) + { + set_Value (COLUMNNAME_ProcessedOn, ProcessedOn); + } + + /** Get Processed On. + @return The date+time (expressed in decimal format) when the document has been processed + */ + public BigDecimal getProcessedOn () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_ProcessedOn); + if (bd == null) + return Env.ZERO; + return bd; + } + /** Set Process Now. @param Processing Process Now */ public void setProcessing (boolean Processing) diff --git a/base/src/org/compiere/model/X_M_MatchInv.java b/base/src/org/compiere/model/X_M_MatchInv.java index 3cdb76ca39..b2339fa5a8 100644 --- a/base/src/org/compiere/model/X_M_MatchInv.java +++ b/base/src/org/compiere/model/X_M_MatchInv.java @@ -33,7 +33,7 @@ public class X_M_MatchInv extends PO implements I_M_MatchInv, I_Persistent /** * */ - private static final long serialVersionUID = 20090915L; + private static final long serialVersionUID = 20100302L; /** Standard Constructor */ public X_M_MatchInv (Properties ctx, int M_MatchInv_ID, String trxName) @@ -341,6 +341,26 @@ public class X_M_MatchInv extends PO implements I_M_MatchInv, I_Persistent return false; } + /** Set Processed On. + @param ProcessedOn + The date+time (expressed in decimal format) when the document has been processed + */ + public void setProcessedOn (BigDecimal ProcessedOn) + { + set_Value (COLUMNNAME_ProcessedOn, ProcessedOn); + } + + /** Get Processed On. + @return The date+time (expressed in decimal format) when the document has been processed + */ + public BigDecimal getProcessedOn () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_ProcessedOn); + if (bd == null) + return Env.ZERO; + return bd; + } + /** Set Process Now. @param Processing Process Now */ public void setProcessing (boolean Processing) diff --git a/base/src/org/compiere/model/X_M_MatchPO.java b/base/src/org/compiere/model/X_M_MatchPO.java index 1ce43a1b64..92df35fa15 100644 --- a/base/src/org/compiere/model/X_M_MatchPO.java +++ b/base/src/org/compiere/model/X_M_MatchPO.java @@ -33,7 +33,7 @@ public class X_M_MatchPO extends PO implements I_M_MatchPO, I_Persistent /** * */ - private static final long serialVersionUID = 20090915L; + private static final long serialVersionUID = 20100302L; /** Standard Constructor */ public X_M_MatchPO (Properties ctx, int M_MatchPO_ID, String trxName) @@ -413,6 +413,26 @@ public class X_M_MatchPO extends PO implements I_M_MatchPO, I_Persistent return false; } + /** Set Processed On. + @param ProcessedOn + The date+time (expressed in decimal format) when the document has been processed + */ + public void setProcessedOn (BigDecimal ProcessedOn) + { + set_Value (COLUMNNAME_ProcessedOn, ProcessedOn); + } + + /** Get Processed On. + @return The date+time (expressed in decimal format) when the document has been processed + */ + public BigDecimal getProcessedOn () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_ProcessedOn); + if (bd == null) + return Env.ZERO; + return bd; + } + /** Set Process Now. @param Processing Process Now */ public void setProcessing (boolean Processing) diff --git a/base/src/org/compiere/model/X_M_Movement.java b/base/src/org/compiere/model/X_M_Movement.java index 89e6587663..7c23114dbd 100644 --- a/base/src/org/compiere/model/X_M_Movement.java +++ b/base/src/org/compiere/model/X_M_Movement.java @@ -33,7 +33,7 @@ public class X_M_Movement extends PO implements I_M_Movement, I_Persistent /** * */ - private static final long serialVersionUID = 20090915L; + private static final long serialVersionUID = 20100302L; /** Standard Constructor */ public X_M_Movement (Properties ctx, int M_Movement_ID, String trxName) @@ -882,6 +882,26 @@ public class X_M_Movement extends PO implements I_M_Movement, I_Persistent return false; } + /** Set Processed On. + @param ProcessedOn + The date+time (expressed in decimal format) when the document has been processed + */ + public void setProcessedOn (BigDecimal ProcessedOn) + { + set_Value (COLUMNNAME_ProcessedOn, ProcessedOn); + } + + /** Get Processed On. + @return The date+time (expressed in decimal format) when the document has been processed + */ + public BigDecimal getProcessedOn () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_ProcessedOn); + if (bd == null) + return Env.ZERO; + return bd; + } + /** Set Process Now. @param Processing Process Now */ public void setProcessing (boolean Processing) diff --git a/base/src/org/compiere/model/X_M_Product_Acct.java b/base/src/org/compiere/model/X_M_Product_Acct.java index 7a9865fdfc..342dfc1425 100644 --- a/base/src/org/compiere/model/X_M_Product_Acct.java +++ b/base/src/org/compiere/model/X_M_Product_Acct.java @@ -29,7 +29,7 @@ public class X_M_Product_Acct extends PO implements I_M_Product_Acct, I_Persiste /** * */ - private static final long serialVersionUID = 20090915L; + private static final long serialVersionUID = 20100308L; /** Standard Constructor */ public X_M_Product_Acct (Properties ctx, int M_Product_Acct_ID, String trxName) @@ -173,6 +173,31 @@ public class X_M_Product_Acct extends PO implements I_M_Product_Acct, I_Persiste return ii.intValue(); } + public I_C_ValidCombination getP_AverageCostVariance_A() throws RuntimeException + { + return (I_C_ValidCombination)MTable.get(getCtx(), I_C_ValidCombination.Table_Name) + .getPO(getP_AverageCostVariance_Acct(), get_TrxName()); } + + /** Set Average Cost Variance. + @param P_AverageCostVariance_Acct + Average Cost Variance + */ + public void setP_AverageCostVariance_Acct (int P_AverageCostVariance_Acct) + { + set_Value (COLUMNNAME_P_AverageCostVariance_Acct, Integer.valueOf(P_AverageCostVariance_Acct)); + } + + /** Get Average Cost Variance. + @return Average Cost Variance + */ + public int getP_AverageCostVariance_Acct () + { + Integer ii = (Integer)get_Value(COLUMNNAME_P_AverageCostVariance_Acct); + if (ii == null) + return 0; + return ii.intValue(); + } + public I_C_ValidCombination getP_Burden_A() throws RuntimeException { return (I_C_ValidCombination)MTable.get(getCtx(), I_C_ValidCombination.Table_Name) diff --git a/base/src/org/compiere/model/X_M_Product_Category_Acct.java b/base/src/org/compiere/model/X_M_Product_Category_Acct.java index fe592872bd..8079e9ce2b 100644 --- a/base/src/org/compiere/model/X_M_Product_Category_Acct.java +++ b/base/src/org/compiere/model/X_M_Product_Category_Acct.java @@ -29,7 +29,7 @@ public class X_M_Product_Category_Acct extends PO implements I_M_Product_Categor /** * */ - private static final long serialVersionUID = 20090915L; + private static final long serialVersionUID = 20100308L; /** Standard Constructor */ public X_M_Product_Category_Acct (Properties ctx, int M_Product_Category_Acct_ID, String trxName) @@ -237,6 +237,31 @@ public class X_M_Product_Category_Acct extends PO implements I_M_Product_Categor return ii.intValue(); } + public I_C_ValidCombination getP_AverageCostVariance_A() throws RuntimeException + { + return (I_C_ValidCombination)MTable.get(getCtx(), I_C_ValidCombination.Table_Name) + .getPO(getP_AverageCostVariance_Acct(), get_TrxName()); } + + /** Set Average Cost Variance. + @param P_AverageCostVariance_Acct + Average Cost Variance + */ + public void setP_AverageCostVariance_Acct (int P_AverageCostVariance_Acct) + { + set_Value (COLUMNNAME_P_AverageCostVariance_Acct, Integer.valueOf(P_AverageCostVariance_Acct)); + } + + /** Get Average Cost Variance. + @return Average Cost Variance + */ + public int getP_AverageCostVariance_Acct () + { + Integer ii = (Integer)get_Value(COLUMNNAME_P_AverageCostVariance_Acct); + if (ii == null) + return 0; + return ii.intValue(); + } + public I_C_ValidCombination getP_Burden_A() throws RuntimeException { return (I_C_ValidCombination)MTable.get(getCtx(), I_C_ValidCombination.Table_Name) diff --git a/base/src/org/compiere/model/X_M_Production.java b/base/src/org/compiere/model/X_M_Production.java index f5f0ecfeae..557de16fc2 100644 --- a/base/src/org/compiere/model/X_M_Production.java +++ b/base/src/org/compiere/model/X_M_Production.java @@ -17,9 +17,11 @@ /** Generated Model - DO NOT CHANGE */ package org.compiere.model; +import java.math.BigDecimal; import java.sql.ResultSet; import java.sql.Timestamp; import java.util.Properties; +import org.compiere.util.Env; import org.compiere.util.KeyNamePair; /** Generated Model for M_Production @@ -31,7 +33,7 @@ public class X_M_Production extends PO implements I_M_Production, I_Persistent /** * */ - private static final long serialVersionUID = 20090915L; + private static final long serialVersionUID = 20100302L; /** Standard Constructor */ public X_M_Production (Properties ctx, int M_Production_ID, String trxName) @@ -335,6 +337,26 @@ public class X_M_Production extends PO implements I_M_Production, I_Persistent return false; } + /** Set Processed On. + @param ProcessedOn + The date+time (expressed in decimal format) when the document has been processed + */ + public void setProcessedOn (BigDecimal ProcessedOn) + { + set_Value (COLUMNNAME_ProcessedOn, ProcessedOn); + } + + /** Get Processed On. + @return The date+time (expressed in decimal format) when the document has been processed + */ + public BigDecimal getProcessedOn () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_ProcessedOn); + if (bd == null) + return Env.ZERO; + return bd; + } + /** Set Process Now. @param Processing Process Now */ public void setProcessing (boolean Processing) diff --git a/base/src/org/compiere/model/X_M_Requisition.java b/base/src/org/compiere/model/X_M_Requisition.java index 6f367545b2..bb0b67d75f 100644 --- a/base/src/org/compiere/model/X_M_Requisition.java +++ b/base/src/org/compiere/model/X_M_Requisition.java @@ -33,7 +33,7 @@ public class X_M_Requisition extends PO implements I_M_Requisition, I_Persistent /** * */ - private static final long serialVersionUID = 20090915L; + private static final long serialVersionUID = 20100302L; /** Standard Constructor */ public X_M_Requisition (Properties ctx, int M_Requisition_ID, String trxName) @@ -513,6 +513,26 @@ public class X_M_Requisition extends PO implements I_M_Requisition, I_Persistent return false; } + /** Set Processed On. + @param ProcessedOn + The date+time (expressed in decimal format) when the document has been processed + */ + public void setProcessedOn (BigDecimal ProcessedOn) + { + set_Value (COLUMNNAME_ProcessedOn, ProcessedOn); + } + + /** Get Processed On. + @return The date+time (expressed in decimal format) when the document has been processed + */ + public BigDecimal getProcessedOn () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_ProcessedOn); + if (bd == null) + return Env.ZERO; + return bd; + } + /** Set Process Now. @param Processing Process Now */ public void setProcessing (boolean Processing) diff --git a/base/src/org/compiere/model/X_PA_ReportColumn.java b/base/src/org/compiere/model/X_PA_ReportColumn.java index 5d4a35ba85..a6eb3e21f9 100644 --- a/base/src/org/compiere/model/X_PA_ReportColumn.java +++ b/base/src/org/compiere/model/X_PA_ReportColumn.java @@ -32,7 +32,7 @@ public class X_PA_ReportColumn extends PO implements I_PA_ReportColumn, I_Persis /** * */ - private static final long serialVersionUID = 20090915L; + private static final long serialVersionUID = 20100201L; /** Standard Constructor */ public X_PA_ReportColumn (Properties ctx, int PA_ReportColumn_ID, String trxName) @@ -129,52 +129,6 @@ public class X_PA_ReportColumn extends PO implements I_PA_ReportColumn, I_Persis return ii.intValue(); } - /** AmountType AD_Reference_ID=235 */ - public static final int AMOUNTTYPE_AD_Reference_ID=235; - /** Total Debit Only = DT */ - public static final String AMOUNTTYPE_TotalDebitOnly = "DT"; - /** Total Credit Only = CT */ - public static final String AMOUNTTYPE_TotalCreditOnly = "CT"; - /** Total Balance = BT */ - public static final String AMOUNTTYPE_TotalBalance = "BT"; - /** Period Balance = BP */ - public static final String AMOUNTTYPE_PeriodBalance = "BP"; - /** Period Credit Only = CP */ - public static final String AMOUNTTYPE_PeriodCreditOnly = "CP"; - /** Period Debit Only = DP */ - public static final String AMOUNTTYPE_PeriodDebitOnly = "DP"; - /** Period Quantity = QP */ - public static final String AMOUNTTYPE_PeriodQuantity = "QP"; - /** Total Quantity = QT */ - public static final String AMOUNTTYPE_TotalQuantity = "QT"; - /** Year Balance = BY */ - public static final String AMOUNTTYPE_YearBalance = "BY"; - /** Year Credit Only = CY */ - public static final String AMOUNTTYPE_YearCreditOnly = "CY"; - /** Year Debit Only = DY */ - public static final String AMOUNTTYPE_YearDebitOnly = "DY"; - /** Year Quantity = QY */ - public static final String AMOUNTTYPE_YearQuantity = "QY"; - /** Natural Balance = BN */ - public static final String AMOUNTTYPE_NaturalBalance = "BN"; - /** Set Amount Type. - @param AmountType - Type of amount to report - */ - public void setAmountType (String AmountType) - { - - set_Value (COLUMNNAME_AmountType, AmountType); - } - - /** Get Amount Type. - @return Type of amount to report - */ - public String getAmountType () - { - return (String)get_Value(COLUMNNAME_AmountType); - } - public I_C_Activity getC_Activity() throws RuntimeException { return (I_C_Activity)MTable.get(getCtx(), I_C_Activity.Table_Name) @@ -1076,6 +1030,66 @@ public class X_PA_ReportColumn extends PO implements I_PA_ReportColumn, I_Persis return ii.intValue(); } + /** PAAmountType AD_Reference_ID=53328 */ + public static final int PAAMOUNTTYPE_AD_Reference_ID=53328; + /** Balance (expected sign) = B */ + public static final String PAAMOUNTTYPE_BalanceExpectedSign = "B"; + /** Credit Only = C */ + public static final String PAAMOUNTTYPE_CreditOnly = "C"; + /** Debit Only = D */ + public static final String PAAMOUNTTYPE_DebitOnly = "D"; + /** Quantity (expected sign) = Q */ + public static final String PAAMOUNTTYPE_QuantityExpectedSign = "Q"; + /** Balance (accounted sign) = S */ + public static final String PAAMOUNTTYPE_BalanceAccountedSign = "S"; + /** Quantity (accounted sign) = R */ + public static final String PAAMOUNTTYPE_QuantityAccountedSign = "R"; + /** Set Amount Type. + @param PAAmountType + PA Amount Type for reporting + */ + public void setPAAmountType (String PAAmountType) + { + + set_Value (COLUMNNAME_PAAmountType, PAAmountType); + } + + /** Get Amount Type. + @return PA Amount Type for reporting + */ + public String getPAAmountType () + { + return (String)get_Value(COLUMNNAME_PAAmountType); + } + + /** PAPeriodType AD_Reference_ID=53327 */ + public static final int PAPERIODTYPE_AD_Reference_ID=53327; + /** Total = T */ + public static final String PAPERIODTYPE_Total = "T"; + /** Year = Y */ + public static final String PAPERIODTYPE_Year = "Y"; + /** Period = P */ + public static final String PAPERIODTYPE_Period = "P"; + /** Natural = N */ + public static final String PAPERIODTYPE_Natural = "N"; + /** Set Period Type. + @param PAPeriodType + PA Period Type + */ + public void setPAPeriodType (String PAPeriodType) + { + + set_Value (COLUMNNAME_PAPeriodType, PAPeriodType); + } + + /** Get Period Type. + @return PA Period Type + */ + public String getPAPeriodType () + { + return (String)get_Value(COLUMNNAME_PAPeriodType); + } + /** Set Report Column. @param PA_ReportColumn_ID Column in Report diff --git a/base/src/org/compiere/model/X_PA_ReportLine.java b/base/src/org/compiere/model/X_PA_ReportLine.java index dabf3efcdc..b42966d843 100644 --- a/base/src/org/compiere/model/X_PA_ReportLine.java +++ b/base/src/org/compiere/model/X_PA_ReportLine.java @@ -30,7 +30,7 @@ public class X_PA_ReportLine extends PO implements I_PA_ReportLine, I_Persistent /** * */ - private static final long serialVersionUID = 20090915L; + private static final long serialVersionUID = 20100201L; /** Standard Constructor */ public X_PA_ReportLine (Properties ctx, int PA_ReportLine_ID, String trxName) @@ -77,52 +77,6 @@ public class X_PA_ReportLine extends PO implements I_PA_ReportLine, I_Persistent return sb.toString(); } - /** AmountType AD_Reference_ID=235 */ - public static final int AMOUNTTYPE_AD_Reference_ID=235; - /** Total Debit Only = DT */ - public static final String AMOUNTTYPE_TotalDebitOnly = "DT"; - /** Total Credit Only = CT */ - public static final String AMOUNTTYPE_TotalCreditOnly = "CT"; - /** Total Balance = BT */ - public static final String AMOUNTTYPE_TotalBalance = "BT"; - /** Period Balance = BP */ - public static final String AMOUNTTYPE_PeriodBalance = "BP"; - /** Period Credit Only = CP */ - public static final String AMOUNTTYPE_PeriodCreditOnly = "CP"; - /** Period Debit Only = DP */ - public static final String AMOUNTTYPE_PeriodDebitOnly = "DP"; - /** Period Quantity = QP */ - public static final String AMOUNTTYPE_PeriodQuantity = "QP"; - /** Total Quantity = QT */ - public static final String AMOUNTTYPE_TotalQuantity = "QT"; - /** Year Balance = BY */ - public static final String AMOUNTTYPE_YearBalance = "BY"; - /** Year Credit Only = CY */ - public static final String AMOUNTTYPE_YearCreditOnly = "CY"; - /** Year Debit Only = DY */ - public static final String AMOUNTTYPE_YearDebitOnly = "DY"; - /** Year Quantity = QY */ - public static final String AMOUNTTYPE_YearQuantity = "QY"; - /** Natural Balance = BN */ - public static final String AMOUNTTYPE_NaturalBalance = "BN"; - /** Set Amount Type. - @param AmountType - Type of amount to report - */ - public void setAmountType (String AmountType) - { - - set_Value (COLUMNNAME_AmountType, AmountType); - } - - /** Get Amount Type. - @return Type of amount to report - */ - public String getAmountType () - { - return (String)get_Value(COLUMNNAME_AmountType); - } - /** CalculationType AD_Reference_ID=236 */ public static final int CALCULATIONTYPE_AD_Reference_ID=236; /** Add (Op1+Op2) = A */ @@ -319,6 +273,66 @@ public class X_PA_ReportLine extends PO implements I_PA_ReportLine, I_Persistent return ii.intValue(); } + /** PAAmountType AD_Reference_ID=53328 */ + public static final int PAAMOUNTTYPE_AD_Reference_ID=53328; + /** Balance (expected sign) = B */ + public static final String PAAMOUNTTYPE_BalanceExpectedSign = "B"; + /** Credit Only = C */ + public static final String PAAMOUNTTYPE_CreditOnly = "C"; + /** Debit Only = D */ + public static final String PAAMOUNTTYPE_DebitOnly = "D"; + /** Quantity (expected sign) = Q */ + public static final String PAAMOUNTTYPE_QuantityExpectedSign = "Q"; + /** Balance (accounted sign) = S */ + public static final String PAAMOUNTTYPE_BalanceAccountedSign = "S"; + /** Quantity (accounted sign) = R */ + public static final String PAAMOUNTTYPE_QuantityAccountedSign = "R"; + /** Set Amount Type. + @param PAAmountType + PA Amount Type for reporting + */ + public void setPAAmountType (String PAAmountType) + { + + set_Value (COLUMNNAME_PAAmountType, PAAmountType); + } + + /** Get Amount Type. + @return PA Amount Type for reporting + */ + public String getPAAmountType () + { + return (String)get_Value(COLUMNNAME_PAAmountType); + } + + /** PAPeriodType AD_Reference_ID=53327 */ + public static final int PAPERIODTYPE_AD_Reference_ID=53327; + /** Total = T */ + public static final String PAPERIODTYPE_Total = "T"; + /** Year = Y */ + public static final String PAPERIODTYPE_Year = "Y"; + /** Period = P */ + public static final String PAPERIODTYPE_Period = "P"; + /** Natural = N */ + public static final String PAPERIODTYPE_Natural = "N"; + /** Set Period Type. + @param PAPeriodType + PA Period Type + */ + public void setPAPeriodType (String PAPeriodType) + { + + set_Value (COLUMNNAME_PAPeriodType, PAPeriodType); + } + + /** Get Period Type. + @return PA Period Type + */ + public String getPAPeriodType () + { + return (String)get_Value(COLUMNNAME_PAPeriodType); + } + /** Set Report Line. @param PA_ReportLine_ID Report Line */ public void setPA_ReportLine_ID (int PA_ReportLine_ID) diff --git a/base/src/org/compiere/process/AcctSchemaDefaultCopy.java b/base/src/org/compiere/process/AcctSchemaDefaultCopy.java index 3df74156df..516d46e93a 100644 --- a/base/src/org/compiere/process/AcctSchemaDefaultCopy.java +++ b/base/src/org/compiere/process/AcctSchemaDefaultCopy.java @@ -94,6 +94,7 @@ public class AcctSchemaDefaultCopy extends SvrProcess + ", P_COGS_Acct=" + acct.getP_COGS_Acct() + ", P_PurchasePriceVariance_Acct=" + acct.getP_PurchasePriceVariance_Acct() + ", P_InvoicePriceVariance_Acct=" + acct.getP_InvoicePriceVariance_Acct() + + ", P_AverageCostVariance_Acct=" + acct.getP_AverageCostVariance_Acct() + ", P_TradeDiscountRec_Acct=" + acct.getP_TradeDiscountRec_Acct() + ", P_TradeDiscountGrant_Acct=" + acct.getP_TradeDiscountGrant_Acct() + ", P_WIP_Acct=" + acct.getP_WIP_Acct() @@ -121,14 +122,14 @@ public class AcctSchemaDefaultCopy extends SvrProcess + "(M_Product_Category_ID, C_AcctSchema_ID," + " AD_Client_ID, AD_Org_ID, IsActive, Created, CreatedBy, Updated, UpdatedBy," + " P_Revenue_Acct, P_Expense_Acct, P_CostAdjustment_Acct, P_InventoryClearing_Acct, P_Asset_Acct, P_CoGs_Acct," - + " P_PurchasePriceVariance_Acct, P_InvoicePriceVariance_Acct," + + " P_PurchasePriceVariance_Acct, P_InvoicePriceVariance_Acct, P_AverageCostVariance_Acct," + " P_TradeDiscountRec_Acct, P_TradeDiscountGrant_Acct," + " P_WIP_Acct,P_FloorStock_Acct,P_MethodChangeVariance_Acct,P_UsageVariance_Acct,P_RateVariance_Acct," + " P_MixVariance_Acct,P_Labor_Acct,P_Burden_Acct,P_CostOfProduction_Acct,P_OutsideProcessing_Acct,P_Overhead_Acct,P_Scrap_Acct) " + " SELECT p.M_Product_Category_ID, acct.C_AcctSchema_ID," + " p.AD_Client_ID, p.AD_Org_ID, 'Y', SysDate, 0, SysDate, 0," + " acct.P_Revenue_Acct, acct.P_Expense_Acct, acct.P_CostAdjustment_Acct, acct.P_InventoryClearing_Acct, acct.P_Asset_Acct, acct.P_CoGs_Acct," - + " acct.P_PurchasePriceVariance_Acct, acct.P_InvoicePriceVariance_Acct," + + " acct.P_PurchasePriceVariance_Acct, acct.P_InvoicePriceVariance_Acct, acct.P_AverageCostVariance_Acct," + " acct.P_TradeDiscountRec_Acct, acct.P_TradeDiscountGrant_Acct," + " acct.P_WIP_Acct,acct.P_FloorStock_Acct,acct.P_MethodChangeVariance_Acct,acct.P_UsageVariance_Acct,acct.P_RateVariance_Acct," + " acct.P_MixVariance_Acct,acct.P_Labor_Acct,acct.P_Burden_Acct,acct.P_CostOfProduction_Acct,acct.P_OutsideProcessing_Acct,P_Overhead_Acct,P_Scrap_Acct " @@ -147,14 +148,14 @@ public class AcctSchemaDefaultCopy extends SvrProcess + "(M_Product_ID, C_AcctSchema_ID," + " AD_Client_ID, AD_Org_ID, IsActive, Created, CreatedBy, Updated, UpdatedBy," + " P_Revenue_Acct, P_Expense_Acct, P_CostAdjustment_Acct, P_InventoryClearing_Acct, P_Asset_Acct, P_CoGs_Acct," - + " P_PurchasePriceVariance_Acct, P_InvoicePriceVariance_Acct," + + " P_PurchasePriceVariance_Acct, P_InvoicePriceVariance_Acct, P_AverageCostVariance_Acct," + " P_TradeDiscountRec_Acct, P_TradeDiscountGrant_Acct, " + " P_WIP_Acct,P_FloorStock_Acct,P_MethodChangeVariance_Acct,P_UsageVariance_Acct,P_RateVariance_Acct," + " P_MixVariance_Acct,P_Labor_Acct,P_Burden_Acct,P_CostOfProduction_Acct,P_OutsideProcessing_Acct,P_Overhead_Acct,P_Scrap_Acct) " + "SELECT p.M_Product_ID, acct.C_AcctSchema_ID," + " p.AD_Client_ID, p.AD_Org_ID, 'Y', SysDate, 0, SysDate, 0," + " acct.P_Revenue_Acct, acct.P_Expense_Acct, acct.P_CostAdjustment_Acct, acct.P_InventoryClearing_Acct, acct.P_Asset_Acct, acct.P_CoGs_Acct," - + " acct.P_PurchasePriceVariance_Acct, acct.P_InvoicePriceVariance_Acct," + + " acct.P_PurchasePriceVariance_Acct, acct.P_InvoicePriceVariance_Acct, acct.P_AverageCostVariance_Acct," + " acct.P_TradeDiscountRec_Acct, acct.P_TradeDiscountGrant_Acct," + " acct.P_WIP_Acct,acct.P_FloorStock_Acct,acct.P_MethodChangeVariance_Acct,acct.P_UsageVariance_Acct,acct.P_RateVariance_Acct," + " acct.P_MixVariance_Acct,acct.P_Labor_Acct,acct.P_Burden_Acct,acct.P_CostOfProduction_Acct,acct.P_OutsideProcessing_Acct,acct.P_Overhead_Acct,acct.P_Scrap_Acct " diff --git a/base/src/org/compiere/process/AllocationReset.java b/base/src/org/compiere/process/AllocationReset.java index 4306e57c11..a61bfea2ee 100644 --- a/base/src/org/compiere/process/AllocationReset.java +++ b/base/src/org/compiere/process/AllocationReset.java @@ -79,6 +79,12 @@ public class AllocationReset extends SvrProcess else log.log(Level.SEVERE, "Unknown Parameter: " + name); } + + if ( !p_AllAllocations && getTable_ID() == MAllocationHdr.Table_ID && getRecord_ID() > 0 ) + { + p_C_AllocationHdr_ID = getRecord_ID(); + } + } // prepare /** diff --git a/base/src/org/compiere/process/BPartnerValidate.java b/base/src/org/compiere/process/BPartnerValidate.java index 0d6c754ac6..5aac8008ab 100644 --- a/base/src/org/compiere/process/BPartnerValidate.java +++ b/base/src/org/compiere/process/BPartnerValidate.java @@ -21,6 +21,7 @@ import java.sql.SQLException; import java.util.Iterator; import java.util.logging.Level; +import org.compiere.model.I_C_BPartner; import org.compiere.model.MBPartner; import org.compiere.model.MInvoice; import org.compiere.model.MPayment; @@ -84,9 +85,9 @@ public class BPartnerValidate extends SvrProcess } else { - String whereClause = "C_BP_Group_ID=?"; - Iterator it = new Query(getCtx(), MBPartner.Table_Name, whereClause, get_TrxName()) - .setParameters(new Object[]{p_C_BP_Group_ID}) + final String whereClause = "C_BP_Group_ID=?"; + Iterator it = new Query(getCtx(), I_C_BPartner.Table_Name, whereClause, get_TrxName()) + .setParameters(p_C_BP_Group_ID) .setOnlyActiveRecords(true) .iterate(); while(it.hasNext()) diff --git a/base/src/org/compiere/process/DistributionRun.java b/base/src/org/compiere/process/DistributionRun.java index fd0cc0bc1d..75a728e1db 100644 --- a/base/src/org/compiere/process/DistributionRun.java +++ b/base/src/org/compiere/process/DistributionRun.java @@ -24,6 +24,7 @@ import java.util.List; import java.util.logging.Level; import org.adempiere.exceptions.AdempiereException; +import org.compiere.model.I_T_DistributionRunDetail; import org.compiere.model.MBPartner; import org.compiere.model.MDistributionRun; import org.compiere.model.MDistributionRunDetail; @@ -723,9 +724,9 @@ public class DistributionRun extends SvrProcess +" WHERE rl.M_DistributionRun_ID="+p_M_DistributionRun_ID+" AND l.RatioTotal<>0 AND rl.IsActive='Y' AND ll.IsActive='Y'"; no = DB.executeUpdate(sql, get_TrxName()); - Query query = MTable.get(getCtx(), MDistributionRunDetail.Table_ID). + Query query = MTable.get(getCtx(), I_T_DistributionRunDetail.Table_ID). createQuery(MDistributionRunDetail.COLUMNNAME_M_DistributionRun_ID + "=?", get_TrxName()); - query.setParameters(new Object[]{p_M_DistributionRun_ID}); + query.setParameters(p_M_DistributionRun_ID); List records = query.list(); diff --git a/base/src/org/compiere/process/DocumentEngine.java b/base/src/org/compiere/process/DocumentEngine.java index 174535dc9c..f5bc00e628 100644 --- a/base/src/org/compiere/process/DocumentEngine.java +++ b/base/src/org/compiere/process/DocumentEngine.java @@ -34,6 +34,7 @@ import org.compiere.model.MAllocationHdr; import org.compiere.model.MBankStatement; import org.compiere.model.MCash; import org.compiere.model.MClient; +import org.compiere.model.MColumn; import org.compiere.model.MInOut; import org.compiere.model.MInventory; import org.compiere.model.MInvoice; @@ -42,6 +43,7 @@ import org.compiere.model.MJournalBatch; import org.compiere.model.MMovement; import org.compiere.model.MOrder; import org.compiere.model.MPayment; +import org.compiere.model.MTable; import org.compiere.util.CLogger; import org.compiere.util.DB; import org.compiere.util.Env; @@ -287,20 +289,20 @@ public class DocumentEngine implements DocAction return false; } status = completeIt(); - if (m_document != null - && !Ini.isClient()) // Post Immediate if on Server + boolean ok = STATUS_Completed.equals(status) + || STATUS_InProgress.equals(status) + || STATUS_WaitingPayment.equals(status) + || STATUS_WaitingConfirmation.equals(status); + if (m_document != null && ok) { MClient client = MClient.get(m_document.getCtx(), m_document.getAD_Client_ID()); - if (STATUS_Completed.equals(status) && client.isPostImmediate()) + if (STATUS_Completed.equals(status) && MClient.isClientAccountingImmediate()) { m_document.save(); postIt(); } } - return STATUS_Completed.equals(status) - || STATUS_InProgress.equals(status) - || STATUS_WaitingPayment.equals(status) - || STATUS_WaitingConfirmation.equals(status); + return ok; } if (ACTION_ReActivate.equals(m_action)) return reActivateIt(); @@ -1228,6 +1230,10 @@ public class DocumentEngine implements DocAction public static String postImmediate (Properties ctx, int AD_Client_ID, int AD_Table_ID, int Record_ID, boolean force, String trxName) { + // Ensure the table has Posted column / i.e. GL_JournalBatch can be completed but not posted + if (MColumn.getColumn_ID(MTable.getTableName(ctx, AD_Table_ID), "Posted") <= 0) + return null; + String error = null; if (MClient.isClientAccounting()) { log.info ("Table=" + AD_Table_ID + ", Record=" + Record_ID); diff --git a/base/src/org/compiere/process/ImportBPartner.java b/base/src/org/compiere/process/ImportBPartner.java index 2be9263034..d4717193c9 100644 --- a/base/src/org/compiere/process/ImportBPartner.java +++ b/base/src/org/compiere/process/ImportBPartner.java @@ -243,19 +243,21 @@ implements ImportProcess + " AND I_IsImported='N'").append(clientCheck); no = DB.executeUpdateEx(sql.toString(), get_TrxName()); log.fine("Found Contact=" + no); - - // Existing Location ? Exact Match - sql = new StringBuffer ("UPDATE I_BPartner i " - + "SET C_BPartner_Location_ID=(SELECT C_BPartner_Location_ID" - + " FROM C_BPartner_Location bpl INNER JOIN C_Location l ON (bpl.C_Location_ID=l.C_Location_ID)" - + " WHERE i.C_BPartner_ID=bpl.C_BPartner_ID AND bpl.AD_Client_ID=i.AD_Client_ID" - + " AND COALESCE(i.Address1, 'NULL')=COALESCE(l.Address1, 'NULL') AND COALESCE(i.Address2, 'NULL')=COALESCE(l.Address2, 'NULL')" - + " AND COALESCE(i.City, 'NULL')=COALESCE(l.City, 'NULL') AND COALESCE(i.Postal, 'NULL')=COALESCE(l.Postal, 'NULL')" - + " AND COALESCE(i.Postal_Add, 'NULL')=COALESCE(l.Postal_Add, 'NULL')" - + " AND i.C_Region_ID=l.C_Region_ID AND i.C_Country_ID=l.C_Country_ID) " - + "WHERE C_BPartner_ID IS NOT NULL AND C_BPartner_Location_ID IS NULL" - + " AND I_IsImported='N'").append(clientCheck); - no = DB.executeUpdateEx(sql.toString(), get_TrxName()); + +// Existing Location ? Exact Match + sql = new StringBuffer ("UPDATE I_BPartner i " + + "SET C_BPartner_Location_ID=(SELECT C_BPartner_Location_ID" + + " FROM C_BPartner_Location bpl INNER JOIN C_Location l ON (bpl.C_Location_ID=l.C_Location_ID)" + + " WHERE i.C_BPartner_ID=bpl.C_BPartner_ID AND bpl.AD_Client_ID=i.AD_Client_ID" + + " AND (i.Address1=l.Address1 OR (i.Address1 IS NULL AND l.Address1 IS NULL))" + + " AND (i.Address2=l.Address2 OR (i.Address2 IS NULL AND l.Address2 IS NULL))" + + " AND (i.City=l.City OR (i.City IS NULL AND l.City IS NULL))" + + " AND (i.Postal=l.Postal OR (i.Postal IS NULL AND l.Postal IS NULL))" + + " AND (i.Postal_Add=l.Postal_Add OR (l.Postal_Add IS NULL AND l.Postal_Add IS NULL))" + + " AND i.C_Region_ID=l.C_Region_ID AND i.C_Country_ID=l.C_Country_ID) " + + "WHERE C_BPartner_ID IS NOT NULL AND C_BPartner_Location_ID IS NULL" + + " AND I_IsImported='N'").append(clientCheck); + no = DB.executeUpdateEx(sql.toString(), get_TrxName()); log.fine("Found Location=" + no); // Interest Area diff --git a/base/src/org/compiere/process/ImportOrder.java b/base/src/org/compiere/process/ImportOrder.java index d5824abf93..825ac53a45 100644 --- a/base/src/org/compiere/process/ImportOrder.java +++ b/base/src/org/compiere/process/ImportOrder.java @@ -229,6 +229,21 @@ public class ImportOrder extends SvrProcess if (no != 0) log.warning("No PriceList=" + no); + // @Trifon - Import Order Source + sql = new StringBuffer ("UPDATE I_Order o " + + "SET C_OrderSource_ID=(SELECT C_OrderSource_ID FROM C_OrderSource p" + + " WHERE o.OrderSourceValue=p.Value AND o.AD_Client_ID=p.AD_Client_ID) " + + "WHERE C_OrderSource_ID IS NULL AND OrderSourceValue IS NOT NULL AND I_IsImported<>'Y'").append (clientCheck); + no = DB.executeUpdate(sql.toString(), get_TrxName()); + log.fine("Set Order Source=" + no); + // Set proper error message + sql = new StringBuffer ("UPDATE I_Order " + + "SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Not Found Order Source, ' " + + "WHERE C_OrderSource_ID IS NULL AND C_OrderSourceValue IS NOT NULL AND I_IsImported<>'Y'").append (clientCheck); + no = DB.executeUpdate(sql.toString(), get_TrxName()); + if (no != 0) + log.warning("No OrderSource=" + no); + // Payment Term sql = new StringBuffer ("UPDATE I_Order o " + "SET C_PaymentTerm_ID=(SELECT C_PaymentTerm_ID FROM C_PaymentTerm p" diff --git a/base/src/org/compiere/process/ImportReportLine.java b/base/src/org/compiere/process/ImportReportLine.java index ba77af16e7..0bf01f1e83 100644 --- a/base/src/org/compiere/process/ImportReportLine.java +++ b/base/src/org/compiere/process/ImportReportLine.java @@ -168,8 +168,8 @@ public class ImportReportLine extends SvrProcess // Copy/Sync from first Row of Line sql = new StringBuffer ("UPDATE I_ReportLine i " - + "SET (Description, SeqNo, IsSummary, IsPrinted, LineType, CalculationType, AmountType, PostingType)=" - + " (SELECT Description, SeqNo, IsSummary, IsPrinted, LineType, CalculationType, AmountType, PostingType" + + "SET (Description, SeqNo, IsSummary, IsPrinted, LineType, CalculationType, AmountType, PAAmountType, PAPeriodType, PostingType)=" + + " (SELECT Description, SeqNo, IsSummary, IsPrinted, LineType, CalculationType, AmountType, PAAmountType, PAPeriodType, PostingType" + " FROM I_ReportLine ii WHERE i.Name=ii.Name AND i.PA_ReportLineSet_ID=ii.PA_ReportLineSet_ID" + " AND ii.I_ReportLine_ID=(SELECT MIN(I_ReportLine_ID) FROM I_ReportLine iii" + " WHERE i.Name=iii.Name AND i.PA_ReportLineSet_ID=iii.PA_ReportLineSet_ID)) " @@ -213,13 +213,29 @@ public class ImportReportLine extends SvrProcess no = DB.executeUpdate(sql.toString(), get_TrxName()); log.config("Invalid CalculationType=" + no); - // Validate Optional Amount Type - + // Convert Optional Amount Type to PAAmount Type and PAPeriodType sql = new StringBuffer ("UPDATE I_ReportLine " - + "SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid CalculationType, ' " - + "WHERE AmountType IS NOT NULL AND UPPER(AmountType) NOT IN ('BP','CP','DP','QP', 'BY','CY','DY','QY', 'BT','CT','DT','QT')" + + "SET PAAmountType = substr(AmountType,1,1), PAPeriodType = substr(AmountType,1,2) " + + "WHERE AmountType IS NOT NULL AND (PAAmountType IS NULL OR PAPeriodType IS NULL) " + + " AND I_IsImported<>'Y'").append(clientCheck); + no = DB.executeUpdate(sql.toString(), get_TrxName()); + log.config("Converted AmountType=" + no); + + // Validate Optional Amount Type - + sql = new StringBuffer ("UPDATE I_ReportLine " + + "SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid PAAmountType, ' " + + "WHERE PAAmountType IS NOT NULL AND UPPER(AmountType) NOT IN ('B','C','D','Q','S','R')" + " AND I_IsImported<>'Y'").append(clientCheck); no = DB.executeUpdate(sql.toString(), get_TrxName()); log.config("Invalid AmountType=" + no); + + // Validate Optional Period Type - + sql = new StringBuffer ("UPDATE I_ReportLine " + + "SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid PAPeriodType, ' " + + "WHERE PAPeriodType IS NOT NULL AND UPPER(AmountType) NOT IN ('P','Y','T','N')" + + " AND I_IsImported<>'Y'").append(clientCheck); + no = DB.executeUpdate(sql.toString(), get_TrxName()); + log.config("Invalid PeriodType=" + no); // Validate Optional Posting Type - A B E S R sql = new StringBuffer ("UPDATE I_ReportLine " @@ -316,8 +332,8 @@ public class ImportReportLine extends SvrProcess // **** Update ReportLine sql = new StringBuffer ("UPDATE PA_ReportLine r " - + "SET (Description,SeqNo,IsSummary,IsPrinted,LineType,CalculationType,AmountType,PostingType,Updated,UpdatedBy)=" - + " (SELECT Description,SeqNo,IsSummary,IsPrinted,LineType,CalculationType,AmountType,PostingType,SysDate,UpdatedBy" + + "SET (Description,SeqNo,IsSummary,IsPrinted,LineType,CalculationType,AmountType,PAAmountType,PAPeriodType,PostingType,Updated,UpdatedBy)=" + + " (SELECT Description,SeqNo,IsSummary,IsPrinted,LineType,CalculationType,AmountType,PAAmountType,PAPeriodType,PostingType,SysDate,UpdatedBy" + " FROM I_ReportLine i WHERE r.Name=i.Name AND r.PA_ReportLineSet_ID=i.PA_ReportLineSet_ID" + " AND i.I_ReportLine_ID=(SELECT MIN(I_ReportLine_ID) FROM I_ReportLine iii" + " WHERE i.Name=iii.Name AND i.PA_ReportLineSet_ID=iii.PA_ReportLineSet_ID)) " diff --git a/base/src/org/compiere/process/InvoiceNGL.java b/base/src/org/compiere/process/InvoiceNGL.java index dff54f7406..5002da56b9 100644 --- a/base/src/org/compiere/process/InvoiceNGL.java +++ b/base/src/org/compiere/process/InvoiceNGL.java @@ -17,10 +17,7 @@ package org.compiere.process; import java.math.BigDecimal; -import java.sql.PreparedStatement; -import java.sql.ResultSet; import java.sql.Timestamp; -import java.util.ArrayList; import java.util.List; import java.util.logging.Level; @@ -220,9 +217,9 @@ public class InvoiceNGL extends SvrProcess private String createGLJournal() { //FR: [ 2214883 ] Remove SQL code and Replace for Query - String whereClause = "AD_PInstance_ID=?"; + final String whereClause = "AD_PInstance_ID=?"; List list = new Query(getCtx(), X_T_InvoiceGL.Table_Name, whereClause, get_TrxName()) - .setParameters(new Object[]{getAD_PInstance_ID()}) + .setParameters(getAD_PInstance_ID()) .setOrderBy("AD_Org_ID") .list(); //FR: [ 2214883 ] Remove SQL code and Replace for Query diff --git a/base/src/org/compiere/process/M_PriceList_Create.java b/base/src/org/compiere/process/M_PriceList_Create.java index c1019960b8..1eaea717a5 100644 --- a/base/src/org/compiere/process/M_PriceList_Create.java +++ b/base/src/org/compiere/process/M_PriceList_Create.java @@ -30,6 +30,7 @@ import java.util.logging.Level; import org.compiere.util.AdempiereSystemError; import org.compiere.util.AdempiereUserError; import org.compiere.util.CLogger; +import org.compiere.util.CPreparedStatement; import org.compiere.util.DB; import org.compiere.util.ValueNamePair; @@ -246,27 +247,15 @@ public class M_PriceList_Create extends SvrProcess { // // For All Discount Lines in Sequence // - sql = "SELECT m_discountschemaline_id" - + " ,ad_client_id" + " ,ad_org_id" - + " ,isactive" + " ,created" - + " ,createdby" + " ,updated" - + " ,updatedby" + " ,m_discountschema_id" - + " ,seqno" + " ,m_product_category_id" - + " ,c_bpartner_id" + " ,m_product_id" - + " ,conversiondate" + " ,list_base " - + " ,list_addamt" + " ,list_discount" - + " ,list_rounding" + " ,list_minamt" - + " ,list_maxamt" + " ,list_fixed" - + " ,std_base" + " ,std_addamt" - + " ,std_discount" + " ,std_rounding" - + " ,std_minamt" + " ,std_maxamt" - + " ,std_fixed" + " ,limit_base" - + " ,limit_addamt" + " ,limit_discount" - + " ,limit_rounding" + " ,limit_minamt" - + " ,limit_maxamt" + " ,limit_fixed" - + " ,c_conversiontype_id" - + " FROM M_DiscountSchemaLine" - + " WHERE M_DiscountSchema_ID=" + sql = "SELECT m_discountschemaline_id" + + ",ad_client_id,ad_org_id,isactive,created,createdby,updated,updatedby" + + ",m_discountschema_id,seqno,m_product_category_id,c_bpartner_id,m_product_id" + + ",conversiondate,list_base,list_addamt,list_discount,list_rounding,list_minamt" + + ",list_maxamt,list_fixed,std_base,std_addamt,std_discount,std_rounding" + + ",std_minamt,std_maxamt,std_fixed,limit_base,limit_addamt,limit_discount" + + ",limit_rounding,limit_minamt,limit_maxamt,limit_fixed,group1,group2,c_conversiontype_id" + + " FROM M_DiscountSchemaLine" + + " WHERE M_DiscountSchema_ID=" + v.getInt("M_DiscountSchema_ID") + " AND IsActive='Y' ORDER BY SeqNo"; PreparedStatement Cur_DiscountLine = null; @@ -286,33 +275,45 @@ public class M_PriceList_Create extends SvrProcess { //Create Selection in temporary table // V_temp = v.getInt("M_PriceList_Version_Base_ID"); + String dl_Group1 = dl.getString("Group1"); + String dl_Group2 = dl.getString("Group2"); if (v.wasNull()) { // //Create Selection from M_Product_PO // sqlins = "INSERT INTO T_Selection (AD_PInstance_ID, T_Selection_ID) " + " SELECT DISTINCT " + m_AD_PInstance_ID +", po.M_Product_ID " - + " FROM M_Product p, M_Product_PO po" - + " WHERE p.M_Product_ID=po.M_Product_ID " - + " AND (p.AD_Client_ID=" - + v.getInt("AD_Client_ID") - + " OR p.AD_Client_ID=0)" + + " FROM M_Product p, M_Product_PO po" + + " WHERE p.M_Product_ID=po.M_Product_ID " + + " AND (p.AD_Client_ID=" + v.getInt("AD_Client_ID") + " OR p.AD_Client_ID=0)" + " AND p.IsActive='Y' AND po.IsActive='Y' AND po.IsCurrentVendor='Y' " // //Optional Restrictions // // globalqss - detected bug, JDBC returns zero for null values // so we're going to use NULLIF(value, 0) - + " AND (NULLIF(" + dl.getInt("M_Product_Category_ID") - + ",0) IS NULL OR p.M_Product_Category_ID IN (" - + getSubCategoryWhereClause(dl.getInt("M_Product_Category_ID")) + "))" - + " AND (NULLIF(" + dl.getInt("C_BPartner_ID") - + ",0) IS NULL OR po.C_BPartner_ID=" - + dl.getInt("C_BPartner_ID") + ")" - + " AND (NULLIF(" + dl.getInt("M_Product_ID") - + ",0) IS NULL OR p.M_Product_ID=" - + dl.getInt("M_Product_ID") + ")"; - cnti = DB.executeUpdate(sqlins, get_TrxName()); + + " AND (NULLIF(" + dl.getInt("M_Product_Category_ID") + ",0) IS NULL" + + " OR p.M_Product_Category_ID IN (" + getSubCategoryWhereClause(dl.getInt("M_Product_Category_ID")) + "))"; + if(dl_Group1 != null) + sqlins = sqlins + " AND (p.Group1=?)"; + if (dl_Group2 != null) + sqlins = sqlins + " AND (p.Group2=?)"; + sqlins = sqlins + " AND (NULLIF(" + dl.getInt("C_BPartner_ID") + ",0) IS NULL " + + " OR po.C_BPartner_ID=" + dl.getInt("C_BPartner_ID") + ")" + + " AND (NULLIF(" + dl.getInt("M_Product_ID") + ",0) IS NULL " + + " OR p.M_Product_ID=" + dl.getInt("M_Product_ID") + ")"; + + CPreparedStatement stmt = DB.prepareStatement(sqlins, get_TrxName()); + + int i = 1; + + if (dl_Group1!=null) + stmt.setString(i++, dl_Group1); + if (dl_Group2!=null) + stmt.setString(i++, dl_Group2); + + cnti = stmt.executeUpdate(); + if (cnti == -1) raiseError(" INSERT INTO T_Selection ", sqlins); toti += cnti; @@ -323,55 +324,43 @@ public class M_PriceList_Create extends SvrProcess { // Create Selection from existing PriceList // sqlins = "INSERT INTO T_Selection (AD_PInstance_ID, T_Selection_ID)" - + " SELECT DISTINCT " + m_AD_PInstance_ID +", p.M_Product_ID" - + " FROM M_Product p, M_ProductPrice pp" - + " WHERE p.M_Product_ID=pp.M_Product_ID" - + " AND pp.M_PriceList_Version_ID = " - + v.getInt("M_PriceList_Version_Base_ID") - + " AND p.IsActive='Y' AND pp.IsActive='Y'" + + " SELECT DISTINCT " + m_AD_PInstance_ID +", p.M_Product_ID" + + " FROM M_Product p, M_ProductPrice pp" + + " WHERE p.M_Product_ID=pp.M_Product_ID" + + " AND pp.M_PriceList_Version_ID = " + v.getInt("M_PriceList_Version_Base_ID") + + " AND p.IsActive='Y' AND pp.IsActive='Y'" // //Optional Restrictions // - + " AND (NULLIF(" + dl.getInt("M_Product_Category_ID") - + ",0) IS NULL OR p.M_Product_Category_ID IN (" - + getSubCategoryWhereClause(dl.getInt("M_Product_Category_ID")) + "))" - + " AND (NULLIF(" + dl.getInt("C_BPartner_ID") - + ",0) IS NULL OR EXISTS " - + " (SELECT m_product_id" - + " , c_bpartner_id" - + " , ad_client_id" - + " , ad_org_id" - + " , isactive" - + " , created " - + " , createdby" - + " , updated " - + " , updatedby" - + " , iscurrentvendor" - + " , c_uom_id" - + " , c_currency_id" - + " , pricelist" - + " , pricepo" - + " ,priceeffective" - + " ,pricelastpo" - + " ,pricelastinv" - + " ,vendorproductno" - + " ,upc" - + " ,vendorcategory" - + " ,discontinued" - + " ,discontinuedby" - + " ,order_min" - + " ,order_pack" - + " ,costperorder" - + " ,deliverytime_promised" - + " ,deliverytime_actual" - + " ,qualityrating" - + " ,royaltyamt" - + " , manufacturer FROM M_Product_PO po WHERE po.M_Product_ID=p.M_Product_ID AND po.C_BPartner_ID=" - + dl.getInt("C_BPartner_ID") + "))" - + " AND (NULLIF(" + dl.getInt("M_Product_ID") - + ",0) IS NULL OR p.M_Product_ID=" - + dl.getInt("M_Product_ID") + ")"; - cnti = DB.executeUpdate(sqlins, get_TrxName()); + + " AND (NULLIF(" + dl.getInt("M_Product_Category_ID") + ",0) IS NULL" + + " OR p.M_Product_Category_ID IN (" + getSubCategoryWhereClause(dl.getInt("M_Product_Category_ID")) + "))"; + if(dl_Group1 != null) + sqlins = sqlins + " AND (p.Group1=?)"; + if (dl_Group2 != null) + sqlins = sqlins + " AND (p.Group2=?)"; + sqlins = sqlins + " AND (NULLIF(" + dl.getInt("C_BPartner_ID") + ",0) IS NULL OR EXISTS " + + "(SELECT m_product_id,c_bpartner_id,ad_client_id,ad_org_id,isactive" + + ",created,createdby,updated,updatedby,iscurrentvendor,c_uom_id" + + ",c_currency_id,pricelist,pricepo,priceeffective,pricelastpo" + + ",pricelastinv,vendorproductno,upc,vendorcategory,discontinued" + + ",discontinuedby,order_min,order_pack,costperorder" + + ",deliverytime_promised,deliverytime_actual,qualityrating" + + ",royaltyamt,group1,group2" + + ",manufacturer FROM M_Product_PO po WHERE po.M_Product_ID=p.M_Product_ID" + + " AND po.C_BPartner_ID=" + dl.getInt("C_BPartner_ID") + "))" + + " AND (NULLIF(" + dl.getInt("M_Product_ID") + ",0) IS NULL " + + " OR p.M_Product_ID=" + dl.getInt("M_Product_ID") + ")"; + + + CPreparedStatement stmt = DB.prepareStatement(sqlins, get_TrxName()); + int i = 1; + + if (dl_Group1!=null) + stmt.setString(i++, dl_Group1); + if (dl_Group2!=null) + stmt.setString(i++, dl_Group2); + + cnti = stmt.executeUpdate(); if (cnti == -1) raiseError( " INSERT INTO T_Selection from existing PriceList", diff --git a/base/src/org/compiere/process/M_Production_Run.java b/base/src/org/compiere/process/M_Production_Run.java index 237fbf78c3..e5634be136 100644 --- a/base/src/org/compiere/process/M_Production_Run.java +++ b/base/src/org/compiere/process/M_Production_Run.java @@ -95,7 +95,7 @@ public class M_Production_Run extends SvrProcess { String whereClause = "M_Production_ID=? "; List lines = new Query(getCtx(), X_M_ProductionPlan.Table_Name , whereClause, get_TrxName()) - .setParameters(new Object[]{p_Record_ID }) + .setParameters(p_Record_ID) .setOrderBy("Line, M_Product_ID") .list(); for (X_M_ProductionPlan pp :lines) @@ -125,7 +125,7 @@ public class M_Production_Run extends SvrProcess { { whereClause = "M_ProductionPlan_ID= ? "; List production_lines = new Query(getCtx(), X_M_ProductionLine.Table_Name , whereClause, get_TrxName()) - .setParameters(new Object[]{pp.getM_ProductionPlan_ID()}) + .setParameters(pp.getM_ProductionPlan_ID()) .setOrderBy("Line") .list(); diff --git a/base/src/org/compiere/process/PaySelectionCreateFrom.java b/base/src/org/compiere/process/PaySelectionCreateFrom.java index 239d2221cc..37002df4d3 100644 --- a/base/src/org/compiere/process/PaySelectionCreateFrom.java +++ b/base/src/org/compiere/process/PaySelectionCreateFrom.java @@ -19,6 +19,7 @@ package org.compiere.process; import java.math.BigDecimal; import java.sql.PreparedStatement; import java.sql.ResultSet; +import java.sql.Timestamp; import java.util.logging.Level; import org.compiere.model.MPaySelection; @@ -52,6 +53,8 @@ public class PaySelectionCreateFrom extends SvrProcess /** Payment Selection */ private int p_C_PaySelection_ID = 0; + private Timestamp p_DueDate = null; + /** * Prepare - e.g., get Parameters. */ @@ -77,6 +80,8 @@ public class PaySelectionCreateFrom extends SvrProcess p_C_BPartner_ID = para[i].getParameterAsInt(); else if (name.equals("C_BP_Group_ID")) p_C_BP_Group_ID = para[i].getParameterAsInt(); + else if (name.equals("DueDate")) + p_DueDate = (Timestamp) para[i].getParameter(); else log.log(Level.SEVERE, "Unknown Parameter: " + name); } @@ -102,6 +107,10 @@ public class PaySelectionCreateFrom extends SvrProcess throw new IllegalArgumentException("Not found C_PaySelection_ID=" + p_C_PaySelection_ID); if (psel.isProcessed()) throw new IllegalArgumentException("@Processed@"); + + if ( p_DueDate == null ) + p_DueDate = psel.getPayDate(); + // psel.getPayDate(); String sql = "SELECT C_Invoice_ID," @@ -154,7 +163,7 @@ public class PaySelectionCreateFrom extends SvrProcess else if (p_C_BP_Group_ID != 0) sql += " AND EXISTS (SELECT * FROM C_BPartner bp " + "WHERE bp.C_BPartner_ID=i.C_BPartner_ID AND bp.C_BP_Group_ID=?)"; // ## - // PO Matching Requiremnent + // PO Matching Requirement if (p_MatchRequirement.equals("P") || p_MatchRequirement.equals("B")) { sql += " AND EXISTS (SELECT * FROM C_InvoiceLine il " @@ -162,7 +171,7 @@ public class PaySelectionCreateFrom extends SvrProcess + " AND QtyInvoiced=(SELECT SUM(Qty) FROM M_MatchPO m " + "WHERE il.C_InvoiceLine_ID=m.C_InvoiceLine_ID))"; } - // Receipt Matching Requiremnent + // Receipt Matching Requirement if (p_MatchRequirement.equals("R") || p_MatchRequirement.equals("B")) { sql += " AND EXISTS (SELECT * FROM C_InvoiceLine il " @@ -192,7 +201,7 @@ public class PaySelectionCreateFrom extends SvrProcess if (p_OnlyDiscount) pstmt.setTimestamp(index++, psel.getPayDate()); if (p_OnlyDue) - pstmt.setTimestamp(index++, psel.getPayDate()); + pstmt.setTimestamp(index++, p_DueDate); if (p_C_BPartner_ID != 0) pstmt.setInt (index++, p_C_BPartner_ID); else if (p_C_BP_Group_ID != 0) diff --git a/base/src/org/compiere/process/ProductCategoryAcctCopy.java b/base/src/org/compiere/process/ProductCategoryAcctCopy.java index e2ec75ae4f..a2205837c1 100644 --- a/base/src/org/compiere/process/ProductCategoryAcctCopy.java +++ b/base/src/org/compiere/process/ProductCategoryAcctCopy.java @@ -74,12 +74,12 @@ public class ProductCategoryAcctCopy extends SvrProcess // Update String sql = "UPDATE M_Product_Acct pa " + "SET (P_Revenue_Acct,P_Expense_Acct,P_CostAdjustment_Acct,P_InventoryClearing_Acct,P_Asset_Acct,P_COGS_Acct," - + " P_PurchasePriceVariance_Acct,P_InvoicePriceVariance_Acct," + + " P_PurchasePriceVariance_Acct,P_InvoicePriceVariance_Acct,P_AverageCostVariance_Acct," + " P_TradeDiscountRec_Acct,P_TradeDiscountGrant_Acct," + " P_WIP_Acct,P_FloorStock_Acct,P_MethodChangeVariance_Acct,P_UsageVariance_Acct,P_RateVariance_Acct," + " P_MixVariance_Acct,P_Labor_Acct,P_Burden_Acct,P_CostOfProduction_Acct,P_OutsideProcessing_Acct,P_Overhead_Acct,P_Scrap_Acct)=" + " (SELECT P_Revenue_Acct,P_Expense_Acct,P_CostAdjustment_Acct,P_InventoryClearing_Acct,P_Asset_Acct,P_COGS_Acct," - + " P_PurchasePriceVariance_Acct,P_InvoicePriceVariance_Acct," + + " P_PurchasePriceVariance_Acct,P_InvoicePriceVariance_Acct,P_AverageCostVariance_Acct," + " P_TradeDiscountRec_Acct,P_TradeDiscountGrant_Acct," + " P_WIP_Acct,P_FloorStock_Acct,P_MethodChangeVariance_Acct,P_UsageVariance_Acct,P_RateVariance_Acct," + " P_MixVariance_Acct,P_Labor_Acct,P_Burden_Acct,P_CostOfProduction_Acct,P_OutsideProcessing_Acct,P_Overhead_Acct,P_Scrap_Acct" @@ -99,14 +99,14 @@ public class ProductCategoryAcctCopy extends SvrProcess + "(M_Product_ID, C_AcctSchema_ID," + " AD_Client_ID, AD_Org_ID, IsActive, Created, CreatedBy, Updated, UpdatedBy," + " P_Revenue_Acct, P_Expense_Acct, P_CostAdjustment_Acct, P_InventoryClearing_Acct, P_Asset_Acct, P_CoGs_Acct," - + " P_PurchasePriceVariance_Acct, P_InvoicePriceVariance_Acct," + + " P_PurchasePriceVariance_Acct, P_InvoicePriceVariance_Acct, P_AverageCostVariance_Acct," + " P_TradeDiscountRec_Acct, P_TradeDiscountGrant_Acct, " + " P_WIP_Acct,P_FloorStock_Acct, P_MethodChangeVariance_Acct, P_UsageVariance_Acct, P_RateVariance_Acct," + " P_MixVariance_Acct, P_Labor_Acct, P_Burden_Acct, P_CostOfProduction_Acct, P_OutsideProcessing_Acct, P_Overhead_Acct, P_Scrap_Acct) " + "SELECT p.M_Product_ID, acct.C_AcctSchema_ID," + " p.AD_Client_ID, p.AD_Org_ID, 'Y', SysDate, 0, SysDate, 0," + " acct.P_Revenue_Acct, acct.P_Expense_Acct, acct.P_CostAdjustment_Acct, acct.P_InventoryClearing_Acct, acct.P_Asset_Acct, acct.P_CoGs_Acct," - + " acct.P_PurchasePriceVariance_Acct, acct.P_InvoicePriceVariance_Acct," + + " acct.P_PurchasePriceVariance_Acct, acct.P_InvoicePriceVariance_Acct, acct.P_AverageCostVariance_Acct," + " acct.P_TradeDiscountRec_Acct, acct.P_TradeDiscountGrant_Acct, " + " acct.P_WIP_Acct, acct.P_FloorStock_Acct, acct.P_MethodChangeVariance_Acct, acct.P_UsageVariance_Acct, acct.P_RateVariance_Acct," + " acct.P_MixVariance_Acct, acct.P_Labor_Acct, acct.P_Burden_Acct, acct.P_CostOfProduction_Acct, acct.P_OutsideProcessing_Acct, acct.P_Overhead_Acct, acct.P_Scrap_Acct " diff --git a/base/src/org/compiere/process/RequestEMailProcessor.java b/base/src/org/compiere/process/RequestEMailProcessor.java index 94076be90f..eae7feb262 100644 --- a/base/src/org/compiere/process/RequestEMailProcessor.java +++ b/base/src/org/compiere/process/RequestEMailProcessor.java @@ -16,6 +16,8 @@ *****************************************************************************/ package org.compiere.process; +import java.io.ByteArrayOutputStream; +import java.io.IOException; import java.io.InputStream; import java.sql.PreparedStatement; import java.sql.ResultSet; @@ -36,6 +38,7 @@ import javax.mail.Part; import javax.mail.Session; import javax.mail.Store; +import org.compiere.model.MAttachment; import org.compiere.model.MRequest; import org.compiere.model.MUser; import org.compiere.util.CLogMgt; @@ -467,7 +470,7 @@ public class RequestEMailProcessor extends SvrProcess // Set start date as sent date of e-mail req.setStartDate(new Timestamp(msg.getSentDate().getTime())); - // defaults priority Medium, confidenciality partner + // defaults priority Medium, confidentiality partner if (p_DefaultConfidentiality != null) { req.setConfidentialType (p_DefaultConfidentiality); req.setConfidentialTypeEntry (p_DefaultConfidentiality); @@ -479,6 +482,48 @@ public class RequestEMailProcessor extends SvrProcess if (req.save(get_TrxName())) { log.info("created request " + req.getR_Request_ID() + " from msg -> " + hdrs[0]); + + + // get simple attachments and attach to request + if ( msg.isMimeType("multipart/*" ) ) + { + try { + Multipart mp = (Multipart) msg.getContent(); + + for (int i=0, n=mp.getCount(); i -1) { + out.write(buffer, 0, bytesRead); + } + in.close(); + + byte[] bytes = out.toByteArray(); + + attach.addEntry(part.getFileName(), bytes); + attach.saveEx(get_TrxName()); + } + } + } + catch (IOException e) { + log.log(Level.FINE, "Error extracting attachments", e); + } + } + return true; } else { return false; diff --git a/base/src/org/compiere/process/RequisitionPOCreate.java b/base/src/org/compiere/process/RequisitionPOCreate.java index 384f0d82c5..bdfec29511 100644 --- a/base/src/org/compiere/process/RequisitionPOCreate.java +++ b/base/src/org/compiere/process/RequisitionPOCreate.java @@ -212,7 +212,7 @@ public class RequisitionPOCreate extends SvrProcess } if (p_DateDoc_From != null) { - whereClause.append(" AND r.DateDoc => ?"); + whereClause.append(" AND r.DateDoc >= ?"); params.add(p_DateDoc_From); } if (p_DateDoc_To != null) @@ -222,7 +222,7 @@ public class RequisitionPOCreate extends SvrProcess } if (p_DateRequired_From != null) { - whereClause.append(" AND r.DateRequired => ?"); + whereClause.append(" AND r.DateRequired >= ?"); params.add(p_DateRequired_From); } if (p_DateRequired_To != null) @@ -232,7 +232,7 @@ public class RequisitionPOCreate extends SvrProcess } if (p_PriorityRule != null) { - whereClause.append(" AND r.PriorityRule => ?"); + whereClause.append(" AND r.PriorityRule >= ?"); params.add(p_PriorityRule); } if (p_AD_User_ID > 0) diff --git a/base/src/org/compiere/report/FinReport.java b/base/src/org/compiere/report/FinReport.java index bad0336c2b..8ea1d09288 100644 --- a/base/src/org/compiere/report/FinReport.java +++ b/base/src/org/compiere/report/FinReport.java @@ -347,17 +347,17 @@ public class FinReport extends SvrProcess // SELECT SUM() StringBuffer select = new StringBuffer ("SELECT "); - if (m_lines[line].getAmountType() != null) // line amount type overwrites column + if (m_lines[line].getPAAmountType() != null) // line amount type overwrites column { String sql = m_lines[line].getSelectClause (true); select.append (sql); - info.append(": LineAmtType=").append(m_lines[line].getAmountType()); + info.append(": LineAmtType=").append(m_lines[line].getPAAmountType()); } - else if (m_columns[col].getAmountType() != null) + else if (m_columns[col].getPAAmountType() != null) { String sql = m_columns[col].getSelectClause (true); select.append (sql); - info.append(": ColumnAmtType=").append(m_columns[col].getAmountType()); + info.append(": ColumnAmtType=").append(m_columns[col].getPAAmountType()); } else { @@ -376,7 +376,7 @@ public class FinReport extends SvrProcess if (m_columns[col].isColumnTypeRelativePeriod()) relativeOffset = m_columns[col].getRelativePeriod(); FinReportPeriod frp = getPeriod (relativeOffset); - if (m_lines[line].getAmountType() != null) // line amount type overwrites column + if (m_lines[line].getPAPeriodType() != null) // line amount type overwrites column { info.append(" - LineDateAcct="); if (m_lines[line].isPeriod()) @@ -403,11 +403,11 @@ public class FinReport extends SvrProcess } else { - log.log(Level.SEVERE, "No valid Line AmountType"); + log.log(Level.SEVERE, "No valid Line PAPeriodType"); select.append("=0"); // valid sql } } - else if (m_columns[col].getAmountType() != null) + else if (m_columns[col].getPAPeriodType() != null) { info.append(" - ColumnDateAcct="); if (m_columns[col].isPeriod()) @@ -434,7 +434,7 @@ public class FinReport extends SvrProcess } else { - log.log(Level.SEVERE, "No valid Column AmountType"); + log.log(Level.SEVERE, "No valid Column PAPeriodType"); select.append("=0"); // valid sql } } @@ -926,9 +926,9 @@ public class FinReport extends SvrProcess // SELECT SUM() StringBuffer select = new StringBuffer ("SELECT "); - if (m_lines[line].getAmountType() != null) // line amount type overwrites column + if (m_lines[line].getPAAmountType() != null) // line amount type overwrites column select.append (m_lines[line].getSelectClause (true)); - else if (m_columns[col].getAmountType() != null) + else if (m_columns[col].getPAAmountType() != null) select.append (m_columns[col].getSelectClause (true)); else { @@ -944,7 +944,7 @@ public class FinReport extends SvrProcess select.append(" FROM Fact_Acct fb WHERE TRUNC(DateAcct) "); } FinReportPeriod frp = getPeriod (m_columns[col].getRelativePeriod()); - if (m_lines[line].getAmountType() != null) // line amount type overwrites column + if (m_lines[line].getPAPeriodType() != null) // line amount type overwrites column { if (m_lines[line].isPeriod()) select.append(frp.getPeriodWhere()); @@ -955,7 +955,7 @@ public class FinReport extends SvrProcess else select.append(frp.getTotalWhere()); } - else if (m_columns[col].getAmountType() != null) + else if (m_columns[col].getPAPeriodType() != null) { if (m_columns[col].isPeriod()) select.append(frp.getPeriodWhere()); @@ -1075,9 +1075,9 @@ public class FinReport extends SvrProcess continue; } // Amount Type ... Qty - if (m_lines[line].getAmountType() != null) // line amount type overwrites column + if (m_lines[line].getPAAmountType() != null) // line amount type overwrites column insert.append (m_lines[line].getSelectClause (false)); - else if (m_columns[col].getAmountType() != null) + else if (m_columns[col].getPAAmountType() != null) insert.append (m_columns[col].getSelectClause (false)); else { diff --git a/base/src/org/compiere/report/MReportColumn.java b/base/src/org/compiere/report/MReportColumn.java index 8cf13e2596..ff3af1e7b7 100644 --- a/base/src/org/compiere/report/MReportColumn.java +++ b/base/src/org/compiere/report/MReportColumn.java @@ -70,23 +70,26 @@ public class MReportColumn extends X_PA_ReportColumn */ public String getSelectClause (boolean withSum) { - // Amount Type = Period Balance, Period Credit - String amountType = getAmountType().substring(0,1); // first character + String amountType = getPAAmountType(); // first character StringBuffer sb = new StringBuffer(); if (withSum) sb.append("SUM("); - if (AmountType_Balance.equals(amountType)) + if (PAAMOUNTTYPE_BalanceExpectedSign.equals(amountType)) // sb.append("AmtAcctDr-AmtAcctCr"); sb.append("acctBalance(Account_ID,AmtAcctDr,AmtAcctCr)"); - else if (AmountType_CR.equals(amountType)) + else if ( PAAMOUNTTYPE_BalanceAccountedSign.equals(amountType) ) + sb.append("AmtAcctDr-AmtAcctCr"); + else if (PAAMOUNTTYPE_CreditOnly.equals(amountType)) sb.append("AmtAcctCr"); - else if (AmountType_DR.equals(amountType)) + else if (PAAMOUNTTYPE_DebitOnly.equals(amountType)) sb.append("AmtAcctDr"); - else if (AmountType_Qty.equals(amountType)) + else if (PAAMOUNTTYPE_QuantityAccountedSign.equals(amountType)) sb.append("Qty"); + else if (PAAMOUNTTYPE_QuantityExpectedSign.equals(amountType)) + sb.append("acctBalance(Account_ID,Qty,0)"); else { - log.log(Level.SEVERE, "AmountType=" + getAmountType () + ", at=" + amountType); + log.log(Level.SEVERE, "AmountType=" + getPAAmountType () + ", at=" + amountType); return "NULL"; } if (withSum) @@ -100,13 +103,10 @@ public class MReportColumn extends X_PA_ReportColumn */ public boolean isPeriod() { - String at = getAmountType(); - if (at == null) + String pt = getPAPeriodType(); + if (pt == null) return false; - return AMOUNTTYPE_PeriodBalance.equals(at) - || AMOUNTTYPE_PeriodCreditOnly.equals(at) - || AMOUNTTYPE_PeriodDebitOnly.equals(at) - || AMOUNTTYPE_PeriodQuantity.equals(at); + return PAPERIODTYPE_Period.equals(pt); } // isPeriod /** @@ -115,13 +115,10 @@ public class MReportColumn extends X_PA_ReportColumn */ public boolean isYear() { - String at = getAmountType(); - if (at == null) + String pt = getPAPeriodType(); + if (pt == null) return false; - return AMOUNTTYPE_YearBalance.equals(at) - || AMOUNTTYPE_YearCreditOnly.equals(at) - || AMOUNTTYPE_YearDebitOnly.equals(at) - || AMOUNTTYPE_YearQuantity.equals(at); + return PAPERIODTYPE_Year.equals(pt); } // isYear /** @@ -130,13 +127,10 @@ public class MReportColumn extends X_PA_ReportColumn */ public boolean isTotal() { - String at = getAmountType(); - if (at == null) + String pt = getPAPeriodType(); + if (pt == null) return false; - return AMOUNTTYPE_TotalBalance.equals(at) - || AMOUNTTYPE_TotalCreditOnly.equals(at) - || AMOUNTTYPE_TotalDebitOnly.equals(at) - || AMOUNTTYPE_TotalQuantity.equals(at); + return PAPERIODTYPE_Total.equals(pt); } // isTotalBalance /** @@ -145,10 +139,10 @@ public class MReportColumn extends X_PA_ReportColumn * @return true if Natural Balance Amount Type */ public boolean isNatural() { - String at = getAmountType(); - if (at == null) + String pt = getPAPeriodType(); + if (pt == null) return false; - return AMOUNTTYPE_NaturalBalance.equals(at); + return PAPERIODTYPE_Natural.equals(pt); } /** @@ -351,7 +345,8 @@ public class MReportColumn extends X_PA_ReportColumn { StringBuffer sb = new StringBuffer ("MReportColumn[") .append(get_ID()).append(" - ").append(getName()).append(" - ").append(getDescription()) - .append(", SeqNo=").append(getSeqNo()).append(", AmountType=").append(getAmountType()) + .append(", SeqNo=").append(getSeqNo()).append(", AmountType=").append(getPAAmountType()) + .append(", PeriodType=").append(getPAPeriodType()) .append(", CurrencyType=").append(getCurrencyType()).append("/").append(getC_Currency_ID()) .append(" - ColumnType=").append(getColumnType()); if (isColumnTypeCalculation()) @@ -365,15 +360,6 @@ public class MReportColumn extends X_PA_ReportColumn return sb.toString (); } // toString - static final String AmountType_Balance = "B"; - static final String AmountType_CR = "C"; - static final String AmountType_DR = "D"; - static final String AmountType_Qty = "Q"; - // - static final String AmountType_Period = "P"; - static final String AmountType_Year = "Y"; - static final String AmountType_Total = "T"; - /** * Calculation Type Range * @return true if range diff --git a/base/src/org/compiere/report/MReportLine.java b/base/src/org/compiere/report/MReportLine.java index e1e5c1d5ff..a20f68174c 100644 --- a/base/src/org/compiere/report/MReportLine.java +++ b/base/src/org/compiere/report/MReportLine.java @@ -179,22 +179,26 @@ public class MReportLine extends X_PA_ReportLine */ public String getSelectClause (boolean withSum) { - String at = getAmountType().substring(0,1); // first letter + String at = getPAAmountType().substring(0,1); // first letter StringBuffer sb = new StringBuffer(); if (withSum) sb.append("SUM("); - if (AmountType_Balance.equals(at)) + if (PAAMOUNTTYPE_BalanceExpectedSign.equals(at)) // sb.append("AmtAcctDr-AmtAcctCr"); sb.append("acctBalance(Account_ID,AmtAcctDr,AmtAcctCr)"); - else if (AmountType_CR.equals(at)) + else if (PAAMOUNTTYPE_BalanceAccountedSign.equals(at)) + sb.append("AmtAcctDr-AmtAcctCr"); + else if (PAAMOUNTTYPE_CreditOnly.equals(at)) sb.append("AmtAcctCr"); - else if (AmountType_DR.equals(at)) + else if (PAAMOUNTTYPE_DebitOnly.equals(at)) sb.append("AmtAcctDr"); - else if (AmountType_Qty.equals(at)) + else if (PAAMOUNTTYPE_QuantityAccountedSign.equals(at)) sb.append("Qty"); + else if (PAAMOUNTTYPE_QuantityExpectedSign.equals(at)) + sb.append("acctBalance(Account_ID,Qty,0)"); else { - log.log(Level.SEVERE, "AmountType=" + getAmountType () + ", at=" + at); + log.log(Level.SEVERE, "AmountType=" + getPAAmountType () + ", at=" + at); return "NULL"; } if (withSum) @@ -208,13 +212,10 @@ public class MReportLine extends X_PA_ReportLine */ public boolean isPeriod() { - String at = getAmountType(); - if (at == null) + String pt = getPAPeriodType(); + if (pt == null) return false; - return AMOUNTTYPE_PeriodBalance.equals(at) - || AMOUNTTYPE_PeriodCreditOnly.equals(at) - || AMOUNTTYPE_PeriodDebitOnly.equals(at) - || AMOUNTTYPE_PeriodQuantity.equals(at); + return PAPERIODTYPE_Period.equals(pt); } // isPeriod /** @@ -223,13 +224,10 @@ public class MReportLine extends X_PA_ReportLine */ public boolean isYear() { - String at = getAmountType(); - if (at == null) + String pt = getPAPeriodType(); + if (pt == null) return false; - return AMOUNTTYPE_YearBalance.equals(at) - || AMOUNTTYPE_YearCreditOnly.equals(at) - || AMOUNTTYPE_YearDebitOnly.equals(at) - || AMOUNTTYPE_YearQuantity.equals(at); + return PAPERIODTYPE_Year.equals(pt); } // isYear /** @@ -238,13 +236,10 @@ public class MReportLine extends X_PA_ReportLine */ public boolean isTotal() { - String at = getAmountType(); - if (at == null) + String pt = getPAPeriodType(); + if (pt == null) return false; - return AMOUNTTYPE_TotalBalance.equals(at) - || AMOUNTTYPE_TotalCreditOnly.equals(at) - || AMOUNTTYPE_TotalDebitOnly.equals(at) - || AMOUNTTYPE_TotalQuantity.equals(at); + return PAPERIODTYPE_Total.equals(pt); } // isTotal /** @@ -254,11 +249,11 @@ public class MReportLine extends X_PA_ReportLine */ public boolean isNatural() { - String at = getAmountType(); - if (at == null) + String pt = getPAPeriodType(); + if (pt == null) return false; - return AMOUNTTYPE_NaturalBalance.equals(at); + return PAPERIODTYPE_Natural.equals(pt); } /** @@ -327,28 +322,20 @@ public class MReportLine extends X_PA_ReportLine { StringBuffer sb = new StringBuffer ("MReportLine[") .append(get_ID()).append(" - ").append(getName()).append(" - ").append(getDescription()) - .append(", SeqNo=").append(getSeqNo()).append(", AmountType=").append(getAmountType()) + .append(", SeqNo=").append(getSeqNo()).append(", AmountType=").append(getPAAmountType()) + .append(", PeriodType=").append(getPAPeriodType()) .append(" - LineType=").append(getLineType()); if (isLineTypeCalculation()) sb.append(" - Calculation=").append(getCalculationType()) .append(" - ").append(getOper_1_ID()).append(" - ").append(getOper_2_ID()); else // SegmentValue sb.append(" - SegmentValue - PostingType=").append(getPostingType()) - .append(", AmountType=").append(getAmountType()); + .append(", AmountType=").append(getPAAmountType()) + .append(", PeriodType=").append(getPAPeriodType()); sb.append ("]"); return sb.toString (); } // toString - // First Letter - static final String AmountType_Balance = "B"; - static final String AmountType_CR = "C"; - static final String AmountType_DR = "D"; - static final String AmountType_Qty = "Q"; - // Second Letter - static final String AmountType_Period = "P"; - static final String AmountType_Year = "Y"; - static final String AmountType_Total = "T"; - /** * Line Type Calculation * @return true if calculation diff --git a/base/src/org/compiere/util/CLogFile.java b/base/src/org/compiere/util/CLogFile.java index 659cd2be80..3353d7841a 100644 --- a/base/src/org/compiere/util/CLogFile.java +++ b/base/src/org/compiere/util/CLogFile.java @@ -175,8 +175,10 @@ public class CLogFile extends Handler } } } - if (m_file == null) // Fallback create temp file - m_file = File.createTempFile("adempiere", ".log"); + if (m_file == null) { // Fallback create temp file + m_fileNameDate = getFileNameDate(System.currentTimeMillis()); + m_file = File.createTempFile("adempiere"+m_fileNameDate + "_", ".log"); + } } catch (Exception ex) { diff --git a/base/src/org/compiere/util/Language.java b/base/src/org/compiere/util/Language.java index 043a4ff2b2..d967ca378a 100644 --- a/base/src/org/compiere/util/Language.java +++ b/base/src/org/compiere/util/Language.java @@ -609,21 +609,13 @@ public class Language implements Serializable m_dateFormat = (SimpleDateFormat)DateFormat.getDateInstance (DateFormat.SHORT, m_locale); String sFormat = m_dateFormat.toPattern(); - // some short formats have only one M and d (e.g. ths US) - if (sFormat.indexOf("MM") == -1 && sFormat.indexOf("dd") == -1) - { - String nFormat = ""; - for (int i = 0; i < sFormat.length(); i++) + // some short formats have only one M and/or d (e.g. ths US) + if (sFormat.indexOf("MM") == -1 || sFormat.indexOf("dd") == -1) { - if (sFormat.charAt(i) == 'M') - nFormat += "MM"; - else if (sFormat.charAt(i) == 'd') - nFormat += "dd"; - else - nFormat += sFormat.charAt(i); - } + sFormat = sFormat.replaceFirst("d+", "dd"); + sFormat = sFormat.replaceFirst("M+", "MM"); // log.finer(sFormat + " => " + nFormat); - m_dateFormat.applyPattern(nFormat); + m_dateFormat.applyPattern(sFormat); } // Unknown short format => use JDBC if (m_dateFormat.toPattern().length() != 8) diff --git a/base/src/org/compiere/wf/MWFActivity.java b/base/src/org/compiere/wf/MWFActivity.java index a0c3869a6d..54575a1c2d 100644 --- a/base/src/org/compiere/wf/MWFActivity.java +++ b/base/src/org/compiere/wf/MWFActivity.java @@ -36,7 +36,6 @@ import org.compiere.model.MBPartner; import org.compiere.model.MClient; import org.compiere.model.MColumn; import org.compiere.model.MConversionRate; -import org.compiere.model.MFactAcct; import org.compiere.model.MMailText; import org.compiere.model.MNote; import org.compiere.model.MOrg; @@ -54,7 +53,6 @@ import org.compiere.model.Query; import org.compiere.model.X_AD_WF_Activity; import org.compiere.print.ReportEngine; import org.compiere.process.DocAction; -import org.compiere.process.DocumentEngine; import org.compiere.process.ProcessInfo; import org.compiere.process.StateEngine; import org.compiere.util.DisplayType; @@ -77,7 +75,7 @@ public class MWFActivity extends X_AD_WF_Activity implements Runnable /** * */ - private static final long serialVersionUID = 1584816335412184476L; + private static final long serialVersionUID = -3282235931100223816L; /** * Get Activities for table/record @@ -232,8 +230,6 @@ public class MWFActivity extends X_AD_WF_Activity implements Runnable private String m_newValue = null; /** Process */ private MWFProcess m_process = null; - /** Post Immediate Candidate */ - private DocAction m_postImmediate = null; /** List of email recipients */ private ArrayList m_emails = new ArrayList(); @@ -805,13 +801,6 @@ public class MWFActivity extends X_AD_WF_Activity implements Runnable setWFState (done ? StateEngine.STATE_Completed : StateEngine.STATE_Suspended); - //end vpj-cd e-evolution 03/08/2005 PostgreSQL - if (m_postImmediate != null) - try { - postImmediate(); - } catch (Exception e) { - log.warning("Error posting document: " + e.toString()); - } // ignore any error in this posting } catch (Exception e) { @@ -868,7 +857,6 @@ public class MWFActivity extends X_AD_WF_Activity implements Runnable private boolean performWork (Trx trx) throws Exception { log.info (m_node + " [" + trx.getTrxName() + "]"); - m_postImmediate = null; m_docStatus = null; if (m_node.getPriority() != 0) // overwrite priority if defined setPriority(m_node.getPriority()); @@ -905,21 +893,19 @@ public class MWFActivity extends X_AD_WF_Activity implements Runnable success = doc.processIt (m_node.getDocAction()); // ** Do the work setTextMsg(doc.getSummary()); processMsg = doc.getProcessMsg(); - m_docStatus = doc.getDocStatus(); + // Bug 1904717 - Invoice reversing has incorrect doc status + // Just prepare and complete return a doc status to take into account + // the rest of methods return boolean, so doc status must not be taken into account when not successful + if ( DocAction.ACTION_Prepare.equals(m_node.getDocAction()) + || DocAction.ACTION_Complete.equals(m_node.getDocAction()) + || success) + m_docStatus = doc.getDocStatus(); } catch (Exception e) { if (m_process != null) m_process.setProcessMsg(e.getLocalizedMessage()); throw e; } - // Post Immediate - if (success && DocAction.STATUS_Completed.equals(doc.getDocStatus()) && DocAction.ACTION_Complete.equals(m_node.getDocAction())) - { - MClient client = MClient.get(doc.getCtx(), doc.getAD_Client_ID()); - if (client.isPostImmediate() || MClient.isClientAccountingImmediate()) - m_postImmediate = doc; - } - // if (m_process != null) m_process.setProcessMsg(processMsg); } @@ -1515,19 +1501,6 @@ public class MWFActivity extends X_AD_WF_Activity implements Runnable } // instance parameter loop } // fillParameter - /** - * Post Immediate - */ - private void postImmediate() - { - if (MFactAcct.alreadyPosted(m_postImmediate.get_Table_ID(), m_postImmediate.get_ID(), m_postImmediate.get_TrxName())) - return; - - String error = DocumentEngine.postImmediate(m_postImmediate.getCtx(), - m_postImmediate.getAD_Client_ID(), m_postImmediate.get_Table_ID(), m_postImmediate.get_ID(), true, - m_postImmediate.get_TrxName()); - } // PostImmediate - /********************************* * Send EMail */ diff --git a/base/src/org/eevolution/model/I_DD_Order.java b/base/src/org/eevolution/model/I_DD_Order.java index 051b2a7804..316480326f 100644 --- a/base/src/org/eevolution/model/I_DD_Order.java +++ b/base/src/org/eevolution/model/I_DD_Order.java @@ -681,6 +681,19 @@ public interface I_DD_Order */ public boolean isProcessed(); + /** Column name ProcessedOn */ + public static final String COLUMNNAME_ProcessedOn = "ProcessedOn"; + + /** Set Processed On. + * The date+time (expressed in decimal format) when the document has been processed + */ + public void setProcessedOn (BigDecimal ProcessedOn); + + /** Get Processed On. + * The date+time (expressed in decimal format) when the document has been processed + */ + public BigDecimal getProcessedOn(); + /** Column name Processing */ public static final String COLUMNNAME_Processing = "Processing"; diff --git a/base/src/org/eevolution/model/I_HR_Process.java b/base/src/org/eevolution/model/I_HR_Process.java index 1601c99b67..bb48ba6da8 100644 --- a/base/src/org/eevolution/model/I_HR_Process.java +++ b/base/src/org/eevolution/model/I_HR_Process.java @@ -365,6 +365,19 @@ public interface I_HR_Process */ public boolean isProcessed(); + /** Column name ProcessedOn */ + public static final String COLUMNNAME_ProcessedOn = "ProcessedOn"; + + /** Set Processed On. + * The date+time (expressed in decimal format) when the document has been processed + */ + public void setProcessedOn (BigDecimal ProcessedOn); + + /** Get Processed On. + * The date+time (expressed in decimal format) when the document has been processed + */ + public BigDecimal getProcessedOn(); + /** Column name Processing */ public static final String COLUMNNAME_Processing = "Processing"; diff --git a/base/src/org/eevolution/model/I_I_ProductPlanning.java b/base/src/org/eevolution/model/I_I_ProductPlanning.java new file mode 100644 index 0000000000..19468554cf --- /dev/null +++ b/base/src/org/eevolution/model/I_I_ProductPlanning.java @@ -0,0 +1,652 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved. * + * This program is free software, you can redistribute it and/or modify it * + * under the terms version 2 of the GNU General Public License as published * + * by the Free Software Foundation. This program is distributed in the hope * + * that it will be useful, but WITHOUT ANY WARRANTY, without even the implied * + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * + * See the GNU General Public License for more details. * + * You should have received a copy of the GNU General Public License along * + * with this program, if not, write to the Free Software Foundation, Inc., * + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * + * For the text or an alternative of this public license, you may reach us * + * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * + * or via info@compiere.org or http://www.compiere.org/license.html * + *****************************************************************************/ +package org.eevolution.model; + +import java.math.BigDecimal; +import java.sql.Timestamp; +import org.compiere.model.*; +import org.compiere.util.KeyNamePair; + +/** Generated Interface for I_ProductPlanning + * @author Adempiere (generated) + * @version Release 3.5.4a + */ +public interface I_I_ProductPlanning +{ + + /** TableName=I_ProductPlanning */ + public static final String Table_Name = "I_ProductPlanning"; + + /** AD_Table_ID=1000017 */ + public static final int Table_ID = MTable.getTable_ID(Table_Name); + + KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); + + /** AccessLevel = 2 - Client + */ + BigDecimal accessLevel = BigDecimal.valueOf(2); + + /** Load Meta Data */ + + /** Column name AD_Client_ID */ + public static final String COLUMNNAME_AD_Client_ID = "AD_Client_ID"; + + /** Get Client. + * Client/Tenant for this installation. + */ + public int getAD_Client_ID(); + + /** Column name AD_Org_ID */ + public static final String COLUMNNAME_AD_Org_ID = "AD_Org_ID"; + + /** Set Organization. + * Organizational entity within client + */ + public void setAD_Org_ID (int AD_Org_ID); + + /** Get Organization. + * Organizational entity within client + */ + public int getAD_Org_ID(); + + /** Column name AD_Workflow_ID */ + public static final String COLUMNNAME_AD_Workflow_ID = "AD_Workflow_ID"; + + /** Set Workflow. + * Workflow or combination of tasks + */ + public void setAD_Workflow_ID (int AD_Workflow_ID); + + /** Get Workflow. + * Workflow or combination of tasks + */ + public int getAD_Workflow_ID(); + + /** Column name BPartner_Value */ + public static final String COLUMNNAME_BPartner_Value = "BPartner_Value"; + + /** Set Business Partner Key. + * The Key of the Business Partner + */ + public void setBPartner_Value (String BPartner_Value); + + /** Get Business Partner Key. + * The Key of the Business Partner + */ + public String getBPartner_Value(); + + /** Column name C_BPartner_ID */ + public static final String COLUMNNAME_C_BPartner_ID = "C_BPartner_ID"; + + /** Set Business Partner . + * Identifies a Business Partner + */ + public void setC_BPartner_ID (int C_BPartner_ID); + + /** Get Business Partner . + * Identifies a Business Partner + */ + public int getC_BPartner_ID(); + + public I_C_BPartner getC_BPartner() throws RuntimeException; + + /** Column name Created */ + public static final String COLUMNNAME_Created = "Created"; + + /** Get Created. + * Date this record was created + */ + public Timestamp getCreated(); + + /** Column name CreatedBy */ + public static final String COLUMNNAME_CreatedBy = "CreatedBy"; + + /** Get Created By. + * User who created this records + */ + public int getCreatedBy(); + + /** Column name DatePromised */ + public static final String COLUMNNAME_DatePromised = "DatePromised"; + + /** Set Date Promised. + * Date Order was promised + */ + public void setDatePromised (Timestamp DatePromised); + + /** Get Date Promised. + * Date Order was promised + */ + public Timestamp getDatePromised(); + + /** Column name DD_NetworkDistribution_ID */ + public static final String COLUMNNAME_DD_NetworkDistribution_ID = "DD_NetworkDistribution_ID"; + + /** Set Network Distribution */ + public void setDD_NetworkDistribution_ID (int DD_NetworkDistribution_ID); + + /** Get Network Distribution */ + public int getDD_NetworkDistribution_ID(); + + /** Column name DeliveryTime_Promised */ + public static final String COLUMNNAME_DeliveryTime_Promised = "DeliveryTime_Promised"; + + /** Set Promised Delivery Time. + * Promised days between order and delivery + */ + public void setDeliveryTime_Promised (BigDecimal DeliveryTime_Promised); + + /** Get Promised Delivery Time. + * Promised days between order and delivery + */ + public BigDecimal getDeliveryTime_Promised(); + + /** Column name ForecastValue */ + public static final String COLUMNNAME_ForecastValue = "ForecastValue"; + + /** Set Forecast Key. + * Key of the Forecast + */ + public void setForecastValue (String ForecastValue); + + /** Get Forecast Key. + * Key of the Forecast + */ + public String getForecastValue(); + + /** Column name I_ErrorMsg */ + public static final String COLUMNNAME_I_ErrorMsg = "I_ErrorMsg"; + + /** Set Import Error Message. + * Messages generated from import process + */ + public void setI_ErrorMsg (String I_ErrorMsg); + + /** Get Import Error Message. + * Messages generated from import process + */ + public String getI_ErrorMsg(); + + /** Column name I_IsImported */ + public static final String COLUMNNAME_I_IsImported = "I_IsImported"; + + /** Set Imported. + * Has this import been processed + */ + public void setI_IsImported (boolean I_IsImported); + + /** Get Imported. + * Has this import been processed + */ + public boolean isI_IsImported(); + + /** Column name I_ProductPlanning_ID */ + public static final String COLUMNNAME_I_ProductPlanning_ID = "I_ProductPlanning_ID"; + + /** Set Import Product Planning */ + public void setI_ProductPlanning_ID (int I_ProductPlanning_ID); + + /** Get Import Product Planning */ + public int getI_ProductPlanning_ID(); + + /** Column name IsActive */ + public static final String COLUMNNAME_IsActive = "IsActive"; + + /** Set Active. + * The record is active in the system + */ + public void setIsActive (boolean IsActive); + + /** Get Active. + * The record is active in the system + */ + public boolean isActive(); + + /** Column name IsCreatePlan */ + public static final String COLUMNNAME_IsCreatePlan = "IsCreatePlan"; + + /** Set Create Plan. + * Indicates whether planned orders will be generated by MRP + */ + public void setIsCreatePlan (boolean IsCreatePlan); + + /** Get Create Plan. + * Indicates whether planned orders will be generated by MRP + */ + public boolean isCreatePlan(); + + /** Column name IsMPS */ + public static final String COLUMNNAME_IsMPS = "IsMPS"; + + /** Set Is MPS */ + public void setIsMPS (boolean IsMPS); + + /** Get Is MPS */ + public boolean isMPS(); + + /** Column name IsPhantom */ + public static final String COLUMNNAME_IsPhantom = "IsPhantom"; + + /** Set Phantom. + * Phantom Component + */ + public void setIsPhantom (boolean IsPhantom); + + /** Get Phantom. + * Phantom Component + */ + public boolean isPhantom(); + + /** Column name M_Forecast_ID */ + public static final String COLUMNNAME_M_Forecast_ID = "M_Forecast_ID"; + + /** Set Forecast. + * Material Forecast + */ + public void setM_Forecast_ID (int M_Forecast_ID); + + /** Get Forecast. + * Material Forecast + */ + public int getM_Forecast_ID(); + + public I_M_Forecast getM_Forecast() throws RuntimeException; + + /** Column name M_ForecastLine_ID */ + public static final String COLUMNNAME_M_ForecastLine_ID = "M_ForecastLine_ID"; + + /** Set Forecast Line. + * Forecast Line + */ + public void setM_ForecastLine_ID (int M_ForecastLine_ID); + + /** Get Forecast Line. + * Forecast Line + */ + public int getM_ForecastLine_ID(); + + /** Column name M_Product_ID */ + public static final String COLUMNNAME_M_Product_ID = "M_Product_ID"; + + /** Set Product. + * Product, Service, Item + */ + public void setM_Product_ID (int M_Product_ID); + + /** Get Product. + * Product, Service, Item + */ + public int getM_Product_ID(); + + public I_M_Product getM_Product() throws RuntimeException; + + /** Column name M_Warehouse_ID */ + public static final String COLUMNNAME_M_Warehouse_ID = "M_Warehouse_ID"; + + /** Set Warehouse. + * Storage Warehouse and Service Point + */ + public void setM_Warehouse_ID (int M_Warehouse_ID); + + /** Get Warehouse. + * Storage Warehouse and Service Point + */ + public int getM_Warehouse_ID(); + + public I_M_Warehouse getM_Warehouse() throws RuntimeException; + + /** Column name NetworkDistributionValue */ + public static final String COLUMNNAME_NetworkDistributionValue = "NetworkDistributionValue"; + + /** Set Network Distribution Key. + * Key of the Network Distribution + */ + public void setNetworkDistributionValue (String NetworkDistributionValue); + + /** Get Network Distribution Key. + * Key of the Network Distribution + */ + public String getNetworkDistributionValue(); + + /** Column name Order_Max */ + public static final String COLUMNNAME_Order_Max = "Order_Max"; + + /** Set Maximum Order Qty. + * Maximum order quantity in UOM + */ + public void setOrder_Max (BigDecimal Order_Max); + + /** Get Maximum Order Qty. + * Maximum order quantity in UOM + */ + public BigDecimal getOrder_Max(); + + /** Column name Order_Min */ + public static final String COLUMNNAME_Order_Min = "Order_Min"; + + /** Set Minimum Order Qty. + * Minimum order quantity in UOM + */ + public void setOrder_Min (BigDecimal Order_Min); + + /** Get Minimum Order Qty. + * Minimum order quantity in UOM + */ + public BigDecimal getOrder_Min(); + + /** Column name Order_Pack */ + public static final String COLUMNNAME_Order_Pack = "Order_Pack"; + + /** Set Order Pack Qty. + * Package order size in UOM (e.g. order set of 5 units) + */ + public void setOrder_Pack (BigDecimal Order_Pack); + + /** Get Order Pack Qty. + * Package order size in UOM (e.g. order set of 5 units) + */ + public BigDecimal getOrder_Pack(); + + /** Column name Order_Period */ + public static final String COLUMNNAME_Order_Period = "Order_Period"; + + /** Set Order Period */ + public void setOrder_Period (BigDecimal Order_Period); + + /** Get Order Period */ + public BigDecimal getOrder_Period(); + + /** Column name Order_Policy */ + public static final String COLUMNNAME_Order_Policy = "Order_Policy"; + + /** Set Order Policy */ + public void setOrder_Policy (String Order_Policy); + + /** Get Order Policy */ + public String getOrder_Policy(); + + /** Column name Order_Qty */ + public static final String COLUMNNAME_Order_Qty = "Order_Qty"; + + /** Set Order Qty */ + public void setOrder_Qty (BigDecimal Order_Qty); + + /** Get Order Qty */ + public BigDecimal getOrder_Qty(); + + /** Column name OrgValue */ + public static final String COLUMNNAME_OrgValue = "OrgValue"; + + /** Set Org Key. + * Key of the Organization + */ + public void setOrgValue (String OrgValue); + + /** Get Org Key. + * Key of the Organization + */ + public String getOrgValue(); + + /** Column name Planner_ID */ + public static final String COLUMNNAME_Planner_ID = "Planner_ID"; + + /** Set Planner */ + public void setPlanner_ID (int Planner_ID); + + /** Get Planner */ + public int getPlanner_ID(); + + public I_AD_User getPlanner() throws RuntimeException; + + /** Column name PlannerValue */ + public static final String COLUMNNAME_PlannerValue = "PlannerValue"; + + /** Set Planner Key. + * Search Key of the Planning + */ + public void setPlannerValue (String PlannerValue); + + /** Get Planner Key. + * Search Key of the Planning + */ + public String getPlannerValue(); + + /** Column name PP_Product_BOM_ID */ + public static final String COLUMNNAME_PP_Product_BOM_ID = "PP_Product_BOM_ID"; + + /** Set BOM & Formula. + * BOM & Formula + */ + public void setPP_Product_BOM_ID (int PP_Product_BOM_ID); + + /** Get BOM & Formula. + * BOM & Formula + */ + public int getPP_Product_BOM_ID(); + + public org.eevolution.model.I_PP_Product_BOM getPP_Product_BOM() throws RuntimeException; + + /** Column name PP_Product_Planning_ID */ + public static final String COLUMNNAME_PP_Product_Planning_ID = "PP_Product_Planning_ID"; + + /** Set Product Planning */ + public void setPP_Product_Planning_ID (int PP_Product_Planning_ID); + + /** Get Product Planning */ + public int getPP_Product_Planning_ID(); + + /** Column name Processed */ + public static final String COLUMNNAME_Processed = "Processed"; + + /** Set Processed. + * The document has been processed + */ + public void setProcessed (boolean Processed); + + /** Get Processed. + * The document has been processed + */ + public boolean isProcessed(); + + /** Column name Processing */ + public static final String COLUMNNAME_Processing = "Processing"; + + /** Set Process Now */ + public void setProcessing (boolean Processing); + + /** Get Process Now */ + public boolean isProcessing(); + + /** Column name Product_BOM_Value */ + public static final String COLUMNNAME_Product_BOM_Value = "Product_BOM_Value"; + + /** Set Product BOM Key. + * Key of Product BOM + */ + public void setProduct_BOM_Value (String Product_BOM_Value); + + /** Get Product BOM Key. + * Key of Product BOM + */ + public String getProduct_BOM_Value(); + + /** Column name ProductValue */ + public static final String COLUMNNAME_ProductValue = "ProductValue"; + + /** Set Product Key. + * Key of the Product + */ + public void setProductValue (String ProductValue); + + /** Get Product Key. + * Key of the Product + */ + public String getProductValue(); + + /** Column name Qty */ + public static final String COLUMNNAME_Qty = "Qty"; + + /** Set Quantity. + * Quantity + */ + public void setQty (BigDecimal Qty); + + /** Get Quantity. + * Quantity + */ + public BigDecimal getQty(); + + /** Column name ResourceValue */ + public static final String COLUMNNAME_ResourceValue = "ResourceValue"; + + /** Set Resource Key. + * Key of the Resource + */ + public void setResourceValue (String ResourceValue); + + /** Get Resource Key. + * Key of the Resource + */ + public String getResourceValue(); + + /** Column name SafetyStock */ + public static final String COLUMNNAME_SafetyStock = "SafetyStock"; + + /** Set Safety Stock Qty. + * Safety stock is a term used to describe a level of stock that is maintained below the cycle stock to buffer against stock-outs + */ + public void setSafetyStock (BigDecimal SafetyStock); + + /** Get Safety Stock Qty. + * Safety stock is a term used to describe a level of stock that is maintained below the cycle stock to buffer against stock-outs + */ + public BigDecimal getSafetyStock(); + + /** Column name SalesRep_ID */ + public static final String COLUMNNAME_SalesRep_ID = "SalesRep_ID"; + + /** Set Sales Representative. + * Sales Representative or Company Agent + */ + public void setSalesRep_ID (int SalesRep_ID); + + /** Get Sales Representative. + * Sales Representative or Company Agent + */ + public int getSalesRep_ID(); + + /** Column name S_Resource_ID */ + public static final String COLUMNNAME_S_Resource_ID = "S_Resource_ID"; + + /** Set Resource. + * Resource + */ + public void setS_Resource_ID (int S_Resource_ID); + + /** Get Resource. + * Resource + */ + public int getS_Resource_ID(); + + public I_S_Resource getS_Resource() throws RuntimeException; + + /** Column name TimeFence */ + public static final String COLUMNNAME_TimeFence = "TimeFence"; + + /** Set Time Fence */ + public void setTimeFence (BigDecimal TimeFence); + + /** Get Time Fence */ + public BigDecimal getTimeFence(); + + /** Column name TransfertTime */ + public static final String COLUMNNAME_TransfertTime = "TransfertTime"; + + /** Set Transfert Time */ + public void setTransfertTime (BigDecimal TransfertTime); + + /** Get Transfert Time */ + public BigDecimal getTransfertTime(); + + /** Column name Updated */ + public static final String COLUMNNAME_Updated = "Updated"; + + /** Get Updated. + * Date this record was updated + */ + public Timestamp getUpdated(); + + /** Column name UpdatedBy */ + public static final String COLUMNNAME_UpdatedBy = "UpdatedBy"; + + /** Get Updated By. + * User who updated this records + */ + public int getUpdatedBy(); + + /** Column name VendorProductNo */ + public static final String COLUMNNAME_VendorProductNo = "VendorProductNo"; + + /** Set Partner Product Key. + * Product Key of the Business Partner + */ + public void setVendorProductNo (String VendorProductNo); + + /** Get Partner Product Key. + * Product Key of the Business Partner + */ + public String getVendorProductNo(); + + /** Column name WarehouseValue */ + public static final String COLUMNNAME_WarehouseValue = "WarehouseValue"; + + /** Set Warehouse Key. + * Key of the Warehouse + */ + public void setWarehouseValue (String WarehouseValue); + + /** Get Warehouse Key. + * Key of the Warehouse + */ + public String getWarehouseValue(); + + /** Column name WorkingTime */ + public static final String COLUMNNAME_WorkingTime = "WorkingTime"; + + /** Set Working Time. + * Workflow Simulation Execution Time + */ + public void setWorkingTime (BigDecimal WorkingTime); + + /** Get Working Time. + * Workflow Simulation Execution Time + */ + public BigDecimal getWorkingTime(); + + /** Column name Yield */ + public static final String COLUMNNAME_Yield = "Yield"; + + /** Set Yield %. + * The Yield is the percentage of a lot that is expected to be of acceptable wuality may fall below 100 percent + */ + public void setYield (int Yield); + + /** Get Yield %. + * The Yield is the percentage of a lot that is expected to be of acceptable wuality may fall below 100 percent + */ + public int getYield(); +} diff --git a/base/src/org/eevolution/model/I_PP_Cost_Collector.java b/base/src/org/eevolution/model/I_PP_Cost_Collector.java index f0b2e92c0b..9b3711e40c 100644 --- a/base/src/org/eevolution/model/I_PP_Cost_Collector.java +++ b/base/src/org/eevolution/model/I_PP_Cost_Collector.java @@ -134,6 +134,8 @@ public interface I_PP_Cost_Collector */ public int getC_DocType_ID(); + public I_C_DocType getC_DocType() throws RuntimeException; + /** Column name C_DocTypeTarget_ID */ public static final String COLUMNNAME_C_DocTypeTarget_ID = "C_DocTypeTarget_ID"; @@ -435,10 +437,14 @@ public interface I_PP_Cost_Collector /** Column name PP_Order_ID */ public static final String COLUMNNAME_PP_Order_ID = "PP_Order_ID"; - /** Set Manufacturing Order */ + /** Set Manufacturing Order. + * Manufacturing Order + */ public void setPP_Order_ID (int PP_Order_ID); - /** Get Manufacturing Order */ + /** Get Manufacturing Order. + * Manufacturing Order + */ public int getPP_Order_ID(); public org.eevolution.model.I_PP_Order getPP_Order() throws RuntimeException; @@ -446,10 +452,14 @@ public interface I_PP_Cost_Collector /** Column name PP_Order_Node_ID */ public static final String COLUMNNAME_PP_Order_Node_ID = "PP_Order_Node_ID"; - /** Set Manufacturing Order Activity */ + /** Set Manufacturing Order Activity. + * Workflow Node (activity), step or process + */ public void setPP_Order_Node_ID (int PP_Order_Node_ID); - /** Get Manufacturing Order Activity */ + /** Get Manufacturing Order Activity. + * Workflow Node (activity), step or process + */ public int getPP_Order_Node_ID(); public org.eevolution.model.I_PP_Order_Node getPP_Order_Node() throws RuntimeException; @@ -478,6 +488,19 @@ public interface I_PP_Cost_Collector */ public boolean isProcessed(); + /** Column name ProcessedOn */ + public static final String COLUMNNAME_ProcessedOn = "ProcessedOn"; + + /** Set Processed On. + * The date+time (expressed in decimal format) when the document has been processed + */ + public void setProcessedOn (BigDecimal ProcessedOn); + + /** Get Processed On. + * The date+time (expressed in decimal format) when the document has been processed + */ + public BigDecimal getProcessedOn(); + /** Column name Processing */ public static final String COLUMNNAME_Processing = "Processing"; diff --git a/base/src/org/eevolution/model/I_PP_Order.java b/base/src/org/eevolution/model/I_PP_Order.java index 3dd2cf9df5..b0b74c71c5 100644 --- a/base/src/org/eevolution/model/I_PP_Order.java +++ b/base/src/org/eevolution/model/I_PP_Order.java @@ -241,10 +241,14 @@ public interface I_PP_Order /** Column name DateConfirm */ public static final String COLUMNNAME_DateConfirm = "DateConfirm"; - /** Set DateConfirm */ + /** Set DateConfirm. + * Date Confirm of this Order + */ public void setDateConfirm (Timestamp DateConfirm); - /** Get DateConfirm */ + /** Get DateConfirm. + * Date Confirm of this Order + */ public Timestamp getDateConfirm(); /** Column name DateDelivered */ @@ -276,10 +280,14 @@ public interface I_PP_Order /** Column name DateFinishSchedule */ public static final String COLUMNNAME_DateFinishSchedule = "DateFinishSchedule"; - /** Set DateFinishSchedule */ + /** Set Date Finish Schedule. + * Scheduled Finish date for this Order + */ public void setDateFinishSchedule (Timestamp DateFinishSchedule); - /** Get DateFinishSchedule */ + /** Get Date Finish Schedule. + * Scheduled Finish date for this Order + */ public Timestamp getDateFinishSchedule(); /** Column name DateOrdered */ @@ -311,19 +319,27 @@ public interface I_PP_Order /** Column name DateStart */ public static final String COLUMNNAME_DateStart = "DateStart"; - /** Set DateStart */ + /** Set Date Start. + * Date Start for this Order + */ public void setDateStart (Timestamp DateStart); - /** Get DateStart */ + /** Get Date Start. + * Date Start for this Order + */ public Timestamp getDateStart(); /** Column name DateStartSchedule */ public static final String COLUMNNAME_DateStartSchedule = "DateStartSchedule"; - /** Set DateStartSchedule */ + /** Set Date Start Schedule. + * Scheduled start date for this Order + */ public void setDateStartSchedule (Timestamp DateStartSchedule); - /** Get DateStartSchedule */ + /** Get Date Start Schedule. + * Scheduled start date for this Order + */ public Timestamp getDateStartSchedule(); /** Column name Description */ @@ -544,10 +560,14 @@ public interface I_PP_Order /** Column name OrderType */ public static final String COLUMNNAME_OrderType = "OrderType"; - /** Set OrderType */ + /** Set Order Type. + * Type of Order: MRP records grouped by source (Sales Order, Purchase Order, Distribution Order, Requisition) + */ public void setOrderType (String OrderType); - /** Get OrderType */ + /** Get Order Type. + * Type of Order: MRP records grouped by source (Sales Order, Purchase Order, Distribution Order, Requisition) + */ public String getOrderType(); /** Column name Planner_ID */ @@ -577,10 +597,14 @@ public interface I_PP_Order /** Column name PP_Order_ID */ public static final String COLUMNNAME_PP_Order_ID = "PP_Order_ID"; - /** Set Manufacturing Order */ + /** Set Manufacturing Order. + * Manufacturing Order + */ public void setPP_Order_ID (int PP_Order_ID); - /** Get Manufacturing Order */ + /** Get Manufacturing Order. + * Manufacturing Order + */ public int getPP_Order_ID(); /** Column name PP_Product_BOM_ID */ @@ -624,6 +648,19 @@ public interface I_PP_Order */ public boolean isProcessed(); + /** Column name ProcessedOn */ + public static final String COLUMNNAME_ProcessedOn = "ProcessedOn"; + + /** Set Processed On. + * The date+time (expressed in decimal format) when the document has been processed + */ + public void setProcessedOn (BigDecimal ProcessedOn); + + /** Get Processed On. + * The date+time (expressed in decimal format) when the document has been processed + */ + public BigDecimal getProcessedOn(); + /** Column name Processing */ public static final String COLUMNNAME_Processing = "Processing"; @@ -715,13 +752,13 @@ public interface I_PP_Order /** Column name QtyScrap */ public static final String COLUMNNAME_QtyScrap = "QtyScrap"; - /** Set QtyScrap. - * Scrap Quantity for this componet + /** Set Scrap %. + * Scrap % Quantity for this componet */ public void setQtyScrap (BigDecimal QtyScrap); - /** Get QtyScrap. - * Scrap Quantity for this componet + /** Get Scrap %. + * Scrap % Quantity for this componet */ public BigDecimal getQtyScrap(); diff --git a/base/src/org/eevolution/model/I_PP_Product_Planning.java b/base/src/org/eevolution/model/I_PP_Product_Planning.java index 465af334b8..a82ec820e4 100644 --- a/base/src/org/eevolution/model/I_PP_Product_Planning.java +++ b/base/src/org/eevolution/model/I_PP_Product_Planning.java @@ -147,10 +147,14 @@ public interface I_PP_Product_Planning /** Column name IsMPS */ public static final String COLUMNNAME_IsMPS = "IsMPS"; - /** Set Is MPS */ + /** Set Is MPS. + * Determines if this product is part of the master production schedule + */ public void setIsMPS (boolean IsMPS); - /** Get Is MPS */ + /** Get Is MPS. + * Determines if this product is part of the master production schedule + */ public boolean isMPS(); /** Column name IsPhantom */ @@ -280,17 +284,6 @@ public interface I_PP_Product_Planning /** Get Order Qty */ public BigDecimal getOrder_Qty(); - /** Column name Planner_ID */ - public static final String COLUMNNAME_Planner_ID = "Planner_ID"; - - /** Set Planner */ - public void setPlanner_ID (int Planner_ID); - - /** Get Planner */ - public int getPlanner_ID(); - - public I_AD_User getPlanner() throws RuntimeException; - /** Column name PP_Product_BOM_ID */ public static final String COLUMNNAME_PP_Product_BOM_ID = "PP_Product_BOM_ID"; @@ -315,18 +308,16 @@ public interface I_PP_Product_Planning /** Get Product Planning */ public int getPP_Product_Planning_ID(); - /** Column name SafetyStock */ - public static final String COLUMNNAME_SafetyStock = "SafetyStock"; + /** Column name Planner_ID */ + public static final String COLUMNNAME_Planner_ID = "Planner_ID"; - /** Set Safety Stock Qty. - * Safety stock is a term used to describe a level of stock that is maintained below the cycle stock to buffer against stock-outs - */ - public void setSafetyStock (BigDecimal SafetyStock); + /** Set Planner */ + public void setPlanner_ID (int Planner_ID); - /** Get Safety Stock Qty. - * Safety stock is a term used to describe a level of stock that is maintained below the cycle stock to buffer against stock-outs - */ - public BigDecimal getSafetyStock(); + /** Get Planner */ + public int getPlanner_ID(); + + public I_AD_User getPlanner() throws RuntimeException; /** Column name S_Resource_ID */ public static final String COLUMNNAME_S_Resource_ID = "S_Resource_ID"; @@ -343,6 +334,19 @@ public interface I_PP_Product_Planning public I_S_Resource getS_Resource() throws RuntimeException; + /** Column name SafetyStock */ + public static final String COLUMNNAME_SafetyStock = "SafetyStock"; + + /** Set Safety Stock Qty. + * Safety stock is a term used to describe a level of stock that is maintained below the cycle stock to buffer against stock-outs + */ + public void setSafetyStock (BigDecimal SafetyStock); + + /** Get Safety Stock Qty. + * Safety stock is a term used to describe a level of stock that is maintained below the cycle stock to buffer against stock-outs + */ + public BigDecimal getSafetyStock(); + /** Column name TimeFence */ public static final String COLUMNNAME_TimeFence = "TimeFence"; diff --git a/base/src/org/eevolution/model/MDDOrder.java b/base/src/org/eevolution/model/MDDOrder.java index 5c261fa397..1ac5b9954f 100644 --- a/base/src/org/eevolution/model/MDDOrder.java +++ b/base/src/org/eevolution/model/MDDOrder.java @@ -66,7 +66,7 @@ public class MDDOrder extends X_DD_Order implements DocAction /** * */ - private static final long serialVersionUID = -2407222565384020843L; + private static final long serialVersionUID = -5997157712614274458L; /** * Create new Order by copying @@ -433,10 +433,10 @@ public class MDDOrder extends X_DD_Order implements DocAction { StringBuffer whereClauseFinal = new StringBuffer(MDDOrderLine.COLUMNNAME_DD_Order_ID).append("=?"); if (!Util.isEmpty(whereClause, true)) - whereClauseFinal.append("AND (").append(whereClause).append(")"); + whereClauseFinal.append(" AND (").append(whereClause).append(")"); // - List list = new Query(getCtx(), MDDOrderLine.Table_Name, whereClauseFinal.toString(), get_TrxName()) - .setParameters(new Object[]{getDD_Order_ID()}) + List list = new Query(getCtx(), I_DD_OrderLine.Table_Name, whereClauseFinal.toString(), get_TrxName()) + .setParameters(getDD_Order_ID()) .setOrderBy(orderClause) .list(); return list.toArray(new MDDOrderLine[list.size()]); diff --git a/base/src/org/eevolution/model/X_DD_Order.java b/base/src/org/eevolution/model/X_DD_Order.java index 131f1f78a8..5de9c11b1b 100644 --- a/base/src/org/eevolution/model/X_DD_Order.java +++ b/base/src/org/eevolution/model/X_DD_Order.java @@ -34,7 +34,7 @@ public class X_DD_Order extends PO implements I_DD_Order, I_Persistent /** * */ - private static final long serialVersionUID = 20090915L; + private static final long serialVersionUID = 20100302L; /** Standard Constructor */ public X_DD_Order (Properties ctx, int DD_Order_ID, String trxName) @@ -43,7 +43,12 @@ public class X_DD_Order extends PO implements I_DD_Order, I_Persistent /** if (DD_Order_ID == 0) { setC_BPartner_ID (0); + setC_BPartner_Location_ID (0); setC_DocType_ID (0); + setDateOrdered (new Timestamp( System.currentTimeMillis() )); +// @#Date@ + setDatePromised (new Timestamp( System.currentTimeMillis() )); +// @#Date@ setDD_Order_ID (0); setDeliveryRule (null); // A @@ -1186,6 +1191,26 @@ public class X_DD_Order extends PO implements I_DD_Order, I_Persistent return false; } + /** Set Processed On. + @param ProcessedOn + The date+time (expressed in decimal format) when the document has been processed + */ + public void setProcessedOn (BigDecimal ProcessedOn) + { + set_Value (COLUMNNAME_ProcessedOn, ProcessedOn); + } + + /** Get Processed On. + @return The date+time (expressed in decimal format) when the document has been processed + */ + public BigDecimal getProcessedOn () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_ProcessedOn); + if (bd == null) + return Env.ZERO; + return bd; + } + /** Set Process Now. @param Processing Process Now */ public void setProcessing (boolean Processing) diff --git a/base/src/org/eevolution/model/X_HR_Process.java b/base/src/org/eevolution/model/X_HR_Process.java index 4017ba9448..dec12ddd66 100644 --- a/base/src/org/eevolution/model/X_HR_Process.java +++ b/base/src/org/eevolution/model/X_HR_Process.java @@ -17,10 +17,12 @@ /** Generated Model - DO NOT CHANGE */ package org.eevolution.model; +import java.math.BigDecimal; import java.sql.ResultSet; import java.sql.Timestamp; import java.util.Properties; import org.compiere.model.*; +import org.compiere.util.Env; import org.compiere.util.KeyNamePair; /** Generated Model for HR_Process @@ -32,7 +34,7 @@ public class X_HR_Process extends PO implements I_HR_Process, I_Persistent /** * */ - private static final long serialVersionUID = 20090915L; + private static final long serialVersionUID = 20100302L; /** Standard Constructor */ public X_HR_Process (Properties ctx, int HR_Process_ID, String trxName) @@ -639,6 +641,26 @@ public class X_HR_Process extends PO implements I_HR_Process, I_Persistent return false; } + /** Set Processed On. + @param ProcessedOn + The date+time (expressed in decimal format) when the document has been processed + */ + public void setProcessedOn (BigDecimal ProcessedOn) + { + set_Value (COLUMNNAME_ProcessedOn, ProcessedOn); + } + + /** Get Processed On. + @return The date+time (expressed in decimal format) when the document has been processed + */ + public BigDecimal getProcessedOn () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_ProcessedOn); + if (bd == null) + return Env.ZERO; + return bd; + } + /** Set Process Now. @param Processing Process Now */ public void setProcessing (boolean Processing) diff --git a/base/src/org/eevolution/model/X_I_ProductPlanning.java b/base/src/org/eevolution/model/X_I_ProductPlanning.java new file mode 100644 index 0000000000..9dea791898 --- /dev/null +++ b/base/src/org/eevolution/model/X_I_ProductPlanning.java @@ -0,0 +1,994 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved. * + * This program is free software, you can redistribute it and/or modify it * + * under the terms version 2 of the GNU General Public License as published * + * by the Free Software Foundation. This program is distributed in the hope * + * that it will be useful, but WITHOUT ANY WARRANTY, without even the implied * + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * + * See the GNU General Public License for more details. * + * You should have received a copy of the GNU General Public License along * + * with this program, if not, write to the Free Software Foundation, Inc., * + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * + * For the text or an alternative of this public license, you may reach us * + * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * + * or via info@compiere.org or http://www.compiere.org/license.html * + *****************************************************************************/ +/** Generated Model - DO NOT CHANGE */ +package org.eevolution.model; + +import java.math.BigDecimal; +import java.sql.ResultSet; +import java.sql.Timestamp; +import java.util.Properties; +import org.compiere.model.*; +import org.compiere.util.Env; + +/** Generated Model for I_ProductPlanning + * @author Adempiere (generated) + * @version Release 3.5.4a - $Id$ */ +public class X_I_ProductPlanning extends PO implements I_I_ProductPlanning, I_Persistent +{ + + /** + * + */ + private static final long serialVersionUID = 20100213L; + + /** Standard Constructor */ + public X_I_ProductPlanning (Properties ctx, int I_ProductPlanning_ID, String trxName) + { + super (ctx, I_ProductPlanning_ID, trxName); + /** if (I_ProductPlanning_ID == 0) + { + setI_IsImported (false); + setI_ProductPlanning_ID (0); + setIsCreatePlan (false); + setIsPhantom (false); + setQty (Env.ZERO); + } */ + } + + /** Load Constructor */ + public X_I_ProductPlanning (Properties ctx, ResultSet rs, String trxName) + { + super (ctx, rs, trxName); + } + + /** AccessLevel + * @return 2 - Client + */ + protected int get_AccessLevel() + { + return accessLevel.intValue(); + } + + /** Load Meta Data */ + protected POInfo initPO (Properties ctx) + { + POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName()); + return poi; + } + + public String toString() + { + StringBuffer sb = new StringBuffer ("X_I_ProductPlanning[") + .append(get_ID()).append("]"); + return sb.toString(); + } + + /** Set Workflow. + @param AD_Workflow_ID + Workflow or combination of tasks + */ + public void setAD_Workflow_ID (int AD_Workflow_ID) + { + if (AD_Workflow_ID < 1) + set_Value (COLUMNNAME_AD_Workflow_ID, null); + else + set_Value (COLUMNNAME_AD_Workflow_ID, Integer.valueOf(AD_Workflow_ID)); + } + + /** Get Workflow. + @return Workflow or combination of tasks + */ + public int getAD_Workflow_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_AD_Workflow_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Business Partner Key. + @param BPartner_Value + The Key of the Business Partner + */ + public void setBPartner_Value (String BPartner_Value) + { + set_Value (COLUMNNAME_BPartner_Value, BPartner_Value); + } + + /** Get Business Partner Key. + @return The Key of the Business Partner + */ + public String getBPartner_Value () + { + return (String)get_Value(COLUMNNAME_BPartner_Value); + } + + public I_C_BPartner getC_BPartner() throws RuntimeException + { + return (I_C_BPartner)MTable.get(getCtx(), I_C_BPartner.Table_Name) + .getPO(getC_BPartner_ID(), get_TrxName()); } + + /** Set Business Partner . + @param C_BPartner_ID + Identifies a Business Partner + */ + public void setC_BPartner_ID (int C_BPartner_ID) + { + if (C_BPartner_ID < 1) + set_Value (COLUMNNAME_C_BPartner_ID, null); + else + set_Value (COLUMNNAME_C_BPartner_ID, Integer.valueOf(C_BPartner_ID)); + } + + /** Get Business Partner . + @return Identifies a Business Partner + */ + public int getC_BPartner_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_C_BPartner_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Date Promised. + @param DatePromised + Date Order was promised + */ + public void setDatePromised (Timestamp DatePromised) + { + set_Value (COLUMNNAME_DatePromised, DatePromised); + } + + /** Get Date Promised. + @return Date Order was promised + */ + public Timestamp getDatePromised () + { + return (Timestamp)get_Value(COLUMNNAME_DatePromised); + } + + /** Set Network Distribution. + @param DD_NetworkDistribution_ID Network Distribution */ + public void setDD_NetworkDistribution_ID (int DD_NetworkDistribution_ID) + { + if (DD_NetworkDistribution_ID < 1) + set_Value (COLUMNNAME_DD_NetworkDistribution_ID, null); + else + set_Value (COLUMNNAME_DD_NetworkDistribution_ID, Integer.valueOf(DD_NetworkDistribution_ID)); + } + + /** Get Network Distribution. + @return Network Distribution */ + public int getDD_NetworkDistribution_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_DD_NetworkDistribution_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Promised Delivery Time. + @param DeliveryTime_Promised + Promised days between order and delivery + */ + public void setDeliveryTime_Promised (BigDecimal DeliveryTime_Promised) + { + set_Value (COLUMNNAME_DeliveryTime_Promised, DeliveryTime_Promised); + } + + /** Get Promised Delivery Time. + @return Promised days between order and delivery + */ + public BigDecimal getDeliveryTime_Promised () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_DeliveryTime_Promised); + if (bd == null) + return Env.ZERO; + return bd; + } + + /** Set Forecast Key. + @param ForecastValue + Key of the Forecast + */ + public void setForecastValue (String ForecastValue) + { + set_Value (COLUMNNAME_ForecastValue, ForecastValue); + } + + /** Get Forecast Key. + @return Key of the Forecast + */ + public String getForecastValue () + { + return (String)get_Value(COLUMNNAME_ForecastValue); + } + + /** Set Import Error Message. + @param I_ErrorMsg + Messages generated from import process + */ + public void setI_ErrorMsg (String I_ErrorMsg) + { + set_Value (COLUMNNAME_I_ErrorMsg, I_ErrorMsg); + } + + /** Get Import Error Message. + @return Messages generated from import process + */ + public String getI_ErrorMsg () + { + return (String)get_Value(COLUMNNAME_I_ErrorMsg); + } + + /** Set Imported. + @param I_IsImported + Has this import been processed + */ + public void setI_IsImported (boolean I_IsImported) + { + set_Value (COLUMNNAME_I_IsImported, Boolean.valueOf(I_IsImported)); + } + + /** Get Imported. + @return Has this import been processed + */ + public boolean isI_IsImported () + { + Object oo = get_Value(COLUMNNAME_I_IsImported); + if (oo != null) + { + if (oo instanceof Boolean) + return ((Boolean)oo).booleanValue(); + return "Y".equals(oo); + } + return false; + } + + /** Set Import Product Planning. + @param I_ProductPlanning_ID Import Product Planning */ + public void setI_ProductPlanning_ID (int I_ProductPlanning_ID) + { + if (I_ProductPlanning_ID < 1) + set_ValueNoCheck (COLUMNNAME_I_ProductPlanning_ID, null); + else + set_ValueNoCheck (COLUMNNAME_I_ProductPlanning_ID, Integer.valueOf(I_ProductPlanning_ID)); + } + + /** Get Import Product Planning. + @return Import Product Planning */ + public int getI_ProductPlanning_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_I_ProductPlanning_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Create Plan. + @param IsCreatePlan + Indicates whether planned orders will be generated by MRP + */ + public void setIsCreatePlan (boolean IsCreatePlan) + { + set_Value (COLUMNNAME_IsCreatePlan, Boolean.valueOf(IsCreatePlan)); + } + + /** Get Create Plan. + @return Indicates whether planned orders will be generated by MRP + */ + public boolean isCreatePlan () + { + Object oo = get_Value(COLUMNNAME_IsCreatePlan); + if (oo != null) + { + if (oo instanceof Boolean) + return ((Boolean)oo).booleanValue(); + return "Y".equals(oo); + } + return false; + } + + /** Set Is MPS. + @param IsMPS Is MPS */ + public void setIsMPS (boolean IsMPS) + { + set_Value (COLUMNNAME_IsMPS, Boolean.valueOf(IsMPS)); + } + + /** Get Is MPS. + @return Is MPS */ + public boolean isMPS () + { + Object oo = get_Value(COLUMNNAME_IsMPS); + if (oo != null) + { + if (oo instanceof Boolean) + return ((Boolean)oo).booleanValue(); + return "Y".equals(oo); + } + return false; + } + + /** Set Phantom. + @param IsPhantom + Phantom Component + */ + public void setIsPhantom (boolean IsPhantom) + { + set_Value (COLUMNNAME_IsPhantom, Boolean.valueOf(IsPhantom)); + } + + /** Get Phantom. + @return Phantom Component + */ + public boolean isPhantom () + { + Object oo = get_Value(COLUMNNAME_IsPhantom); + if (oo != null) + { + if (oo instanceof Boolean) + return ((Boolean)oo).booleanValue(); + return "Y".equals(oo); + } + return false; + } + + public I_M_Forecast getM_Forecast() throws RuntimeException + { + return (I_M_Forecast)MTable.get(getCtx(), I_M_Forecast.Table_Name) + .getPO(getM_Forecast_ID(), get_TrxName()); } + + /** Set Forecast. + @param M_Forecast_ID + Material Forecast + */ + public void setM_Forecast_ID (int M_Forecast_ID) + { + if (M_Forecast_ID < 1) + set_Value (COLUMNNAME_M_Forecast_ID, null); + else + set_Value (COLUMNNAME_M_Forecast_ID, Integer.valueOf(M_Forecast_ID)); + } + + /** Get Forecast. + @return Material Forecast + */ + public int getM_Forecast_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_M_Forecast_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Forecast Line. + @param M_ForecastLine_ID + Forecast Line + */ + public void setM_ForecastLine_ID (int M_ForecastLine_ID) + { + if (M_ForecastLine_ID < 1) + set_Value (COLUMNNAME_M_ForecastLine_ID, null); + else + set_Value (COLUMNNAME_M_ForecastLine_ID, Integer.valueOf(M_ForecastLine_ID)); + } + + /** Get Forecast Line. + @return Forecast Line + */ + public int getM_ForecastLine_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_M_ForecastLine_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public I_M_Product getM_Product() throws RuntimeException + { + return (I_M_Product)MTable.get(getCtx(), I_M_Product.Table_Name) + .getPO(getM_Product_ID(), get_TrxName()); } + + /** Set Product. + @param M_Product_ID + Product, Service, Item + */ + public void setM_Product_ID (int M_Product_ID) + { + if (M_Product_ID < 1) + set_Value (COLUMNNAME_M_Product_ID, null); + else + set_Value (COLUMNNAME_M_Product_ID, Integer.valueOf(M_Product_ID)); + } + + /** Get Product. + @return Product, Service, Item + */ + public int getM_Product_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_M_Product_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public I_M_Warehouse getM_Warehouse() throws RuntimeException + { + return (I_M_Warehouse)MTable.get(getCtx(), I_M_Warehouse.Table_Name) + .getPO(getM_Warehouse_ID(), get_TrxName()); } + + /** Set Warehouse. + @param M_Warehouse_ID + Storage Warehouse and Service Point + */ + public void setM_Warehouse_ID (int M_Warehouse_ID) + { + if (M_Warehouse_ID < 1) + set_Value (COLUMNNAME_M_Warehouse_ID, null); + else + set_Value (COLUMNNAME_M_Warehouse_ID, Integer.valueOf(M_Warehouse_ID)); + } + + /** Get Warehouse. + @return Storage Warehouse and Service Point + */ + public int getM_Warehouse_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_M_Warehouse_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Network Distribution Key. + @param NetworkDistributionValue + Key of the Network Distribution + */ + public void setNetworkDistributionValue (String NetworkDistributionValue) + { + set_Value (COLUMNNAME_NetworkDistributionValue, NetworkDistributionValue); + } + + /** Get Network Distribution Key. + @return Key of the Network Distribution + */ + public String getNetworkDistributionValue () + { + return (String)get_Value(COLUMNNAME_NetworkDistributionValue); + } + + /** Set Maximum Order Qty. + @param Order_Max + Maximum order quantity in UOM + */ + public void setOrder_Max (BigDecimal Order_Max) + { + set_Value (COLUMNNAME_Order_Max, Order_Max); + } + + /** Get Maximum Order Qty. + @return Maximum order quantity in UOM + */ + public BigDecimal getOrder_Max () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Order_Max); + if (bd == null) + return Env.ZERO; + return bd; + } + + /** Set Minimum Order Qty. + @param Order_Min + Minimum order quantity in UOM + */ + public void setOrder_Min (BigDecimal Order_Min) + { + set_Value (COLUMNNAME_Order_Min, Order_Min); + } + + /** Get Minimum Order Qty. + @return Minimum order quantity in UOM + */ + public BigDecimal getOrder_Min () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Order_Min); + if (bd == null) + return Env.ZERO; + return bd; + } + + /** Set Order Pack Qty. + @param Order_Pack + Package order size in UOM (e.g. order set of 5 units) + */ + public void setOrder_Pack (BigDecimal Order_Pack) + { + set_Value (COLUMNNAME_Order_Pack, Order_Pack); + } + + /** Get Order Pack Qty. + @return Package order size in UOM (e.g. order set of 5 units) + */ + public BigDecimal getOrder_Pack () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Order_Pack); + if (bd == null) + return Env.ZERO; + return bd; + } + + /** Set Order Period. + @param Order_Period Order Period */ + public void setOrder_Period (BigDecimal Order_Period) + { + set_Value (COLUMNNAME_Order_Period, Order_Period); + } + + /** Get Order Period. + @return Order Period */ + public BigDecimal getOrder_Period () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Order_Period); + if (bd == null) + return Env.ZERO; + return bd; + } + + /** Order_Policy AD_Reference_ID=53228 */ + public static final int ORDER_POLICY_AD_Reference_ID=53228; + /** Fixed Order Quantity = FOQ */ + public static final String ORDER_POLICY_FixedOrderQuantity = "FOQ"; + /** Lot-for-Lot = LFL */ + public static final String ORDER_POLICY_Lot_For_Lot = "LFL"; + /** Period Order Quantity = POQ */ + public static final String ORDER_POLICY_PeriodOrderQuantity = "POQ"; + /** Set Order Policy. + @param Order_Policy Order Policy */ + public void setOrder_Policy (String Order_Policy) + { + + set_Value (COLUMNNAME_Order_Policy, Order_Policy); + } + + /** Get Order Policy. + @return Order Policy */ + public String getOrder_Policy () + { + return (String)get_Value(COLUMNNAME_Order_Policy); + } + + /** Set Order Qty. + @param Order_Qty Order Qty */ + public void setOrder_Qty (BigDecimal Order_Qty) + { + set_Value (COLUMNNAME_Order_Qty, Order_Qty); + } + + /** Get Order Qty. + @return Order Qty */ + public BigDecimal getOrder_Qty () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Order_Qty); + if (bd == null) + return Env.ZERO; + return bd; + } + + /** Set Org Key. + @param OrgValue + Key of the Organization + */ + public void setOrgValue (String OrgValue) + { + set_Value (COLUMNNAME_OrgValue, OrgValue); + } + + /** Get Org Key. + @return Key of the Organization + */ + public String getOrgValue () + { + return (String)get_Value(COLUMNNAME_OrgValue); + } + + public I_AD_User getPlanner() throws RuntimeException + { + return (I_AD_User)MTable.get(getCtx(), I_AD_User.Table_Name) + .getPO(getPlanner_ID(), get_TrxName()); } + + /** Set Planner. + @param Planner_ID Planner */ + public void setPlanner_ID (int Planner_ID) + { + if (Planner_ID < 1) + set_Value (COLUMNNAME_Planner_ID, null); + else + set_Value (COLUMNNAME_Planner_ID, Integer.valueOf(Planner_ID)); + } + + /** Get Planner. + @return Planner */ + public int getPlanner_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_Planner_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Planner Key. + @param PlannerValue + Search Key of the Planning + */ + public void setPlannerValue (String PlannerValue) + { + set_Value (COLUMNNAME_PlannerValue, PlannerValue); + } + + /** Get Planner Key. + @return Search Key of the Planning + */ + public String getPlannerValue () + { + return (String)get_Value(COLUMNNAME_PlannerValue); + } + + public org.eevolution.model.I_PP_Product_BOM getPP_Product_BOM() throws RuntimeException + { + return (org.eevolution.model.I_PP_Product_BOM)MTable.get(getCtx(), org.eevolution.model.I_PP_Product_BOM.Table_Name) + .getPO(getPP_Product_BOM_ID(), get_TrxName()); } + + /** Set BOM & Formula. + @param PP_Product_BOM_ID + BOM & Formula + */ + public void setPP_Product_BOM_ID (int PP_Product_BOM_ID) + { + if (PP_Product_BOM_ID < 1) + set_Value (COLUMNNAME_PP_Product_BOM_ID, null); + else + set_Value (COLUMNNAME_PP_Product_BOM_ID, Integer.valueOf(PP_Product_BOM_ID)); + } + + /** Get BOM & Formula. + @return BOM & Formula + */ + public int getPP_Product_BOM_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_PP_Product_BOM_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Product Planning. + @param PP_Product_Planning_ID Product Planning */ + public void setPP_Product_Planning_ID (int PP_Product_Planning_ID) + { + if (PP_Product_Planning_ID < 1) + set_Value (COLUMNNAME_PP_Product_Planning_ID, null); + else + set_Value (COLUMNNAME_PP_Product_Planning_ID, Integer.valueOf(PP_Product_Planning_ID)); + } + + /** Get Product Planning. + @return Product Planning */ + public int getPP_Product_Planning_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_PP_Product_Planning_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Processed. + @param Processed + The document has been processed + */ + public void setProcessed (boolean Processed) + { + set_ValueNoCheck (COLUMNNAME_Processed, Boolean.valueOf(Processed)); + } + + /** Get Processed. + @return The document has been processed + */ + public boolean isProcessed () + { + Object oo = get_Value(COLUMNNAME_Processed); + if (oo != null) + { + if (oo instanceof Boolean) + return ((Boolean)oo).booleanValue(); + return "Y".equals(oo); + } + return false; + } + + /** Set Process Now. + @param Processing Process Now */ + public void setProcessing (boolean Processing) + { + set_Value (COLUMNNAME_Processing, Boolean.valueOf(Processing)); + } + + /** Get Process Now. + @return Process Now */ + public boolean isProcessing () + { + Object oo = get_Value(COLUMNNAME_Processing); + if (oo != null) + { + if (oo instanceof Boolean) + return ((Boolean)oo).booleanValue(); + return "Y".equals(oo); + } + return false; + } + + /** Set Product BOM Key. + @param Product_BOM_Value + Key of Product BOM + */ + public void setProduct_BOM_Value (String Product_BOM_Value) + { + set_Value (COLUMNNAME_Product_BOM_Value, Product_BOM_Value); + } + + /** Get Product BOM Key. + @return Key of Product BOM + */ + public String getProduct_BOM_Value () + { + return (String)get_Value(COLUMNNAME_Product_BOM_Value); + } + + /** Set Product Key. + @param ProductValue + Key of the Product + */ + public void setProductValue (String ProductValue) + { + set_Value (COLUMNNAME_ProductValue, ProductValue); + } + + /** Get Product Key. + @return Key of the Product + */ + public String getProductValue () + { + return (String)get_Value(COLUMNNAME_ProductValue); + } + + /** Set Quantity. + @param Qty + Quantity + */ + public void setQty (BigDecimal Qty) + { + set_Value (COLUMNNAME_Qty, Qty); + } + + /** Get Quantity. + @return Quantity + */ + public BigDecimal getQty () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Qty); + if (bd == null) + return Env.ZERO; + return bd; + } + + /** Set Resource Key. + @param ResourceValue + Key of the Resource + */ + public void setResourceValue (String ResourceValue) + { + set_Value (COLUMNNAME_ResourceValue, ResourceValue); + } + + /** Get Resource Key. + @return Key of the Resource + */ + public String getResourceValue () + { + return (String)get_Value(COLUMNNAME_ResourceValue); + } + + /** Set Safety Stock Qty. + @param SafetyStock + Safety stock is a term used to describe a level of stock that is maintained below the cycle stock to buffer against stock-outs + */ + public void setSafetyStock (BigDecimal SafetyStock) + { + set_Value (COLUMNNAME_SafetyStock, SafetyStock); + } + + /** Get Safety Stock Qty. + @return Safety stock is a term used to describe a level of stock that is maintained below the cycle stock to buffer against stock-outs + */ + public BigDecimal getSafetyStock () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_SafetyStock); + if (bd == null) + return Env.ZERO; + return bd; + } + + /** Set Sales Representative. + @param SalesRep_ID + Sales Representative or Company Agent + */ + public void setSalesRep_ID (int SalesRep_ID) + { + if (SalesRep_ID < 1) + set_Value (COLUMNNAME_SalesRep_ID, null); + else + set_Value (COLUMNNAME_SalesRep_ID, Integer.valueOf(SalesRep_ID)); + } + + /** Get Sales Representative. + @return Sales Representative or Company Agent + */ + public int getSalesRep_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_SalesRep_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public I_S_Resource getS_Resource() throws RuntimeException + { + return (I_S_Resource)MTable.get(getCtx(), I_S_Resource.Table_Name) + .getPO(getS_Resource_ID(), get_TrxName()); } + + /** Set Resource. + @param S_Resource_ID + Resource + */ + public void setS_Resource_ID (int S_Resource_ID) + { + if (S_Resource_ID < 1) + set_Value (COLUMNNAME_S_Resource_ID, null); + else + set_Value (COLUMNNAME_S_Resource_ID, Integer.valueOf(S_Resource_ID)); + } + + /** Get Resource. + @return Resource + */ + public int getS_Resource_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_S_Resource_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Time Fence. + @param TimeFence Time Fence */ + public void setTimeFence (BigDecimal TimeFence) + { + set_Value (COLUMNNAME_TimeFence, TimeFence); + } + + /** Get Time Fence. + @return Time Fence */ + public BigDecimal getTimeFence () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_TimeFence); + if (bd == null) + return Env.ZERO; + return bd; + } + + /** Set Transfert Time. + @param TransfertTime Transfert Time */ + public void setTransfertTime (BigDecimal TransfertTime) + { + set_Value (COLUMNNAME_TransfertTime, TransfertTime); + } + + /** Get Transfert Time. + @return Transfert Time */ + public BigDecimal getTransfertTime () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_TransfertTime); + if (bd == null) + return Env.ZERO; + return bd; + } + + /** Set Partner Product Key. + @param VendorProductNo + Product Key of the Business Partner + */ + public void setVendorProductNo (String VendorProductNo) + { + set_Value (COLUMNNAME_VendorProductNo, VendorProductNo); + } + + /** Get Partner Product Key. + @return Product Key of the Business Partner + */ + public String getVendorProductNo () + { + return (String)get_Value(COLUMNNAME_VendorProductNo); + } + + /** Set Warehouse Key. + @param WarehouseValue + Key of the Warehouse + */ + public void setWarehouseValue (String WarehouseValue) + { + set_Value (COLUMNNAME_WarehouseValue, WarehouseValue); + } + + /** Get Warehouse Key. + @return Key of the Warehouse + */ + public String getWarehouseValue () + { + return (String)get_Value(COLUMNNAME_WarehouseValue); + } + + /** Set Working Time. + @param WorkingTime + Workflow Simulation Execution Time + */ + public void setWorkingTime (BigDecimal WorkingTime) + { + set_Value (COLUMNNAME_WorkingTime, WorkingTime); + } + + /** Get Working Time. + @return Workflow Simulation Execution Time + */ + public BigDecimal getWorkingTime () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_WorkingTime); + if (bd == null) + return Env.ZERO; + return bd; + } + + /** Set Yield %. + @param Yield + The Yield is the percentage of a lot that is expected to be of acceptable wuality may fall below 100 percent + */ + public void setYield (int Yield) + { + set_Value (COLUMNNAME_Yield, Integer.valueOf(Yield)); + } + + /** Get Yield %. + @return The Yield is the percentage of a lot that is expected to be of acceptable wuality may fall below 100 percent + */ + public int getYield () + { + Integer ii = (Integer)get_Value(COLUMNNAME_Yield); + if (ii == null) + return 0; + return ii.intValue(); + } +} \ No newline at end of file diff --git a/base/src/org/eevolution/model/X_PP_Cost_Collector.java b/base/src/org/eevolution/model/X_PP_Cost_Collector.java index cf20b00278..bd542962ca 100644 --- a/base/src/org/eevolution/model/X_PP_Cost_Collector.java +++ b/base/src/org/eevolution/model/X_PP_Cost_Collector.java @@ -34,7 +34,7 @@ public class X_PP_Cost_Collector extends PO implements I_PP_Cost_Collector, I_Pe /** * */ - private static final long serialVersionUID = 20090915L; + private static final long serialVersionUID = 20100302L; /** Standard Constructor */ public X_PP_Cost_Collector (Properties ctx, int PP_Cost_Collector_ID, String trxName) @@ -198,6 +198,11 @@ public class X_PP_Cost_Collector extends PO implements I_PP_Cost_Collector, I_Pe return ii.intValue(); } + public I_C_DocType getC_DocType() throws RuntimeException + { + return (I_C_DocType)MTable.get(getCtx(), I_C_DocType.Table_Name) + .getPO(getC_DocType_ID(), get_TrxName()); } + /** Set Document Type. @param C_DocType_ID Document type or rules @@ -773,7 +778,9 @@ public class X_PP_Cost_Collector extends PO implements I_PP_Cost_Collector, I_Pe .getPO(getPP_Order_ID(), get_TrxName()); } /** Set Manufacturing Order. - @param PP_Order_ID Manufacturing Order */ + @param PP_Order_ID + Manufacturing Order + */ public void setPP_Order_ID (int PP_Order_ID) { if (PP_Order_ID < 1) @@ -783,7 +790,8 @@ public class X_PP_Cost_Collector extends PO implements I_PP_Cost_Collector, I_Pe } /** Get Manufacturing Order. - @return Manufacturing Order */ + @return Manufacturing Order + */ public int getPP_Order_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_PP_Order_ID); @@ -798,7 +806,9 @@ public class X_PP_Cost_Collector extends PO implements I_PP_Cost_Collector, I_Pe .getPO(getPP_Order_Node_ID(), get_TrxName()); } /** Set Manufacturing Order Activity. - @param PP_Order_Node_ID Manufacturing Order Activity */ + @param PP_Order_Node_ID + Workflow Node (activity), step or process + */ public void setPP_Order_Node_ID (int PP_Order_Node_ID) { if (PP_Order_Node_ID < 1) @@ -808,7 +818,8 @@ public class X_PP_Cost_Collector extends PO implements I_PP_Cost_Collector, I_Pe } /** Get Manufacturing Order Activity. - @return Manufacturing Order Activity */ + @return Workflow Node (activity), step or process + */ public int getPP_Order_Node_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_PP_Order_Node_ID); @@ -866,6 +877,26 @@ public class X_PP_Cost_Collector extends PO implements I_PP_Cost_Collector, I_Pe return false; } + /** Set Processed On. + @param ProcessedOn + The date+time (expressed in decimal format) when the document has been processed + */ + public void setProcessedOn (BigDecimal ProcessedOn) + { + set_Value (COLUMNNAME_ProcessedOn, ProcessedOn); + } + + /** Get Processed On. + @return The date+time (expressed in decimal format) when the document has been processed + */ + public BigDecimal getProcessedOn () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_ProcessedOn); + if (bd == null) + return Env.ZERO; + return bd; + } + /** Set Process Now. @param Processing Process Now */ public void setProcessing (boolean Processing) diff --git a/base/src/org/eevolution/model/X_PP_Order.java b/base/src/org/eevolution/model/X_PP_Order.java index 4da2ccbf83..8e6d72364a 100644 --- a/base/src/org/eevolution/model/X_PP_Order.java +++ b/base/src/org/eevolution/model/X_PP_Order.java @@ -34,7 +34,7 @@ public class X_PP_Order extends PO implements I_PP_Order, I_Persistent /** * */ - private static final long serialVersionUID = 20090915L; + private static final long serialVersionUID = 20100302L; /** Standard Constructor */ public X_PP_Order (Properties ctx, int PP_Order_ID, String trxName) @@ -400,14 +400,17 @@ public class X_PP_Order extends PO implements I_PP_Order, I_Persistent } /** Set DateConfirm. - @param DateConfirm DateConfirm */ + @param DateConfirm + Date Confirm of this Order + */ public void setDateConfirm (Timestamp DateConfirm) { set_ValueNoCheck (COLUMNNAME_DateConfirm, DateConfirm); } /** Get DateConfirm. - @return DateConfirm */ + @return Date Confirm of this Order + */ public Timestamp getDateConfirm () { return (Timestamp)get_Value(COLUMNNAME_DateConfirm); @@ -447,15 +450,18 @@ public class X_PP_Order extends PO implements I_PP_Order, I_Persistent return (Timestamp)get_Value(COLUMNNAME_DateFinish); } - /** Set DateFinishSchedule. - @param DateFinishSchedule DateFinishSchedule */ + /** Set Date Finish Schedule. + @param DateFinishSchedule + Scheduled Finish date for this Order + */ public void setDateFinishSchedule (Timestamp DateFinishSchedule) { set_Value (COLUMNNAME_DateFinishSchedule, DateFinishSchedule); } - /** Get DateFinishSchedule. - @return DateFinishSchedule */ + /** Get Date Finish Schedule. + @return Scheduled Finish date for this Order + */ public Timestamp getDateFinishSchedule () { return (Timestamp)get_Value(COLUMNNAME_DateFinishSchedule); @@ -495,29 +501,35 @@ public class X_PP_Order extends PO implements I_PP_Order, I_Persistent return (Timestamp)get_Value(COLUMNNAME_DatePromised); } - /** Set DateStart. - @param DateStart DateStart */ + /** Set Date Start. + @param DateStart + Date Start for this Order + */ public void setDateStart (Timestamp DateStart) { set_ValueNoCheck (COLUMNNAME_DateStart, DateStart); } - /** Get DateStart. - @return DateStart */ + /** Get Date Start. + @return Date Start for this Order + */ public Timestamp getDateStart () { return (Timestamp)get_Value(COLUMNNAME_DateStart); } - /** Set DateStartSchedule. - @param DateStartSchedule DateStartSchedule */ + /** Set Date Start Schedule. + @param DateStartSchedule + Scheduled start date for this Order + */ public void setDateStartSchedule (Timestamp DateStartSchedule) { set_Value (COLUMNNAME_DateStartSchedule, DateStartSchedule); } - /** Get DateStartSchedule. - @return DateStartSchedule */ + /** Get Date Start Schedule. + @return Scheduled start date for this Order + */ public Timestamp getDateStartSchedule () { return (Timestamp)get_Value(COLUMNNAME_DateStartSchedule); @@ -929,15 +941,18 @@ public class X_PP_Order extends PO implements I_PP_Order, I_Persistent return ii.intValue(); } - /** Set OrderType. - @param OrderType OrderType */ + /** Set Order Type. + @param OrderType + Type of Order: MRP records grouped by source (Sales Order, Purchase Order, Distribution Order, Requisition) + */ public void setOrderType (String OrderType) { set_Value (COLUMNNAME_OrderType, OrderType); } - /** Get OrderType. - @return OrderType */ + /** Get Order Type. + @return Type of Order: MRP records grouped by source (Sales Order, Purchase Order, Distribution Order, Requisition) + */ public String getOrderType () { return (String)get_Value(COLUMNNAME_OrderType); @@ -993,7 +1008,9 @@ public class X_PP_Order extends PO implements I_PP_Order, I_Persistent } /** Set Manufacturing Order. - @param PP_Order_ID Manufacturing Order */ + @param PP_Order_ID + Manufacturing Order + */ public void setPP_Order_ID (int PP_Order_ID) { if (PP_Order_ID < 1) @@ -1003,7 +1020,8 @@ public class X_PP_Order extends PO implements I_PP_Order, I_Persistent } /** Get Manufacturing Order. - @return Manufacturing Order */ + @return Manufacturing Order + */ public int getPP_Order_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_PP_Order_ID); @@ -1094,6 +1112,26 @@ public class X_PP_Order extends PO implements I_PP_Order, I_Persistent return false; } + /** Set Processed On. + @param ProcessedOn + The date+time (expressed in decimal format) when the document has been processed + */ + public void setProcessedOn (BigDecimal ProcessedOn) + { + set_Value (COLUMNNAME_ProcessedOn, ProcessedOn); + } + + /** Get Processed On. + @return The date+time (expressed in decimal format) when the document has been processed + */ + public BigDecimal getProcessedOn () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_ProcessedOn); + if (bd == null) + return Env.ZERO; + return bd; + } + /** Set Process Now. @param Processing Process Now */ public void setProcessing (boolean Processing) @@ -1246,17 +1284,17 @@ public class X_PP_Order extends PO implements I_PP_Order, I_Persistent return bd; } - /** Set QtyScrap. + /** Set Scrap %. @param QtyScrap - Scrap Quantity for this componet + Scrap % Quantity for this componet */ public void setQtyScrap (BigDecimal QtyScrap) { set_Value (COLUMNNAME_QtyScrap, QtyScrap); } - /** Get QtyScrap. - @return Scrap Quantity for this componet + /** Get Scrap %. + @return Scrap % Quantity for this componet */ public BigDecimal getQtyScrap () { diff --git a/base/src/org/eevolution/model/X_PP_Product_Planning.java b/base/src/org/eevolution/model/X_PP_Product_Planning.java index 6432c40565..fa4a1372fd 100644 --- a/base/src/org/eevolution/model/X_PP_Product_Planning.java +++ b/base/src/org/eevolution/model/X_PP_Product_Planning.java @@ -22,6 +22,7 @@ import java.sql.ResultSet; import java.util.Properties; import org.compiere.model.*; import org.compiere.util.Env; +import org.compiere.util.KeyNamePair; /** Generated Model for PP_Product_Planning * @author Adempiere (generated) @@ -32,7 +33,7 @@ public class X_PP_Product_Planning extends PO implements I_PP_Product_Planning, /** * */ - private static final long serialVersionUID = 20090915L; + private static final long serialVersionUID = 20100215L; /** Standard Constructor */ public X_PP_Product_Planning (Properties ctx, int PP_Product_Planning_ID, String trxName) @@ -175,14 +176,17 @@ public class X_PP_Product_Planning extends PO implements I_PP_Product_Planning, } /** Set Is MPS. - @param IsMPS Is MPS */ + @param IsMPS + Determines if this product is part of the master production schedule + */ public void setIsMPS (boolean IsMPS) { set_Value (COLUMNNAME_IsMPS, Boolean.valueOf(IsMPS)); } /** Get Is MPS. - @return Is MPS */ + @return Determines if this product is part of the master production schedule + */ public boolean isMPS () { Object oo = get_Value(COLUMNNAME_IsMPS); @@ -289,6 +293,14 @@ public class X_PP_Product_Planning extends PO implements I_PP_Product_Planning, return ii.intValue(); } + /** Get Record ID/ColumnName + @return ID/ColumnName pair + */ + public KeyNamePair getKeyNamePair() + { + return new KeyNamePair(get_ID(), String.valueOf(getM_Product_ID())); + } + public I_M_Warehouse getM_Warehouse() throws RuntimeException { return (I_M_Warehouse)MTable.get(getCtx(), I_M_Warehouse.Table_Name) @@ -434,31 +446,6 @@ public class X_PP_Product_Planning extends PO implements I_PP_Product_Planning, return bd; } - public I_AD_User getPlanner() throws RuntimeException - { - return (I_AD_User)MTable.get(getCtx(), I_AD_User.Table_Name) - .getPO(getPlanner_ID(), get_TrxName()); } - - /** Set Planner. - @param Planner_ID Planner */ - public void setPlanner_ID (int Planner_ID) - { - if (Planner_ID < 1) - set_Value (COLUMNNAME_Planner_ID, null); - else - set_Value (COLUMNNAME_Planner_ID, Integer.valueOf(Planner_ID)); - } - - /** Get Planner. - @return Planner */ - public int getPlanner_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_Planner_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - public org.eevolution.model.I_PP_Product_BOM getPP_Product_BOM() throws RuntimeException { return (org.eevolution.model.I_PP_Product_BOM)MTable.get(getCtx(), org.eevolution.model.I_PP_Product_BOM.Table_Name) @@ -507,24 +494,29 @@ public class X_PP_Product_Planning extends PO implements I_PP_Product_Planning, return ii.intValue(); } - /** Set Safety Stock Qty. - @param SafetyStock - Safety stock is a term used to describe a level of stock that is maintained below the cycle stock to buffer against stock-outs - */ - public void setSafetyStock (BigDecimal SafetyStock) + public I_AD_User getPlanner() throws RuntimeException + { + return (I_AD_User)MTable.get(getCtx(), I_AD_User.Table_Name) + .getPO(getPlanner_ID(), get_TrxName()); } + + /** Set Planner. + @param Planner_ID Planner */ + public void setPlanner_ID (int Planner_ID) { - set_Value (COLUMNNAME_SafetyStock, SafetyStock); + if (Planner_ID < 1) + set_Value (COLUMNNAME_Planner_ID, null); + else + set_Value (COLUMNNAME_Planner_ID, Integer.valueOf(Planner_ID)); } - /** Get Safety Stock Qty. - @return Safety stock is a term used to describe a level of stock that is maintained below the cycle stock to buffer against stock-outs - */ - public BigDecimal getSafetyStock () + /** Get Planner. + @return Planner */ + public int getPlanner_ID () { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_SafetyStock); - if (bd == null) - return Env.ZERO; - return bd; + Integer ii = (Integer)get_Value(COLUMNNAME_Planner_ID); + if (ii == null) + return 0; + return ii.intValue(); } public I_S_Resource getS_Resource() throws RuntimeException @@ -555,6 +547,26 @@ public class X_PP_Product_Planning extends PO implements I_PP_Product_Planning, return ii.intValue(); } + /** Set Safety Stock Qty. + @param SafetyStock + Safety stock is a term used to describe a level of stock that is maintained below the cycle stock to buffer against stock-outs + */ + public void setSafetyStock (BigDecimal SafetyStock) + { + set_Value (COLUMNNAME_SafetyStock, SafetyStock); + } + + /** Get Safety Stock Qty. + @return Safety stock is a term used to describe a level of stock that is maintained below the cycle stock to buffer against stock-outs + */ + public BigDecimal getSafetyStock () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_SafetyStock); + if (bd == null) + return Env.ZERO; + return bd; + } + /** Set Time Fence. @param TimeFence Time Fence */ public void setTimeFence (BigDecimal TimeFence) diff --git a/base/src/org/eevolution/process/ExportFormatGenerator.java b/base/src/org/eevolution/process/ExportFormatGenerator.java index f082ed621d..f56077e1ae 100644 --- a/base/src/org/eevolution/process/ExportFormatGenerator.java +++ b/base/src/org/eevolution/process/ExportFormatGenerator.java @@ -15,11 +15,11 @@ *****************************************************************************/ package org.eevolution.process; -import java.sql.SQLException; import java.util.Hashtable; import java.util.logging.Level; import org.adempiere.exceptions.AdempiereException; +import org.compiere.model.I_EXP_Format; import org.compiere.model.MColumn; import org.compiere.model.MEXPFormat; import org.compiere.model.MEXPFormatLine; @@ -46,7 +46,7 @@ public class ExportFormatGenerator extends SvrProcess private int p_AD_Window_ID = 0; private boolean p_IsMandatory = false; private boolean p_IsInsertRecord= false; - private Hashtable m_formats = new Hashtable(); + private Hashtable m_formats = new Hashtable(); private String version = "3.2.0"; private String m_parent_table = null; private String m_format_value = null; @@ -147,7 +147,7 @@ public class ExportFormatGenerator extends SvrProcess return format.getValue(); String where=" value = ? "; - Query sql = new Query(getCtx(),MEXPFormat.Table_Name,where,get_TrxName()).setParameters(new Object[]{formatValue}); + Query sql = new Query(getCtx(),I_EXP_Format.Table_Name,where,get_TrxName()).setParameters(formatValue); if(sql.match()) { format = (MEXPFormat) sql.first(); diff --git a/client/src/org/compiere/apps/AGlassPane.java b/client/src/org/compiere/apps/AGlassPane.java index a5e0340a8b..a1a34b518b 100644 --- a/client/src/org/compiere/apps/AGlassPane.java +++ b/client/src/org/compiere/apps/AGlassPane.java @@ -126,14 +126,25 @@ public class AGlassPane extends JPanel implements MouseListener, ActionListener m_timervalue = 0; // Start Timer - m_timer = new Timer (1000, this); // every second + if(m_timer == null) + { + m_timer = new Timer (1000, this); // every second + } m_timer.start(); if (!isVisible()) setVisible(true); repaint(); } // setBusyTimer - + + @Override + public void setVisible(boolean flag) { + if(!flag && m_timer != null) + { + m_timer.stop(); + } + super.setVisible(flag); + } /** * ActionListener * @param e event diff --git a/client/src/org/compiere/apps/ALogin.java b/client/src/org/compiere/apps/ALogin.java index 8eea499dc0..de34509e85 100644 --- a/client/src/org/compiere/apps/ALogin.java +++ b/client/src/org/compiere/apps/ALogin.java @@ -46,6 +46,7 @@ import org.compiere.db.CConnectionEditor; import org.compiere.grid.ed.VComboBox; import org.compiere.grid.ed.VDate; import org.compiere.model.MSystem; +import org.compiere.model.MUser; import org.compiere.print.CPrinter; import org.compiere.swing.CButton; import org.compiere.swing.CDialog; @@ -758,6 +759,14 @@ public final class ALogin extends CDialog return; log.config(": " + client); m_comboActive = true; + // @Trifon - Set Proper "#AD_Client_ID", #AD_User_ID and "#SalesRep_ID" + // https://sourceforge.net/tracker/?func=detail&aid=2957215&group_id=176962&atid=879332 + Env.setContext(m_ctx, "#AD_Client_ID", client.getKey()); + MUser user = MUser.get (m_ctx, userTextField.getText(), new String (passwordField.getPassword()) ); + if (user != null) { + Env.setContext(m_ctx, "#AD_User_ID", user.getAD_User_ID() ); + Env.setContext(m_ctx, "#SalesRep_ID", user.getAD_User_ID() ); + } // KeyNamePair[] orgs = m_login.getOrgs(client); // delete existing cleint items diff --git a/client/src/org/compiere/apps/APanel.java b/client/src/org/compiere/apps/APanel.java index 3363265c0f..1303153e46 100644 --- a/client/src/org/compiere/apps/APanel.java +++ b/client/src/org/compiere/apps/APanel.java @@ -33,7 +33,9 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.Iterator; +import java.util.Map; import java.util.Properties; +import java.util.TreeMap; import java.util.Vector; import java.util.logging.Level; @@ -113,7 +115,7 @@ import org.compiere.util.Util; * * @author Jorg Janke * @version $Id: APanel.java,v 1.4 2006/07/30 00:51:27 jjanke Exp $ - * + * * Colin Rooney 2007/03/20 RFE#1670185 & related BUG#1684142 - Extend Sec to Info Queries * @contributor Victor Perez , e-Evolution.SC FR [ 1757088 ] * @contributor fer_luck@centuryon.com , FR [ 1757088 ] @@ -127,13 +129,13 @@ import org.compiere.util.Util; * @author Teo Sarca, teo.sarca@gmail.com *
  • BF [ 2876892 ] Save included tab before calling button action * https://sourceforge.net/tracker/?func=detail&aid=2876892&group_id=176962&atid=879332 - * @author victor.perez@e-evolution.com + * @author victor.perez@e-evolution.com * @see FR [ 1966328 ] New Window Info to MRP and CRP into View http://sourceforge.net/tracker/index.php?func=detail&aid=1966328&group_id=176962&atid=879335 * @autor tobi42, metas GmBH *
  • BF [ 2799362 ] You can press New button a lot of times * @author Cristina Ghita, www.arhipac.ro * @see FR [ 2877111 ] See identifiers columns when delete records https://sourceforge.net/tracker/?func=detail&atid=879335&aid=2877111&group_id=176962 - * + * * @author hengsin, hengsin.low@idalica.com * @see FR [2887701] https://sourceforge.net/tracker/?func=detail&atid=879335&aid=2887701&group_id=176962 * @sponsor www.metas.de @@ -142,12 +144,12 @@ public final class APanel extends CPanel implements DataStatusListener, ChangeListener, ActionListener, ASyncProcess { /** - * + * */ private static final long serialVersionUID = 6066778919781303581L; private boolean isNested = false; - + /** * Constructs a new instance. * Need to call initPanel for dynamic initialization @@ -161,7 +163,7 @@ public final class APanel extends CPanel m_curGC = gc; gc.addDataStatusListener(this); m_curTab = gc.getMTab(); - + Component tabElement = null; tabElement = gc; VTabbedPane tabPane = new VTabbedPane(false); @@ -174,20 +176,20 @@ public final class APanel extends CPanel catch(Exception e){ log.log(Level.SEVERE, "", e); } - + createMenu(); - - MRole role = MRole.getDefault(); + + MRole role = MRole.getDefault(); m_curGC.query (m_onlyCurrentRows, m_onlyCurrentDays, role.getMaxQueryRecords()); m_curTab.navigateCurrent(); // updates counter m_curGC.dynamicDisplay(0); } - + public APanel(AWindow window) { super(); m_window = window; - + m_ctx = Env.getCtx(); // try @@ -203,7 +205,7 @@ public final class APanel extends CPanel /** Logger */ private static CLogger log = CLogger.getCLogger(APanel.class); - + private AWindow m_window; private boolean isCancel = false; //Goodwill @@ -291,7 +293,7 @@ public final class APanel extends CPanel northLayout.setAlignment(FlowLayout.LEFT); toolBar.putClientProperty("JToolBar.isRollover", Boolean.TRUE); toolBar.setBorderPainted(false); - toolBar.setFloatable(false); // teo_sarca, [ 1666591 ] Toolbar should not be floatable + toolBar.setFloatable(false); // teo_sarca, [ 1666591 ] Toolbar should not be floatable northPanel.add(toolBar, null); } // jbInit @@ -309,9 +311,9 @@ public final class APanel extends CPanel // Local (added to toolbar) private AppsAction aReport, aEnd, aHome, aHelp, aProduct, aLogout, aAccount, aCalculator, aCalendar, aEditor, aPreference, aScript, - aOnline, aMailSupport, aAbout, aPrintScr, aScrShot, aExit, aBPartner, + aOnline, aMailSupport, aAbout, aPrintScr, aScrShot, aExit, aBPartner, aDeleteSelection, aShowAllWindow; - + private SwitchAction aSwitchLinesDownAction, aSwitchLinesUpAction; private WindowMenu m_WindowMenu; @@ -354,7 +356,7 @@ public final class APanel extends CPanel aRefresh = addAction("Refresh", mEdit, KeyStroke.getKeyStroke(KeyEvent.VK_F5, 0), false); mEdit.addSeparator(); aFind = addAction("Find", mEdit, KeyStroke.getKeyStroke(KeyEvent.VK_F6, 0), true); // toggle - if (m_isPersonalLock) + if (m_isPersonalLock) aLock = addAction("Lock", mEdit, null, true); // toggle // View JMenu mView = AEnv.getMenu("View"); @@ -363,7 +365,7 @@ public final class APanel extends CPanel { aProduct = addAction("InfoProduct", mView, KeyStroke.getKeyStroke(KeyEvent.VK_I, Event.ALT_MASK), false); } - if (MRole.getDefault().isAllow_Info_BPartner()) + if (MRole.getDefault().isAllow_Info_BPartner()) { aBPartner = addAction("InfoBPartner", mView, KeyStroke.getKeyStroke(KeyEvent.VK_I, Event.SHIFT_MASK+Event.ALT_MASK), false); } @@ -373,48 +375,48 @@ public final class APanel extends CPanel } if (MRole.getDefault().isAllow_Info_Schedule()) { - AEnv.addMenuItem("InfoSchedule", null, null, mView, this); + AEnv.addMenuItem("InfoSchedule", null, null, mView, this); } - //FR [ 1966328 ] + //FR [ 1966328 ] if (MRole.getDefault().isAllow_Info_MRP()) { - AEnv.addMenuItem("InfoMRP", "Info", null, mView, this); + AEnv.addMenuItem("InfoMRP", "Info", null, mView, this); } if (MRole.getDefault().isAllow_Info_CRP()) { - AEnv.addMenuItem("InfoCRP", "Info", null, mView, this); + AEnv.addMenuItem("InfoCRP", "Info", null, mView, this); } mView.addSeparator(); if (MRole.getDefault().isAllow_Info_Order()) { - AEnv.addMenuItem("InfoOrder", "Info", null, mView, this); + AEnv.addMenuItem("InfoOrder", "Info", null, mView, this); } if (MRole.getDefault().isAllow_Info_Invoice()) { - AEnv.addMenuItem("InfoInvoice", "Info", null, mView, this); + AEnv.addMenuItem("InfoInvoice", "Info", null, mView, this); } if (MRole.getDefault().isAllow_Info_InOut()) { - AEnv.addMenuItem("InfoInOut", "Info", null, mView, this); + AEnv.addMenuItem("InfoInOut", "Info", null, mView, this); } if (MRole.getDefault().isAllow_Info_Payment()) { - AEnv.addMenuItem("InfoPayment", "Info", null, mView, this); + AEnv.addMenuItem("InfoPayment", "Info", null, mView, this); } if (MRole.getDefault().isAllow_Info_CashJournal()) { - AEnv.addMenuItem("InfoCashLine", "Info", null, mView, this); + AEnv.addMenuItem("InfoCashLine", "Info", null, mView, this); } if (MRole.getDefault().isAllow_Info_Resource()) { - AEnv.addMenuItem("InfoAssignment", "Info", null, mView, this); + AEnv.addMenuItem("InfoAssignment", "Info", null, mView, this); } if (MRole.getDefault().isAllow_Info_Asset()) { - AEnv.addMenuItem("InfoAsset", "Info", null, mView, this); + AEnv.addMenuItem("InfoAsset", "Info", null, mView, this); } - + mView.addSeparator(); aAttachment = addAction("Attachment", mView, KeyStroke.getKeyStroke(KeyEvent.VK_F7, 0), true); // toggle @@ -455,13 +457,13 @@ public final class APanel extends CPanel mTools.addSeparator(); aPreference = addAction("Preference", mTools, null, false); } - + //Window AMenu aMenu = (AMenu)Env.getWindow(0); m_WindowMenu = new WindowMenu(aMenu.getWindowManager(), m_window); menuBar.add(m_WindowMenu); aShowAllWindow = addAction("ShowAllWindow", null, KeyStroke.getKeyStroke(KeyEvent.VK_W, KeyEvent.CTRL_MASK), false); - + // Help JMenu mHelp = AEnv.getMenu("Help"); menuBar.add(mHelp); @@ -547,7 +549,7 @@ public final class APanel extends CPanel // String s = null; // if (b != null) // s = b.getToolTipText(); - + // Key Strokes if (accelerator != null) { @@ -621,7 +623,7 @@ public final class APanel extends CPanel private HashMap includedMap; - + /************************************************************************** * Dynamic Panel Initialization - either single window or workbench. *
    @@ -663,7 +665,8 @@ public final class APanel extends CPanel
     		}
     
     		Dimension windowSize = m_mWorkbench.getWindowSize();
    -		
    +
    +		MQuery detailQuery = null;
     		/**
     		 *  WorkBench Loop
     		 */
    @@ -711,7 +714,7 @@ public final class APanel extends CPanel
     					ADialog.error(0, null, "AccessTableNoView", "(No Window Model Info)");
     					return false;
     				}
    -				GridWindow mWindow = new GridWindow (wVO);			                //  Timing: ca. 0.3-1 sec
    +				GridWindow mWindow = new GridWindow (wVO, true);			                //  Timing: ca. 0.3-1 sec
     				//	Set SO/AutoNew for Window
     				Env.setContext(m_ctx, m_curWindowNo, "IsSOTrx", mWindow.isSOTrx());
     				if (!autoNew && mWindow.isTransaction())
    @@ -740,6 +743,16 @@ public final class APanel extends CPanel
     						//  initial user query for single workbench tab
     						if (m_mWorkbench.getWindowCount() == 1)
     						{
    +							if (query != null && query.getZoomTableName() != null && query.getZoomColumnName() != null
    +								&& query.getZoomValue() instanceof Integer && (Integer)query.getZoomValue() > 0)
    +					    	{
    +					    		if (!query.getZoomTableName().equalsIgnoreCase(gTab.getTableName()))
    +					    		{
    +					    			detailQuery = query;
    +					    			query = new MQuery();
    +					    			query.addRestriction("1=2");
    +					    		}
    +					    	}
     							isCancel = false; //Goodwill
     							query = initialQuery (query, gTab);
     							if (isCancel) return false; //Cancel opening window
    @@ -793,18 +806,18 @@ public final class APanel extends CPanel
     						//	If we have a zoom query, switch to single row
     						if (tab == 0 && goSingleRow)
     							gc.switchSingleRow();
    -						
    +
                             // FR [ 1757088 ]
     						GridField[] fields = gc.getMTab().getFields();
     						int m_tab_id = 0;
     						for(int f =0 ; f < fields.length ; f ++)
     						{
    -							m_tab_id = fields[f].getIncluded_Tab_ID();						  
    +							m_tab_id = fields[f].getIncluded_Tab_ID();
     							if ( m_tab_id != 0)
     							{
     								includedMap.put(m_tab_id, gc);
     							}
    -						}  
    +						}
     
     						//	Is this tab included?
     						if (includedMap.size() > 0)
    @@ -817,7 +830,7 @@ public final class APanel extends CPanel
     								GridSynchronizer synchronizer = new GridSynchronizer(mWindow, parent, gc);
     								if (parent == m_curGC)
     									synchronizer.activateChild();
    -								included = parent.includeTab(gc,this,synchronizer);								
    +								included = parent.includeTab(gc,this,synchronizer);
     							}
     						}
     						initSwitchLineAction();
    @@ -878,11 +891,11 @@ public final class APanel extends CPanel
     			setPreferredSize(windowSize);
     		else
     			revalidate();
    -		
    -		if (zoomToDetailTab(query)) {
    -			return true;			
    +
    +		if (detailQuery != null && zoomToDetailTab(detailQuery)) {
    +			return true;
     		}
    -		
    +
     		Dimension size = getPreferredSize();
     		log.info( "fini - " + size);
     		m_curWinTab.requestFocusInWindow();
    @@ -902,58 +915,12 @@ public final class APanel extends CPanel
         	        	gTab = m_mWorkbench.getMWindow(0).getTab(tab);
         	        	if (gTab.isSortTab())
         	        		continue;
    -    	        	
    -    	        	if (gTab.getTabLevel() == 1 && gTab.getTableName().equalsIgnoreCase(query.getZoomTableName()))
    +
    +    	        	if (gTab.getTableName().equalsIgnoreCase(query.getZoomTableName()))
         	        	{
    -    	        		GridField[] fields = gTab.getFields();
    -    	        		for (GridField field : fields)
    -    	        		{
    -    	        			if (field.getColumnName().equalsIgnoreCase(query.getZoomColumnName()))
    -    	        			{
    -    	        				if (query.getZoomValue() != null && query.getZoomValue() instanceof Integer)
    -    	        				{    	        					
    -    	        					if (!includedMap.containsKey(gTab.getAD_Tab_ID()))
    -    	        					{
    -    	        						m_mWorkbench.getMWindow(0).initTab(tab);
    -    	        						int index = tabPanel.findTabindex(gTab);
    -    	        						if (index >= 0)
    -    	        						{
    -    	        							GridController gc = (GridController) tabPanel.getComponentAt(index);
    -    	        							gc.activate();
    -    	        							gc.query(false, 0, 0);
    -    	        						}
    -    	        					}	
    -        	        				GridTable table = gTab.getTableModel();
    -        	        				int count = table.getRowCount();
    -        	        				for(int i = 0; i < count; i++)
    -        	        				{
    -        	        					int id = table.getKeyID(i);
    -        	        					if (id == ((Integer)query.getZoomValue()).intValue())
    -        	        					{
    -        	        						if (!includedMap.containsKey(gTab.getAD_Tab_ID()))
    -        	        						{
    -        	        							int index = tabPanel.findTabindex(gTab);
    -            	        						if (index >= 0)
    -            	        							tabPanel.setSelectedIndex(index);
    -        	        						}
    -        	        						gTab.navigate(i);
    -        	        						return true;
    -        	        					}
    -        	        				}
    -    	        				}
    -    	        				else
    -    	        				{
    -    	        					if (!includedMap.containsKey(gTab.getAD_Tab_ID()))
    -    	        					{
    -    	        						int index = tabPanel.findTabindex(gTab);
    -    	        						if (index >= 0)
    -    	        							tabPanel.setSelectedIndex(index);
    -    	        					}
    -	        						return true;
    -    	        				}
    -    	        				break;
    -    	        			}
    -    	        		}
    +	        			if (doZoomToDetail(gTab, query, tab)) {
    +	        				return true;
    +	        			}
         	        	}
         	        }
         		}
    @@ -961,6 +928,109 @@ public final class APanel extends CPanel
             return false;
     	}
     
    +	private boolean doZoomToDetail(GridTab gTab, MQuery query, int tabIndex) {
    +		GridField[] fields = gTab.getFields();
    +		for (GridField field : fields)
    +		{
    +			if (field.getColumnName().equalsIgnoreCase(query.getZoomColumnName()))
    +			{
    +				m_mWorkbench.getMWindow(0).initTab(tabIndex);
    +				int parentId = DB.getSQLValue(null, "SELECT " + gTab.getLinkColumnName() + " FROM " + gTab.getTableName() + " WHERE " + query.getWhereClause());
    +				if (parentId > 0)
    +				{
    +					MapparentMap = new TreeMap();
    +					int index = tabIndex;
    +					int oldpid = parentId;
    +					GridTab currentTab = gTab;
    +					while (index > 0)
    +					{
    +						index--;
    +						GridTab pTab = m_mWorkbench.getMWindow(0).getTab(index);
    +						if (pTab.getTabLevel() < currentTab.getTabLevel())
    +						{
    +							m_mWorkbench.getMWindow(0).initTab(index);
    +							if (index > 0)
    +							{
    +								if (pTab.getLinkColumnName() != null && pTab.getLinkColumnName().trim().length() > 0)
    +								{
    +									int pid = DB.getSQLValue(null, "SELECT " + pTab.getLinkColumnName() + " FROM " + pTab.getTableName() + " WHERE " + currentTab.getLinkColumnName() + " = ?", oldpid);
    +									if (pid > 0)
    +									{
    +										parentMap.put(index, new Object[]{currentTab.getLinkColumnName(), oldpid});
    +										oldpid = pid;
    +										currentTab = pTab;
    +									}
    +									else
    +									{
    +										parentMap.clear();
    +										break;
    +									}
    +								}
    +							}
    +							else
    +							{
    +								parentMap.put(index, new Object[]{currentTab.getLinkColumnName(), oldpid});
    +							}
    +						}
    +					}
    +					for(Map.Entry entry : parentMap.entrySet())
    +					{
    +						GridTab pTab = m_mWorkbench.getMWindow(0).getTab(entry.getKey());
    +						Object[] value = entry.getValue();
    +						MQuery pquery = new MQuery(pTab.getAD_Table_ID());
    +						pquery.addRestriction((String)value[0], "=", value[1]);
    +						pTab.setQuery(pquery);
    +						GridController gc = (GridController) tabPanel.getComponentAt(entry.getKey());
    +						gc.activate();
    +						gc.query(false, 0, 0);
    +					}
    +
    +
    +					MQuery targetQuery = new MQuery(gTab.getAD_Table_ID());
    +					targetQuery.addRestriction(gTab.getLinkColumnName(), "=", parentId);
    +					gTab.setQuery(targetQuery);
    +					GridController gc = null;
    +					if (!includedMap.containsKey(gTab.getAD_Tab_ID()))
    +					{
    +						int target = tabPanel.findTabindex(gTab);
    +						gc = (GridController) tabPanel.getComponentAt(target);
    +					}
    +					else
    +					{
    +						GridController parent = includedMap.get(gTab.getAD_Tab_ID());
    +						gc = parent.findChild(gTab);
    +					}
    +					gc.activate();
    +					gc.query(false, 0, 0);
    +
    +					GridTable table = gTab.getTableModel();
    +    				int count = table.getRowCount();
    +    				for(int i = 0; i < count; i++)
    +    				{
    +    					int id = table.getKeyID(i);
    +    					if (id == ((Integer)query.getZoomValue()).intValue())
    +    					{
    +    						if (!includedMap.containsKey(gTab.getAD_Tab_ID()))
    +    						{
    +    							tabPanel.setSelectedIndex(tabPanel.findTabindex(gTab));
    +    						}
    +    						else
    +    						{
    +    							GridController parent = includedMap.get(gTab.getAD_Tab_ID());
    +    							int pindex = tabPanel.findTabindex(parent.getMTab());
    +    							if (pindex >= 0)
    +    								tabPanel.setSelectedIndex(pindex);
    +    						}
    +    						gTab.navigate(i);
    +    						return true;
    +    					}
    +    				}
    +				}
    +			}
    +		}
    +		return false;
    +	}
    +
     	/**
     	 * 	Get Current Window No
     	 *	@return win no
    @@ -969,7 +1039,7 @@ public final class APanel extends CPanel
     	{
     		return m_curWindowNo;
     	}	//	getWindowNo
    -	
    +
     	/**
     	 * 	Initial Query
     	 *	@param query initial query
    @@ -1014,7 +1084,7 @@ public final class APanel extends CPanel
     		{
     			GridField[] findFields = mTab.getFields();
     			Find find = new Find (Env.getFrame(this), m_curWindowNo, mTab.getName(),
    -				mTab.getAD_Tab_ID(), mTab.getAD_Table_ID(), mTab.getTableName(), 
    +				mTab.getAD_Tab_ID(), mTab.getAD_Table_ID(), mTab.getTableName(),
     				where.toString(), findFields, 10);	//	no query below 10
     			query = find.getQuery();
     			isCancel = (query == null);//Goodwill
    @@ -1023,8 +1093,8 @@ public final class APanel extends CPanel
     		}
     		return query;
     	}	//	initialQuery
    -	
    -	
    +
    +
     	/**
     	 *  Get Window Index
     	 *  @return Window Index
    @@ -1055,8 +1125,8 @@ public final class APanel extends CPanel
     	{
     		return m_mWorkbench.getImage(getWindowIndex());
     	}	//	getImage
    -	
    -	
    +
    +
     	/**************************************************************************
     	 *	Data Status Listener (row change)			^ | v
     	 *  @param e event
    @@ -1119,11 +1189,11 @@ public final class APanel extends CPanel
     		aLast.setEnabled(!lastRow);
     
     		//	update Change
    -		
    +
     		boolean changed = e.isChanged() || e.isInserting();
     		int changedColumn = e.getChangedColumn();
     		boolean inserting = e.isInserting();
    -		
    +
     		if(e.getAD_Message() != null && e.getAD_Message().equals("Saved"))
     			changed = false;
     		boolean readOnly = m_curTab.isReadOnly();
    @@ -1231,7 +1301,7 @@ public final class APanel extends CPanel
     		}
     	}	//	set Busy
     
    -	
    +
     	/**************************************************************************
     	 *	Change Listener - (tab change)			<->
     	 *  @param e event
    @@ -1325,7 +1395,7 @@ public final class APanel extends CPanel
     							if( newRecord == -1)
     								m_curTab.dataIgnore();
     							else
    -							{      
    +							{
     								m_curWinTab.setSelectedIndex(m_curTabIndex);
     								setBusy(false, true);
     								return;
    @@ -1385,7 +1455,7 @@ public final class APanel extends CPanel
     				m_curTab.dataRefresh();
     			else	//	Requery & autoSize
     			{
    -				MRole role = MRole.getDefault(); 
    +				MRole role = MRole.getDefault();
     				m_curGC.query (m_onlyCurrentRows, m_onlyCurrentDays, role.getMaxQueryRecords());
     				/*
     				if (m_curGC.isNeedToSaveParent())
    @@ -1401,7 +1471,7 @@ public final class APanel extends CPanel
     			if (m_curTab.getRowCount() == 0)
     			{
     				//	Automatically create New Record, if none & tab not RO
    -				if (!m_curTab.isReadOnly() 
    +				if (!m_curTab.isReadOnly()
     					&& (Env.isAutoNew(m_ctx, m_curWindowNo) || m_curTab.isQueryNewRecord()))
     				{
     					log.config("No record - New - AutoNew=" + Env.isAutoNew(m_ctx, m_curWindowNo)
    @@ -1426,20 +1496,20 @@ public final class APanel extends CPanel
     					//not sure why, the following lines is needed to make dynamic resize work
     					//tested on jdk1.5, 1.6 using jgoodies look and feel
     					frame.getPreferredSize();
    -					
    +
     					if (frame.getExtendedState() != JFrame.MAXIMIZED_BOTH)
     					{
     						frame.setMinimumSize(frame.getSize());
     						revalidate();
     						SwingUtilities.invokeLater(new Runnable() {
    -		
    +
     							public void run() {
     								JFrame frame = Env.getFrame(APanel.this);
     								frame.validate();
     								AEnv.showCenterScreen(frame);
     								frame.setMinimumSize(null);
     							}
    -							
    +
     						});
     					}
     				}
    @@ -1526,7 +1596,7 @@ public final class APanel extends CPanel
     			m_curGC.acceptEditorChanges();
     			m_curWinTab.setSelectedIndex(index+1);
     		}
    -			
    +
     	}	//	navigateDetail
     
     	/**
    @@ -1563,7 +1633,7 @@ public final class APanel extends CPanel
     		}
     	}	//	navigateParent
     
    -	
    +
     	/**************************************************************************
     	 *	Action Listener
     	 *  @param e event
    @@ -1574,7 +1644,7 @@ public final class APanel extends CPanel
     		//	+ " - " + new Timestamp(e.getWhen()) + " " + isUILocked());
     		if (m_disposing || isUILocked())
     			return;
    -			
    +
     		m_lastModifiers = e.getModifiers();
     		String cmd = e.getActionCommand();
     		//	Do ScreenShot w/o busy
    @@ -1641,7 +1711,7 @@ public final class APanel extends CPanel
     				m_curGC.switchRowPresentation();
     			//	Go
     			else if (cmd.equals(aHome.getName())) {
    -				// show main menu - teo_sarca [ 1706409, 1707221 ] 
    +				// show main menu - teo_sarca [ 1706409, 1707221 ]
     				setBusy(false, false);
     				AEnv.showWindow(Env.getWindow(0));
     				return;
    @@ -1652,14 +1722,14 @@ public final class APanel extends CPanel
     				m_curGC.acceptEditorChanges();
     				m_curTab.navigate(0);
     			}
    -			else if (cmd.equals(aSwitchLinesUpAction.getName())) 
    +			else if (cmd.equals(aSwitchLinesUpAction.getName()))
     			{
     				//up-key + shift
     				m_curGC.getTable().removeEditor();
     				m_curTab.switchRows(m_curTab.getCurrentRow(), m_curTab.getCurrentRow() - 1, m_curGC.getTable().getSortColumn(), m_curGC.getTable().isSortAscending());
     				m_curGC.getTable().requestFocus();
    -			} 
    -			else if (cmd.equals(aPrevious.getName())) 
    +			}
    +			else if (cmd.equals(aPrevious.getName()))
     			{ /* cmd_save(false); */
     				//up-image + shift
     				m_curGC.getTable().removeEditor();
    @@ -1669,15 +1739,15 @@ public final class APanel extends CPanel
     				} else {
     					m_curTab.navigateRelative(-1);
     				}
    -			} 
    -			else if (cmd.equals(aSwitchLinesDownAction.getName())) 
    +			}
    +			else if (cmd.equals(aSwitchLinesDownAction.getName()))
     			{
     				//down-key + shift
     				m_curGC.getTable().removeEditor();
     				m_curTab.switchRows(m_curTab.getCurrentRow(), m_curTab.getCurrentRow() + 1, m_curGC.getTable().getSortColumn(), m_curGC.getTable().isSortAscending());
     				m_curGC.getTable().requestFocus();
    -			} 
    -			else if (cmd.equals(aNext.getName())) 
    +			}
    +			else if (cmd.equals(aNext.getName()))
     			{ /* cmd_save(false); */
     				//down-image + shift
     				m_curGC.getTable().removeEditor();
    @@ -1746,7 +1816,7 @@ public final class APanel extends CPanel
     		if (top instanceof AMenu) {
     			((AMenu)top).logout();
     		}
    -		
    +
     	}
     
     	/**************************************************************************
    @@ -1767,7 +1837,7 @@ public final class APanel extends CPanel
     		GridField field = m_curTab.getField(button.getColumnName());
     		return m_curTab.processCallout(field);
     	}	//	processButtonCallout
    -	
    +
     	/**
     	 *  Create New Record
     	 *  @param copy true if current record is to be copied
    @@ -1780,10 +1850,10 @@ public final class APanel extends CPanel
     			log.warning("Insert Record disabled for Tab");
     			return;
     		}
    -		
    +
     		m_curGC.stopEditor(true);
     		m_curGC.acceptEditorChanges();
    -		
    +
     		// BF [ 2799362 ] attempt to save if save action is enabled. Using
     		// m_curTab.needSave instead might miss unfilled mandatory fields.
     		if(aSave.isEnabled()){
    @@ -1791,7 +1861,7 @@ public final class APanel extends CPanel
     			if (Env.isAutoCommit(m_ctx, m_curWindowNo))
     			{
     				if (!cmd_save(true))
    -				{	
    +				{
     					return;
     				}
     			}
    @@ -1799,7 +1869,7 @@ public final class APanel extends CPanel
     			else if (ADialog.ask(m_curWindowNo, this, "SaveChanges?", m_curTab.getCommitWarning()))
     			{   //  yes we want to save
     				if (!cmd_save(true))
    -				{   
    +				{
     					return;
     				}
     			}
    @@ -1824,7 +1894,7 @@ public final class APanel extends CPanel
     				m_curGC.rowChanged(false, keyID);
     		m_curGC.dynamicDisplay(0);
     	}   //  cmd_delete
    -	
    +
     	/**
     	 * Show a list to select one or more items to delete.
     	 */
    @@ -1884,10 +1954,10 @@ public final class APanel extends CPanel
     		}
     		// FR [ 2877111 ]
     		list.setListData(data);
    -	
    +
     		list.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
     		messagePanel.add(scrollPane);
    -		
    +
     		final JOptionPane pane = new JOptionPane(
     				messagePanel, // message
     				JOptionPane.QUESTION_MESSAGE, // messageType
    @@ -1963,13 +2033,13 @@ public final class APanel extends CPanel
     			if (!isNested)
     				m_window.setTitle(getTitle());
     		}
    -		
    +
     		//BEGIN - [FR 1953734]
     		if(m_curGC.isDetailGrid() && retValue){
     			m_curGC.getGCParent().refreshMTab(m_curGC);
     		}
     		//END - [FR 1953734]
    -		
    +
     		return retValue;
     	}   //  cmd_save
     
    @@ -1988,14 +2058,14 @@ public final class APanel extends CPanel
     	private void cmd_ignore()
     	{
     		m_curGC.stopEditor(false);
    -		// Ignore changes in APanelTab (e.g. VSortTab) - teo_sarca [ 1705429 ] 
    +		// Ignore changes in APanelTab (e.g. VSortTab) - teo_sarca [ 1705429 ]
     		if (m_curAPanelTab != null)
     		{
     			m_curAPanelTab.loadData();
     		}
     		m_curTab.dataIgnore();
     		m_curGC.dynamicDisplay(0);
    -		
    +
     	}   //  cmd_ignore
     
     	/**
    @@ -2019,7 +2089,7 @@ public final class APanel extends CPanel
     			ADialog.error(m_curWindowNo, this, "AccessCannotReport");
     			return;
     		}
    -		
    +
     		cmd_save(false);
     
     		//	Query
    @@ -2058,7 +2128,7 @@ public final class APanel extends CPanel
     		new AReport (m_curTab.getAD_Table_ID(), aReport.getButton(), query, this, m_curWindowNo, m_curTab.getWhereExtended());
     	}	//	cmd_report
     
    -	
    +
     	/**
     	 * 	Zoom Across Menu
     	 */
    @@ -2085,10 +2155,10 @@ public final class APanel extends CPanel
     				query.addRestriction(link, MQuery.EQUAL,
     					Env.getContext(m_ctx, m_curWindowNo, link));
     		}
    -		new AZoomAcross (aZoomAcross.getButton(), 
    +		new AZoomAcross (aZoomAcross.getButton(),
     			m_curTab.getTableName(), query);
     	}	//	cmd_zoom
    -	
    +
     	/**
     	 * 	Open/View Request
     	 */
    @@ -2120,7 +2190,7 @@ public final class APanel extends CPanel
     		int AD_Table_ID = m_curTab.getAD_Table_ID();
     		new AArchive (aArchive.getButton(), AD_Table_ID, record_ID);
     	}	//	cmd_archive
    -	
    +
     	/**
     	 *	Print specific Report - or start default Report
     	 */
    @@ -2128,7 +2198,7 @@ public final class APanel extends CPanel
     	{
     		cmd_print(false);
     	}
    -	
    +
     	/**
     	 *	Print specific Report - or start default Report
     	 */
    @@ -2169,7 +2239,7 @@ public final class APanel extends CPanel
     		//	Gets Fields from AD_Field_v
     		GridField[] findFields = GridField.createFields(m_ctx, m_curWindowNo, 0, m_curTab.getAD_Tab_ID());
     		Find find = new Find (Env.getFrame(this), m_curWindowNo, m_curTab.getName(),
    -			m_curTab.getAD_Tab_ID(), m_curTab.getAD_Table_ID(), m_curTab.getTableName(), 
    +			m_curTab.getAD_Tab_ID(), m_curTab.getAD_Table_ID(), m_curTab.getTableName(),
     			m_curTab.getWhereExtended(), findFields, 1);
     		MQuery query = find.getQuery();
     		find.dispose();
    @@ -2198,7 +2268,7 @@ public final class APanel extends CPanel
     			return;
     		}
     
    -	//	Attachment va = 
    +	//	Attachment va =
     		new Attachment (Env.getFrame(this), m_curWindowNo,
     			m_curTab.getAD_AttachmentID(), m_curTab.getAD_Table_ID(), record_ID, null);
     		//
    @@ -2234,9 +2304,9 @@ public final class APanel extends CPanel
     		}
     		String description = infoName + ": " + infoDisplay;
     		//
    -	//	AChat va = 
    +	//	AChat va =
     		new AChat (Env.getFrame(this), m_curWindowNo,
    -			m_curTab.getCM_ChatID(), m_curTab.getAD_Table_ID(), record_ID, 
    +			m_curTab.getCM_ChatID(), m_curTab.getAD_Table_ID(), record_ID,
     			description, null);
     		//
     		m_curTab.loadChats();				//	reload
    @@ -2292,10 +2362,10 @@ public final class APanel extends CPanel
     					m_onlyCurrentRows = false;
     				//
     				m_curTab.setQuery(null);	//	reset previous queries
    -				MRole role = MRole.getDefault(); 
    +				MRole role = MRole.getDefault();
     				int maxRows = role.getMaxQueryRecords();
     				//
    -				log.config("OnlyCurrent=" + m_onlyCurrentRows 
    +				log.config("OnlyCurrent=" + m_onlyCurrentRows
     					+ ", Days=" + m_onlyCurrentDays
     					+ ", MaxRows=" + maxRows);
     				m_curGC.query(m_onlyCurrentRows, m_onlyCurrentDays, maxRows );   //  autoSize
    @@ -2342,7 +2412,7 @@ public final class APanel extends CPanel
     	private void cmd_winSize()
     	{
     		Dimension size = getSize();
    -		if (!ADialog.ask(m_curWindowNo, this, "WinSizeSet", 
    +		if (!ADialog.ask(m_curWindowNo, this, "WinSizeSet",
     			"x=" + size.width + " - y=" + size.height))
     		{
     			setPreferredSize(null);
    @@ -2354,13 +2424,13 @@ public final class APanel extends CPanel
     		win.setWindowSize(size);
     		win.save();
     	}	//	cmdWinSize
    -	
    +
     	private void cmd_export()
     	{
     		new AExport(this);
     	}
    -	
    -	
    +
    +
     	/**************************************************************************
     	 *	Start Button Process
     	 *  @param vButton button
    @@ -2407,7 +2477,7 @@ public final class APanel extends CPanel
     		if (record_ID == -1 && m_curTab.getKeyColumnName().equals("AD_Language"))
     			record_ID = Env.getContextAsInt (m_ctx, m_curWindowNo, "AD_Language_ID");
     		//	Record_ID - Change Log ID
    -		if (record_ID == -1 
    +		if (record_ID == -1
     			&& (vButton.getProcess_ID() == 306 || vButton.getProcess_ID() == 307))
     		{
     			Integer id = (Integer)m_curTab.getValue("AD_ChangeLog_ID");
    @@ -2419,7 +2489,7 @@ public final class APanel extends CPanel
     			ADialog.error(m_curWindowNo, this, "SaveErrorRowNotFound");
     			return;
     		}
    -		
    +
     		boolean isProcessMandatory = false;
     
     		//	Pop up Payment Rules
    @@ -2462,7 +2532,7 @@ public final class APanel extends CPanel
     		//  Pop up Create From
     		else if (col.equals("CreateFrom"))
     		{
    -			// Run form only if the button has no process defined - teo_sarca [ 1974354 ] 
    +			// Run form only if the button has no process defined - teo_sarca [ 1974354 ]
     			if (vButton.getProcess_ID() <= 0)
     			{
     				ICreateFrom cf = VCreateFromFactory.create(m_curTab);
    @@ -2477,7 +2547,7 @@ public final class APanel extends CPanel
     					else
     						cf.closeWindow();
     					return;
    -				}				
    +				}
     				//	else may start process
     			}
     		}	//	CreateFrom
    @@ -2552,18 +2622,18 @@ public final class APanel extends CPanel
     		if (m_curTab.needSave(true, false))
     			if (!cmd_save(true))
     				return;
    -		
    +
     		// call form
     		MProcess pr = new MProcess(m_ctx, vButton.getProcess_ID(), null);
     		int form_ID = pr.getAD_Form_ID();
    -		if (form_ID != 0 ) 
    +		if (form_ID != 0 )
     		{
    -			
    +
     			if (m_curTab.needSave(true, false))
     				if (!cmd_save(true))
     					return;
    -			
    -			FormFrame ff = new FormFrame(); 
    +
    +			FormFrame ff = new FormFrame();
     			String title = vButton.getDescription();
     			if (title == null || title.length() == 0)
     				title = vButton.getName();
    @@ -2571,14 +2641,14 @@ public final class APanel extends CPanel
     			pi.setAD_User_ID (Env.getAD_User_ID(m_ctx));
     			pi.setAD_Client_ID (Env.getAD_Client_ID(m_ctx));
     			ff.setProcessInfo(pi);
    -			ff.openForm(form_ID); 
    -			ff.pack(); 
    -			AEnv.showCenterScreen(ff); 
    -			return; 
    -		}		
    +			ff.openForm(form_ID);
    +			ff.pack();
    +			AEnv.showCenterScreen(ff);
    +			return;
    +		}
     		else {
     			ProcessModalDialog dialog = new ProcessModalDialog(m_ctx, Env.getWindow(m_curWindowNo), Env.getHeader(m_ctx, m_curWindowNo),
    -					this, m_curWindowNo, vButton.getProcess_ID(), table_ID, 
    +					this, m_curWindowNo, vButton.getProcess_ID(), table_ID,
     					record_ID, startWOasking);
     			if (dialog.isValidDialog())
     			{
    @@ -2589,7 +2659,7 @@ public final class APanel extends CPanel
     		}
     	}	//	actionButton
     
    -	
    +
     	/**************************************************************************
     	 *  Lock User Interface.
     	 *  Called from the Worker before processing
    @@ -2609,13 +2679,13 @@ public final class APanel extends CPanel
     	public void unlockUI (ProcessInfo pi)
     	{
     	//	log.fine("" + pi);
    -		boolean notPrint = pi != null 
    +		boolean notPrint = pi != null
     			&& pi.getAD_Process_ID() != m_curTab.getAD_Process_ID()
     			&& pi.isReportingProcess() == false;
     		//
     		setBusy(false, notPrint);
     		//  Process Result
    -		if (notPrint)		//	refresh if not print 
    +		if (notPrint)		//	refresh if not print
     		{
     			//	Refresh data
     			m_curTab.dataRefresh();
    @@ -2670,7 +2740,7 @@ public final class APanel extends CPanel
     	{
     		return m_curTab;
     	}	//	getCurrentTab
    -	
    +
     	/**
     	 * Get the number of tabs in the panels JTabbedPane.
     	 * @return no of tabs in the JTabbedPane of the panel
    @@ -2678,7 +2748,7 @@ public final class APanel extends CPanel
     	public int noOfTabs() {
      		return m_curWinTab.getTabCount();
     	}
    -	
    +
     	/**
     	 * Get the selected tab index of the panels JTabbedPane.
     	 * @return selected index of JTabbedPane
    @@ -2686,14 +2756,14 @@ public final class APanel extends CPanel
     	public int getSelectedTabIndex() {
      		return m_curWinTab.getSelectedIndex();
     	}
    -	
    +
     	/**
     	 * Set the tab index of the panels JTabbedPane.
     	 */
     	public void setSelectedTabIndex(int index) {
      		m_curWinTab.setSelectedIndex(index);
     	}
    -	
    +
     	/**
     	 * Get the name of the selected tab in the panels JTabbedPane.
     	 * @return name of selected tab
    @@ -2704,7 +2774,7 @@ public final class APanel extends CPanel
      		title = title.substring(0,title.indexOf('<'));
      		return title;
     	}
    -	
    +
     	/**
     	 *  String representation
     	 *  @return String representation
    @@ -2721,13 +2791,13 @@ public final class APanel extends CPanel
     	/**
     	 * Simple action class for the resort of tablelines (switch line no). Delegates actionPerformed
     	 * to APanel.
    -	 * 
    +	 *
     	 * @author Karsten Thiemann, kthiemann@adempiere.org
    -	 * 
    +	 *
     	 */
     	class SwitchAction extends AbstractAction {
     		/**
    -		 * 
    +		 *
     		 */
     		private static final long serialVersionUID = 3837712049468116744L;
     
    @@ -2791,7 +2861,7 @@ public final class APanel extends CPanel
     				aSwitchLinesUpAction.getName());
     		getActionMap().put(aSwitchLinesUpAction.getName(), aSwitchLinesUpAction);
     	}
    -	
    +
     	public boolean isNested() {
     		return isNested;
     	}
    diff --git a/client/src/org/compiere/apps/form/Match.java b/client/src/org/compiere/apps/form/Match.java
    index 533f6c963d..88be94851f 100644
    --- a/client/src/org/compiere/apps/form/Match.java
    +++ b/client/src/org/compiere/apps/form/Match.java
    @@ -23,6 +23,7 @@ import java.util.logging.Level;
     
     import org.compiere.minigrid.IDColumn;
     import org.compiere.minigrid.IMiniTable;
    +import org.compiere.model.MClient;
     import org.compiere.model.MInOutLine;
     import org.compiere.model.MInvoiceLine;
     import org.compiere.model.MMatchInv;
    @@ -30,11 +31,13 @@ import org.compiere.model.MMatchPO;
     import org.compiere.model.MOrderLine;
     import org.compiere.model.MRole;
     import org.compiere.model.MStorage;
    +import org.compiere.process.DocumentEngine;
     import org.compiere.util.CLogger;
     import org.compiere.util.DB;
     import org.compiere.util.Env;
     import org.compiere.util.KeyNamePair;
     import org.compiere.util.Msg;
    +import org.compiere.util.Trx;
     
     public class Match
     {
    @@ -199,7 +202,14 @@ public class Match
     				}
     
     				//  Create it
    -				createMatchRecord(invoice, M_InOutLine_ID, Line_ID, new BigDecimal(qty));
    +				String innerTrxName = Trx.createTrxName("Match");
    +				Trx innerTrx = Trx.get(innerTrxName, true);
    +				if (createMatchRecord(invoice, M_InOutLine_ID, Line_ID, new BigDecimal(qty), innerTrxName))
    +					innerTrx.commit();
    +				else
    +					innerTrx.rollback();
    +				innerTrx.close();
    +				innerTrx = null;
     			}
     		}
     		//  requery
    @@ -379,10 +389,11 @@ public class Match
     	 *  @param M_InOutLine_ID shipment line
     	 *  @param Line_ID C_InvoiceLine_ID or C_OrderLine_ID
     	 *  @param qty quantity
    +	 *  @param trxName 
     	 *  @return true if created
     	 */
     	protected boolean createMatchRecord (boolean invoice, int M_InOutLine_ID, int Line_ID,
    -		BigDecimal qty)
    +		BigDecimal qty, String trxName)
     	{
     		if (qty.compareTo(Env.ZERO) == 0)
     			return true;
    @@ -391,11 +402,11 @@ public class Match
     			+ ", Qty=" + qty);
     		//
     		boolean success = false;
    -		MInOutLine sLine = new MInOutLine (Env.getCtx(), M_InOutLine_ID, null);
    +		MInOutLine sLine = new MInOutLine (Env.getCtx(), M_InOutLine_ID, trxName);
     		if (invoice)	//	Shipment - Invoice
     		{
     			//	Update Invoice Line
    -			MInvoiceLine iLine = new MInvoiceLine (Env.getCtx(), Line_ID, null);
    +			MInvoiceLine iLine = new MInvoiceLine (Env.getCtx(), Line_ID, trxName);
     			iLine.setM_InOutLine_ID(M_InOutLine_ID);
     			if (sLine.getC_OrderLine_ID() != 0)
     				iLine.setC_OrderLine_ID(sLine.getC_OrderLine_ID());
    @@ -405,8 +416,12 @@ public class Match
     			{
     				MMatchInv match = new MMatchInv (iLine, null, qty);
     				match.setM_InOutLine_ID(M_InOutLine_ID);
    -				if (match.save())
    +				if (match.save()) {
     					success = true;
    +					if (MClient.isClientAccountingImmediate()) {
    +						String ignoreError = DocumentEngine.postImmediate(match.getCtx(), match.getAD_Client_ID(), match.get_Table_ID(), match.get_ID(), true, match.get_TrxName());						
    +					}
    +				}
     				else
     					log.log(Level.SEVERE, "Inv Match not created: " + match);
     			}
    @@ -420,6 +435,9 @@ public class Match
     				matchPO.setM_InOutLine_ID(M_InOutLine_ID);
     				if (!matchPO.save())
     					log.log(Level.SEVERE, "PO(Inv) Match not created: " + matchPO);
    +				if (MClient.isClientAccountingImmediate()) {
    +					String ignoreError = DocumentEngine.postImmediate(matchPO.getCtx(), matchPO.getAD_Client_ID(), matchPO.get_Table_ID(), matchPO.get_ID(), true, matchPO.get_TrxName());						
    +				}
     			}
     		}
     		else	//	Shipment - Order
    @@ -428,7 +446,7 @@ public class Match
     			sLine.setC_OrderLine_ID(Line_ID);
     			sLine.save();
     			//	Update Order Line
    -			MOrderLine oLine = new MOrderLine(Env.getCtx(), Line_ID, null);
    +			MOrderLine oLine = new MOrderLine(Env.getCtx(), Line_ID, trxName);
     			if (oLine.get_ID() != 0)	//	other in MInOut.completeIt
     			{
     				oLine.setQtyReserved(oLine.getQtyReserved().subtract(qty));
    @@ -451,7 +469,7 @@ public class Match
     							sLine.getM_Locator_ID(), 
     							sLine.getM_Product_ID(), 
     							sLine.getM_AttributeSetInstance_ID(), oLine.getM_AttributeSetInstance_ID(), 
    -							null, null, qty.negate(), null);
    +							null, null, qty.negate(), trxName);
     				}
     			}
     			else
    diff --git a/client/src/org/compiere/apps/form/Merge.java b/client/src/org/compiere/apps/form/Merge.java
    index eff7b123ff..1959068b10 100644
    --- a/client/src/org/compiere/apps/form/Merge.java
    +++ b/client/src/org/compiere/apps/form/Merge.java
    @@ -108,7 +108,7 @@ public class Merge
     					+ "(SELECT rt.AD_Reference_ID FROM AD_Ref_Table rt"
     					+ " INNER JOIN AD_Column cc ON (rt.AD_Table_ID=cc.AD_Table_ID AND rt.AD_Key=cc.AD_Column_ID) "
     					+ "WHERE cc.IsKey='Y' AND cc.ColumnName=?)"	//	#2
    -			+ ") AND c.ColumnSQL IS NULL"
    +			+ ") AND c.ColumnSQL IS NULL "
     			+ "ORDER BY t.LoadSeq DESC";
     		PreparedStatement pstmt = null;
     		
    @@ -159,8 +159,8 @@ public class Merge
     				
     			}
     			//
    -			if (success)
    -				m_trx.commit();
    +			if ( success )
    +				success = m_trx.commit();
     			else
     				m_trx.rollback();
     			
    @@ -170,6 +170,7 @@ public class Merge
     		catch (Exception ex)
     		{
     			log.log(Level.SEVERE, ColumnName, ex);
    +			success = false;
     		}
     		//	Cleanup
     		try
    diff --git a/client/src/org/compiere/apps/search/Find.java b/client/src/org/compiere/apps/search/Find.java
    index e970c2b13a..7dc9960877 100644
    --- a/client/src/org/compiere/apps/search/Find.java
    +++ b/client/src/org/compiere/apps/search/Find.java
    @@ -59,6 +59,7 @@ import javax.swing.ListSelectionModel;
     import javax.swing.event.CellEditorListener;
     import javax.swing.event.ChangeEvent;
     import javax.swing.event.ChangeListener;
    +import javax.swing.event.TableColumnModelEvent;
     import javax.swing.table.DefaultTableModel;
     import javax.swing.table.TableCellRenderer;
     import javax.swing.table.TableColumn;
    @@ -115,12 +116,12 @@ public final class Find extends CDialog
     	/**
     	 * 
     	 */
    -	private static final long serialVersionUID = 6414604433732835410L;
    +	private static final long serialVersionUID = 6414604433732835411L;
     	private int m_AD_Tab_ID;
     
     	/**
     	 *	Find Constructor
    -	 *	@param owner Frame Dialog Onwer
    +	 *	@param owner Frame Dialog Owner
     	 *  @param targetWindowNo WindowNo of target window
     	 *	@param title 
     	 *	@param AD_Table_ID
    @@ -248,7 +249,10 @@ public final class Find extends CDialog
     		public boolean isCellEditable(int row, int column)
     		{
     			boolean editable = ( column == INDEX_COLUMNNAME
    -					|| column == INDEX_OPERATOR );
    +					|| column == INDEX_OPERATOR 
    +					|| column == INDEX_ANDOR
    +					|| column == INDEX_LEFTBRACKET
    +					|| column == INDEX_RIGHTBRACKET );
     			if (!editable && row >= 0)
     			{
     				String columnName = null;
    @@ -265,18 +269,44 @@ public final class Find extends CDialog
     				//  Create Editor
     				editable = getTargetMField(columnName) != null;
     			}
    +			
    +			if ( column == INDEX_ANDOR && row == 0 )
    +				editable = false;
    +			
     			return editable;
     		}
    +		
    +	    public void columnMoved(TableColumnModelEvent e) {
    +	        if (isEditing()) {
    +	            cellEditor.stopCellEditing();
    +	        }
    +	        super.columnMoved(e);
    +	    }
    +
    +	    public void columnMarginChanged(ChangeEvent e) {
    +	        if (isEditing()) {
    +	            cellEditor.stopCellEditing();
    +	        }
    +	        super.columnMarginChanged(e);
    +	    }
    +
     	};
     
    -	/** Index ColumnName = 0		*/
    -	public static final int		INDEX_COLUMNNAME = 0;
    -	/** Index Operator = 1			*/
    -	public static final int		INDEX_OPERATOR = 1;
    -	/** Index Value = 2				*/
    -	public static final int		INDEX_VALUE = 2;
    -	/** Index Value2 = 3			*/
    -	public static final int		INDEX_VALUE2 = 3;
    +
    +	/** Index AndOr = 0		*/
    +	public static final int		INDEX_ANDOR = 0;
    +	/** Index LeftBracket = 1		*/
    +	public static final int		INDEX_LEFTBRACKET = 1;
    +	/** Index ColumnName = 2		*/
    +	public static final int		INDEX_COLUMNNAME = 2;
    +	/** Index Operator = 3			*/
    +	public static final int		INDEX_OPERATOR = 3;
    +	/** Index Value = 4				*/
    +	public static final int		INDEX_VALUE = 4;
    +	/** Index Value2 = 5			*/
    +	public static final int		INDEX_VALUE2 = 5;
    +	/** Index RightBracket = 6		*/
    +	public static final int		INDEX_RIGHTBRACKET = 6;
     
     	/**	Advanced Search Column 		*/
     	public CComboBox 	columns = null;
    @@ -285,6 +315,12 @@ public final class Find extends CDialog
     	private MUserQuery[] userQueries;
     	private ValueNamePair[] columnValueNamePairs;
     	
    +	private CComboBox leftBrackets;
    +
    +	private CComboBox rightBrackets;
    +
    +	private CComboBox andOr;
    +	
     	private static final String FIELD_SEPARATOR = "<^>";
     	private static final String SEGMENT_SEPARATOR = "<~>";
     
    @@ -348,7 +384,7 @@ public final class Find extends CDialog
     		docNoLabel.setText(Msg.translate(Env.getCtx(),"DocumentNo"));
     		docNoField.setText("%");
     		docNoField.setColumns(FIELDLENGTH);
    -		advancedScrollPane.setPreferredSize(new Dimension(450, 150));
    +		advancedScrollPane.setPreferredSize(new Dimension(540, 410));
     		southPanel.add(statusBar, BorderLayout.SOUTH);
     		this.getContentPane().add(southPanel, BorderLayout.SOUTH);
     		//
    @@ -557,7 +593,7 @@ public final class Find extends CDialog
     	private void initFindAdvanced()
     	{
     		log.config("");
    -		advancedTable.setModel(new DefaultTableModel(0, 4));
    +		advancedTable.setModel(new DefaultTableModel(0, 7));
     		advancedTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
     		advancedTable.setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS);
     		advancedTable.putClientProperty("terminateEditOnFocusLost", Boolean.TRUE);
    @@ -622,7 +658,7 @@ public final class Find extends CDialog
     		columns = new CComboBox(columnValueNamePairs);
     		columns.addActionListener(this);		
     		TableColumn tc = advancedTable.getColumnModel().getColumn(INDEX_COLUMNNAME);
    -		tc.setPreferredWidth(150);
    +		tc.setPreferredWidth(120);
     		FindCellEditor dce = new FindCellEditor(columns); 
     
     		dce.addCellEditorListener(new CellEditorListener()
    @@ -645,31 +681,58 @@ public final class Find extends CDialog
     		tc.setCellEditor(dce);
     		tc.setHeaderValue(Msg.translate(Env.getCtx(), "AD_Column_ID"));
     
    -		//	1 = Operators
    +
    +		// 0 = And/Or
    +		andOr = new CComboBox(new String[] {"",Msg.getMsg(Env.getCtx(),"AND"),Msg.getMsg(Env.getCtx(), "OR")});
    +		tc = advancedTable.getColumnModel().getColumn(INDEX_ANDOR);
    +		tc.setPreferredWidth(45);
    +		dce = new FindCellEditor(andOr);
    +		tc.setCellEditor(dce);
    +		tc.setHeaderValue(Msg.getMsg(Env.getCtx(), "And/Or"));
    +		
    +		// 1 = Left Bracket
    +		leftBrackets = new CComboBox(new String[] {"","(","((","((("});
    +		tc = advancedTable.getColumnModel().getColumn(INDEX_LEFTBRACKET);
    +		tc.setPreferredWidth(25);
    +		dce = new FindCellEditor(leftBrackets);
    +		tc.setCellEditor(dce);
    +		tc.setHeaderValue("(");
    +
    +		//	3 = Operators
     		operators = new CComboBox(MQuery.OPERATORS);
     		tc = advancedTable.getColumnModel().getColumn(INDEX_OPERATOR);
    -		tc.setPreferredWidth(40);
    +		tc.setPreferredWidth(55);
     		dce = new FindCellEditor(operators);
     		tc.setCellEditor(dce);
     		tc.setHeaderValue(Msg.getMsg(Env.getCtx(), "Operator"));
     
    -		// 	2 = QueryValue
    +		// 	4 = QueryValue
     		tc = advancedTable.getColumnModel().getColumn(INDEX_VALUE);
     		FindValueEditor fve = new FindValueEditor(this, false);		
     		tc.setCellEditor(fve);
    +		tc.setPreferredWidth(120);
     		tc.setCellRenderer(new ProxyRenderer(new FindValueRenderer(this, false)));
     		tc.setHeaderValue(Msg.getMsg(Env.getCtx(), "QueryValue"));
     
    -		// 	3 = QueryValue2
    +		// 	5 = QueryValue2
     		tc = advancedTable.getColumnModel().getColumn(INDEX_VALUE2);
    -		tc.setPreferredWidth(50);
    -		fve = new FindValueEditor(this, false);
    +		tc.setPreferredWidth(120);
    +		fve = new FindValueEditor(this, true);
     		tc.setCellEditor(fve);
     		tc.setCellRenderer(new ProxyRenderer(new FindValueRenderer(this, false)));
     		tc.setHeaderValue(Msg.getMsg(Env.getCtx(), "QueryValue2"));
     		
    -		AutoCompletion.enable(columns);
    -		AutoCompletion.enable(operators);
    +		// 6 = Right Bracket
    +		rightBrackets = new CComboBox(new String[] {"",")","))",")))"});
    +		tc = advancedTable.getColumnModel().getColumn(INDEX_RIGHTBRACKET);
    +		tc.setPreferredWidth(25);
    +		dce = new FindCellEditor(rightBrackets);
    +		tc.setCellEditor(dce);
    +		tc.setHeaderValue(")");
    +		
    +		// phib: disabled auto-completion as it causes date fields to have to be entered twice
    +		//AutoCompletion.enable(columns);
    +		//AutoCompletion.enable(operators);
     		
     		//user query
     		userQueries = MUserQuery.get(Env.getCtx(), m_AD_Tab_ID);
    @@ -799,9 +862,16 @@ public final class Find extends CDialog
     		}
     	}	//	actionPerformed
     
    +	/**
    +	 * Parse delimited string into user query
    +	 * Old field sequence: column, operator, value, value to
    +	 * New field sequence: column, operator, value, value to, and/or, left brackets, right brackets
    +	 * @param userQuery
    +	 */
     	private void parseUserQuery(MUserQuery userQuery) {
     		String code = userQuery.getCode();
    -		String[] segments = code.split(Pattern.quote(SEGMENT_SEPARATOR));
    +		log.fine("Parse user query: " + code);
    +		String[] segments = code.split(Pattern.quote(SEGMENT_SEPARATOR),-1);
     		advancedTable.stopEditor(true);
     		DefaultTableModel model = (DefaultTableModel)advancedTable.getModel();
     		int cnt = model.getRowCount();
    @@ -811,38 +881,62 @@ public final class Find extends CDialog
     		for (int i = 0; i < segments.length; i++)
     		{
     			String[] fields = segments[i].split(Pattern.quote(FIELD_SEPARATOR));
    -			model.addRow(new Object[] {null, MQuery.OPERATORS[MQuery.EQUAL_INDEX], null, null});
    +			model.addRow(new Object[] {"","", null, MQuery.OPERATORS[MQuery.EQUAL_INDEX], null, null, ""});
     			String columnName = null;
     			for (int j = 0; j < fields.length; j++)
     			{
    -				if (j == INDEX_COLUMNNAME)
    +				// column
    +				if (j == 0 )  
     				{
     					for (ValueNamePair vnp : columnValueNamePairs)
     					{
     						if (vnp.getValue().equals(fields[j]))
     						{
    -							model.setValueAt(vnp, i, j);
    +							model.setValueAt(vnp, i, INDEX_COLUMNNAME);
     							columnName = fields[j];
     							break;
     						}
     					}
     				}
    -				else if (j == INDEX_OPERATOR)
    +				// operator
    +				else if (j == 1)
     				{
     					for (ValueNamePair vnp : MQuery.OPERATORS)
     					{
     						if (vnp.getValue().equals(fields[j]))
     						{
    -							model.setValueAt(vnp, i, j);
    +							model.setValueAt(vnp, i, INDEX_OPERATOR);
     							break;
     						}
     					}
     				}
    -				else
    +				// value
    +				else if ( j == 2  && fields[j].length() > 0 )
     				{
     					GridField field = getTargetMField(columnName);
     					Object value = parseString(field, fields[j]);
    -					model.setValueAt(value, i, j);
    +					model.setValueAt(value, i, INDEX_VALUE);
    +				}
    +				// value 2
    +				else if ( j == 3 && fields[j].length() > 0 )
    +				{
    +						GridField field = getTargetMField(columnName);
    +						Object value = parseString(field, fields[j]);
    +						model.setValueAt(value, i, INDEX_VALUE2);
    +				}
    +				// and/or
    +				else if (j == 4 && fields[j].length() > 0 )
    +				{
    +					if ( i != 0 )
    +						model.setValueAt(fields[j], i, INDEX_ANDOR);
    +				}
    +				else if ( j == 5 && fields[j].length() > 0 )
    +				{
    +					model.setValueAt(fields[j], i, INDEX_LEFTBRACKET);
    +				}
    +				else if ( j == 6 && fields[j].length() > 0 )
    +				{
    +					model.setValueAt(fields[j], i, INDEX_RIGHTBRACKET);
     				}
     			}
     		}
    @@ -987,7 +1081,8 @@ public final class Find extends CDialog
     	{
     		advancedTable.stopEditor(true);
     		DefaultTableModel model = (DefaultTableModel)advancedTable.getModel();
    -		model.addRow(new Object[] {null, MQuery.OPERATORS[MQuery.EQUAL_INDEX], null, null});
    +		int rows = model.getRowCount();
    +		model.addRow(new Object[] {rows == 0 ? "" : "AND","", null, MQuery.OPERATORS[MQuery.EQUAL_INDEX], null, null,""});
     		advancedTable.requestFocusInWindow();
     	}	//	cmd_new
     
    @@ -1001,6 +1096,7 @@ public final class Find extends CDialog
     		m_query = new MQuery(m_tableName);
     		m_query.addRestriction(Env.parseContext(Env.getCtx(), m_targetWindowNo, m_whereExtended, false));
     		StringBuffer code = new StringBuffer();
    +		int openBrackets = 0;
     		for (int row = 0; row < advancedTable.getRowCount(); row++)
     		{
     			//	Column
    @@ -1016,6 +1112,17 @@ public final class Find extends CDialog
     				continue;
     			boolean isProductCategoryField = isProductCategoryField(field.getAD_Column_ID());
     			String ColumnSQL = field.getColumnSQL(false);
    +			
    +			String lBrackets = (String) advancedTable.getValueAt(row, INDEX_LEFTBRACKET);
    +			if ( lBrackets != null )
    +				openBrackets += lBrackets.length();
    +			String rBrackets = (String) advancedTable.getValueAt(row, INDEX_RIGHTBRACKET);
    +			if ( rBrackets != null )
    +				openBrackets -= rBrackets.length();
    +			
    +			boolean and = true;
    +			if ( row > 0 )
    +				and = !"OR".equals((String) advancedTable.getValueAt(row, INDEX_ANDOR));
     			//	Op
     			Object op = advancedTable.getValueAt(row, INDEX_OPERATOR);
     			if (op == null)
    @@ -1025,7 +1132,36 @@ public final class Find extends CDialog
     			//	Value	******
     			Object value = advancedTable.getValueAt(row, INDEX_VALUE);
     			if (value == null)
    +			{
    +				if ( MQuery.OPERATORS[MQuery.EQUAL_INDEX].equals(op) 
    +						||  MQuery.OPERATORS[MQuery.NOT_EQUAL_INDEX].equals(op) )
    +				{
    +					m_query.addRestriction(ColumnSQL, Operator, null,
    +							infoName, null, and, openBrackets);
    +					
    +					if (code.length() > 0)
    +						code.append(SEGMENT_SEPARATOR);
    +					code.append(ColumnName)
    +					.append(FIELD_SEPARATOR)
    +					.append(Operator)
    +					.append(FIELD_SEPARATOR)
    +					.append("")
    +					.append(FIELD_SEPARATOR)
    +					.append("")
    +					.append(FIELD_SEPARATOR)
    +					.append( and ? "AND" : "OR")
    +					.append(FIELD_SEPARATOR)
    +					.append(lBrackets != null ? lBrackets : "")
    +					.append(FIELD_SEPARATOR)
    +					.append(rBrackets != null ? rBrackets : "");
    +				}
    +				else
    +				{
     				continue;
    +				}
    +			}
    +			else 
    +			{
     			Object parsedValue = parseValue(field, value);
     			if (parsedValue == null)
     				continue;
    @@ -1046,17 +1182,19 @@ public final class Find extends CDialog
     				if (parsedValue2 == null)
     					continue;
     				m_query.addRangeRestriction(ColumnSQL, parsedValue, parsedValue2,
    -					infoName, infoDisplay, infoDisplay_to);
    +							infoName, infoDisplay, infoDisplay_to, and, openBrackets);
     			}
     			else if (isProductCategoryField && MQuery.OPERATORS[MQuery.EQUAL_INDEX].equals(op)) {
     				if (!(parsedValue instanceof Integer)) {
     					continue;
     				}
    -				m_query.addRestriction(getSubCategoryWhereClause(((Integer) parsedValue).intValue()));
    +					m_query
    +
    +					.addRestriction(getSubCategoryWhereClause(((Integer) parsedValue).intValue()), and, openBrackets);
     			}
     			else
     				m_query.addRestriction(ColumnSQL, Operator, parsedValue,
    -					infoName, infoDisplay);
    +							infoName, infoDisplay, and, openBrackets);
     			
     			if (code.length() > 0)
     				code.append(SEGMENT_SEPARATOR);
    @@ -1066,7 +1204,15 @@ public final class Find extends CDialog
     				.append(FIELD_SEPARATOR)
     				.append(value.toString())
     				.append(FIELD_SEPARATOR)
    -				.append(value2 != null ? value2.toString() : "");
    +				.append(value2 != null ? value2.toString() : "")
    +				.append(FIELD_SEPARATOR)
    +				.append( and ? "AND" : "OR")
    +				.append(FIELD_SEPARATOR)
    +				.append(lBrackets != null ? lBrackets : "")
    +				.append(FIELD_SEPARATOR)
    +				.append(rBrackets != null ? rBrackets : "");
    +			
    +			}
     		}
     		Object selected = fQueryName.getSelectedItem();
     		if (selected != null && saveQuery) {
    @@ -1095,8 +1241,7 @@ public final class Find extends CDialog
     					ADialog.warn (m_targetWindowNo, this, "DeleteError", name);
     				return;
     			}
    -			else
    -				return;
    +			
     			uq.setCode (code.toString());
     			uq.setAD_Table_ID (m_AD_Table_ID);
     			//
    @@ -1229,7 +1374,7 @@ public final class Find extends CDialog
     	 * 	Parse Value
     	 * 	@param field column
     	 * 	@param in value
    -	 * 	@return data type corected value
    +	 * 	@return data type corrected value
     	 */
     	private Object parseValue (GridField field, Object in)
     	{
    @@ -1296,10 +1441,11 @@ public final class Find extends CDialog
     	 * 	Parse String
     	 * 	@param field column
     	 * 	@param in value
    -	 * 	@return data type corected value
    +	 * 	@return data type corrected value
     	 */
     	private Object parseString(GridField field, String in)
     	{
    +		log.log(Level.FINE, "Parse: " +field + ":" + in);
     		if (in == null)
     			return null;
     		int dt = field.getDisplayType();
    diff --git a/client/src/org/compiere/apps/search/FindValueEditor.java b/client/src/org/compiere/apps/search/FindValueEditor.java
    index 76cba4d972..92c9b5c3b1 100644
    --- a/client/src/org/compiere/apps/search/FindValueEditor.java
    +++ b/client/src/org/compiere/apps/search/FindValueEditor.java
    @@ -116,6 +116,8 @@ public final class FindValueEditor extends AbstractCellEditor implements TableCe
     		boolean enabled = !m_valueToColumn || (m_valueToColumn && m_between); 
     		log.config("(" + value + ") - Enabled=" + enabled);
     
    +		if ( enabled )
    +		{
     		String columnName = null;
     		Object column = table.getModel().getValueAt(row, Find.INDEX_COLUMNNAME);
     		if (column != null)
    @@ -134,6 +136,11 @@ public final class FindValueEditor extends AbstractCellEditor implements TableCe
     		m_editor.setValue(value);
     		m_editor.setReadWrite(enabled);
     		m_editor.setBorder(null);
    +		}
    +		else
    +		{
    +			m_editor = null;
    +		}
     		//
     		return (Component)m_editor;
     	}   //	getTableCellEditorComponent
    diff --git a/client/src/org/compiere/apps/search/Info.java b/client/src/org/compiere/apps/search/Info.java
    index 2214543d83..5ac8f7fbd8 100644
    --- a/client/src/org/compiere/apps/search/Info.java
    +++ b/client/src/org/compiere/apps/search/Info.java
    @@ -20,6 +20,7 @@ import java.awt.BorderLayout;
     import java.awt.Cursor;
     import java.awt.Dimension;
     import java.awt.Frame;
    +import java.awt.Toolkit;
     import java.awt.event.ActionEvent;
     import java.awt.event.MouseEvent;
     import java.math.BigDecimal;
    @@ -267,8 +268,11 @@ public abstract class Info extends CDialog
     	}   //  showAssignment
     
     	/** Window Width                */
    -	protected static final int        INFO_WIDTH = 800;
    +	Toolkit toolkit = Toolkit.getDefaultToolkit();
    +	Dimension screensize = toolkit.getScreenSize();
     
    +	protected final int        INFO_WIDTH = screensize.width > 1500 ? 1500 : screensize.width - 100;
    +	protected final int        SCREEN_HEIGHT = screensize.height;
     	
     	/**************************************************************************
     	 *	Detail Constructor
    @@ -277,7 +281,7 @@ public abstract class Info extends CDialog
     	 *  @param WindowNo window no
     	 *  @param tableName table name
     	 *  @param keyColumn key column name
    -	 *  @param multiSelection muiliple selection
    +	 *  @param multiSelection multiple selection
     	 *  @param whereClause where clause
     	 */
     	protected Info (Frame frame, boolean modal, int WindowNo,
    @@ -1103,9 +1107,7 @@ public abstract class Info extends CDialog
     		//  Double click with selected row => exit/zoom
     		if (e.getClickCount() > 1 && p_table.getSelectedRow() != -1)
     		{
    -			if (p_WindowNo == 0)
    -				zoom();
    -			else if (p_multiSelection && isDoubleClickTogglesSelection())
    +			if (p_multiSelection && isDoubleClickTogglesSelection())
     			{
     				if (m_keyColumnIndex >= 0)
     				{
    diff --git a/client/src/org/compiere/apps/search/InfoPAttribute.java b/client/src/org/compiere/apps/search/InfoPAttribute.java
    index fd76396412..3a49c78d8d 100644
    --- a/client/src/org/compiere/apps/search/InfoPAttribute.java
    +++ b/client/src/org/compiere/apps/search/InfoPAttribute.java
    @@ -40,6 +40,7 @@ import org.compiere.grid.ed.VLine;
     import org.compiere.grid.ed.VNumber;
     import org.compiere.grid.ed.VString;
     import org.compiere.model.MAttribute;
    +import org.compiere.model.MAttributeSet;
     import org.compiere.model.MRole;
     import org.compiere.swing.CDialog;
     import org.compiere.swing.CLabel;
    @@ -62,7 +63,10 @@ public class InfoPAttribute extends CDialog
     	/**
     	 * 
     	 */
    -	private static final long serialVersionUID = 4307517787262162793L;
    +	private static final long serialVersionUID = -4309055112258081495L;
    +	
    +	/* the attribute set selected on the InfoProduct window */
    +	private int p_M_AttributeSet_ID = 0;
     
     	/**
     	 * 	Constructor.
    @@ -72,6 +76,9 @@ public class InfoPAttribute extends CDialog
     	public InfoPAttribute (JDialog parent)
     	{
     		super (parent, Msg.getMsg(Env.getCtx(), "InfoPAttribute"), true);
    +		if (parent instanceof InfoProduct) {
    +			p_M_AttributeSet_ID = ((InfoProduct)parent).getM_AttributeSet_ID();
    +		}
     		try
     		{
     			jbInit();
    @@ -86,7 +93,7 @@ public class InfoPAttribute extends CDialog
     
     	/**	Resulting Query			*/
     	private String		m_query = "";
    -	/**	Product Attribure Editors	*/
    +	/**	Product Attribute Editors	*/
     	private ArrayList	m_productEditors = new ArrayList();
     	private ArrayList	m_productEditorsTo = new ArrayList();
     	/**	Instance Attribute Editors	*/
    @@ -131,6 +138,16 @@ public class InfoPAttribute extends CDialog
     	private void dynInit()
     	{
     		int row = addAttributes();
    +		
    +		boolean isGuarantee = true;
    +		boolean isSerial = true;
    +		boolean isLot = true;
    +		if (p_M_AttributeSet_ID > 0) {
    +			MAttributeSet as = new MAttributeSet(Env.getCtx(), p_M_AttributeSet_ID, null);
    +			isGuarantee = as.isGuaranteeDate();
    +			isSerial = as.isSerNo();
    +			isLot = as.isLot();
    +		}
     		//
     		String s = Msg.translate(Env.getCtx(), "GuaranteeDate");
     		guaranteeDateSelection = new VComboBox (new Object[]
    @@ -138,14 +155,20 @@ public class InfoPAttribute extends CDialog
     	//	guaranteeDateSelection.setPreferredSize();
     		initLotSelection();
     		//	Fixed Instance Selection Fields		
    -		centerPanel.add(serNoLabel, new ALayoutConstraint(row++, 0));
    -		centerPanel.add(serNoField, null);
    -		centerPanel.add(lotLabel, new ALayoutConstraint(row++, 0));
    -		centerPanel.add(lotField, null);
    -		centerPanel.add(lotLabel2, new ALayoutConstraint(row++, 0));
    -		centerPanel.add(lotSelection, null);
    -		centerPanel.add(guaranteeDateSelection, new ALayoutConstraint(row++, 0));
    -		centerPanel.add(guaranteeDateField, null);
    +		if (isSerial) {
    +			centerPanel.add(serNoLabel, new ALayoutConstraint(row++, 0));
    +			centerPanel.add(serNoField, null);
    +		}
    +		if (isLot) {
    +			centerPanel.add(lotLabel, new ALayoutConstraint(row++, 0));
    +			centerPanel.add(lotField, null);
    +			centerPanel.add(lotLabel2, new ALayoutConstraint(row++, 0));
    +			centerPanel.add(lotSelection, null);
    +		}
    +		if (isGuarantee) {
    +			centerPanel.add(guaranteeDateSelection, new ALayoutConstraint(row++, 0));
    +			centerPanel.add(guaranteeDateField, null);
    +		}
     		//
     		Dimension d = centerPanel.getPreferredSize();
     		d.width = 400;
    @@ -161,17 +184,23 @@ public class InfoPAttribute extends CDialog
     		int row = 0;
     		PreparedStatement pstmt = null;
     		ResultSet rs = null;
    +		String whereAttributeSet;
    +		if (p_M_AttributeSet_ID > 0)
    +			whereAttributeSet = "AND M_Attribute_ID IN (SELECT M_Attribute_ID FROM M_AttributeUse WHERE M_AttributeSet_ID="+p_M_AttributeSet_ID+")";
    +		else
    +			whereAttributeSet = "";
     		String sql = MRole.getDefault().addAccessSQL(
     			"SELECT M_Attribute_ID, Name, Description, AttributeValueType, IsInstanceAttribute "
     			+ "FROM M_Attribute "
     			+ "WHERE IsActive='Y' "
    -			+ "ORDER BY IsInstanceAttribute, Name", 
    +			+ whereAttributeSet
    +			+ " ORDER BY IsInstanceAttribute, Name", 
     			"M_Attribute", MRole.SQL_NOTQUALIFIED, MRole.SQL_RO);
    +		boolean instanceLine = false;
     		try
     		{
     			pstmt = DB.prepareStatement(sql, null);
     			rs = pstmt.executeQuery();
    -			boolean instanceLine = false;
     			while (rs.next())
     			{
     				int attribute_ID = rs.getInt(1);
    @@ -231,6 +260,27 @@ public class InfoPAttribute extends CDialog
     			DB.close(rs, pstmt);
     			rs = null; pstmt = null;
     		}
    +		
    +		// print instance line if not printed
    +		if (!instanceLine) {
    +			boolean isGuarantee = true;
    +			boolean isSerial = true;
    +			boolean isLot = true;
    +			if (p_M_AttributeSet_ID > 0) {
    +				MAttributeSet as = new MAttributeSet(Env.getCtx(), p_M_AttributeSet_ID, null);
    +				isGuarantee = as.isGuaranteeDate();
    +				isSerial = as.isSerNo();
    +				isLot = as.isLot();
    +			}
    +			if (isGuarantee || isSerial || isLot) {
    +				CPanel group = new CPanel();
    +				group.setBorder(new VLine(Msg.translate(Env.getCtx(), "IsInstanceAttribute")));
    +				group.add(Box.createVerticalStrut(VLine.SPACE));
    +				centerPanel.add(group, new ALayoutConstraint(row++, 0));
    +				instanceLine = true;
    +			}
    +		}
    +		
     		return row;
     	}	//	addProductAttributes
     
    @@ -282,8 +332,13 @@ public class InfoPAttribute extends CDialog
     		ArrayList list = new ArrayList();
     		list.add(new KeyNamePair(-1, ""));
     		
    +		String whereAttributeSet;
    +		if (p_M_AttributeSet_ID > 0)
    +			whereAttributeSet = "AND M_Product_ID IN (SELECT M_Product_ID FROM M_Product WHERE M_AttributeSet_ID="+p_M_AttributeSet_ID+")";
    +		else
    +			whereAttributeSet = "";
     		String sql = MRole.getDefault().addAccessSQL(
    -			"SELECT M_Lot_ID, Name FROM M_Lot WHERE IsActive='Y' ORDER BY 2",
    +			"SELECT M_Lot_ID, Name FROM M_Lot WHERE IsActive='Y' " + whereAttributeSet + " ORDER BY 2",
     			"M_Lot", MRole.SQL_NOTQUALIFIED, MRole.SQL_RO);
     		PreparedStatement pstmt = null;
     		ResultSet rs = null;
    diff --git a/client/src/org/compiere/apps/search/InfoProduct.java b/client/src/org/compiere/apps/search/InfoProduct.java
    index fb1b90cc33..ee8a2327e3 100644
    --- a/client/src/org/compiere/apps/search/InfoProduct.java
    +++ b/client/src/org/compiere/apps/search/InfoProduct.java
    @@ -82,7 +82,7 @@ public class InfoProduct extends Info implements ActionListener, ChangeListener
     	/**
     	 * 
     	 */
    -	private static final long serialVersionUID = -2674502713710863413L;
    +	private static final long serialVersionUID = 2076229793041196087L;
     
     	/**
     	 *	Standard Constructor
    @@ -154,6 +154,8 @@ public class InfoProduct extends Info implements ActionListener, ChangeListener
     	private CTextField fieldVendor = new CTextField(10);
     	private CLabel labelProductCategory = new CLabel();
     	private VComboBox pickProductCategory = new VComboBox();
    +	private CLabel labelAS = new CLabel(); // @Trifon
    +	private VComboBox pickAS = new VComboBox(); // @Trifon
     	
     	//Begin - fer_luck @ centuryon
     	private CTextArea fieldDescription = new CTextArea();
    @@ -214,6 +216,10 @@ public class InfoProduct extends Info implements ActionListener, ChangeListener
     		labelProductCategory.setText(Msg.translate(Env.getCtx(), "M_Product_Category_ID"));
     		pickProductCategory.setBackground(AdempierePLAF.getInfoBackground());
     		
    +		// @Trifon
    +		labelAS.setText(Msg.translate(Env.getCtx(), "M_AttributeSet_ID"));
    +		pickAS.setBackground(AdempierePLAF.getInfoBackground());
    +		
     		m_InfoPAttributeButton.setMargin(new Insets(2,2,2,2));
     		m_InfoPAttributeButton.setToolTipText(Msg.getMsg(Env.getCtx(), "InfoPAttribute"));
     		m_InfoPAttributeButton.addActionListener(this);
    @@ -244,6 +250,8 @@ public class InfoProduct extends Info implements ActionListener, ChangeListener
     		parameterPanel.add(pickPriceList, null);
     		parameterPanel.add(labelProductCategory, null);
     		parameterPanel.add(pickProductCategory, null);
    +		parameterPanel.add(labelAS, null); // @Trifon
    +		parameterPanel.add(pickAS, null);  // @Trifon
     		
     		//	Product Attribute Instance
     		m_PAttributeButton = ConfirmPanel.createPAttributeButton(true);
    @@ -326,13 +334,13 @@ public class InfoProduct extends Info implements ActionListener, ChangeListener
                   
             CTabbedPane jTab  = new CTabbedPane();
             jTab.addTab(Msg.translate(Env.getCtx(), "Warehouse"), new JScrollPane(warehouseTbl));
    -        jTab.setPreferredSize(new Dimension(INFO_WIDTH, 105));
    +        jTab.setPreferredSize(new Dimension(INFO_WIDTH, SCREEN_HEIGHT > 600 ? 250 : 105));
             jTab.addTab(Msg.translate(Env.getCtx(), "Description"), new JScrollPane(fieldDescription));
             jTab.addTab(Msg.translate(Env.getCtx(), "Substitute_ID"), new JScrollPane(substituteTbl));
             jTab.addTab(Msg.translate(Env.getCtx(), "RelatedProduct_ID"), new JScrollPane(relatedTbl));
     		jTab.addTab (Msg.getMsg(Env.getCtx(), "ATP"), new JScrollPane(m_tableAtp));
     		jTab.addChangeListener(this);
    -        tablePanel.setPreferredSize(new Dimension(INFO_WIDTH, 110));
    +        tablePanel.setPreferredSize(new Dimension(INFO_WIDTH, SCREEN_HEIGHT > 600 ? 255 : 110));
             tablePanel.add(jTab);        
     
             warehouseStockPanel.setExpanded(false);
    @@ -500,6 +508,7 @@ public class InfoProduct extends Info implements ActionListener, ChangeListener
     		pickWarehouse.addActionListener(this);
     		pickPriceList.addActionListener(this);
     		pickProductCategory.addActionListener(this);
    +		pickAS.addActionListener(this); // @Trifon
     	}	//	initInfo
     
     	/**
    @@ -563,6 +572,15 @@ public class InfoProduct extends Info implements ActionListener, ChangeListener
     			for (KeyNamePair kn : DB.getKeyNamePairs(SQL, true)) {
     				pickProductCategory.addItem(kn);
     			}
    +			
    +			// Attribute Set - @Trifon
    +			SQL = MRole.getDefault().addAccessSQL (
    +					"SELECT M_AttributeSet_ID, Name FROM M_AttributeSet WHERE IsActive='Y'",
    +						"M_AttributeSet", MRole.SQL_NOTQUALIFIED, MRole.SQL_RO)
    +					+ " ORDER BY Name";
    +				for (KeyNamePair kn : DB.getKeyNamePairs(SQL, true)) {
    +					pickAS.addItem(kn);
    +				}
     		}
     		catch (SQLException e)
     		{
    @@ -696,6 +714,11 @@ public class InfoProduct extends Info implements ActionListener, ChangeListener
     			where.append(" AND p.M_Product_Category_ID=?");
     		}
     		
    +		//  Optional Attribute Set
    +		if (getM_AttributeSet_ID() > 0) {
    +			where.append(" AND p.M_AttributeSet_ID=?");
    +		}
    +		
     		//	Product Attribute Search
     		if (m_pAttributeWhere != null)
     		{
    @@ -773,6 +796,12 @@ public class InfoProduct extends Info implements ActionListener, ChangeListener
     			pstmt.setInt(index++, M_Product_Category_ID);
     			log.fine("M_Product_Category_ID=" + M_Product_Category_ID);
     		}
    +		//  => Attribute Set - @Trifon
    +		int M_AttributeSet_ID = getM_AttributeSet_ID();
    +		if (M_AttributeSet_ID > 0) {
    +			pstmt.setInt(index++, M_AttributeSet_ID);
    +			log.fine("M_AttributeSet_ID=" + M_AttributeSet_ID);
    +		}
     		//	Rest of Parameter in Query for Attribute Search
     		if (m_pAttributeWhere != null)
     			return;
    @@ -831,7 +860,7 @@ public class InfoProduct extends Info implements ActionListener, ChangeListener
     
     	
     	/**************************************************************************
    -	 *  Action Listner
    +	 *  Action Listener
     	 *	@param e event
     	 */
     	public void actionPerformed (ActionEvent e)
    @@ -849,7 +878,7 @@ public class InfoProduct extends Info implements ActionListener, ChangeListener
     		}
     		m_pAttributeWhere = null;
     		
    -		//	Query Product Attribure Instance
    +		//	Query Product Attribute Instance
     		int row = p_table.getSelectedRow();
     		if (e.getSource().equals(m_PAttributeButton) && row != -1)
     		{
    @@ -1265,4 +1294,15 @@ public class InfoProduct extends Info implements ActionListener, ChangeListener
     			M_Product_Category_ID = pc.getKey();
     		return M_Product_Category_ID;
     	}
    +	
    +	/**
    +	 * @return selected Attribute Set ID
    +	 */
    +	public int getM_AttributeSet_ID() {
    +		int M_AttributeSet_ID = 0;
    +		KeyNamePair as = (KeyNamePair)pickAS.getSelectedItem();
    +		if (as != null)
    +			M_AttributeSet_ID = as.getKey();
    +		return M_AttributeSet_ID;
    +	}
     }	//	InfoProduct
    diff --git a/client/src/org/compiere/grid/GridController.java b/client/src/org/compiere/grid/GridController.java
    index c4a5c3689d..c59399bfd9 100644
    --- a/client/src/org/compiere/grid/GridController.java
    +++ b/client/src/org/compiere/grid/GridController.java
    @@ -148,7 +148,7 @@ import org.compiere.util.Trx;
      *  
    * @author Jorg Janke * @version $Id: GridController.java,v 1.8 2006/09/25 00:59:52 jjanke Exp $ - * + * * @author Teo Sarca - BF [ 1742159 ], BF [ 1707876 ] * @contributor Victor Perez , e-Evolution.SC FR [ 1757088 ] * @contributor fer_luck @ centuryon FR [ 1757088 ] @@ -158,7 +158,7 @@ public class GridController extends CPanel VetoableChangeListener, PropertyChangeListener, MouseListener { /** - * + * */ private static final long serialVersionUID = 7308782933999556880L; @@ -188,7 +188,7 @@ public class GridController extends CPanel /** Logger */ private static CLogger log = CLogger.getCLogger(GridController.class); - + /** * The Layout */ @@ -199,14 +199,14 @@ public class GridController extends CPanel private CPanel cardPanel = new CPanel(); private CardLayout cardLayout = new CardLayout(); //private JSplitPane srPane = new JSplitPane(); - + private JScrollPane vPane = new JScrollPane(); private CScrollPane mrPane = new CScrollPane(); private CPanel xPanel = new CPanel(); private BorderLayout xLayout = new BorderLayout(); private VTable vTable = new VTable(); //FR [ 1757088 ] - private VPanel vPanel = null; + private VPanel vPanel = null; private boolean detailGrid = false; /** @@ -229,7 +229,7 @@ public class GridController extends CPanel cardPanel.add(vPane, "vPane"); // Sequence Important! cardPanel.add(mrPane, "mrPane"); cardPanel.setBorder(null); - cardPanel.setName("gc_cardPanel"); + cardPanel.setName("gc_cardPanel"); // single row (w/o xPane it would be centered) /* srPane.setBorder(null); @@ -255,7 +255,7 @@ public class GridController extends CPanel graphPanel.setBorder(null); graphPanel.setName("gc_graphPanel"); //srPane.setDividerLocation(200); - + vPane.setBorder(BorderFactory.createEmptyBorder()); } // jbInit @@ -333,12 +333,12 @@ public class GridController extends CPanel private ArrayList synchronizerList = new ArrayList(); - public boolean initGrid (GridTab mTab, boolean onlyMultiRow, + public boolean initGrid (GridTab mTab, boolean onlyMultiRow, int WindowNo, APanel aPanel, GridWindow mWindow) { return initGrid(mTab, onlyMultiRow, WindowNo, aPanel, mWindow, false); } - + /************************************************************************** * Init Grid. *
    @@ -354,7 +354,7 @@ public class GridController extends CPanel
     	 * 	@param mWindow parent Window Model
     	 *  @return true if initialized
     	 */
    -	public boolean initGrid (GridTab mTab, boolean onlyMultiRow, 
    +	public boolean initGrid (GridTab mTab, boolean onlyMultiRow,
     		int WindowNo, APanel aPanel, GridWindow mWindow, boolean lazy)
     	{
     		log.config( "(" + mTab.toString() + ")");
    @@ -374,7 +374,7 @@ public class GridController extends CPanel
     		xPanel.add(vPanel, BorderLayout.CENTER);
     
     		setTabLevel(m_mTab.getTabLevel());
    -		
    +
     		if (!lazy)
     			init();
     		else
    @@ -382,12 +382,12 @@ public class GridController extends CPanel
     			//Load tab meta data, needed for includeTab to work
     			m_mTab.initTab(false);
     		}
    -			
    -		
    +
    +
     	//	log.config( "GridController.dynInit (" + mTab.toString() + ") - fini");
     		return true;
     	}   //  initGrid
    -	
    +
     	private void init()
     	{
     		//  Set up Multi Row Table
    @@ -409,7 +409,7 @@ public class GridController extends CPanel
     				if (mField.isDisplayed())
     					vPanel.setMnemonic(mField);
     			}   //  for all fields
    -			
    +
     			//	Add Fields
     			for (int i = 0; i < size; i++)
     			{
    @@ -484,15 +484,15 @@ public class GridController extends CPanel
     			switchMultiRow();
     		else
     			switchSingleRow();
    -		
    +
     		init = true;
     	}
    -	
    +
     	/**
    -	 * 
    +	 *
     	 * @return boolean
     	 */
    -	public boolean isInit() 
    +	public boolean isInit()
     	{
     		return init;
     	}
    @@ -502,15 +502,15 @@ public class GridController extends CPanel
     	 * 	@param gc grid controller to add
     	 * 	@return GridSynchronizer
     	 */
    -	
    +
     	//FR [ 1757088 ]
     	public boolean includeTab (GridController gc , APanel aPanel, GridSynchronizer sync)
    -	{	
    +	{
     		GridController detail = gc;
    -		detail.setDetailGrid(true);			
    +		detail.setDetailGrid(true);
     		detail.addMouseListener(detail);
     		detail.enableEvents(AWTEvent.HIERARCHY_EVENT_MASK + AWTEvent.MOUSE_EVENT_MASK);
    -		
    +
     		vPanel.includeTab(detail);
     		//BEGIN - [FR 1953734]
     		gc.setGCParent(this);
    @@ -526,7 +526,7 @@ public class GridController extends CPanel
     		if (detailGrid && vPanel != null)
     			vPanel.setBorder(BorderFactory.createLineBorder(AdempierePLAF.getPrimary2()));
     	}
    -	
    +
     	public boolean isDetailGrid(){
     		return detailGrid;
     	}
    @@ -538,7 +538,7 @@ public class GridController extends CPanel
     	{
     		return m_mTab.getName();
     	}	//	getTitle
    -	
    +
     	/**
     	 *	Setup Multi-Row Table (add fields)
     	 * 	@param aPanel Panel
    @@ -564,7 +564,7 @@ public class GridController extends CPanel
     			if (mField.getColumnName().equals(tc.getIdentifier().toString()))
     			{
     				//don't show included tab field in grid
    -				if (mField.getIncluded_Tab_ID() > 0) 
    +				if (mField.getIncluded_Tab_ID() > 0)
     				{
     					TableCellNone tcn = new TableCellNone(mField.getColumnName());
     					tc.setCellRenderer (tcn);
    @@ -573,7 +573,7 @@ public class GridController extends CPanel
     					tc.setMinWidth (0);
     					tc.setMaxWidth (0);
     					tc.setPreferredWidth (0);
    -				} 
    +				}
     				else if (mField.getDisplayType () == DisplayType.RowID)
     				{
     					tc.setCellRenderer (new VRowIDRenderer (false));
    @@ -630,7 +630,7 @@ public class GridController extends CPanel
     	public void activate ()
     	{
     		if (!init) init();
    -		
    +
     		//	Tree to be initiated on second/.. tab
     		if (m_mTab.isTreeTab() && m_mTab.getTabNo() != 0)
     		{
    @@ -655,19 +655,33 @@ public class GridController extends CPanel
     			if (m_tree != null)
     				m_tree.initTree (AD_Tree_ID);
     		}
    -		
    +
     		activateChilds();
     	}	//	activate
     
     	/**
     	 * activate child grid controller ( included tab )
     	 */
    -	private void activateChilds() 
    +	private void activateChilds()
     	{
    -		for (GridSynchronizer s : synchronizerList ) 
    +		for (GridSynchronizer s : synchronizerList )
     		{
     			s.activateChild();
    -		}		
    +		}
    +	}
    +
    +	public GridController findChild(GridTab gTab)
    +	{
    +		GridController gc = null;
    +		for (GridSynchronizer s : synchronizerList )
    +		{
    +			if (s.getChild().getMTab().equals(gTab))
    +			{
    +				gc = s.getChild();
    +				break;
    +			}
    +		}
    +		return gc;
     	}
     
     	/**
    @@ -706,7 +720,7 @@ public class GridController extends CPanel
     	{
     		return m_mTab.isNeedToSaveParent();
     	}*/
    -	
    +
     	/**************************************************************************
     	 *  Switch from single to multi & vice versa
     	 */
    @@ -752,7 +766,7 @@ public class GridController extends CPanel
     		return m_singleRow;
     	}   //  isSingleRow
     
    -	
    +
     	/**************************************************************************
     	 *  Remove Listener - pass on to MTab
     	 *  @param l listener
    @@ -802,7 +816,7 @@ public class GridController extends CPanel
     		dynamicDisplay(col);
     	}   //  dataStatusChanged
     
    -	
    +
     	/**************************************************************************
     	 *  List Selection Listener (VTable) - row changed
     	 *  @param e event
    @@ -974,14 +988,14 @@ public class GridController extends CPanel
     		boolean noData = m_mTab.getRowCount() == 0;
     		log.config(m_mTab.toString() + " - Rows=" + m_mTab.getRowCount());
     		//  All Components in vPanel (Single Row)
    -		
    +
     		Set hiddens = new HashSet();
     		Component[] comps = vPanel.getComponentsRecursive();
     		for (int i = 0; i < comps.length; i++)
     		{
     			Component comp = comps[i];
     			String columnName = comp.getName();
    -			
    +
     			if (columnName != null && columnName.length() > 0)
     			{
     				GridField mField = m_mTab.getField(columnName);
    @@ -1023,8 +1037,8 @@ public class GridController extends CPanel
     							}
     						}
     					}
    -					else 
    -					{ 
    +					else
    +					{
     						if (comp.isVisible())
     							comp.setVisible(false);
     						hiddens.add(columnName);
    @@ -1036,8 +1050,8 @@ public class GridController extends CPanel
     		// hide empty field group based on the environment
     		for (int i = 0; i < comps.length; i++) {
     			Component comp = comps[i];
    -			
    -			if (comp instanceof CollapsiblePanel) 
    +
    +			if (comp instanceof CollapsiblePanel)
     			{
     				if (comp.getName() == null || comp.getName().startsWith("IncludedTab#"))
     					continue;
    @@ -1049,23 +1063,23 @@ public class GridController extends CPanel
     						if (childs[j].isVisible())
     						{
     							String columnName = childs[j].getName();
    -							if (columnName != null && columnName.length() > 0) 
    +							if (columnName != null && columnName.length() > 0)
     							{
     								GridField mField = m_mTab.getField(columnName);
    -								if (mField != null) 
    +								if (mField != null)
     								{
     									hasVisible = true;
     									break;
     								}
     							}
    -						}						
    +						}
     					}
     					if (comp.isVisible() != hasVisible)
     						comp.setVisible(hasVisible);
     				}
     			}
     		}
    -		
    +
     		//
     
     		log.config(m_mTab.toString() + " - fini - "
    @@ -1085,16 +1099,16 @@ public class GridController extends CPanel
     		String name = (String)m_mTab.getValue("Name");
     		String description = (String)m_mTab.getValue("Description");
     		Boolean IsSummary = (Boolean)m_mTab.getValue("IsSummary");
    -		boolean summary = IsSummary != null && IsSummary.booleanValue(); 
    +		boolean summary = IsSummary != null && IsSummary.booleanValue();
     		String imageIndicator = (String)m_mTab.getValue("Action");  //  Menu - Action
     		//
    -		m_tree.nodeChanged(save, keyID, name, description, 
    +		m_tree.nodeChanged(save, keyID, name, description,
     			summary, imageIndicator);
     	}   //  rowChanged
     
     
     	/**************************************************************************
    -	 * Save Multiple records - Clone a record and assign new values to each 
    +	 * Save Multiple records - Clone a record and assign new values to each
     	 * clone for a specific column.
     	 * @param ctx context
     	 * @param tableName Table Name
    @@ -1103,44 +1117,44 @@ public class GridController extends CPanel
     	 * @param values Values to be assigned to clones for the specified column
     	 * @param trxName Transaction
     	 * @throws Exception If error is occured when loading the PO or saving clones
    -	 * 
    +	 *
     	 * @author ashley
     	 */
    -	protected void saveMultipleRecords(Properties ctx, String tableName, 
    -			String columnName, int recordId, Integer[] values, 
    +	protected void saveMultipleRecords(Properties ctx, String tableName,
    +			String columnName, int recordId, Integer[] values,
     			String trxName) throws Exception
     	{
     		if (values == null)
     		{
     			return ;
     		}
    -		
    +
     		int oldRow = m_mTab.getCurrentRow();
    -		GridField lineField = m_mTab.getField("Line");	
    -		
    +		GridField lineField = m_mTab.getField("Line");
    +
     		for (int i = 0; i < values.length; i++)
     		{
     			if (!m_mTab.dataNew(true))
     			{
     				throw new IllegalStateException("Could not clone tab");
     			}
    -			
    +
     			m_mTab.setValue(columnName, values[i]);
    -			
    +
     			if (lineField != null)
     			{
     				m_mTab.setValue(lineField, 0);
     			}
    -			
    +
     			if (!m_mTab.dataSave(false))
     			{
     				throw new IllegalStateException("Could not update tab");
     			}
    -			
    +
     			m_mTab.setCurrentRow(oldRow);
     		}
     	}
    -	
    +
     	/**************************************************************************
     	 *  Vetoable Change Listener.
     	 * 	Called from VEditor
    @@ -1173,7 +1187,7 @@ public class GridController extends CPanel
     		log.config("(" + m_mTab.toString() + ") "
     			+ e.getPropertyName() + "=" + e.getNewValue() + " (" + e.getOldValue() + ") "
     			+ (e.getOldValue() == null ? "" : e.getOldValue().getClass().getName()));
    -		
    +
     
     		//  Save Confirmation dialog    MTable-RowSave
     		if (e.getPropertyName().equals(GridTable.PROPERTY))
    @@ -1202,7 +1216,7 @@ public class GridController extends CPanel
     		int row = m_mTab.getCurrentRow();
     		int col = mTable.findColumn(e.getPropertyName());
     		//
    -		if (e.getNewValue() == null && e.getOldValue() != null 
    +		if (e.getNewValue() == null && e.getOldValue() != null
     			&& e.getOldValue().toString().length() > 0)		//	some editors return "" instead of null
     			mTable.setChanged (true);
     		else
    @@ -1215,12 +1229,12 @@ public class GridController extends CPanel
              	 */
     			Object newValue = e.getNewValue();
     			Integer newValues[] = null;
    -			
    +
     			if (newValue instanceof Integer[])
     			{
     				newValues = ((Integer[])newValue);
     				newValue = newValues[0];
    -				
    +
     				if (newValues.length > 1)
     				{
     					Integer valuesCopy[] = new Integer[newValues.length - 1];
    @@ -1237,9 +1251,9 @@ public class GridController extends CPanel
     				log.severe("Multiple values can only be processed for IDs (Integer)");
     				throw new PropertyVetoException("Multiple Selection values not available for this field", e);
     			}
    -			
    +
     			mTable.setValueAt (newValue, row, col);	//	-> dataStatusChanged -> dynamicDisplay
    -			
    +
     			//	Force Callout
     			if (e.getPropertyName().equals("S_ResourceAssignment_ID"))
     			{
    @@ -1247,7 +1261,7 @@ public class GridController extends CPanel
     				if (mField != null && mField.getCallout().length() > 0)
     					m_mTab.processFieldChange(mField);     //  Dependencies & Callout
     			}
    -			
    +
     			if (newValues != null && newValues.length > 0)
     			{
     				// Save data, since record need to be used for generating clones.
    @@ -1255,10 +1269,10 @@ public class GridController extends CPanel
     				{
     					throw new PropertyVetoException("SaveError", e);
     				}
    -				
    +
     				// Retrieve the current record ID
     				int recordId = m_mTab.getKeyID(m_mTab.getCurrentRow());
    -				
    +
     				Trx trx = Trx.get(Trx.createTrxName(), true);
     				trx.start();
     				try
    @@ -1283,7 +1297,7 @@ public class GridController extends CPanel
     	//	log.config( "GridController.vetoableChange (" + m_mTab.toString() + ") - fini", e.getPropertyName() + "=" + e.getNewValue());
     	}   //  vetoableChange
     
    -	
    +
     	/**************************************************************************
     	 *  Get Model Tab
     	 *  @return Model Tab
    @@ -1301,7 +1315,7 @@ public class GridController extends CPanel
     	{
     		return m_mTab.getDisplayLogic();
     	}	//	getDisplayLogic
    -	
    +
     	/**
     	 *  Get VTable
     	 *  @return VTable
    @@ -1311,7 +1325,7 @@ public class GridController extends CPanel
     		return vTable;
     	}   //  getTable
     
    -	
    +
     	/**
     	 * 	Set Window level Mnemonics
     	 *	@param set true if set otherwise unregiser
    @@ -1321,7 +1335,7 @@ public class GridController extends CPanel
     		if (vPanel != null)
     			vPanel.setMnemonics(set);
     	}	//	setMnemonics
    -	
    +
     	/**
     	 *  Stop Table & SR Editors and move focus to graphPanel
     	 *  @param saveValue save value
    @@ -1406,13 +1420,13 @@ public class GridController extends CPanel
     	{
     		return m_mTab != null ? m_mTab.isCurrent() : false;
     	}
    -	
    +
          //FR [ 1757088 ]
     	public VPanel getvPanel()
     	{
     		return vPanel;
     	}
    -	
    +
     	//BEGIN - [FR 1953734]
     	GridController m_Parent;
     	public void setGCParent(GridController gc){
    @@ -1427,19 +1441,19 @@ public class GridController extends CPanel
     		includedTab.m_mTab.setCurrentRow(m_CurrentRowBeforeSave);
     	}
     	//END - [FR 1953734]
    -	
    +
     	/**
     	 * Accept pending editor changes.
     	 */
    -	public void acceptEditorChanges() 
    +	public void acceptEditorChanges()
     	{
     		if (isSingleRow())
     		{
     			Component c = KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner();
     			if (c != null && this.isAncestorOf(c))
    -			{				
    +			{
     				Component t = c;
    -				while (t != null && t != this) 
    +				while (t != null && t != this)
     				{
     					if (t instanceof VManagedEditor)
     					{
    diff --git a/client/src/org/compiere/grid/GridSynchronizer.java b/client/src/org/compiere/grid/GridSynchronizer.java
    index 6b50b15f44..45d9a422f1 100644
    --- a/client/src/org/compiere/grid/GridSynchronizer.java
    +++ b/client/src/org/compiere/grid/GridSynchronizer.java
    @@ -22,19 +22,19 @@ import org.compiere.model.StateChangeEvent;
     import org.compiere.model.StateChangeListener;
     
     /**
    - * 
    + *
      * @author Low Heng Sin
      *
      */
     public class GridSynchronizer implements PropertyChangeListener, StateChangeListener {
    -	
    +
     	private GridController parent;
     	private GridController child;
     	private GridWindow window;
     
     	/**
    -	 * 
    -	 * @param window 
    +	 *
    +	 * @param window
     	 * @param parent
     	 * @param child
     	 */
    @@ -42,7 +42,7 @@ public class GridSynchronizer implements PropertyChangeListener, StateChangeList
     		this.window = window;
     		this.parent = parent;
     		this.child = child;
    -	
    +
     		parent.getMTab().addPropertyChangeListener(this);
     		parent.getMTab().addStateChangeListener(this);
     	}
    @@ -51,7 +51,7 @@ public class GridSynchronizer implements PropertyChangeListener, StateChangeList
     	 * @param evt
     	 */
     	public void propertyChange(PropertyChangeEvent evt) {
    -		MRole role = MRole.getDefault(); 
    +		MRole role = MRole.getDefault();
     		child.query (false, 0, role.getMaxQueryRecords());
     	}
     
    @@ -59,7 +59,7 @@ public class GridSynchronizer implements PropertyChangeListener, StateChangeList
     	 * @param event
     	 */
     	public void stateChange(StateChangeEvent event) {
    -		MRole role = MRole.getDefault(); 
    +		MRole role = MRole.getDefault();
     		child.query (false, 0, role.getMaxQueryRecords());
     	}
     
    @@ -68,9 +68,12 @@ public class GridSynchronizer implements PropertyChangeListener, StateChangeList
     	 */
     	public void activateChild() {
     		window.initTab(window.getTabIndex(child.getMTab()));
    -		child.activate();		
    -		MRole role = MRole.getDefault(); 
    +		child.activate();
    +		MRole role = MRole.getDefault();
     		child.query (false, 0, role.getMaxQueryRecords());
     	}
     
    +	public GridController getChild() {
    +		return child;
    +	}
     }
    diff --git a/client/src/org/compiere/grid/ed/Calculator.java b/client/src/org/compiere/grid/ed/Calculator.java
    index ac809b62e6..4b880bdee3 100644
    --- a/client/src/org/compiere/grid/ed/Calculator.java
    +++ b/client/src/org/compiere/grid/ed/Calculator.java
    @@ -301,7 +301,7 @@ public final class Calculator extends CDialog
     		m_decimal = m_format.getDecimalFormatSymbols().getDecimalSeparator();
     
     		//	display start number
    -		if (m_number.doubleValue() > 0.00 )
    +		if (m_number.doubleValue() != 0.00 )
     		{
     			m_display = m_format.format(m_number);
     			display.setText(m_display);
    diff --git a/client/src/org/compiere/grid/ed/Calendar.java b/client/src/org/compiere/grid/ed/Calendar.java
    index 9089f3d915..11714bc200 100644
    --- a/client/src/org/compiere/grid/ed/Calendar.java
    +++ b/client/src/org/compiere/grid/ed/Calendar.java
    @@ -161,6 +161,7 @@ public class Calendar extends CDialog
     	private JLabel lTZ = new JLabel();
     	private CButton bOK = new CButton();
     	private GridBagLayout timeLayout = new GridBagLayout();
    +	private boolean userTime = true;
     
     	/**
     	 *	Static init
    @@ -234,6 +235,9 @@ public class Calendar extends CDialog
     		bOK.setIcon(Env.getImageIcon("Ok16.gif"));
     		bOK.setMargin(new Insets(0,1,0,1));
     		bOK.addActionListener(this);
    +		
    +		AutoCompletion.enable(fHour);
    +		
     	}	//	jbInit
     
     	/**
    @@ -310,7 +314,7 @@ public class Calendar extends CDialog
     		//	Days
     		m_days = new CButton[6*7];
     		m_currentDay = m_calendar.get(java.util.Calendar.DATE);
    -		for (int i = 0; i < 6; i++)		//	six weeks a month maximun
    +		for (int i = 0; i < 6; i++)		//	six weeks a month maximum
     			for (int j = 0; j < 7; j++)	//	seven days
     			{
     				int index = i*7 + j;
    @@ -339,11 +343,12 @@ public class Calendar extends CDialog
     		//	update UI from m_current...
     		m_setting = false;
     		setCalendar();
    +		userTime = false;
     	}	//	loadData
     
     	/**
     	 *	Create Week Day Label
    -	 *  @param title Weedkay Title
    +	 *  @param title Weekday Title
     	 *  @return week day
     	 */
     	private JLabel createWeekday (String title)
    @@ -410,7 +415,7 @@ public class Calendar extends CDialog
     
     
     	/**************************************************************************
    -	 *	Set Calandar from m_current variables and update UI
    +	 *	Set Calendar from m_current variables and update UI
     	 */
     	private void setCalendar()
     	{
    @@ -465,6 +470,12 @@ public class Calendar extends CDialog
     			}
     		}
     
    +		if ( !userTime )
    +		{
    +			m_current24Hour = 0;
    +			m_currentMinute = 0;
    +		}
    +		
     		//	Set Hour
     		boolean pm = m_current24Hour > 11;
     		int index = m_current24Hour;
    @@ -474,7 +485,7 @@ public class Calendar extends CDialog
     			index = 0;
     		fHour.setSelectedIndex(index);
     		//	Set Minute
    -		int m = m_calendar.get(java.util.Calendar.MINUTE);
    +		int m = m_currentMinute;
     		fMinute.setValue(new Integer(m));
     		//	Set PM
     		cbPM.setSelected(pm);
    @@ -495,6 +506,9 @@ public class Calendar extends CDialog
     	{
     		//	Hour
     		int h = fHour.getSelectedIndex();
    +		if ( h != m_current24Hour )
    +			userTime = true;
    +		
     		m_current24Hour = h;
     		if (m_hasAM_PM && cbPM.isSelected())
     			m_current24Hour += 12;
    @@ -503,6 +517,9 @@ public class Calendar extends CDialog
     
     		//	Minute
     		Integer ii = (Integer)fMinute.getValue();
    +		if ( m_currentMinute != ii.intValue() )
    +			userTime = true;
    +		
     		m_currentMinute = ii.intValue();
     		if (m_currentMinute < 0 || m_currentMinute > 59)
     			m_currentMinute = 0;
    @@ -540,7 +557,7 @@ public class Calendar extends CDialog
     	}	//	isCancel
     	
     	/**************************************************************************
    -	 *	Action Listener for Month/Year combo & dat buttons.
    +	 *	Action Listener for Month/Year combo & date buttons.
     	 *	- Double clicking on a date closes it
     	 *  - set m_current...
     	 *  @param e Event
    @@ -587,6 +604,8 @@ public class Calendar extends CDialog
     				m_currentDay = m_calendar.get(java.util.Calendar.DATE);
     				m_currentMonth = m_calendar.get(java.util.Calendar.MONTH) + 1;
     				m_currentYear = m_calendar.get(java.util.Calendar.YEAR);
    +				m_current24Hour = m_calendar.get(java.util.Calendar.HOUR_OF_DAY);
    +				m_currentMinute = m_calendar.get(java.util.Calendar.MINUTE);
     			}
     			//	Cancel
     			else if (text.equals("x"))
    @@ -756,7 +775,7 @@ public class Calendar extends CDialog
     			return;
     		}
     
    -		//	Modified Hour/Miinute
    +		//	Modified Hour/Minute
     		setTime();
     		m_lastDay = -1;
     	}	//	keyReleased
    @@ -783,7 +802,7 @@ public class Calendar extends CDialog
     /**
      *	Minute Spinner Model.
      *  Based on Number Model - uses snap size to determine next value.
    - *  Allows to manually set any ninute, but return even snap value
    + *  Allows to manually set any minute, but return even snap value
      *  when spinner buttons are used.
      *
      * 	@author 	Jorg Janke
    diff --git a/client/src/org/compiere/grid/ed/MDocNumber.java b/client/src/org/compiere/grid/ed/MDocNumber.java
    index c418ff87c8..3129f92b82 100644
    --- a/client/src/org/compiere/grid/ed/MDocNumber.java
    +++ b/client/src/org/compiere/grid/ed/MDocNumber.java
    @@ -18,6 +18,7 @@ package org.compiere.grid.ed;
     
     import java.text.DecimalFormat;
     import java.text.DecimalFormatSymbols;
    +import java.text.ParseException;
     
     import javax.swing.text.AttributeSet;
     import javax.swing.text.BadLocationException;
    @@ -151,31 +152,6 @@ public final class MDocNumber extends PlainDocument
     			return;
     		}
     
    -		//	Plus - remove minus sign
    -		if (c == '+')
    -		{
    -		//	ADebug.trace(ADebug.l6_Database, "Plus=" + c);
    -			//	only positive numbers
    -			if (m_displayType == DisplayType.Integer)
    -				return;
    -			if (content.length() > 0 && content.charAt(0) == '-')
    -				super.remove(0, 1);
    -		}
    -
    -		//	Toggle Minus - put minus on start of string
    -		else if (c == '-' || c == m_minusSign)
    -		{
    -		//	ADebug.trace(ADebug.l6_Database, "Minus=" + c);
    -			//	no minus possible
    -			if (m_displayType == DisplayType.Integer)
    -				return;
    -			//	remove or add
    -			if (content.length() > 0 && content.charAt(0) == '-')
    -				super.remove(0, 1);
    -			else
    -				super.insertString(0, "-", attr);
    -		}
    -
     		//	Decimal - remove other decimals
     		//	Thousand - treat as Decimal
     		else if (c == m_decimalSeparator || c == m_groupingSeparator || c == '.' || c == ',')
    @@ -215,13 +191,30 @@ public final class MDocNumber extends PlainDocument
     		}	//	decimal or thousand
     
     		//	something else
    -		else if (VNumber.AUTO_POPUP)
    +		else if (VNumber.AUTO_POPUP || "=+-/*".indexOf(c) > -1)
     		{
    -			log.fine("Input=" + c + " (" + (int)c + ")");
    -			String result = VNumber.startCalculator(m_tc, getText(),
    -				m_format, m_displayType, m_title);
    -			super.remove(0, content.length());
    -			super.insertString(0, result, attr);
    +			
    +			//	Minus - put minus on start of string
    +			if ( c == m_minusSign && offset == 0 )
    +			{
    +				//	no minus possible
    +				if (m_displayType == DisplayType.Integer)
    +					return;
    +				//	add at start of string
    +				else
    +					super.insertString(0, "-", attr);
    +			}
    +			else
    +			{
    +				log.fine("Input=" + c + " (" + (int)c + ")");
    +			
    +				String result = VNumber.startCalculator(m_tc, getText(),
    +						m_format, m_displayType, m_title, c);
    +				super.remove(0, content.length());
    +				
    +				// insertString(0, result, attr);
    +				m_tc.setText(result);
    +			}
     		}
     		else
     			ADialog.beep();
    diff --git a/client/src/org/compiere/grid/ed/VNumber.java b/client/src/org/compiere/grid/ed/VNumber.java
    index da95b45e3b..c166e4d279 100644
    --- a/client/src/org/compiere/grid/ed/VNumber.java
    +++ b/client/src/org/compiere/grid/ed/VNumber.java
    @@ -558,10 +558,10 @@ public final class VNumber extends JComponent
     			return;
     		}
     
    -		if (e.getSource() == m_button)
    +		if (e.getSource() == m_button )
     		{
     			m_button.setEnabled(false);
    -			String str = startCalculator(this, m_text.getText(), m_format, m_displayType, m_title);
    +			String str = startCalculator(this, m_text.getText(), m_format, m_displayType, m_title, ' ');
     			m_text.setText(str);
     			m_button.setEnabled(true);
     			try
    @@ -594,6 +594,7 @@ public final class VNumber extends JComponent
     		//  ESC
     		if (e.getKeyCode() == KeyEvent.VK_ESCAPE)
     			m_text.setText(m_initialText);
    +		
     		m_modified = true;
     		m_setting = true;
     		try
    @@ -693,9 +694,26 @@ public final class VNumber extends JComponent
     	 *  @param displayType display type
     	 *  @param title title
     	 *  @return value
    +	 * @deprecated Use {@link #startCalculator(Container,String,DecimalFormat,int,String,char)} instead
     	 */
     	public static String startCalculator(Container jc, String value,
     		DecimalFormat format, int displayType, String title)
    +	{
    +		return startCalculator(jc, value, format, displayType, title, ' ');
    +	}	//	startCalculator
    +
    +	/**
    +	 *	Invalid Entry - Start Calculator
    +	 *  @param jc parent
    +	 * @param value value
    +	 * @param format format
    +	 * @param displayType display type
    +	 * @param title title
    +	 * @param operator optional math operator +-/*
    +	 *  @return value
    +	 */
    +	public static String startCalculator(Container jc, String value,
    +		DecimalFormat format, int displayType, String title, char operator)
     	{
     		log.config("Value=" + value);
     		BigDecimal startValue = new BigDecimal(0.0);
    @@ -711,12 +729,14 @@ public final class VNumber extends JComponent
     		{
     			log.info("InvalidEntry - " + pe.getMessage());
     		}
    -
    +		
     		//	Find frame
     		Frame frame = Env.getFrame(jc);
     		//	Actual Call
     		Calculator calc = new Calculator(frame, title,
     			displayType, format, startValue);
    +		if ( "*+-/".indexOf(operator) > -1 )
    +			calc.handleInput(operator);
     		AEnv.showCenterWindow(frame, calc);
     		BigDecimal result = calc.getNumber();
     		log.config( "Result=" + result);
    diff --git a/client/src/org/compiere/print/ReportCtl.java b/client/src/org/compiere/print/ReportCtl.java
    index 7fa8b8dae5..28fa54a76a 100644
    --- a/client/src/org/compiere/print/ReportCtl.java
    +++ b/client/src/org/compiere/print/ReportCtl.java
    @@ -29,6 +29,7 @@ import org.compiere.model.MQuery;
     import org.compiere.model.MTable;
     import org.compiere.model.PrintInfo;
     import org.compiere.process.ProcessInfo;
    +import org.compiere.process.ProcessInfoParameter;
     import org.compiere.util.ASyncProcess;
     import org.compiere.util.CLogger;
     import org.compiere.util.Env;
    @@ -266,7 +267,9 @@ public class ReportCtl
     			{
     				try 
     				{
    -					ClassLoader loader = ReportCtl.class.getClassLoader();
    +					ClassLoader loader = Thread.currentThread().getContextClassLoader();
    +					if (loader == null)
    +						loader = ReportCtl.class.getClassLoader();
     					Class clazz = loader.loadClass("org.adempiere.webui.window.FDialog");
     					Method m = clazz.getMethod("error", Integer.TYPE, String.class);
     					m.invoke(null, 0, "NoDocPrintFormat");
    @@ -280,11 +283,18 @@ public class ReportCtl
     		
     		if(re.getPrintFormat() != null)
     		{
    -			if(re.getPrintFormat().getJasperProcess_ID() > 0)	
    +			MPrintFormat format = re.getPrintFormat();
    +			if(format.getJasperProcess_ID() > 0)	
     			{
    -				ProcessInfo pi = new ProcessInfo ("", re.getPrintFormat().getJasperProcess_ID());
    +				PrintInfo info = re.getPrintInfo();
    +				ProcessInfo pi = new ProcessInfo ("", format.getJasperProcess_ID());
     				pi.setPrintPreview( !IsDirectPrint );
     				pi.setRecord_ID ( Record_ID );
    +				if (info.isDocument()) {
    +					ProcessInfoParameter pip = new ProcessInfoParameter("CURRENT_LANG", format.getLanguage(), null, null, null);
    +					pi.setParameter(new ProcessInfoParameter[]{pip});
    +				}
    +				
     				//	Execute Process
     				if (Ini.isClient())
     				{
    diff --git a/data/de_DE/AD_Element_Trl_de_DE.xml b/data/de_DE/AD_Element_Trl_de_DE.xml
    index 8a11a986eb..0edd21e1be 100644
    --- a/data/de_DE/AD_Element_Trl_de_DE.xml
    +++ b/data/de_DE/AD_Element_Trl_de_DE.xml
    @@ -4135,10 +4135,10 @@ Die Sequenz, die für die Generierung dieser Hilfsnummer genutzt wird, ist im Fe
       
      
      
    -  Own Bank
    -  Own Bank
    -  Bank for this Organization
    -  The Own Bank field indicates if this bank is for this Organization as opposed to a Bank for a Business Partner.
    +  Hausbank
    +  Hausbank
    +  Die Hausbank für die aktuelle Organisation
    +  Das Feld Hausbank gibt an, ob es sich bei dieser Bank um die Hausbank der aktuellen Oranization handelt.
       
       
       
    diff --git a/data/de_DE/AD_Tab_Trl_de_DE.xml b/data/de_DE/AD_Tab_Trl_de_DE.xml
    index c6796a25d9..51fb8980f3 100644
    --- a/data/de_DE/AD_Tab_Trl_de_DE.xml
    +++ b/data/de_DE/AD_Tab_Trl_de_DE.xml
    @@ -533,7 +533,7 @@ Postings are generated for an accounting schema, if the schema is valid and you
      
       Buchführung
       
    -  Buchführungsparamter definieren
    +  Buchführungsparameter definieren
       The Accounting Tab defines the defaults to use when generating accounting transactions for orders and invoices which contain this product.
      
      
    @@ -1099,7 +1099,7 @@ Printing:
      
       Buchführung
       
    -  Buchführungsparamter definieren
    +  Buchführungsparameter definieren
       The Accounting Tab defines the default accounts for any business partner that references this group.  These default values can be modified for each business partner if required.
      
      
    @@ -1236,9 +1236,9 @@ Note that printed payments are archived in Payment Selection (Prepared Payment).
       The Request Processor Tab allows you to define processes that you want to occur and the frequency and timing of these processes. If no other user is found, the items are assigned to the supervisor. A Request Processor can be just for a specific Request Type or for all.
      
      
    -  EMail-Vorlage
    +  E-Mail-Vorlage
       
    -  Verwalten von EMail-Vorlagen
    +  Verwalten von E-Mail-Vorlagen
       A mail template can contain variables, e.g. @Name@.  
     The variables are replaced based on the context. First, the the User is searched to find the variables.
     Additional objects are used for dunning (business partner, dunning entry), asset delivery (asset) and invoice print (business partner, invoice)
    @@ -1650,7 +1650,7 @@ Please note that the Business Partner <b>must</b> be an Employee wit
      
       Buchführung
       
    -  Buchführungsparamter definieren
    +  Buchführungsparameter definieren
       The Accounting Tab defines the defaults to use when generating accounting transactions for orders and invoices which contain this Expense Type. Not all accounts apply.
      
      
    @@ -1668,7 +1668,7 @@ Please note that the Business Partner <b>must</b> be an Employee wit
      
       Buchführung
       
    -  Buchführungsparamter definieren
    +  Buchführungsparameter definieren
       The Accounting Tab defines the defaults to use when generating accounting transactions for orders and invoices which contain this resource.  Not all accounts apply to resources.
      
      
    diff --git a/data/de_DE/AD_Window_Trl_de_DE.xml b/data/de_DE/AD_Window_Trl_de_DE.xml
    index 4b2854208a..2f25dded5a 100644
    --- a/data/de_DE/AD_Window_Trl_de_DE.xml
    +++ b/data/de_DE/AD_Window_Trl_de_DE.xml
    @@ -201,7 +201,7 @@
      
       Produkt-Kategorie
       Verwalten von Produkt-Kategorien
    -  Eine Produktkategorie definiert eine Gruppe von bestimmten Produkten. Diese Gruppen können zur Erzeugung von Preislisten, Definition von Margen und zur einfachen Zuordnung verschiedener Buchhaltungsparamter zu Produkten verwendet werden.
    +  Eine Produktkategorie definiert eine Gruppe von bestimmten Produkten. Diese Gruppen können zur Erzeugung von Preislisten, Definition von Margen und zur einfachen Zuordnung verschiedener Buchhaltungsparameter zu Produkten verwendet werden.
      
      
       Preisliste
    @@ -427,9 +427,9 @@
       Das Fenster "Anfrage-Prozessor" ermöglicht, verschiedene Arten der Verarbeitung mit Häufigkeit zu definieren. Eine Verarbeitung kann nur eine bestimmte Art von Anfragen betreffen oder alle.
      
      
    -  EMail-Vorlage
    -  Verwalten von EMail-Vorlagen
    -   Also wird @Name@ primär durch den Namen des Nutzer/Kontakt ersetzt wenn einer definiert ist, dann durch den Namen des Geschäftspartners wenn der definiert ist und dann durch den Namen eines der oben angegebenen Objekte.
    In mehrsprachigen Systemen wird die Übersetzung der Vorlage basierend auf der Auswahl der Sprache für den Geschäftspartner verwendet.]]>
    + E-Mail-Vorlage + Verwalten von E-Mail-Vorlagen + Also wird @Name@ primär durch den Namen des Nutzer/Kontakt ersetzt wenn einer definiert ist, dann durch den Namen des Geschäftspartners wenn der definiert ist und dann durch den Namen eines der oben angegebenen Objekte.
    In mehrsprachigen Systemen wird die Übersetzung der Vorlage basierend auf der Auswahl der Sprache für den Geschäftspartner verwendet.]]>
    Zuordnung aufheben diff --git a/data/import/AccountingUS.csv b/data/import/AccountingUS.csv index 17600c17f7..6bdd26caab 100644 --- a/data/import/AccountingUS.csv +++ b/data/import/AccountingUS.csv @@ -193,6 +193,7 @@ 58500,"Method Change Variance","Account for Method Change Variance","Expense",,"Yes","No","P_METHODCHANGEVARIANCE_ACCT",58,,,,,,,,,, 58600,"Rate Variance","Account for Rate Variance","Expense",,"Yes","No","P_RATEVARIANCE_ACCT",58,,,,,,,,,, 58700,"Mix Variance","Account for Mix Variance","Expense",,"Yes","No","P_MIXVARIANCE_ACCT",58,,,,,,,,,, +58800,"Average Cost Variance","Account for Average Cost Variance","Expense",,"Yes","No","P_AVERAGECOSTVARIANCE_ACCT",58,,,,,,,,,, 59,"CoGs Discounts",,"Expense",,,"Yes",,5,,,,,59,"CoGS Discounts",2,,, 59100,"Trade discounts received","Received Trade Discounts (corrects Product expense)","Expense",,"Yes","No","P_TRADEDISCOUNTREC_ACCT",59,,,,,,,,,, 59200,"Payment discount revenue","Granted early payment discount from vendors","Expense",,"Yes","No","PAYDISCOUNT_REV_ACCT",59,,,,,,,,,, diff --git a/data/import/AccountingUS.xls b/data/import/AccountingUS.xls index 2274c82d054f22468989cd9ff00a8b5dc80ae1d5..e16e23a442944524c859e642bc4fc29731b017db 100644 GIT binary patch delta 14370 zcmbVTd3@AGvhSW;f}BBuoWtsKb-ksP zpR4Px;<4{NcU8cZ6%hrw0&)cb@+GETQH;H~V(_Hkg3mZ(gSm}y_E%XP{WDC~@2&g$wJbEZEydHSTgOP^wa>}GbecqH-Gi1oY^ zTMu?dKh2rgl2{cK8_d}3RXIsXskX$#RU-!F@ey&1IqN3Wj-NCkb?A)Q52lulubn)8 zdi8`fkW1Lqi8E?bud0*4*vJZJ*{~Al@L@xXOGmG&9sIZWVLc(DzFpBT#)kD^EWI;h zWqFL{B{Md02xF&L|MP2%;nv3#?Lz9*J%5u@PyR+87_yLfGFH}U4$D6w_zXmNIJ6yJl|s|r7v zYI8f-hGhY)gN3or0oTqd0bI6h&>F8>0j!Xv=~fV%z|cLZ84P{kziNfRxGKy|HJn;{M_VVfZuFJYS*5;jHo zx0wh-in!Yr%(lS5c|^e$hCw}`;I}~Fm29dSw1t9#nWZ!_rfI5gD@a{BJ6n-+HeI1? zH7MUol;5K$-^wCAoUda^Y^(TmeRp>~fwd_^^#nFUfz=ye^+x{cjr`R^jM62{U%g-c z>M2yO6%2JISXtMT)G>j+Iok&AIM~2Wz8lL#~kw%r$*hd;}5x>QYv7a>NuaH*ulg1J;7c@K=2S{VN(l|gGe-!(C zFuo#>$bhTbu#e%OA+Ghe-CQ_^*1e{lkR5 zL1`Q&jX#NZK*PiS5z;vLZ;5e)G#(S7+luWyKa{d>NcOmxw9SkAEsZKs8sCz}pT(wa z&QQd~vi_ZDg(7|w3$+-qy*HKZ<5bN51g$RjMDb>7?cctTTCLQo`$G1eqt@mx3aPIh zTl^wz4wvY?gZd}#$gxjZExr7Xe0V~FtGkw&ahBN}PM(_-3A;9kkTC)qP%`%b4DF>oauqfzbuk-i)wjb{N7@sB}ak$Vq^ zig=7lsg!%ls6@b>rcLA7nKz2#Aa$`{;2p;u2lR6G9HP6a>AUY7H|o}Lqi!8H>eg|; zx^Z$0rA;J#L9y0ku-2qmYtow!y46J64Z4i2X83fmcI9L<@${m?Yc|Sz zvxg=(QQBxBBtkO1yi`An$+IW^h}5O}C;{AM)O6@QzCicyIe!M&Cx!zb;<=(rJJAkd*yQ zvgP8`m&jAh5h*=O(l?Zevj$IRHBV;^p3V|a=rZzjj(D;ugmZvb&fe55-(`Hxa5ubACLXBc8lwkSDJhlSi?eaK0N!3i!3m|qQ@ z0x2(-Df$&+($`LVRhX1rA=yf?`s-3Lx+#j=1aFGv0b*2BtQd0eO_D{DtTV|{4&6_( zIFfZG*}6l$NtQseM3SW+?nbf{l!;+p`qg6Z5l3_# zJE5e3B>j)b_{M3EiIPCr2H8L*3ntkb@j1wPCP=*yl6@>wg^_HX2>8yKy-mr&N%pDYGu+5eIOa!Ge}^@vP3cFF{%1-*LhB;r)zbr;l7QJRL ziyOcwUTsFgT@&;25uJlgDoaw^nL_(qx!75U25aZJqdE5F*;36;Y8%ClqfUEnFDZ*6 z*(Q3VjPLW=0#la`sj8Ws_0HvILpsh?PT0F6ajv;Fa@Ck)TAtV6a7`8{Zd|6BIuqNwS0@9{;-vooT1V7di zh&8VnWDU(AYYBd=B|;Ar?cp-WL<+J&IhDxWo(YEgX`+rY(TFmUqC|rjWfB247D>P) z0^F+rlW6*Wsaqa&oNr0S^i7f$+^X^>ah$*VvgSo@t3(oEX3NQr#y%j6PlP9WJDMp%7j5MYAr74BdB+Z}|Ow(6j z1=Ez`NmGixN!cB`pct3QD7#aXUyDsYI%rc)qm4QpH)@_i8}!JgLhKQ*HFXn#a17{4 zoA}`-xv}SveqWLmHcMF^jeAbD@~QP*vpgIWU@OQ0K17RICt_h)JX|h4NhMDXDtb~4 zzEd^dsRrMv#5abH6DAElT`XN8q!HbRbjz3SG!NZ!S)>_!rx|>w`SG1be0$9x-)IK; zPV?}s=|(-MlM`i-=@g{LsdVqMz=@k~#FkF6;c$#C13q2s26#u!42tcrZu!QR;fYOY z`mXp4BeV=2TJoEl-x(B}*9^vX1k7M;8Gf<#fF1|St&_3!pxC|0&(Pks=GP7kxUJuYRvNcN-XduEvZ;U}c5H_4jBBWH%fA}(1frF}@+ ztUT|dvxo%rAkr0fqQJ0-@p;*4*5T}pFFdRm#!)m&kgbM=hRHF(N}kQ~Ge@{|W-U7#xi$OF7` zc1E{+XM7&=gfz(+pJ(utXYiEg$5S5h?%DHfc=tFzqoQhzY%w=4a@S|69lV1x6)#5snK0T;lhiw#uc3IL^?UDPdK&I>%8 z)3Pf-%Dq=-1qSB@ew-H&=Uy|&Ihw(_Sl~Ao@tgt0X`>9yL7`nzPC2N^c2H|V7;_kr zI*i)t&~YOR4yvt}VIaosAQsRe*}}9JsI)sM?N^`=f0HSsLsIIm3+bR$M8~4fe(g<% zsu3dke5{B%-&4e#j}arzca05#V=CUuhZlr}<4b77TA#s8aLSSfxnglFDg?h0SY639GLL+1+;ni-Dcuv9t zY7uV=a}vom1@F}GXv}GF?9?V?A0E>KU>q8B8U}}uL0i2vID`xait+7GZ?{R=P?80S z6(CFhLdtF>S+L+2o%WSGq-+?;Lc}PL4cR4Sw~?%qc>N;Qq=wy6I-I1TDvseg4y0+g zrfIm20lgk>cwGcuyJ(eQd_{m)&cYO45wKLw!gWin7B^LkB4fD}feG&wToIV?-jOQu zTP;PjT5xGfqqthoD6Wi=mO1jHb#7J%oKX4Osbu9B?-c=w-bT$Zv7q zO`#^JVRzH8-pWoH4I9!Vhn3N=J}S&ITEd<=Rz_i>r)4@s464i<6trA`=VHs?nJd(E z0Um5zISSBaWZY#eT9-~Zg1RW-$P}j2<+o^ElzgulOg>tX+DNO<^DAMjoT6-RwoU}` z={(&U6U=AuJFI&6aMzxYv5%$LZ&I#~rG($CTfPY&Yb1QEW&wc<1mb|#0|QM zt$WFfwv*D{y=3ne%L?J}yWVLjypM!~tRF)-me!aSDIP~+&%zmJ3NXMww?{= z@$Lqjyg;j@yc8%ND{0O+bPMMUvWkpX8gr&nXG-?rMqUWxFmIKVH>6Xxa5CQkkx5Oe z5lKpQJSf3cX`pmwJUQdELLy*7wFOCG6$yt}t_UauNH*L|3Xxsa)HPJOTTPQH4K%R2 zSL;bttzAWTstxC=DZ6(m=c=i&ARcPg0FsOSpb9|^*n&cEt1?z&%(xn(5Y&J{@9teg z6AszH=~Uxa2x@5ZdClPDLn~6-ECiupYyvSb(E2EnC-U2@eUUt$54R#a^F(`9sH9~g z(NbjPcjm+R?bagfdqVY1qP{z4rC7Ior^{qxx=hwNz)3KfO3X+YhdfWFj35EnnnLmAM#xa6kiAjX0Xv5uOd_T5 z0TPxdvkw?)e*n!|`B5CNc1rAWz*HLGDHc=p0Q6<5_6)60HD(7sAL(Lu!8>YB1C(-B zs?1I^CcrdL$x)hctS+TH@K|!D(F`z4&NRxp7aFsU(3tgUM#(|9rV}Z(G1kOrK9Vo7 zR!8$*k+v=}x)~UqbtW1Ty1=?IhNsa%Y$gp^8YgvTf{ugTqkNx9c^j)+zImGo1j-9F zjCrPJN47%P5_T_)L#JjER~P~o-I)|nCAi;#PfTGwleGgE<17G`2eMfN==s%Y77e;j zIWmh5UgH#eEdaaNM0iKjwM2e}(yZ0wBYG{7FST&xRUkYPUwakeYssV+7Kuk#B)-;< z_}Ro_?o7$zY-E~MT93v;ecCWf3LhllcxxXB-6gZ7a1IHpl)G~bGUm|AKzHY8c9G9H z#3y=&Ev)wN^VC9#S4Vi&3a^gxSEE}Vs)_kJg7+|7r%j;2I$C%WV4yUCx0yUt)B!QK zv56WKiJ7D{=YlgX{Yda!aHgEyuQcaUE+#{Z+meFWT%C-$U|NH83c zRRGT+qdyN(SW^_zLqwBA3Wh$IGuG@lp6MQ<)aQ}<14@0KR!69LI#3L49&w4w23xo- zI@oOrWj>+cTEM;q6xw2VN0bE=+Eis>febATnmErE=+G7zp)H`$CNCr_-zX~!$;vc^ zw9xQ%q2cR7@)bQme-;r+qe59kDAN_nB8g({>I$`ghV>JCxPMTZi%D~)(p+rVTdeJ2 zjEiX!%mPicx7e`mChMmarkgNp6{g$3bW2S5GX;WiYnYSpK!%;!S}Ng>5TaP87W`v{ zNcbNSh{uB@H>-tgKfqd=zTA}@2B@G zyc_FgIpcY!N3+@L$+%$lo|9w zKqz}#!Y_#@__yNuh^xQ{TmyVE+!43~;wXTVTekH~0>1^^-;Y_#ErQ|0w=Hn*vj7d{LoAb%`D0hH5qwQH z0$El-5L*e)QsGn%x1LWS8}%u?_9`|)uEmD6qdN}^8Wj-BoRX_E-HEF%sr>I(vC-*T zY=j51%MeE{{9VThYh)Vb{HZkFb`|{4Yr(goGI(%s0X$@O53`<4;9afU3<|=P!JoK_ z5qKEv_b^z*CUuUtxi(ncHza z1(JRPfBq_lu*&?dN|KeyGlB}>x1y)5k(n|NnS6>HPNVR$L2bcT67<6!0Bxv+x{a*> zpLPJW(Y!|=796YvZ#xLu!9ML^XovW;L!d4Hv?~c6g8RuJfGP?v=|Cv7p-SpDJXFTQ zecJe)9JelJarn*OO3dc{2FnmQxR2kGp(au!_>TWKGEPH_(Y?4>l5qzXzT7i{GDw4I&^&P)ETo=htHTc zVLmij3j9X`anmS-|4U|m9M#q8lfzR(#?_DN`zbtd^vA${tC!^Pvz#xp=Jex_*sjZ1 R-QJJG?)Kd3dAa;C{{J7l;%Wc@ delta 13765 zcma)D3wV^p)t=d0NJzql1dt@;N|b;EFu{NbY!)vd`V;s~KtZlif?QW={jIlF z8Re_BwSVca)n9v&Sg}@Yx!*(q1r$*s227}Eh=3$=={fJre!Jt+OMSX=&YXGAd){-t z`R3dGy#LGS`hexk%G@ueEyMUg?I~} zrLa6M)LXIX^$oH2b;%e!j?of@zousHf;sojm~-cC;~x{zVxSnP7GzwnHfL1FB*h9b zufA`O9yy*3>Gh+B7R&nm!=6mb&!d=Eb>r1SjLa7zuagiJ#X=Nk3Ndzs5OFk7|4R7; zj||jD-TrvBik_4#H!1mCs@$xm+@9KXi--}O#W7|eg!GCyPqNsmX{h{amu# z0q>p4zb;jkuDcbsJv^#^W8ExIpj>=KE66h)(48oiCVXfaVtrC{1K zmgc(By5$~T7bnUEB|)B@XcR9di95s(#bnA#&nJn>uqd5Gm6$@fm4LCxP5J;YYwv~-hMfo*_m zHKDcvZkB=DX2ER(T(E-MTr{r2HdK%W;tFnysNgmv8;Zio&Za1D2jI@xhF5Jn0r|v` zmvz;)qiS;usqI8c*NOGqjyiEwwi6*;BPO&RMd5&Y#1TqNlG~x@T*6!KxvZnufne1p z*bW4nr{-?-6^;@`X2}jLnU5tM#ZIhv#H`qf6}9T)js8py!2#ca$BtKY0`I`%9yM~) z7;mew?Sk!I_53D(CP(2_?_yQ@@Aay8;jutPZ4TkS2agfP<2`uPsVU?U#MljwqCaSi z-SAkb{ftS+ zxbMSbi1BzI9!u00w zkL5~k3t=39$I3Mt;{ZGYs**f{7$3spP2=$)JnmQPwvF*N7~4m%J)knSkMaKEHH~x- zwiRj-*)|y4$FTiK9oQaS|*R{td@OV(E9b>#@#`Y;} z|D#UQs$g9|!>XBU^{UU{@sJv`(;v@y@uqzk+w>7^(|_OD7aRRi-r`mAJ9^ZNQPn$3 zF?W(jD|hLs)0i5&s}xi17`?WO_J6utoX4nTS3mDc6aFy5|3nqO%WXBC2=Enn7;W{i zX{#e3{H9rP1S=jY{MsQUKZG2Zq!bfTZb_L#cuJ%1orz(!hC zF3!*=M{OjJ3h_8a)uZqou+iGG8m%p>(b}>aBetwYY+0cwodUFHaTq4vhz)v#OM!1X zKczXo12od@G;{+xiWJwpsna=%bbe;Y9<{czqwZFA)Y{69Vk01} z06wAC?e=^3uG6+JV0%&}?eWpgx!sU#f=(+<=q77xZ?bf1vUF;)bZUywsR=rTqVU$P zj7&}X<~-S@z&bGn)~U(TsTpaN?a(PSBZa37*=9?pW>=?XOQ&Y-A4$ARZ<*r@@J z1Mq1zaj)N7yGz^t0oy9|64^ZOY1@~uIjW6pD|c(#3D|zFZhGJE9kEZ_zJl!;^$gke z?$@@jVf%$@exG%}V3KYjYlV2$q|##P-eT$AV(H#u>E05ddkb_AMPc248H}QJ|5b2E z7p9(M-CHc(PeP~Gk8}zrk-~Fk-APOLldkS3E!|H-cP7HRw`$#2e5?Um0r+cm^*+Bh z2%7{=~RSHr=U|P3hU%X(K@YmgR)LM z$vT~~bUKZ^RyOMtP9ufinsuiwold(towjs34V{<>>%<$2Pk8hGp#jeT@c-1F{eJJ7 zFSYGk*q&Fp2mIN4zt*<1u)SacpA809j~=+3w2U?OHu9sG$&;*Qo24aRqdrm8rc-K1N-vpp?ZK1;AMe^-E!!=^M}BW>g0@|R?N4gV!SU*~=49zn>zh*5mV<9#l!VdhkC$T96{8V{N-;{u=!HXl zG0MW|%%OB|SyzoLBtK`psv@jyzx1J%+a zQ@?kJvBki)RwaDq_x4HGezCB_80Xs*%ljH9Bgl@@5r{=*y3UPtGfBH z-@C)uI>PprdiJnCyVckdU|VNWP6(!~Vvg|Ml49(M-zW;#JW*FM{1GvUrbxyDEl(1t|J{&E3Q|Y4lH6(~S=CBHwKyPGi`&O1 zR`=F;oq)IA;B}HJt6{LW=t@25#pDJxt-!)pg5J}LACkymVSN5Q7!R!cz|{FR9w1shL~_#26>w2o6ru@Xxqt52*P zsN)xV2X|1L5<@V#$& zx}X6T5J$HvsNbM;qyUH$>YmgY6x4^-;gKdZ@N_hi#X7@F?$e>4rcWStp8j-BGwkX_iK5 zmPTooMrje(NE##xMPZ3J3QLq0d5y56Pn3<+RMSEAJwqzp(kR{4DBaR19TG7POOye; zhEWyP2=3hs$-TQ*s>8?9OZJY}*gb&#z5(lDaqZ!9 z?O}k_*e|-1`dP+3lNMKq58P3>`k9vcnU?yQmin0y>SsdzP!v{wA4OsHGb7b!N1te& zpfk!sM*9t^EGwfdH=`_98rC}t>N5_HvVpgvLgQrv?|{L}mTG!a3GT+Zd^eVP>ec2{ z*%SYskNfkvCVjUqz)Wx0s+#rvydOrJ%%~Wv2EsP7bGWQ$H=7_ z+6bp>{c@pSkW{W)4{pg^s|vZO0w=?%@!xWB1%0w-o(yoWedG?qbIY@G%d>LJvvSLe z$Sn`O77D|u9i%9nT3&c+0kG;xQ*@%P)4BCTZXX*`J>A^+?9$WiwVqa%J&`2`egO_jNtvu1!+h>vXyBvO>sB2HqA;s9PfbCQD=n38+`xuN~WUUaNxubB| zdRemdvSjOJ$<`}EwqB4e6oqBuD4bI-eTm*^?x4MJ6y!-h3ih&&f(2x)6MG-jX%!%a z!-i}D?$JlwQE;DQaSMq0GBiekwc`~)>dW~E%Ux4|Ew6zfm{$SiR0n0=rbBLlI&wa9 zMsJ$)iRy6^((aMS7_C*Frt2is9z`w z*N>xc+ZRS|vFu2{?mVrj_5;->L#m%E6IZ66+xGn|iTV*CAJSrp`UB77XuSTwYc_cO zrMlzfVDHMG>&XF_Jg$Cwk{+mjqit8g_7C;VN$&L`v#^M)72->G6s}c~rB#uoRgtAt zQG`}S&?*##wc;qORZ*l?#WY0+=I1rlVo*I{NEKUJ6}ws$TUr%ED-Ot74Fulm7c|~L z;C*HA21+&H8`A1kJ$W@Izg7#sVO>g$QwelwaYy00lvuiySh|#0x|BrdQUYB^e0`5moewTDA{CbZmhClC2sfZ?X> z!%_Bg#??oEeWGErCgTH{^JHUCUrG(H(`0RceV<>N4iMN^u9`7ZG#>-ULZ3HMc#X#Is#T@*@%jfD(R73BRj^ z-{7jkz}n99Sp&d#I%Bb2n)`IxAsV@wMP==(8~uSt=1kH(b^-? z+HTB%+}k6=k7Cer6p^bFt?z5%qd+{~kQ#+*b#zC;YVi$f6j9Vihf!ADMp<MI*_Q!ixWK?K2~qiAXj}(gR)Pa9xiF-={w~Zyt^=li0OA1#z2!SlgJoI zl1(EHFxK@N3$GmGH5OjEhWR)OUM@z^Cs%SDDw$_I$5E?MU1^SY<#AlQ?(S<03reh#f$v^RfNuef4+8#NB&wqIWKyU4n7|Frtys|8u)PfnMl|UKw_!maCp$)78<;>-NtG9jYW<>1@itofFMZ(l>I9HlOF zN8zO|w@O{^%FoG^WAE%o>zHskim@t@Ue@7Z1p?+BcdBFM968$A6D#M+TF2i(&aG_y zQq!0O8iP&XN!VDq$GGN`+?r2vgEHm;(wCVLq z_d?^>BdYjD>%0&zyQ}=RWLbl|?^GDi#LFl6#_gR=I9~j8LJ-pHJl|3FPmLne2^zzM zH!bF4Z7r{r_W&U;L3Z!#4f_^^Bi6xfAslMi!Sg+b#c)^xhYbmGu+u3~cC4(9)_PSz zFZxyug{!jezg2FVRJrP~09BS8Q=orqjK-S+JfBmaNNuvBgEm&fSn5P2(Is4s3jTl+ zC&c;si206-!_tM-NGj}KE zZgPsfG&kB=M01%3&D>p>yV*pz3lVN{UiHfHl|_j<>ltwQfpM8(waE;(O=ehaGQ(<< znMi6wlE#|}yfMy?k|q6=;nl{wVGM2?cL#$wCz9pmw7dL(5V&P#kz0irYq-p^+G3Wq zyUYR~{xySlmsxsunT6dY1jfZ@FfRVAh~0%RR(kkP(F|vU;W!g|Hk2xJN8!bvO`-(c zS376B!koXFGMG)pzh8`}gFjEu^$$(l zS}Utsx8-VGWm&FTNXhYdbPxZg&Fd#@3zkQx|_@nEJXgp>D0hL3z5~G252D!4FWB6 z+hn1e1G8QT*4%|Wx(|3G4BmafyUXC+=i+g!`xwP3?j|!Q-e}wx!M&W^8EP?dTuz_t zz8E>qFi?xF92dJeF1B)9taDrfPM?|}OAutH0a{{lT4H6k1eq}brn3|%4F+W?Q0_J; zOD&Y8E(#N0+5ttL<#9?clj(tD24EQgW*dNI7QiwKU>VlWAy1~U%p%3)=$&taxg3~t z4d!wSbGgQ(H}V0q+=cm4oTY<>r{yPcg09NA7WzYPlF*C%(R>DpYMB@3RCSjnX)ls( zbz(=%liq?-6R9$xWx6vUL*AUQpJEGfkznJTDd{rPD`-=R5ye7^B)Yvm=3JLXx1$ti zNt&$e@FF2cx4h^aNt3BD{~Dy1RL;Zc@>*K9IbGh8ZI*=*iTck(5@|Dtgy{~NX$f?fBe)76p{$-6eF#LMJz@;>%v$fzaqj>kLaBk}_UoPxI z|2knt&AoGLbH+}qowhh<^nxk$M`V$mwpsjl8Kv}BtbgJ}SEu&?nbRSwI#51;yHpQE j_g#Dc0C`Hvr=0~w@<*O|xog{tB<;~ptz9%wJ|zDM(J!Q| diff --git a/data/import/ExampleProductPlanning.csv b/data/import/ExampleProductPlanning.csv new file mode 100644 index 0000000000..aa85ca7ce2 --- /dev/null +++ b/data/import/ExampleProductPlanning.csv @@ -0,0 +1,2 @@ +"Organization","Org Key","Product Key","Product","Sales Representative","Resource Key","Resource","Warehouse Key","Warehouse","Planner","Product BOM Key","BOM & Formula","Workflow","Network distribution Key","Network Distribution","Is MPS","Create Plan","Promised Delivery Time","Time Fence","Transfert Time","Order Policy","Order Period","Order Qty","Order Pack Qty","Minimum Order Qty","Maximum Order Qty","Safety Stock Qty","Yield %","Business Partner Key","Business Partner","Forecast Key","Forecast","Period Key","Period","Date Promised","Quantity" +,"*","Back Support",,"Garden Admin","Planta 1",,"Furniture",,,,,"Business Partner Approval","PatioSet",,,,,,,,,,,,,,,"Chemical Product, inc",,,,ene 09,,, diff --git a/data/import/ExampleProductPlanning.xls b/data/import/ExampleProductPlanning.xls new file mode 100644 index 0000000000000000000000000000000000000000..15be5bba4d9322f13cdf9fd1154cb3c3e8f17e86 GIT binary patch literal 7680 zcmeHMTWnm#8J@GgWNjz$C2@cR!o(qtV>=;ExI+@(Lj;aDcB-gSq~>^c?3`rx9P8{^ zf)SS`fW!kxR3P;Q2@pZzCN4sP2dJ7zeJH3^t5%U{)rZixv{kiKttzA>+wYq>XT7$v z*siQr(9G&PGv7b=fByMr&e`Amy7|IuAFlsO%nSF5DsiP)Cu+;&7Sbyt-Xuf}Y09n? zi^WKcT;?SJ}y?*G+5BY-17 zGy^Tb8elEZ3akUJ1Fi>d0M-K=fE$6EfQ`V-fCM%HZNO&W7GMj|4r~QFfNel0&;@h@ z+kqXxt-wy82iOJd25tjx2krpw1nvUv2JQjw1?~g(0DA%Ipf`+}9zc2!7z$AW|NhF)K&O(^3qz#mE~AISeEGHt^6m=q&I*f5UVtHI`BZ}US*uFaM<+3^p<12ACo3>q7`IvpwUH|9^n?OCL+U2n4XL4y9O&;<5 zlap!h6b`lr>nEg)8@gtQ<*l zuAdVb&rMHzegL}P##CL|m&!OU3R9_pEqkDY;hgU}LC#mWqRbzb?3nDdh;}4n_PP9>)(z{B=-GC%k%nGOt&Mp&=p{ZJ&Bxi)t$OVmwuksW!K^wwF!5q zf%Z09NLC(Hr{tKIvEA-5H3d8M+uD0}wfD8+YK4o|0_76+l#=at{O#vs;IY z`?i*)JCJ^A`bTUvxqo9m!W7;LzWvmK=X~!@Nj0FsfX{AT33XC4hl_m0+|U!&ZU8&_lKwj9M^x zjbNOUVNFO=ABHu9@jh-?3mE;bVQav6M>lLO7&d9hTES?iCT|@WZ}5g)2L`_!vg^Tk zt2cQ!fbo8B*m^MD^bOkp#yh`ZH-ho@Z`e&>d=D^eBN*QZ47(YO?*@iRFj-=oz_7+) zUK?0jiERek95UKMqkfxUE4(!}>h}u6xVA8S-HL^EZPf1?CXcJxQOe`0Y%4LYN@t02 zMqOZ!V`EzwW2^XEHYWZm5|GCV_ag_}xIkN=#nG5xUxl4W!m`ZyDe4NwmRVpn#6-QW z$2zpSy|EVYF%3@i@(~8=uxf)gHVcYIDn5k+bc#KO0Um|#EM))p&WFoDL#XV08cNRR zrG~lAC(@^wv%Io=d7yk)jACu!kJMisU!%o|{~d9XzL)hT13C0?Ql;hHcWysyPpEWS z=|imFnVdAQ%%;wgpRi8T>5^-j3RmEtxH0DkTK$D*UitesqsN=x`EguyZT;x?^q%hm zkypJRX`a%FP<9M4&)aE$9`8|rXY8{8PuG_Ko~y3{?D67d^DT zov9bdcldi$=;JLhfSxn3nNf`4#A2$>DZ~CbANI{KC$j?C2l;_8 z&qBXxp(>PISX__(P0!}Ja19~)P>8obh8i(0a+rSxU%dG3{{a34nAB@RNq{e59we1R zN7z4o-D2n8kFtLZo2K>pz(PF!~O{{+A 0); + MAlert[] alerts = (MAlert[])alertpro.getAlerts(true); + assertTrue("There are alerts", alerts.length> 0); + assertTrue ("There are active recs", MAlertProcessor.getActive(getCtx()).length > 0); + } } diff --git a/extend/src/test/functional/MBPartnerTest.java b/extend/src/test/functional/MBPartnerTest.java index ace13320ff..b75c0b879c 100644 --- a/extend/src/test/functional/MBPartnerTest.java +++ b/extend/src/test/functional/MBPartnerTest.java @@ -8,6 +8,7 @@ import java.sql.SQLException; import org.compiere.model.MBPGroup; import org.compiere.model.MBPartner; import org.compiere.model.MLocation; +import org.compiere.model.MProductPrice; import org.compiere.util.DB; import org.compiere.util.Env; @@ -459,8 +460,7 @@ public class MBPartnerTest extends AdempiereTestCase { private MProcessPara = null; private MIssue = null; private MQuery = null; - */ - + public int getC_Region_ID(String Region) { String sql = "select c_region_id from c_region where name = ?"; PreparedStatement pstmt = null; @@ -550,6 +550,10 @@ public class MBPartnerTest extends AdempiereTestCase { fail(e.getLocalizedMessage()); } - } + } */ + public void testBPartner() { + MBPartner test = MBPartner.getBPartnerCashTrx(getCtx(), 11); + assertTrue("Confirming right BPartner record", test.getC_BPartner_ID() == 112); + } } diff --git a/extend/src/test/functional/MCostElementTest.java b/extend/src/test/functional/MCostElementTest.java new file mode 100644 index 0000000000..a71eb43da9 --- /dev/null +++ b/extend/src/test/functional/MCostElementTest.java @@ -0,0 +1,69 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 2008 SC ARHIPAC SERVICE SRL. All Rights Reserved. * + * This program is free software; you can redistribute it and/or modify it * + * under the terms version 2 of the GNU General Public License as published * + * by the Free Software Foundation. This program is distributed in the hope * + * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * + * See the GNU General Public License for more details. * + * You should have received a copy of the GNU General Public License along * + * with this program; if not, write to the Free Software Foundation, Inc., * + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * + *****************************************************************************/ +package test.functional; + +import java.util.Collection; + +import org.compiere.model.MClient; +import org.compiere.model.MCostElement; +import org.compiere.model.X_M_CostElement; +import org.compiere.util.Env; + +import test.AdempiereTestCase; + +/** + * @author Teo Sarca, www.arhipac.ro // copied by red1 from MInvoiceTest + */ +public class MCostElementTest extends AdempiereTestCase +{ + public static final int BPARTNER_Standard = 112; + + @Override + protected void setUp() throws Exception + { + super.setUp(); + assertEquals("Client is not GardenWorld", 11, Env.getAD_Client_ID(getCtx())); + } + + public void testQuery() throws Exception + { + X_M_CostElement ce =new X_M_CostElement(getCtx(), 102, null); + MClient client = MClient.get(ce.getCtx()); + MCostElement retValue = MCostElement.getMaterialCostElement(client, "F"); //red1 -- change to "S" and"I" to test firstOnly() (false/true) + //red1 -- remove .getCtx to test Public static MCostElement getMaterialCostElement (PO po, String CostingMethod) + assertTrue("getMaterialCostElement returns value", retValue.getName().equals("Fifo")); //red1 -- options above will fail this return (OK) + //testquery1 + + Collection retValue2 = MCostElement.getCostElementsWithCostingMethods(client); + assertTrue("getostElementsWithCostingMethods returns 8", retValue2.size() == 8); + //testquery2 + + MCostElement[] retValue3 = MCostElement.getCostingMethods(client); + assertTrue("getCostingMethods returns 4", retValue3.length == 4); + //testquery3 + + MCostElement[] retValue4 = MCostElement.getNonCostingMethods(client); + assertTrue("getNonCostingMethods returns 1", retValue4.length == 1); + //testquery3 + + MCostElement[] retValue5 = MCostElement.getElements(client.getCtx(), null); + assertTrue("getElements returns 8", retValue5.length == 8); + //testquery3 + + Collection retValue6 = MCostElement.getByCostingMethod(client.getCtx(), "F"); + assertTrue("getByCostingMethod has recs", retValue6.size() > 0); + //testquery3 + } + +} diff --git a/extend/src/test/functional/MLotTest.java b/extend/src/test/functional/MLotTest.java new file mode 100644 index 0000000000..1082fae83a --- /dev/null +++ b/extend/src/test/functional/MLotTest.java @@ -0,0 +1,46 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 2008 SC ARHIPAC SERVICE SRL. All Rights Reserved. * + * This program is free software; you can redistribute it and/or modify it * + * under the terms version 2 of the GNU General Public License as published * + * by the Free Software Foundation. This program is distributed in the hope * + * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * + * See the GNU General Public License for more details. * + * You should have received a copy of the GNU General Public License along * + * with this program; if not, write to the Free Software Foundation, Inc., * + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * + *****************************************************************************/ +package test.functional; + +import org.compiere.model.MLot; +import org.compiere.util.Env; + +import test.AdempiereTestCase; + +/** + * @author Teo Sarca, www.arhipac.ro //red1 copy from MInvoiceTest + */ +public class MLotTest extends AdempiereTestCase +{ + public static final int BPARTNER_TreeFarm = 114; + + @Override + protected void setUp() throws Exception + { + super.setUp(); + assertEquals("Client is not GardenWorld", 11, Env.getAD_Client_ID(getCtx())); + } + + public void testQuery() throws Exception + { + // to set up record - in a clean seed database + // open material receipt window + // create a material receipt for the product Fertilizer #50 + // and push the "New Record" button on the attribute set instance dialog + MLot retValue = MLot.getProductLot(getCtx(), 136, "100", getTrxName()); + assertTrue("Last Lot Rec is 101", retValue.getM_Lot_ID() == 1000000); + + } + +} diff --git a/extend/src/test/functional/MPInstanceTest.java b/extend/src/test/functional/MPInstanceTest.java new file mode 100644 index 0000000000..efddcafd05 --- /dev/null +++ b/extend/src/test/functional/MPInstanceTest.java @@ -0,0 +1,46 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 2008 SC ARHIPAC SERVICE SRL. All Rights Reserved. * + * This program is free software; you can redistribute it and/or modify it * + * under the terms version 2 of the GNU General Public License as published * + * by the Free Software Foundation. This program is distributed in the hope * + * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * + * See the GNU General Public License for more details. * + * You should have received a copy of the GNU General Public License along * + * with this program; if not, write to the Free Software Foundation, Inc., * + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * + *****************************************************************************/ +package test.functional; + +import org.compiere.model.MPInstance; +import org.compiere.model.MPInstancePara; +import org.compiere.model.MPaySelection; +import org.compiere.model.MPaySelectionLine; +import org.compiere.util.Env; + +import test.AdempiereTestCase; + +/** + * @author Teo Sarca, www.arhipac.ro + */ +public class MPInstanceTest extends AdempiereTestCase +{ + private MPInstance lines = null; + + @Override + protected void setUp() throws Exception + { + super.setUp(); + assertEquals("Client is not GardenWorld", 11, Env.getAD_Client_ID(getCtx())); + } + + public void testQuery() throws Exception + { + lines = new MPInstance(getCtx(), 1000000, getTrxName()); + MPInstancePara[] params = lines.getParameters(); + assertTrue("There should be params", params.length > 0); + + } + +} diff --git a/extend/src/test/functional/MPaySelectionTest.java b/extend/src/test/functional/MPaySelectionTest.java new file mode 100644 index 0000000000..3036e3cf15 --- /dev/null +++ b/extend/src/test/functional/MPaySelectionTest.java @@ -0,0 +1,44 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 2008 SC ARHIPAC SERVICE SRL. All Rights Reserved. * + * This program is free software; you can redistribute it and/or modify it * + * under the terms version 2 of the GNU General Public License as published * + * by the Free Software Foundation. This program is distributed in the hope * + * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * + * See the GNU General Public License for more details. * + * You should have received a copy of the GNU General Public License along * + * with this program; if not, write to the Free Software Foundation, Inc., * + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * + *****************************************************************************/ +package test.functional; + +import org.compiere.model.MPaySelection; +import org.compiere.model.MPaySelectionLine; +import org.compiere.util.Env; + +import test.AdempiereTestCase; + +/** + * @author Teo Sarca, www.arhipac.ro + */ +public class MPaySelectionTest extends AdempiereTestCase +{ + private MPaySelection lines = null; + + @Override + protected void setUp() throws Exception + { + super.setUp(); + assertEquals("Client is not GardenWorld", 11, Env.getAD_Client_ID(getCtx())); + } + + public void testQuery() throws Exception + { + lines = new MPaySelection(getCtx(), 100, getTrxName()); + MPaySelectionLine[] payselection = lines.getLines(true); + assertTrue("There should be payment lines", payselection.length > 0); + + } + +} diff --git a/extend/src/test/functional/MPaymentTest.java b/extend/src/test/functional/MPaymentTest.java new file mode 100644 index 0000000000..21ddbf3d43 --- /dev/null +++ b/extend/src/test/functional/MPaymentTest.java @@ -0,0 +1,45 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 2008 SC ARHIPAC SERVICE SRL. All Rights Reserved. * + * This program is free software; you can redistribute it and/or modify it * + * under the terms version 2 of the GNU General Public License as published * + * by the Free Software Foundation. This program is distributed in the hope * + * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * + * See the GNU General Public License for more details. * + * You should have received a copy of the GNU General Public License along * + * with this program; if not, write to the Free Software Foundation, Inc., * + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * + *****************************************************************************/ +package test.functional; + +import org.compiere.model.MInvoice; +import org.compiere.model.MPayment; +import org.compiere.util.Env; + +import test.AdempiereTestCase; + +/** + * @author Teo Sarca, www.arhipac.ro // copied by red1 from MInvoiceTest + */ +public class MPaymentTest extends AdempiereTestCase +{ + public static final int BPARTNER_Standard = 112; + + @Override + protected void setUp() throws Exception + { + super.setUp(); + assertEquals("Client is not GardenWorld", 11, Env.getAD_Client_ID(getCtx())); + } + + public void testQuery() throws Exception + { + MPayment.getOfBPartner(getCtx(), BPARTNER_Standard, getTrxName()); + + MPayment[] payments = MPayment.getOfBPartner(getCtx(), BPARTNER_Standard, getTrxName()); + assertTrue("Partner "+BPARTNER_Standard+" should have payments", payments.length > 0); + //testquery + } + +} diff --git a/extend/src/test/functional/MProductBOMTest.java b/extend/src/test/functional/MProductBOMTest.java new file mode 100644 index 0000000000..112a90ba73 --- /dev/null +++ b/extend/src/test/functional/MProductBOMTest.java @@ -0,0 +1,59 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 2008 SC ARHIPAC SERVICE SRL. All Rights Reserved. * + * This program is free software; you can redistribute it and/or modify it * + * under the terms version 2 of the GNU General Public License as published * + * by the Free Software Foundation. This program is distributed in the hope * + * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * + * See the GNU General Public License for more details. * + * You should have received a copy of the GNU General Public License along * + * with this program; if not, write to the Free Software Foundation, Inc., * + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * + *****************************************************************************/ +package test.functional; + +import org.compiere.model.MBOM; +import org.compiere.model.MLocation; +import org.compiere.model.MProductBOM; +import org.compiere.util.Env; + +import test.AdempiereTestCase; + +/** + * @author Teo Sarca, www.arhipac.ro // used by red1 + */ +public class MProductBOMTest extends AdempiereTestCase +{ + + @Override + protected void setUp() throws Exception + { + super.setUp(); + assertEquals("Client is not GardenWorld", 11, Env.getAD_Client_ID(getCtx())); + } + + public void testQuery() throws Exception + { + MProductBOM[] lines = MProductBOM.getBOMLines(getCtx(), 145, getTrxName()); + assertTrue("ProductBOM should have lines", lines.length > 0); + } + private MBOM bom = null; + + public void testBOMCreation() { + bom = new MBOM(getCtx(), 0, getTrxName()); + // BOM load test case of qualified bom parent for testing MBOM.getOfProduct + bom.setM_Product_ID(134); + bom.setBOMType("A"); + bom.setName("PatioTable"); + + boolean saveResult = bom.save(); // + assertTrue("MBOM.save()", saveResult); + try { + commit(); + } catch (Exception e) { + fail(e.getLocalizedMessage()); + } + } + +} diff --git a/extend/src/test/functional/MProductTest.java b/extend/src/test/functional/MProductTest.java index ee8000f196..e6e49b1c30 100644 --- a/extend/src/test/functional/MProductTest.java +++ b/extend/src/test/functional/MProductTest.java @@ -1,18 +1,22 @@ //MProductTest.java package test.functional; +import java.math.BigDecimal; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import org.compiere.model.MProduct; +import org.compiere.model.MProductPrice; +import org.compiere.model.MProductPricing; import org.compiere.model.X_I_Product; import org.compiere.util.DB; +import org.compiere.util.Env; import test.AdempiereTestCase; public class MProductTest extends AdempiereTestCase { - +/* public int getProduct_Category_ID(String productCategory) { String sql = "select m_product_category_id from m_product_category where name = ?"; PreparedStatement pstmt = null; @@ -68,7 +72,7 @@ public class MProductTest extends AdempiereTestCase { return C_Uom_ID; } - + public void testCreateMProduct() { MProduct m_product = new MProduct(getCtx(), 0, getTrxName()); m_product.setAD_Org_ID(0); @@ -90,5 +94,17 @@ public class MProductTest extends AdempiereTestCase { boolean saveResult = m_product.save(); assertEquals("Create new product.", true, saveResult); + } + + public void testSetBaseInfo() { + MProductPricing prodprice = new MProductPricing(122,100, new BigDecimal (100),true); + int uom = 0; + uom = prodprice.getC_UOM_ID(); + assertTrue("UOM must be correct", uom == 100); + } */ + + public void testPrice() { + MProductPrice test = MProductPrice.get(getCtx(), 105, 124, getTrxName()); + assertTrue("Confirming Prod ID to be true", test.getM_Product_ID() == 124); } } diff --git a/extend/src/test/functional/MProjectTest.java b/extend/src/test/functional/MProjectTest.java new file mode 100644 index 0000000000..842351ad04 --- /dev/null +++ b/extend/src/test/functional/MProjectTest.java @@ -0,0 +1,55 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 2008 SC ARHIPAC SERVICE SRL. All Rights Reserved. * + * This program is free software; you can redistribute it and/or modify it * + * under the terms version 2 of the GNU General Public License as published * + * by the Free Software Foundation. This program is distributed in the hope * + * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * + * See the GNU General Public License for more details. * + * You should have received a copy of the GNU General Public License along * + * with this program; if not, write to the Free Software Foundation, Inc., * + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * + *****************************************************************************/ +package test.functional; + +import org.compiere.model.MProject; +import org.compiere.model.MProjectIssue; +import org.compiere.model.MProjectLine; +import org.compiere.model.MProjectPhase; +import org.compiere.util.Env; + +import test.AdempiereTestCase; + +/** + * @author Teo Sarca, www.arhipac.ro // used by red1 + */ +public class MProjectTest extends AdempiereTestCase +{ + @Override + protected void setUp() throws Exception + { + super.setUp(); + assertEquals("Client is not GardenWorld", 11, Env.getAD_Client_ID(getCtx())); + } + + public void testQuery() throws Exception + { + MProject proj = new MProject(getCtx(),101,null); + { + //test ProjectLines + MProjectLine[] lines = proj.getLines(); + assertTrue("There should be lines in this project", lines.length > 0); + } + { + //test ProjectIssue + MProjectIssue[] issues = proj.getIssues(); + assertTrue("There are no issues in this project", issues.length == 0); + } + { + //test ProjectPhase + MProjectPhase[] lines = proj.getPhases(); + assertTrue("There are no phases in this project", lines.length == 0); + } + } +} diff --git a/extend/src/test/functional/MRequestTypeTest.java b/extend/src/test/functional/MRequestTypeTest.java new file mode 100644 index 0000000000..f631bc4bd2 --- /dev/null +++ b/extend/src/test/functional/MRequestTypeTest.java @@ -0,0 +1,40 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 2008 SC ARHIPAC SERVICE SRL. All Rights Reserved. * + * This program is free software; you can redistribute it and/or modify it * + * under the terms version 2 of the GNU General Public License as published * + * by the Free Software Foundation. This program is distributed in the hope * + * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * + * See the GNU General Public License for more details. * + * You should have received a copy of the GNU General Public License along * + * with this program; if not, write to the Free Software Foundation, Inc., * + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * + *****************************************************************************/ +package test.functional; + +import org.compiere.model.MRequestType; +import org.compiere.util.Env; + +import test.AdempiereTestCase; + +/** + * @author Teo Sarca, www.arhipac.ro + */ +public class MRequestTypeTest extends AdempiereTestCase +{ + @Override + protected void setUp() throws Exception + { + super.setUp(); + assertEquals("Client is not GardenWorld", 11, Env.getAD_Client_ID(getCtx())); + } + + public void testQuery() throws Exception + { + MRequestType req = MRequestType.getDefault(getCtx()); + assertTrue("There should be default requesttype", req.getAD_Client_ID() == 11); + + } + +} diff --git a/extend/src/test/functional/MRuleTest.java b/extend/src/test/functional/MRuleTest.java new file mode 100644 index 0000000000..115a87de74 --- /dev/null +++ b/extend/src/test/functional/MRuleTest.java @@ -0,0 +1,46 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 2008 SC ARHIPAC SERVICE SRL. All Rights Reserved. * + * This program is free software; you can redistribute it and/or modify it * + * under the terms version 2 of the GNU General Public License as published * + * by the Free Software Foundation. This program is distributed in the hope * + * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * + * See the GNU General Public License for more details. * + * You should have received a copy of the GNU General Public License along * + * with this program; if not, write to the Free Software Foundation, Inc., * + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * + *****************************************************************************/ +package test.functional; + +import java.util.List; + +import org.compiere.model.MRule; +import org.compiere.util.Env; + +import test.AdempiereTestCase; + +/** + * @author Teo Sarca, www.arhipac.ro + */ +public class MRuleTest extends AdempiereTestCase +{ + public static final int BPARTNER_TreeFarm = 114; + + @Override + protected void setUp() throws Exception + { + super.setUp(); + assertEquals("Client is not GardenWorld", 11, Env.getAD_Client_ID(getCtx())); + } + + public void testQuery() throws Exception + { + MRule getrule = MRule.get(getCtx(), "beanshell:getAvailable"); + assertTrue("BeanRule must be exact", getrule.getAD_Rule_ID()==1000000); + List rules = MRule.getModelValidatorLoginRules(getCtx()); + assertTrue("Rules has array", rules.size() > 0); //red1 set in DB Rule.EventType = L before testing + + } + +} diff --git a/extend/src/test/functional/inventory/InventoryUtil.java b/extend/src/test/functional/inventory/InventoryUtil.java index bb2ccf5411..1812d714b7 100644 --- a/extend/src/test/functional/inventory/InventoryUtil.java +++ b/extend/src/test/functional/inventory/InventoryUtil.java @@ -18,6 +18,10 @@ import java.sql.Timestamp; import java.util.Properties; import org.adempiere.exceptions.AdempiereException; +import org.compiere.model.I_C_BPartner; +import org.compiere.model.I_M_Product; +import org.compiere.model.I_M_Product_Category; +import org.compiere.model.I_M_Warehouse; import org.compiere.model.MBPGroup; import org.compiere.model.MBPartner; import org.compiere.model.MBPartnerLocation; @@ -56,8 +60,8 @@ public final class InventoryUtil public static MProduct getCreateProduct(String value, String MMPolicy) { Properties ctx = Env.getCtx(); - MProduct product = new Query(ctx, MProduct.Table_Name, "Value=?", null) - .setParameters(new Object[]{value}) + MProduct product = new Query(ctx, I_M_Product.Table_Name, "Value=?", null) + .setParameters(value) .setOnlyActiveRecords(true) .setClient_ID() .firstOnly(); @@ -104,9 +108,9 @@ public final class InventoryUtil if (MMPolicy == null) MMPolicy = MProductCategory.MMPOLICY_FiFo; Properties ctx = Env.getCtx(); - String whereClause = MProductCategory.COLUMNNAME_Value+"=?"; - MProductCategory pc = new Query(ctx, MProductCategory.Table_Name, whereClause, null) - .setParameters(new Object[]{value}) + final String whereClause = I_M_Product_Category.COLUMNNAME_Value+"=?"; + MProductCategory pc = new Query(ctx, I_M_Product_Category.Table_Name, whereClause, null) + .setParameters(value) .setOnlyActiveRecords(true) .setClient_ID() .firstOnly(); @@ -136,9 +140,9 @@ public final class InventoryUtil public static MBPartner getCreatePartner(String value) { Properties ctx = Env.getCtx(); - String whereClause = MBPartner.COLUMNNAME_Value+"=?"; - MBPartner bp = new Query(ctx, MBPartner.Table_Name, whereClause, null) - .setParameters(new Object[]{value}) + final String whereClause = MBPartner.COLUMNNAME_Value+"=?"; + MBPartner bp = new Query(ctx, I_C_BPartner.Table_Name, whereClause, null) + .setParameters(value) .setClient_ID() .firstOnly(); if (bp == null) @@ -339,9 +343,9 @@ public final class InventoryUtil if (AD_Org_ID <= 0) AD_Org_ID = getFirst_Org_ID(); Properties ctx = Env.getCtx(); - String whereClause = "AD_Org_ID=? AND Value=?"; - MWarehouse wh = new Query(ctx, MWarehouse.Table_Name, whereClause, null) - .setParameters(new Object[]{AD_Org_ID, value}) + final String whereClause = "AD_Org_ID=? AND Value=?"; + MWarehouse wh = new Query(ctx, I_M_Warehouse.Table_Name, whereClause, null) + .setParameters(AD_Org_ID, value) .setClient_ID() .firstOnly(); if (wh != null) diff --git a/jboss/server/adempiere/deploy/jboss-web.deployer/serverTemplate.xml b/jboss/server/adempiere/deploy/jboss-web.deployer/serverTemplate.xml index d336f1775f..2f85d71fa4 100644 --- a/jboss/server/adempiere/deploy/jboss-web.deployer/serverTemplate.xml +++ b/jboss/server/adempiere/deploy/jboss-web.deployer/serverTemplate.xml @@ -21,7 +21,7 @@ --> @@ -38,7 +38,7 @@ + emptySessionPath="false" enableLookups="false" redirectPort="8443" /> diff --git a/migration/354a-trunk/oracle/659_FR2871676_ReportAmountType.sql b/migration/354a-trunk/oracle/659_FR2871676_ReportAmountType.sql new file mode 100644 index 0000000000..15a10895d4 --- /dev/null +++ b/migration/354a-trunk/oracle/659_FR2871676_ReportAmountType.sql @@ -0,0 +1,412 @@ +SET DEFINE OFF; +-- 02/10/2009 11:33:15 AM +-- Add signed amount type to fin report +INSERT INTO AD_Reference (AD_Client_ID,AD_Org_ID,AD_Reference_ID,Created,CreatedBy,EntityType,IsActive,IsOrderByValue,Name,Updated,UpdatedBy,ValidationType) VALUES (0,0,53327,TO_DATE('2009-10-02 11:33:12','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','N','PA_Report Period Type',TO_DATE('2009-10-02 11:33:12','YYYY-MM-DD HH24:MI:SS'),100,'L') +; + +-- 02/10/2009 11:33:15 AM +-- Add signed amount type to fin report +INSERT INTO AD_Reference_Trl (AD_Language,AD_Reference_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Reference_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Reference t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Reference_ID=53327 AND EXISTS (SELECT * FROM AD_Reference_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Reference_ID!=t.AD_Reference_ID) +; + +-- 02/10/2009 11:33:29 AM +-- Add signed amount type to fin report +INSERT INTO AD_Ref_List (AD_Client_ID,AD_Org_ID,AD_Reference_ID,AD_Ref_List_ID,Created,CreatedBy,EntityType,IsActive,Name,Updated,UpdatedBy,Value) VALUES (0,0,53327,53536,TO_DATE('2009-10-02 11:33:28','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Total',TO_DATE('2009-10-02 11:33:28','YYYY-MM-DD HH24:MI:SS'),100,'T') +; + +-- 02/10/2009 11:33:29 AM +-- Add signed amount type to fin report +INSERT INTO AD_Ref_List_Trl (AD_Language,AD_Ref_List_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Ref_List_ID, t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Ref_List t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Ref_List_ID=53536 AND EXISTS (SELECT * FROM AD_Ref_List_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Ref_List_ID!=t.AD_Ref_List_ID) +; + +-- 02/10/2009 11:33:38 AM +-- Add signed amount type to fin report +INSERT INTO AD_Ref_List (AD_Client_ID,AD_Org_ID,AD_Reference_ID,AD_Ref_List_ID,Created,CreatedBy,EntityType,IsActive,Name,Updated,UpdatedBy,Value) VALUES (0,0,53327,53537,TO_DATE('2009-10-02 11:33:37','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Year',TO_DATE('2009-10-02 11:33:37','YYYY-MM-DD HH24:MI:SS'),100,'Y') +; + +-- 02/10/2009 11:33:38 AM +-- Add signed amount type to fin report +INSERT INTO AD_Ref_List_Trl (AD_Language,AD_Ref_List_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Ref_List_ID, t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Ref_List t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Ref_List_ID=53537 AND EXISTS (SELECT * FROM AD_Ref_List_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Ref_List_ID!=t.AD_Ref_List_ID) +; + +-- 02/10/2009 11:33:51 AM +-- Add signed amount type to fin report +INSERT INTO AD_Ref_List (AD_Client_ID,AD_Org_ID,AD_Reference_ID,AD_Ref_List_ID,Created,CreatedBy,EntityType,IsActive,Name,Updated,UpdatedBy,Value) VALUES (0,0,53327,53538,TO_DATE('2009-10-02 11:33:50','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Period',TO_DATE('2009-10-02 11:33:50','YYYY-MM-DD HH24:MI:SS'),100,'P') +; + +-- 02/10/2009 11:33:51 AM +-- Add signed amount type to fin report +INSERT INTO AD_Ref_List_Trl (AD_Language,AD_Ref_List_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Ref_List_ID, t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Ref_List t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Ref_List_ID=53538 AND EXISTS (SELECT * FROM AD_Ref_List_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Ref_List_ID!=t.AD_Ref_List_ID) +; + +-- 02/10/2009 11:40:15 AM +-- Add signed amount type to fin report +INSERT INTO AD_Ref_List (AD_Client_ID,AD_Org_ID,AD_Reference_ID,AD_Ref_List_ID,Created,CreatedBy,Description,EntityType,IsActive,Name,Updated,UpdatedBy,Value) VALUES (0,0,53327,53540,TO_DATE('2009-10-02 11:40:14','YYYY-MM-DD HH24:MI:SS'),100,'Year for P & L account, Total for Balance Sheet account','D','Y','Natural',TO_DATE('2009-10-02 11:40:14','YYYY-MM-DD HH24:MI:SS'),100,'N') +; + +-- 02/10/2009 11:40:15 AM +-- Add signed amount type to fin report +INSERT INTO AD_Ref_List_Trl (AD_Language,AD_Ref_List_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Ref_List_ID, t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Ref_List t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Ref_List_ID=53540 AND EXISTS (SELECT * FROM AD_Ref_List_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Ref_List_ID!=t.AD_Ref_List_ID) +; + +-- 02/10/2009 11:42:57 AM +-- Add signed amount type to fin report +UPDATE AD_Reference SET IsActive='N', Name='PA_Report AmountType (deprecated)',Updated=TO_DATE('2009-10-02 11:42:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=235 +; + +-- 02/10/2009 11:42:57 AM +-- Add signed amount type to fin report +UPDATE AD_Reference_Trl SET IsTranslated='N' WHERE AD_Reference_ID=235 +; + +-- 02/10/2009 11:43:16 AM +-- Add signed amount type to fin report +INSERT INTO AD_Reference (AD_Client_ID,AD_Org_ID,AD_Reference_ID,Created,CreatedBy,EntityType,IsActive,IsOrderByValue,Name,Updated,UpdatedBy,ValidationType) VALUES (0,0,53328,TO_DATE('2009-10-02 11:43:15','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','N','PA_Report Amount Type',TO_DATE('2009-10-02 11:43:15','YYYY-MM-DD HH24:MI:SS'),100,'L') +; + +-- 02/10/2009 11:43:16 AM +-- Add signed amount type to fin report +INSERT INTO AD_Reference_Trl (AD_Language,AD_Reference_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Reference_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Reference t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Reference_ID=53328 AND EXISTS (SELECT * FROM AD_Reference_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Reference_ID!=t.AD_Reference_ID) +; + +-- 02/10/2009 11:44:10 AM +-- Add signed amount type to fin report +INSERT INTO AD_Ref_List (AD_Client_ID,AD_Org_ID,AD_Reference_ID,AD_Ref_List_ID,Created,CreatedBy,EntityType,IsActive,Name,Updated,UpdatedBy,Value) VALUES (0,0,53328,53541,TO_DATE('2009-10-02 11:44:09','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Balance (expected sign)',TO_DATE('2009-10-02 11:44:09','YYYY-MM-DD HH24:MI:SS'),100,'B') +; + +-- 02/10/2009 11:44:10 AM +-- Add signed amount type to fin report +INSERT INTO AD_Ref_List_Trl (AD_Language,AD_Ref_List_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Ref_List_ID, t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Ref_List t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Ref_List_ID=53541 AND EXISTS (SELECT * FROM AD_Ref_List_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Ref_List_ID!=t.AD_Ref_List_ID) +; + +-- 02/10/2009 11:44:32 AM +-- Add signed amount type to fin report +INSERT INTO AD_Ref_List (AD_Client_ID,AD_Org_ID,AD_Reference_ID,AD_Ref_List_ID,Created,CreatedBy,EntityType,IsActive,Name,Updated,UpdatedBy,Value) VALUES (0,0,53328,53542,TO_DATE('2009-10-02 11:44:30','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Credit Only',TO_DATE('2009-10-02 11:44:30','YYYY-MM-DD HH24:MI:SS'),100,'C') +; + +-- 02/10/2009 11:44:32 AM +-- Add signed amount type to fin report +INSERT INTO AD_Ref_List_Trl (AD_Language,AD_Ref_List_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Ref_List_ID, t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Ref_List t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Ref_List_ID=53542 AND EXISTS (SELECT * FROM AD_Ref_List_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Ref_List_ID!=t.AD_Ref_List_ID) +; + +-- 02/10/2009 11:44:42 AM +-- Add signed amount type to fin report +INSERT INTO AD_Ref_List (AD_Client_ID,AD_Org_ID,AD_Reference_ID,AD_Ref_List_ID,Created,CreatedBy,EntityType,IsActive,Name,Updated,UpdatedBy,Value) VALUES (0,0,53328,53543,TO_DATE('2009-10-02 11:44:41','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Debit Only',TO_DATE('2009-10-02 11:44:41','YYYY-MM-DD HH24:MI:SS'),100,'D') +; + +-- 02/10/2009 11:44:42 AM +-- Add signed amount type to fin report +INSERT INTO AD_Ref_List_Trl (AD_Language,AD_Ref_List_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Ref_List_ID, t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Ref_List t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Ref_List_ID=53543 AND EXISTS (SELECT * FROM AD_Ref_List_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Ref_List_ID!=t.AD_Ref_List_ID) +; + +-- 02/10/2009 11:45:01 AM +-- Add signed amount type to fin report +INSERT INTO AD_Ref_List (AD_Client_ID,AD_Org_ID,AD_Reference_ID,AD_Ref_List_ID,Created,CreatedBy,EntityType,IsActive,Name,Updated,UpdatedBy,Value) VALUES (0,0,53328,53544,TO_DATE('2009-10-02 11:45:00','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Quantity',TO_DATE('2009-10-02 11:45:00','YYYY-MM-DD HH24:MI:SS'),100,'Q') +; + +-- 02/10/2009 11:45:01 AM +-- Add signed amount type to fin report +INSERT INTO AD_Ref_List_Trl (AD_Language,AD_Ref_List_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Ref_List_ID, t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Ref_List t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Ref_List_ID=53544 AND EXISTS (SELECT * FROM AD_Ref_List_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Ref_List_ID!=t.AD_Ref_List_ID) +; + +-- 02/10/2009 11:48:32 AM +-- Add signed amount type to fin report +INSERT INTO AD_Ref_List (AD_Client_ID,AD_Org_ID,AD_Reference_ID,AD_Ref_List_ID,Created,CreatedBy,Description,EntityType,IsActive,Name,Updated,UpdatedBy,Value) VALUES (0,0,53328,53545,TO_DATE('2009-10-02 11:48:31','YYYY-MM-DD HH24:MI:SS'),100,'DR - CR','D','Y','Balance (accounted sign)',TO_DATE('2009-10-02 11:48:31','YYYY-MM-DD HH24:MI:SS'),100,'S') +; + +-- 02/10/2009 11:48:32 AM +-- Add signed amount type to fin report +INSERT INTO AD_Ref_List_Trl (AD_Language,AD_Ref_List_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Ref_List_ID, t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Ref_List t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Ref_List_ID=53545 AND EXISTS (SELECT * FROM AD_Ref_List_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Ref_List_ID!=t.AD_Ref_List_ID) +; + +-- 02/10/2009 11:52:38 AM +-- Add signed amount type to fin report +INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,Description,EntityType,Help,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,54061,0,'PAPeriodType',TO_DATE('2009-10-02 11:52:35','YYYY-MM-DD HH24:MI:SS'),100,'PA Period Type','D','The Period Type to report on: Period, Year, Total or Natural; where Natural = Year for P & L accounts, Total for Balance Sheet accounts.','Y','Period Type','Period Type',TO_DATE('2009-10-02 11:52:35','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- 02/10/2009 11:52:38 AM +-- Add signed amount type to fin report +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=54061 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID) +; + +-- 02/10/2009 11:56:47 AM +-- Add signed amount type to fin report +INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,Description,EntityType,Help,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,54062,0,'PAAmountType',TO_DATE('2009-10-02 11:56:46','YYYY-MM-DD HH24:MI:SS'),100,'PA Amount Type for reporting','D','The amount type to report on: Quantity, Credit Only, Debit Only, Balance (expected sign) or Balance (DR-CR). Balance (expected sign) adjusts the sign of the result based on the Account Type and Expected Sign of each Account Element.','Y','Amount Type','Amount Type',TO_DATE('2009-10-02 11:56:46','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- 02/10/2009 11:56:47 AM +-- Add signed amount type to fin report +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=54062 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID) +; + +-- 02/10/2009 11:56:58 AM +-- Add signed amount type to fin report +UPDATE AD_Element SET Help='The Period Type to report on: Period, Year, Total or Natural. Natural = Year for P & L accounts, Total for Balance Sheet accounts.',Updated=TO_DATE('2009-10-02 11:56:58','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=54061 +; + +-- 02/10/2009 11:56:58 AM +-- Add signed amount type to fin report +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=54061 +; + +-- 02/10/2009 11:56:58 AM +-- Add signed amount type to fin report +UPDATE AD_Column SET ColumnName='PAPeriodType', Name='Period Type', Description='PA Period Type', Help='The Period Type to report on: Period, Year, Total or Natural. Natural = Year for P & L accounts, Total for Balance Sheet accounts.' WHERE AD_Element_ID=54061 +; + +-- 02/10/2009 11:56:58 AM +-- Add signed amount type to fin report +UPDATE AD_Process_Para SET ColumnName='PAPeriodType', Name='Period Type', Description='PA Period Type', Help='The Period Type to report on: Period, Year, Total or Natural. Natural = Year for P & L accounts, Total for Balance Sheet accounts.', AD_Element_ID=54061 WHERE UPPER(ColumnName)='PAPERIODTYPE' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL +; + +-- 02/10/2009 11:56:58 AM +-- Add signed amount type to fin report +UPDATE AD_Process_Para SET ColumnName='PAPeriodType', Name='Period Type', Description='PA Period Type', Help='The Period Type to report on: Period, Year, Total or Natural. Natural = Year for P & L accounts, Total for Balance Sheet accounts.' WHERE AD_Element_ID=54061 AND IsCentrallyMaintained='Y' +; + +-- 02/10/2009 11:56:58 AM +-- Add signed amount type to fin report +UPDATE AD_Field SET Name='Period Type', Description='PA Period Type', Help='The Period Type to report on: Period, Year, Total or Natural. Natural = Year for P & L accounts, Total for Balance Sheet accounts.' WHERE AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=54061) AND IsCentrallyMaintained='Y' +; + +-- 02/10/2009 11:58:09 AM +-- Add signed amount type to fin report +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,58553,54061,0,17,53327,446,'PAPeriodType',TO_DATE('2009-10-02 11:58:08','YYYY-MM-DD HH24:MI:SS'),100,'P','PA Period Type','D',1,'The Period Type to report on: Period, Year, Total or Natural. Natural = Year for P & L accounts, Total for Balance Sheet accounts.','Y','Y','N','N','N','N','N','N','N','N','N','N','Y','Period Type',0,TO_DATE('2009-10-02 11:58:08','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- 02/10/2009 11:58:09 AM +-- Add signed amount type to fin report +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=58553 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +-- 02/10/2009 11:58:17 AM +-- Add signed amount type to fin report +ALTER TABLE PA_ReportColumn ADD PAPeriodType CHAR(1) DEFAULT 'P' +; + +-- 02/10/2009 11:59:04 AM +-- Add signed amount type to fin report +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,58554,54062,0,17,53328,446,'PAAmountType',TO_DATE('2009-10-02 11:59:03','YYYY-MM-DD HH24:MI:SS'),100,'B','PA Amount Type for reporting','D',1,'The amount type to report on: Quantity, Credit Only, Debit Only, Balance (expected sign) or Balance (DR-CR). Balance (expected sign) adjusts the sign of the result based on the Account Type and Expected Sign of each Account Element.','Y','Y','N','N','N','N','N','N','N','N','N','N','Y','Amount Type',0,TO_DATE('2009-10-02 11:59:03','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- 02/10/2009 11:59:04 AM +-- Add signed amount type to fin report +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=58554 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +-- 02/10/2009 12:01:36 PM +-- Add signed amount type to fin report +UPDATE AD_Element SET Help='The amount type to report on: Quantity, Credit Only, Debit Only, Balance (expected sign) or Balance (accounted sign). "Expected sign" adjusts the sign of the result based on the Account Type and Expected Sign of each Account Element, whereas "accounted sign" always returns DR-CR.',Updated=TO_DATE('2009-10-02 12:01:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=54062 +; + +-- 02/10/2009 12:01:36 PM +-- Add signed amount type to fin report +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=54062 +; + +-- 02/10/2009 12:01:36 PM +-- Add signed amount type to fin report +UPDATE AD_Column SET ColumnName='PAAmountType', Name='Amount Type', Description='PA Amount Type for reporting', Help='The amount type to report on: Quantity, Credit Only, Debit Only, Balance (expected sign) or Balance (accounted sign). "Expected sign" adjusts the sign of the result based on the Account Type and Expected Sign of each Account Element, whereas "accounted sign" always returns DR-CR.' WHERE AD_Element_ID=54062 +; + +-- 02/10/2009 12:01:36 PM +-- Add signed amount type to fin report +UPDATE AD_Process_Para SET ColumnName='PAAmountType', Name='Amount Type', Description='PA Amount Type for reporting', Help='The amount type to report on: Quantity, Credit Only, Debit Only, Balance (expected sign) or Balance (accounted sign). "Expected sign" adjusts the sign of the result based on the Account Type and Expected Sign of each Account Element, whereas "accounted sign" always returns DR-CR.', AD_Element_ID=54062 WHERE UPPER(ColumnName)='PAAMOUNTTYPE' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL +; + +-- 02/10/2009 12:01:36 PM +-- Add signed amount type to fin report +UPDATE AD_Process_Para SET ColumnName='PAAmountType', Name='Amount Type', Description='PA Amount Type for reporting', Help='The amount type to report on: Quantity, Credit Only, Debit Only, Balance (expected sign) or Balance (accounted sign). "Expected sign" adjusts the sign of the result based on the Account Type and Expected Sign of each Account Element, whereas "accounted sign" always returns DR-CR.' WHERE AD_Element_ID=54062 AND IsCentrallyMaintained='Y' +; + +-- 02/10/2009 12:01:36 PM +-- Add signed amount type to fin report +UPDATE AD_Field SET Name='Amount Type', Description='PA Amount Type for reporting', Help='The amount type to report on: Quantity, Credit Only, Debit Only, Balance (expected sign) or Balance (accounted sign). "Expected sign" adjusts the sign of the result based on the Account Type and Expected Sign of each Account Element, whereas "accounted sign" always returns DR-CR.' WHERE AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=54062) AND IsCentrallyMaintained='Y' +; + +-- 02/10/2009 12:03:11 PM +-- Add signed amount type to fin report +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,58555,54062,0,17,53328,448,'PAAmountType',TO_DATE('2009-10-02 12:03:10','YYYY-MM-DD HH24:MI:SS'),100,'PA Amount Type for reporting','D',2,'The amount type to report on: Quantity, Credit Only, Debit Only, Balance (expected sign) or Balance (accounted sign). "Expected sign" adjusts the sign of the result based on the Account Type and Expected Sign of each Account Element, whereas "accounted sign" always returns DR-CR.','Y','Y','N','N','N','N','N','N','N','N','N','N','Y','Amount Type',0,TO_DATE('2009-10-02 12:03:10','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- 02/10/2009 12:03:11 PM +-- Add signed amount type to fin report +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=58555 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +-- 02/10/2009 12:03:20 PM +-- Add signed amount type to fin report +UPDATE AD_Column SET FieldLength=1,Updated=TO_DATE('2009-10-02 12:03:20','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=58555 +; + +-- 02/10/2009 12:03:23 PM +-- Add signed amount type to fin report +ALTER TABLE PA_ReportLine ADD PAAmountType CHAR(1) DEFAULT NULL +; + +-- 02/10/2009 12:03:48 PM +-- Add signed amount type to fin report +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,58556,54061,0,17,53327,448,'PAPeriodType',TO_DATE('2009-10-02 12:03:47','YYYY-MM-DD HH24:MI:SS'),100,'PA Period Type','D',1,'The Period Type to report on: Period, Year, Total or Natural. Natural = Year for P & L accounts, Total for Balance Sheet accounts.','Y','Y','N','N','N','N','N','N','N','N','N','N','Y','Period Type',0,TO_DATE('2009-10-02 12:03:47','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- 02/10/2009 12:03:48 PM +-- Add signed amount type to fin report +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=58556 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +-- 02/10/2009 12:03:50 PM +-- Add signed amount type to fin report +ALTER TABLE PA_ReportLine ADD PAPeriodType CHAR(1) DEFAULT NULL +; + +-- 02/10/2009 12:04:03 PM +-- Add signed amount type to fin report +ALTER TABLE PA_ReportColumn ADD PAAmountType CHAR(1) DEFAULT 'B' +; + +-- 02/10/2009 12:04:29 PM +-- Add signed amount type to fin report +UPDATE AD_Column SET IsActive='N',Updated=TO_DATE('2009-10-02 12:04:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6019 +; + +-- 02/10/2009 12:04:39 PM +-- Add signed amount type to fin report +UPDATE AD_Column SET IsActive='N',Updated=TO_DATE('2009-10-02 12:04:39','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=7707 +; + +-- 02/10/2009 12:09:57 PM +-- Add signed amount type to fin report +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,Updated,UpdatedBy) VALUES (0,58554,58041,0,374,TO_DATE('2009-10-02 12:09:56','YYYY-MM-DD HH24:MI:SS'),100,'PA Amount Type for reporting',14,'D','The amount type to report on: Quantity, Credit Only, Debit Only, Balance (expected sign) or Balance (accounted sign). "Expected sign" adjusts the sign of the result based on the Account Type and Expected Sign of each Account Element, whereas "accounted sign" always returns DR-CR.','Y','Y','Y','N','N','N','N','N','Amount Type',110,TO_DATE('2009-10-02 12:09:56','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- 02/10/2009 12:09:57 PM +-- Add signed amount type to fin report +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58041 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +-- 02/10/2009 12:11:17 PM +-- Add signed amount type to fin report +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,Updated,UpdatedBy) VALUES (0,58553,58042,0,374,TO_DATE('2009-10-02 12:11:16','YYYY-MM-DD HH24:MI:SS'),100,'PA Period Type',14,'D','The Period Type to report on: Period, Year, Total or Natural. Natural = Year for P & L accounts, Total for Balance Sheet accounts.','Y','Y','Y','N','N','N','N','Y','Period Type',115,TO_DATE('2009-10-02 12:11:16','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- 02/10/2009 12:11:17 PM +-- Add signed amount type to fin report +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58042 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +-- 02/10/2009 12:11:26 PM +-- Add signed amount type to fin report +UPDATE AD_Field SET IsActive='N',Updated=TO_DATE('2009-10-02 12:11:26','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=4760 +; + +-- 02/10/2009 12:13:14 PM +-- Add signed amount type to fin report +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,DisplayLogic,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,Updated,UpdatedBy) VALUES (0,58555,58043,0,376,TO_DATE('2009-10-02 12:13:13','YYYY-MM-DD HH24:MI:SS'),100,'PA Amount Type for reporting',14,'@LineType@=S','D','The amount type to report on: Quantity, Credit Only, Debit Only, Balance (expected sign) or Balance (accounted sign). "Expected sign" adjusts the sign of the result based on the Account Type and Expected Sign of each Account Element, whereas "accounted sign" always returns DR-CR.','Y','Y','Y','N','N','N','N','N','Amount Type',180,TO_DATE('2009-10-02 12:13:13','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- 02/10/2009 12:13:14 PM +-- Add signed amount type to fin report +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58043 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +-- 02/10/2009 12:13:46 PM +-- Add signed amount type to fin report +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,DisplayLogic,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,Updated,UpdatedBy) VALUES (0,58556,58044,0,376,TO_DATE('2009-10-02 12:13:45','YYYY-MM-DD HH24:MI:SS'),100,'PA Period Type',14,'@LineType@=S','D','The Period Type to report on: Period, Year, Total or Natural. Natural = Year for P & L accounts, Total for Balance Sheet accounts.','Y','Y','Y','N','N','N','N','Y','Period Type',185,TO_DATE('2009-10-02 12:13:45','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- 02/10/2009 12:13:46 PM +-- Add signed amount type to fin report +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58044 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +-- 02/10/2009 12:13:57 PM +-- Add signed amount type to fin report +UPDATE AD_Field SET IsActive='N',Updated=TO_DATE('2009-10-02 12:13:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5807 +; + +-- 02/10/2009 12:16:06 PM +-- Add signed amount type to fin report +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,58557,54062,0,17,53328,535,'PAAmountType',TO_DATE('2009-10-02 12:16:05','YYYY-MM-DD HH24:MI:SS'),100,'PA Amount Type for reporting','D',1,'The amount type to report on: Quantity, Credit Only, Debit Only, Balance (expected sign) or Balance (accounted sign). "Expected sign" adjusts the sign of the result based on the Account Type and Expected Sign of each Account Element, whereas "accounted sign" always returns DR-CR.','Y','Y','N','N','N','N','N','N','N','N','N','N','Y','Amount Type',0,TO_DATE('2009-10-02 12:16:05','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +-- 02/10/2009 12:16:06 PM +-- Add signed amount type to fin report +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=58557 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +-- 02/10/2009 12:16:10 PM +-- Add signed amount type to fin report +ALTER TABLE I_ReportLine ADD PAAmountType CHAR(1) DEFAULT NULL +; + +-- 02/10/2009 12:16:40 PM +-- Add signed amount type to fin report +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,58558,54061,0,17,53327,535,'PAPeriodType',TO_DATE('2009-10-02 12:16:34','YYYY-MM-DD HH24:MI:SS'),100,'PA Period Type','D',1,'The Period Type to report on: Period, Year, Total or Natural. Natural = Year for P & L accounts, Total for Balance Sheet accounts.','Y','Y','N','N','N','N','N','N','N','N','N','N','Y','Period Type',0,TO_DATE('2009-10-02 12:16:34','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +-- 02/10/2009 12:16:40 PM +-- Add signed amount type to fin report +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=58558 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +-- 02/10/2009 12:16:43 PM +-- Add signed amount type to fin report +ALTER TABLE I_ReportLine ADD PAPeriodType CHAR(1) DEFAULT NULL +; + +-- 02/10/2009 12:16:52 PM +-- Add signed amount type to fin report +UPDATE AD_Column SET IsActive='N',Updated=TO_DATE('2009-10-02 12:16:52','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=7954 +; + +-- 02/10/2009 12:18:35 PM +-- Add signed amount type to fin report +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,Updated,UpdatedBy) VALUES (0,58557,58045,0,444,TO_DATE('2009-10-02 12:18:35','YYYY-MM-DD HH24:MI:SS'),100,'PA Amount Type for reporting',14,'D','The amount type to report on: Quantity, Credit Only, Debit Only, Balance (expected sign) or Balance (accounted sign). "Expected sign" adjusts the sign of the result based on the Account Type and Expected Sign of each Account Element, whereas "accounted sign" always returns DR-CR.','Y','Y','Y','N','N','N','N','N','Amount Type',160,TO_DATE('2009-10-02 12:18:35','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- 02/10/2009 12:18:35 PM +-- Add signed amount type to fin report +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58045 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +-- 02/10/2009 12:18:56 PM +-- Add signed amount type to fin report +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,Updated,UpdatedBy) VALUES (0,58558,58046,0,444,TO_DATE('2009-10-02 12:18:55','YYYY-MM-DD HH24:MI:SS'),100,'PA Period Type',14,'D','The Period Type to report on: Period, Year, Total or Natural. Natural = Year for P & L accounts, Total for Balance Sheet accounts.','Y','Y','Y','N','N','N','N','N','Period Type',165,TO_DATE('2009-10-02 12:18:55','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- 02/10/2009 12:18:56 PM +-- Add signed amount type to fin report +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58046 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +-- 02/10/2009 12:19:04 PM +-- Add signed amount type to fin report +UPDATE AD_Field SET IsActive='N',Updated=TO_DATE('2009-10-02 12:19:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=6043 +; + +-- 02/10/2009 1:48:32 PM +-- Add signed amount type to fin report +INSERT INTO AD_Ref_List (AD_Client_ID,AD_Org_ID,AD_Reference_ID,AD_Ref_List_ID,Created,CreatedBy,EntityType,IsActive,Name,Updated,UpdatedBy,Value) VALUES (0,0,53328,53546,TO_DATE('2009-10-02 13:48:30','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Quantity (accounted sign)',TO_DATE('2009-10-02 13:48:30','YYYY-MM-DD HH24:MI:SS'),100,'R') +; + +-- 02/10/2009 1:48:32 PM +-- Add signed amount type to fin report +INSERT INTO AD_Ref_List_Trl (AD_Language,AD_Ref_List_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Ref_List_ID, t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Ref_List t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Ref_List_ID=53546 AND EXISTS (SELECT * FROM AD_Ref_List_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Ref_List_ID!=t.AD_Ref_List_ID) +; + +-- 02/10/2009 1:48:43 PM +-- Add signed amount type to fin report +UPDATE AD_Ref_List SET Name='Quantity (expected sign)',Updated=TO_DATE('2009-10-02 13:48:43','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Ref_List_ID=53544 +; + +-- 02/10/2009 1:48:43 PM +-- Add signed amount type to fin report +UPDATE AD_Ref_List_Trl SET IsTranslated='N' WHERE AD_Ref_List_ID=53544 +; + +update pa_reportline set paamounttype = substr(amounttype, 1,1), paperiodtype = substr(amounttype,2,1); + +update pa_reportcolumn set paamounttype = substr(amounttype, 1,1), paperiodtype = substr(amounttype,2,1); + + + diff --git a/migration/354a-trunk/oracle/660_BF_2944056_FixSubstituteRelatedInfoProduct.sql b/migration/354a-trunk/oracle/660_BF_2944056_FixSubstituteRelatedInfoProduct.sql new file mode 100644 index 0000000000..716e559f45 --- /dev/null +++ b/migration/354a-trunk/oracle/660_BF_2944056_FixSubstituteRelatedInfoProduct.sql @@ -0,0 +1,28 @@ +--- BF 2944056 https://sourceforge.net/tracker/?func=detail&aid=2944056&group_id=176962&atid=879332 +--- Fix Related and Substitute Inventory Quantity in the InfoProduct window + +DROP VIEW M_PRODUCT_SUBSTITUTERELATED_V; + +CREATE OR REPLACE VIEW M_PRODUCT_SUBSTITUTERELATED_V AS +SELECT s.ad_client_id, s.ad_org_id, s.isactive, s.created, s.createdby, s.updated, s.updatedby, + s.m_product_id, s.substitute_id, 'S' AS rowtype, mp.name, sum(ms.qtyonhand - ms.qtyreserved) AS qtyavailable, sum(ms.qtyonhand) AS qtyonhand, sum(ms.qtyreserved) AS qtyreserved, +ROUND(MAX(mpr.pricestd),0) AS pricestd, mpr.m_pricelist_version_id, mw.m_warehouse_id, org.name AS orgname + FROM m_substitute s + JOIN m_storage ms ON ms.m_product_id = s.substitute_id + JOIN m_product mp ON ms.m_product_id = mp.m_product_id + JOIN m_locator ml ON ms.m_locator_id = ml.m_locator_id + JOIN m_warehouse mw ON ml.m_warehouse_id = mw.m_warehouse_id + JOIN m_productprice mpr ON ms.m_product_id = mpr.m_product_id + JOIN ad_org org ON org.ad_org_id = mw.ad_org_id + GROUP BY s.ad_client_id, s.ad_org_id, s.isactive, s.created, s.createdby, s.updated, s.updatedby, s.m_product_id, s.substitute_id, mw.m_warehouse_id, mpr.m_pricelist_version_id, org.name, mp.name +UNION + SELECT r.ad_client_id, r.ad_org_id, r.isactive, r.created, r.createdby, r.updated, r.updatedby, + r.m_product_id, r.relatedproduct_id AS substitute_id, 'R' AS rowtype, mp.name, sum(ms.qtyonhand - ms.qtyreserved) AS qtyavailable, sum(ms.qtyonhand) AS qtyonhand, sum(ms.qtyreserved) AS qtyreserved, round(MAX(mpr.pricestd),0) AS pricestd, mpr.m_pricelist_version_id, mw.m_warehouse_id, org.name AS orgname + FROM m_relatedproduct r + JOIN m_storage ms ON ms.m_product_id = r.relatedproduct_id + JOIN m_product mp ON ms.m_product_id = mp.m_product_id + JOIN m_locator ml ON ms.m_locator_id = ml.m_locator_id + JOIN m_warehouse mw ON ml.m_warehouse_id = mw.m_warehouse_id + JOIN m_productprice mpr ON ms.m_product_id = mpr.m_product_id + JOIN ad_org org ON org.ad_org_id = mw.ad_org_id + GROUP BY r.ad_client_id, r.ad_org_id, r.isactive, r.created, r.createdby, r.updated, r.updatedby, r.m_product_id, r.relatedproduct_id, mw.m_warehouse_id, mpr.m_pricelist_version_id, org.name, mp.name; \ No newline at end of file diff --git a/migration/354a-trunk/oracle/661_FR_2945715_AdvancedSearchMsg.sql b/migration/354a-trunk/oracle/661_FR_2945715_AdvancedSearchMsg.sql new file mode 100644 index 0000000000..2cd415ea08 --- /dev/null +++ b/migration/354a-trunk/oracle/661_FR_2945715_AdvancedSearchMsg.sql @@ -0,0 +1,30 @@ +-- Feb 8, 2010 3:00:56 PM EST +-- Advanced search +INSERT INTO AD_Message (AD_Client_ID,AD_Message_ID,AD_Org_ID,Created,CreatedBy,EntityType,IsActive,MsgText,MsgType,Updated,UpdatedBy,Value) VALUES (0,53092,0,TO_DATE('2010-02-08 15:00:52','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','And/Or','I',TO_DATE('2010-02-08 15:00:52','YYYY-MM-DD HH24:MI:SS'),100,'And/Or') +; + +-- Feb 8, 2010 3:00:57 PM EST +-- Advanced search +INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=53092 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID) +; + +-- Feb 8, 2010 3:01:21 PM EST +-- Advanced search +INSERT INTO AD_Message (AD_Client_ID,AD_Message_ID,AD_Org_ID,Created,CreatedBy,EntityType,IsActive,MsgText,MsgType,Updated,UpdatedBy,Value) VALUES (0,53093,0,TO_DATE('2010-02-08 15:01:19','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','AND','I',TO_DATE('2010-02-08 15:01:19','YYYY-MM-DD HH24:MI:SS'),100,'AND') +; + +-- Feb 8, 2010 3:01:21 PM EST +-- Advanced search +INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=53093 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID) +; + +-- Feb 8, 2010 3:01:42 PM EST +-- Advanced search +INSERT INTO AD_Message (AD_Client_ID,AD_Message_ID,AD_Org_ID,Created,CreatedBy,EntityType,IsActive,MsgText,MsgType,Updated,UpdatedBy,Value) VALUES (0,53094,0,TO_DATE('2010-02-08 15:01:34','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','OR','I',TO_DATE('2010-02-08 15:01:34','YYYY-MM-DD HH24:MI:SS'),100,'OR') +; + +-- Feb 8, 2010 3:01:42 PM EST +-- Advanced search +INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=53094 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID) +; + diff --git a/migration/354a-trunk/oracle/662_BT_2944388.sql b/migration/354a-trunk/oracle/662_BT_2944388.sql new file mode 100644 index 0000000000..4d974aa845 --- /dev/null +++ b/migration/354a-trunk/oracle/662_BT_2944388.sql @@ -0,0 +1,5 @@ +-- Feb 8, 2010 4:05:08 PM EST +-- BF2944388 +UPDATE AD_Column SET IsIdentifier='Y', SeqNo=1,Updated=TO_DATE('2010-02-08 16:05:08','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=57563 +; + diff --git a/migration/354a-trunk/oracle/663_FR2949534_ResetAllocation.sql b/migration/354a-trunk/oracle/663_FR2949534_ResetAllocation.sql new file mode 100644 index 0000000000..f24898429a --- /dev/null +++ b/migration/354a-trunk/oracle/663_FR2949534_ResetAllocation.sql @@ -0,0 +1,35 @@ +-- Feb 11, 2010 3:41:40 PM EST +-- Reset Allocation +INSERT INTO AD_Process (AccessLevel,AD_Client_ID,AD_Org_ID,AD_Process_ID,Classname,Created,CreatedBy,Description,EntityType,Help,IsActive,IsBetaFunctionality,IsDirectPrint,IsReport,IsServerProcess,Name,ShowHelp,Statistic_Count,Statistic_Seconds,Updated,UpdatedBy,Value) VALUES ('2',0,0,53199,'org.compiere.process.AllocationReset',TO_DATE('2010-02-11 15:41:38','YYYY-MM-DD HH24:MI:SS'),100,'Reset (delete) allocation of invoices to payments','D','Delete individual allocation. In contrast to "Reverse", the allocation is deleted (no trace), if the period is open.','Y','N','N','N','N','Reset Allocation Direct','Y',0,0,TO_DATE('2010-02-11 15:41:38','YYYY-MM-DD HH24:MI:SS'),100,'C_Allocation_Reset_Direct') +; + +-- Feb 11, 2010 3:41:40 PM EST +-- Reset Allocation +INSERT INTO AD_Process_Trl (AD_Language,AD_Process_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Process_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Process t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Process_ID=53199 AND NOT EXISTS (SELECT * FROM AD_Process_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Process_ID=t.AD_Process_ID) +; + +-- Feb 11, 2010 3:43:37 PM EST +-- Reset Allocation +UPDATE AD_Field SET SeqNo=160,IsDisplayed='Y' WHERE AD_Field_ID=10431 +; + +-- Feb 11, 2010 3:44:45 PM EST +-- Reset Allocation +UPDATE AD_Column SET AD_Process_ID=53199, AD_Reference_ID=28,Updated=TO_DATE('2010-02-11 15:44:45','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=12314 +; + +-- Feb 11, 2010 3:44:49 PM EST +-- Reset Allocation +UPDATE AD_Field SET Description='Reset (delete) allocation of invoices to payments', Name='Reset Allocation',Updated=TO_DATE('2010-02-11 15:44:49','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=10431 +; + +-- Feb 11, 2010 3:44:49 PM EST +-- Reset Allocation +UPDATE AD_Field_Trl SET IsTranslated='N' WHERE AD_Field_ID=10431 +; + +-- Feb 11, 2010 3:50:09 PM EST +-- Reset Allocation +UPDATE AD_Column SET IsAlwaysUpdateable='Y',Updated=TO_DATE('2010-02-11 15:50:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=12314 +; + diff --git a/migration/354a-trunk/oracle/664_FR2934358_FixedTyposOnElements.sql b/migration/354a-trunk/oracle/664_FR2934358_FixedTyposOnElements.sql new file mode 100644 index 0000000000..fa5a717f6b --- /dev/null +++ b/migration/354a-trunk/oracle/664_FR2934358_FixedTyposOnElements.sql @@ -0,0 +1,261 @@ +SET DEFINE OFF; +UPDATE AD_ELEMENT SET DESCRIPTION='Trees are used for (financial) reporting and security access (via role)', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=134; +UPDATE AD_ELEMENT SET DESCRIPTION='Trees are used for (financial) reporting', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID IN (131,135,136,137,2514,2515); +UPDATE AD_ELEMENT SET HELP='A Callout allow you to create Java extensions to perform certain tasks always after a value changed. Callouts should not be used for validation but consequences of a user selecting a certain value. +The callout is a Java class implementing org.compiere.model.Callout and a method name to call. Example: "org.compiere.model.CalloutRequest.copyText" instantiates the class "CalloutRequest" and calls the method "copyText". You can have multiple callouts by separating them via a semicolon', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=224; +UPDATE AD_ELEMENT SET HELP='The Costing Method indicates how costs will be calculated (Standard, Average, Lifo, FiFo). The default costing method is defined on accounting schema level and can be optionally overwritten in the product category. The costing method cannot conflict with the Material Movement Policy (defined on Product Category).', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=241; +UPDATE AD_ELEMENT SET NAME='Records deletable',PRINTNAME='Records deletable', HELP='The Records Deletable checkbox indicates if a record can be deleted from the database. If records cannot be deleted, you can only deselect the Active flag', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=366; +UPDATE AD_ELEMENT SET HELP='The Sales Rep checkbox indicates if this business partner is a sales representative. A sales representative may also be an employee, but does not need to be.' +, PO_HELP='The Sales Rep checkbox indicates if this business partner is a company agent. A company agent may also be an employee, but does not need to be.' +, UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=409; +UPDATE AD_ELEMENT SET NAME='Updatable',PRINTNAME='Updatable', HELP='The Updatable checkbox indicates if a field can be updated by the user.', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=422; +UPDATE AD_ELEMENT SET NAME='User updatable',PRINTNAME='User updatable', HELP='The User Updatable checkbox indicate if the user can update this field.', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=423; +UPDATE AD_ELEMENT SET HELP='The Credit Limit indicates the total amount allowed "on account" in primary accounting currency. If the Credit Limit is 0, no check is performed. Credit Management is based on the Total Open Amount, which includes Vendor activities.', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=553; +UPDATE AD_ELEMENT SET HELP='The Order is a control document. The Order is complete when the quantity ordered is the same as the quantity shipped and invoiced. When you close an order, unshipped (backordered) quantities are cancelled.' +, PO_HELP='The Purchase Order is a control document. The Purchase Order is complete when the quantity ordered is the same as the quantity shipped and invoiced. When you close an order, unshipped (backordered) quantities are cancelled.' +, UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=558; +UPDATE AD_ELEMENT SET HELP='The Enforce Price Limit check box indicates that prices cannot be below the limit price in Orders and Invoices. This can be overwritten, if the role allows this.', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=882; +UPDATE AD_ELEMENT SET HELP='The SO Sub Type indicates the type of sales order this document refers to. This field only appears when the Document Base Type is Sales Order. The selection made here will determine which documents will be generated when an order is processed and which documents must be generated manually or in batches.
    +The following outlines this process.
    +SO Sub Type of Standard Order will generate just the Order document when the order is processed.
    +The Delivery Note, Invoice and Receipt must be generated via other processes.
    +SO Sub Type of Warehouse Order will generate the Order and Delivery Note.
    The Invoice and Receipt must be generated via other processes.
    +SO Sub Type of Credit Order will generate the Order, Delivery Note and Invoice.
    The Receipt must be generated via other processes.
    +SO Sub Type of POS (Point of Sale) will generate all document', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=1018; +UPDATE AD_ELEMENT SET DESCRIPTION='Account for Vendor Service Liability', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=1057; +UPDATE AD_ELEMENT SET HELP='The Days After Due Date indicates the number of days after the payment due date to initiate dunning. If the number is negative, it includes not the not due invoices.', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=1092; +UPDATE AD_ELEMENT SET HELP='The Relative Priority indicates the location to pick from first if an product is stored in more than one location. (100 = highest priority, 0 = lowest). For outgoing shipments, the location is picked with the highest priority where the entire quantity can be shipped from. If there is no location, the location with the highest priority is used. +The Priority is ignored for products with Guarantee Date (always the oldest first) or if a specific instance is selected. +Incoming receipts are stored at the location with the highest priority, if not explicitly selected.', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=1145; +UPDATE AD_ELEMENT SET HELP='When processing a web order, a confirmation is sent to the EMail address of the customer from the request EMail address copying this email address when entered.', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=1993; +UPDATE AD_ELEMENT SET HELP='Web Click Details', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2007; +UPDATE AD_ELEMENT SET HELP='Attributes are specific to a Product Attribute Set (e.g. Size for T-Shirts: S,M,L). If you have multiple attributes and want to search under a common attribute, you define a search attribute. Example: have one Size search attribute combining the values of all different sizes (Size for Dress Shirt XL,L,M,S,XS). The Attribute Search allows you to have all values available for selection. This eases the maintenance of the individual product attribute.', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2025; +UPDATE AD_ELEMENT SET DESCRIPTION='Included Tab in this Tab (Master Detail)', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2026; +UPDATE AD_ELEMENT SET HELP='Internal (Operating System) Name of the Printer; Please mote that the printer name may be different on different clients. Enter a printer name, which applies to ALL clients (e.g. printer on a server).

    +If none is entered, the default printer is used. You specify your default printer when you log in. You can also change the default printer in Preferences.', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2051; +UPDATE AD_ELEMENT SET DESCRIPTION='Assignment to (transaction) Organization', HELP='Assignment to the transaction organization (cost center).', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2072; +UPDATE AD_ELEMENT SET HELP='"You can purchase professional support from Adempiere, Inc. or their partners. See http://www.adempiere.com for details. +"', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2124; +UPDATE AD_ELEMENT SET HELP='The Type of data Replication determines the direction of the data replication.
    +Reference means that the data in this system is read only ->
    +Local means that the data in this system is not replicated to other systems -
    +Merge means that the data in this system is synchronized with the other system <->
    ', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2137; +UPDATE AD_ELEMENT SET HELP='If selected, public users can read/view the entry. Public are users without a Role in the system. Use security rules for more specific access control.', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2139; +UPDATE AD_ELEMENT SET HELP='If selected, public users can write/create entries. Public are users without a Role in the system. Use security rules for more specific access control.', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2140; +UPDATE AD_ELEMENT SET HELP='Set up knowledge categories and values as a search aid. Examples are Release Version, Product Area, etc. Knowledge Category values act like keywords.', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2141; +UPDATE AD_ELEMENT SET DESCRIPTION='Related Entry for this Entry' +, HELP='Related Knowledge Entry for this Knowledge Entry' +, UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2145; +UPDATE AD_ELEMENT SET HELP='The Source of a Knowledge Entry is a pointer to the originating system. The Knowledge Entry has an additional entry (Description URL) for more detailed info.', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2146; +UPDATE AD_ELEMENT SET DESCRIPTION='Knowledge Keyword Synonym', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2147; +UPDATE AD_ELEMENT SET HELP='Topic or Discussion Thead', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2148; +UPDATE AD_ELEMENT SET NAME='Knowledge Type', HELP='Area of knowledge - A Type has multiple Topics', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2149; +UPDATE AD_ELEMENT SET DESCRIPTION='Name of the Project Cycle Step', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2165; +UPDATE AD_ELEMENT SET DESCRIPTION='Minimum Amount in Document Currency', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2177; +UPDATE AD_ELEMENT SET DESCRIPTION='Minimum number of guarantee days', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2197; +UPDATE AD_ELEMENT SET HELP='If a line is Description Only, e.g. Product Inventory is not corrected. No accounting transactions are created and the amount or totals are not included in the document. This for including descriptive detail lines, e.g. for an Work Order.', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2183; +UPDATE AD_ELEMENT SET HELP='This allows to have the three general situations of "not open" - "open" - "closed"', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2201; +UPDATE AD_ELEMENT SET NAME='Calculate Maximum (?)', DESCRIPTION='Calculate the maximum amount', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2207; +UPDATE AD_ELEMENT SET HELP='A running total creates a sum at the end of a page and on the top of the next page for all columns, which have a Sum function. You should define running total only once per format.', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2212; +UPDATE AD_ELEMENT SET DESCRIPTION='Electronic Funds Transfer Payee Account Information', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2233; +UPDATE AD_ELEMENT SET DESCRIPTION='Shelf Life Days remaining to Guarantee Date (minus minimum guarantee days)', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2237; +UPDATE AD_ELEMENT SET HELP='Minimum Shelf Life of products with Guarantee Date instance. If > 0 you cannot select products with a shelf life ((Guarantee Date-Today) / Guarantee Days) less than the minimum shelf life, unless you select "Show All"', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2240; +UPDATE AD_ELEMENT SET HELP='Minimum Shelf Life of products with Guarantee Date instance. If > 0 you cannot select products with a shelf life less than the minimum shelf life, unless you select "Show All"', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2264; +UPDATE AD_ELEMENT SET DESCRIPTION='If selected, the product is displayed in the initial or any empty search' +, HELP='In the display of products in the Web Store, the product is displayed in the initial view or if no search criteria are entered. To be displayed, the product must be in the price list used.' +, UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2277; +UPDATE AD_ELEMENT SET HELP='The loader definition provides the parameters to load bank statements from EFT formats like SWIFT (MT940) or OFX', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2283; +UPDATE AD_ELEMENT SET DESCRIPTION='Date format used in the input format', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2286; +UPDATE AD_ELEMENT SET HELP='Activity Result of the execution of the Workflow Process Instance', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2308; +UPDATE AD_ELEMENT SET HELP='History of changes of the Workflow Process Activity', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2310; +UPDATE AD_ELEMENT SET HELP='Semantics for multiple outgoing Transitions for a Node/Activity. AND represents multiple concurrent threads - XOR represents the first transition with a true Transition condition.', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2337; +UPDATE AD_ELEMENT SET HELP='You can create a bid for a topic. Depending on the type, the highest bidder wins the Topic - or you participate in funding for a Topic.', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2360; +UPDATE AD_ELEMENT SET HELP='Available Funds (from Payments) and Committed or Uncommitted funds for Bids', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2362; +UPDATE AD_ELEMENT SET HELP='Available Funds (for Payments) and Committed or Uncommitted funds from Offers', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2364; +UPDATE AD_ELEMENT SET DESCRIPTION='An Error occurred in the execution', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2395; +UPDATE AD_ELEMENT SET DESCRIPTION='The response can have just the total amount for the RfQ', HELP='If not selected, the response must be provided per line', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2403; +UPDATE AD_ELEMENT SET DESCRIPTION='Are Responses to the Request for Quotation accepted', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2404; +UPDATE AD_ELEMENT SET DESCRIPTION='The response is the selected winner', HELP='The response is the selected winner. If selected on Response level, the line selections are ignored.', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2405; +UPDATE AD_ELEMENT SET DESCRIPTION='Product used to determine the price of the membership for the topic type', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2415; +UPDATE AD_ELEMENT SET HELP='Consecutive range to', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2455; +UPDATE AD_ELEMENT SET HELP='Define the method how the next occurrence is calculated', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2457; +UPDATE AD_ELEMENT SET HELP='If selected and if the window / tab is not read only, you can always update the column. This might be useful for comments, etc.', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2468; +UPDATE AD_ELEMENT SET DESCRIPTION='Elapsed Time in milli seconds', HELP='Elapsed Time in milli seconds', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2474; +UPDATE AD_ELEMENT SET DESCRIPTION='Distribution Run Lines define Distribution List, the Product and Quantities', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2486; +UPDATE AD_ELEMENT SET HELP='Maintain and allow to transfer general statistics (number of clients, orgs, business partners, users, products, invoices) to get a better feeling for the application use. This information is not published.', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2489; +UPDATE AD_ELEMENT SET HELP='Forecast of Product Quantity by Period', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2499; +UPDATE AD_ELEMENT SET HELP='The Total Open Balance Amount is the calculated open item amount for Customer and Vendor activity. If the Balance is below zero, we owe the Business Partner. The amount is used for Credit Management. +Invoices and Payment Allocations determine the Open Balance (i.e. not Orders or Payments).', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2562; +UPDATE AD_ELEMENT SET HELP='The Attribute Value type determines the data/validation type', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2574; +UPDATE AD_ELEMENT SET DESCRIPTION='Value set by Migration for post-Migration tasks.', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2625; +UPDATE AD_ELEMENT SET DESCRIPTION='Type of Workflow', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2626; +UPDATE AD_ELEMENT SET HELP='When a document is due for too long without activity, a reminder is sent. 0 means no reminders. +The Remind Days are the days when the next email reminder is sent.', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2631; +UPDATE AD_ELEMENT SET HELP='Internal name of the transaction', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2655; +UPDATE AD_ELEMENT SET HELP='List of classes implementing the interface org.compiere.model.ModelValidator, separated by semicolon. +The class is called for the client and allows to validate documents in the prepare stage and monitor model changes.', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2670; +UPDATE AD_ELEMENT SET HELP='This allows to have multiple closed status', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2723; +UPDATE AD_ELEMENT SET HELP='The EMail address is used to send mails to users of the web store', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2731; +UPDATE AD_ELEMENT SET DESCRIPTION='Assignment of Employee (User) to Job Position', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2763; +UPDATE AD_ELEMENT SET HELP='Subscriber to invite to respond to RfQs', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2377; +UPDATE AD_ELEMENT SET HELP='Once per operation', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2779; +UPDATE AD_ELEMENT SET HELP='Change requests for a Bill of Materials. They can be automatically created from Requests, if enabled in the Request Type and the Request Group refers to a Bill of Materials', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2785; +UPDATE AD_ELEMENT SET HELP='The Bill of Material Component determines what products, services and outside processing is included in producing the Product. It references the operation and determines it''s sequence.', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2786; +UPDATE AD_ELEMENT SET HELP='Phantom Component are not stored and produced with the product. This is an option to avoid maintaining an Engineering and Manufacturing Bill of Materials.', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2788; +UPDATE AD_ELEMENT SET DESCRIPTION='Optional Lead Time offset before starting production', HELP='Optional Lead Time offset before starting production', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2789; +UPDATE AD_ELEMENT SET HELP='If selected, the user has full access to the Business Partner (BP) information (Business Documents like Orders, Invoices - Requests) or resources (Assets, Downloads). If you deselect it, the user has no access rights unless, you explicitly grant it in tab "BP Access"', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2835; +UPDATE AD_ELEMENT SET DESCRIPTION='User/contact access to Business Partner information and resources', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2836; +UPDATE AD_ELEMENT SET HELP='If selected, the accounting consequences are immediately generated when completing a document. Otherwise the document is posted by a batch process. You should select this only if you are testing.', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2843; +UPDATE AD_ELEMENT SET HELP='Note that the cost queue may not be the same as the physical movement cost queue due to differences in costing level and warehouse priority.', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2845; +UPDATE AD_ELEMENT SET HELP='Account used for posting matched product (item) expenses (e.g. AP Invoice, Invoice Match). You would use a different account then Product Expense, if you want to differentiate service related costs from item related costs. The balance on the clearing account should be zero and accounts for the timing difference between invoice receipt and matching.', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2847; +UPDATE AD_ELEMENT SET HELP='If selected, you will post service related revenue to a different receivables account and service related cost to a different payables account.', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2849; +UPDATE AD_ELEMENT SET HELP='Enter the number of records the query will return without confirmation to avoid unnecessary system load. If 0, the system default of 500 is used.', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2853; +UPDATE AD_ELEMENT SET HELP='Enter the number of records a user will be able to query to avoid unnecessary system load. If 0, no restrictions are imposed.', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2854; +UPDATE AD_ELEMENT SET HELP='The Posting Type Commitments is created when posting Purchase Orders; The Posting Type Reservation is created when posting Requisitions. This is used for budgetary control.', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2860; +UPDATE AD_ELEMENT SET HELP='Accounting related information for reconciliation with documents. It includes all revenue/expense and tax entries as a base for detail reporting', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2864; +UPDATE AD_ELEMENT SET HELP='If selected AP tax is handled as expense, otherwise it is handled as a VAT credit.', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2870; +UPDATE AD_ELEMENT SET HELP='Budget Control allows you to restrict the use of expenditures, commitments (Purchase Orders) and reservations (Requisitions). If defined, you may not be able to approve Requisitions, Purchase Orders, or AP Invoices.', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2871; +UPDATE AD_ELEMENT SET HELP='A user defined accounting element refers to a Adempiere table. This allows to use any table content as an accounting dimension (e.g. Project Task). Note that User Elements are optional and are populated from the context of the document (i.e. not requested)', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID IN (2877,2878); +UPDATE AD_ELEMENT SET HELP='Visual representation of performance by color. The Schema has often three levels (e.g. red-yellow-green). Adempiere support two levels (e.g. red-green) or four levels (e.g. gray-bronze-silver-gold). Note that Measures without a goal are represented white. The percentages could be between 0 and unlimited (i.e. above 100%).', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2903; +UPDATE AD_ELEMENT SET DESCRIPTION='Performance Ratio', HELP='Calculation instruction set for a performance ratio', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2919; +UPDATE AD_ELEMENT SET DESCRIPTION='Performance Ratio Used', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2929; +UPDATE AD_ELEMENT SET NAME='Next Maintenance',PRINTNAME='Next Maintenance', DESCRIPTION='Next Maintenance Date', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2932; +UPDATE AD_ELEMENT SET DESCRIPTION='Next Maintenance Unit', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2934; +UPDATE AD_ELEMENT SET HELP='The Meta Robots Tag define on how a search engines robot should handle this page and the following ones. It defines two keywords: (NO)INDEX which defines whether or not to index this content and (NO)FOLLOW which defines whether or not to follow links. The most common combination is INDEX,FOLLOW which will force a search robot to index the content and follow links and images.', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2975; +UPDATE AD_ELEMENT SET DESCRIPTION='Contains list of elements separated by CR', HELP='Contains a list of elements this template uses separated by a Carriage Return. Last line should be empty', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2983; +UPDATE AD_ELEMENT SET HELP='A Container defines the abstract level around the content, it defines how the content gets displayed, indexed and stored.', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2985; +UPDATE AD_ELEMENT SET DESCRIPTION='External Link (URL) for the Container', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2988; +UPDATE AD_ELEMENT SET HELP='This table contains all the media content like images, flash movies etc.', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2997; +UPDATE AD_ELEMENT SET HELP='If we have a block in content where announce content and also sponsored links we should mention the sponsored ones', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=3007; +UPDATE AD_ELEMENT SET HELP='Media Server list to which content should get transferred', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=3009; +UPDATE AD_ELEMENT SET HELP='A container element defines the smallest definition of content, i.e. the headline, the content etc.', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID IN (3013,3023); +UPDATE AD_ELEMENT SET HELP='The date the revenue recognition starts.', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=3032; +UPDATE AD_ELEMENT SET DESCRIPTION='Container Stage Template Table', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=3050; +UPDATE AD_ELEMENT SET HELP='The entity type determines the ownership of Application Dictionary entries. The types "Dictionary" and "Adempiere" should not be used and are maintained by Adempiere (i.e. all changes are reversed during migration to the current definition).', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=3052; +UPDATE AD_ELEMENT SET HELP='If your application requires additional jar files, enter them here. The jar files must be located in the $ADEMPIERE_HOME/lib directory.', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=3054; +UPDATE AD_ELEMENT SET HELP='Keyword not to be indexed, optional restricted to specific Document Type, Container or Request Type', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=3078; +UPDATE AD_ELEMENT SET DESCRIPTION='Open Debit in document currency & rate', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=3083; +UPDATE AD_ELEMENT SET DESCRIPTION='Open Credit in document currency & rate', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=3084; +UPDATE AD_ELEMENT SET DESCRIPTION='Open Balance in document currency & rate', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=3085; +UPDATE AD_ELEMENT SET HELP='The dunning letter with this level includes all due invoices.', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=3088; +UPDATE AD_ELEMENT SET HELP='The dunning letter with this level includes all not due invoices.', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=3089; +UPDATE AD_ELEMENT SET HELP='The LDAP Server allows third party software (e.g. Apache) to use the users defined in the system to authenticate and authorize them. There is only one server per Adempiere system. The "o" is the Client key and the optional "ou" is the Interest Area key.', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=3093; +UPDATE AD_ELEMENT SET PRINTNAME=NAME, DESCRIPTION='Table to check whether the migration script has been applied', UPDATED=TO_DATE('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=53350; +COMMIT; diff --git a/migration/354a-trunk/oracle/665_FR2952245_ImportDataPlanning.sql b/migration/354a-trunk/oracle/665_FR2952245_ImportDataPlanning.sql new file mode 100644 index 0000000000..ea155f3c97 --- /dev/null +++ b/migration/354a-trunk/oracle/665_FR2952245_ImportDataPlanning.sql @@ -0,0 +1,2069 @@ +-- Feb 15, 2010 1:05:07 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Window (AD_Client_ID,AD_Org_ID,AD_Window_ID,Created,CreatedBy,EntityType,IsActive,IsBetaFunctionality,IsDefault,IsSOTrx,Name,Processing,Updated,UpdatedBy,WindowType) VALUES (0,0,53109,TO_DATE('2010-02-15 13:05:05','YYYY-MM-DD HH24:MI:SS'),0,'EE01','Y','N','N','Y','Import Product Planning','N',TO_DATE('2010-02-15 13:05:05','YYYY-MM-DD HH24:MI:SS'),0,'M') +; + +-- Feb 15, 2010 1:05:07 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Window_Trl (AD_Language,AD_Window_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Window_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Window t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Window_ID=53109 AND NOT EXISTS (SELECT * FROM AD_Window_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Window_ID=t.AD_Window_ID) +; + +-- Feb 15, 2010 1:05:11 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Table (AD_Client_ID,AD_Org_ID,AD_Table_ID,AD_Window_ID,AccessLevel,Created,CreatedBy,EntityType,IsActive,IsChangeLog,IsDeleteable,IsHighVolume,IsSecurityEnabled,IsView,Name,ReplicationType,TableName,Updated,UpdatedBy) VALUES (0,0,53260,53109,'2',TO_DATE('2010-02-15 13:05:09','YYYY-MM-DD HH24:MI:SS'),0,'EE01','Y','N','Y','N','N','N','Import Product Planning','L','I_ProductPlanning',TO_DATE('2010-02-15 13:05:09','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:05:11 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Table_Trl (AD_Language,AD_Table_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Table_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Table t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Table_ID=53260 AND NOT EXISTS (SELECT * FROM AD_Table_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Table_ID=t.AD_Table_ID) +; + +-- Feb 15, 2010 1:05:12 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Sequence (AD_Client_ID,AD_Org_ID,AD_Sequence_ID,Created,CreatedBy,CurrentNext,CurrentNextSys,Description,IncrementNo,IsActive,IsAudited,IsAutoSequence,IsTableID,Name,StartNewYear,StartNo,Updated,UpdatedBy) VALUES (0,0,53369,TO_DATE('2010-02-15 13:05:11','YYYY-MM-DD HH24:MI:SS'),0,1000000,50000,'Table I_ProductPlanning',1,'Y','N','Y','Y','I_ProductPlanning','N',1000000,TO_DATE('2010-02-15 13:05:11','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:05:13 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,54117,0,'I_ProductPlanning_ID',TO_DATE('2010-02-15 13:05:12','YYYY-MM-DD HH24:MI:SS'),0,'EE01','Y','Import Product Planning','Import Product Planning',TO_DATE('2010-02-15 13:05:12','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:05:13 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=54117 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID) +; + +-- Feb 15, 2010 1:05:14 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Reference SET Description='10 Digit Identifier', EntityType='D', Help=NULL, IsActive='Y', Name='ID', ValidationType='D',Updated=TO_DATE('2010-02-15 13:05:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Reference_ID=13 +; + +-- Feb 15, 2010 1:05:14 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Reference_Trl SET IsTranslated='N' WHERE AD_Reference_ID=13 +; + +-- Feb 15, 2010 1:05:15 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,58977,54117,0,13,53260,'I_ProductPlanning_ID',TO_DATE('2010-02-15 13:05:14','YYYY-MM-DD HH24:MI:SS'),0,'EE01',10,'Y','N','N','N','Y','Y','N','N','Y','N','N','Import Product Planning',TO_DATE('2010-02-15 13:05:14','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:05:15 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=58977 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:05:15 PM CST +-- Create new importer for Planning Data and Forecast +CREATE TABLE I_ProductPlanning (I_ProductPlanning_ID NUMBER(10) NOT NULL, CONSTRAINT I_ProductPlanning_Key PRIMARY KEY (I_ProductPlanning_ID)) +; + +-- Feb 15, 2010 1:05:16 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element SET ColumnName='AD_Client_ID', Description='Client/Tenant for this installation.', EntityType='D', Help='A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.', IsActive='Y', Name='Client', PO_Description=NULL, PO_Help=NULL, PO_Name=NULL, PO_PrintName=NULL, PrintName='Client',Updated=TO_DATE('2010-02-15 13:05:16','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Element_ID=102 +; + +-- Feb 15, 2010 1:05:16 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=102 +; + +-- Feb 15, 2010 1:05:17 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Reference SET Description='Direct Table Access', EntityType='D', Help=NULL, IsActive='Y', Name='Table Direct', ValidationType='D',Updated=TO_DATE('2010-02-15 13:05:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Reference_ID=19 +; + +-- Feb 15, 2010 1:05:17 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Reference_Trl SET IsTranslated='N' WHERE AD_Reference_ID=19 +; + +-- Feb 15, 2010 1:05:17 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,58978,102,0,19,53260,'AD_Client_ID',TO_DATE('2010-02-15 13:05:17','YYYY-MM-DD HH24:MI:SS'),0,'@AD_Client_ID@','Client/Tenant for this installation.','EE01',10,'A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','Y','N','N','N','N','Y','N','N','Y','N','N','Client',TO_DATE('2010-02-15 13:05:17','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:05:17 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=58978 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:05:18 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD AD_Client_ID NUMBER(10) NOT NULL +; + +-- Feb 15, 2010 1:05:18 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element SET ColumnName='AD_Org_ID', Description='Organizational entity within client', EntityType='D', Help='An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.', IsActive='Y', Name='Organization', PO_Description=NULL, PO_Help=NULL, PO_Name=NULL, PO_PrintName=NULL, PrintName='Organization',Updated=TO_DATE('2010-02-15 13:05:18','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Element_ID=113 +; + +-- Feb 15, 2010 1:05:18 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=113 +; + +-- Feb 15, 2010 1:05:19 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,58979,113,0,19,53260,'AD_Org_ID',TO_DATE('2010-02-15 13:05:18','YYYY-MM-DD HH24:MI:SS'),0,'@AD_Org_ID@','Organizational entity within client','EE01',10,'An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','Y','N','N','N','N','Y','N','N','Y','N','N','Organization',TO_DATE('2010-02-15 13:05:18','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:05:19 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=58979 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:05:19 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD AD_Org_ID NUMBER(10) NOT NULL +; + +-- Feb 15, 2010 1:05:19 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element SET ColumnName='Created', Description='Date this record was created', EntityType='D', Help='The Created field indicates the date that this record was created.', IsActive='Y', Name='Created', PO_Description=NULL, PO_Help=NULL, PO_Name=NULL, PO_PrintName=NULL, PrintName='Created',Updated=TO_DATE('2010-02-15 13:05:19','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Element_ID=245 +; + +-- Feb 15, 2010 1:05:19 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=245 +; + +-- Feb 15, 2010 1:05:19 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Reference SET Description='Date with time', EntityType='D', Help=NULL, IsActive='Y', Name='Date+Time', ValidationType='D',Updated=TO_DATE('2010-02-15 13:05:19','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Reference_ID=16 +; + +-- Feb 15, 2010 1:05:19 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Reference_Trl SET IsTranslated='N' WHERE AD_Reference_ID=16 +; + +-- Feb 15, 2010 1:05:20 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,58980,245,0,16,53260,'Created',TO_DATE('2010-02-15 13:05:19','YYYY-MM-DD HH24:MI:SS'),0,'Date this record was created','EE01',14,'The Created field indicates the date that this record was created.','Y','N','N','N','N','Y','N','N','Y','N','N','Created',TO_DATE('2010-02-15 13:05:19','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:05:20 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=58980 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:05:20 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD Created DATE NOT NULL +; + +-- Feb 15, 2010 1:05:20 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element SET ColumnName='CreatedBy', Description='User who created this records', EntityType='D', Help='The Created By field indicates the user who created this record.', IsActive='Y', Name='Created By', PO_Description=NULL, PO_Help=NULL, PO_Name=NULL, PO_PrintName=NULL, PrintName='Created By',Updated=TO_DATE('2010-02-15 13:05:20','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Element_ID=246 +; + +-- Feb 15, 2010 1:05:20 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=246 +; + +-- Feb 15, 2010 1:05:20 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Reference SET Description='10 Digit numeric', EntityType='D', Help=NULL, IsActive='Y', Name='Integer', ValidationType='D',Updated=TO_DATE('2010-02-15 13:05:20','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Reference_ID=11 +; + +-- Feb 15, 2010 1:05:20 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Reference_Trl SET IsTranslated='N' WHERE AD_Reference_ID=11 +; + +-- Feb 15, 2010 1:05:21 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,58981,246,0,11,53260,'CreatedBy',TO_DATE('2010-02-15 13:05:20','YYYY-MM-DD HH24:MI:SS'),0,'User who created this records','EE01',14,'The Created By field indicates the user who created this record.','Y','N','N','N','N','Y','N','N','Y','N','N','Created By',TO_DATE('2010-02-15 13:05:20','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:05:21 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=58981 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:05:21 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD CreatedBy NUMBER(10) NOT NULL +; + +-- Feb 15, 2010 1:05:21 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element SET ColumnName='IsActive', Description='The record is active in the system', EntityType='D', Help='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 reports. +There are two reasons for de-activating and not deleting records: +(1) The system requires the record for audit purposes. +(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.', IsActive='Y', Name='Active', PO_Description=NULL, PO_Help=NULL, PO_Name=NULL, PO_PrintName=NULL, PrintName='Active',Updated=TO_DATE('2010-02-15 13:05:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Element_ID=348 +; + +-- Feb 15, 2010 1:05:21 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=348 +; + +-- Feb 15, 2010 1:05:22 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Reference SET Description='CheckBox', EntityType='D', Help=NULL, IsActive='Y', Name='Yes-No', ValidationType='D',Updated=TO_DATE('2010-02-15 13:05:22','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Reference_ID=20 +; + +-- Feb 15, 2010 1:05:22 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Reference_Trl SET IsTranslated='N' WHERE AD_Reference_ID=20 +; + +-- Feb 15, 2010 1:05:22 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,58982,348,0,20,53260,'IsActive',TO_DATE('2010-02-15 13:05:22','YYYY-MM-DD HH24:MI:SS'),0,'Y','The record is active in the system','EE01',1,'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 reports. +There are two reasons for de-activating and not deleting records: +(1) The system requires the record for audit purposes. +(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.','Y','N','N','N','N','Y','N','N','Y','N','Y','Active',TO_DATE('2010-02-15 13:05:22','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:05:22 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=58982 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:05:22 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD IsActive CHAR(1) DEFAULT 'Y' CHECK (IsActive IN ('Y','N')) NOT NULL +; + +-- Feb 15, 2010 1:05:23 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element SET ColumnName='Updated', Description='Date this record was updated', EntityType='D', Help='The Updated field indicates the date that this record was updated.', IsActive='Y', Name='Updated', PO_Description=NULL, PO_Help=NULL, PO_Name=NULL, PO_PrintName=NULL, PrintName='Updated',Updated=TO_DATE('2010-02-15 13:05:23','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Element_ID=607 +; + +-- Feb 15, 2010 1:05:23 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=607 +; + +-- Feb 15, 2010 1:05:24 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,58983,607,0,16,53260,'Updated',TO_DATE('2010-02-15 13:05:23','YYYY-MM-DD HH24:MI:SS'),0,'Date this record was updated','EE01',7,'The Updated field indicates the date that this record was updated.','Y','N','N','N','N','Y','N','N','Y','N','N','Updated',TO_DATE('2010-02-15 13:05:23','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:05:24 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=58983 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:05:24 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD Updated DATE NOT NULL +; + +-- Feb 15, 2010 1:05:24 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element SET ColumnName='UpdatedBy', Description='User who updated this records', EntityType='D', Help='The Updated By field indicates the user who updated this record.', IsActive='Y', Name='Updated By', PO_Description=NULL, PO_Help=NULL, PO_Name=NULL, PO_PrintName=NULL, PrintName='Updated By',Updated=TO_DATE('2010-02-15 13:05:24','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Element_ID=608 +; + +-- Feb 15, 2010 1:05:24 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=608 +; + +-- Feb 15, 2010 1:05:25 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,58984,608,0,11,53260,'UpdatedBy',TO_DATE('2010-02-15 13:05:24','YYYY-MM-DD HH24:MI:SS'),0,'User who updated this records','EE01',14,'The Updated By field indicates the user who updated this record.','Y','N','N','N','N','Y','N','N','Y','N','N','Updated By',TO_DATE('2010-02-15 13:05:24','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:05:25 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=58984 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:05:25 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD UpdatedBy NUMBER(10) NOT NULL +; + +-- Feb 15, 2010 1:05:25 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element SET ColumnName='BPartner_Value', Description='The Key of the Business Partner', EntityType='D', Help=NULL, IsActive='Y', Name='Business Partner Key', PO_Description=NULL, PO_Help=NULL, PO_Name=NULL, PO_PrintName=NULL, PrintName='Partner Key',Updated=TO_DATE('2010-02-15 13:05:25','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Element_ID=1906 +; + +-- Feb 15, 2010 1:05:25 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=1906 +; + +-- Feb 15, 2010 1:05:25 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Reference SET Description='Character String', EntityType='D', Help=NULL, IsActive='Y', Name='String', ValidationType='D',Updated=TO_DATE('2010-02-15 13:05:25','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Reference_ID=10 +; + +-- Feb 15, 2010 1:05:25 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Reference_Trl SET IsTranslated='N' WHERE AD_Reference_ID=10 +; + +-- Feb 15, 2010 1:05:26 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,58985,1906,0,10,53260,'BPartner_Value',TO_DATE('2010-02-15 13:05:25','YYYY-MM-DD HH24:MI:SS'),0,'The Key of the Business Partner','EE01',40,'Y','N','N','N','N','N','N','N','Y','N','Y','Business Partner Key',TO_DATE('2010-02-15 13:05:25','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:05:26 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=58985 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:05:26 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD BPartner_Value NVARCHAR2(40) DEFAULT NULL +; + +-- Feb 15, 2010 1:05:26 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element SET ColumnName='C_BPartner_ID', Description='Identifies a Business Partner', EntityType='D', Help='A Business Partner is anyone with whom you transact. This can include Vendor, Customer, Employee or Salesperson', IsActive='Y', Name='Business Partner ', PO_Description=NULL, PO_Help=NULL, PO_Name=NULL, PO_PrintName=NULL, PrintName='Business Partner ',Updated=TO_DATE('2010-02-15 13:05:26','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Element_ID=187 +; + +-- Feb 15, 2010 1:05:26 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=187 +; + +-- Feb 15, 2010 1:05:26 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Reference SET Description='Search Field', EntityType='D', Help=NULL, IsActive='Y', Name='Search', ValidationType='D',Updated=TO_DATE('2010-02-15 13:05:26','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Reference_ID=30 +; + +-- Feb 15, 2010 1:05:26 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Reference_Trl SET IsTranslated='N' WHERE AD_Reference_ID=30 +; + +-- Feb 15, 2010 1:05:27 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,58986,187,0,30,53260,'C_BPartner_ID',TO_DATE('2010-02-15 13:05:26','YYYY-MM-DD HH24:MI:SS'),0,'Identifies a Business Partner','EE01',22,'A Business Partner is anyone with whom you transact. This can include Vendor, Customer, Employee or Salesperson','Y','N','N','N','N','N','N','N','Y','N','Y','Business Partner ',TO_DATE('2010-02-15 13:05:26','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:05:27 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=58986 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:05:27 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD C_BPartner_ID NUMBER(10) DEFAULT NULL +; + +-- Feb 15, 2010 1:05:27 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element SET ColumnName='I_ErrorMsg', Description='Messages generated from import process', EntityType='D', Help='The Import Error Message displays any error messages generated during the import process.', IsActive='Y', Name='Import Error Message', PO_Description=NULL, PO_Help=NULL, PO_Name=NULL, PO_PrintName=NULL, PrintName='Import Error Message',Updated=TO_DATE('2010-02-15 13:05:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Element_ID=912 +; + +-- Feb 15, 2010 1:05:27 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=912 +; + +-- Feb 15, 2010 1:05:28 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,58987,912,0,10,53260,'I_ErrorMsg',TO_DATE('2010-02-15 13:05:27','YYYY-MM-DD HH24:MI:SS'),0,'Messages generated from import process','EE01',2000,'The Import Error Message displays any error messages generated during the import process.','Y','N','N','N','N','N','N','N','Y','N','Y','Import Error Message',TO_DATE('2010-02-15 13:05:27','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:05:28 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=58987 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:05:29 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD I_ErrorMsg NVARCHAR2(2000) DEFAULT NULL +; + +-- Feb 15, 2010 1:05:29 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element SET ColumnName='I_IsImported', Description='Has this import been processed', EntityType='D', Help='The Imported check box indicates if this import has been processed.', IsActive='Y', Name='Imported', PO_Description=NULL, PO_Help=NULL, PO_Name=NULL, PO_PrintName=NULL, PrintName='Imported',Updated=TO_DATE('2010-02-15 13:05:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Element_ID=913 +; + +-- Feb 15, 2010 1:05:29 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=913 +; + +-- Feb 15, 2010 1:05:30 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,58988,913,0,20,53260,'I_IsImported',TO_DATE('2010-02-15 13:05:29','YYYY-MM-DD HH24:MI:SS'),0,'Has this import been processed','EE01',1,'The Imported check box indicates if this import has been processed.','Y','N','N','N','N','Y','N','N','Y','N','Y','Imported',TO_DATE('2010-02-15 13:05:29','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:05:30 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=58988 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:05:30 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD I_IsImported CHAR(1) CHECK (I_IsImported IN ('Y','N')) NOT NULL +; + +-- Feb 15, 2010 1:05:30 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element SET ColumnName='Processed', Description='The document has been processed', EntityType='D', Help='The Processed checkbox indicates that a document has been processed.', IsActive='Y', Name='Processed', PO_Description=NULL, PO_Help=NULL, PO_Name=NULL, PO_PrintName=NULL, PrintName='Processed',Updated=TO_DATE('2010-02-15 13:05:30','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Element_ID=1047 +; + +-- Feb 15, 2010 1:05:30 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=1047 +; + +-- Feb 15, 2010 1:05:30 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,58989,1047,0,20,53260,'Processed',TO_DATE('2010-02-15 13:05:30','YYYY-MM-DD HH24:MI:SS'),0,'The document has been processed','EE01',1,'The Processed checkbox indicates that a document has been processed.','Y','N','N','N','N','N','N','N','Y','N','N','Processed',TO_DATE('2010-02-15 13:05:30','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:05:30 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=58989 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:05:31 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD Processed CHAR(1) DEFAULT NULL CHECK (Processed IN ('Y','N')) +; + +-- Feb 15, 2010 1:05:31 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element SET ColumnName='Processing', Description=NULL, EntityType='D', Help=NULL, IsActive='Y', Name='Process Now', PO_Description=NULL, PO_Help=NULL, PO_Name=NULL, PO_PrintName=NULL, PrintName='Process Now',Updated=TO_DATE('2010-02-15 13:05:31','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Element_ID=524 +; + +-- Feb 15, 2010 1:05:31 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=524 +; + +-- Feb 15, 2010 1:05:31 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Reference SET Description='Command Button - starts a process', EntityType='D', Help=NULL, IsActive='Y', Name='Button', ValidationType='D',Updated=TO_DATE('2010-02-15 13:05:31','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Reference_ID=28 +; + +-- Feb 15, 2010 1:05:31 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Reference_Trl SET IsTranslated='N' WHERE AD_Reference_ID=28 +; + +-- Feb 15, 2010 1:05:32 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Process (AD_Client_ID,AD_Org_ID,AD_Process_ID,AccessLevel,Classname,Created,CreatedBy,Description,EntityType,Help,IsActive,IsBetaFunctionality,IsDirectPrint,IsReport,Name,ShowHelp,Statistic_Count,Statistic_Seconds,Updated,UpdatedBy,Value,WorkflowValue) VALUES (0,0,53200,'3','org.eevolution.process.ImportProductPlanning',TO_DATE('2010-02-15 13:05:31','YYYY-MM-DD HH24:MI:SS'),0,'Import Product Planning and Forecast','EE01','Import and update product planning data and forecast','Y','N','N','N','Import Product Planning and Forecast','Y',0,0,TO_DATE('2010-02-15 13:05:31','YYYY-MM-DD HH24:MI:SS'),0,'Import_ProductPlanning',NULL) +; + +-- Feb 15, 2010 1:05:32 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Process_Trl (AD_Language,AD_Process_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Process_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Process t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Process_ID=53200 AND NOT EXISTS (SELECT * FROM AD_Process_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Process_ID=t.AD_Process_ID) +; + +-- Feb 15, 2010 1:05:33 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Process_Para (AD_Client_ID,AD_Element_ID,AD_Org_ID,AD_Process_ID,AD_Process_Para_ID,AD_Reference_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,IsActive,IsCentrallyMaintained,IsMandatory,IsRange,Name,SeqNo,Updated,UpdatedBy) VALUES (0,1922,0,53200,53402,20,'DeleteOldImported',TO_DATE('2010-02-15 13:05:32','YYYY-MM-DD HH24:MI:SS'),0,'Before processing delete old imported records in the import table','EE01',0,'Y','Y','N','N','Delete old imported records',30,TO_DATE('2010-02-15 13:05:32','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:05:33 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Process_Para_Trl (AD_Language,AD_Process_Para_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Process_Para_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Process_Para t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Process_Para_ID=53402 AND NOT EXISTS (SELECT * FROM AD_Process_Para_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Process_Para_ID=t.AD_Process_Para_ID) +; + +-- Feb 15, 2010 1:05:34 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Process_Para (AD_Client_ID,AD_Element_ID,AD_Org_ID,AD_Process_ID,AD_Process_Para_ID,AD_Reference_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,IsActive,IsCentrallyMaintained,IsMandatory,IsRange,Name,SeqNo,Updated,UpdatedBy) VALUES (0,2169,0,53200,53403,20,'IsImportOnlyNoErrors',TO_DATE('2010-02-15 13:05:33','YYYY-MM-DD HH24:MI:SS'),0,'Y','Only start the import, if there are no validation Errors','EE01',0,'Y','Y','N','N','Import only if No Errors',60,TO_DATE('2010-02-15 13:05:33','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:05:34 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Process_Para_Trl (AD_Language,AD_Process_Para_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Process_Para_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Process_Para t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Process_Para_ID=53403 AND NOT EXISTS (SELECT * FROM AD_Process_Para_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Process_Para_ID=t.AD_Process_Para_ID) +; + +-- Feb 15, 2010 1:05:35 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Process_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,58990,524,0,53200,28,53260,'Processing',TO_DATE('2010-02-15 13:05:34','YYYY-MM-DD HH24:MI:SS'),0,'EE01',1,'Y','N','N','N','N','N','N','N','Y','N','Y','Process Now',TO_DATE('2010-02-15 13:05:34','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:05:35 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=58990 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:05:35 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD Processing CHAR(1) DEFAULT NULL +; + +-- Feb 15, 2010 1:05:35 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element SET ColumnName='AD_Workflow_ID', Description='Workflow or combination of tasks', EntityType='D', Help='The Workflow field identifies a unique Workflow in the system.', IsActive='Y', Name='Workflow', PO_Description=NULL, PO_Help=NULL, PO_Name=NULL, PO_PrintName=NULL, PrintName='Workflow',Updated=TO_DATE('2010-02-15 13:05:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Element_ID=144 +; + +-- Feb 15, 2010 1:05:35 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=144 +; + +-- Feb 15, 2010 1:05:35 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Reference SET Description='Table List', EntityType='D', Help=NULL, IsActive='Y', Name='Table', ValidationType='D',Updated=TO_DATE('2010-02-15 13:05:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Reference_ID=18 +; + +-- Feb 15, 2010 1:05:35 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Reference_Trl SET IsTranslated='N' WHERE AD_Reference_ID=18 +; + +-- Feb 15, 2010 1:05:36 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Val_Rule SET Code='WorkflowType=''M''', Description=NULL, EntityType='EE01', IsActive='Y', Name='AD_Workflow Manufacturing', Type='S',Updated=TO_DATE('2010-02-15 13:05:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Val_Rule_ID=52003 +; + +-- Feb 15, 2010 1:05:40 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,AD_Val_Rule_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,58991,144,0,18,53260,52003,'AD_Workflow_ID',TO_DATE('2010-02-15 13:05:36','YYYY-MM-DD HH24:MI:SS'),0,'Workflow or combination of tasks','EE01',22,'The Workflow field identifies a unique Workflow in the system.','Y','N','N','N','N','N','N','N','Y','N','Y','Workflow',TO_DATE('2010-02-15 13:05:36','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:05:40 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=58991 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:05:40 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD AD_Workflow_ID NUMBER(10) DEFAULT NULL +; + +-- Feb 15, 2010 1:05:40 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element SET ColumnName='DD_NetworkDistribution_ID', Description=NULL, EntityType='EE01', Help=NULL, IsActive='Y', Name='Network Distribution', PO_Description=NULL, PO_Help=NULL, PO_Name=NULL, PO_PrintName=NULL, PrintName='Network Distribution',Updated=TO_DATE('2010-02-15 13:05:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Element_ID=53340 +; + +-- Feb 15, 2010 1:05:40 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=53340 +; + +-- Feb 15, 2010 1:05:41 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,58992,53340,0,18,53260,'DD_NetworkDistribution_ID',TO_DATE('2010-02-15 13:05:40','YYYY-MM-DD HH24:MI:SS'),0,'EE01',22,'Y','N','N','N','N','N','N','N','Y','N','Y','Network Distribution',TO_DATE('2010-02-15 13:05:40','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:05:41 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=58992 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:05:41 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD DD_NetworkDistribution_ID NUMBER(10) DEFAULT NULL +; + +-- Feb 15, 2010 1:05:41 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element SET ColumnName='DeliveryTime_Promised', Description='Promised days between order and delivery', EntityType='D', Help='The Promised Delivery Time indicates the number of days between the order date and the date that delivery was promised.', IsActive='Y', Name='Promised Delivery Time', PO_Description=NULL, PO_Help=NULL, PO_Name=NULL, PO_PrintName=NULL, PrintName='Promised Delivery Time',Updated=TO_DATE('2010-02-15 13:05:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Element_ID=1256 +; + +-- Feb 15, 2010 1:05:41 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=1256 +; + +-- Feb 15, 2010 1:05:41 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Reference SET Description='Quantity data type', EntityType='D', Help=NULL, IsActive='Y', Name='Quantity', ValidationType='D',Updated=TO_DATE('2010-02-15 13:05:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Reference_ID=29 +; + +-- Feb 15, 2010 1:05:41 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Reference_Trl SET IsTranslated='N' WHERE AD_Reference_ID=29 +; + +-- Feb 15, 2010 1:05:42 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,58993,1256,0,29,53260,'DeliveryTime_Promised',TO_DATE('2010-02-15 13:05:41','YYYY-MM-DD HH24:MI:SS'),0,'Promised days between order and delivery','EE01',10,'The Promised Delivery Time indicates the number of days between the order date and the date that delivery was promised.','Y','N','N','N','N','N','N','N','Y','N','Y','Promised Delivery Time',TO_DATE('2010-02-15 13:05:41','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:05:42 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=58993 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:05:42 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD DeliveryTime_Promised NUMBER DEFAULT NULL +; + +-- Feb 15, 2010 1:05:42 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element SET ColumnName='IsCreatePlan', Description='Indicates whether planned orders will be generated by MRP', EntityType='EE01', Help='Indicates whether planned orders will be generated by MRP, if this flag is not just MRP generate a ''Create'' action notice', IsActive='Y', Name='Create Plan', PO_Description=NULL, PO_Help=NULL, PO_Name=NULL, PO_PrintName=NULL, PrintName='Create Plan',Updated=TO_DATE('2010-02-15 13:05:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Element_ID=53258 +; + +-- Feb 15, 2010 1:05:42 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=53258 +; + +-- Feb 15, 2010 1:05:43 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,58994,53258,0,20,53260,'IsCreatePlan',TO_DATE('2010-02-15 13:05:42','YYYY-MM-DD HH24:MI:SS'),0,'Indicates whether planned orders will be generated by MRP','EE01',1,'Indicates whether planned orders will be generated by MRP, if this flag is not just MRP generate a ''Create'' action notice','Y','N','N','N','N','Y','N','N','Y','N','Y','Create Plan',TO_DATE('2010-02-15 13:05:42','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:05:43 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=58994 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:05:43 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD IsCreatePlan CHAR(1) CHECK (IsCreatePlan IN ('Y','N')) NOT NULL +; + +-- Feb 15, 2010 1:05:43 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element SET ColumnName='IsMPS', Description=NULL, EntityType='EE01', Help=NULL, IsActive='Y', Name='Is MPS', PO_Description=NULL, PO_Help=NULL, PO_Name=NULL, PO_PrintName=NULL, PrintName='Is MPS',Updated=TO_DATE('2010-02-15 13:05:43','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Element_ID=53261 +; + +-- Feb 15, 2010 1:05:43 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=53261 +; + +-- Feb 15, 2010 1:05:48 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,58995,53261,0,20,53260,'IsMPS',TO_DATE('2010-02-15 13:05:43','YYYY-MM-DD HH24:MI:SS'),0,'EE01',1,'Y','N','N','N','N','N','N','N','Y','N','Y','Is MPS',TO_DATE('2010-02-15 13:05:43','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:05:48 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=58995 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:05:48 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD IsMPS CHAR(1) DEFAULT NULL CHECK (IsMPS IN ('Y','N')) +; + +-- Feb 15, 2010 1:05:49 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element SET ColumnName='IsPhantom', Description='Phantom Component', EntityType='D', Help='Phantom Component are not stored and produced with the product. This is an option to avild maintaining an Engineering and Manufacturing Bill of Materials.', IsActive='Y', Name='Phantom', PO_Description=NULL, PO_Help=NULL, PO_Name=NULL, PO_PrintName=NULL, PrintName='Phantom',Updated=TO_DATE('2010-02-15 13:05:49','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Element_ID=2788 +; + +-- Feb 15, 2010 1:05:49 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=2788 +; + +-- Feb 15, 2010 1:05:50 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,58996,2788,0,20,53260,'IsPhantom',TO_DATE('2010-02-15 13:05:49','YYYY-MM-DD HH24:MI:SS'),0,'Phantom Component','EE01',1,'Phantom Component are not stored and produced with the product. This is an option to avild maintaining an Engineering and Manufacturing Bill of Materials.','Y','N','N','N','N','Y','N','N','Y','N','Y','Phantom',TO_DATE('2010-02-15 13:05:49','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:05:50 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=58996 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:05:50 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD IsPhantom CHAR(1) CHECK (IsPhantom IN ('Y','N')) NOT NULL +; + +-- Feb 15, 2010 1:05:50 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element SET ColumnName='M_Product_ID', Description='Product, Service, Item', EntityType='D', Help='Identifies an item which is either purchased or sold in this organization.', IsActive='Y', Name='Product', PO_Description=NULL, PO_Help=NULL, PO_Name=NULL, PO_PrintName=NULL, PrintName='Product',Updated=TO_DATE('2010-02-15 13:05:50','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Element_ID=454 +; + +-- Feb 15, 2010 1:05:50 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=454 +; + +-- Feb 15, 2010 1:05:51 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,58997,454,0,30,53260,'M_Product_ID',TO_DATE('2010-02-15 13:05:50','YYYY-MM-DD HH24:MI:SS'),0,'Product, Service, Item','EE01',22,'Identifies an item which is either purchased or sold in this organization.','Y','N','N','N','N','N','N','N','Y','N','Y','Product',TO_DATE('2010-02-15 13:05:50','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:05:51 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=58997 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:05:51 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD M_Product_ID NUMBER(10) DEFAULT NULL +; + +-- Feb 15, 2010 1:05:51 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element SET ColumnName='M_Warehouse_ID', Description='Storage Warehouse and Service Point', EntityType='D', Help='The Warehouse identifies a unique Warehouse where products are stored or Services are provided.', IsActive='Y', Name='Warehouse', PO_Description=NULL, PO_Help=NULL, PO_Name=NULL, PO_PrintName=NULL, PrintName='Warehouse',Updated=TO_DATE('2010-02-15 13:05:51','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Element_ID=459 +; + +-- Feb 15, 2010 1:05:51 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=459 +; + +-- Feb 15, 2010 1:05:52 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,58998,459,0,19,53260,'M_Warehouse_ID',TO_DATE('2010-02-15 13:05:51','YYYY-MM-DD HH24:MI:SS'),0,'-1','Storage Warehouse and Service Point','EE01',22,'The Warehouse identifies a unique Warehouse where products are stored or Services are provided.','Y','N','N','N','N','N','N','N','Y','N','Y','Warehouse',TO_DATE('2010-02-15 13:05:51','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:05:52 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=58998 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:05:52 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD M_Warehouse_ID NUMBER(10) DEFAULT NULL +; + +-- Feb 15, 2010 1:05:53 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element SET ColumnName='Order_Max', Description='Maximum order quantity in UOM', EntityType='EE01', Help='The Maximum Order Quantity indicates the biggest quantity of this product which can be ordered.', IsActive='Y', Name='Maximum Order Qty', PO_Description=NULL, PO_Help=NULL, PO_Name=NULL, PO_PrintName=NULL, PrintName='Maximum Order Qty',Updated=TO_DATE('2010-02-15 13:05:53','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Element_ID=53264 +; + +-- Feb 15, 2010 1:05:53 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=53264 +; + +-- Feb 15, 2010 1:05:54 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,58999,53264,0,29,53260,'Order_Max',TO_DATE('2010-02-15 13:05:53','YYYY-MM-DD HH24:MI:SS'),0,'Maximum order quantity in UOM','EE01',10,'The Maximum Order Quantity indicates the biggest quantity of this product which can be ordered.','Y','N','N','N','N','N','N','N','Y','N','Y','Maximum Order Qty',TO_DATE('2010-02-15 13:05:53','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:05:54 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=58999 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:05:54 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD Order_Max NUMBER DEFAULT NULL +; + +-- Feb 15, 2010 1:05:54 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element SET ColumnName='Order_Min', Description='Minimum order quantity in UOM', EntityType='D', Help='The Minimum Order Quantity indicates the smallest quantity of this product which can be ordered.', IsActive='Y', Name='Minimum Order Qty', PO_Description=NULL, PO_Help=NULL, PO_Name=NULL, PO_PrintName=NULL, PrintName='Minimum Order Qty',Updated=TO_DATE('2010-02-15 13:05:54','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Element_ID=942 +; + +-- Feb 15, 2010 1:05:54 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=942 +; + +-- Feb 15, 2010 1:05:55 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,59000,942,0,29,53260,'Order_Min',TO_DATE('2010-02-15 13:05:54','YYYY-MM-DD HH24:MI:SS'),0,'Minimum order quantity in UOM','EE01',14,'The Minimum Order Quantity indicates the smallest quantity of this product which can be ordered.','Y','N','N','N','N','N','N','N','Y','N','Y','Minimum Order Qty',TO_DATE('2010-02-15 13:05:54','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:05:55 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59000 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:05:55 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD Order_Min NUMBER DEFAULT NULL +; + +-- Feb 15, 2010 1:05:55 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element SET ColumnName='Order_Pack', Description='Package order size in UOM (e.g. order set of 5 units)', EntityType='D', Help='The Order Pack Quantity indicates the number of units in each pack of this product.', IsActive='Y', Name='Order Pack Qty', PO_Description=NULL, PO_Help=NULL, PO_Name=NULL, PO_PrintName=NULL, PrintName='Order Pack Qty',Updated=TO_DATE('2010-02-15 13:05:55','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Element_ID=943 +; + +-- Feb 15, 2010 1:05:55 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=943 +; + +-- Feb 15, 2010 1:05:56 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,59001,943,0,29,53260,'Order_Pack',TO_DATE('2010-02-15 13:05:55','YYYY-MM-DD HH24:MI:SS'),0,'Package order size in UOM (e.g. order set of 5 units)','EE01',14,'The Order Pack Quantity indicates the number of units in each pack of this product.','Y','N','N','N','N','N','N','N','Y','N','Y','Order Pack Qty',TO_DATE('2010-02-15 13:05:55','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:05:56 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59001 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:05:56 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD Order_Pack NUMBER DEFAULT NULL +; + +-- Feb 15, 2010 1:05:56 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element SET ColumnName='Order_Period', Description=NULL, EntityType='EE01', Help=NULL, IsActive='Y', Name='Order Period', PO_Description=NULL, PO_Help=NULL, PO_Name=NULL, PO_PrintName=NULL, PrintName='Order Period',Updated=TO_DATE('2010-02-15 13:05:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Element_ID=53265 +; + +-- Feb 15, 2010 1:05:56 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=53265 +; + +-- Feb 15, 2010 1:05:57 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,59002,53265,0,29,53260,'Order_Period',TO_DATE('2010-02-15 13:05:56','YYYY-MM-DD HH24:MI:SS'),0,'EE01',22,'Y','N','N','N','N','N','N','N','Y','N','Y','Order Period',TO_DATE('2010-02-15 13:05:56','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:05:57 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59002 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:05:57 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD Order_Period NUMBER DEFAULT NULL +; + +-- Feb 15, 2010 1:05:57 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element SET ColumnName='Order_Policy', Description=NULL, EntityType='EE01', Help=NULL, IsActive='Y', Name='Order Policy', PO_Description=NULL, PO_Help=NULL, PO_Name=NULL, PO_PrintName=NULL, PrintName='Order Policy',Updated=TO_DATE('2010-02-15 13:05:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Element_ID=53266 +; + +-- Feb 15, 2010 1:05:57 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=53266 +; + +-- Feb 15, 2010 1:05:57 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Reference SET Description='Reference List', EntityType='D', Help=NULL, IsActive='Y', Name='List', ValidationType='D',Updated=TO_DATE('2010-02-15 13:05:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Reference_ID=17 +; + +-- Feb 15, 2010 1:05:57 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Reference_Trl SET IsTranslated='N' WHERE AD_Reference_ID=17 +; + +-- Feb 15, 2010 1:05:57 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Reference SET Description=NULL, EntityType='EE01', Help=NULL, IsActive='Y', Name='PP_Product_Planning Order Policy', ValidationType='L',Updated=TO_DATE('2010-02-15 13:05:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Reference_ID=53228 +; + +-- Feb 15, 2010 1:05:57 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Reference_Trl SET IsTranslated='N' WHERE AD_Reference_ID=53228 +; + +-- Feb 15, 2010 1:05:57 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Ref_List SET AD_Reference_ID=53228, Description=NULL, EntityType='EE01', IsActive='Y', Name='Fixed Order Quantity', Value='FOQ',Updated=TO_DATE('2010-02-15 13:05:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Ref_List_ID=53272 +; + +-- Feb 15, 2010 1:05:57 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Ref_List_Trl SET IsTranslated='N' WHERE AD_Ref_List_ID=53272 +; + +-- Feb 15, 2010 1:05:58 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Ref_List SET AD_Reference_ID=53228, Description=NULL, EntityType='EE01', IsActive='Y', Name='Lot-for-Lot', Value='LFL',Updated=TO_DATE('2010-02-15 13:05:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Ref_List_ID=53273 +; + +-- Feb 15, 2010 1:05:58 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Ref_List_Trl SET IsTranslated='N' WHERE AD_Ref_List_ID=53273 +; + +-- Feb 15, 2010 1:05:58 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Ref_List SET AD_Reference_ID=53228, Description=NULL, EntityType='EE01', IsActive='Y', Name='Period Order Quantity', Value='POQ',Updated=TO_DATE('2010-02-15 13:05:58','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Ref_List_ID=53274 +; + +-- Feb 15, 2010 1:05:58 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Ref_List_Trl SET IsTranslated='N' WHERE AD_Ref_List_ID=53274 +; + +-- Feb 15, 2010 1:05:58 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,59003,53266,0,17,53228,53260,'Order_Policy',TO_DATE('2010-02-15 13:05:58','YYYY-MM-DD HH24:MI:SS'),0,'EE01',3,'Y','N','N','N','N','N','N','N','Y','N','Y','Order Policy',TO_DATE('2010-02-15 13:05:58','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:05:58 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59003 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:05:58 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD Order_Policy NVARCHAR2(3) DEFAULT NULL +; + +-- Feb 15, 2010 1:05:59 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element SET ColumnName='Order_Qty', Description=NULL, EntityType='EE01', Help=NULL, IsActive='Y', Name='Order Qty', PO_Description=NULL, PO_Help=NULL, PO_Name=NULL, PO_PrintName=NULL, PrintName='Order Qty',Updated=TO_DATE('2010-02-15 13:05:59','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Element_ID=53267 +; + +-- Feb 15, 2010 1:05:59 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=53267 +; + +-- Feb 15, 2010 1:05:59 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,59004,53267,0,29,53260,'Order_Qty',TO_DATE('2010-02-15 13:05:59','YYYY-MM-DD HH24:MI:SS'),0,'EE01',22,'Y','N','N','N','N','N','N','N','Y','N','Y','Order Qty',TO_DATE('2010-02-15 13:05:59','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:05:59 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59004 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:05:59 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD Order_Qty NUMBER DEFAULT NULL +; + +-- Feb 15, 2010 1:06:00 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element SET ColumnName='Planner_ID', Description=NULL, EntityType='EE01', Help=NULL, IsActive='Y', Name='Planner', PO_Description=NULL, PO_Help=NULL, PO_Name=NULL, PO_PrintName=NULL, PrintName='Planner',Updated=TO_DATE('2010-02-15 13:06:00','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Element_ID=53269 +; + +-- Feb 15, 2010 1:06:00 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=53269 +; + +-- Feb 15, 2010 1:06:00 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Reference SET Description='User selection', EntityType='D', Help=NULL, IsActive='Y', Name='AD_User', ValidationType='T',Updated=TO_DATE('2010-02-15 13:06:00','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Reference_ID=110 +; + +-- Feb 15, 2010 1:06:00 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Reference_Trl SET IsTranslated='N' WHERE AD_Reference_ID=110 +; + +-- Feb 15, 2010 1:06:00 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Ref_Table SET AD_Table_ID = 114, AD_Display = 213, AD_Key = 212, isValueDisplayed = 'N', OrderByClause = 'AD_User.Name', EntityType ='D', WhereClause = '' WHERE AD_Reference_ID = 110 +; + +-- Feb 15, 2010 1:06:01 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,AD_Val_Rule_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,59005,53269,0,18,110,53260,164,'Planner_ID',TO_DATE('2010-02-15 13:06:00','YYYY-MM-DD HH24:MI:SS'),0,'EE01',22,'Y','N','N','N','N','N','N','N','Y','N','Y','Planner',TO_DATE('2010-02-15 13:06:00','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:06:01 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59005 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:06:01 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD Planner_ID NUMBER(10) DEFAULT NULL +; + +-- Feb 15, 2010 1:06:01 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element SET ColumnName='PP_Product_BOM_ID', Description='BOM & Formula', EntityType='EE01', Help=NULL, IsActive='Y', Name='BOM & Formula', PO_Description=NULL, PO_Help=NULL, PO_Name=NULL, PO_PrintName=NULL, PrintName='BOM & Formula',Updated=TO_DATE('2010-02-15 13:06:01','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Element_ID=53245 +; + +-- Feb 15, 2010 1:06:01 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=53245 +; + +-- Feb 15, 2010 1:06:02 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,59006,53245,0,19,53260,'PP_Product_BOM_ID',TO_DATE('2010-02-15 13:06:01','YYYY-MM-DD HH24:MI:SS'),0,'BOM & Formula','EE01',22,'Y','N','N','N','N','N','N','N','Y','N','Y','BOM & Formula',TO_DATE('2010-02-15 13:06:01','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:06:02 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59006 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:06:02 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD PP_Product_BOM_ID NUMBER(10) DEFAULT NULL +; + +-- Feb 15, 2010 1:06:02 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element SET ColumnName='SafetyStock', Description='Safety stock is a term used to describe a level of stock that is maintained below the cycle stock to buffer against stock-outs', EntityType='EE01', Help='Safety stock is defined as extra units of inventory carried as protection against possible stockouts. It is held when an organization cannot accurately predict demand and/or lead time for the product. + +Rereference: +http://en.wikipedia.org/wiki/Safety_stock', IsActive='Y', Name='Safety Stock Qty', PO_Description=NULL, PO_Help=NULL, PO_Name=NULL, PO_PrintName=NULL, PrintName='Safety Stock Qty',Updated=TO_DATE('2010-02-15 13:06:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Element_ID=53354 +; + +-- Feb 15, 2010 1:06:02 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=53354 +; + +-- Feb 15, 2010 1:06:03 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,59007,53354,0,29,53260,'SafetyStock',TO_DATE('2010-02-15 13:06:03','YYYY-MM-DD HH24:MI:SS'),0,'Safety stock is a term used to describe a level of stock that is maintained below the cycle stock to buffer against stock-outs','EE01',22,'Safety stock is defined as extra units of inventory carried as protection against possible stockouts. It is held when an organization cannot accurately predict demand and/or lead time for the product. + +Rereference: +http://en.wikipedia.org/wiki/Safety_stock','Y','N','N','N','N','N','N','N','Y','N','Y','Safety Stock Qty',TO_DATE('2010-02-15 13:06:03','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:06:03 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59007 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:06:03 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD SafetyStock NUMBER DEFAULT NULL +; + +-- Feb 15, 2010 1:06:03 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element SET ColumnName='S_Resource_ID', Description='Resource', EntityType='D', Help=NULL, IsActive='Y', Name='Resource', PO_Description=NULL, PO_Help=NULL, PO_Name=NULL, PO_PrintName=NULL, PrintName='Resource',Updated=TO_DATE('2010-02-15 13:06:03','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Element_ID=1777 +; + +-- Feb 15, 2010 1:06:03 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=1777 +; + +-- Feb 15, 2010 1:06:04 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Reference SET Description='Manufacturing Resources', EntityType='EE01', Help=NULL, IsActive='Y', Name='S_Resource_Manufacturing', ValidationType='T',Updated=TO_DATE('2010-02-15 13:06:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Reference_ID=53320 +; + +-- Feb 15, 2010 1:06:04 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Reference_Trl SET IsTranslated='N' WHERE AD_Reference_ID=53320 +; + +-- Feb 15, 2010 1:06:04 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Ref_Table SET AD_Table_ID = 487, AD_Display = 6853, AD_Key = 6862, isValueDisplayed = 'N', OrderByClause = '', EntityType ='EE01', WhereClause = '' WHERE AD_Reference_ID = 53320 +; + +-- Feb 15, 2010 1:06:04 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Val_Rule SET Code='IsManufacturingResource=''Y'' AND ManufacturingResourceType=''PT''', Description=NULL, EntityType='EE01', IsActive='Y', Name='S_Resource Plant', Type='S',Updated=TO_DATE('2010-02-15 13:06:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Val_Rule_ID=52002 +; + +-- Feb 15, 2010 1:06:04 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,AD_Val_Rule_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,59008,1777,0,18,53320,53260,52002,'S_Resource_ID',TO_DATE('2010-02-15 13:06:04','YYYY-MM-DD HH24:MI:SS'),0,'-1','Resource','EE01',22,'Y','N','N','N','N','N','N','N','Y','N','Y','Resource',TO_DATE('2010-02-15 13:06:04','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:06:04 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59008 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:06:04 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD S_Resource_ID NUMBER(10) DEFAULT NULL +; + +-- Feb 15, 2010 1:06:05 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element SET ColumnName='TimeFence', Description=NULL, EntityType='EE01', Help=NULL, IsActive='Y', Name='Time Fence', PO_Description=NULL, PO_Help=NULL, PO_Name=NULL, PO_PrintName=NULL, PrintName='Time Fence',Updated=TO_DATE('2010-02-15 13:06:05','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Element_ID=53270 +; + +-- Feb 15, 2010 1:06:05 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=53270 +; + +-- Feb 15, 2010 1:06:07 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,59009,53270,0,29,53260,'TimeFence',TO_DATE('2010-02-15 13:06:05','YYYY-MM-DD HH24:MI:SS'),0,'EE01',22,'Y','N','N','N','N','N','N','N','Y','N','Y','Time Fence',TO_DATE('2010-02-15 13:06:05','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:06:07 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59009 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:06:07 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD TimeFence NUMBER DEFAULT NULL +; + +-- Feb 15, 2010 1:06:07 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element SET ColumnName='TransfertTime', Description=NULL, EntityType='EE01', Help=NULL, IsActive='Y', Name='Transfert Time', PO_Description=NULL, PO_Help=NULL, PO_Name=NULL, PO_PrintName=NULL, PrintName='Transfert Time',Updated=TO_DATE('2010-02-15 13:06:07','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Element_ID=53271 +; + +-- Feb 15, 2010 1:06:07 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=53271 +; + +-- Feb 15, 2010 1:06:08 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,59010,53271,0,29,53260,'TransfertTime',TO_DATE('2010-02-15 13:06:07','YYYY-MM-DD HH24:MI:SS'),0,'EE01',10,'Y','N','N','N','N','N','N','N','Y','N','Y','Transfert Time',TO_DATE('2010-02-15 13:06:07','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:06:08 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59010 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:06:08 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD TransfertTime NUMBER DEFAULT NULL +; + +-- Feb 15, 2010 1:06:08 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element SET ColumnName='WorkingTime', Description='Workflow Simulation Execution Time', EntityType='D', Help='Amount of time the performer of the activity needs to perform the task in Duration Unit', IsActive='Y', Name='Working Time', PO_Description=NULL, PO_Help=NULL, PO_Name=NULL, PO_PrintName=NULL, PrintName='Working Time',Updated=TO_DATE('2010-02-15 13:06:08','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Element_ID=2333 +; + +-- Feb 15, 2010 1:06:08 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=2333 +; + +-- Feb 15, 2010 1:06:09 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,59011,2333,0,29,53260,'WorkingTime',TO_DATE('2010-02-15 13:06:08','YYYY-MM-DD HH24:MI:SS'),0,'Workflow Simulation Execution Time','EE01',22,'Amount of time the performer of the activity needs to perform the task in Duration Unit','Y','N','N','N','N','N','N','N','Y','N','Y','Working Time',TO_DATE('2010-02-15 13:06:08','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:06:09 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59011 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:06:09 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD WorkingTime NUMBER DEFAULT NULL +; + +-- Feb 15, 2010 1:06:09 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element SET ColumnName='Yield', Description='The Yield is the percentage of a lot that is expected to be of acceptable wuality may fall below 100 percent', EntityType='EE01', Help='ADempiere Calculate the total yield for a product from the yield for each activity when the process Workflow Cost Roll-Up is executed. + +The expected yield for an Activity can be expressed as: + +Yield = Acceptable Units at Activity End x 100 + +The Total manufacturing yield for a product is determined by multiplying the yied percentage for each activity. + +Manufacturing Yield = Yield % for Activity 10 x Yied % for Activity 20 , etc + +Take care when setting yield to anything but 100% particularly when yied is used for multiples activities + +', IsActive='Y', Name='Yield %', PO_Description=NULL, PO_Help=NULL, PO_Name=NULL, PO_PrintName=NULL, PrintName='Yield %',Updated=TO_DATE('2010-02-15 13:06:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Element_ID=53272 +; + +-- Feb 15, 2010 1:06:09 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=53272 +; + +-- Feb 15, 2010 1:06:10 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,59012,53272,0,11,53260,'Yield',TO_DATE('2010-02-15 13:06:09','YYYY-MM-DD HH24:MI:SS'),0,'The Yield is the percentage of a lot that is expected to be of acceptable wuality may fall below 100 percent','EE01',22,'ADempiere Calculate the total yield for a product from the yield for each activity when the process Workflow Cost Roll-Up is executed. + +The expected yield for an Activity can be expressed as: + +Yield = Acceptable Units at Activity End x 100 + +The Total manufacturing yield for a product is determined by multiplying the yied percentage for each activity. + +Manufacturing Yield = Yield % for Activity 10 x Yied % for Activity 20 , etc + +Take care when setting yield to anything but 100% particularly when yied is used for multiples activities + +','Y','N','N','N','N','N','N','N','Y','N','Y','Yield %',TO_DATE('2010-02-15 13:06:09','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:06:10 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59012 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:06:10 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD Yield NUMBER(10) DEFAULT NULL +; + +-- Feb 15, 2010 1:06:10 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element SET ColumnName='DatePromised', Description='Date Order was promised', EntityType='D', Help='The Date Promised indicates the date, if any, that an Order was promised for.', IsActive='Y', Name='Date Promised', PO_Description=NULL, PO_Help=NULL, PO_Name=NULL, PO_PrintName=NULL, PrintName='Date Promised',Updated=TO_DATE('2010-02-15 13:06:10','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Element_ID=269 +; + +-- Feb 15, 2010 1:06:10 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=269 +; + +-- Feb 15, 2010 1:06:10 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Reference SET Description='Date mm/dd/yyyy', EntityType='D', Help=NULL, IsActive='Y', Name='Date', ValidationType='D',Updated=TO_DATE('2010-02-15 13:06:10','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Reference_ID=15 +; + +-- Feb 15, 2010 1:06:10 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Reference_Trl SET IsTranslated='N' WHERE AD_Reference_ID=15 +; + +-- Feb 15, 2010 1:06:11 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,59013,269,0,15,53260,'DatePromised',TO_DATE('2010-02-15 13:06:10','YYYY-MM-DD HH24:MI:SS'),0,'Date Order was promised','EE01',7,'The Date Promised indicates the date, if any, that an Order was promised for.','Y','N','N','N','N','N','N','N','Y','N','Y','Date Promised',TO_DATE('2010-02-15 13:06:10','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:06:11 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59013 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:06:11 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD DatePromised DATE DEFAULT NULL +; + +-- Feb 15, 2010 1:06:11 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element SET ColumnName='M_Forecast_ID', Description='Material Forecast', EntityType='D', Help='Material Forecast', IsActive='Y', Name='Forecast', PO_Description=NULL, PO_Help=NULL, PO_Name=NULL, PO_PrintName=NULL, PrintName='Forecast',Updated=TO_DATE('2010-02-15 13:06:11','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Element_ID=2498 +; + +-- Feb 15, 2010 1:06:11 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=2498 +; + +-- Feb 15, 2010 1:06:12 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,59014,2498,0,19,53260,'M_Forecast_ID',TO_DATE('2010-02-15 13:06:11','YYYY-MM-DD HH24:MI:SS'),0,'Material Forecast','EE01',22,'Material Forecast','Y','N','N','N','N','N','N','N','Y','N','Y','Forecast',TO_DATE('2010-02-15 13:06:11','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:06:12 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59014 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:06:12 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD M_Forecast_ID NUMBER(10) DEFAULT NULL +; + +-- Feb 15, 2010 1:06:12 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element SET ColumnName='Qty', Description='Quantity', EntityType='D', Help='The Quantity indicates the number of a specific product or item for this document.', IsActive='Y', Name='Quantity', PO_Description=NULL, PO_Help=NULL, PO_Name=NULL, PO_PrintName=NULL, PrintName='Qty',Updated=TO_DATE('2010-02-15 13:06:12','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Element_ID=526 +; + +-- Feb 15, 2010 1:06:12 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=526 +; + +-- Feb 15, 2010 1:06:13 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,59015,526,0,29,53260,'Qty',TO_DATE('2010-02-15 13:06:12','YYYY-MM-DD HH24:MI:SS'),0,'Quantity','EE01',22,'The Quantity indicates the number of a specific product or item for this document.','Y','N','N','N','N','Y','N','N','Y','N','Y','Quantity',TO_DATE('2010-02-15 13:06:12','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:06:13 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59015 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:06:13 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD Qty NUMBER NOT NULL +; + +-- Feb 15, 2010 1:06:14 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,59016,1063,0,18,53260,'SalesRep_ID',TO_DATE('2010-02-15 13:06:13','YYYY-MM-DD HH24:MI:SS'),0,'@#AD_User_ID@','Sales Representative or Company Agent','EE01',22,'The Sales Representative indicates the Sales Rep for this Region. Any Sales Rep must be a valid internal user.','Y','N','N','N','N','N','N','N','Y','N','Y','Sales Representative',TO_DATE('2010-02-15 13:06:13','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:06:14 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59016 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:06:14 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD SalesRep_ID NUMBER(10) DEFAULT NULL +; + +-- Feb 15, 2010 1:06:14 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element SET ColumnName='ProductValue', Description='Key of the Product', EntityType='D', Help=NULL, IsActive='Y', Name='Product Key', PO_Description=NULL, PO_Help=NULL, PO_Name=NULL, PO_PrintName=NULL, PrintName='Product Key',Updated=TO_DATE('2010-02-15 13:06:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Element_ID=1675 +; + +-- Feb 15, 2010 1:06:14 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=1675 +; + +-- Feb 15, 2010 1:06:15 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,59017,1675,0,10,53260,'ProductValue',TO_DATE('2010-02-15 13:06:14','YYYY-MM-DD HH24:MI:SS'),0,'Key of the Product','EE01',40,'Y','N','N','N','N','N','N','N','Y','N','Y','Product Key',TO_DATE('2010-02-15 13:06:14','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:06:15 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59017 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:06:15 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD ProductValue NVARCHAR2(40) DEFAULT NULL +; + +-- Feb 15, 2010 1:06:15 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element SET ColumnName='WarehouseValue', Description='Key of the Warehouse', EntityType='D', Help='Key to identify the Warehouse', IsActive='Y', Name='Warehouse Key', PO_Description=NULL, PO_Help=NULL, PO_Name=NULL, PO_PrintName=NULL, PrintName='Warehouse Key',Updated=TO_DATE('2010-02-15 13:06:15','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Element_ID=2070 +; + +-- Feb 15, 2010 1:06:15 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=2070 +; + +-- Feb 15, 2010 1:06:16 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,59018,2070,0,10,53260,'WarehouseValue',TO_DATE('2010-02-15 13:06:15','YYYY-MM-DD HH24:MI:SS'),0,'Key of the Warehouse','EE01',40,'Key to identify the Warehouse','Y','N','N','N','N','N','N','N','Y','N','Y','Warehouse Key',TO_DATE('2010-02-15 13:06:15','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:06:16 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59018 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:06:16 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD WarehouseValue NVARCHAR2(40) DEFAULT NULL +; + +-- Feb 15, 2010 1:06:16 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element SET ColumnName='OrgValue', Description='Key of the Organization', EntityType='D', Help=NULL, IsActive='Y', Name='Org Key', PO_Description=NULL, PO_Help=NULL, PO_Name=NULL, PO_PrintName=NULL, PrintName='Org Key',Updated=TO_DATE('2010-02-15 13:06:16','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Element_ID=2115 +; + +-- Feb 15, 2010 1:06:16 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=2115 +; + +-- Feb 15, 2010 1:06:17 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,59019,2115,0,10,53260,'OrgValue',TO_DATE('2010-02-15 13:06:16','YYYY-MM-DD HH24:MI:SS'),0,'Key of the Organization','EE01',40,'Y','N','N','N','N','N','N','N','Y','N','Y','Org Key',TO_DATE('2010-02-15 13:06:16','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:06:17 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59019 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:06:17 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD OrgValue NVARCHAR2(40) DEFAULT NULL +; + +-- Feb 15, 2010 1:06:17 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,Description,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,54118,0,'NetworkDistributionValue',TO_DATE('2010-02-15 13:06:17','YYYY-MM-DD HH24:MI:SS'),0,'Key of the Network Distribution','EE01','Y','Network Distribution Key','Network Distribution Key',TO_DATE('2010-02-15 13:06:17','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:06:17 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=54118 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID) +; + +-- Feb 15, 2010 1:06:18 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,59020,54118,0,10,53260,'NetworkDistributionValue',TO_DATE('2010-02-15 13:06:17','YYYY-MM-DD HH24:MI:SS'),0,'Key of the Network Distribution','EE01',40,'Y','N','N','N','N','N','N','N','Y','N','Y','Network Distribution Key',TO_DATE('2010-02-15 13:06:17','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:06:18 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59020 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:06:18 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD NetworkDistributionValue NVARCHAR2(40) DEFAULT NULL +; + +-- Feb 15, 2010 1:06:18 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,Description,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,54119,0,'Product_BOM_Value',TO_DATE('2010-02-15 13:06:18','YYYY-MM-DD HH24:MI:SS'),0,'Key of Product BOM','U','Y','Product BOM Key','Product BOM Key',TO_DATE('2010-02-15 13:06:18','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:06:18 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=54119 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID) +; + +-- Feb 15, 2010 1:06:19 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,59021,54119,0,10,53260,'Product_BOM_Value',TO_DATE('2010-02-15 13:06:18','YYYY-MM-DD HH24:MI:SS'),0,'Key of Product BOM','EE01',40,'Y','N','N','N','N','N','N','N','Y','N','Y','Product BOM Key',TO_DATE('2010-02-15 13:06:18','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:06:19 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59021 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:06:19 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD Product_BOM_Value NVARCHAR2(40) DEFAULT NULL +; + +-- Feb 15, 2010 1:06:20 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,Description,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,54120,0,'ForecastValue',TO_DATE('2010-02-15 13:06:19','YYYY-MM-DD HH24:MI:SS'),0,'Key of the Forecast','EE01','Y','Forecast Key','Forecast Key',TO_DATE('2010-02-15 13:06:19','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:06:20 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=54120 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID) +; + +-- Feb 15, 2010 1:06:20 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,59022,54120,0,10,53260,'ForecastValue',TO_DATE('2010-02-15 13:06:20','YYYY-MM-DD HH24:MI:SS'),0,'Key of the Forecast','EE01',40,'Y','N','N','N','N','N','N','N','Y','N','Y','Forecast Key',TO_DATE('2010-02-15 13:06:20','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:06:20 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59022 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:06:20 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD ForecastValue NVARCHAR2(40) DEFAULT NULL +; + +-- Feb 15, 2010 1:06:21 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,Description,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,54121,0,'ResourceValue',TO_DATE('2010-02-15 13:06:20','YYYY-MM-DD HH24:MI:SS'),0,'Key of the Resource','EE01','Y','Resource Key','Resource Key',TO_DATE('2010-02-15 13:06:20','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:06:21 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=54121 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID) +; + +-- Feb 15, 2010 1:06:22 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,59023,54121,0,10,53260,'ResourceValue',TO_DATE('2010-02-15 13:06:21','YYYY-MM-DD HH24:MI:SS'),0,'Key of the Resource','EE01',40,'Y','N','N','N','N','N','N','N','Y','N','Y','Resource Key',TO_DATE('2010-02-15 13:06:21','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:06:22 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59023 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:06:22 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD ResourceValue NVARCHAR2(40) DEFAULT NULL +; + +-- Feb 15, 2010 1:06:22 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,Description,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,54122,0,'PlannerValue',TO_DATE('2010-02-15 13:06:22','YYYY-MM-DD HH24:MI:SS'),0,'Search Key of the Planning','EE01','Y','Planner Key','Planner Key',TO_DATE('2010-02-15 13:06:22','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:06:22 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=54122 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID) +; + +-- Feb 15, 2010 1:06:23 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,59024,54122,0,10,53260,'PlannerValue',TO_DATE('2010-02-15 13:06:22','YYYY-MM-DD HH24:MI:SS'),0,'Search Key of the Planning','EE01',40,'Y','N','N','N','N','N','N','N','Y','N','Y','Planner Key',TO_DATE('2010-02-15 13:06:22','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:06:23 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59024 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:06:23 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD PlannerValue NVARCHAR2(40) DEFAULT NULL +; + +-- Feb 15, 2010 1:06:23 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element SET ColumnName='M_ForecastLine_ID', Description='Forecast Line', EntityType='D', Help='Forecast of Product Qyantity by Period', IsActive='Y', Name='Forecast Line', PO_Description=NULL, PO_Help=NULL, PO_Name=NULL, PO_PrintName=NULL, PrintName='Forecast Line',Updated=TO_DATE('2010-02-15 13:06:23','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Element_ID=2499 +; + +-- Feb 15, 2010 1:06:23 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=2499 +; + +-- Feb 15, 2010 1:06:24 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,59025,2499,0,19,53260,'M_ForecastLine_ID',TO_DATE('2010-02-15 13:06:23','YYYY-MM-DD HH24:MI:SS'),0,'Forecast Line','EE01',10,'Forecast of Product Qyantity by Period','Y','N','N','N','N','N','N','N','Y','N','N','Forecast Line',TO_DATE('2010-02-15 13:06:23','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:06:24 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59025 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:06:24 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD M_ForecastLine_ID NUMBER(10) DEFAULT NULL +; + +-- Feb 15, 2010 1:06:24 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element SET ColumnName='PP_Product_Planning_ID', Description=NULL, EntityType='EE01', Help=NULL, IsActive='Y', Name='Product Planning', PO_Description=NULL, PO_Help=NULL, PO_Name=NULL, PO_PrintName=NULL, PrintName='Product Planning',Updated=TO_DATE('2010-02-15 13:06:24','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Element_ID=53268 +; + +-- Feb 15, 2010 1:06:24 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=53268 +; + +-- Feb 15, 2010 1:06:25 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,59026,53268,0,19,53260,'PP_Product_Planning_ID',TO_DATE('2010-02-15 13:06:24','YYYY-MM-DD HH24:MI:SS'),0,'EE01',10,'Y','N','N','N','N','N','N','N','Y','N','N','Product Planning',TO_DATE('2010-02-15 13:06:24','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:06:25 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59026 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:06:25 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD PP_Product_Planning_ID NUMBER(10) DEFAULT NULL +; + +-- Feb 15, 2010 1:06:25 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element SET ColumnName='VendorProductNo', Description='Product Key of the Business Partner', EntityType='D', Help='The Business Partner Product Key identifies the number used by the Business Partner for this product. It can be printed on orders and invoices when you include the Product Key in the print format.', IsActive='Y', Name='Partner Product Key', PO_Description=NULL, PO_Help=NULL, PO_Name=NULL, PO_PrintName=NULL, PrintName='BPartner Product Key',Updated=TO_DATE('2010-02-15 13:06:25','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Element_ID=623 +; + +-- Feb 15, 2010 1:06:25 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=623 +; + +-- Feb 15, 2010 1:06:31 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,59027,623,0,10,53260,'VendorProductNo',TO_DATE('2010-02-15 13:06:25','YYYY-MM-DD HH24:MI:SS'),0,'Product Key of the Business Partner','EE01',30,'The Business Partner Product Key identifies the number used by the Business Partner for this product. It can be printed on orders and invoices when you include the Product Key in the print format.','Y','N','N','N','N','N','N','N','Y','N','Y','Partner Product Key',TO_DATE('2010-02-15 13:06:25','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:06:31 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59027 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:06:31 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD VendorProductNo NVARCHAR2(30) DEFAULT NULL +; + +-- Feb 15, 2010 1:06:32 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Tab (AD_Client_ID,AD_Org_ID,AD_Tab_ID,AD_Table_ID,AD_Window_ID,CommitWarning,Created,CreatedBy,EntityType,HasTree,IsActive,IsAdvancedTab,IsInfoTab,IsInsertRecord,IsReadOnly,IsSingleRow,IsSortTab,IsTranslationTab,Name,Processing,SeqNo,TabLevel,Updated,UpdatedBy) VALUES (0,0,53307,53260,53109,NULL,TO_DATE('2010-02-15 13:06:31','YYYY-MM-DD HH24:MI:SS'),0,'EE01','N','Y','N','N','Y','N','N','N','N','Import Product Planning','N',10,0,TO_DATE('2010-02-15 13:06:31','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:06:32 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Tab_Trl (AD_Language,AD_Tab_ID, CommitWarning,Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Tab_ID, t.CommitWarning,t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Tab t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Tab_ID=53307 AND NOT EXISTS (SELECT * FROM AD_Tab_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Tab_ID=t.AD_Tab_ID) +; + +-- Feb 15, 2010 1:06:34 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,58982,58726,0,53307,TO_DATE('2010-02-15 13:06:32','YYYY-MM-DD HH24:MI:SS'),0,'The record is active in the system',1,'EE01','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 reports. +There are two reasons for de-activating and not deleting records: +(1) The system requires the record for audit purposes. +(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.','Y','Y','N','N','N','N','N','Active',0,0,TO_DATE('2010-02-15 13:06:32','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:06:34 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58726 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 15, 2010 1:06:35 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,59011,58727,0,53307,TO_DATE('2010-02-15 13:06:34','YYYY-MM-DD HH24:MI:SS'),0,'Workflow Simulation Execution Time',22,'EE01','Amount of time the performer of the activity needs to perform the task in Duration Unit','Y','Y','N','N','N','N','Y','Working Time',0,0,TO_DATE('2010-02-15 13:06:34','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:06:35 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58727 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 15, 2010 1:06:36 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,58978,58728,0,53307,TO_DATE('2010-02-15 13:06:35','YYYY-MM-DD HH24:MI:SS'),0,'Client/Tenant for this installation.',10,'EE01','A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','Y','Y','Y','N','N','N','N','Client',10,0,TO_DATE('2010-02-15 13:06:35','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:06:36 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58728 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 15, 2010 1:06:37 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,59026,50010,58729,0,53307,TO_DATE('2010-02-15 13:06:36','YYYY-MM-DD HH24:MI:SS'),0,10,'EE01','Y','Y','Y','N','N','Y','Y','Product Planning',20,0,TO_DATE('2010-02-15 13:06:36','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:06:37 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58729 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 15, 2010 1:06:38 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,59019,50010,58730,0,53307,TO_DATE('2010-02-15 13:06:37','YYYY-MM-DD HH24:MI:SS'),0,'Key of the Organization',22,'EE01','Y','Y','Y','N','N','N','N','Org Key',30,0,TO_DATE('2010-02-15 13:06:37','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:06:38 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58730 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 15, 2010 1:06:39 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,58979,50010,58731,0,53307,TO_DATE('2010-02-15 13:06:38','YYYY-MM-DD HH24:MI:SS'),0,'Organizational entity within client',10,'EE01','An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','Y','Y','Y','N','N','N','Y','Organization',40,0,TO_DATE('2010-02-15 13:06:38','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:06:39 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58731 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 15, 2010 1:06:39 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,59017,50010,58732,0,53307,TO_DATE('2010-02-15 13:06:39','YYYY-MM-DD HH24:MI:SS'),0,'Key of the Product',22,'EE01','Y','Y','Y','N','N','N','N','Product Key',50,0,TO_DATE('2010-02-15 13:06:39','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:06:39 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58732 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 15, 2010 1:06:40 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,58997,50010,58733,0,53307,TO_DATE('2010-02-15 13:06:39','YYYY-MM-DD HH24:MI:SS'),0,'Product, Service, Item',22,'EE01','Identifies an item which is either purchased or sold in this organization.','Y','Y','Y','N','N','N','Y','Product',60,0,TO_DATE('2010-02-15 13:06:39','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:06:40 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58733 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 15, 2010 1:06:40 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,59016,50010,58734,0,53307,TO_DATE('2010-02-15 13:06:40','YYYY-MM-DD HH24:MI:SS'),0,'Sales Representative or Company Agent',22,'EE01','The Sales Representative indicates the Sales Rep for this Region. Any Sales Rep must be a valid internal user.','Y','Y','Y','N','N','N','N','Sales Representative',70,0,TO_DATE('2010-02-15 13:06:40','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:06:40 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58734 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 15, 2010 1:06:41 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,59023,50010,58735,0,53307,TO_DATE('2010-02-15 13:06:40','YYYY-MM-DD HH24:MI:SS'),0,'Key of the Resource',22,'EE01','Y','Y','Y','N','N','N','N','Resource Key',80,0,TO_DATE('2010-02-15 13:06:40','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:06:41 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58735 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 15, 2010 1:06:41 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,59008,50010,58736,0,53307,TO_DATE('2010-02-15 13:06:41','YYYY-MM-DD HH24:MI:SS'),0,'Resource',22,'EE01','Y','Y','Y','N','N','N','Y','Resource',90,0,TO_DATE('2010-02-15 13:06:41','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:06:41 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58736 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 15, 2010 1:06:42 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,59018,50010,58737,0,53307,TO_DATE('2010-02-15 13:06:41','YYYY-MM-DD HH24:MI:SS'),0,'Key of the Warehouse',22,'EE01','Key to identify the Warehouse','Y','Y','Y','N','N','N','N','Warehouse Key',100,0,TO_DATE('2010-02-15 13:06:41','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:06:42 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58737 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 15, 2010 1:06:43 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,58998,50010,58738,0,53307,TO_DATE('2010-02-15 13:06:42','YYYY-MM-DD HH24:MI:SS'),0,'Storage Warehouse and Service Point',22,'EE01','The Warehouse identifies a unique Warehouse where products are stored or Services are provided.','Y','Y','Y','N','N','N','Y','Warehouse',110,0,TO_DATE('2010-02-15 13:06:42','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:06:43 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58738 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 15, 2010 1:06:43 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,59024,50010,58739,0,53307,TO_DATE('2010-02-15 13:06:43','YYYY-MM-DD HH24:MI:SS'),0,'Search Key of the Planning',22,'EE01','Y','Y','Y','N','N','N','N','Planner Key',120,0,TO_DATE('2010-02-15 13:06:43','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:06:43 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58739 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 15, 2010 1:06:44 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,59005,50010,58740,0,53307,TO_DATE('2010-02-15 13:06:43','YYYY-MM-DD HH24:MI:SS'),0,22,'EE01','Y','Y','Y','N','N','N','Y','Planner',130,0,TO_DATE('2010-02-15 13:06:43','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:06:44 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58740 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 15, 2010 1:06:45 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,59021,50010,58741,0,53307,TO_DATE('2010-02-15 13:06:44','YYYY-MM-DD HH24:MI:SS'),0,'Key of Product BOM',22,'EE01','Y','Y','Y','N','N','N','N','Product BOM Key',140,0,TO_DATE('2010-02-15 13:06:44','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:06:45 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58741 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 15, 2010 1:06:46 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,59006,50010,58742,0,53307,TO_DATE('2010-02-15 13:06:45','YYYY-MM-DD HH24:MI:SS'),0,'BOM & Formula',22,'EE01','Y','Y','Y','N','N','N','Y','BOM & Formula',150,0,TO_DATE('2010-02-15 13:06:45','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:06:46 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58742 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 15, 2010 1:06:46 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,58991,50010,58743,0,53307,TO_DATE('2010-02-15 13:06:46','YYYY-MM-DD HH24:MI:SS'),0,'Workflow or combination of tasks',60,'EE01','The Workflow field identifies a unique Workflow in the system.','Y','Y','Y','N','N','N','N','Workflow',160,0,TO_DATE('2010-02-15 13:06:46','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:06:46 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58743 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 15, 2010 1:06:47 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,59020,50010,58744,0,53307,TO_DATE('2010-02-15 13:06:46','YYYY-MM-DD HH24:MI:SS'),0,'Key of the Network Distribution',22,'EE01','Y','Y','Y','N','N','N','N','Network Distribution Key',170,0,TO_DATE('2010-02-15 13:06:46','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:06:47 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58744 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 15, 2010 1:06:48 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,58992,50010,58745,0,53307,TO_DATE('2010-02-15 13:06:47','YYYY-MM-DD HH24:MI:SS'),0,22,'EE01','Y','Y','Y','N','N','N','Y','Network Distribution',180,0,TO_DATE('2010-02-15 13:06:47','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:06:48 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58745 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 15, 2010 1:06:48 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,58995,50010,58746,0,53307,TO_DATE('2010-02-15 13:06:48','YYYY-MM-DD HH24:MI:SS'),0,1,'EE01','Y','Y','Y','N','N','N','N','Is MPS',190,0,TO_DATE('2010-02-15 13:06:48','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:06:48 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58746 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 15, 2010 1:06:49 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,58994,50010,58747,0,53307,TO_DATE('2010-02-15 13:06:48','YYYY-MM-DD HH24:MI:SS'),0,'Indicates whether planned orders will be generated by MRP',1,'EE01','Indicates whether planned orders will be generated by MRP, if this flag is not just MRP generate a ''Create'' action notice','Y','Y','Y','N','N','N','Y','Create Plan',200,0,TO_DATE('2010-02-15 13:06:48','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:06:49 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58747 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 15, 2010 1:06:49 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,58993,50010,58748,0,53307,TO_DATE('2010-02-15 13:06:49','YYYY-MM-DD HH24:MI:SS'),0,'Promised days between order and delivery',10,'EE01','The Promised Delivery Time indicates the number of days between the order date and the date that delivery was promised.','Y','Y','Y','N','N','N','N','Promised Delivery Time',210,0,TO_DATE('2010-02-15 13:06:49','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:06:49 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58748 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 15, 2010 1:06:50 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,59009,50010,58749,0,53307,TO_DATE('2010-02-15 13:06:49','YYYY-MM-DD HH24:MI:SS'),0,22,'EE01','Y','Y','Y','N','N','N','Y','Time Fence',220,0,TO_DATE('2010-02-15 13:06:49','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:06:50 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58749 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 15, 2010 1:06:51 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,59010,50010,58750,0,53307,TO_DATE('2010-02-15 13:06:50','YYYY-MM-DD HH24:MI:SS'),0,10,'EE01','Y','Y','Y','N','N','N','N','Transfert Time',230,0,TO_DATE('2010-02-15 13:06:50','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:06:51 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58750 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 15, 2010 1:06:51 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,59003,50010,58751,0,53307,TO_DATE('2010-02-15 13:06:51','YYYY-MM-DD HH24:MI:SS'),0,3,'EE01','Y','Y','Y','N','N','N','Y','Order Policy',240,0,TO_DATE('2010-02-15 13:06:51','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:06:51 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58751 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 15, 2010 1:06:52 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,59002,50010,58752,0,53307,TO_DATE('2010-02-15 13:06:51','YYYY-MM-DD HH24:MI:SS'),0,22,'EE01','Y','Y','Y','N','N','N','N','Order Period',250,0,TO_DATE('2010-02-15 13:06:51','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:06:52 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58752 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 15, 2010 1:06:52 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,59004,50010,58753,0,53307,TO_DATE('2010-02-15 13:06:52','YYYY-MM-DD HH24:MI:SS'),0,22,'EE01','Y','Y','Y','N','N','N','Y','Order Qty',260,0,TO_DATE('2010-02-15 13:06:52','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:06:52 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58753 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 15, 2010 1:06:53 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,59001,50010,58754,0,53307,TO_DATE('2010-02-15 13:06:52','YYYY-MM-DD HH24:MI:SS'),0,'Package order size in UOM (e.g. order set of 5 units)',14,'EE01','The Order Pack Quantity indicates the number of units in each pack of this product.','Y','Y','Y','N','N','N','N','Order Pack Qty',270,0,TO_DATE('2010-02-15 13:06:52','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:06:53 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58754 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 15, 2010 1:06:54 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,59000,50010,58755,0,53307,TO_DATE('2010-02-15 13:06:53','YYYY-MM-DD HH24:MI:SS'),0,'Minimum order quantity in UOM',14,'EE01','The Minimum Order Quantity indicates the smallest quantity of this product which can be ordered.','Y','Y','Y','N','N','N','Y','Minimum Order Qty',280,0,TO_DATE('2010-02-15 13:06:53','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:06:54 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58755 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 15, 2010 1:06:54 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,58999,50010,58756,0,53307,TO_DATE('2010-02-15 13:06:54','YYYY-MM-DD HH24:MI:SS'),0,'Maximum order quantity in UOM',10,'EE01','The Maximum Order Quantity indicates the biggest quantity of this product which can be ordered.','Y','Y','Y','N','N','N','N','Maximum Order Qty',290,0,TO_DATE('2010-02-15 13:06:54','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:06:54 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58756 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 15, 2010 1:06:55 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,59007,50010,58757,0,53307,TO_DATE('2010-02-15 13:06:54','YYYY-MM-DD HH24:MI:SS'),0,'Safety stock is a term used to describe a level of stock that is maintained below the cycle stock to buffer against stock-outs',22,'EE01','Safety stock is defined as extra units of inventory carried as protection against possible stockouts. It is held when an organization cannot accurately predict demand and/or lead time for the product. + +Rereference: +http://en.wikipedia.org/wiki/Safety_stock','Y','Y','Y','N','N','N','Y','Safety Stock Qty',300,0,TO_DATE('2010-02-15 13:06:54','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:06:55 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58757 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 15, 2010 1:06:56 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,59012,50010,58758,0,53307,TO_DATE('2010-02-15 13:06:55','YYYY-MM-DD HH24:MI:SS'),0,'The Yield is the percentage of a lot that is expected to be of acceptable wuality may fall below 100 percent',22,'EE01','ADempiere Calculate the total yield for a product from the yield for each activity when the process Workflow Cost Roll-Up is executed. + +The expected yield for an Activity can be expressed as: + +Yield = Acceptable Units at Activity End x 100 + +The Total manufacturing yield for a product is determined by multiplying the yied percentage for each activity. + +Manufacturing Yield = Yield % for Activity 10 x Yied % for Activity 20 , etc + +Take care when setting yield to anything but 100% particularly when yied is used for multiples activities + +','Y','Y','Y','N','N','N','N','Yield %',310,0,TO_DATE('2010-02-15 13:06:55','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:06:56 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58758 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 15, 2010 1:06:57 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,58996,50010,58759,0,53307,TO_DATE('2010-02-15 13:06:56','YYYY-MM-DD HH24:MI:SS'),0,'Phantom Component',1,'EE01','Phantom Component are not stored and produced with the product. This is an option to avild maintaining an Engineering and Manufacturing Bill of Materials.','Y','Y','Y','N','N','N','Y','Phantom',320,0,TO_DATE('2010-02-15 13:06:56','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:06:57 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58759 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 15, 2010 1:06:57 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,58985,106,58760,0,53307,TO_DATE('2010-02-15 13:06:57','YYYY-MM-DD HH24:MI:SS'),0,'The Key of the Business Partner',22,'EE01','Y','Y','Y','N','N','N','N','Business Partner Key',330,0,TO_DATE('2010-02-15 13:06:57','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:06:57 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58760 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 15, 2010 1:06:58 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,58986,106,58761,0,53307,TO_DATE('2010-02-15 13:06:57','YYYY-MM-DD HH24:MI:SS'),0,'Identifies a Business Partner',22,'EE01','A Business Partner is anyone with whom you transact. This can include Vendor, Customer, Employee or Salesperson','Y','Y','Y','N','N','N','Y','Business Partner ',340,0,TO_DATE('2010-02-15 13:06:57','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:06:58 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58761 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 15, 2010 1:06:59 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,59027,106,58762,0,53307,TO_DATE('2010-02-15 13:06:58','YYYY-MM-DD HH24:MI:SS'),0,'Product Key of the Business Partner',22,'EE01','The Business Partner Product Key identifies the number used by the Business Partner for this product. It can be printed on orders and invoices when you include the Product Key in the print format.','Y','Y','Y','N','N','N','N','Partner Product Key',350,0,TO_DATE('2010-02-15 13:06:58','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:06:59 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58762 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 15, 2010 1:06:59 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,59022,106,58763,0,53307,TO_DATE('2010-02-15 13:06:59','YYYY-MM-DD HH24:MI:SS'),0,'Key of the Forecast',22,'EE01','Y','Y','Y','N','N','N','N','Forecast Key',360,0,TO_DATE('2010-02-15 13:06:59','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:06:59 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58763 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 15, 2010 1:07:00 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,59014,106,58764,0,53307,TO_DATE('2010-02-15 13:06:59','YYYY-MM-DD HH24:MI:SS'),0,'Material Forecast',22,'EE01','Material Forecast','Y','Y','Y','N','N','N','N','Forecast',370,0,TO_DATE('2010-02-15 13:06:59','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:07:00 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58764 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 15, 2010 1:07:01 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,59025,106,58765,0,53307,TO_DATE('2010-02-15 13:07:00','YYYY-MM-DD HH24:MI:SS'),0,'Forecast Line',10,'EE01','Forecast of Product Qyantity by Period','Y','Y','Y','N','N','Y','Y','Forecast Line',380,0,TO_DATE('2010-02-15 13:07:00','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:07:01 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58765 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 15, 2010 1:07:02 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,59013,106,58766,0,53307,TO_DATE('2010-02-15 13:07:01','YYYY-MM-DD HH24:MI:SS'),0,'Date Order was promised',7,'EE01','The Date Promised indicates the date, if any, that an Order was promised for.','Y','Y','Y','N','N','N','N','Date Promised',390,0,TO_DATE('2010-02-15 13:07:01','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:07:02 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58766 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 15, 2010 1:07:02 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,59015,106,58767,0,53307,TO_DATE('2010-02-15 13:07:02','YYYY-MM-DD HH24:MI:SS'),0,'Quantity',22,'EE01','The Quantity indicates the number of a specific product or item for this document.','Y','Y','Y','N','N','N','Y','Quantity',400,0,TO_DATE('2010-02-15 13:07:02','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:07:02 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58767 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 15, 2010 1:07:03 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,58987,58768,0,53307,TO_DATE('2010-02-15 13:07:02','YYYY-MM-DD HH24:MI:SS'),0,'Messages generated from import process',2000,'EE01','The Import Error Message displays any error messages generated during the import process.','Y','Y','Y','N','N','Y','N','Import Error Message',410,0,TO_DATE('2010-02-15 13:07:02','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:07:03 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58768 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 15, 2010 1:07:04 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,58988,58769,0,53307,TO_DATE('2010-02-15 13:07:03','YYYY-MM-DD HH24:MI:SS'),0,'Has this import been processed',1,'EE01','The Imported check box indicates if this import has been processed.','Y','Y','Y','N','N','Y','N','Imported',420,0,TO_DATE('2010-02-15 13:07:03','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:07:04 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58769 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 15, 2010 1:07:04 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,58989,58770,0,53307,TO_DATE('2010-02-15 13:07:04','YYYY-MM-DD HH24:MI:SS'),0,'The document has been processed',1,'EE01','The Processed checkbox indicates that a document has been processed.','Y','Y','Y','N','N','Y','Y','Processed',430,0,TO_DATE('2010-02-15 13:07:04','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:07:04 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58770 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 15, 2010 1:07:05 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,58990,58771,0,53307,TO_DATE('2010-02-15 13:07:04','YYYY-MM-DD HH24:MI:SS'),0,1,'EE01','Y','N','Y','N','N','N','N','Import Product Planning Data',440,0,TO_DATE('2010-02-15 13:07:04','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:07:05 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58771 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 15, 2010 1:07:06 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,58977,58772,0,53307,TO_DATE('2010-02-15 13:07:05','YYYY-MM-DD HH24:MI:SS'),0,10,'EE01','Y','Y','N','N','N','N','N','Import Product Planning',0,0,TO_DATE('2010-02-15 13:07:05','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:07:06 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58772 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 15, 2010 1:07:07 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Menu (AD_Client_ID,AD_Menu_ID,AD_Org_ID,AD_Window_ID,Action,Created,CreatedBy,EntityType,IsActive,IsReadOnly,IsSOTrx,IsSummary,Name,Updated,UpdatedBy) VALUES (0,53264,0,53109,'W',TO_DATE('2010-02-15 13:07:06','YYYY-MM-DD HH24:MI:SS'),0,'EE01','Y','N','N','N','Import Product Planning',TO_DATE('2010-02-15 13:07:06','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:07:07 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Menu_Trl (AD_Language,AD_Menu_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Menu_ID, t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Menu t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Menu_ID=53264 AND NOT EXISTS (SELECT * FROM AD_Menu_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Menu_ID=t.AD_Menu_ID) +; + +-- Feb 15, 2010 1:07:07 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_TREENODEMM(AD_Client_ID, AD_Org_ID, CreatedBy, UpdatedBy, Parent_ID, SeqNo, AD_Tree_ID, Node_ID)VALUES(0, 0, 0, 0, 163,4, 10, 53264) +; + diff --git a/migration/354a-trunk/oracle/666_BF2952456_PP_Identifiers.sql b/migration/354a-trunk/oracle/666_BF2952456_PP_Identifiers.sql new file mode 100644 index 0000000000..8f6cad7372 --- /dev/null +++ b/migration/354a-trunk/oracle/666_BF2952456_PP_Identifiers.sql @@ -0,0 +1,20 @@ +-- Feb 15, 2010 5:40:55 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Column SET AD_Reference_ID=19, AD_Reference_Value_ID=NULL, IsIdentifier='Y', IsUpdateable='N', SeqNo=1,Updated=TO_DATE('2010-02-15 17:40:55','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Column_ID=53389 +; + +-- Feb 15, 2010 5:41:22 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Column SET Help=NULL, IsIdentifier='Y', SeqNo=2,Updated=TO_DATE('2010-02-15 17:41:22','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Column_ID=53400 +; + +-- Feb 15, 2010 5:41:22 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Field SET Name='Resource', Description='Resource', Help=NULL WHERE AD_Column_ID=53400 AND IsCentrallyMaintained='Y' +; + +-- Feb 15, 2010 5:41:44 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Column SET AD_Reference_ID=19, AD_Reference_Value_ID=NULL, IsIdentifier='Y', SeqNo=3,Updated=TO_DATE('2010-02-15 17:41:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Column_ID=53390 +; + diff --git a/migration/354a-trunk/oracle/667_FR2956390_SchedulerEnhancement.sql b/migration/354a-trunk/oracle/667_FR2956390_SchedulerEnhancement.sql new file mode 100644 index 0000000000..5138167db9 --- /dev/null +++ b/migration/354a-trunk/oracle/667_FR2956390_SchedulerEnhancement.sql @@ -0,0 +1,160 @@ +-- Feb 19, 2010 5:22:38 PM MYT +-- adding cron4j to the Adempiere scheduler - ID: 2950261 +INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,Description,EntityType,Help,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,54123,0,'IsIgnoreProcessingTime',TO_DATE('2010-02-19 17:22:35','YYYY-MM-DD HH24:MI:SS'),100,'Do not include processing time for the DateNextRun calculation','D','When this is selected, the previous DateNextRun is always use as the source for the next DateNextRun calculation.','Y','Ignore Processing Time','Ignore Proccessing Time',TO_DATE('2010-02-19 17:22:35','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Feb 19, 2010 5:22:38 PM MYT +-- adding cron4j to the Adempiere scheduler - ID: 2950261 +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=54123 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID) +; + +-- Feb 19, 2010 5:26:11 PM MYT +-- adding cron4j to the Adempiere scheduler - ID: 2950261 +INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,Description,EntityType,Help,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,54124,0,'CronPattern',TO_DATE('2010-02-19 17:26:04','YYYY-MM-DD HH24:MI:SS'),100,'Cron pattern to define when the process should be invoked.','D','Cron pattern to define when the process should be invoked. See http://en.wikipedia.org/wiki/Cron#crontab_syntax for cron scheduling syntax and example.','Y','Cron Scheduling Pattern','Cron Scheduling Pattern',TO_DATE('2010-02-19 17:26:04','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Feb 19, 2010 5:26:11 PM MYT +-- adding cron4j to the Adempiere scheduler - ID: 2950261 +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=54124 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID) +; + +-- Feb 19, 2010 5:29:11 PM MYT +-- adding cron4j to the Adempiere scheduler - ID: 2950261 +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,59028,54123,0,20,688,'IsIgnoreProcessingTime',TO_DATE('2010-02-19 17:29:09','YYYY-MM-DD HH24:MI:SS'),100,'N','Do not include processing time for the DateNextRun calculation','D',1,'When this is selected, the previous DateNextRun is always use as the source for the next DateNextRun calculation.','Y','Y','N','N','N','N','N','N','N','N','N','N','Y','Ignore Processing Time',0,TO_DATE('2010-02-19 17:29:09','YYYY-MM-DD HH24:MI:SS'),100,1.000000000000) +; + +-- Feb 19, 2010 5:29:11 PM MYT +-- adding cron4j to the Adempiere scheduler - ID: 2950261 +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59028 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 19, 2010 5:29:16 PM MYT +-- adding cron4j to the Adempiere scheduler - ID: 2950261 +ALTER TABLE AD_Scheduler ADD IsIgnoreProcessingTime CHAR(1) DEFAULT 'N' CHECK (IsIgnoreProcessingTime IN ('Y','N')) +; + +-- Feb 19, 2010 5:46:42 PM MYT +-- adding cron4j to the Adempiere scheduler - ID: 2950261 +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,59029,54124,0,10,688,'CronPattern',TO_DATE('2010-02-19 17:46:38','YYYY-MM-DD HH24:MI:SS'),100,'Cron pattern to define when the process should be invoked.','D',255,'Cron pattern to define when the process should be invoked. See http://en.wikipedia.org/wiki/Cron#crontab_syntax for cron scheduling syntax and example.','Y','Y','N','N','N','N','N','N','N','N','N','N','Y','Cron Scheduling Pattern',0,TO_DATE('2010-02-19 17:46:38','YYYY-MM-DD HH24:MI:SS'),100,1.000000000000) +; + +-- Feb 19, 2010 5:46:42 PM MYT +-- adding cron4j to the Adempiere scheduler - ID: 2950261 +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59029 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 19, 2010 5:46:46 PM MYT +-- adding cron4j to the Adempiere scheduler - ID: 2950261 +ALTER TABLE AD_Scheduler ADD CronPattern NVARCHAR2(255) DEFAULT NULL +; + +-- Feb 19, 2010 5:47:11 PM MYT +-- adding cron4j to the Adempiere scheduler - ID: 2950261 +UPDATE AD_Column SET IsMandatory='N',Updated=TO_DATE('2010-02-19 17:47:11','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=11247 +; + +-- Feb 19, 2010 5:47:18 PM MYT +-- adding cron4j to the Adempiere scheduler - ID: 2950261 +UPDATE AD_Column SET IsMandatory='N',Updated=TO_DATE('2010-02-19 17:47:18','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=11255 +; + +-- Feb 19, 2010 5:48:07 PM MYT +-- adding cron4j to the Adempiere scheduler - ID: 2950261 +UPDATE AD_Ref_List SET IsActive='N',Updated=TO_DATE('2010-02-19 17:48:07','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Ref_List_ID=665 +; + +-- Feb 19, 2010 5:48:10 PM MYT +-- adding cron4j to the Adempiere scheduler - ID: 2950261 +UPDATE AD_Ref_List SET IsActive='N',Updated=TO_DATE('2010-02-19 17:48:10','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Ref_List_ID=664 +; + +-- Feb 19, 2010 5:49:04 PM MYT +-- adding cron4j to the Adempiere scheduler - ID: 2950261 +INSERT INTO AD_Ref_List (AD_Client_ID,AD_Org_ID,AD_Reference_ID,AD_Ref_List_ID,Created,CreatedBy,Description,EntityType,IsActive,Name,Updated,UpdatedBy,Value) VALUES (0,0,318,53574,TO_DATE('2010-02-19 17:49:02','YYYY-MM-DD HH24:MI:SS'),100,'Use cron style scheduling pattern','D','Y','Cron Scheduling Pattern',TO_DATE('2010-02-19 17:49:02','YYYY-MM-DD HH24:MI:SS'),100,'C') +; + +-- Feb 19, 2010 5:49:04 PM MYT +-- adding cron4j to the Adempiere scheduler - ID: 2950261 +INSERT INTO AD_Ref_List_Trl (AD_Language,AD_Ref_List_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Ref_List_ID, t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Ref_List t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Ref_List_ID=53574 AND NOT EXISTS (SELECT * FROM AD_Ref_List_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Ref_List_ID=t.AD_Ref_List_ID) +; + +-- Feb 19, 2010 5:53:21 PM MYT +-- adding cron4j to the Adempiere scheduler - ID: 2950261 +UPDATE AD_Field SET IsActive='N',Updated=TO_DATE('2010-02-19 17:53:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=10053 +; + +-- Feb 19, 2010 5:53:26 PM MYT +-- adding cron4j to the Adempiere scheduler - ID: 2950261 +UPDATE AD_Field SET IsActive='N',Updated=TO_DATE('2010-02-19 17:53:26','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=10052 +; + +-- Feb 19, 2010 5:54:51 PM MYT +-- adding cron4j to the Adempiere scheduler - ID: 2950261 +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,DisplayLogic,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,59028,58773,0,589,TO_DATE('2010-02-19 17:54:49','YYYY-MM-DD HH24:MI:SS'),100,'Do not include processing time for the DateNextRun calculation',10,'@ScheduleType@=F','D','When this is selected, the previous DateNextRun is always use as the source for the next DateNextRun calculation.','Y','Y','Y','N','N','N','N','N','Ignore Processing Time',160,0,TO_DATE('2010-02-19 17:54:49','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Feb 19, 2010 5:54:51 PM MYT +-- adding cron4j to the Adempiere scheduler - ID: 2950261 +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58773 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 19, 2010 5:55:49 PM MYT +-- adding cron4j to the Adempiere scheduler - ID: 2950261 +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,DisplayLogic,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsMandatory,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,59029,58774,0,589,TO_DATE('2010-02-19 17:55:48','YYYY-MM-DD HH24:MI:SS'),100,'Cron pattern to define when the process should be invoked.',60,'@ScheduleType@=C','D','Cron pattern to define when the process should be invoked. See http://en.wikipedia.org/wiki/Cron#crontab_syntax for cron scheduling syntax and example.','Y','Y','Y','N','N','N','Y','N','N','Cron Scheduling Pattern',170,0,TO_DATE('2010-02-19 17:55:48','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Feb 19, 2010 5:55:49 PM MYT +-- adding cron4j to the Adempiere scheduler - ID: 2950261 +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58774 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 19, 2010 5:57:03 PM MYT +-- adding cron4j to the Adempiere scheduler - ID: 2950261 +UPDATE AD_Field SET SeqNo=0,IsDisplayed='N' WHERE AD_Field_ID=10053 +; + +-- Feb 19, 2010 5:57:03 PM MYT +-- adding cron4j to the Adempiere scheduler - ID: 2950261 +UPDATE AD_Field SET SeqNo=0,IsDisplayed='N' WHERE AD_Field_ID=10052 +; + +-- Feb 19, 2010 5:57:03 PM MYT +-- adding cron4j to the Adempiere scheduler - ID: 2950261 +UPDATE AD_Field SET SeqNo=80,IsDisplayed='Y' WHERE AD_Field_ID=9437 +; + +-- Feb 19, 2010 5:57:03 PM MYT +-- adding cron4j to the Adempiere scheduler - ID: 2950261 +UPDATE AD_Field SET SeqNo=90,IsDisplayed='Y' WHERE AD_Field_ID=9430 +; + +-- Feb 19, 2010 5:57:03 PM MYT +-- adding cron4j to the Adempiere scheduler - ID: 2950261 +UPDATE AD_Field SET SeqNo=100,IsDisplayed='Y' WHERE AD_Field_ID=58773 +; + +-- Feb 19, 2010 5:57:03 PM MYT +-- adding cron4j to the Adempiere scheduler - ID: 2950261 +UPDATE AD_Field SET SeqNo=110,IsDisplayed='Y' WHERE AD_Field_ID=58774 +; + +-- Feb 19, 2010 5:57:21 PM MYT +-- adding cron4j to the Adempiere scheduler - ID: 2950261 +UPDATE AD_Field SET IsMandatory='Y',Updated=TO_DATE('2010-02-19 17:57:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=9430 +; + +-- Feb 19, 2010 5:57:28 PM MYT +-- adding cron4j to the Adempiere scheduler - ID: 2950261 +UPDATE AD_Field SET IsMandatory='Y',Updated=TO_DATE('2010-02-19 17:57:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=9437 +; + +-- Feb 22, 2010 9:31:45 AM MYT +-- adding cron4j to the Adempiere scheduler - ID: 2950261 +INSERT INTO AD_Message (AD_Client_ID,AD_Message_ID,AD_Org_ID,Created,CreatedBy,EntityType,IsActive,MsgText,MsgTip,MsgType,Updated,UpdatedBy,Value) VALUES (0,53095,0,TO_DATE('2010-02-22 09:31:41','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Invalid cron scheduling pattern','Invalid cron scheduling pattern - check syntax','E',TO_DATE('2010-02-22 09:31:41','YYYY-MM-DD HH24:MI:SS'),100,'InvalidCronPattern') +; + +-- Feb 22, 2010 9:31:45 AM MYT +-- adding cron4j to the Adempiere scheduler - ID: 2950261 +INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=53095 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID) +; + diff --git a/migration/354a-trunk/oracle/668_FR2957782_PaySelection_DueDate_Para.sql b/migration/354a-trunk/oracle/668_FR2957782_PaySelection_DueDate_Para.sql new file mode 100644 index 0000000000..05bf813568 --- /dev/null +++ b/migration/354a-trunk/oracle/668_FR2957782_PaySelection_DueDate_Para.sql @@ -0,0 +1,10 @@ +-- Feb 24, 2010 4:03:13 PM EST +-- Payment selection due date parameter +INSERT INTO AD_Process_Para (AD_Client_ID,AD_Element_ID,AD_Org_ID,AD_Process_ID,AD_Process_Para_ID,AD_Reference_ID,ColumnName,Created,CreatedBy,Description,DisplayLogic,EntityType,FieldLength,Help,IsActive,IsCentrallyMaintained,IsMandatory,IsRange,Name,SeqNo,Updated,UpdatedBy) VALUES (0,2000,0,156,53404,15,'DueDate',TO_DATE('2010-02-24 16:03:03','YYYY-MM-DD HH24:MI:SS'),100,'Date when the payment is due','@OnlyDue@=Y','D',7,'Date when the payment is due without deductions or discount','Y','Y','N','N','Due Date',45,TO_DATE('2010-02-24 16:03:03','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Feb 24, 2010 4:03:13 PM EST +-- Payment selection due date parameter +INSERT INTO AD_Process_Para_Trl (AD_Language,AD_Process_Para_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Process_Para_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Process_Para t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Process_Para_ID=53404 AND NOT EXISTS (SELECT * FROM AD_Process_Para_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Process_Para_ID=t.AD_Process_Para_ID) +; + diff --git a/migration/354a-trunk/oracle/669_BF2904257.sql b/migration/354a-trunk/oracle/669_BF2904257.sql new file mode 100644 index 0000000000..6fdf7546a9 --- /dev/null +++ b/migration/354a-trunk/oracle/669_BF2904257.sql @@ -0,0 +1,5 @@ +-- 01-mar-2010 12:10:16 COT +-- Bug_2904257_wrong validation sql for M_InOutShipment/Receipt (RMA) +UPDATE AD_Val_Rule SET Code='M_InOutLine.M_InOut_ID=@InOut_ID@',Updated=TO_DATE('2010-03-01 12:10:16','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Val_Rule_ID=52001 +; + diff --git a/migration/354a-trunk/oracle/670_FR2962094_AddProcesssedOnColumn.sql b/migration/354a-trunk/oracle/670_FR2962094_AddProcesssedOnColumn.sql new file mode 100644 index 0000000000..6715b27b9b --- /dev/null +++ b/migration/354a-trunk/oracle/670_FR2962094_AddProcesssedOnColumn.sql @@ -0,0 +1,237 @@ +-- Mar 2, 2010 2:06:30 PM COT +-- FR_2962094_Finish implementation of weighted average costing +INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,Description,EntityType,Help,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,54128,0,'ProcessedOn',TO_DATE('2010-03-02 14:06:28','YYYY-MM-DD HH24:MI:SS'),100,'The date+time (expressed in decimal format) when the document has been processed','D','The ProcessedOn Date+Time save the exact moment (nanoseconds precision if allowed by the DB) when a document has been processed.','Y','Processed On','Processed On',TO_DATE('2010-03-02 14:06:28','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Mar 2, 2010 2:06:30 PM COT +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=54128 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID) +; + +-- Mar 2, 2010 2:08:58 PM COT +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,59034,54128,0,22,735,'ProcessedOn',TO_DATE('2010-03-02 14:08:57','YYYY-MM-DD HH24:MI:SS'),100,'The date+time (expressed in decimal format) when the document has been processed','D',20,'The ProcessedOn Date+Time save the exact moment (nanoseconds precision if allowed by the DB) when a document has been processed.','Y','N','N','N','N','N','N','N','N','N','Y','Processed On',0,TO_DATE('2010-03-02 14:08:57','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Mar 2, 2010 2:08:58 PM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59034 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 2, 2010 2:09:03 PM COT +ALTER TABLE C_AllocationHdr ADD ProcessedOn NUMBER DEFAULT NULL +; + +-- Mar 2, 2010 2:09:54 PM COT +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,59035,54128,0,22,392,'ProcessedOn',TO_DATE('2010-03-02 14:09:54','YYYY-MM-DD HH24:MI:SS'),100,'The date+time (expressed in decimal format) when the document has been processed','D',20,'The ProcessedOn Date+Time save the exact moment (nanoseconds precision if allowed by the DB) when a document has been processed.','Y','N','N','N','N','N','N','N','N','N','Y','Processed On',0,TO_DATE('2010-03-02 14:09:54','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Mar 2, 2010 2:09:54 PM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59035 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 2, 2010 2:09:56 PM COT +ALTER TABLE C_BankStatement ADD ProcessedOn NUMBER DEFAULT NULL +; + +-- Mar 2, 2010 2:10:39 PM COT +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,59036,54128,0,22,407,'ProcessedOn',TO_DATE('2010-03-02 14:10:38','YYYY-MM-DD HH24:MI:SS'),100,'The date+time (expressed in decimal format) when the document has been processed','D',20,'The ProcessedOn Date+Time save the exact moment (nanoseconds precision if allowed by the DB) when a document has been processed.','Y','N','N','N','N','N','N','N','N','N','Y','Processed On',0,TO_DATE('2010-03-02 14:10:38','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Mar 2, 2010 2:10:39 PM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59036 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 2, 2010 2:10:42 PM COT +ALTER TABLE C_Cash ADD ProcessedOn NUMBER DEFAULT NULL +; + +-- Mar 2, 2010 2:11:19 PM COT +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,59037,54128,0,22,318,'ProcessedOn',TO_DATE('2010-03-02 14:11:19','YYYY-MM-DD HH24:MI:SS'),100,'The date+time (expressed in decimal format) when the document has been processed','D',20,'The ProcessedOn Date+Time save the exact moment (nanoseconds precision if allowed by the DB) when a document has been processed.','Y','N','N','N','N','N','N','N','N','N','Y','Processed On',0,TO_DATE('2010-03-02 14:11:19','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Mar 2, 2010 2:11:19 PM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59037 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 2, 2010 2:11:22 PM COT +ALTER TABLE C_Invoice ADD ProcessedOn NUMBER DEFAULT NULL +; + +-- Mar 2, 2010 2:11:48 PM COT +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,59038,54128,0,22,259,'ProcessedOn',TO_DATE('2010-03-02 14:11:48','YYYY-MM-DD HH24:MI:SS'),100,'The date+time (expressed in decimal format) when the document has been processed','D',20,'The ProcessedOn Date+Time save the exact moment (nanoseconds precision if allowed by the DB) when a document has been processed.','Y','N','N','N','N','N','N','N','N','N','Y','Processed On',0,TO_DATE('2010-03-02 14:11:48','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Mar 2, 2010 2:11:48 PM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59038 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 2, 2010 2:11:51 PM COT +ALTER TABLE C_Order ADD ProcessedOn NUMBER DEFAULT NULL +; + +-- Mar 2, 2010 2:12:19 PM COT +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,59039,54128,0,22,335,'ProcessedOn',TO_DATE('2010-03-02 14:12:15','YYYY-MM-DD HH24:MI:SS'),100,'The date+time (expressed in decimal format) when the document has been processed','D',20,'The ProcessedOn Date+Time save the exact moment (nanoseconds precision if allowed by the DB) when a document has been processed.','Y','N','N','N','N','N','N','N','N','N','Y','Processed On',0,TO_DATE('2010-03-02 14:12:15','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Mar 2, 2010 2:12:19 PM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59039 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 2, 2010 2:12:22 PM COT +ALTER TABLE C_Payment ADD ProcessedOn NUMBER DEFAULT NULL +; + +-- Mar 2, 2010 2:12:53 PM COT +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,59040,54128,0,22,623,'ProcessedOn',TO_DATE('2010-03-02 14:12:52','YYYY-MM-DD HH24:MI:SS'),100,'The date+time (expressed in decimal format) when the document has been processed','D',20,'The ProcessedOn Date+Time save the exact moment (nanoseconds precision if allowed by the DB) when a document has been processed.','Y','N','N','N','N','N','N','N','N','N','Y','Processed On',0,TO_DATE('2010-03-02 14:12:52','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Mar 2, 2010 2:12:53 PM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59040 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 2, 2010 2:12:55 PM COT +ALTER TABLE C_ProjectIssue ADD ProcessedOn NUMBER DEFAULT NULL +; + +-- Mar 2, 2010 2:13:31 PM COT +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,59041,54128,0,22,53037,'ProcessedOn',TO_DATE('2010-03-02 14:13:31','YYYY-MM-DD HH24:MI:SS'),100,'The date+time (expressed in decimal format) when the document has been processed','D',20,'The ProcessedOn Date+Time save the exact moment (nanoseconds precision if allowed by the DB) when a document has been processed.','Y','N','N','N','N','N','N','N','N','N','Y','Processed On',0,TO_DATE('2010-03-02 14:13:31','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Mar 2, 2010 2:13:31 PM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59041 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 2, 2010 2:13:34 PM COT +ALTER TABLE DD_Order ADD ProcessedOn NUMBER DEFAULT NULL +; + +-- Mar 2, 2010 2:13:58 PM COT +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,59042,54128,0,22,224,'ProcessedOn',TO_DATE('2010-03-02 14:13:57','YYYY-MM-DD HH24:MI:SS'),100,'The date+time (expressed in decimal format) when the document has been processed','D',20,'The ProcessedOn Date+Time save the exact moment (nanoseconds precision if allowed by the DB) when a document has been processed.','Y','N','N','N','N','N','N','N','N','N','Y','Processed On',0,TO_DATE('2010-03-02 14:13:57','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Mar 2, 2010 2:13:58 PM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59042 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 2, 2010 2:14:00 PM COT +ALTER TABLE GL_Journal ADD ProcessedOn NUMBER DEFAULT NULL +; + +-- Mar 2, 2010 2:14:24 PM COT +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,59043,54128,0,22,53092,'ProcessedOn',TO_DATE('2010-03-02 14:14:24','YYYY-MM-DD HH24:MI:SS'),100,'The date+time (expressed in decimal format) when the document has been processed','D',20,'The ProcessedOn Date+Time save the exact moment (nanoseconds precision if allowed by the DB) when a document has been processed.','Y','N','N','N','N','N','N','N','N','N','Y','Processed On',0,TO_DATE('2010-03-02 14:14:24','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Mar 2, 2010 2:14:24 PM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59043 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 2, 2010 2:14:36 PM COT +ALTER TABLE HR_Process ADD ProcessedOn NUMBER DEFAULT NULL +; + +-- Mar 2, 2010 2:15:02 PM COT +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,59044,54128,0,22,319,'ProcessedOn',TO_DATE('2010-03-02 14:15:00','YYYY-MM-DD HH24:MI:SS'),100,'The date+time (expressed in decimal format) when the document has been processed','D',20,'The ProcessedOn Date+Time save the exact moment (nanoseconds precision if allowed by the DB) when a document has been processed.','Y','N','N','N','N','N','N','N','N','N','Y','Processed On',0,TO_DATE('2010-03-02 14:15:00','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Mar 2, 2010 2:15:02 PM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59044 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 2, 2010 2:15:05 PM COT +ALTER TABLE M_InOut ADD ProcessedOn NUMBER DEFAULT NULL +; + +-- Mar 2, 2010 2:15:29 PM COT +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,59045,54128,0,22,321,'ProcessedOn',TO_DATE('2010-03-02 14:15:28','YYYY-MM-DD HH24:MI:SS'),100,'The date+time (expressed in decimal format) when the document has been processed','D',20,'The ProcessedOn Date+Time save the exact moment (nanoseconds precision if allowed by the DB) when a document has been processed.','Y','N','N','N','N','N','N','N','N','N','Y','Processed On',0,TO_DATE('2010-03-02 14:15:28','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Mar 2, 2010 2:15:29 PM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59045 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 2, 2010 2:15:30 PM COT +ALTER TABLE M_Inventory ADD ProcessedOn NUMBER DEFAULT NULL +; + +-- Mar 2, 2010 2:15:52 PM COT +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,59046,54128,0,22,472,'ProcessedOn',TO_DATE('2010-03-02 14:15:51','YYYY-MM-DD HH24:MI:SS'),100,'The date+time (expressed in decimal format) when the document has been processed','D',20,'The ProcessedOn Date+Time save the exact moment (nanoseconds precision if allowed by the DB) when a document has been processed.','Y','N','N','N','N','N','N','N','N','N','Y','Processed On',0,TO_DATE('2010-03-02 14:15:51','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Mar 2, 2010 2:15:52 PM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59046 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 2, 2010 2:15:53 PM COT +ALTER TABLE M_MatchInv ADD ProcessedOn NUMBER DEFAULT NULL +; + +-- Mar 2, 2010 2:16:16 PM COT +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,59047,54128,0,22,473,'ProcessedOn',TO_DATE('2010-03-02 14:16:15','YYYY-MM-DD HH24:MI:SS'),100,'The date+time (expressed in decimal format) when the document has been processed','D',20,'The ProcessedOn Date+Time save the exact moment (nanoseconds precision if allowed by the DB) when a document has been processed.','Y','N','N','N','N','N','N','N','N','N','Y','Processed On',0,TO_DATE('2010-03-02 14:16:15','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Mar 2, 2010 2:16:16 PM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59047 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 2, 2010 2:16:17 PM COT +ALTER TABLE M_MatchPO ADD ProcessedOn NUMBER DEFAULT NULL +; + +-- Mar 2, 2010 2:16:43 PM COT +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,59048,54128,0,22,323,'ProcessedOn',TO_DATE('2010-03-02 14:16:42','YYYY-MM-DD HH24:MI:SS'),100,'The date+time (expressed in decimal format) when the document has been processed','D',20,'The ProcessedOn Date+Time save the exact moment (nanoseconds precision if allowed by the DB) when a document has been processed.','Y','N','N','N','N','N','N','N','N','N','Y','Processed On',0,TO_DATE('2010-03-02 14:16:42','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Mar 2, 2010 2:16:43 PM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59048 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 2, 2010 2:16:44 PM COT +ALTER TABLE M_Movement ADD ProcessedOn NUMBER DEFAULT NULL +; + +-- Mar 2, 2010 2:17:09 PM COT +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,59049,54128,0,22,325,'ProcessedOn',TO_DATE('2010-03-02 14:17:09','YYYY-MM-DD HH24:MI:SS'),100,'The date+time (expressed in decimal format) when the document has been processed','D',20,'The ProcessedOn Date+Time save the exact moment (nanoseconds precision if allowed by the DB) when a document has been processed.','Y','N','N','N','N','N','N','N','N','N','Y','Processed On',0,TO_DATE('2010-03-02 14:17:09','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Mar 2, 2010 2:17:09 PM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59049 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 2, 2010 2:17:11 PM COT +ALTER TABLE M_Production ADD ProcessedOn NUMBER DEFAULT NULL +; + +-- Mar 2, 2010 2:17:33 PM COT +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,59050,54128,0,22,702,'ProcessedOn',TO_DATE('2010-03-02 14:17:33','YYYY-MM-DD HH24:MI:SS'),100,'The date+time (expressed in decimal format) when the document has been processed','D',20,'The ProcessedOn Date+Time save the exact moment (nanoseconds precision if allowed by the DB) when a document has been processed.','Y','N','N','N','N','N','N','N','N','N','Y','Processed On',0,TO_DATE('2010-03-02 14:17:33','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Mar 2, 2010 2:17:33 PM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59050 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 2, 2010 2:17:35 PM COT +ALTER TABLE M_Requisition ADD ProcessedOn NUMBER DEFAULT NULL +; + +-- Mar 2, 2010 2:18:10 PM COT +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,59051,54128,0,22,53035,'ProcessedOn',TO_DATE('2010-03-02 14:18:09','YYYY-MM-DD HH24:MI:SS'),100,'The date+time (expressed in decimal format) when the document has been processed','D',20,'The ProcessedOn Date+Time save the exact moment (nanoseconds precision if allowed by the DB) when a document has been processed.','Y','N','N','N','N','N','N','N','N','N','Y','Processed On',0,TO_DATE('2010-03-02 14:18:09','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Mar 2, 2010 2:18:10 PM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59051 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 2, 2010 2:18:12 PM COT +ALTER TABLE PP_Cost_Collector ADD ProcessedOn NUMBER DEFAULT NULL +; + +-- Mar 2, 2010 2:18:38 PM COT +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,59052,54128,0,22,53027,'ProcessedOn',TO_DATE('2010-03-02 14:18:38','YYYY-MM-DD HH24:MI:SS'),100,'The date+time (expressed in decimal format) when the document has been processed','D',20,'The ProcessedOn Date+Time save the exact moment (nanoseconds precision if allowed by the DB) when a document has been processed.','Y','N','N','N','N','N','N','N','N','N','Y','Processed On',0,TO_DATE('2010-03-02 14:18:38','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Mar 2, 2010 2:18:38 PM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59052 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 2, 2010 2:18:40 PM COT +ALTER TABLE PP_Order ADD ProcessedOn NUMBER DEFAULT NULL +; + diff --git a/migration/354a-trunk/oracle/671_FR2962094_FillProcesssedOn.sql b/migration/354a-trunk/oracle/671_FR2962094_FillProcesssedOn.sql new file mode 100644 index 0000000000..ffbc54d22a --- /dev/null +++ b/migration/354a-trunk/oracle/671_FR2962094_FillProcesssedOn.sql @@ -0,0 +1,421 @@ +-- create temporary index +CREATE INDEX tmp_ad_wf_activity_speed ON ad_wf_activity(ad_table_id, record_id); + +-- ****** SET ProcessedOn on table C_AllocationHdr ****** + +-- try to get the processed from ad_changelog +update C_AllocationHdr set processedon = +(select max((updated - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000) from ad_changelog + where ad_table_id = 735 and record_id = C_AllocationHdr.C_AllocationHdr_id and ad_column_id = 12309 + and (newvalue = 'Y' or newvalue = 'true') and (oldvalue = 'false' or oldvalue = 'NULL' or oldvalue is null)) +where processedon is null and processed = 'Y'; + +-- if not then try to get the processed from ad_wf_activity +update C_AllocationHdr set processedon = +(select max((a.updated - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000) from ad_wf_activity a, ad_wf_node n +where a.ad_table_id = 735 and a.record_id = C_AllocationHdr.C_AllocationHdr_id +and a.ad_wf_node_id = n.ad_wf_node_id and n.docaction = 'CO' and a.wfstate = 'CC') +where processedon is null and processed = 'Y'; + +-- fallback to created date +update C_AllocationHdr set processedon = (created - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000 +where processedon is null and processed = 'Y'; + + + +-- ****** SET ProcessedOn on table C_BankStatement ****** + +-- try to get the processed from ad_changelog +update C_BankStatement set processedon = +(select max((updated - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000) from ad_changelog + where ad_table_id = 392 and record_id = C_BankStatement.C_BankStatement_id and ad_column_id = 4924 + and (newvalue = 'Y' or newvalue = 'true') and (oldvalue = 'false' or oldvalue = 'NULL' or oldvalue is null)) +where processedon is null and processed = 'Y'; + +-- if not then try to get the processed from ad_wf_activity +update C_BankStatement set processedon = +(select max((a.updated - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000) from ad_wf_activity a, ad_wf_node n +where a.ad_table_id = 392 and a.record_id = C_BankStatement.C_BankStatement_id +and a.ad_wf_node_id = n.ad_wf_node_id and n.docaction = 'CO' and a.wfstate = 'CC') +where processedon is null and processed = 'Y'; + +-- fallback to created date +update C_BankStatement set processedon = (created - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000 +where processedon is null and processed = 'Y'; + + + +-- ****** SET ProcessedOn on table C_Cash ****** + +-- try to get the processed from ad_changelog +update C_Cash set processedon = +(select max((updated - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000) from ad_changelog + where ad_table_id = 407 and record_id = C_Cash.C_Cash_id and ad_column_id = 5258 + and (newvalue = 'Y' or newvalue = 'true') and (oldvalue = 'false' or oldvalue = 'NULL' or oldvalue is null)) +where processedon is null and processed = 'Y'; + +-- if not then try to get the processed from ad_wf_activity +update C_Cash set processedon = +(select max((a.updated - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000) from ad_wf_activity a, ad_wf_node n +where a.ad_table_id = 407 and a.record_id = C_Cash.C_Cash_id +and a.ad_wf_node_id = n.ad_wf_node_id and n.docaction = 'CO' and a.wfstate = 'CC') +where processedon is null and processed = 'Y'; + +-- fallback to created date +update C_Cash set processedon = (created - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000 +where processedon is null and processed = 'Y'; + + + +-- ****** SET ProcessedOn on table C_Invoice ****** + +-- try to get the processed from ad_changelog +update C_Invoice set processedon = +(select max((updated - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000) from ad_changelog + where ad_table_id = 318 and record_id = C_Invoice.C_Invoice_id and ad_column_id = 3497 + and (newvalue = 'Y' or newvalue = 'true') and (oldvalue = 'false' or oldvalue = 'NULL' or oldvalue is null)) +where processedon is null and processed = 'Y'; + +-- if not then try to get the processed from ad_wf_activity +update C_Invoice set processedon = +(select max((a.updated - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000) from ad_wf_activity a, ad_wf_node n +where a.ad_table_id = 318 and a.record_id = C_Invoice.C_Invoice_id +and a.ad_wf_node_id = n.ad_wf_node_id and n.docaction = 'CO' and a.wfstate = 'CC') +where processedon is null and processed = 'Y'; + +-- fallback to created date +update C_Invoice set processedon = (created - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000 +where processedon is null and processed = 'Y'; + + + +-- ****** SET ProcessedOn on table C_Order ****** + +-- try to get the processed from ad_changelog +update C_Order set processedon = +(select max((updated - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000) from ad_changelog + where ad_table_id = 259 and record_id = C_Order.C_Order_id and ad_column_id = 3398 + and (newvalue = 'Y' or newvalue = 'true') and (oldvalue = 'false' or oldvalue = 'NULL' or oldvalue is null)) +where processedon is null and processed = 'Y'; + +-- if not then try to get the processed from ad_wf_activity +update C_Order set processedon = +(select max((a.updated - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000) from ad_wf_activity a, ad_wf_node n +where a.ad_table_id = 259 and a.record_id = C_Order.C_Order_id +and a.ad_wf_node_id = n.ad_wf_node_id and n.docaction = 'CO' and a.wfstate = 'CC') +where processedon is null and processed = 'Y'; + +-- fallback to created date +update C_Order set processedon = (created - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000 +where processedon is null and processed = 'Y'; + + + +-- ****** SET ProcessedOn on table C_Payment ****** + +-- try to get the processed from ad_changelog +update C_Payment set processedon = +(select max((updated - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000) from ad_changelog + where ad_table_id = 335 and record_id = C_Payment.C_Payment_id and ad_column_id = 3878 + and (newvalue = 'Y' or newvalue = 'true') and (oldvalue = 'false' or oldvalue = 'NULL' or oldvalue is null)) +where processedon is null and processed = 'Y'; + +-- if not then try to get the processed from ad_wf_activity +update C_Payment set processedon = +(select max((a.updated - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000) from ad_wf_activity a, ad_wf_node n +where a.ad_table_id = 335 and a.record_id = C_Payment.C_Payment_id +and a.ad_wf_node_id = n.ad_wf_node_id and n.docaction = 'CO' and a.wfstate = 'CC') +where processedon is null and processed = 'Y'; + +-- fallback to created date +update C_Payment set processedon = (created - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000 +where processedon is null and processed = 'Y'; + + + +-- ****** SET ProcessedOn on table C_ProjectIssue ****** + +-- try to get the processed from ad_changelog +update C_ProjectIssue set processedon = +(select max((updated - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000) from ad_changelog + where ad_table_id = 623 and record_id = C_ProjectIssue.C_ProjectIssue_id and ad_column_id = 9842 + and (newvalue = 'Y' or newvalue = 'true') and (oldvalue = 'false' or oldvalue = 'NULL' or oldvalue is null)) +where processedon is null and processed = 'Y'; + +-- if not then try to get the processed from ad_wf_activity +update C_ProjectIssue set processedon = +(select max((a.updated - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000) from ad_wf_activity a, ad_wf_node n +where a.ad_table_id = 623 and a.record_id = C_ProjectIssue.C_ProjectIssue_id +and a.ad_wf_node_id = n.ad_wf_node_id and n.docaction = 'CO' and a.wfstate = 'CC') +where processedon is null and processed = 'Y'; + +-- fallback to created date +update C_ProjectIssue set processedon = (created - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000 +where processedon is null and processed = 'Y'; + + + +-- ****** SET ProcessedOn on table DD_Order ****** + +-- try to get the processed from ad_changelog +update DD_Order set processedon = +(select max((updated - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000) from ad_changelog + where ad_table_id = 53037 and record_id = DD_Order.DD_Order_id and ad_column_id = 53912 + and (newvalue = 'Y' or newvalue = 'true') and (oldvalue = 'false' or oldvalue = 'NULL' or oldvalue is null)) +where processedon is null and processed = 'Y'; + +-- if not then try to get the processed from ad_wf_activity +update DD_Order set processedon = +(select max((a.updated - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000) from ad_wf_activity a, ad_wf_node n +where a.ad_table_id = 53037 and a.record_id = DD_Order.DD_Order_id +and a.ad_wf_node_id = n.ad_wf_node_id and n.docaction = 'CO' and a.wfstate = 'CC') +where processedon is null and processed = 'Y'; + +-- fallback to created date +update DD_Order set processedon = (created - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000 +where processedon is null and processed = 'Y'; + + + +-- ****** SET ProcessedOn on table GL_Journal ****** + +-- try to get the processed from ad_changelog +update GL_Journal set processedon = +(select max((updated - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000) from ad_changelog + where ad_table_id = 224 and record_id = GL_Journal.GL_Journal_id and ad_column_id = 5953 + and (newvalue = 'Y' or newvalue = 'true') and (oldvalue = 'false' or oldvalue = 'NULL' or oldvalue is null)) +where processedon is null and processed = 'Y'; + +-- if not then try to get the processed from ad_wf_activity +update GL_Journal set processedon = +(select max((a.updated - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000) from ad_wf_activity a, ad_wf_node n +where a.ad_table_id = 224 and a.record_id = GL_Journal.GL_Journal_id +and a.ad_wf_node_id = n.ad_wf_node_id and n.docaction = 'CO' and a.wfstate = 'CC') +where processedon is null and processed = 'Y'; + +-- fallback to created date +update GL_Journal set processedon = (created - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000 +where processedon is null and processed = 'Y'; + + + +-- ****** SET ProcessedOn on table HR_Process ****** + +-- try to get the processed from ad_changelog +update HR_Process set processedon = +(select max((updated - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000) from ad_changelog + where ad_table_id = 53092 and record_id = HR_Process.HR_Process_id and ad_column_id = 54876 + and (newvalue = 'Y' or newvalue = 'true') and (oldvalue = 'false' or oldvalue = 'NULL' or oldvalue is null)) +where processedon is null and processed = 'Y'; + +-- if not then try to get the processed from ad_wf_activity +update HR_Process set processedon = +(select max((a.updated - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000) from ad_wf_activity a, ad_wf_node n +where a.ad_table_id = 53092 and a.record_id = HR_Process.HR_Process_id +and a.ad_wf_node_id = n.ad_wf_node_id and n.docaction = 'CO' and a.wfstate = 'CC') +where processedon is null and processed = 'Y'; + +-- fallback to created date +update HR_Process set processedon = (created - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000 +where processedon is null and processed = 'Y'; + + + +-- ****** SET ProcessedOn on table M_InOut ****** + +-- try to get the processed from ad_changelog +update M_InOut set processedon = +(select max((updated - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000) from ad_changelog + where ad_table_id = 319 and record_id = M_InOut.M_InOut_id and ad_column_id = 3518 + and (newvalue = 'Y' or newvalue = 'true') and (oldvalue = 'false' or oldvalue = 'NULL' or oldvalue is null)) +where processedon is null and processed = 'Y'; + +-- if not then try to get the processed from ad_wf_activity +update M_InOut set processedon = +(select max((a.updated - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000) from ad_wf_activity a, ad_wf_node n +where a.ad_table_id = 319 and a.record_id = M_InOut.M_InOut_id +and a.ad_wf_node_id = n.ad_wf_node_id and n.docaction = 'CO' and a.wfstate = 'CC') +where processedon is null and processed = 'Y'; + +-- fallback to created date +update M_InOut set processedon = (created - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000 +where processedon is null and processed = 'Y'; + + + +-- ****** SET ProcessedOn on table M_Inventory ****** + +-- try to get the processed from ad_changelog +update M_Inventory set processedon = +(select max((updated - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000) from ad_changelog + where ad_table_id = 321 and record_id = M_Inventory.M_Inventory_id and ad_column_id = 3553 + and (newvalue = 'Y' or newvalue = 'true') and (oldvalue = 'false' or oldvalue = 'NULL' or oldvalue is null)) +where processedon is null and processed = 'Y'; + +-- if not then try to get the processed from ad_wf_activity +update M_Inventory set processedon = +(select max((a.updated - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000) from ad_wf_activity a, ad_wf_node n +where a.ad_table_id = 321 and a.record_id = M_Inventory.M_Inventory_id +and a.ad_wf_node_id = n.ad_wf_node_id and n.docaction = 'CO' and a.wfstate = 'CC') +where processedon is null and processed = 'Y'; + +-- fallback to created date +update M_Inventory set processedon = (created - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000 +where processedon is null and processed = 'Y'; + + + +-- ****** SET ProcessedOn on table M_MatchInv ****** + +-- try to get the processed from ad_changelog +update M_MatchInv set processedon = +(select max((updated - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000) from ad_changelog + where ad_table_id = 472 and record_id = M_MatchInv.M_MatchInv_id and ad_column_id = 6511 + and (newvalue = 'Y' or newvalue = 'true') and (oldvalue = 'false' or oldvalue = 'NULL' or oldvalue is null)) +where processedon is null and processed = 'Y'; + +-- if not then try to get the processed from ad_wf_activity +update M_MatchInv set processedon = +(select max((a.updated - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000) from ad_wf_activity a, ad_wf_node n +where a.ad_table_id = 472 and a.record_id = M_MatchInv.M_MatchInv_id +and a.ad_wf_node_id = n.ad_wf_node_id and n.docaction = 'CO' and a.wfstate = 'CC') +where processedon is null and processed = 'Y'; + +-- fallback to created date +update M_MatchInv set processedon = (created - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000 +where processedon is null and processed = 'Y'; + + + +-- ****** SET ProcessedOn on table M_MatchPO ****** + +-- try to get the processed from ad_changelog +update M_MatchPO set processedon = +(select max((updated - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000) from ad_changelog + where ad_table_id = 473 and record_id = M_MatchPO.M_MatchPO_id and ad_column_id = 6527 + and (newvalue = 'Y' or newvalue = 'true') and (oldvalue = 'false' or oldvalue = 'NULL' or oldvalue is null)) +where processedon is null and processed = 'Y'; + +-- if not then try to get the processed from ad_wf_activity +update M_MatchPO set processedon = +(select max((a.updated - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000) from ad_wf_activity a, ad_wf_node n +where a.ad_table_id = 473 and a.record_id = M_MatchPO.M_MatchPO_id +and a.ad_wf_node_id = n.ad_wf_node_id and n.docaction = 'CO' and a.wfstate = 'CC') +where processedon is null and processed = 'Y'; + +-- fallback to created date +update M_MatchPO set processedon = (created - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000 +where processedon is null and processed = 'Y'; + + + +-- ****** SET ProcessedOn on table M_Movement ****** + +-- try to get the processed from ad_changelog +update M_Movement set processedon = +(select max((updated - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000) from ad_changelog + where ad_table_id = 323 and record_id = M_Movement.M_Movement_id and ad_column_id = 3580 + and (newvalue = 'Y' or newvalue = 'true') and (oldvalue = 'false' or oldvalue = 'NULL' or oldvalue is null)) +where processedon is null and processed = 'Y'; + +-- if not then try to get the processed from ad_wf_activity +update M_Movement set processedon = +(select max((a.updated - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000) from ad_wf_activity a, ad_wf_node n +where a.ad_table_id = 323 and a.record_id = M_Movement.M_Movement_id +and a.ad_wf_node_id = n.ad_wf_node_id and n.docaction = 'CO' and a.wfstate = 'CC') +where processedon is null and processed = 'Y'; + +-- fallback to created date +update M_Movement set processedon = (created - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000 +where processedon is null and processed = 'Y'; + + + +-- ****** SET ProcessedOn on table M_Production ****** + +-- try to get the processed from ad_changelog +update M_Production set processedon = +(select max((updated - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000) from ad_changelog + where ad_table_id = 325 and record_id = M_Production.M_Production_id and ad_column_id = 3609 + and (newvalue = 'Y' or newvalue = 'true') and (oldvalue = 'false' or oldvalue = 'NULL' or oldvalue is null)) +where processedon is null and processed = 'Y'; + +-- if not then try to get the processed from ad_wf_activity +update M_Production set processedon = +(select max((a.updated - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000) from ad_wf_activity a, ad_wf_node n +where a.ad_table_id = 325 and a.record_id = M_Production.M_Production_id +and a.ad_wf_node_id = n.ad_wf_node_id and n.docaction = 'CO' and a.wfstate = 'CC') +where processedon is null and processed = 'Y'; + +-- fallback to created date +update M_Production set processedon = (created - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000 +where processedon is null and processed = 'Y'; + + + +-- ****** SET ProcessedOn on table M_Requisition ****** + +-- try to get the processed from ad_changelog +update M_Requisition set processedon = +(select max((updated - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000) from ad_changelog + where ad_table_id = 702 and record_id = M_Requisition.M_Requisition_id and ad_column_id = 11473 + and (newvalue = 'Y' or newvalue = 'true') and (oldvalue = 'false' or oldvalue = 'NULL' or oldvalue is null)) +where processedon is null and processed = 'Y'; + +-- if not then try to get the processed from ad_wf_activity +update M_Requisition set processedon = +(select max((a.updated - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000) from ad_wf_activity a, ad_wf_node n +where a.ad_table_id = 702 and a.record_id = M_Requisition.M_Requisition_id +and a.ad_wf_node_id = n.ad_wf_node_id and n.docaction = 'CO' and a.wfstate = 'CC') +where processedon is null and processed = 'Y'; + +-- fallback to created date +update M_Requisition set processedon = (created - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000 +where processedon is null and processed = 'Y'; + + + +-- ****** SET ProcessedOn on table PP_Cost_Collector ****** + +-- try to get the processed from ad_changelog +update PP_Cost_Collector set processedon = +(select max((updated - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000) from ad_changelog + where ad_table_id = 53035 and record_id = PP_Cost_Collector.PP_Cost_Collector_id and ad_column_id = 53834 + and (newvalue = 'Y' or newvalue = 'true') and (oldvalue = 'false' or oldvalue = 'NULL' or oldvalue is null)) +where processedon is null and processed = 'Y'; + +-- if not then try to get the processed from ad_wf_activity +update PP_Cost_Collector set processedon = +(select max((a.updated - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000) from ad_wf_activity a, ad_wf_node n +where a.ad_table_id = 53035 and a.record_id = PP_Cost_Collector.PP_Cost_Collector_id +and a.ad_wf_node_id = n.ad_wf_node_id and n.docaction = 'CO' and a.wfstate = 'CC') +where processedon is null and processed = 'Y'; + +-- fallback to created date +update PP_Cost_Collector set processedon = (created - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000 +where processedon is null and processed = 'Y'; + + + +-- ****** SET ProcessedOn on table PP_Order ****** + +-- try to get the processed from ad_changelog +update PP_Order set processedon = +(select max((updated - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000) from ad_changelog + where ad_table_id = 53027 and record_id = PP_Order.PP_Order_id and ad_column_id = 53664 + and (newvalue = 'Y' or newvalue = 'true') and (oldvalue = 'false' or oldvalue = 'NULL' or oldvalue is null)) +where processedon is null and processed = 'Y'; + +-- if not then try to get the processed from ad_wf_activity +update PP_Order set processedon = +(select max((a.updated - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000) from ad_wf_activity a, ad_wf_node n +where a.ad_table_id = 53027 and a.record_id = PP_Order.PP_Order_id +and a.ad_wf_node_id = n.ad_wf_node_id and n.docaction = 'CO' and a.wfstate = 'CC') +where processedon is null and processed = 'Y'; + +-- fallback to created date +update PP_Order set processedon = (created - to_date('1970-01-01', 'YYYY-MM-DD')) * 86400000 +where processedon is null and processed = 'Y'; + +-- drop temporary index +DROP INDEX tmp_ad_wf_activity_speed; diff --git a/migration/354a-trunk/oracle/672_BF2948897.sql b/migration/354a-trunk/oracle/672_BF2948897.sql new file mode 100644 index 0000000000..6b6ec35ec1 --- /dev/null +++ b/migration/354a-trunk/oracle/672_BF2948897.sql @@ -0,0 +1,15 @@ +-- Mar 4, 2010 1:33:05 PM COT +-- BF2948897_Fixed Assets Dictionary Errors +UPDATE AD_Tab SET WhereClause='A_Depreciation_Entry.A_Entry_Type=''DIS''',Updated=TO_DATE('2010-03-04 13:33:05','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=53141 +; + +-- Mar 4, 2010 1:33:13 PM COT +-- BF2948897_Fixed Assets Dictionary Errors +UPDATE AD_Tab SET WhereClause='A_Depreciation_Entry.A_Entry_Type=''SPL''',Updated=TO_DATE('2010-03-04 13:33:13','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=53151 +; + +-- Mar 4, 2010 1:33:21 PM COT +-- BF2948897_Fixed Assets Dictionary Errors +UPDATE AD_Tab SET WhereClause='A_Depreciation_Entry.A_Entry_Type=''TRN''',Updated=TO_DATE('2010-03-04 13:33:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=53140 +; + diff --git a/migration/354a-trunk/oracle/673_BF2948897.sql b/migration/354a-trunk/oracle/673_BF2948897.sql new file mode 100644 index 0000000000..206894c546 --- /dev/null +++ b/migration/354a-trunk/oracle/673_BF2948897.sql @@ -0,0 +1,105 @@ +-- Mar 4, 2010 1:54:35 PM COT +-- BF2948897_Fixed Assets Dictionary Errors +UPDATE AD_Column SET AD_Reference_ID=20,Updated=TO_DATE('2010-03-04 13:54:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=55347 +; + +-- Mar 4, 2010 1:55:33 PM COT +-- BF2948897_Fixed Assets Dictionary Errors +UPDATE AD_Column SET AD_Process_ID=NULL, AD_Reference_ID=20,Updated=TO_DATE('2010-03-04 13:55:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=55557 +; + +-- Mar 4, 2010 1:56:07 PM COT +-- BF2948897_Fixed Assets Dictionary Errors +ALTER TABLE A_Depreciation MODIFY Processed CHAR(1) DEFAULT 'Y' +; + +-- Mar 4, 2010 1:56:08 PM COT +-- BF2948897_Fixed Assets Dictionary Errors +UPDATE A_Depreciation SET Processed='Y' WHERE Processed IS NULL +; + +-- Mar 4, 2010 1:56:28 PM COT +-- BF2948897_Fixed Assets Dictionary Errors +UPDATE AD_Column SET DefaultValue='N',Updated=TO_DATE('2010-03-04 13:56:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=55557 +; + +-- Mar 4, 2010 1:56:30 PM COT +-- BF2948897_Fixed Assets Dictionary Errors +ALTER TABLE A_Depreciation_Entry MODIFY Processed CHAR(1) DEFAULT 'N' +; + +-- Mar 4, 2010 1:56:31 PM COT +-- BF2948897_Fixed Assets Dictionary Errors +UPDATE A_Depreciation_Entry SET Processed='N' WHERE Processed IS NULL +; + +-- Mar 4, 2010 1:56:58 PM COT +-- BF2948897_Fixed Assets Dictionary Errors +UPDATE AD_Column SET AD_Process_ID=53111, AD_Reference_ID=28,Updated=TO_DATE('2010-03-04 13:56:58','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=55703 +; + +-- Mar 4, 2010 1:57:00 PM COT +-- BF2948897_Fixed Assets Dictionary Errors +ALTER TABLE A_Depreciation_Build MODIFY Processing CHAR(1) DEFAULT NULL +; + +-- Mar 4, 2010 1:57:15 PM COT +-- BF2948897_Fixed Assets Dictionary Errors +UPDATE AD_Column SET AD_Process_ID=NULL, AD_Reference_ID=20, DefaultValue='N',Updated=TO_DATE('2010-03-04 13:57:15','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=55700 +; + +-- Mar 4, 2010 1:57:19 PM COT +-- BF2948897_Fixed Assets Dictionary Errors +ALTER TABLE A_Depreciation_Build MODIFY Processed CHAR(1) DEFAULT 'N' +; + +-- Mar 4, 2010 1:58:11 PM COT +-- BF2948897_Fixed Assets Dictionary Errors +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Process_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,59065,524,0,53123,28,53125,'Processing',TO_DATE('2010-03-04 13:58:09','YYYY-MM-DD HH24:MI:SS'),100,'D',1,'Y','Y','N','N','N','N','N','Y','N','N','Y','N','Y','Process Now',TO_DATE('2010-03-04 13:58:09','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Mar 4, 2010 1:58:11 PM COT +-- BF2948897_Fixed Assets Dictionary Errors +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59065 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 4, 2010 1:58:36 PM COT +-- BF2948897_Fixed Assets Dictionary Errors +UPDATE AD_Column SET IsMandatory='N',Updated=TO_DATE('2010-03-04 13:58:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=59065 +; + +-- Mar 4, 2010 1:58:38 PM COT +-- BF2948897_Fixed Assets Dictionary Errors +ALTER TABLE A_Depreciation_Convention ADD Processing CHAR(1) DEFAULT NULL +; + +-- Mar 4, 2010 1:58:51 PM COT +-- BF2948897_Fixed Assets Dictionary Errors +UPDATE AD_Column SET AD_Process_ID=NULL, AD_Reference_ID=20, DefaultValue='N',Updated=TO_DATE('2010-03-04 13:58:51','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=55736 +; + +-- Mar 4, 2010 1:58:54 PM COT +-- BF2948897_Fixed Assets Dictionary Errors +ALTER TABLE A_Depreciation_Convention MODIFY Processed CHAR(1) DEFAULT 'N' +; + +-- Mar 4, 2010 1:58:54 PM COT +-- BF2948897_Fixed Assets Dictionary Errors +UPDATE A_Depreciation_Convention SET Processed='N' WHERE Processed IS NULL +; + +-- Mar 4, 2010 1:59:46 PM COT +-- BF2948897_Fixed Assets Dictionary Errors +UPDATE AD_Column SET AD_Process_ID=NULL, AD_Reference_ID=20,Updated=TO_DATE('2010-03-04 13:59:46','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=55747 +; + +-- Mar 4, 2010 1:59:49 PM COT +-- BF2948897_Fixed Assets Dictionary Errors +ALTER TABLE A_Depreciation_Method MODIFY Processed CHAR(1) DEFAULT 'Y' +; + +-- Mar 4, 2010 1:59:49 PM COT +-- BF2948897_Fixed Assets Dictionary Errors +UPDATE A_Depreciation_Method SET Processed='Y' WHERE Processed IS NULL +; + diff --git a/migration/354a-trunk/oracle/674_FR2965494.sql b/migration/354a-trunk/oracle/674_FR2965494.sql new file mode 100644 index 0000000000..07f89ced85 --- /dev/null +++ b/migration/354a-trunk/oracle/674_FR2965494.sql @@ -0,0 +1,311 @@ +-- Mar 8, 2010 4:20:41 PM CET +-- Import of Order Source +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,59066,53942,0,19,591,'C_OrderSource_ID',TO_DATE('2010-03-08 16:20:39','YYYY-MM-DD HH24:MI:SS'),100,'D',10,'Y','N','N','N','N','N','N','N','N','N','N','N','Y','Order Source',0,TO_DATE('2010-03-08 16:20:39','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Mar 8, 2010 4:20:41 PM CET +-- Import of Order Source +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59066 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 8, 2010 4:20:44 PM CET +-- Import of Order Source +ALTER TABLE I_Order ADD C_OrderSource_ID NUMBER(10) DEFAULT NULL +; + +-- Mar 8, 2010 4:23:40 PM CET +-- Import of Order Source +INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,54129,0,'C_OrderSourceValue',TO_DATE('2010-03-08 16:23:39','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Order Source Key','Order Source Key',TO_DATE('2010-03-08 16:23:39','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Mar 8, 2010 4:23:40 PM CET +-- Import of Order Source +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=54129 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID) +; + +-- Mar 8, 2010 4:27:20 PM CET +-- Import of Order Source +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,59068,54129,0,10,591,'C_OrderSourceValue',TO_DATE('2010-03-08 16:27:19','YYYY-MM-DD HH24:MI:SS'),100,'D',40,'Y','Y','N','N','N','N','N','N','N','N','N','N','Y','Order Source Key',0,TO_DATE('2010-03-08 16:27:19','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Mar 8, 2010 4:27:20 PM CET +-- Import of Order Source +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59068 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 8, 2010 4:27:27 PM CET +-- Import of Order Source +ALTER TABLE I_Order ADD C_OrderSourceValue NVARCHAR2(40) DEFAULT NULL +; + + + +-- Mar 8, 2010 4:32:35 PM CET +-- Import of Order Source +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,59068,58779,0,512,TO_DATE('2010-03-08 16:32:33','YYYY-MM-DD HH24:MI:SS'),100,0,'D','Y','Y','Y','N','N','N','N','N','Order Source Key',590,0,TO_DATE('2010-03-08 16:32:33','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Mar 8, 2010 4:32:35 PM CET +-- Import of Order Source +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58779 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Mar 8, 2010 4:33:50 PM CET +-- Import of Order Source +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,59066,58780,0,512,TO_DATE('2010-03-08 16:33:47','YYYY-MM-DD HH24:MI:SS'),100,0,'D','Y','Y','Y','N','N','N','N','N','Order Source',600,0,TO_DATE('2010-03-08 16:33:47','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Mar 8, 2010 4:33:50 PM CET +-- Import of Order Source +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58780 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Mar 8, 2010 4:33:58 PM CET +-- Import of Order Source +UPDATE AD_Field SET IsSameLine='Y',Updated=TO_DATE('2010-03-08 16:33:58','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=58780 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=0,IsDisplayed='N' WHERE AD_Field_ID=7347 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=0,IsDisplayed='N' WHERE AD_Field_ID=7334 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=10,IsDisplayed='Y' WHERE AD_Field_ID=7328 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=20,IsDisplayed='Y' WHERE AD_Field_ID=7319 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=30,IsDisplayed='Y' WHERE AD_Field_ID=7323 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=40,IsDisplayed='Y' WHERE AD_Field_ID=7324 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=50,IsDisplayed='Y' WHERE AD_Field_ID=7337 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=60,IsDisplayed='Y' WHERE AD_Field_ID=7315 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=70,IsDisplayed='Y' WHERE AD_Field_ID=7355 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=80,IsDisplayed='Y' WHERE AD_Field_ID=7356 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=90,IsDisplayed='Y' WHERE AD_Field_ID=7338 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=100,IsDisplayed='Y' WHERE AD_Field_ID=7322 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=110,IsDisplayed='Y' WHERE AD_Field_ID=7359 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=120,IsDisplayed='Y' WHERE AD_Field_ID=7336 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=130,IsDisplayed='Y' WHERE AD_Field_ID=7318 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=140,IsDisplayed='Y' WHERE AD_Field_ID=7330 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=150,IsDisplayed='Y' WHERE AD_Field_ID=7339 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=160,IsDisplayed='Y' WHERE AD_Field_ID=7325 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=170,IsDisplayed='Y' WHERE AD_Field_ID=7341 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=180,IsDisplayed='Y' WHERE AD_Field_ID=7346 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=190,IsDisplayed='Y' WHERE AD_Field_ID=7345 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=200,IsDisplayed='Y' WHERE AD_Field_ID=7331 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=210,IsDisplayed='Y' WHERE AD_Field_ID=7317 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=220,IsDisplayed='Y' WHERE AD_Field_ID=7360 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=230,IsDisplayed='Y' WHERE AD_Field_ID=7354 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=240,IsDisplayed='Y' WHERE AD_Field_ID=7340 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=250,IsDisplayed='Y' WHERE AD_Field_ID=7645 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=260,IsDisplayed='Y' WHERE AD_Field_ID=7332 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=270,IsDisplayed='Y' WHERE AD_Field_ID=7353 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=280,IsDisplayed='Y' WHERE AD_Field_ID=7361 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=290,IsDisplayed='Y' WHERE AD_Field_ID=7358 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=300,IsDisplayed='Y' WHERE AD_Field_ID=7350 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=310,IsDisplayed='Y' WHERE AD_Field_ID=7640 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=320,IsDisplayed='Y' WHERE AD_Field_ID=7644 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=330,IsDisplayed='Y' WHERE AD_Field_ID=7641 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=340,IsDisplayed='Y' WHERE AD_Field_ID=7326 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=350,IsDisplayed='Y' WHERE AD_Field_ID=7642 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=360,IsDisplayed='Y' WHERE AD_Field_ID=7643 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=370,IsDisplayed='Y' WHERE AD_Field_ID=7343 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=380,IsDisplayed='Y' WHERE AD_Field_ID=8262 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=390,IsDisplayed='Y' WHERE AD_Field_ID=8263 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=400,IsDisplayed='Y' WHERE AD_Field_ID=7329 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=410,IsDisplayed='Y' WHERE AD_Field_ID=7357 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=420,IsDisplayed='Y' WHERE AD_Field_ID=56402 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=430,IsDisplayed='Y' WHERE AD_Field_ID=56403 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=570,IsDisplayed='Y' WHERE AD_Field_ID=58779 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=580,IsDisplayed='Y' WHERE AD_Field_ID=58780 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=590,IsDisplayed='Y' WHERE AD_Field_ID=7327 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=600,IsDisplayed='Y' WHERE AD_Field_ID=7335 +; diff --git a/migration/354a-trunk/oracle/675_FR2962094_AddAverageCostVarianceDefaultAcct.sql b/migration/354a-trunk/oracle/675_FR2962094_AddAverageCostVarianceDefaultAcct.sql new file mode 100644 index 0000000000..f968499e32 --- /dev/null +++ b/migration/354a-trunk/oracle/675_FR2962094_AddAverageCostVarianceDefaultAcct.sql @@ -0,0 +1,413 @@ +-- Mar 8, 2010 8:44:44 PM COT +-- FR2962094_Finish implementation of weighted average costing +INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,Description,EntityType,Help,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,54132,0,'P_AverageCostVariance_Acct',TO_DATE('2010-03-08 20:44:43','YYYY-MM-DD HH24:MI:SS'),100,'Average Cost Variance','D','The Average Cost Variance is used in weighted average costing to reflect differences when posting costs for negative inventory.','Y','Average Cost Variance','Average Cost Variance',TO_DATE('2010-03-08 20:44:43','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Mar 8, 2010 8:44:44 PM COT +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=54132 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID) +; + +-- Mar 8, 2010 8:46:06 PM COT +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,59071,54132,0,25,315,'P_AverageCostVariance_Acct',TO_DATE('2010-03-08 20:46:05','YYYY-MM-DD HH24:MI:SS'),100,'Average Cost Variance','D',10,'The Average Cost Variance is used in weighted average costing to reflect differences when posting costs for negative inventory.','Y','Y','N','N','N','N','N','N','N','N','N','N','Y','Average Cost Variance',TO_DATE('2010-03-08 20:46:05','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Mar 8, 2010 8:46:06 PM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59071 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 8, 2010 8:46:19 PM COT +ALTER TABLE C_AcctSchema_Default ADD P_AverageCostVariance_Acct NUMBER(10) DEFAULT NULL +; + +-- Mar 8, 2010 8:46:45 PM COT +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,59072,54132,0,25,401,'P_AverageCostVariance_Acct',TO_DATE('2010-03-08 20:46:45','YYYY-MM-DD HH24:MI:SS'),100,'Average Cost Variance','D',10,'The Average Cost Variance is used in weighted average costing to reflect differences when posting costs for negative inventory.','Y','Y','N','N','N','N','N','N','N','N','N','N','Y','Average Cost Variance',TO_DATE('2010-03-08 20:46:45','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Mar 8, 2010 8:46:45 PM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59072 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 8, 2010 8:46:50 PM COT +ALTER TABLE M_Product_Category_Acct ADD P_AverageCostVariance_Acct NUMBER(10) DEFAULT NULL +; + +-- Mar 8, 2010 8:47:12 PM COT +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,59073,54132,0,25,273,'P_AverageCostVariance_Acct',TO_DATE('2010-03-08 20:47:11','YYYY-MM-DD HH24:MI:SS'),100,'Average Cost Variance','D',10,'The Average Cost Variance is used in weighted average costing to reflect differences when posting costs for negative inventory.','Y','Y','N','N','N','N','N','N','N','N','N','N','Y','Average Cost Variance',TO_DATE('2010-03-08 20:47:11','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Mar 8, 2010 8:47:12 PM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59073 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 8, 2010 8:47:17 PM COT +ALTER TABLE M_Product_Acct ADD P_AverageCostVariance_Acct NUMBER(10) DEFAULT NULL +; + +-- Mar 8, 2010 8:49:30 PM COT +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,59071,106,58783,0,252,TO_DATE('2010-03-08 20:49:29','YYYY-MM-DD HH24:MI:SS'),100,'Average Cost Variance',26,'D','The Average Cost Variance is used in weighted average costing to reflect differences when posting costs for negative inventory.','Y','Y','Y','N','N','N','N','N','Average Cost Variance',770,0,TO_DATE('2010-03-08 20:49:29','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Mar 8, 2010 8:49:30 PM COT +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58783 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Mar 8, 2010 8:50:01 PM COT +UPDATE AD_Field SET SeqNo=280,IsDisplayed='Y' WHERE AD_Field_ID=58783 +; + +-- Mar 8, 2010 8:50:01 PM COT +UPDATE AD_Field SET SeqNo=290,IsDisplayed='Y' WHERE AD_Field_ID=4861 +; + +-- Mar 8, 2010 8:50:01 PM COT +UPDATE AD_Field SET SeqNo=300,IsDisplayed='Y' WHERE AD_Field_ID=4862 +; + +-- Mar 8, 2010 8:50:01 PM COT +UPDATE AD_Field SET SeqNo=310,IsDisplayed='Y' WHERE AD_Field_ID=2663 +; + +-- Mar 8, 2010 8:50:01 PM COT +UPDATE AD_Field SET SeqNo=320,IsDisplayed='Y' WHERE AD_Field_ID=4863 +; + +-- Mar 8, 2010 8:50:01 PM COT +UPDATE AD_Field SET SeqNo=330,IsDisplayed='Y' WHERE AD_Field_ID=2662 +; + +-- Mar 8, 2010 8:50:01 PM COT +UPDATE AD_Field SET SeqNo=340,IsDisplayed='Y' WHERE AD_Field_ID=3824 +; + +-- Mar 8, 2010 8:50:01 PM COT +UPDATE AD_Field SET SeqNo=350,IsDisplayed='Y' WHERE AD_Field_ID=2654 +; + +-- Mar 8, 2010 8:50:01 PM COT +UPDATE AD_Field SET SeqNo=360,IsDisplayed='Y' WHERE AD_Field_ID=3835 +; + +-- Mar 8, 2010 8:50:01 PM COT +UPDATE AD_Field SET SeqNo=370,IsDisplayed='Y' WHERE AD_Field_ID=56529 +; + +-- Mar 8, 2010 8:50:01 PM COT +UPDATE AD_Field SET SeqNo=380,IsDisplayed='Y' WHERE AD_Field_ID=56522 +; + +-- Mar 8, 2010 8:50:01 PM COT +UPDATE AD_Field SET SeqNo=390,IsDisplayed='Y' WHERE AD_Field_ID=56524 +; + +-- Mar 8, 2010 8:50:01 PM COT +UPDATE AD_Field SET SeqNo=400,IsDisplayed='Y' WHERE AD_Field_ID=56528 +; + +-- Mar 8, 2010 8:50:01 PM COT +UPDATE AD_Field SET SeqNo=410,IsDisplayed='Y' WHERE AD_Field_ID=56527 +; + +-- Mar 8, 2010 8:50:01 PM COT +UPDATE AD_Field SET SeqNo=420,IsDisplayed='Y' WHERE AD_Field_ID=56525 +; + +-- Mar 8, 2010 8:50:01 PM COT +UPDATE AD_Field SET SeqNo=430,IsDisplayed='Y' WHERE AD_Field_ID=56523 +; + +-- Mar 8, 2010 8:50:01 PM COT +UPDATE AD_Field SET SeqNo=440,IsDisplayed='Y' WHERE AD_Field_ID=56520 +; + +-- Mar 8, 2010 8:50:01 PM COT +UPDATE AD_Field SET SeqNo=450,IsDisplayed='Y' WHERE AD_Field_ID=56521 +; + +-- Mar 8, 2010 8:50:01 PM COT +UPDATE AD_Field SET SeqNo=460,IsDisplayed='Y' WHERE AD_Field_ID=56526 +; + +-- Mar 8, 2010 8:50:01 PM COT +UPDATE AD_Field SET SeqNo=470,IsDisplayed='Y' WHERE AD_Field_ID=56550 +; + +-- Mar 8, 2010 8:50:01 PM COT +UPDATE AD_Field SET SeqNo=480,IsDisplayed='Y' WHERE AD_Field_ID=56551 +; + +-- Mar 8, 2010 8:50:01 PM COT +UPDATE AD_Field SET SeqNo=490,IsDisplayed='Y' WHERE AD_Field_ID=3842 +; + +-- Mar 8, 2010 8:50:01 PM COT +UPDATE AD_Field SET SeqNo=500,IsDisplayed='Y' WHERE AD_Field_ID=3841 +; + +-- Mar 8, 2010 8:50:01 PM COT +UPDATE AD_Field SET SeqNo=510,IsDisplayed='Y' WHERE AD_Field_ID=3846 +; + +-- Mar 8, 2010 8:50:01 PM COT +UPDATE AD_Field SET SeqNo=520,IsDisplayed='Y' WHERE AD_Field_ID=5133 +; + +-- Mar 8, 2010 8:50:01 PM COT +UPDATE AD_Field SET SeqNo=530,IsDisplayed='Y' WHERE AD_Field_ID=5132 +; + +-- Mar 8, 2010 8:50:02 PM COT +UPDATE AD_Field SET SeqNo=540,IsDisplayed='Y' WHERE AD_Field_ID=3843 +; + +-- Mar 8, 2010 8:50:02 PM COT +UPDATE AD_Field SET SeqNo=550,IsDisplayed='Y' WHERE AD_Field_ID=3845 +; + +-- Mar 8, 2010 8:50:02 PM COT +UPDATE AD_Field SET SeqNo=560,IsDisplayed='Y' WHERE AD_Field_ID=3844 +; + +-- Mar 8, 2010 8:50:02 PM COT +UPDATE AD_Field SET SeqNo=570,IsDisplayed='Y' WHERE AD_Field_ID=3849 +; + +-- Mar 8, 2010 8:50:02 PM COT +UPDATE AD_Field SET SeqNo=580,IsDisplayed='Y' WHERE AD_Field_ID=3850 +; + +-- Mar 8, 2010 8:50:02 PM COT +UPDATE AD_Field SET SeqNo=590,IsDisplayed='Y' WHERE AD_Field_ID=5138 +; + +-- Mar 8, 2010 8:50:02 PM COT +UPDATE AD_Field SET SeqNo=600,IsDisplayed='Y' WHERE AD_Field_ID=3847 +; + +-- Mar 8, 2010 8:50:02 PM COT +UPDATE AD_Field SET SeqNo=610,IsDisplayed='Y' WHERE AD_Field_ID=3839 +; + +-- Mar 8, 2010 8:50:02 PM COT +UPDATE AD_Field SET SeqNo=620,IsDisplayed='Y' WHERE AD_Field_ID=3837 +; + +-- Mar 8, 2010 8:50:02 PM COT +UPDATE AD_Field SET SeqNo=630,IsDisplayed='Y' WHERE AD_Field_ID=3840 +; + +-- Mar 8, 2010 8:50:02 PM COT +UPDATE AD_Field SET SeqNo=640,IsDisplayed='Y' WHERE AD_Field_ID=3838 +; + +-- Mar 8, 2010 8:50:02 PM COT +UPDATE AD_Field SET SeqNo=650,IsDisplayed='Y' WHERE AD_Field_ID=3836 +; + +-- Mar 8, 2010 8:50:02 PM COT +UPDATE AD_Field SET SeqNo=660,IsDisplayed='Y' WHERE AD_Field_ID=3851 +; + +-- Mar 8, 2010 8:50:02 PM COT +UPDATE AD_Field SET SeqNo=670,IsDisplayed='Y' WHERE AD_Field_ID=3852 +; + +-- Mar 8, 2010 8:50:02 PM COT +UPDATE AD_Field SET SeqNo=680,IsDisplayed='Y' WHERE AD_Field_ID=3830 +; + +-- Mar 8, 2010 8:50:02 PM COT +UPDATE AD_Field SET SeqNo=690,IsDisplayed='Y' WHERE AD_Field_ID=3831 +; + +-- Mar 8, 2010 8:50:02 PM COT +UPDATE AD_Field SET SeqNo=700,IsDisplayed='Y' WHERE AD_Field_ID=3832 +; + +-- Mar 8, 2010 8:50:02 PM COT +UPDATE AD_Field SET SeqNo=710,IsDisplayed='Y' WHERE AD_Field_ID=3833 +; + +-- Mar 8, 2010 8:50:02 PM COT +UPDATE AD_Field SET SeqNo=720,IsDisplayed='Y' WHERE AD_Field_ID=4092 +; + +-- Mar 8, 2010 8:50:02 PM COT +UPDATE AD_Field SET SeqNo=730,IsDisplayed='Y' WHERE AD_Field_ID=4093 +; + +-- Mar 8, 2010 8:50:02 PM COT +UPDATE AD_Field SET SeqNo=740,IsDisplayed='Y' WHERE AD_Field_ID=5134 +; + +-- Mar 8, 2010 8:50:02 PM COT +UPDATE AD_Field SET SeqNo=750,IsDisplayed='Y' WHERE AD_Field_ID=4094 +; + +-- Mar 8, 2010 8:50:02 PM COT +UPDATE AD_Field SET SeqNo=760,IsDisplayed='Y' WHERE AD_Field_ID=4095 +; + +-- Mar 8, 2010 8:50:02 PM COT +UPDATE AD_Field SET SeqNo=770,IsDisplayed='Y' WHERE AD_Field_ID=3823 +; + +-- Mar 8, 2010 8:50:56 PM COT +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,59072,58784,0,324,TO_DATE('2010-03-08 20:50:55','YYYY-MM-DD HH24:MI:SS'),100,'Average Cost Variance',26,'D','The Average Cost Variance is used in weighted average costing to reflect differences when posting costs for negative inventory.','Y','Y','Y','N','N','N','N','N','Average Cost Variance',310,0,TO_DATE('2010-03-08 20:50:55','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Mar 8, 2010 8:50:56 PM COT +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58784 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Mar 8, 2010 8:51:06 PM COT +UPDATE AD_Field SET SeqNo=150,IsDisplayed='Y' WHERE AD_Field_ID=58784 +; + +-- Mar 8, 2010 8:51:06 PM COT +UPDATE AD_Field SET SeqNo=160,IsDisplayed='Y' WHERE AD_Field_ID=4872 +; + +-- Mar 8, 2010 8:51:06 PM COT +UPDATE AD_Field SET SeqNo=170,IsDisplayed='Y' WHERE AD_Field_ID=4873 +; + +-- Mar 8, 2010 8:51:06 PM COT +UPDATE AD_Field SET SeqNo=180,IsDisplayed='Y' WHERE AD_Field_ID=3944 +; + +-- Mar 8, 2010 8:51:06 PM COT +UPDATE AD_Field SET SeqNo=190,IsDisplayed='Y' WHERE AD_Field_ID=56539 +; + +-- Mar 8, 2010 8:51:06 PM COT +UPDATE AD_Field SET SeqNo=200,IsDisplayed='Y' WHERE AD_Field_ID=56532 +; + +-- Mar 8, 2010 8:51:06 PM COT +UPDATE AD_Field SET SeqNo=210,IsDisplayed='Y' WHERE AD_Field_ID=56534 +; + +-- Mar 8, 2010 8:51:06 PM COT +UPDATE AD_Field SET SeqNo=220,IsDisplayed='Y' WHERE AD_Field_ID=56538 +; + +-- Mar 8, 2010 8:51:06 PM COT +UPDATE AD_Field SET SeqNo=230,IsDisplayed='Y' WHERE AD_Field_ID=56537 +; + +-- Mar 8, 2010 8:51:06 PM COT +UPDATE AD_Field SET SeqNo=240,IsDisplayed='Y' WHERE AD_Field_ID=56535 +; + +-- Mar 8, 2010 8:51:06 PM COT +UPDATE AD_Field SET SeqNo=250,IsDisplayed='Y' WHERE AD_Field_ID=56533 +; + +-- Mar 8, 2010 8:51:06 PM COT +UPDATE AD_Field SET SeqNo=260,IsDisplayed='Y' WHERE AD_Field_ID=56530 +; + +-- Mar 8, 2010 8:51:06 PM COT +UPDATE AD_Field SET SeqNo=270,IsDisplayed='Y' WHERE AD_Field_ID=56531 +; + +-- Mar 8, 2010 8:51:06 PM COT +UPDATE AD_Field SET SeqNo=280,IsDisplayed='Y' WHERE AD_Field_ID=56536 +; + +-- Mar 8, 2010 8:51:06 PM COT +UPDATE AD_Field SET SeqNo=290,IsDisplayed='Y' WHERE AD_Field_ID=56552 +; + +-- Mar 8, 2010 8:51:06 PM COT +UPDATE AD_Field SET SeqNo=300,IsDisplayed='Y' WHERE AD_Field_ID=56553 +; + +-- Mar 8, 2010 8:51:06 PM COT +UPDATE AD_Field SET SeqNo=310,IsDisplayed='Y' WHERE AD_Field_ID=3945 +; + +-- Mar 8, 2010 8:51:50 PM COT +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,59073,58785,0,210,TO_DATE('2010-03-08 20:51:49','YYYY-MM-DD HH24:MI:SS'),100,'Average Cost Variance',26,'D','The Average Cost Variance is used in weighted average costing to reflect differences when posting costs for negative inventory.','Y','Y','Y','N','N','N','N','N','Average Cost Variance',280,0,TO_DATE('2010-03-08 20:51:49','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Mar 8, 2010 8:51:50 PM COT +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58785 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Mar 8, 2010 8:51:59 PM COT +UPDATE AD_Field SET SeqNo=130,IsDisplayed='Y' WHERE AD_Field_ID=58785 +; + +-- Mar 8, 2010 8:51:59 PM COT +UPDATE AD_Field SET SeqNo=140,IsDisplayed='Y' WHERE AD_Field_ID=4868 +; + +-- Mar 8, 2010 8:51:59 PM COT +UPDATE AD_Field SET SeqNo=150,IsDisplayed='Y' WHERE AD_Field_ID=4869 +; + +-- Mar 8, 2010 8:51:59 PM COT +UPDATE AD_Field SET SeqNo=160,IsDisplayed='Y' WHERE AD_Field_ID=2608 +; + +-- Mar 8, 2010 8:51:59 PM COT +UPDATE AD_Field SET SeqNo=170,IsDisplayed='Y' WHERE AD_Field_ID=56549 +; + +-- Mar 8, 2010 8:51:59 PM COT +UPDATE AD_Field SET SeqNo=180,IsDisplayed='Y' WHERE AD_Field_ID=56542 +; + +-- Mar 8, 2010 8:51:59 PM COT +UPDATE AD_Field SET SeqNo=190,IsDisplayed='Y' WHERE AD_Field_ID=56544 +; + +-- Mar 8, 2010 8:51:59 PM COT +UPDATE AD_Field SET SeqNo=200,IsDisplayed='Y' WHERE AD_Field_ID=56548 +; + +-- Mar 8, 2010 8:51:59 PM COT +UPDATE AD_Field SET SeqNo=210,IsDisplayed='Y' WHERE AD_Field_ID=56547 +; + +-- Mar 8, 2010 8:51:59 PM COT +UPDATE AD_Field SET SeqNo=220,IsDisplayed='Y' WHERE AD_Field_ID=56545 +; + +-- Mar 8, 2010 8:51:59 PM COT +UPDATE AD_Field SET SeqNo=230,IsDisplayed='Y' WHERE AD_Field_ID=56543 +; + +-- Mar 8, 2010 8:51:59 PM COT +UPDATE AD_Field SET SeqNo=240,IsDisplayed='Y' WHERE AD_Field_ID=56540 +; + +-- Mar 8, 2010 8:51:59 PM COT +UPDATE AD_Field SET SeqNo=250,IsDisplayed='Y' WHERE AD_Field_ID=56541 +; + +-- Mar 8, 2010 8:51:59 PM COT +UPDATE AD_Field SET SeqNo=260,IsDisplayed='Y' WHERE AD_Field_ID=56546 +; + +-- Mar 8, 2010 8:51:59 PM COT +UPDATE AD_Field SET SeqNo=270,IsDisplayed='Y' WHERE AD_Field_ID=56554 +; + +-- Mar 8, 2010 8:51:59 PM COT +UPDATE AD_Field SET SeqNo=280,IsDisplayed='Y' WHERE AD_Field_ID=56555 +; + +-- Mar 8, 2010 9:03:21 PM COT +UPDATE AD_Field SET IsMandatory='Y',Updated=TO_DATE('2010-03-08 21:03:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=58783 +; + +-- Mar 8, 2010 9:03:44 PM COT +UPDATE AD_Field SET IsMandatory='Y',Updated=TO_DATE('2010-03-08 21:03:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=58784 +; + +-- Mar 8, 2010 9:04:06 PM COT +UPDATE AD_Field SET IsMandatory='Y',Updated=TO_DATE('2010-03-08 21:04:06','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=58785 +; + diff --git a/migration/354a-trunk/oracle/676_FR2962094_SetAverageCostVarianceGW.sql b/migration/354a-trunk/oracle/676_FR2962094_SetAverageCostVarianceGW.sql new file mode 100644 index 0000000000..82bd4bcd24 --- /dev/null +++ b/migration/354a-trunk/oracle/676_FR2962094_SetAverageCostVarianceGW.sql @@ -0,0 +1,56 @@ +-- Mar 8, 2010 8:56:27 PM COT +-- FR2962094_Finish implementation of weighted average costing +INSERT INTO C_ElementValue (AccountSign,AccountType,AD_Client_ID,AD_Org_ID,C_Element_ID,C_ElementValue_ID,Created,CreatedBy,Description,IsActive,IsBankAccount,IsDocControlled,IsForeignCurrency,IsSummary,Name,PostActual,PostBudget,PostEncumbrance,PostStatistical,Updated,UpdatedBy,Value) VALUES ('N','E',11,0,105,50017,TO_DATE('2010-03-08 20:56:26','YYYY-MM-DD HH24:MI:SS'),100,'Account for Average Cost Variance','Y','N','Y','N','N','Average Cost Variance','Y','Y','Y','Y',TO_DATE('2010-03-08 20:56:26','YYYY-MM-DD HH24:MI:SS'),100,'58800') +; + +-- Mar 8, 2010 8:56:27 PM COT +INSERT INTO C_ElementValue_Trl (AD_Language,C_ElementValue_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.C_ElementValue_ID, t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, C_ElementValue t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.C_ElementValue_ID=50017 AND NOT EXISTS (SELECT * FROM C_ElementValue_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.C_ElementValue_ID=t.C_ElementValue_ID) +; + +-- Mar 8, 2010 8:56:27 PM COT +INSERT INTO AD_TreeNode (AD_Client_ID,AD_Org_ID, IsActive,Created,CreatedBy,Updated,UpdatedBy, AD_Tree_ID, Node_ID, Parent_ID, SeqNo) SELECT t.AD_Client_ID, 0, 'Y', SysDate, 100, SysDate, 100,t.AD_Tree_ID, 50017, 0, 999 FROM AD_Tree t WHERE t.AD_Client_ID=11 AND t.IsActive='Y' AND EXISTS (SELECT * FROM C_Element ae WHERE ae.C_Element_ID=105 AND t.AD_Tree_ID=ae.AD_Tree_ID) AND NOT EXISTS (SELECT * FROM AD_TreeNode e WHERE e.AD_Tree_ID=t.AD_Tree_ID AND Node_ID=50017) +; + +-- Mar 8, 2010 8:56:34 PM COT +UPDATE AD_TreeNode SET Parent_ID=443, SeqNo=0, Updated=SysDate WHERE AD_Tree_ID=101 AND Node_ID=444 +; + +-- Mar 8, 2010 8:56:34 PM COT +UPDATE AD_TreeNode SET Parent_ID=443, SeqNo=1, Updated=SysDate WHERE AD_Tree_ID=101 AND Node_ID=445 +; + +-- Mar 8, 2010 8:56:34 PM COT +UPDATE AD_TreeNode SET Parent_ID=443, SeqNo=2, Updated=SysDate WHERE AD_Tree_ID=101 AND Node_ID=635 +; + +-- Mar 8, 2010 8:56:34 PM COT +UPDATE AD_TreeNode SET Parent_ID=443, SeqNo=3, Updated=SysDate WHERE AD_Tree_ID=101 AND Node_ID=50001 +; + +-- Mar 8, 2010 8:56:34 PM COT +UPDATE AD_TreeNode SET Parent_ID=443, SeqNo=4, Updated=SysDate WHERE AD_Tree_ID=101 AND Node_ID=50002 +; + +-- Mar 8, 2010 8:56:34 PM COT +UPDATE AD_TreeNode SET Parent_ID=443, SeqNo=5, Updated=SysDate WHERE AD_Tree_ID=101 AND Node_ID=50003 +; + +-- Mar 8, 2010 8:56:34 PM COT +UPDATE AD_TreeNode SET Parent_ID=443, SeqNo=6, Updated=SysDate WHERE AD_Tree_ID=101 AND Node_ID=50004 +; + +-- Mar 8, 2010 8:56:34 PM COT +UPDATE AD_TreeNode SET Parent_ID=443, SeqNo=7, Updated=SysDate WHERE AD_Tree_ID=101 AND Node_ID=50017 +; + +-- Mar 8, 2010 8:58:19 PM COT +INSERT INTO C_ValidCombination (Account_ID,AD_Client_ID,AD_Org_ID,C_AcctSchema_ID,Combination,Created,CreatedBy,C_ValidCombination_ID,Description,IsActive,IsFullyQualified,Updated,UpdatedBy) VALUES (50017,11,11,101,'HQ-58800-_-_-_-_',TO_DATE('2010-03-08 20:58:18','YYYY-MM-DD HH24:MI:SS'),100,50013,'HQ-Average Cost Variance-_-_-_-_','Y','Y',TO_DATE('2010-03-08 20:58:18','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Mar 8, 2010 8:58:32 PM COT +UPDATE C_AcctSchema_Default SET P_AverageCostVariance_Acct=50013,Updated=TO_DATE('2010-03-08 20:58:32','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE C_AcctSchema_ID=101 +; + +UPDATE M_Product_Category_Acct SET P_AverageCostVariance_Acct=50013,Updated=TO_DATE('2010-03-08 20:58:32','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE C_AcctSchema_ID=101; + +UPDATE M_Product_Acct SET P_AverageCostVariance_Acct=50013,Updated=TO_DATE('2010-03-08 20:58:32','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE C_AcctSchema_ID=101; diff --git a/migration/354a-trunk/oracle/677_BT2092712_Unalloc_payment_report.sql b/migration/354a-trunk/oracle/677_BT2092712_Unalloc_payment_report.sql new file mode 100644 index 0000000000..f4c7bf7056 --- /dev/null +++ b/migration/354a-trunk/oracle/677_BT2092712_Unalloc_payment_report.sql @@ -0,0 +1 @@ +UPDATE AD_ReportView SET WHERECLAUSE = 'DocStatus IN (''CO'',''CL'') AND IsAllocated=''N''' where ad_reportview_id=155; \ No newline at end of file diff --git a/migration/354a-trunk/oracle/678_BF_1774758.sql b/migration/354a-trunk/oracle/678_BF_1774758.sql new file mode 100644 index 0000000000..5532c1953f --- /dev/null +++ b/migration/354a-trunk/oracle/678_BF_1774758.sql @@ -0,0 +1,9 @@ +-- +-- BF [ 1774758 ] No default Sales Representant in request window +-- + +UPDATE AD_COLUMN + SET DefaultValue = '@#AD_User_ID@' + WHERE DefaultValue = '@AD_User_ID@' AND AD_Column_ID = 5432; + +COMMIT; diff --git a/migration/354a-trunk/oracle/679_BF2042466FixProductURL.sql b/migration/354a-trunk/oracle/679_BF2042466FixProductURL.sql new file mode 100644 index 0000000000..f9ae265d00 --- /dev/null +++ b/migration/354a-trunk/oracle/679_BF2042466FixProductURL.sql @@ -0,0 +1,8 @@ +-- Mar 11, 2010 3:09:41 PM COT +UPDATE M_Product SET DescriptionURL='http://www.adempiere.com/index.php/SampleProductDescriptionForDocumentation', ImageURL='http://www.adempiere.com/images/f/f5/C32.png', IsStocked='N',Updated=TO_DATE('2010-03-11 15:09:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE M_Product_ID=146 +; + +-- Mar 11, 2010 3:09:58 PM COT +UPDATE M_Product SET ImageURL='http://www.adempiere.com/images/f/f5/C32.png', IsStocked='N',Updated=TO_DATE('2010-03-11 15:09:58','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE M_Product_ID=126 +; + diff --git a/migration/354a-trunk/oracle/680_BF2970013.sql b/migration/354a-trunk/oracle/680_BF2970013.sql new file mode 100644 index 0000000000..27b759fbc4 --- /dev/null +++ b/migration/354a-trunk/oracle/680_BF2970013.sql @@ -0,0 +1,82 @@ +-- Mar 13, 2010 5:43:23 PM COT +-- BF2970013_Process Para uniqueness required +UPDATE AD_Process_Para SET SeqNo=20,Updated=TO_DATE('2010-03-13 17:43:23','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=131 +; + +-- Mar 13, 2010 5:43:25 PM COT +UPDATE AD_Process_Para SET SeqNo=30,Updated=TO_DATE('2010-03-13 17:43:25','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=244 +; + +-- Mar 13, 2010 5:43:27 PM COT +UPDATE AD_Process_Para SET SeqNo=40,Updated=TO_DATE('2010-03-13 17:43:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=53074 +; + +-- Mar 13, 2010 5:43:33 PM COT +UPDATE AD_Process_Para SET SeqNo=50,Updated=TO_DATE('2010-03-13 17:43:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=53073 +; + +-- Mar 13, 2010 5:43:58 PM COT +UPDATE AD_Process_Para SET SeqNo=50,Updated=TO_DATE('2010-03-13 17:43:58','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=471 +; + +-- Mar 13, 2010 5:44:32 PM COT +UPDATE AD_Process_Para SET SeqNo=140,Updated=TO_DATE('2010-03-13 17:44:32','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=453 +; + +-- Mar 13, 2010 5:45:12 PM COT +UPDATE AD_Process_Para SET SeqNo=140,Updated=TO_DATE('2010-03-13 17:45:12','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=454 +; + +-- Mar 13, 2010 5:45:56 PM COT +UPDATE AD_Process_Para SET SeqNo=50,Updated=TO_DATE('2010-03-13 17:45:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=397 +; + +-- Mar 13, 2010 5:46:18 PM COT +UPDATE AD_Process_Para SET SeqNo=30,Updated=TO_DATE('2010-03-13 17:46:18','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=588 +; + +-- Mar 13, 2010 5:46:20 PM COT +UPDATE AD_Process_Para SET SeqNo=40,Updated=TO_DATE('2010-03-13 17:46:20','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=585 +; + +-- Mar 13, 2010 5:46:22 PM COT +UPDATE AD_Process_Para SET SeqNo=50,Updated=TO_DATE('2010-03-13 17:46:22','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=53153 +; + +-- Mar 13, 2010 5:46:23 PM COT +UPDATE AD_Process_Para SET SeqNo=60,Updated=TO_DATE('2010-03-13 17:46:23','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=53154 +; + +-- Mar 13, 2010 5:46:25 PM COT +UPDATE AD_Process_Para SET SeqNo=70,Updated=TO_DATE('2010-03-13 17:46:25','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=586 +; + +-- Mar 13, 2010 5:46:27 PM COT +UPDATE AD_Process_Para SET SeqNo=80,Updated=TO_DATE('2010-03-13 17:46:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=587 +; + +-- Mar 13, 2010 5:46:55 PM COT +UPDATE AD_Process_Para SET SeqNo=40,Updated=TO_DATE('2010-03-13 17:46:55','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=53066 +; + +-- Mar 13, 2010 5:46:56 PM COT +UPDATE AD_Process_Para SET SeqNo=50,Updated=TO_DATE('2010-03-13 17:46:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=53067 +; + +-- Mar 13, 2010 5:47:22 PM COT +UPDATE AD_Process_Para SET SeqNo=140,Updated=TO_DATE('2010-03-13 17:47:22','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=53123 +; + +-- Mar 13, 2010 5:47:43 PM COT +UPDATE AD_Process_Para SET SeqNo=60,Updated=TO_DATE('2010-03-13 17:47:43','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=53275 +; + +-- Mar 13, 2010 5:47:46 PM COT +UPDATE AD_Process_Para SET SeqNo=70,Updated=TO_DATE('2010-03-13 17:47:46','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=53280 +; + +-- Mar 13, 2010 5:47:50 PM COT +UPDATE AD_Process_Para SET EntityType='EE01',Updated=TO_DATE('2010-03-13 17:47:50','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=53275 +; + +create unique index ad_procpara_procseqno on ad_process_para (ad_process_id, seqno); diff --git a/migration/354a-trunk/oracle/681_BF2968442.sql b/migration/354a-trunk/oracle/681_BF2968442.sql new file mode 100644 index 0000000000..9e9ccf3e22 --- /dev/null +++ b/migration/354a-trunk/oracle/681_BF2968442.sql @@ -0,0 +1,146 @@ +-- Mar 13, 2010 11:54:49 PM COT +-- BF_2968442_Post without Application Server +UPDATE AD_Element SET Description='Post the accounting immediately for testing (Deprecated)', Help='If selected, the accounting consequences are immediately generated when completing a document. Otherwise the document is posted by a batch process. You should select this only if you are testing. +Deprecated column - use instead the functionality Client Accounting.', Name='Post Immediately (Deprecated)',Updated=TO_DATE('2010-03-13 23:54:49','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=2843 +; + +-- Mar 13, 2010 11:54:49 PM COT +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=2843 +; + +-- Mar 13, 2010 11:54:49 PM COT +UPDATE AD_Column SET ColumnName='IsPostImmediate', Name='Post Immediately (Deprecated)', Description='Post the accounting immediately for testing (Deprecated)', Help='If selected, the accounting consequences are immediately generated when completing a document. Otherwise the document is posted by a batch process. You should select this only if you are testing. +Deprecated column - use instead the functionality Client Accounting.' WHERE AD_Element_ID=2843 +; + +-- Mar 13, 2010 11:54:50 PM COT +UPDATE AD_Process_Para SET ColumnName='IsPostImmediate', Name='Post Immediately (Deprecated)', Description='Post the accounting immediately for testing (Deprecated)', Help='If selected, the accounting consequences are immediately generated when completing a document. Otherwise the document is posted by a batch process. You should select this only if you are testing. +Deprecated column - use instead the functionality Client Accounting.', AD_Element_ID=2843 WHERE UPPER(ColumnName)='ISPOSTIMMEDIATE' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL +; + +-- Mar 13, 2010 11:54:50 PM COT +UPDATE AD_Process_Para SET ColumnName='IsPostImmediate', Name='Post Immediately (Deprecated)', Description='Post the accounting immediately for testing (Deprecated)', Help='If selected, the accounting consequences are immediately generated when completing a document. Otherwise the document is posted by a batch process. You should select this only if you are testing. +Deprecated column - use instead the functionality Client Accounting.' WHERE AD_Element_ID=2843 AND IsCentrallyMaintained='Y' +; + +-- Mar 13, 2010 11:54:50 PM COT +UPDATE AD_Field SET Name='Post Immediately (Deprecated)', Description='Post the accounting immediately for testing (Deprecated)', Help='If selected, the accounting consequences are immediately generated when completing a document. Otherwise the document is posted by a batch process. You should select this only if you are testing. +Deprecated column - use instead the functionality Client Accounting.' WHERE AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=2843) AND IsCentrallyMaintained='Y' +; + +-- Mar 13, 2010 11:54:50 PM COT +UPDATE AD_PrintFormatItem pi SET PrintName='Post Immediate', Name='Post Immediately (Deprecated)' WHERE IsCentrallyMaintained='Y' AND EXISTS (SELECT * FROM AD_Column c WHERE c.AD_Column_ID=pi.AD_Column_ID AND c.AD_Element_ID=2843) +; + +-- Mar 13, 2010 11:55:40 PM COT +UPDATE AD_Field SET IsSameLine='N',Updated=TO_DATE('2010-03-13 23:55:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=12326 +; + +-- Mar 13, 2010 11:55:55 PM COT +UPDATE AD_Field SET SeqNo=0,IsDisplayed='N' WHERE AD_Field_ID=12327 +; + +-- Mar 13, 2010 11:55:55 PM COT +UPDATE AD_Field SET SeqNo=20,IsDisplayed='Y' WHERE AD_Field_ID=317 +; + +-- Mar 13, 2010 11:55:55 PM COT +UPDATE AD_Field SET SeqNo=30,IsDisplayed='Y' WHERE AD_Field_ID=318 +; + +-- Mar 13, 2010 11:55:55 PM COT +UPDATE AD_Field SET SeqNo=40,IsDisplayed='Y' WHERE AD_Field_ID=319 +; + +-- Mar 13, 2010 11:55:55 PM COT +UPDATE AD_Field SET SeqNo=50,IsDisplayed='Y' WHERE AD_Field_ID=10318 +; + +-- Mar 13, 2010 11:55:55 PM COT +UPDATE AD_Field SET SeqNo=60,IsDisplayed='Y' WHERE AD_Field_ID=5160 +; + +-- Mar 13, 2010 11:55:55 PM COT +UPDATE AD_Field SET SeqNo=70,IsDisplayed='Y' WHERE AD_Field_ID=5759 +; + +-- Mar 13, 2010 11:55:55 PM COT +UPDATE AD_Field SET SeqNo=80,IsDisplayed='Y' WHERE AD_Field_ID=11025 +; + +-- Mar 13, 2010 11:55:55 PM COT +UPDATE AD_Field SET SeqNo=90,IsDisplayed='Y' WHERE AD_Field_ID=11205 +; + +-- Mar 13, 2010 11:55:55 PM COT +UPDATE AD_Field SET SeqNo=100,IsDisplayed='Y' WHERE AD_Field_ID=3813 +; + +-- Mar 13, 2010 11:55:55 PM COT +UPDATE AD_Field SET SeqNo=110,IsDisplayed='Y' WHERE AD_Field_ID=5887 +; + +-- Mar 13, 2010 11:55:55 PM COT +UPDATE AD_Field SET SeqNo=120,IsDisplayed='Y' WHERE AD_Field_ID=5161 +; + +-- Mar 13, 2010 11:55:55 PM COT +UPDATE AD_Field SET SeqNo=130,IsDisplayed='Y' WHERE AD_Field_ID=5162 +; + +-- Mar 13, 2010 11:55:55 PM COT +UPDATE AD_Field SET SeqNo=140,IsDisplayed='Y' WHERE AD_Field_ID=5163 +; + +-- Mar 13, 2010 11:55:55 PM COT +UPDATE AD_Field SET SeqNo=150,IsDisplayed='Y' WHERE AD_Field_ID=5164 +; + +-- Mar 13, 2010 11:55:55 PM COT +UPDATE AD_Field SET SeqNo=160,IsDisplayed='Y' WHERE AD_Field_ID=12099 +; + +-- Mar 13, 2010 11:55:55 PM COT +UPDATE AD_Field SET SeqNo=170,IsDisplayed='Y' WHERE AD_Field_ID=12098 +; + +-- Mar 13, 2010 11:55:55 PM COT +UPDATE AD_Field SET SeqNo=180,IsDisplayed='Y' WHERE AD_Field_ID=11024 +; + +-- Mar 13, 2010 11:55:55 PM COT +UPDATE AD_Field SET SeqNo=190,IsDisplayed='Y' WHERE AD_Field_ID=12326 +; + +-- Mar 13, 2010 11:55:55 PM COT +UPDATE AD_Field SET SeqNo=200,IsDisplayed='Y' WHERE AD_Field_ID=50158 +; + +-- Mar 13, 2010 11:55:55 PM COT +UPDATE AD_Field SET SeqNo=210,IsDisplayed='Y' WHERE AD_Field_ID=50159 +; + +-- Mar 13, 2010 11:55:55 PM COT +UPDATE AD_Field SET SeqNo=220,IsDisplayed='Y' WHERE AD_Field_ID=50160 +; + +-- Mar 13, 2010 11:55:55 PM COT +UPDATE AD_Field SET SeqNo=230,IsDisplayed='Y' WHERE AD_Field_ID=50184 +; + +-- Mar 13, 2010 11:55:56 PM COT +UPDATE AD_Field SET SeqNo=240,IsDisplayed='Y' WHERE AD_Field_ID=50185 +; + +-- Mar 13, 2010 11:55:56 PM COT +UPDATE AD_Field SET SeqNo=250,IsDisplayed='Y' WHERE AD_Field_ID=50186 +; + +-- Mar 13, 2010 11:55:56 PM COT +UPDATE AD_Field SET SeqNo=260,IsDisplayed='Y' WHERE AD_Field_ID=54238 +; + +-- Mar 13, 2010 11:55:56 PM COT +UPDATE AD_Field SET SeqNo=270,IsDisplayed='Y' WHERE AD_Field_ID=54680 +; + diff --git a/migration/354a-trunk/postgresql/659_FR2871676_ReportAmountType.sql b/migration/354a-trunk/postgresql/659_FR2871676_ReportAmountType.sql new file mode 100644 index 0000000000..c6ed38af7c --- /dev/null +++ b/migration/354a-trunk/postgresql/659_FR2871676_ReportAmountType.sql @@ -0,0 +1,411 @@ +-- 02/10/2009 11:33:15 AM +-- Add signed amount type to fin report +INSERT INTO AD_Reference (AD_Client_ID,AD_Org_ID,AD_Reference_ID,Created,CreatedBy,EntityType,IsActive,IsOrderByValue,Name,Updated,UpdatedBy,ValidationType) VALUES (0,0,53327,TO_TIMESTAMP('2009-10-02 11:33:12','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','N','PA_Report Period Type',TO_TIMESTAMP('2009-10-02 11:33:12','YYYY-MM-DD HH24:MI:SS'),100,'L') +; + +-- 02/10/2009 11:33:15 AM +-- Add signed amount type to fin report +INSERT INTO AD_Reference_Trl (AD_Language,AD_Reference_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Reference_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Reference t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Reference_ID=53327 AND EXISTS (SELECT * FROM AD_Reference_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Reference_ID!=t.AD_Reference_ID) +; + +-- 02/10/2009 11:33:29 AM +-- Add signed amount type to fin report +INSERT INTO AD_Ref_List (AD_Client_ID,AD_Org_ID,AD_Reference_ID,AD_Ref_List_ID,Created,CreatedBy,EntityType,IsActive,Name,Updated,UpdatedBy,Value) VALUES (0,0,53327,53536,TO_TIMESTAMP('2009-10-02 11:33:28','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Total',TO_TIMESTAMP('2009-10-02 11:33:28','YYYY-MM-DD HH24:MI:SS'),100,'T') +; + +-- 02/10/2009 11:33:29 AM +-- Add signed amount type to fin report +INSERT INTO AD_Ref_List_Trl (AD_Language,AD_Ref_List_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Ref_List_ID, t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Ref_List t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Ref_List_ID=53536 AND EXISTS (SELECT * FROM AD_Ref_List_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Ref_List_ID!=t.AD_Ref_List_ID) +; + +-- 02/10/2009 11:33:38 AM +-- Add signed amount type to fin report +INSERT INTO AD_Ref_List (AD_Client_ID,AD_Org_ID,AD_Reference_ID,AD_Ref_List_ID,Created,CreatedBy,EntityType,IsActive,Name,Updated,UpdatedBy,Value) VALUES (0,0,53327,53537,TO_TIMESTAMP('2009-10-02 11:33:37','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Year',TO_TIMESTAMP('2009-10-02 11:33:37','YYYY-MM-DD HH24:MI:SS'),100,'Y') +; + +-- 02/10/2009 11:33:38 AM +-- Add signed amount type to fin report +INSERT INTO AD_Ref_List_Trl (AD_Language,AD_Ref_List_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Ref_List_ID, t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Ref_List t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Ref_List_ID=53537 AND EXISTS (SELECT * FROM AD_Ref_List_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Ref_List_ID!=t.AD_Ref_List_ID) +; + +-- 02/10/2009 11:33:51 AM +-- Add signed amount type to fin report +INSERT INTO AD_Ref_List (AD_Client_ID,AD_Org_ID,AD_Reference_ID,AD_Ref_List_ID,Created,CreatedBy,EntityType,IsActive,Name,Updated,UpdatedBy,Value) VALUES (0,0,53327,53538,TO_TIMESTAMP('2009-10-02 11:33:50','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Period',TO_TIMESTAMP('2009-10-02 11:33:50','YYYY-MM-DD HH24:MI:SS'),100,'P') +; + +-- 02/10/2009 11:33:51 AM +-- Add signed amount type to fin report +INSERT INTO AD_Ref_List_Trl (AD_Language,AD_Ref_List_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Ref_List_ID, t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Ref_List t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Ref_List_ID=53538 AND EXISTS (SELECT * FROM AD_Ref_List_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Ref_List_ID!=t.AD_Ref_List_ID) +; + +-- 02/10/2009 11:40:15 AM +-- Add signed amount type to fin report +INSERT INTO AD_Ref_List (AD_Client_ID,AD_Org_ID,AD_Reference_ID,AD_Ref_List_ID,Created,CreatedBy,Description,EntityType,IsActive,Name,Updated,UpdatedBy,Value) VALUES (0,0,53327,53540,TO_TIMESTAMP('2009-10-02 11:40:14','YYYY-MM-DD HH24:MI:SS'),100,'Year for P & L account, Total for Balance Sheet account','D','Y','Natural',TO_TIMESTAMP('2009-10-02 11:40:14','YYYY-MM-DD HH24:MI:SS'),100,'N') +; + +-- 02/10/2009 11:40:15 AM +-- Add signed amount type to fin report +INSERT INTO AD_Ref_List_Trl (AD_Language,AD_Ref_List_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Ref_List_ID, t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Ref_List t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Ref_List_ID=53540 AND EXISTS (SELECT * FROM AD_Ref_List_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Ref_List_ID!=t.AD_Ref_List_ID) +; + +-- 02/10/2009 11:42:57 AM +-- Add signed amount type to fin report +UPDATE AD_Reference SET IsActive='N', Name='PA_Report AmountType (deprecated)',Updated=TO_TIMESTAMP('2009-10-02 11:42:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=235 +; + +-- 02/10/2009 11:42:57 AM +-- Add signed amount type to fin report +UPDATE AD_Reference_Trl SET IsTranslated='N' WHERE AD_Reference_ID=235 +; + +-- 02/10/2009 11:43:16 AM +-- Add signed amount type to fin report +INSERT INTO AD_Reference (AD_Client_ID,AD_Org_ID,AD_Reference_ID,Created,CreatedBy,EntityType,IsActive,IsOrderByValue,Name,Updated,UpdatedBy,ValidationType) VALUES (0,0,53328,TO_TIMESTAMP('2009-10-02 11:43:15','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','N','PA_Report Amount Type',TO_TIMESTAMP('2009-10-02 11:43:15','YYYY-MM-DD HH24:MI:SS'),100,'L') +; + +-- 02/10/2009 11:43:16 AM +-- Add signed amount type to fin report +INSERT INTO AD_Reference_Trl (AD_Language,AD_Reference_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Reference_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Reference t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Reference_ID=53328 AND EXISTS (SELECT * FROM AD_Reference_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Reference_ID!=t.AD_Reference_ID) +; + +-- 02/10/2009 11:44:10 AM +-- Add signed amount type to fin report +INSERT INTO AD_Ref_List (AD_Client_ID,AD_Org_ID,AD_Reference_ID,AD_Ref_List_ID,Created,CreatedBy,EntityType,IsActive,Name,Updated,UpdatedBy,Value) VALUES (0,0,53328,53541,TO_TIMESTAMP('2009-10-02 11:44:09','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Balance (expected sign)',TO_TIMESTAMP('2009-10-02 11:44:09','YYYY-MM-DD HH24:MI:SS'),100,'B') +; + +-- 02/10/2009 11:44:10 AM +-- Add signed amount type to fin report +INSERT INTO AD_Ref_List_Trl (AD_Language,AD_Ref_List_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Ref_List_ID, t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Ref_List t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Ref_List_ID=53541 AND EXISTS (SELECT * FROM AD_Ref_List_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Ref_List_ID!=t.AD_Ref_List_ID) +; + +-- 02/10/2009 11:44:32 AM +-- Add signed amount type to fin report +INSERT INTO AD_Ref_List (AD_Client_ID,AD_Org_ID,AD_Reference_ID,AD_Ref_List_ID,Created,CreatedBy,EntityType,IsActive,Name,Updated,UpdatedBy,Value) VALUES (0,0,53328,53542,TO_TIMESTAMP('2009-10-02 11:44:30','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Credit Only',TO_TIMESTAMP('2009-10-02 11:44:30','YYYY-MM-DD HH24:MI:SS'),100,'C') +; + +-- 02/10/2009 11:44:32 AM +-- Add signed amount type to fin report +INSERT INTO AD_Ref_List_Trl (AD_Language,AD_Ref_List_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Ref_List_ID, t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Ref_List t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Ref_List_ID=53542 AND EXISTS (SELECT * FROM AD_Ref_List_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Ref_List_ID!=t.AD_Ref_List_ID) +; + +-- 02/10/2009 11:44:42 AM +-- Add signed amount type to fin report +INSERT INTO AD_Ref_List (AD_Client_ID,AD_Org_ID,AD_Reference_ID,AD_Ref_List_ID,Created,CreatedBy,EntityType,IsActive,Name,Updated,UpdatedBy,Value) VALUES (0,0,53328,53543,TO_TIMESTAMP('2009-10-02 11:44:41','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Debit Only',TO_TIMESTAMP('2009-10-02 11:44:41','YYYY-MM-DD HH24:MI:SS'),100,'D') +; + +-- 02/10/2009 11:44:42 AM +-- Add signed amount type to fin report +INSERT INTO AD_Ref_List_Trl (AD_Language,AD_Ref_List_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Ref_List_ID, t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Ref_List t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Ref_List_ID=53543 AND EXISTS (SELECT * FROM AD_Ref_List_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Ref_List_ID!=t.AD_Ref_List_ID) +; + +-- 02/10/2009 11:45:01 AM +-- Add signed amount type to fin report +INSERT INTO AD_Ref_List (AD_Client_ID,AD_Org_ID,AD_Reference_ID,AD_Ref_List_ID,Created,CreatedBy,EntityType,IsActive,Name,Updated,UpdatedBy,Value) VALUES (0,0,53328,53544,TO_TIMESTAMP('2009-10-02 11:45:00','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Quantity',TO_TIMESTAMP('2009-10-02 11:45:00','YYYY-MM-DD HH24:MI:SS'),100,'Q') +; + +-- 02/10/2009 11:45:01 AM +-- Add signed amount type to fin report +INSERT INTO AD_Ref_List_Trl (AD_Language,AD_Ref_List_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Ref_List_ID, t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Ref_List t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Ref_List_ID=53544 AND EXISTS (SELECT * FROM AD_Ref_List_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Ref_List_ID!=t.AD_Ref_List_ID) +; + +-- 02/10/2009 11:48:32 AM +-- Add signed amount type to fin report +INSERT INTO AD_Ref_List (AD_Client_ID,AD_Org_ID,AD_Reference_ID,AD_Ref_List_ID,Created,CreatedBy,Description,EntityType,IsActive,Name,Updated,UpdatedBy,Value) VALUES (0,0,53328,53545,TO_TIMESTAMP('2009-10-02 11:48:31','YYYY-MM-DD HH24:MI:SS'),100,'DR - CR','D','Y','Balance (accounted sign)',TO_TIMESTAMP('2009-10-02 11:48:31','YYYY-MM-DD HH24:MI:SS'),100,'S') +; + +-- 02/10/2009 11:48:32 AM +-- Add signed amount type to fin report +INSERT INTO AD_Ref_List_Trl (AD_Language,AD_Ref_List_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Ref_List_ID, t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Ref_List t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Ref_List_ID=53545 AND EXISTS (SELECT * FROM AD_Ref_List_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Ref_List_ID!=t.AD_Ref_List_ID) +; + +-- 02/10/2009 11:52:38 AM +-- Add signed amount type to fin report +INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,Description,EntityType,Help,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,54061,0,'PAPeriodType',TO_TIMESTAMP('2009-10-02 11:52:35','YYYY-MM-DD HH24:MI:SS'),100,'PA Period Type','D','The Period Type to report on: Period, Year, Total or Natural; where Natural = Year for P & L accounts, Total for Balance Sheet accounts.','Y','Period Type','Period Type',TO_TIMESTAMP('2009-10-02 11:52:35','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- 02/10/2009 11:52:38 AM +-- Add signed amount type to fin report +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=54061 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID) +; + +-- 02/10/2009 11:56:47 AM +-- Add signed amount type to fin report +INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,Description,EntityType,Help,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,54062,0,'PAAmountType',TO_TIMESTAMP('2009-10-02 11:56:46','YYYY-MM-DD HH24:MI:SS'),100,'PA Amount Type for reporting','D','The amount type to report on: Quantity, Credit Only, Debit Only, Balance (expected sign) or Balance (DR-CR). Balance (expected sign) adjusts the sign of the result based on the Account Type and Expected Sign of each Account Element.','Y','Amount Type','Amount Type',TO_TIMESTAMP('2009-10-02 11:56:46','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- 02/10/2009 11:56:47 AM +-- Add signed amount type to fin report +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=54062 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID) +; + +-- 02/10/2009 11:56:58 AM +-- Add signed amount type to fin report +UPDATE AD_Element SET Help='The Period Type to report on: Period, Year, Total or Natural. Natural = Year for P & L accounts, Total for Balance Sheet accounts.',Updated=TO_TIMESTAMP('2009-10-02 11:56:58','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=54061 +; + +-- 02/10/2009 11:56:58 AM +-- Add signed amount type to fin report +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=54061 +; + +-- 02/10/2009 11:56:58 AM +-- Add signed amount type to fin report +UPDATE AD_Column SET ColumnName='PAPeriodType', Name='Period Type', Description='PA Period Type', Help='The Period Type to report on: Period, Year, Total or Natural. Natural = Year for P & L accounts, Total for Balance Sheet accounts.' WHERE AD_Element_ID=54061 +; + +-- 02/10/2009 11:56:58 AM +-- Add signed amount type to fin report +UPDATE AD_Process_Para SET ColumnName='PAPeriodType', Name='Period Type', Description='PA Period Type', Help='The Period Type to report on: Period, Year, Total or Natural. Natural = Year for P & L accounts, Total for Balance Sheet accounts.', AD_Element_ID=54061 WHERE UPPER(ColumnName)='PAPERIODTYPE' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL +; + +-- 02/10/2009 11:56:58 AM +-- Add signed amount type to fin report +UPDATE AD_Process_Para SET ColumnName='PAPeriodType', Name='Period Type', Description='PA Period Type', Help='The Period Type to report on: Period, Year, Total or Natural. Natural = Year for P & L accounts, Total for Balance Sheet accounts.' WHERE AD_Element_ID=54061 AND IsCentrallyMaintained='Y' +; + +-- 02/10/2009 11:56:58 AM +-- Add signed amount type to fin report +UPDATE AD_Field SET Name='Period Type', Description='PA Period Type', Help='The Period Type to report on: Period, Year, Total or Natural. Natural = Year for P & L accounts, Total for Balance Sheet accounts.' WHERE AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=54061) AND IsCentrallyMaintained='Y' +; + +-- 02/10/2009 11:58:09 AM +-- Add signed amount type to fin report +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,58553,54061,0,17,53327,446,'PAPeriodType',TO_TIMESTAMP('2009-10-02 11:58:08','YYYY-MM-DD HH24:MI:SS'),100,'P','PA Period Type','D',1,'The Period Type to report on: Period, Year, Total or Natural. Natural = Year for P & L accounts, Total for Balance Sheet accounts.','Y','Y','N','N','N','N','N','N','N','N','N','N','Y','Period Type',0,TO_TIMESTAMP('2009-10-02 11:58:08','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- 02/10/2009 11:58:09 AM +-- Add signed amount type to fin report +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=58553 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +-- 02/10/2009 11:58:17 AM +-- Add signed amount type to fin report +ALTER TABLE PA_ReportColumn ADD COLUMN PAPeriodType CHAR(1) DEFAULT 'P' +; + +-- 02/10/2009 11:59:04 AM +-- Add signed amount type to fin report +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,58554,54062,0,17,53328,446,'PAAmountType',TO_TIMESTAMP('2009-10-02 11:59:03','YYYY-MM-DD HH24:MI:SS'),100,'B','PA Amount Type for reporting','D',1,'The amount type to report on: Quantity, Credit Only, Debit Only, Balance (expected sign) or Balance (DR-CR). Balance (expected sign) adjusts the sign of the result based on the Account Type and Expected Sign of each Account Element.','Y','Y','N','N','N','N','N','N','N','N','N','N','Y','Amount Type',0,TO_TIMESTAMP('2009-10-02 11:59:03','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- 02/10/2009 11:59:04 AM +-- Add signed amount type to fin report +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=58554 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +-- 02/10/2009 12:01:36 PM +-- Add signed amount type to fin report +UPDATE AD_Element SET Help='The amount type to report on: Quantity, Credit Only, Debit Only, Balance (expected sign) or Balance (accounted sign). "Expected sign" adjusts the sign of the result based on the Account Type and Expected Sign of each Account Element, whereas "accounted sign" always returns DR-CR.',Updated=TO_TIMESTAMP('2009-10-02 12:01:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=54062 +; + +-- 02/10/2009 12:01:36 PM +-- Add signed amount type to fin report +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=54062 +; + +-- 02/10/2009 12:01:36 PM +-- Add signed amount type to fin report +UPDATE AD_Column SET ColumnName='PAAmountType', Name='Amount Type', Description='PA Amount Type for reporting', Help='The amount type to report on: Quantity, Credit Only, Debit Only, Balance (expected sign) or Balance (accounted sign). "Expected sign" adjusts the sign of the result based on the Account Type and Expected Sign of each Account Element, whereas "accounted sign" always returns DR-CR.' WHERE AD_Element_ID=54062 +; + +-- 02/10/2009 12:01:36 PM +-- Add signed amount type to fin report +UPDATE AD_Process_Para SET ColumnName='PAAmountType', Name='Amount Type', Description='PA Amount Type for reporting', Help='The amount type to report on: Quantity, Credit Only, Debit Only, Balance (expected sign) or Balance (accounted sign). "Expected sign" adjusts the sign of the result based on the Account Type and Expected Sign of each Account Element, whereas "accounted sign" always returns DR-CR.', AD_Element_ID=54062 WHERE UPPER(ColumnName)='PAAMOUNTTYPE' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL +; + +-- 02/10/2009 12:01:36 PM +-- Add signed amount type to fin report +UPDATE AD_Process_Para SET ColumnName='PAAmountType', Name='Amount Type', Description='PA Amount Type for reporting', Help='The amount type to report on: Quantity, Credit Only, Debit Only, Balance (expected sign) or Balance (accounted sign). "Expected sign" adjusts the sign of the result based on the Account Type and Expected Sign of each Account Element, whereas "accounted sign" always returns DR-CR.' WHERE AD_Element_ID=54062 AND IsCentrallyMaintained='Y' +; + +-- 02/10/2009 12:01:36 PM +-- Add signed amount type to fin report +UPDATE AD_Field SET Name='Amount Type', Description='PA Amount Type for reporting', Help='The amount type to report on: Quantity, Credit Only, Debit Only, Balance (expected sign) or Balance (accounted sign). "Expected sign" adjusts the sign of the result based on the Account Type and Expected Sign of each Account Element, whereas "accounted sign" always returns DR-CR.' WHERE AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=54062) AND IsCentrallyMaintained='Y' +; + +-- 02/10/2009 12:03:11 PM +-- Add signed amount type to fin report +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,58555,54062,0,17,53328,448,'PAAmountType',TO_TIMESTAMP('2009-10-02 12:03:10','YYYY-MM-DD HH24:MI:SS'),100,'PA Amount Type for reporting','D',2,'The amount type to report on: Quantity, Credit Only, Debit Only, Balance (expected sign) or Balance (accounted sign). "Expected sign" adjusts the sign of the result based on the Account Type and Expected Sign of each Account Element, whereas "accounted sign" always returns DR-CR.','Y','Y','N','N','N','N','N','N','N','N','N','N','Y','Amount Type',0,TO_TIMESTAMP('2009-10-02 12:03:10','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- 02/10/2009 12:03:11 PM +-- Add signed amount type to fin report +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=58555 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +-- 02/10/2009 12:03:20 PM +-- Add signed amount type to fin report +UPDATE AD_Column SET FieldLength=1,Updated=TO_TIMESTAMP('2009-10-02 12:03:20','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=58555 +; + +-- 02/10/2009 12:03:23 PM +-- Add signed amount type to fin report +ALTER TABLE PA_ReportLine ADD COLUMN PAAmountType CHAR(1) DEFAULT NULL +; + +-- 02/10/2009 12:03:48 PM +-- Add signed amount type to fin report +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,58556,54061,0,17,53327,448,'PAPeriodType',TO_TIMESTAMP('2009-10-02 12:03:47','YYYY-MM-DD HH24:MI:SS'),100,'PA Period Type','D',1,'The Period Type to report on: Period, Year, Total or Natural. Natural = Year for P & L accounts, Total for Balance Sheet accounts.','Y','Y','N','N','N','N','N','N','N','N','N','N','Y','Period Type',0,TO_TIMESTAMP('2009-10-02 12:03:47','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- 02/10/2009 12:03:48 PM +-- Add signed amount type to fin report +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=58556 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +-- 02/10/2009 12:03:50 PM +-- Add signed amount type to fin report +ALTER TABLE PA_ReportLine ADD COLUMN PAPeriodType CHAR(1) DEFAULT NULL +; + +-- 02/10/2009 12:04:03 PM +-- Add signed amount type to fin report +ALTER TABLE PA_ReportColumn ADD COLUMN PAAmountType CHAR(1) DEFAULT 'B' +; + +-- 02/10/2009 12:04:29 PM +-- Add signed amount type to fin report +UPDATE AD_Column SET IsActive='N',Updated=TO_TIMESTAMP('2009-10-02 12:04:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6019 +; + +-- 02/10/2009 12:04:39 PM +-- Add signed amount type to fin report +UPDATE AD_Column SET IsActive='N',Updated=TO_TIMESTAMP('2009-10-02 12:04:39','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=7707 +; + +-- 02/10/2009 12:09:57 PM +-- Add signed amount type to fin report +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,Updated,UpdatedBy) VALUES (0,58554,58041,0,374,TO_TIMESTAMP('2009-10-02 12:09:56','YYYY-MM-DD HH24:MI:SS'),100,'PA Amount Type for reporting',14,'D','The amount type to report on: Quantity, Credit Only, Debit Only, Balance (expected sign) or Balance (accounted sign). "Expected sign" adjusts the sign of the result based on the Account Type and Expected Sign of each Account Element, whereas "accounted sign" always returns DR-CR.','Y','Y','Y','N','N','N','N','N','Amount Type',110,TO_TIMESTAMP('2009-10-02 12:09:56','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- 02/10/2009 12:09:57 PM +-- Add signed amount type to fin report +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58041 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +-- 02/10/2009 12:11:17 PM +-- Add signed amount type to fin report +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,Updated,UpdatedBy) VALUES (0,58553,58042,0,374,TO_TIMESTAMP('2009-10-02 12:11:16','YYYY-MM-DD HH24:MI:SS'),100,'PA Period Type',14,'D','The Period Type to report on: Period, Year, Total or Natural. Natural = Year for P & L accounts, Total for Balance Sheet accounts.','Y','Y','Y','N','N','N','N','Y','Period Type',115,TO_TIMESTAMP('2009-10-02 12:11:16','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- 02/10/2009 12:11:17 PM +-- Add signed amount type to fin report +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58042 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +-- 02/10/2009 12:11:26 PM +-- Add signed amount type to fin report +UPDATE AD_Field SET IsActive='N',Updated=TO_TIMESTAMP('2009-10-02 12:11:26','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=4760 +; + +-- 02/10/2009 12:13:14 PM +-- Add signed amount type to fin report +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,DisplayLogic,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,Updated,UpdatedBy) VALUES (0,58555,58043,0,376,TO_TIMESTAMP('2009-10-02 12:13:13','YYYY-MM-DD HH24:MI:SS'),100,'PA Amount Type for reporting',14,'@LineType@=S','D','The amount type to report on: Quantity, Credit Only, Debit Only, Balance (expected sign) or Balance (accounted sign). "Expected sign" adjusts the sign of the result based on the Account Type and Expected Sign of each Account Element, whereas "accounted sign" always returns DR-CR.','Y','Y','Y','N','N','N','N','N','Amount Type',180,TO_TIMESTAMP('2009-10-02 12:13:13','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- 02/10/2009 12:13:14 PM +-- Add signed amount type to fin report +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58043 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +-- 02/10/2009 12:13:46 PM +-- Add signed amount type to fin report +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,DisplayLogic,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,Updated,UpdatedBy) VALUES (0,58556,58044,0,376,TO_TIMESTAMP('2009-10-02 12:13:45','YYYY-MM-DD HH24:MI:SS'),100,'PA Period Type',14,'@LineType@=S','D','The Period Type to report on: Period, Year, Total or Natural. Natural = Year for P & L accounts, Total for Balance Sheet accounts.','Y','Y','Y','N','N','N','N','Y','Period Type',185,TO_TIMESTAMP('2009-10-02 12:13:45','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- 02/10/2009 12:13:46 PM +-- Add signed amount type to fin report +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58044 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +-- 02/10/2009 12:13:57 PM +-- Add signed amount type to fin report +UPDATE AD_Field SET IsActive='N',Updated=TO_TIMESTAMP('2009-10-02 12:13:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=5807 +; + +-- 02/10/2009 12:16:06 PM +-- Add signed amount type to fin report +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,58557,54062,0,17,53328,535,'PAAmountType',TO_TIMESTAMP('2009-10-02 12:16:05','YYYY-MM-DD HH24:MI:SS'),100,'PA Amount Type for reporting','D',1,'The amount type to report on: Quantity, Credit Only, Debit Only, Balance (expected sign) or Balance (accounted sign). "Expected sign" adjusts the sign of the result based on the Account Type and Expected Sign of each Account Element, whereas "accounted sign" always returns DR-CR.','Y','Y','N','N','N','N','N','N','N','N','N','N','Y','Amount Type',0,TO_TIMESTAMP('2009-10-02 12:16:05','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +-- 02/10/2009 12:16:06 PM +-- Add signed amount type to fin report +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=58557 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +-- 02/10/2009 12:16:10 PM +-- Add signed amount type to fin report +ALTER TABLE I_ReportLine ADD COLUMN PAAmountType CHAR(1) DEFAULT NULL +; + +-- 02/10/2009 12:16:40 PM +-- Add signed amount type to fin report +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,58558,54061,0,17,53327,535,'PAPeriodType',TO_TIMESTAMP('2009-10-02 12:16:34','YYYY-MM-DD HH24:MI:SS'),100,'PA Period Type','D',1,'The Period Type to report on: Period, Year, Total or Natural. Natural = Year for P & L accounts, Total for Balance Sheet accounts.','Y','Y','N','N','N','N','N','N','N','N','N','N','Y','Period Type',0,TO_TIMESTAMP('2009-10-02 12:16:34','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +-- 02/10/2009 12:16:40 PM +-- Add signed amount type to fin report +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=58558 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +-- 02/10/2009 12:16:43 PM +-- Add signed amount type to fin report +ALTER TABLE I_ReportLine ADD COLUMN PAPeriodType CHAR(1) DEFAULT NULL +; + +-- 02/10/2009 12:16:52 PM +-- Add signed amount type to fin report +UPDATE AD_Column SET IsActive='N',Updated=TO_TIMESTAMP('2009-10-02 12:16:52','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=7954 +; + +-- 02/10/2009 12:18:35 PM +-- Add signed amount type to fin report +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,Updated,UpdatedBy) VALUES (0,58557,58045,0,444,TO_TIMESTAMP('2009-10-02 12:18:35','YYYY-MM-DD HH24:MI:SS'),100,'PA Amount Type for reporting',14,'D','The amount type to report on: Quantity, Credit Only, Debit Only, Balance (expected sign) or Balance (accounted sign). "Expected sign" adjusts the sign of the result based on the Account Type and Expected Sign of each Account Element, whereas "accounted sign" always returns DR-CR.','Y','Y','Y','N','N','N','N','N','Amount Type',160,TO_TIMESTAMP('2009-10-02 12:18:35','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- 02/10/2009 12:18:35 PM +-- Add signed amount type to fin report +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58045 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +-- 02/10/2009 12:18:56 PM +-- Add signed amount type to fin report +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,Updated,UpdatedBy) VALUES (0,58558,58046,0,444,TO_TIMESTAMP('2009-10-02 12:18:55','YYYY-MM-DD HH24:MI:SS'),100,'PA Period Type',14,'D','The Period Type to report on: Period, Year, Total or Natural. Natural = Year for P & L accounts, Total for Balance Sheet accounts.','Y','Y','Y','N','N','N','N','N','Period Type',165,TO_TIMESTAMP('2009-10-02 12:18:55','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- 02/10/2009 12:18:56 PM +-- Add signed amount type to fin report +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58046 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +-- 02/10/2009 12:19:04 PM +-- Add signed amount type to fin report +UPDATE AD_Field SET IsActive='N',Updated=TO_TIMESTAMP('2009-10-02 12:19:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=6043 +; + +-- 02/10/2009 1:48:32 PM +-- Add signed amount type to fin report +INSERT INTO AD_Ref_List (AD_Client_ID,AD_Org_ID,AD_Reference_ID,AD_Ref_List_ID,Created,CreatedBy,EntityType,IsActive,Name,Updated,UpdatedBy,Value) VALUES (0,0,53328,53546,TO_TIMESTAMP('2009-10-02 13:48:30','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Quantity (accounted sign)',TO_TIMESTAMP('2009-10-02 13:48:30','YYYY-MM-DD HH24:MI:SS'),100,'R') +; + +-- 02/10/2009 1:48:32 PM +-- Add signed amount type to fin report +INSERT INTO AD_Ref_List_Trl (AD_Language,AD_Ref_List_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Ref_List_ID, t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Ref_List t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Ref_List_ID=53546 AND EXISTS (SELECT * FROM AD_Ref_List_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Ref_List_ID!=t.AD_Ref_List_ID) +; + +-- 02/10/2009 1:48:43 PM +-- Add signed amount type to fin report +UPDATE AD_Ref_List SET Name='Quantity (expected sign)',Updated=TO_TIMESTAMP('2009-10-02 13:48:43','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Ref_List_ID=53544 +; + +-- 02/10/2009 1:48:43 PM +-- Add signed amount type to fin report +UPDATE AD_Ref_List_Trl SET IsTranslated='N' WHERE AD_Ref_List_ID=53544 +; + +update pa_reportline set paamounttype = substr(amounttype, 1,1), paperiodtype = substr(amounttype,2,1); + +update pa_reportcolumn set paamounttype = substr(amounttype, 1,1), paperiodtype = substr(amounttype,2,1); + + + diff --git a/migration/354a-trunk/postgresql/660_BF_2944056_FixSubstituteRelatedInfoProduct.sql b/migration/354a-trunk/postgresql/660_BF_2944056_FixSubstituteRelatedInfoProduct.sql new file mode 100644 index 0000000000..eae9fb4b15 --- /dev/null +++ b/migration/354a-trunk/postgresql/660_BF_2944056_FixSubstituteRelatedInfoProduct.sql @@ -0,0 +1,28 @@ +--- BF 2944056 https://sourceforge.net/tracker/?func=detail&aid=2944056&group_id=176962&atid=879332 +--- Fix Related and Substitute Inventory Quantity in the InfoProduct window + +DROP VIEW M_PRODUCT_SUBSTITUTERELATED_V; + +CREATE OR REPLACE VIEW M_PRODUCT_SUBSTITUTERELATED_V AS +SELECT s.ad_client_id, s.ad_org_id, s.isactive, s.created, s.createdby, s.updated, s.updatedby, + s.m_product_id, s.substitute_id, 'S' AS rowtype, mp.name, sum(ms.qtyonhand - ms.qtyreserved) AS qtyavailable, sum(ms.qtyonhand) AS qtyonhand, sum(ms.qtyreserved) AS qtyreserved, +ROUND(MAX(mpr.pricestd),0) AS pricestd, mpr.m_pricelist_version_id, mw.m_warehouse_id, org.name AS orgname + FROM m_substitute s + JOIN m_storage ms ON ms.m_product_id = s.substitute_id + JOIN m_product mp ON ms.m_product_id = mp.m_product_id + JOIN m_locator ml ON ms.m_locator_id = ml.m_locator_id + JOIN m_warehouse mw ON ml.m_warehouse_id = mw.m_warehouse_id + JOIN m_productprice mpr ON ms.m_product_id = mpr.m_product_id + JOIN ad_org org ON org.ad_org_id = mw.ad_org_id + GROUP BY s.ad_client_id, s.ad_org_id, s.isactive, s.created, s.createdby, s.updated, s.updatedby, s.m_product_id, s.substitute_id, mw.m_warehouse_id, mpr.m_pricelist_version_id, org.name, mp.name +UNION + SELECT r.ad_client_id, r.ad_org_id, r.isactive, r.created, r.createdby, r.updated, r.updatedby, + r.m_product_id, r.relatedproduct_id AS substitute_id, 'R' AS rowtype, mp.name, sum(ms.qtyonhand - ms.qtyreserved) AS qtyavailable, sum(ms.qtyonhand) AS qtyonhand, sum(ms.qtyreserved) AS qtyreserved, round(MAX(mpr.pricestd),0) AS pricestd, mpr.m_pricelist_version_id, mw.m_warehouse_id, org.name AS orgname + FROM m_relatedproduct r + JOIN m_storage ms ON ms.m_product_id = r.relatedproduct_id + JOIN m_product mp ON ms.m_product_id = mp.m_product_id + JOIN m_locator ml ON ms.m_locator_id = ml.m_locator_id + JOIN m_warehouse mw ON ml.m_warehouse_id = mw.m_warehouse_id + JOIN m_productprice mpr ON ms.m_product_id = mpr.m_product_id + JOIN ad_org org ON org.ad_org_id = mw.ad_org_id + GROUP BY r.ad_client_id, r.ad_org_id, r.isactive, r.created, r.createdby, r.updated, r.updatedby, r.m_product_id, r.relatedproduct_id, mw.m_warehouse_id, mpr.m_pricelist_version_id, org.name, mp.name; \ No newline at end of file diff --git a/migration/354a-trunk/postgresql/661_FR_2945715_AdvancedSearchMsg.sql b/migration/354a-trunk/postgresql/661_FR_2945715_AdvancedSearchMsg.sql new file mode 100644 index 0000000000..5209053c37 --- /dev/null +++ b/migration/354a-trunk/postgresql/661_FR_2945715_AdvancedSearchMsg.sql @@ -0,0 +1,30 @@ +-- Feb 8, 2010 3:00:56 PM EST +-- Advanced search +INSERT INTO AD_Message (AD_Client_ID,AD_Message_ID,AD_Org_ID,Created,CreatedBy,EntityType,IsActive,MsgText,MsgType,Updated,UpdatedBy,Value) VALUES (0,53092,0,TO_TIMESTAMP('2010-02-08 15:00:52','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','And/Or','I',TO_TIMESTAMP('2010-02-08 15:00:52','YYYY-MM-DD HH24:MI:SS'),100,'And/Or') +; + +-- Feb 8, 2010 3:00:57 PM EST +-- Advanced search +INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=53092 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID) +; + +-- Feb 8, 2010 3:01:21 PM EST +-- Advanced search +INSERT INTO AD_Message (AD_Client_ID,AD_Message_ID,AD_Org_ID,Created,CreatedBy,EntityType,IsActive,MsgText,MsgType,Updated,UpdatedBy,Value) VALUES (0,53093,0,TO_TIMESTAMP('2010-02-08 15:01:19','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','AND','I',TO_TIMESTAMP('2010-02-08 15:01:19','YYYY-MM-DD HH24:MI:SS'),100,'AND') +; + +-- Feb 8, 2010 3:01:21 PM EST +-- Advanced search +INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=53093 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID) +; + +-- Feb 8, 2010 3:01:42 PM EST +-- Advanced search +INSERT INTO AD_Message (AD_Client_ID,AD_Message_ID,AD_Org_ID,Created,CreatedBy,EntityType,IsActive,MsgText,MsgType,Updated,UpdatedBy,Value) VALUES (0,53094,0,TO_TIMESTAMP('2010-02-08 15:01:34','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','OR','I',TO_TIMESTAMP('2010-02-08 15:01:34','YYYY-MM-DD HH24:MI:SS'),100,'OR') +; + +-- Feb 8, 2010 3:01:42 PM EST +-- Advanced search +INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=53094 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID) +; + diff --git a/migration/354a-trunk/postgresql/662_BT_2944388.sql b/migration/354a-trunk/postgresql/662_BT_2944388.sql new file mode 100644 index 0000000000..497088507c --- /dev/null +++ b/migration/354a-trunk/postgresql/662_BT_2944388.sql @@ -0,0 +1,5 @@ +-- Feb 8, 2010 4:05:08 PM EST +-- BF2944388 +UPDATE AD_Column SET IsIdentifier='Y', SeqNo=1,Updated=TO_TIMESTAMP('2010-02-08 16:05:08','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=57563 +; + diff --git a/migration/354a-trunk/postgresql/663_FR2949534_ResetAllocation.sql b/migration/354a-trunk/postgresql/663_FR2949534_ResetAllocation.sql new file mode 100644 index 0000000000..0b42e30c42 --- /dev/null +++ b/migration/354a-trunk/postgresql/663_FR2949534_ResetAllocation.sql @@ -0,0 +1,35 @@ +-- Feb 11, 2010 3:41:40 PM EST +-- Reset Allocation +INSERT INTO AD_Process (AccessLevel,AD_Client_ID,AD_Org_ID,AD_Process_ID,Classname,Created,CreatedBy,Description,EntityType,Help,IsActive,IsBetaFunctionality,IsDirectPrint,IsReport,IsServerProcess,Name,ShowHelp,Statistic_Count,Statistic_Seconds,Updated,UpdatedBy,Value) VALUES ('2',0,0,53199,'org.compiere.process.AllocationReset',TO_TIMESTAMP('2010-02-11 15:41:38','YYYY-MM-DD HH24:MI:SS'),100,'Reset (delete) allocation of invoices to payments','D','Delete individual allocation. In contrast to "Reverse", the allocation is deleted (no trace), if the period is open.','Y','N','N','N','N','Reset Allocation Direct','Y',0,0,TO_TIMESTAMP('2010-02-11 15:41:38','YYYY-MM-DD HH24:MI:SS'),100,'C_Allocation_Reset_Direct') +; + +-- Feb 11, 2010 3:41:40 PM EST +-- Reset Allocation +INSERT INTO AD_Process_Trl (AD_Language,AD_Process_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Process_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Process t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Process_ID=53199 AND NOT EXISTS (SELECT * FROM AD_Process_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Process_ID=t.AD_Process_ID) +; + +-- Feb 11, 2010 3:43:37 PM EST +-- Reset Allocation +UPDATE AD_Field SET SeqNo=160,IsDisplayed='Y' WHERE AD_Field_ID=10431 +; + +-- Feb 11, 2010 3:44:45 PM EST +-- Reset Allocation +UPDATE AD_Column SET AD_Process_ID=53199, AD_Reference_ID=28,Updated=TO_TIMESTAMP('2010-02-11 15:44:45','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=12314 +; + +-- Feb 11, 2010 3:44:49 PM EST +-- Reset Allocation +UPDATE AD_Field SET Description='Reset (delete) allocation of invoices to payments', Name='Reset Allocation',Updated=TO_TIMESTAMP('2010-02-11 15:44:49','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=10431 +; + +-- Feb 11, 2010 3:44:49 PM EST +-- Reset Allocation +UPDATE AD_Field_Trl SET IsTranslated='N' WHERE AD_Field_ID=10431 +; + +-- Feb 11, 2010 3:50:09 PM EST +-- Reset Allocation +UPDATE AD_Column SET IsAlwaysUpdateable='Y',Updated=TO_TIMESTAMP('2010-02-11 15:50:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=12314 +; + diff --git a/migration/354a-trunk/postgresql/664_FR2934358_FixedTyposOnElements.sql b/migration/354a-trunk/postgresql/664_FR2934358_FixedTyposOnElements.sql new file mode 100644 index 0000000000..cb8cf1e344 --- /dev/null +++ b/migration/354a-trunk/postgresql/664_FR2934358_FixedTyposOnElements.sql @@ -0,0 +1,260 @@ +UPDATE AD_ELEMENT SET DESCRIPTION='Trees are used for (financial) reporting and security access (via role)', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=134; +UPDATE AD_ELEMENT SET DESCRIPTION='Trees are used for (financial) reporting', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID IN (131,135,136,137,2514,2515); +UPDATE AD_ELEMENT SET HELP='A Callout allow you to create Java extensions to perform certain tasks always after a value changed. Callouts should not be used for validation but consequences of a user selecting a certain value. +The callout is a Java class implementing org.compiere.model.Callout and a method name to call. Example: "org.compiere.model.CalloutRequest.copyText" instantiates the class "CalloutRequest" and calls the method "copyText". You can have multiple callouts by separating them via a semicolon', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=224; +UPDATE AD_ELEMENT SET HELP='The Costing Method indicates how costs will be calculated (Standard, Average, Lifo, FiFo). The default costing method is defined on accounting schema level and can be optionally overwritten in the product category. The costing method cannot conflict with the Material Movement Policy (defined on Product Category).', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=241; +UPDATE AD_ELEMENT SET NAME='Records deletable',PRINTNAME='Records deletable', HELP='The Records Deletable checkbox indicates if a record can be deleted from the database. If records cannot be deleted, you can only deselect the Active flag', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=366; +UPDATE AD_ELEMENT SET HELP='The Sales Rep checkbox indicates if this business partner is a sales representative. A sales representative may also be an employee, but does not need to be.' +, PO_HELP='The Sales Rep checkbox indicates if this business partner is a company agent. A company agent may also be an employee, but does not need to be.' +, UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=409; +UPDATE AD_ELEMENT SET NAME='Updatable',PRINTNAME='Updatable', HELP='The Updatable checkbox indicates if a field can be updated by the user.', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=422; +UPDATE AD_ELEMENT SET NAME='User updatable',PRINTNAME='User updatable', HELP='The User Updatable checkbox indicate if the user can update this field.', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=423; +UPDATE AD_ELEMENT SET HELP='The Credit Limit indicates the total amount allowed "on account" in primary accounting currency. If the Credit Limit is 0, no check is performed. Credit Management is based on the Total Open Amount, which includes Vendor activities.', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=553; +UPDATE AD_ELEMENT SET HELP='The Order is a control document. The Order is complete when the quantity ordered is the same as the quantity shipped and invoiced. When you close an order, unshipped (backordered) quantities are cancelled.' +, PO_HELP='The Purchase Order is a control document. The Purchase Order is complete when the quantity ordered is the same as the quantity shipped and invoiced. When you close an order, unshipped (backordered) quantities are cancelled.' +, UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=558; +UPDATE AD_ELEMENT SET HELP='The Enforce Price Limit check box indicates that prices cannot be below the limit price in Orders and Invoices. This can be overwritten, if the role allows this.', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=882; +UPDATE AD_ELEMENT SET HELP='The SO Sub Type indicates the type of sales order this document refers to. This field only appears when the Document Base Type is Sales Order. The selection made here will determine which documents will be generated when an order is processed and which documents must be generated manually or in batches.
    +The following outlines this process.
    +SO Sub Type of Standard Order will generate just the Order document when the order is processed.
    +The Delivery Note, Invoice and Receipt must be generated via other processes.
    +SO Sub Type of Warehouse Order will generate the Order and Delivery Note.
    The Invoice and Receipt must be generated via other processes.
    +SO Sub Type of Credit Order will generate the Order, Delivery Note and Invoice.
    The Receipt must be generated via other processes.
    +SO Sub Type of POS (Point of Sale) will generate all document', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=1018; +UPDATE AD_ELEMENT SET DESCRIPTION='Account for Vendor Service Liability', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=1057; +UPDATE AD_ELEMENT SET HELP='The Days After Due Date indicates the number of days after the payment due date to initiate dunning. If the number is negative, it includes not the not due invoices.', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=1092; +UPDATE AD_ELEMENT SET HELP='The Relative Priority indicates the location to pick from first if an product is stored in more than one location. (100 = highest priority, 0 = lowest). For outgoing shipments, the location is picked with the highest priority where the entire quantity can be shipped from. If there is no location, the location with the highest priority is used. +The Priority is ignored for products with Guarantee Date (always the oldest first) or if a specific instance is selected. +Incoming receipts are stored at the location with the highest priority, if not explicitly selected.', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=1145; +UPDATE AD_ELEMENT SET HELP='When processing a web order, a confirmation is sent to the EMail address of the customer from the request EMail address copying this email address when entered.', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=1993; +UPDATE AD_ELEMENT SET HELP='Web Click Details', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2007; +UPDATE AD_ELEMENT SET HELP='Attributes are specific to a Product Attribute Set (e.g. Size for T-Shirts: S,M,L). If you have multiple attributes and want to search under a common attribute, you define a search attribute. Example: have one Size search attribute combining the values of all different sizes (Size for Dress Shirt XL,L,M,S,XS). The Attribute Search allows you to have all values available for selection. This eases the maintenance of the individual product attribute.', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2025; +UPDATE AD_ELEMENT SET DESCRIPTION='Included Tab in this Tab (Master Detail)', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2026; +UPDATE AD_ELEMENT SET HELP='Internal (Operating System) Name of the Printer; Please mote that the printer name may be different on different clients. Enter a printer name, which applies to ALL clients (e.g. printer on a server).

    +If none is entered, the default printer is used. You specify your default printer when you log in. You can also change the default printer in Preferences.', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2051; +UPDATE AD_ELEMENT SET DESCRIPTION='Assignment to (transaction) Organization', HELP='Assignment to the transaction organization (cost center).', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2072; +UPDATE AD_ELEMENT SET HELP='"You can purchase professional support from Adempiere, Inc. or their partners. See http://www.adempiere.com for details. +"', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2124; +UPDATE AD_ELEMENT SET HELP='The Type of data Replication determines the direction of the data replication.
    +Reference means that the data in this system is read only ->
    +Local means that the data in this system is not replicated to other systems -
    +Merge means that the data in this system is synchronized with the other system <->
    ', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2137; +UPDATE AD_ELEMENT SET HELP='If selected, public users can read/view the entry. Public are users without a Role in the system. Use security rules for more specific access control.', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2139; +UPDATE AD_ELEMENT SET HELP='If selected, public users can write/create entries. Public are users without a Role in the system. Use security rules for more specific access control.', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2140; +UPDATE AD_ELEMENT SET HELP='Set up knowledge categories and values as a search aid. Examples are Release Version, Product Area, etc. Knowledge Category values act like keywords.', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2141; +UPDATE AD_ELEMENT SET DESCRIPTION='Related Entry for this Entry' +, HELP='Related Knowledge Entry for this Knowledge Entry' +, UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2145; +UPDATE AD_ELEMENT SET HELP='The Source of a Knowledge Entry is a pointer to the originating system. The Knowledge Entry has an additional entry (Description URL) for more detailed info.', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2146; +UPDATE AD_ELEMENT SET DESCRIPTION='Knowledge Keyword Synonym', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2147; +UPDATE AD_ELEMENT SET HELP='Topic or Discussion Thead', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2148; +UPDATE AD_ELEMENT SET NAME='Knowledge Type', HELP='Area of knowledge - A Type has multiple Topics', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2149; +UPDATE AD_ELEMENT SET DESCRIPTION='Name of the Project Cycle Step', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2165; +UPDATE AD_ELEMENT SET DESCRIPTION='Minimum Amount in Document Currency', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2177; +UPDATE AD_ELEMENT SET DESCRIPTION='Minimum number of guarantee days', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2197; +UPDATE AD_ELEMENT SET HELP='If a line is Description Only, e.g. Product Inventory is not corrected. No accounting transactions are created and the amount or totals are not included in the document. This for including descriptive detail lines, e.g. for an Work Order.', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2183; +UPDATE AD_ELEMENT SET HELP='This allows to have the three general situations of "not open" - "open" - "closed"', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2201; +UPDATE AD_ELEMENT SET NAME='Calculate Maximum (?)', DESCRIPTION='Calculate the maximum amount', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2207; +UPDATE AD_ELEMENT SET HELP='A running total creates a sum at the end of a page and on the top of the next page for all columns, which have a Sum function. You should define running total only once per format.', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2212; +UPDATE AD_ELEMENT SET DESCRIPTION='Electronic Funds Transfer Payee Account Information', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2233; +UPDATE AD_ELEMENT SET DESCRIPTION='Shelf Life Days remaining to Guarantee Date (minus minimum guarantee days)', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2237; +UPDATE AD_ELEMENT SET HELP='Minimum Shelf Life of products with Guarantee Date instance. If > 0 you cannot select products with a shelf life ((Guarantee Date-Today) / Guarantee Days) less than the minimum shelf life, unless you select "Show All"', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2240; +UPDATE AD_ELEMENT SET HELP='Minimum Shelf Life of products with Guarantee Date instance. If > 0 you cannot select products with a shelf life less than the minimum shelf life, unless you select "Show All"', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2264; +UPDATE AD_ELEMENT SET DESCRIPTION='If selected, the product is displayed in the initial or any empty search' +, HELP='In the display of products in the Web Store, the product is displayed in the initial view or if no search criteria are entered. To be displayed, the product must be in the price list used.' +, UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2277; +UPDATE AD_ELEMENT SET HELP='The loader definition provides the parameters to load bank statements from EFT formats like SWIFT (MT940) or OFX', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2283; +UPDATE AD_ELEMENT SET DESCRIPTION='Date format used in the input format', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2286; +UPDATE AD_ELEMENT SET HELP='Activity Result of the execution of the Workflow Process Instance', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2308; +UPDATE AD_ELEMENT SET HELP='History of changes of the Workflow Process Activity', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2310; +UPDATE AD_ELEMENT SET HELP='Semantics for multiple outgoing Transitions for a Node/Activity. AND represents multiple concurrent threads - XOR represents the first transition with a true Transition condition.', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2337; +UPDATE AD_ELEMENT SET HELP='You can create a bid for a topic. Depending on the type, the highest bidder wins the Topic - or you participate in funding for a Topic.', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2360; +UPDATE AD_ELEMENT SET HELP='Available Funds (from Payments) and Committed or Uncommitted funds for Bids', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2362; +UPDATE AD_ELEMENT SET HELP='Available Funds (for Payments) and Committed or Uncommitted funds from Offers', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2364; +UPDATE AD_ELEMENT SET DESCRIPTION='An Error occurred in the execution', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2395; +UPDATE AD_ELEMENT SET DESCRIPTION='The response can have just the total amount for the RfQ', HELP='If not selected, the response must be provided per line', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2403; +UPDATE AD_ELEMENT SET DESCRIPTION='Are Responses to the Request for Quotation accepted', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2404; +UPDATE AD_ELEMENT SET DESCRIPTION='The response is the selected winner', HELP='The response is the selected winner. If selected on Response level, the line selections are ignored.', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2405; +UPDATE AD_ELEMENT SET DESCRIPTION='Product used to determine the price of the membership for the topic type', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2415; +UPDATE AD_ELEMENT SET HELP='Consecutive range to', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2455; +UPDATE AD_ELEMENT SET HELP='Define the method how the next occurrence is calculated', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2457; +UPDATE AD_ELEMENT SET HELP='If selected and if the window / tab is not read only, you can always update the column. This might be useful for comments, etc.', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2468; +UPDATE AD_ELEMENT SET DESCRIPTION='Elapsed Time in milli seconds', HELP='Elapsed Time in milli seconds', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2474; +UPDATE AD_ELEMENT SET DESCRIPTION='Distribution Run Lines define Distribution List, the Product and Quantities', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2486; +UPDATE AD_ELEMENT SET HELP='Maintain and allow to transfer general statistics (number of clients, orgs, business partners, users, products, invoices) to get a better feeling for the application use. This information is not published.', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2489; +UPDATE AD_ELEMENT SET HELP='Forecast of Product Quantity by Period', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2499; +UPDATE AD_ELEMENT SET HELP='The Total Open Balance Amount is the calculated open item amount for Customer and Vendor activity. If the Balance is below zero, we owe the Business Partner. The amount is used for Credit Management. +Invoices and Payment Allocations determine the Open Balance (i.e. not Orders or Payments).', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2562; +UPDATE AD_ELEMENT SET HELP='The Attribute Value type determines the data/validation type', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2574; +UPDATE AD_ELEMENT SET DESCRIPTION='Value set by Migration for post-Migration tasks.', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2625; +UPDATE AD_ELEMENT SET DESCRIPTION='Type of Workflow', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2626; +UPDATE AD_ELEMENT SET HELP='When a document is due for too long without activity, a reminder is sent. 0 means no reminders. +The Remind Days are the days when the next email reminder is sent.', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2631; +UPDATE AD_ELEMENT SET HELP='Internal name of the transaction', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2655; +UPDATE AD_ELEMENT SET HELP='List of classes implementing the interface org.compiere.model.ModelValidator, separated by semicolon. +The class is called for the client and allows to validate documents in the prepare stage and monitor model changes.', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2670; +UPDATE AD_ELEMENT SET HELP='This allows to have multiple closed status', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2723; +UPDATE AD_ELEMENT SET HELP='The EMail address is used to send mails to users of the web store', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2731; +UPDATE AD_ELEMENT SET DESCRIPTION='Assignment of Employee (User) to Job Position', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2763; +UPDATE AD_ELEMENT SET HELP='Subscriber to invite to respond to RfQs', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2377; +UPDATE AD_ELEMENT SET HELP='Once per operation', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2779; +UPDATE AD_ELEMENT SET HELP='Change requests for a Bill of Materials. They can be automatically created from Requests, if enabled in the Request Type and the Request Group refers to a Bill of Materials', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2785; +UPDATE AD_ELEMENT SET HELP='The Bill of Material Component determines what products, services and outside processing is included in producing the Product. It references the operation and determines it''s sequence.', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2786; +UPDATE AD_ELEMENT SET HELP='Phantom Component are not stored and produced with the product. This is an option to avoid maintaining an Engineering and Manufacturing Bill of Materials.', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2788; +UPDATE AD_ELEMENT SET DESCRIPTION='Optional Lead Time offset before starting production', HELP='Optional Lead Time offset before starting production', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2789; +UPDATE AD_ELEMENT SET HELP='If selected, the user has full access to the Business Partner (BP) information (Business Documents like Orders, Invoices - Requests) or resources (Assets, Downloads). If you deselect it, the user has no access rights unless, you explicitly grant it in tab "BP Access"', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2835; +UPDATE AD_ELEMENT SET DESCRIPTION='User/contact access to Business Partner information and resources', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2836; +UPDATE AD_ELEMENT SET HELP='If selected, the accounting consequences are immediately generated when completing a document. Otherwise the document is posted by a batch process. You should select this only if you are testing.', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2843; +UPDATE AD_ELEMENT SET HELP='Note that the cost queue may not be the same as the physical movement cost queue due to differences in costing level and warehouse priority.', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2845; +UPDATE AD_ELEMENT SET HELP='Account used for posting matched product (item) expenses (e.g. AP Invoice, Invoice Match). You would use a different account then Product Expense, if you want to differentiate service related costs from item related costs. The balance on the clearing account should be zero and accounts for the timing difference between invoice receipt and matching.', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2847; +UPDATE AD_ELEMENT SET HELP='If selected, you will post service related revenue to a different receivables account and service related cost to a different payables account.', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2849; +UPDATE AD_ELEMENT SET HELP='Enter the number of records the query will return without confirmation to avoid unnecessary system load. If 0, the system default of 500 is used.', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2853; +UPDATE AD_ELEMENT SET HELP='Enter the number of records a user will be able to query to avoid unnecessary system load. If 0, no restrictions are imposed.', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2854; +UPDATE AD_ELEMENT SET HELP='The Posting Type Commitments is created when posting Purchase Orders; The Posting Type Reservation is created when posting Requisitions. This is used for budgetary control.', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2860; +UPDATE AD_ELEMENT SET HELP='Accounting related information for reconciliation with documents. It includes all revenue/expense and tax entries as a base for detail reporting', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2864; +UPDATE AD_ELEMENT SET HELP='If selected AP tax is handled as expense, otherwise it is handled as a VAT credit.', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2870; +UPDATE AD_ELEMENT SET HELP='Budget Control allows you to restrict the use of expenditures, commitments (Purchase Orders) and reservations (Requisitions). If defined, you may not be able to approve Requisitions, Purchase Orders, or AP Invoices.', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2871; +UPDATE AD_ELEMENT SET HELP='A user defined accounting element refers to a Adempiere table. This allows to use any table content as an accounting dimension (e.g. Project Task). Note that User Elements are optional and are populated from the context of the document (i.e. not requested)', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID IN (2877,2878); +UPDATE AD_ELEMENT SET HELP='Visual representation of performance by color. The Schema has often three levels (e.g. red-yellow-green). Adempiere support two levels (e.g. red-green) or four levels (e.g. gray-bronze-silver-gold). Note that Measures without a goal are represented white. The percentages could be between 0 and unlimited (i.e. above 100%).', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2903; +UPDATE AD_ELEMENT SET DESCRIPTION='Performance Ratio', HELP='Calculation instruction set for a performance ratio', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2919; +UPDATE AD_ELEMENT SET DESCRIPTION='Performance Ratio Used', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2929; +UPDATE AD_ELEMENT SET NAME='Next Maintenance',PRINTNAME='Next Maintenance', DESCRIPTION='Next Maintenance Date', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2932; +UPDATE AD_ELEMENT SET DESCRIPTION='Next Maintenance Unit', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2934; +UPDATE AD_ELEMENT SET HELP='The Meta Robots Tag define on how a search engines robot should handle this page and the following ones. It defines two keywords: (NO)INDEX which defines whether or not to index this content and (NO)FOLLOW which defines whether or not to follow links. The most common combination is INDEX,FOLLOW which will force a search robot to index the content and follow links and images.', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2975; +UPDATE AD_ELEMENT SET DESCRIPTION='Contains list of elements separated by CR', HELP='Contains a list of elements this template uses separated by a Carriage Return. Last line should be empty', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2983; +UPDATE AD_ELEMENT SET HELP='A Container defines the abstract level around the content, it defines how the content gets displayed, indexed and stored.', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2985; +UPDATE AD_ELEMENT SET DESCRIPTION='External Link (URL) for the Container', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2988; +UPDATE AD_ELEMENT SET HELP='This table contains all the media content like images, flash movies etc.', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=2997; +UPDATE AD_ELEMENT SET HELP='If we have a block in content where announce content and also sponsored links we should mention the sponsored ones', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=3007; +UPDATE AD_ELEMENT SET HELP='Media Server list to which content should get transferred', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=3009; +UPDATE AD_ELEMENT SET HELP='A container element defines the smallest definition of content, i.e. the headline, the content etc.', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID IN (3013,3023); +UPDATE AD_ELEMENT SET HELP='The date the revenue recognition starts.', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=3032; +UPDATE AD_ELEMENT SET DESCRIPTION='Container Stage Template Table', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=3050; +UPDATE AD_ELEMENT SET HELP='The entity type determines the ownership of Application Dictionary entries. The types "Dictionary" and "Adempiere" should not be used and are maintained by Adempiere (i.e. all changes are reversed during migration to the current definition).', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=3052; +UPDATE AD_ELEMENT SET HELP='If your application requires additional jar files, enter them here. The jar files must be located in the $ADEMPIERE_HOME/lib directory.', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=3054; +UPDATE AD_ELEMENT SET HELP='Keyword not to be indexed, optional restricted to specific Document Type, Container or Request Type', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=3078; +UPDATE AD_ELEMENT SET DESCRIPTION='Open Debit in document currency & rate', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=3083; +UPDATE AD_ELEMENT SET DESCRIPTION='Open Credit in document currency & rate', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=3084; +UPDATE AD_ELEMENT SET DESCRIPTION='Open Balance in document currency & rate', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=3085; +UPDATE AD_ELEMENT SET HELP='The dunning letter with this level includes all due invoices.', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=3088; +UPDATE AD_ELEMENT SET HELP='The dunning letter with this level includes all not due invoices.', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=3089; +UPDATE AD_ELEMENT SET HELP='The LDAP Server allows third party software (e.g. Apache) to use the users defined in the system to authenticate and authorize them. There is only one server per Adempiere system. The "o" is the Client key and the optional "ou" is the Interest Area key.', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=3093; +UPDATE AD_ELEMENT SET PRINTNAME=NAME, DESCRIPTION='Table to check whether the migration script has been applied', UPDATED=TO_TIMESTAMP('2010-01-13 10:38:15','YYYY-MM-DD HH24:MI:SS') +WHERE AD_ELEMENT_ID=53350; +COMMIT; diff --git a/migration/354a-trunk/postgresql/665_FR2952245_ImportDataPlanning.sql b/migration/354a-trunk/postgresql/665_FR2952245_ImportDataPlanning.sql new file mode 100644 index 0000000000..c7298175da --- /dev/null +++ b/migration/354a-trunk/postgresql/665_FR2952245_ImportDataPlanning.sql @@ -0,0 +1,2069 @@ +-- Feb 15, 2010 1:05:07 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Window (AD_Client_ID,AD_Org_ID,AD_Window_ID,Created,CreatedBy,EntityType,IsActive,IsBetaFunctionality,IsDefault,IsSOTrx,Name,Processing,Updated,UpdatedBy,WindowType) VALUES (0,0,53109,TO_TIMESTAMP('2010-02-15 13:05:05','YYYY-MM-DD HH24:MI:SS'),0,'EE01','Y','N','N','Y','Import Product Planning','N',TO_TIMESTAMP('2010-02-15 13:05:05','YYYY-MM-DD HH24:MI:SS'),0,'M') +; + +-- Feb 15, 2010 1:05:07 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Window_Trl (AD_Language,AD_Window_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Window_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Window t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Window_ID=53109 AND NOT EXISTS (SELECT * FROM AD_Window_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Window_ID=t.AD_Window_ID) +; + +-- Feb 15, 2010 1:05:11 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Table (AD_Client_ID,AD_Org_ID,AD_Table_ID,AD_Window_ID,AccessLevel,Created,CreatedBy,EntityType,IsActive,IsChangeLog,IsDeleteable,IsHighVolume,IsSecurityEnabled,IsView,Name,ReplicationType,TableName,Updated,UpdatedBy) VALUES (0,0,53260,53109,'2',TO_TIMESTAMP('2010-02-15 13:05:09','YYYY-MM-DD HH24:MI:SS'),0,'EE01','Y','N','Y','N','N','N','Import Product Planning','L','I_ProductPlanning',TO_TIMESTAMP('2010-02-15 13:05:09','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:05:11 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Table_Trl (AD_Language,AD_Table_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Table_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Table t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Table_ID=53260 AND NOT EXISTS (SELECT * FROM AD_Table_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Table_ID=t.AD_Table_ID) +; + +-- Feb 15, 2010 1:05:12 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Sequence (AD_Client_ID,AD_Org_ID,AD_Sequence_ID,Created,CreatedBy,CurrentNext,CurrentNextSys,Description,IncrementNo,IsActive,IsAudited,IsAutoSequence,IsTableID,Name,StartNewYear,StartNo,Updated,UpdatedBy) VALUES (0,0,53369,TO_TIMESTAMP('2010-02-15 13:05:11','YYYY-MM-DD HH24:MI:SS'),0,1000000,50000,'Table I_ProductPlanning',1,'Y','N','Y','Y','I_ProductPlanning','N',1000000,TO_TIMESTAMP('2010-02-15 13:05:11','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:05:13 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,54117,0,'I_ProductPlanning_ID',TO_TIMESTAMP('2010-02-15 13:05:12','YYYY-MM-DD HH24:MI:SS'),0,'EE01','Y','Import Product Planning','Import Product Planning',TO_TIMESTAMP('2010-02-15 13:05:12','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:05:13 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=54117 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID) +; + +-- Feb 15, 2010 1:05:14 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Reference SET Description='10 Digit Identifier', EntityType='D', Help=NULL, IsActive='Y', Name='ID', ValidationType='D',Updated=TO_TIMESTAMP('2010-02-15 13:05:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Reference_ID=13 +; + +-- Feb 15, 2010 1:05:14 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Reference_Trl SET IsTranslated='N' WHERE AD_Reference_ID=13 +; + +-- Feb 15, 2010 1:05:15 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,58977,54117,0,13,53260,'I_ProductPlanning_ID',TO_TIMESTAMP('2010-02-15 13:05:14','YYYY-MM-DD HH24:MI:SS'),0,'EE01',10,'Y','N','N','N','Y','Y','N','N','Y','N','N','Import Product Planning',TO_TIMESTAMP('2010-02-15 13:05:14','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:05:15 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=58977 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:05:15 PM CST +-- Create new importer for Planning Data and Forecast +CREATE TABLE I_ProductPlanning (I_ProductPlanning_ID NUMERIC(10) NOT NULL, CONSTRAINT I_ProductPlanning_Key PRIMARY KEY (I_ProductPlanning_ID)) +; + +-- Feb 15, 2010 1:05:16 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element SET ColumnName='AD_Client_ID', Description='Client/Tenant for this installation.', EntityType='D', Help='A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.', IsActive='Y', Name='Client', PO_Description=NULL, PO_Help=NULL, PO_Name=NULL, PO_PrintName=NULL, PrintName='Client',Updated=TO_TIMESTAMP('2010-02-15 13:05:16','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Element_ID=102 +; + +-- Feb 15, 2010 1:05:16 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=102 +; + +-- Feb 15, 2010 1:05:17 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Reference SET Description='Direct Table Access', EntityType='D', Help=NULL, IsActive='Y', Name='Table Direct', ValidationType='D',Updated=TO_TIMESTAMP('2010-02-15 13:05:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Reference_ID=19 +; + +-- Feb 15, 2010 1:05:17 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Reference_Trl SET IsTranslated='N' WHERE AD_Reference_ID=19 +; + +-- Feb 15, 2010 1:05:17 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,58978,102,0,19,53260,'AD_Client_ID',TO_TIMESTAMP('2010-02-15 13:05:17','YYYY-MM-DD HH24:MI:SS'),0,'@AD_Client_ID@','Client/Tenant for this installation.','EE01',10,'A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','Y','N','N','N','N','Y','N','N','Y','N','N','Client',TO_TIMESTAMP('2010-02-15 13:05:17','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:05:17 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=58978 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:05:18 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD COLUMN AD_Client_ID NUMERIC(10) NOT NULL +; + +-- Feb 15, 2010 1:05:18 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element SET ColumnName='AD_Org_ID', Description='Organizational entity within client', EntityType='D', Help='An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.', IsActive='Y', Name='Organization', PO_Description=NULL, PO_Help=NULL, PO_Name=NULL, PO_PrintName=NULL, PrintName='Organization',Updated=TO_TIMESTAMP('2010-02-15 13:05:18','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Element_ID=113 +; + +-- Feb 15, 2010 1:05:18 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=113 +; + +-- Feb 15, 2010 1:05:19 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,58979,113,0,19,53260,'AD_Org_ID',TO_TIMESTAMP('2010-02-15 13:05:18','YYYY-MM-DD HH24:MI:SS'),0,'@AD_Org_ID@','Organizational entity within client','EE01',10,'An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','Y','N','N','N','N','Y','N','N','Y','N','N','Organization',TO_TIMESTAMP('2010-02-15 13:05:18','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:05:19 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=58979 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:05:19 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD COLUMN AD_Org_ID NUMERIC(10) NOT NULL +; + +-- Feb 15, 2010 1:05:19 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element SET ColumnName='Created', Description='Date this record was created', EntityType='D', Help='The Created field indicates the date that this record was created.', IsActive='Y', Name='Created', PO_Description=NULL, PO_Help=NULL, PO_Name=NULL, PO_PrintName=NULL, PrintName='Created',Updated=TO_TIMESTAMP('2010-02-15 13:05:19','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Element_ID=245 +; + +-- Feb 15, 2010 1:05:19 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=245 +; + +-- Feb 15, 2010 1:05:19 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Reference SET Description='Date with time', EntityType='D', Help=NULL, IsActive='Y', Name='Date+Time', ValidationType='D',Updated=TO_TIMESTAMP('2010-02-15 13:05:19','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Reference_ID=16 +; + +-- Feb 15, 2010 1:05:19 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Reference_Trl SET IsTranslated='N' WHERE AD_Reference_ID=16 +; + +-- Feb 15, 2010 1:05:20 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,58980,245,0,16,53260,'Created',TO_TIMESTAMP('2010-02-15 13:05:19','YYYY-MM-DD HH24:MI:SS'),0,'Date this record was created','EE01',14,'The Created field indicates the date that this record was created.','Y','N','N','N','N','Y','N','N','Y','N','N','Created',TO_TIMESTAMP('2010-02-15 13:05:19','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:05:20 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=58980 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:05:20 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD COLUMN Created TIMESTAMP NOT NULL +; + +-- Feb 15, 2010 1:05:20 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element SET ColumnName='CreatedBy', Description='User who created this records', EntityType='D', Help='The Created By field indicates the user who created this record.', IsActive='Y', Name='Created By', PO_Description=NULL, PO_Help=NULL, PO_Name=NULL, PO_PrintName=NULL, PrintName='Created By',Updated=TO_TIMESTAMP('2010-02-15 13:05:20','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Element_ID=246 +; + +-- Feb 15, 2010 1:05:20 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=246 +; + +-- Feb 15, 2010 1:05:20 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Reference SET Description='10 Digit numeric', EntityType='D', Help=NULL, IsActive='Y', Name='Integer', ValidationType='D',Updated=TO_TIMESTAMP('2010-02-15 13:05:20','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Reference_ID=11 +; + +-- Feb 15, 2010 1:05:20 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Reference_Trl SET IsTranslated='N' WHERE AD_Reference_ID=11 +; + +-- Feb 15, 2010 1:05:21 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,58981,246,0,11,53260,'CreatedBy',TO_TIMESTAMP('2010-02-15 13:05:20','YYYY-MM-DD HH24:MI:SS'),0,'User who created this records','EE01',14,'The Created By field indicates the user who created this record.','Y','N','N','N','N','Y','N','N','Y','N','N','Created By',TO_TIMESTAMP('2010-02-15 13:05:20','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:05:21 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=58981 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:05:21 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD COLUMN CreatedBy NUMERIC(10) NOT NULL +; + +-- Feb 15, 2010 1:05:21 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element SET ColumnName='IsActive', Description='The record is active in the system', EntityType='D', Help='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 reports. +There are two reasons for de-activating and not deleting records: +(1) The system requires the record for audit purposes. +(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.', IsActive='Y', Name='Active', PO_Description=NULL, PO_Help=NULL, PO_Name=NULL, PO_PrintName=NULL, PrintName='Active',Updated=TO_TIMESTAMP('2010-02-15 13:05:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Element_ID=348 +; + +-- Feb 15, 2010 1:05:21 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=348 +; + +-- Feb 15, 2010 1:05:22 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Reference SET Description='CheckBox', EntityType='D', Help=NULL, IsActive='Y', Name='Yes-No', ValidationType='D',Updated=TO_TIMESTAMP('2010-02-15 13:05:22','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Reference_ID=20 +; + +-- Feb 15, 2010 1:05:22 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Reference_Trl SET IsTranslated='N' WHERE AD_Reference_ID=20 +; + +-- Feb 15, 2010 1:05:22 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,58982,348,0,20,53260,'IsActive',TO_TIMESTAMP('2010-02-15 13:05:22','YYYY-MM-DD HH24:MI:SS'),0,'Y','The record is active in the system','EE01',1,'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 reports. +There are two reasons for de-activating and not deleting records: +(1) The system requires the record for audit purposes. +(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.','Y','N','N','N','N','Y','N','N','Y','N','Y','Active',TO_TIMESTAMP('2010-02-15 13:05:22','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:05:22 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=58982 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:05:22 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD COLUMN IsActive CHAR(1) DEFAULT 'Y' CHECK (IsActive IN ('Y','N')) NOT NULL +; + +-- Feb 15, 2010 1:05:23 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element SET ColumnName='Updated', Description='Date this record was updated', EntityType='D', Help='The Updated field indicates the date that this record was updated.', IsActive='Y', Name='Updated', PO_Description=NULL, PO_Help=NULL, PO_Name=NULL, PO_PrintName=NULL, PrintName='Updated',Updated=TO_TIMESTAMP('2010-02-15 13:05:23','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Element_ID=607 +; + +-- Feb 15, 2010 1:05:23 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=607 +; + +-- Feb 15, 2010 1:05:24 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,58983,607,0,16,53260,'Updated',TO_TIMESTAMP('2010-02-15 13:05:23','YYYY-MM-DD HH24:MI:SS'),0,'Date this record was updated','EE01',7,'The Updated field indicates the date that this record was updated.','Y','N','N','N','N','Y','N','N','Y','N','N','Updated',TO_TIMESTAMP('2010-02-15 13:05:23','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:05:24 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=58983 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:05:24 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD COLUMN Updated TIMESTAMP NOT NULL +; + +-- Feb 15, 2010 1:05:24 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element SET ColumnName='UpdatedBy', Description='User who updated this records', EntityType='D', Help='The Updated By field indicates the user who updated this record.', IsActive='Y', Name='Updated By', PO_Description=NULL, PO_Help=NULL, PO_Name=NULL, PO_PrintName=NULL, PrintName='Updated By',Updated=TO_TIMESTAMP('2010-02-15 13:05:24','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Element_ID=608 +; + +-- Feb 15, 2010 1:05:24 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=608 +; + +-- Feb 15, 2010 1:05:25 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,58984,608,0,11,53260,'UpdatedBy',TO_TIMESTAMP('2010-02-15 13:05:24','YYYY-MM-DD HH24:MI:SS'),0,'User who updated this records','EE01',14,'The Updated By field indicates the user who updated this record.','Y','N','N','N','N','Y','N','N','Y','N','N','Updated By',TO_TIMESTAMP('2010-02-15 13:05:24','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:05:25 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=58984 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:05:25 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD COLUMN UpdatedBy NUMERIC(10) NOT NULL +; + +-- Feb 15, 2010 1:05:25 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element SET ColumnName='BPartner_Value', Description='The Key of the Business Partner', EntityType='D', Help=NULL, IsActive='Y', Name='Business Partner Key', PO_Description=NULL, PO_Help=NULL, PO_Name=NULL, PO_PrintName=NULL, PrintName='Partner Key',Updated=TO_TIMESTAMP('2010-02-15 13:05:25','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Element_ID=1906 +; + +-- Feb 15, 2010 1:05:25 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=1906 +; + +-- Feb 15, 2010 1:05:25 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Reference SET Description='Character String', EntityType='D', Help=NULL, IsActive='Y', Name='String', ValidationType='D',Updated=TO_TIMESTAMP('2010-02-15 13:05:25','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Reference_ID=10 +; + +-- Feb 15, 2010 1:05:25 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Reference_Trl SET IsTranslated='N' WHERE AD_Reference_ID=10 +; + +-- Feb 15, 2010 1:05:26 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,58985,1906,0,10,53260,'BPartner_Value',TO_TIMESTAMP('2010-02-15 13:05:25','YYYY-MM-DD HH24:MI:SS'),0,'The Key of the Business Partner','EE01',40,'Y','N','N','N','N','N','N','N','Y','N','Y','Business Partner Key',TO_TIMESTAMP('2010-02-15 13:05:25','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:05:26 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=58985 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:05:26 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD COLUMN BPartner_Value VARCHAR(40) DEFAULT NULL +; + +-- Feb 15, 2010 1:05:26 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element SET ColumnName='C_BPartner_ID', Description='Identifies a Business Partner', EntityType='D', Help='A Business Partner is anyone with whom you transact. This can include Vendor, Customer, Employee or Salesperson', IsActive='Y', Name='Business Partner ', PO_Description=NULL, PO_Help=NULL, PO_Name=NULL, PO_PrintName=NULL, PrintName='Business Partner ',Updated=TO_TIMESTAMP('2010-02-15 13:05:26','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Element_ID=187 +; + +-- Feb 15, 2010 1:05:26 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=187 +; + +-- Feb 15, 2010 1:05:26 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Reference SET Description='Search Field', EntityType='D', Help=NULL, IsActive='Y', Name='Search', ValidationType='D',Updated=TO_TIMESTAMP('2010-02-15 13:05:26','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Reference_ID=30 +; + +-- Feb 15, 2010 1:05:26 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Reference_Trl SET IsTranslated='N' WHERE AD_Reference_ID=30 +; + +-- Feb 15, 2010 1:05:27 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,58986,187,0,30,53260,'C_BPartner_ID',TO_TIMESTAMP('2010-02-15 13:05:26','YYYY-MM-DD HH24:MI:SS'),0,'Identifies a Business Partner','EE01',22,'A Business Partner is anyone with whom you transact. This can include Vendor, Customer, Employee or Salesperson','Y','N','N','N','N','N','N','N','Y','N','Y','Business Partner ',TO_TIMESTAMP('2010-02-15 13:05:26','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:05:27 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=58986 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:05:27 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD COLUMN C_BPartner_ID NUMERIC(10) DEFAULT NULL +; + +-- Feb 15, 2010 1:05:27 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element SET ColumnName='I_ErrorMsg', Description='Messages generated from import process', EntityType='D', Help='The Import Error Message displays any error messages generated during the import process.', IsActive='Y', Name='Import Error Message', PO_Description=NULL, PO_Help=NULL, PO_Name=NULL, PO_PrintName=NULL, PrintName='Import Error Message',Updated=TO_TIMESTAMP('2010-02-15 13:05:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Element_ID=912 +; + +-- Feb 15, 2010 1:05:27 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=912 +; + +-- Feb 15, 2010 1:05:28 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,58987,912,0,10,53260,'I_ErrorMsg',TO_TIMESTAMP('2010-02-15 13:05:27','YYYY-MM-DD HH24:MI:SS'),0,'Messages generated from import process','EE01',2000,'The Import Error Message displays any error messages generated during the import process.','Y','N','N','N','N','N','N','N','Y','N','Y','Import Error Message',TO_TIMESTAMP('2010-02-15 13:05:27','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:05:28 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=58987 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:05:29 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD COLUMN I_ErrorMsg VARCHAR(2000) DEFAULT NULL +; + +-- Feb 15, 2010 1:05:29 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element SET ColumnName='I_IsImported', Description='Has this import been processed', EntityType='D', Help='The Imported check box indicates if this import has been processed.', IsActive='Y', Name='Imported', PO_Description=NULL, PO_Help=NULL, PO_Name=NULL, PO_PrintName=NULL, PrintName='Imported',Updated=TO_TIMESTAMP('2010-02-15 13:05:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Element_ID=913 +; + +-- Feb 15, 2010 1:05:29 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=913 +; + +-- Feb 15, 2010 1:05:30 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,58988,913,0,20,53260,'I_IsImported',TO_TIMESTAMP('2010-02-15 13:05:29','YYYY-MM-DD HH24:MI:SS'),0,'Has this import been processed','EE01',1,'The Imported check box indicates if this import has been processed.','Y','N','N','N','N','Y','N','N','Y','N','Y','Imported',TO_TIMESTAMP('2010-02-15 13:05:29','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:05:30 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=58988 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:05:30 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD COLUMN I_IsImported CHAR(1) CHECK (I_IsImported IN ('Y','N')) NOT NULL +; + +-- Feb 15, 2010 1:05:30 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element SET ColumnName='Processed', Description='The document has been processed', EntityType='D', Help='The Processed checkbox indicates that a document has been processed.', IsActive='Y', Name='Processed', PO_Description=NULL, PO_Help=NULL, PO_Name=NULL, PO_PrintName=NULL, PrintName='Processed',Updated=TO_TIMESTAMP('2010-02-15 13:05:30','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Element_ID=1047 +; + +-- Feb 15, 2010 1:05:30 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=1047 +; + +-- Feb 15, 2010 1:05:30 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,58989,1047,0,20,53260,'Processed',TO_TIMESTAMP('2010-02-15 13:05:30','YYYY-MM-DD HH24:MI:SS'),0,'The document has been processed','EE01',1,'The Processed checkbox indicates that a document has been processed.','Y','N','N','N','N','N','N','N','Y','N','N','Processed',TO_TIMESTAMP('2010-02-15 13:05:30','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:05:30 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=58989 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:05:31 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD COLUMN Processed CHAR(1) DEFAULT NULL CHECK (Processed IN ('Y','N')) +; + +-- Feb 15, 2010 1:05:31 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element SET ColumnName='Processing', Description=NULL, EntityType='D', Help=NULL, IsActive='Y', Name='Process Now', PO_Description=NULL, PO_Help=NULL, PO_Name=NULL, PO_PrintName=NULL, PrintName='Process Now',Updated=TO_TIMESTAMP('2010-02-15 13:05:31','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Element_ID=524 +; + +-- Feb 15, 2010 1:05:31 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=524 +; + +-- Feb 15, 2010 1:05:31 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Reference SET Description='Command Button - starts a process', EntityType='D', Help=NULL, IsActive='Y', Name='Button', ValidationType='D',Updated=TO_TIMESTAMP('2010-02-15 13:05:31','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Reference_ID=28 +; + +-- Feb 15, 2010 1:05:31 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Reference_Trl SET IsTranslated='N' WHERE AD_Reference_ID=28 +; + +-- Feb 15, 2010 1:05:32 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Process (AD_Client_ID,AD_Org_ID,AD_Process_ID,AccessLevel,Classname,Created,CreatedBy,Description,EntityType,Help,IsActive,IsBetaFunctionality,IsDirectPrint,IsReport,Name,ShowHelp,Statistic_Count,Statistic_Seconds,Updated,UpdatedBy,Value,WorkflowValue) VALUES (0,0,53200,'3','org.eevolution.process.ImportProductPlanning',TO_TIMESTAMP('2010-02-15 13:05:31','YYYY-MM-DD HH24:MI:SS'),0,'Import Product Planning and Forecast','EE01','Import and update product planning data and forecast','Y','N','N','N','Import Product Planning and Forecast','Y',0,0,TO_TIMESTAMP('2010-02-15 13:05:31','YYYY-MM-DD HH24:MI:SS'),0,'Import_ProductPlanning',NULL) +; + +-- Feb 15, 2010 1:05:32 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Process_Trl (AD_Language,AD_Process_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Process_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Process t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Process_ID=53200 AND NOT EXISTS (SELECT * FROM AD_Process_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Process_ID=t.AD_Process_ID) +; + +-- Feb 15, 2010 1:05:33 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Process_Para (AD_Client_ID,AD_Element_ID,AD_Org_ID,AD_Process_ID,AD_Process_Para_ID,AD_Reference_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,IsActive,IsCentrallyMaintained,IsMandatory,IsRange,Name,SeqNo,Updated,UpdatedBy) VALUES (0,1922,0,53200,53402,20,'DeleteOldImported',TO_TIMESTAMP('2010-02-15 13:05:32','YYYY-MM-DD HH24:MI:SS'),0,'Before processing delete old imported records in the import table','EE01',0,'Y','Y','N','N','Delete old imported records',30,TO_TIMESTAMP('2010-02-15 13:05:32','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:05:33 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Process_Para_Trl (AD_Language,AD_Process_Para_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Process_Para_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Process_Para t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Process_Para_ID=53402 AND NOT EXISTS (SELECT * FROM AD_Process_Para_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Process_Para_ID=t.AD_Process_Para_ID) +; + +-- Feb 15, 2010 1:05:34 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Process_Para (AD_Client_ID,AD_Element_ID,AD_Org_ID,AD_Process_ID,AD_Process_Para_ID,AD_Reference_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,IsActive,IsCentrallyMaintained,IsMandatory,IsRange,Name,SeqNo,Updated,UpdatedBy) VALUES (0,2169,0,53200,53403,20,'IsImportOnlyNoErrors',TO_TIMESTAMP('2010-02-15 13:05:33','YYYY-MM-DD HH24:MI:SS'),0,'Y','Only start the import, if there are no validation Errors','EE01',0,'Y','Y','N','N','Import only if No Errors',60,TO_TIMESTAMP('2010-02-15 13:05:33','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:05:34 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Process_Para_Trl (AD_Language,AD_Process_Para_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Process_Para_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Process_Para t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Process_Para_ID=53403 AND NOT EXISTS (SELECT * FROM AD_Process_Para_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Process_Para_ID=t.AD_Process_Para_ID) +; + +-- Feb 15, 2010 1:05:35 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Process_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,58990,524,0,53200,28,53260,'Processing',TO_TIMESTAMP('2010-02-15 13:05:34','YYYY-MM-DD HH24:MI:SS'),0,'EE01',1,'Y','N','N','N','N','N','N','N','Y','N','Y','Process Now',TO_TIMESTAMP('2010-02-15 13:05:34','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:05:35 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=58990 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:05:35 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD COLUMN Processing CHAR(1) DEFAULT NULL +; + +-- Feb 15, 2010 1:05:35 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element SET ColumnName='AD_Workflow_ID', Description='Workflow or combination of tasks', EntityType='D', Help='The Workflow field identifies a unique Workflow in the system.', IsActive='Y', Name='Workflow', PO_Description=NULL, PO_Help=NULL, PO_Name=NULL, PO_PrintName=NULL, PrintName='Workflow',Updated=TO_TIMESTAMP('2010-02-15 13:05:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Element_ID=144 +; + +-- Feb 15, 2010 1:05:35 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=144 +; + +-- Feb 15, 2010 1:05:35 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Reference SET Description='Table List', EntityType='D', Help=NULL, IsActive='Y', Name='Table', ValidationType='D',Updated=TO_TIMESTAMP('2010-02-15 13:05:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Reference_ID=18 +; + +-- Feb 15, 2010 1:05:35 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Reference_Trl SET IsTranslated='N' WHERE AD_Reference_ID=18 +; + +-- Feb 15, 2010 1:05:36 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Val_Rule SET Code='WorkflowType=''M''', Description=NULL, EntityType='EE01', IsActive='Y', Name='AD_Workflow Manufacturing', Type='S',Updated=TO_TIMESTAMP('2010-02-15 13:05:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Val_Rule_ID=52003 +; + +-- Feb 15, 2010 1:05:40 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,AD_Val_Rule_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,58991,144,0,18,53260,52003,'AD_Workflow_ID',TO_TIMESTAMP('2010-02-15 13:05:36','YYYY-MM-DD HH24:MI:SS'),0,'Workflow or combination of tasks','EE01',22,'The Workflow field identifies a unique Workflow in the system.','Y','N','N','N','N','N','N','N','Y','N','Y','Workflow',TO_TIMESTAMP('2010-02-15 13:05:36','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:05:40 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=58991 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:05:40 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD COLUMN AD_Workflow_ID NUMERIC(10) DEFAULT NULL +; + +-- Feb 15, 2010 1:05:40 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element SET ColumnName='DD_NetworkDistribution_ID', Description=NULL, EntityType='EE01', Help=NULL, IsActive='Y', Name='Network Distribution', PO_Description=NULL, PO_Help=NULL, PO_Name=NULL, PO_PrintName=NULL, PrintName='Network Distribution',Updated=TO_TIMESTAMP('2010-02-15 13:05:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Element_ID=53340 +; + +-- Feb 15, 2010 1:05:40 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=53340 +; + +-- Feb 15, 2010 1:05:41 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,58992,53340,0,18,53260,'DD_NetworkDistribution_ID',TO_TIMESTAMP('2010-02-15 13:05:40','YYYY-MM-DD HH24:MI:SS'),0,'EE01',22,'Y','N','N','N','N','N','N','N','Y','N','Y','Network Distribution',TO_TIMESTAMP('2010-02-15 13:05:40','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:05:41 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=58992 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:05:41 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD COLUMN DD_NetworkDistribution_ID NUMERIC(10) DEFAULT NULL +; + +-- Feb 15, 2010 1:05:41 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element SET ColumnName='DeliveryTime_Promised', Description='Promised days between order and delivery', EntityType='D', Help='The Promised Delivery Time indicates the number of days between the order date and the date that delivery was promised.', IsActive='Y', Name='Promised Delivery Time', PO_Description=NULL, PO_Help=NULL, PO_Name=NULL, PO_PrintName=NULL, PrintName='Promised Delivery Time',Updated=TO_TIMESTAMP('2010-02-15 13:05:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Element_ID=1256 +; + +-- Feb 15, 2010 1:05:41 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=1256 +; + +-- Feb 15, 2010 1:05:41 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Reference SET Description='Quantity data type', EntityType='D', Help=NULL, IsActive='Y', Name='Quantity', ValidationType='D',Updated=TO_TIMESTAMP('2010-02-15 13:05:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Reference_ID=29 +; + +-- Feb 15, 2010 1:05:41 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Reference_Trl SET IsTranslated='N' WHERE AD_Reference_ID=29 +; + +-- Feb 15, 2010 1:05:42 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,58993,1256,0,29,53260,'DeliveryTime_Promised',TO_TIMESTAMP('2010-02-15 13:05:41','YYYY-MM-DD HH24:MI:SS'),0,'Promised days between order and delivery','EE01',10,'The Promised Delivery Time indicates the number of days between the order date and the date that delivery was promised.','Y','N','N','N','N','N','N','N','Y','N','Y','Promised Delivery Time',TO_TIMESTAMP('2010-02-15 13:05:41','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:05:42 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=58993 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:05:42 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD COLUMN DeliveryTime_Promised NUMERIC DEFAULT NULL +; + +-- Feb 15, 2010 1:05:42 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element SET ColumnName='IsCreatePlan', Description='Indicates whether planned orders will be generated by MRP', EntityType='EE01', Help='Indicates whether planned orders will be generated by MRP, if this flag is not just MRP generate a ''Create'' action notice', IsActive='Y', Name='Create Plan', PO_Description=NULL, PO_Help=NULL, PO_Name=NULL, PO_PrintName=NULL, PrintName='Create Plan',Updated=TO_TIMESTAMP('2010-02-15 13:05:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Element_ID=53258 +; + +-- Feb 15, 2010 1:05:42 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=53258 +; + +-- Feb 15, 2010 1:05:43 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,58994,53258,0,20,53260,'IsCreatePlan',TO_TIMESTAMP('2010-02-15 13:05:42','YYYY-MM-DD HH24:MI:SS'),0,'Indicates whether planned orders will be generated by MRP','EE01',1,'Indicates whether planned orders will be generated by MRP, if this flag is not just MRP generate a ''Create'' action notice','Y','N','N','N','N','Y','N','N','Y','N','Y','Create Plan',TO_TIMESTAMP('2010-02-15 13:05:42','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:05:43 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=58994 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:05:43 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD COLUMN IsCreatePlan CHAR(1) CHECK (IsCreatePlan IN ('Y','N')) NOT NULL +; + +-- Feb 15, 2010 1:05:43 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element SET ColumnName='IsMPS', Description=NULL, EntityType='EE01', Help=NULL, IsActive='Y', Name='Is MPS', PO_Description=NULL, PO_Help=NULL, PO_Name=NULL, PO_PrintName=NULL, PrintName='Is MPS',Updated=TO_TIMESTAMP('2010-02-15 13:05:43','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Element_ID=53261 +; + +-- Feb 15, 2010 1:05:43 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=53261 +; + +-- Feb 15, 2010 1:05:48 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,58995,53261,0,20,53260,'IsMPS',TO_TIMESTAMP('2010-02-15 13:05:43','YYYY-MM-DD HH24:MI:SS'),0,'EE01',1,'Y','N','N','N','N','N','N','N','Y','N','Y','Is MPS',TO_TIMESTAMP('2010-02-15 13:05:43','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:05:48 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=58995 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:05:48 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD COLUMN IsMPS CHAR(1) DEFAULT NULL CHECK (IsMPS IN ('Y','N')) +; + +-- Feb 15, 2010 1:05:49 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element SET ColumnName='IsPhantom', Description='Phantom Component', EntityType='D', Help='Phantom Component are not stored and produced with the product. This is an option to avild maintaining an Engineering and Manufacturing Bill of Materials.', IsActive='Y', Name='Phantom', PO_Description=NULL, PO_Help=NULL, PO_Name=NULL, PO_PrintName=NULL, PrintName='Phantom',Updated=TO_TIMESTAMP('2010-02-15 13:05:49','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Element_ID=2788 +; + +-- Feb 15, 2010 1:05:49 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=2788 +; + +-- Feb 15, 2010 1:05:50 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,58996,2788,0,20,53260,'IsPhantom',TO_TIMESTAMP('2010-02-15 13:05:49','YYYY-MM-DD HH24:MI:SS'),0,'Phantom Component','EE01',1,'Phantom Component are not stored and produced with the product. This is an option to avild maintaining an Engineering and Manufacturing Bill of Materials.','Y','N','N','N','N','Y','N','N','Y','N','Y','Phantom',TO_TIMESTAMP('2010-02-15 13:05:49','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:05:50 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=58996 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:05:50 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD COLUMN IsPhantom CHAR(1) CHECK (IsPhantom IN ('Y','N')) NOT NULL +; + +-- Feb 15, 2010 1:05:50 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element SET ColumnName='M_Product_ID', Description='Product, Service, Item', EntityType='D', Help='Identifies an item which is either purchased or sold in this organization.', IsActive='Y', Name='Product', PO_Description=NULL, PO_Help=NULL, PO_Name=NULL, PO_PrintName=NULL, PrintName='Product',Updated=TO_TIMESTAMP('2010-02-15 13:05:50','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Element_ID=454 +; + +-- Feb 15, 2010 1:05:50 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=454 +; + +-- Feb 15, 2010 1:05:51 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,58997,454,0,30,53260,'M_Product_ID',TO_TIMESTAMP('2010-02-15 13:05:50','YYYY-MM-DD HH24:MI:SS'),0,'Product, Service, Item','EE01',22,'Identifies an item which is either purchased or sold in this organization.','Y','N','N','N','N','N','N','N','Y','N','Y','Product',TO_TIMESTAMP('2010-02-15 13:05:50','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:05:51 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=58997 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:05:51 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD COLUMN M_Product_ID NUMERIC(10) DEFAULT NULL +; + +-- Feb 15, 2010 1:05:51 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element SET ColumnName='M_Warehouse_ID', Description='Storage Warehouse and Service Point', EntityType='D', Help='The Warehouse identifies a unique Warehouse where products are stored or Services are provided.', IsActive='Y', Name='Warehouse', PO_Description=NULL, PO_Help=NULL, PO_Name=NULL, PO_PrintName=NULL, PrintName='Warehouse',Updated=TO_TIMESTAMP('2010-02-15 13:05:51','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Element_ID=459 +; + +-- Feb 15, 2010 1:05:51 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=459 +; + +-- Feb 15, 2010 1:05:52 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,58998,459,0,19,53260,'M_Warehouse_ID',TO_TIMESTAMP('2010-02-15 13:05:51','YYYY-MM-DD HH24:MI:SS'),0,'-1','Storage Warehouse and Service Point','EE01',22,'The Warehouse identifies a unique Warehouse where products are stored or Services are provided.','Y','N','N','N','N','N','N','N','Y','N','Y','Warehouse',TO_TIMESTAMP('2010-02-15 13:05:51','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:05:52 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=58998 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:05:52 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD COLUMN M_Warehouse_ID NUMERIC(10) DEFAULT NULL +; + +-- Feb 15, 2010 1:05:53 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element SET ColumnName='Order_Max', Description='Maximum order quantity in UOM', EntityType='EE01', Help='The Maximum Order Quantity indicates the biggest quantity of this product which can be ordered.', IsActive='Y', Name='Maximum Order Qty', PO_Description=NULL, PO_Help=NULL, PO_Name=NULL, PO_PrintName=NULL, PrintName='Maximum Order Qty',Updated=TO_TIMESTAMP('2010-02-15 13:05:53','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Element_ID=53264 +; + +-- Feb 15, 2010 1:05:53 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=53264 +; + +-- Feb 15, 2010 1:05:54 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,58999,53264,0,29,53260,'Order_Max',TO_TIMESTAMP('2010-02-15 13:05:53','YYYY-MM-DD HH24:MI:SS'),0,'Maximum order quantity in UOM','EE01',10,'The Maximum Order Quantity indicates the biggest quantity of this product which can be ordered.','Y','N','N','N','N','N','N','N','Y','N','Y','Maximum Order Qty',TO_TIMESTAMP('2010-02-15 13:05:53','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:05:54 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=58999 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:05:54 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD COLUMN Order_Max NUMERIC DEFAULT NULL +; + +-- Feb 15, 2010 1:05:54 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element SET ColumnName='Order_Min', Description='Minimum order quantity in UOM', EntityType='D', Help='The Minimum Order Quantity indicates the smallest quantity of this product which can be ordered.', IsActive='Y', Name='Minimum Order Qty', PO_Description=NULL, PO_Help=NULL, PO_Name=NULL, PO_PrintName=NULL, PrintName='Minimum Order Qty',Updated=TO_TIMESTAMP('2010-02-15 13:05:54','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Element_ID=942 +; + +-- Feb 15, 2010 1:05:54 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=942 +; + +-- Feb 15, 2010 1:05:55 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,59000,942,0,29,53260,'Order_Min',TO_TIMESTAMP('2010-02-15 13:05:54','YYYY-MM-DD HH24:MI:SS'),0,'Minimum order quantity in UOM','EE01',14,'The Minimum Order Quantity indicates the smallest quantity of this product which can be ordered.','Y','N','N','N','N','N','N','N','Y','N','Y','Minimum Order Qty',TO_TIMESTAMP('2010-02-15 13:05:54','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:05:55 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59000 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:05:55 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD COLUMN Order_Min NUMERIC DEFAULT NULL +; + +-- Feb 15, 2010 1:05:55 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element SET ColumnName='Order_Pack', Description='Package order size in UOM (e.g. order set of 5 units)', EntityType='D', Help='The Order Pack Quantity indicates the number of units in each pack of this product.', IsActive='Y', Name='Order Pack Qty', PO_Description=NULL, PO_Help=NULL, PO_Name=NULL, PO_PrintName=NULL, PrintName='Order Pack Qty',Updated=TO_TIMESTAMP('2010-02-15 13:05:55','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Element_ID=943 +; + +-- Feb 15, 2010 1:05:55 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=943 +; + +-- Feb 15, 2010 1:05:56 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,59001,943,0,29,53260,'Order_Pack',TO_TIMESTAMP('2010-02-15 13:05:55','YYYY-MM-DD HH24:MI:SS'),0,'Package order size in UOM (e.g. order set of 5 units)','EE01',14,'The Order Pack Quantity indicates the number of units in each pack of this product.','Y','N','N','N','N','N','N','N','Y','N','Y','Order Pack Qty',TO_TIMESTAMP('2010-02-15 13:05:55','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:05:56 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59001 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:05:56 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD COLUMN Order_Pack NUMERIC DEFAULT NULL +; + +-- Feb 15, 2010 1:05:56 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element SET ColumnName='Order_Period', Description=NULL, EntityType='EE01', Help=NULL, IsActive='Y', Name='Order Period', PO_Description=NULL, PO_Help=NULL, PO_Name=NULL, PO_PrintName=NULL, PrintName='Order Period',Updated=TO_TIMESTAMP('2010-02-15 13:05:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Element_ID=53265 +; + +-- Feb 15, 2010 1:05:56 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=53265 +; + +-- Feb 15, 2010 1:05:57 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,59002,53265,0,29,53260,'Order_Period',TO_TIMESTAMP('2010-02-15 13:05:56','YYYY-MM-DD HH24:MI:SS'),0,'EE01',22,'Y','N','N','N','N','N','N','N','Y','N','Y','Order Period',TO_TIMESTAMP('2010-02-15 13:05:56','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:05:57 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59002 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:05:57 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD COLUMN Order_Period NUMERIC DEFAULT NULL +; + +-- Feb 15, 2010 1:05:57 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element SET ColumnName='Order_Policy', Description=NULL, EntityType='EE01', Help=NULL, IsActive='Y', Name='Order Policy', PO_Description=NULL, PO_Help=NULL, PO_Name=NULL, PO_PrintName=NULL, PrintName='Order Policy',Updated=TO_TIMESTAMP('2010-02-15 13:05:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Element_ID=53266 +; + +-- Feb 15, 2010 1:05:57 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=53266 +; + +-- Feb 15, 2010 1:05:57 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Reference SET Description='Reference List', EntityType='D', Help=NULL, IsActive='Y', Name='List', ValidationType='D',Updated=TO_TIMESTAMP('2010-02-15 13:05:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Reference_ID=17 +; + +-- Feb 15, 2010 1:05:57 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Reference_Trl SET IsTranslated='N' WHERE AD_Reference_ID=17 +; + +-- Feb 15, 2010 1:05:57 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Reference SET Description=NULL, EntityType='EE01', Help=NULL, IsActive='Y', Name='PP_Product_Planning Order Policy', ValidationType='L',Updated=TO_TIMESTAMP('2010-02-15 13:05:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Reference_ID=53228 +; + +-- Feb 15, 2010 1:05:57 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Reference_Trl SET IsTranslated='N' WHERE AD_Reference_ID=53228 +; + +-- Feb 15, 2010 1:05:57 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Ref_List SET AD_Reference_ID=53228, Description=NULL, EntityType='EE01', IsActive='Y', Name='Fixed Order Quantity', Value='FOQ',Updated=TO_TIMESTAMP('2010-02-15 13:05:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Ref_List_ID=53272 +; + +-- Feb 15, 2010 1:05:57 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Ref_List_Trl SET IsTranslated='N' WHERE AD_Ref_List_ID=53272 +; + +-- Feb 15, 2010 1:05:58 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Ref_List SET AD_Reference_ID=53228, Description=NULL, EntityType='EE01', IsActive='Y', Name='Lot-for-Lot', Value='LFL',Updated=TO_TIMESTAMP('2010-02-15 13:05:57','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Ref_List_ID=53273 +; + +-- Feb 15, 2010 1:05:58 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Ref_List_Trl SET IsTranslated='N' WHERE AD_Ref_List_ID=53273 +; + +-- Feb 15, 2010 1:05:58 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Ref_List SET AD_Reference_ID=53228, Description=NULL, EntityType='EE01', IsActive='Y', Name='Period Order Quantity', Value='POQ',Updated=TO_TIMESTAMP('2010-02-15 13:05:58','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Ref_List_ID=53274 +; + +-- Feb 15, 2010 1:05:58 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Ref_List_Trl SET IsTranslated='N' WHERE AD_Ref_List_ID=53274 +; + +-- Feb 15, 2010 1:05:58 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,59003,53266,0,17,53228,53260,'Order_Policy',TO_TIMESTAMP('2010-02-15 13:05:58','YYYY-MM-DD HH24:MI:SS'),0,'EE01',3,'Y','N','N','N','N','N','N','N','Y','N','Y','Order Policy',TO_TIMESTAMP('2010-02-15 13:05:58','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:05:58 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59003 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:05:58 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD COLUMN Order_Policy VARCHAR(3) DEFAULT NULL +; + +-- Feb 15, 2010 1:05:59 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element SET ColumnName='Order_Qty', Description=NULL, EntityType='EE01', Help=NULL, IsActive='Y', Name='Order Qty', PO_Description=NULL, PO_Help=NULL, PO_Name=NULL, PO_PrintName=NULL, PrintName='Order Qty',Updated=TO_TIMESTAMP('2010-02-15 13:05:59','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Element_ID=53267 +; + +-- Feb 15, 2010 1:05:59 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=53267 +; + +-- Feb 15, 2010 1:05:59 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,59004,53267,0,29,53260,'Order_Qty',TO_TIMESTAMP('2010-02-15 13:05:59','YYYY-MM-DD HH24:MI:SS'),0,'EE01',22,'Y','N','N','N','N','N','N','N','Y','N','Y','Order Qty',TO_TIMESTAMP('2010-02-15 13:05:59','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:05:59 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59004 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:05:59 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD COLUMN Order_Qty NUMERIC DEFAULT NULL +; + +-- Feb 15, 2010 1:06:00 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element SET ColumnName='Planner_ID', Description=NULL, EntityType='EE01', Help=NULL, IsActive='Y', Name='Planner', PO_Description=NULL, PO_Help=NULL, PO_Name=NULL, PO_PrintName=NULL, PrintName='Planner',Updated=TO_TIMESTAMP('2010-02-15 13:06:00','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Element_ID=53269 +; + +-- Feb 15, 2010 1:06:00 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=53269 +; + +-- Feb 15, 2010 1:06:00 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Reference SET Description='User selection', EntityType='D', Help=NULL, IsActive='Y', Name='AD_User', ValidationType='T',Updated=TO_TIMESTAMP('2010-02-15 13:06:00','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Reference_ID=110 +; + +-- Feb 15, 2010 1:06:00 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Reference_Trl SET IsTranslated='N' WHERE AD_Reference_ID=110 +; + +-- Feb 15, 2010 1:06:00 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Ref_Table SET AD_Table_ID = 114, AD_Display = 213, AD_Key = 212, isValueDisplayed = 'N', OrderByClause = 'AD_User.Name', EntityType ='D', WhereClause = '' WHERE AD_Reference_ID = 110 +; + +-- Feb 15, 2010 1:06:01 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,AD_Val_Rule_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,59005,53269,0,18,110,53260,164,'Planner_ID',TO_TIMESTAMP('2010-02-15 13:06:00','YYYY-MM-DD HH24:MI:SS'),0,'EE01',22,'Y','N','N','N','N','N','N','N','Y','N','Y','Planner',TO_TIMESTAMP('2010-02-15 13:06:00','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:06:01 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59005 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:06:01 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD COLUMN Planner_ID NUMERIC(10) DEFAULT NULL +; + +-- Feb 15, 2010 1:06:01 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element SET ColumnName='PP_Product_BOM_ID', Description='BOM & Formula', EntityType='EE01', Help=NULL, IsActive='Y', Name='BOM & Formula', PO_Description=NULL, PO_Help=NULL, PO_Name=NULL, PO_PrintName=NULL, PrintName='BOM & Formula',Updated=TO_TIMESTAMP('2010-02-15 13:06:01','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Element_ID=53245 +; + +-- Feb 15, 2010 1:06:01 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=53245 +; + +-- Feb 15, 2010 1:06:02 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,59006,53245,0,19,53260,'PP_Product_BOM_ID',TO_TIMESTAMP('2010-02-15 13:06:01','YYYY-MM-DD HH24:MI:SS'),0,'BOM & Formula','EE01',22,'Y','N','N','N','N','N','N','N','Y','N','Y','BOM & Formula',TO_TIMESTAMP('2010-02-15 13:06:01','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:06:02 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59006 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:06:02 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD COLUMN PP_Product_BOM_ID NUMERIC(10) DEFAULT NULL +; + +-- Feb 15, 2010 1:06:02 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element SET ColumnName='SafetyStock', Description='Safety stock is a term used to describe a level of stock that is maintained below the cycle stock to buffer against stock-outs', EntityType='EE01', Help='Safety stock is defined as extra units of inventory carried as protection against possible stockouts. It is held when an organization cannot accurately predict demand and/or lead time for the product. + +Rereference: +http://en.wikipedia.org/wiki/Safety_stock', IsActive='Y', Name='Safety Stock Qty', PO_Description=NULL, PO_Help=NULL, PO_Name=NULL, PO_PrintName=NULL, PrintName='Safety Stock Qty',Updated=TO_TIMESTAMP('2010-02-15 13:06:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Element_ID=53354 +; + +-- Feb 15, 2010 1:06:02 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=53354 +; + +-- Feb 15, 2010 1:06:03 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,59007,53354,0,29,53260,'SafetyStock',TO_TIMESTAMP('2010-02-15 13:06:03','YYYY-MM-DD HH24:MI:SS'),0,'Safety stock is a term used to describe a level of stock that is maintained below the cycle stock to buffer against stock-outs','EE01',22,'Safety stock is defined as extra units of inventory carried as protection against possible stockouts. It is held when an organization cannot accurately predict demand and/or lead time for the product. + +Rereference: +http://en.wikipedia.org/wiki/Safety_stock','Y','N','N','N','N','N','N','N','Y','N','Y','Safety Stock Qty',TO_TIMESTAMP('2010-02-15 13:06:03','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:06:03 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59007 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:06:03 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD COLUMN SafetyStock NUMERIC DEFAULT NULL +; + +-- Feb 15, 2010 1:06:03 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element SET ColumnName='S_Resource_ID', Description='Resource', EntityType='D', Help=NULL, IsActive='Y', Name='Resource', PO_Description=NULL, PO_Help=NULL, PO_Name=NULL, PO_PrintName=NULL, PrintName='Resource',Updated=TO_TIMESTAMP('2010-02-15 13:06:03','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Element_ID=1777 +; + +-- Feb 15, 2010 1:06:03 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=1777 +; + +-- Feb 15, 2010 1:06:04 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Reference SET Description='Manufacturing Resources', EntityType='EE01', Help=NULL, IsActive='Y', Name='S_Resource_Manufacturing', ValidationType='T',Updated=TO_TIMESTAMP('2010-02-15 13:06:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Reference_ID=53320 +; + +-- Feb 15, 2010 1:06:04 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Reference_Trl SET IsTranslated='N' WHERE AD_Reference_ID=53320 +; + +-- Feb 15, 2010 1:06:04 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Ref_Table SET AD_Table_ID = 487, AD_Display = 6853, AD_Key = 6862, isValueDisplayed = 'N', OrderByClause = '', EntityType ='EE01', WhereClause = '' WHERE AD_Reference_ID = 53320 +; + +-- Feb 15, 2010 1:06:04 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Val_Rule SET Code='IsManufacturingResource=''Y'' AND ManufacturingResourceType=''PT''', Description=NULL, EntityType='EE01', IsActive='Y', Name='S_Resource Plant', Type='S',Updated=TO_TIMESTAMP('2010-02-15 13:06:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Val_Rule_ID=52002 +; + +-- Feb 15, 2010 1:06:04 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Reference_Value_ID,AD_Table_ID,AD_Val_Rule_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,59008,1777,0,18,53320,53260,52002,'S_Resource_ID',TO_TIMESTAMP('2010-02-15 13:06:04','YYYY-MM-DD HH24:MI:SS'),0,'-1','Resource','EE01',22,'Y','N','N','N','N','N','N','N','Y','N','Y','Resource',TO_TIMESTAMP('2010-02-15 13:06:04','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:06:04 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59008 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:06:04 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD COLUMN S_Resource_ID NUMERIC(10) DEFAULT NULL +; + +-- Feb 15, 2010 1:06:05 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element SET ColumnName='TimeFence', Description=NULL, EntityType='EE01', Help=NULL, IsActive='Y', Name='Time Fence', PO_Description=NULL, PO_Help=NULL, PO_Name=NULL, PO_PrintName=NULL, PrintName='Time Fence',Updated=TO_TIMESTAMP('2010-02-15 13:06:05','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Element_ID=53270 +; + +-- Feb 15, 2010 1:06:05 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=53270 +; + +-- Feb 15, 2010 1:06:07 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,59009,53270,0,29,53260,'TimeFence',TO_TIMESTAMP('2010-02-15 13:06:05','YYYY-MM-DD HH24:MI:SS'),0,'EE01',22,'Y','N','N','N','N','N','N','N','Y','N','Y','Time Fence',TO_TIMESTAMP('2010-02-15 13:06:05','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:06:07 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59009 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:06:07 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD COLUMN TimeFence NUMERIC DEFAULT NULL +; + +-- Feb 15, 2010 1:06:07 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element SET ColumnName='TransfertTime', Description=NULL, EntityType='EE01', Help=NULL, IsActive='Y', Name='Transfert Time', PO_Description=NULL, PO_Help=NULL, PO_Name=NULL, PO_PrintName=NULL, PrintName='Transfert Time',Updated=TO_TIMESTAMP('2010-02-15 13:06:07','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Element_ID=53271 +; + +-- Feb 15, 2010 1:06:07 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=53271 +; + +-- Feb 15, 2010 1:06:08 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,59010,53271,0,29,53260,'TransfertTime',TO_TIMESTAMP('2010-02-15 13:06:07','YYYY-MM-DD HH24:MI:SS'),0,'EE01',10,'Y','N','N','N','N','N','N','N','Y','N','Y','Transfert Time',TO_TIMESTAMP('2010-02-15 13:06:07','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:06:08 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59010 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:06:08 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD COLUMN TransfertTime NUMERIC DEFAULT NULL +; + +-- Feb 15, 2010 1:06:08 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element SET ColumnName='WorkingTime', Description='Workflow Simulation Execution Time', EntityType='D', Help='Amount of time the performer of the activity needs to perform the task in Duration Unit', IsActive='Y', Name='Working Time', PO_Description=NULL, PO_Help=NULL, PO_Name=NULL, PO_PrintName=NULL, PrintName='Working Time',Updated=TO_TIMESTAMP('2010-02-15 13:06:08','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Element_ID=2333 +; + +-- Feb 15, 2010 1:06:08 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=2333 +; + +-- Feb 15, 2010 1:06:09 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,59011,2333,0,29,53260,'WorkingTime',TO_TIMESTAMP('2010-02-15 13:06:08','YYYY-MM-DD HH24:MI:SS'),0,'Workflow Simulation Execution Time','EE01',22,'Amount of time the performer of the activity needs to perform the task in Duration Unit','Y','N','N','N','N','N','N','N','Y','N','Y','Working Time',TO_TIMESTAMP('2010-02-15 13:06:08','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:06:09 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59011 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:06:09 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD COLUMN WorkingTime NUMERIC DEFAULT NULL +; + +-- Feb 15, 2010 1:06:09 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element SET ColumnName='Yield', Description='The Yield is the percentage of a lot that is expected to be of acceptable wuality may fall below 100 percent', EntityType='EE01', Help='ADempiere Calculate the total yield for a product from the yield for each activity when the process Workflow Cost Roll-Up is executed. + +The expected yield for an Activity can be expressed as: + +Yield = Acceptable Units at Activity End x 100 + +The Total manufacturing yield for a product is determined by multiplying the yied percentage for each activity. + +Manufacturing Yield = Yield % for Activity 10 x Yied % for Activity 20 , etc + +Take care when setting yield to anything but 100% particularly when yied is used for multiples activities + +', IsActive='Y', Name='Yield %', PO_Description=NULL, PO_Help=NULL, PO_Name=NULL, PO_PrintName=NULL, PrintName='Yield %',Updated=TO_TIMESTAMP('2010-02-15 13:06:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Element_ID=53272 +; + +-- Feb 15, 2010 1:06:09 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=53272 +; + +-- Feb 15, 2010 1:06:10 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,59012,53272,0,11,53260,'Yield',TO_TIMESTAMP('2010-02-15 13:06:09','YYYY-MM-DD HH24:MI:SS'),0,'The Yield is the percentage of a lot that is expected to be of acceptable wuality may fall below 100 percent','EE01',22,'ADempiere Calculate the total yield for a product from the yield for each activity when the process Workflow Cost Roll-Up is executed. + +The expected yield for an Activity can be expressed as: + +Yield = Acceptable Units at Activity End x 100 + +The Total manufacturing yield for a product is determined by multiplying the yied percentage for each activity. + +Manufacturing Yield = Yield % for Activity 10 x Yied % for Activity 20 , etc + +Take care when setting yield to anything but 100% particularly when yied is used for multiples activities + +','Y','N','N','N','N','N','N','N','Y','N','Y','Yield %',TO_TIMESTAMP('2010-02-15 13:06:09','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:06:10 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59012 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:06:10 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD COLUMN Yield NUMERIC(10) DEFAULT NULL +; + +-- Feb 15, 2010 1:06:10 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element SET ColumnName='DatePromised', Description='Date Order was promised', EntityType='D', Help='The Date Promised indicates the date, if any, that an Order was promised for.', IsActive='Y', Name='Date Promised', PO_Description=NULL, PO_Help=NULL, PO_Name=NULL, PO_PrintName=NULL, PrintName='Date Promised',Updated=TO_TIMESTAMP('2010-02-15 13:06:10','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Element_ID=269 +; + +-- Feb 15, 2010 1:06:10 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=269 +; + +-- Feb 15, 2010 1:06:10 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Reference SET Description='Date mm/dd/yyyy', EntityType='D', Help=NULL, IsActive='Y', Name='Date', ValidationType='D',Updated=TO_TIMESTAMP('2010-02-15 13:06:10','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Reference_ID=15 +; + +-- Feb 15, 2010 1:06:10 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Reference_Trl SET IsTranslated='N' WHERE AD_Reference_ID=15 +; + +-- Feb 15, 2010 1:06:11 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,59013,269,0,15,53260,'DatePromised',TO_TIMESTAMP('2010-02-15 13:06:10','YYYY-MM-DD HH24:MI:SS'),0,'Date Order was promised','EE01',7,'The Date Promised indicates the date, if any, that an Order was promised for.','Y','N','N','N','N','N','N','N','Y','N','Y','Date Promised',TO_TIMESTAMP('2010-02-15 13:06:10','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:06:11 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59013 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:06:11 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD COLUMN DatePromised TIMESTAMP DEFAULT NULL +; + +-- Feb 15, 2010 1:06:11 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element SET ColumnName='M_Forecast_ID', Description='Material Forecast', EntityType='D', Help='Material Forecast', IsActive='Y', Name='Forecast', PO_Description=NULL, PO_Help=NULL, PO_Name=NULL, PO_PrintName=NULL, PrintName='Forecast',Updated=TO_TIMESTAMP('2010-02-15 13:06:11','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Element_ID=2498 +; + +-- Feb 15, 2010 1:06:11 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=2498 +; + +-- Feb 15, 2010 1:06:12 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,59014,2498,0,19,53260,'M_Forecast_ID',TO_TIMESTAMP('2010-02-15 13:06:11','YYYY-MM-DD HH24:MI:SS'),0,'Material Forecast','EE01',22,'Material Forecast','Y','N','N','N','N','N','N','N','Y','N','Y','Forecast',TO_TIMESTAMP('2010-02-15 13:06:11','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:06:12 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59014 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:06:12 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD COLUMN M_Forecast_ID NUMERIC(10) DEFAULT NULL +; + +-- Feb 15, 2010 1:06:12 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element SET ColumnName='Qty', Description='Quantity', EntityType='D', Help='The Quantity indicates the number of a specific product or item for this document.', IsActive='Y', Name='Quantity', PO_Description=NULL, PO_Help=NULL, PO_Name=NULL, PO_PrintName=NULL, PrintName='Qty',Updated=TO_TIMESTAMP('2010-02-15 13:06:12','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Element_ID=526 +; + +-- Feb 15, 2010 1:06:12 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=526 +; + +-- Feb 15, 2010 1:06:13 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,59015,526,0,29,53260,'Qty',TO_TIMESTAMP('2010-02-15 13:06:12','YYYY-MM-DD HH24:MI:SS'),0,'Quantity','EE01',22,'The Quantity indicates the number of a specific product or item for this document.','Y','N','N','N','N','Y','N','N','Y','N','Y','Quantity',TO_TIMESTAMP('2010-02-15 13:06:12','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:06:13 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59015 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:06:13 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD COLUMN Qty NUMERIC NOT NULL +; + +-- Feb 15, 2010 1:06:14 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,59016,1063,0,18,53260,'SalesRep_ID',TO_TIMESTAMP('2010-02-15 13:06:13','YYYY-MM-DD HH24:MI:SS'),0,'@#AD_User_ID@','Sales Representative or Company Agent','EE01',22,'The Sales Representative indicates the Sales Rep for this Region. Any Sales Rep must be a valid internal user.','Y','N','N','N','N','N','N','N','Y','N','Y','Sales Representative',TO_TIMESTAMP('2010-02-15 13:06:13','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:06:14 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59016 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:06:14 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD COLUMN SalesRep_ID NUMERIC(10) DEFAULT NULL +; + +-- Feb 15, 2010 1:06:14 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element SET ColumnName='ProductValue', Description='Key of the Product', EntityType='D', Help=NULL, IsActive='Y', Name='Product Key', PO_Description=NULL, PO_Help=NULL, PO_Name=NULL, PO_PrintName=NULL, PrintName='Product Key',Updated=TO_TIMESTAMP('2010-02-15 13:06:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Element_ID=1675 +; + +-- Feb 15, 2010 1:06:14 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=1675 +; + +-- Feb 15, 2010 1:06:15 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,59017,1675,0,10,53260,'ProductValue',TO_TIMESTAMP('2010-02-15 13:06:14','YYYY-MM-DD HH24:MI:SS'),0,'Key of the Product','EE01',40,'Y','N','N','N','N','N','N','N','Y','N','Y','Product Key',TO_TIMESTAMP('2010-02-15 13:06:14','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:06:15 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59017 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:06:15 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD COLUMN ProductValue VARCHAR(40) DEFAULT NULL +; + +-- Feb 15, 2010 1:06:15 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element SET ColumnName='WarehouseValue', Description='Key of the Warehouse', EntityType='D', Help='Key to identify the Warehouse', IsActive='Y', Name='Warehouse Key', PO_Description=NULL, PO_Help=NULL, PO_Name=NULL, PO_PrintName=NULL, PrintName='Warehouse Key',Updated=TO_TIMESTAMP('2010-02-15 13:06:15','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Element_ID=2070 +; + +-- Feb 15, 2010 1:06:15 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=2070 +; + +-- Feb 15, 2010 1:06:16 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,59018,2070,0,10,53260,'WarehouseValue',TO_TIMESTAMP('2010-02-15 13:06:15','YYYY-MM-DD HH24:MI:SS'),0,'Key of the Warehouse','EE01',40,'Key to identify the Warehouse','Y','N','N','N','N','N','N','N','Y','N','Y','Warehouse Key',TO_TIMESTAMP('2010-02-15 13:06:15','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:06:16 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59018 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:06:16 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD COLUMN WarehouseValue VARCHAR(40) DEFAULT NULL +; + +-- Feb 15, 2010 1:06:16 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element SET ColumnName='OrgValue', Description='Key of the Organization', EntityType='D', Help=NULL, IsActive='Y', Name='Org Key', PO_Description=NULL, PO_Help=NULL, PO_Name=NULL, PO_PrintName=NULL, PrintName='Org Key',Updated=TO_TIMESTAMP('2010-02-15 13:06:16','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Element_ID=2115 +; + +-- Feb 15, 2010 1:06:16 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=2115 +; + +-- Feb 15, 2010 1:06:17 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,59019,2115,0,10,53260,'OrgValue',TO_TIMESTAMP('2010-02-15 13:06:16','YYYY-MM-DD HH24:MI:SS'),0,'Key of the Organization','EE01',40,'Y','N','N','N','N','N','N','N','Y','N','Y','Org Key',TO_TIMESTAMP('2010-02-15 13:06:16','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:06:17 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59019 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:06:17 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD COLUMN OrgValue VARCHAR(40) DEFAULT NULL +; + +-- Feb 15, 2010 1:06:17 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,Description,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,54118,0,'NetworkDistributionValue',TO_TIMESTAMP('2010-02-15 13:06:17','YYYY-MM-DD HH24:MI:SS'),0,'Key of the Network Distribution','EE01','Y','Network Distribution Key','Network Distribution Key',TO_TIMESTAMP('2010-02-15 13:06:17','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:06:17 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=54118 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID) +; + +-- Feb 15, 2010 1:06:18 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,59020,54118,0,10,53260,'NetworkDistributionValue',TO_TIMESTAMP('2010-02-15 13:06:17','YYYY-MM-DD HH24:MI:SS'),0,'Key of the Network Distribution','EE01',40,'Y','N','N','N','N','N','N','N','Y','N','Y','Network Distribution Key',TO_TIMESTAMP('2010-02-15 13:06:17','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:06:18 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59020 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:06:18 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD COLUMN NetworkDistributionValue VARCHAR(40) DEFAULT NULL +; + +-- Feb 15, 2010 1:06:18 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,Description,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,54119,0,'Product_BOM_Value',TO_TIMESTAMP('2010-02-15 13:06:18','YYYY-MM-DD HH24:MI:SS'),0,'Key of Product BOM','U','Y','Product BOM Key','Product BOM Key',TO_TIMESTAMP('2010-02-15 13:06:18','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:06:18 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=54119 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID) +; + +-- Feb 15, 2010 1:06:19 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,59021,54119,0,10,53260,'Product_BOM_Value',TO_TIMESTAMP('2010-02-15 13:06:18','YYYY-MM-DD HH24:MI:SS'),0,'Key of Product BOM','EE01',40,'Y','N','N','N','N','N','N','N','Y','N','Y','Product BOM Key',TO_TIMESTAMP('2010-02-15 13:06:18','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:06:19 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59021 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:06:19 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD COLUMN Product_BOM_Value VARCHAR(40) DEFAULT NULL +; + +-- Feb 15, 2010 1:06:20 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,Description,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,54120,0,'ForecastValue',TO_TIMESTAMP('2010-02-15 13:06:19','YYYY-MM-DD HH24:MI:SS'),0,'Key of the Forecast','EE01','Y','Forecast Key','Forecast Key',TO_TIMESTAMP('2010-02-15 13:06:19','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:06:20 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=54120 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID) +; + +-- Feb 15, 2010 1:06:20 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,59022,54120,0,10,53260,'ForecastValue',TO_TIMESTAMP('2010-02-15 13:06:20','YYYY-MM-DD HH24:MI:SS'),0,'Key of the Forecast','EE01',40,'Y','N','N','N','N','N','N','N','Y','N','Y','Forecast Key',TO_TIMESTAMP('2010-02-15 13:06:20','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:06:20 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59022 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:06:20 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD COLUMN ForecastValue VARCHAR(40) DEFAULT NULL +; + +-- Feb 15, 2010 1:06:21 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,Description,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,54121,0,'ResourceValue',TO_TIMESTAMP('2010-02-15 13:06:20','YYYY-MM-DD HH24:MI:SS'),0,'Key of the Resource','EE01','Y','Resource Key','Resource Key',TO_TIMESTAMP('2010-02-15 13:06:20','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:06:21 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=54121 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID) +; + +-- Feb 15, 2010 1:06:22 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,59023,54121,0,10,53260,'ResourceValue',TO_TIMESTAMP('2010-02-15 13:06:21','YYYY-MM-DD HH24:MI:SS'),0,'Key of the Resource','EE01',40,'Y','N','N','N','N','N','N','N','Y','N','Y','Resource Key',TO_TIMESTAMP('2010-02-15 13:06:21','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:06:22 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59023 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:06:22 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD COLUMN ResourceValue VARCHAR(40) DEFAULT NULL +; + +-- Feb 15, 2010 1:06:22 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,Description,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,54122,0,'PlannerValue',TO_TIMESTAMP('2010-02-15 13:06:22','YYYY-MM-DD HH24:MI:SS'),0,'Search Key of the Planning','EE01','Y','Planner Key','Planner Key',TO_TIMESTAMP('2010-02-15 13:06:22','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:06:22 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=54122 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID) +; + +-- Feb 15, 2010 1:06:23 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,59024,54122,0,10,53260,'PlannerValue',TO_TIMESTAMP('2010-02-15 13:06:22','YYYY-MM-DD HH24:MI:SS'),0,'Search Key of the Planning','EE01',40,'Y','N','N','N','N','N','N','N','Y','N','Y','Planner Key',TO_TIMESTAMP('2010-02-15 13:06:22','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:06:23 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59024 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:06:23 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD COLUMN PlannerValue VARCHAR(40) DEFAULT NULL +; + +-- Feb 15, 2010 1:06:23 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element SET ColumnName='M_ForecastLine_ID', Description='Forecast Line', EntityType='D', Help='Forecast of Product Qyantity by Period', IsActive='Y', Name='Forecast Line', PO_Description=NULL, PO_Help=NULL, PO_Name=NULL, PO_PrintName=NULL, PrintName='Forecast Line',Updated=TO_TIMESTAMP('2010-02-15 13:06:23','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Element_ID=2499 +; + +-- Feb 15, 2010 1:06:23 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=2499 +; + +-- Feb 15, 2010 1:06:24 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,59025,2499,0,19,53260,'M_ForecastLine_ID',TO_TIMESTAMP('2010-02-15 13:06:23','YYYY-MM-DD HH24:MI:SS'),0,'Forecast Line','EE01',10,'Forecast of Product Qyantity by Period','Y','N','N','N','N','N','N','N','Y','N','N','Forecast Line',TO_TIMESTAMP('2010-02-15 13:06:23','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:06:24 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59025 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:06:24 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD COLUMN M_ForecastLine_ID NUMERIC(10) DEFAULT NULL +; + +-- Feb 15, 2010 1:06:24 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element SET ColumnName='PP_Product_Planning_ID', Description=NULL, EntityType='EE01', Help=NULL, IsActive='Y', Name='Product Planning', PO_Description=NULL, PO_Help=NULL, PO_Name=NULL, PO_PrintName=NULL, PrintName='Product Planning',Updated=TO_TIMESTAMP('2010-02-15 13:06:24','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Element_ID=53268 +; + +-- Feb 15, 2010 1:06:24 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=53268 +; + +-- Feb 15, 2010 1:06:25 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,59026,53268,0,19,53260,'PP_Product_Planning_ID',TO_TIMESTAMP('2010-02-15 13:06:24','YYYY-MM-DD HH24:MI:SS'),0,'EE01',10,'Y','N','N','N','N','N','N','N','Y','N','N','Product Planning',TO_TIMESTAMP('2010-02-15 13:06:24','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:06:25 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59026 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:06:25 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD COLUMN PP_Product_Planning_ID NUMERIC(10) DEFAULT NULL +; + +-- Feb 15, 2010 1:06:25 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element SET ColumnName='VendorProductNo', Description='Product Key of the Business Partner', EntityType='D', Help='The Business Partner Product Key identifies the number used by the Business Partner for this product. It can be printed on orders and invoices when you include the Product Key in the print format.', IsActive='Y', Name='Partner Product Key', PO_Description=NULL, PO_Help=NULL, PO_Name=NULL, PO_PrintName=NULL, PrintName='BPartner Product Key',Updated=TO_TIMESTAMP('2010-02-15 13:06:25','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Element_ID=623 +; + +-- Feb 15, 2010 1:06:25 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=623 +; + +-- Feb 15, 2010 1:06:31 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,59027,623,0,10,53260,'VendorProductNo',TO_TIMESTAMP('2010-02-15 13:06:25','YYYY-MM-DD HH24:MI:SS'),0,'Product Key of the Business Partner','EE01',30,'The Business Partner Product Key identifies the number used by the Business Partner for this product. It can be printed on orders and invoices when you include the Product Key in the print format.','Y','N','N','N','N','N','N','N','Y','N','Y','Partner Product Key',TO_TIMESTAMP('2010-02-15 13:06:25','YYYY-MM-DD HH24:MI:SS'),0,0) +; + +-- Feb 15, 2010 1:06:31 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59027 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 15, 2010 1:06:31 PM CST +-- Create new importer for Planning Data and Forecast +ALTER TABLE I_ProductPlanning ADD COLUMN VendorProductNo VARCHAR(30) DEFAULT NULL +; + +-- Feb 15, 2010 1:06:32 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Tab (AD_Client_ID,AD_Org_ID,AD_Tab_ID,AD_Table_ID,AD_Window_ID,CommitWarning,Created,CreatedBy,EntityType,HasTree,IsActive,IsAdvancedTab,IsInfoTab,IsInsertRecord,IsReadOnly,IsSingleRow,IsSortTab,IsTranslationTab,Name,Processing,SeqNo,TabLevel,Updated,UpdatedBy) VALUES (0,0,53307,53260,53109,NULL,TO_TIMESTAMP('2010-02-15 13:06:31','YYYY-MM-DD HH24:MI:SS'),0,'EE01','N','Y','N','N','Y','N','N','N','N','Import Product Planning','N',10,0,TO_TIMESTAMP('2010-02-15 13:06:31','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:06:32 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Tab_Trl (AD_Language,AD_Tab_ID, CommitWarning,Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Tab_ID, t.CommitWarning,t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Tab t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Tab_ID=53307 AND NOT EXISTS (SELECT * FROM AD_Tab_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Tab_ID=t.AD_Tab_ID) +; + +-- Feb 15, 2010 1:06:34 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,58982,58726,0,53307,TO_TIMESTAMP('2010-02-15 13:06:32','YYYY-MM-DD HH24:MI:SS'),0,'The record is active in the system',1,'EE01','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 reports. +There are two reasons for de-activating and not deleting records: +(1) The system requires the record for audit purposes. +(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.','Y','Y','N','N','N','N','N','Active',0,0,TO_TIMESTAMP('2010-02-15 13:06:32','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:06:34 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58726 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 15, 2010 1:06:35 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,59011,58727,0,53307,TO_TIMESTAMP('2010-02-15 13:06:34','YYYY-MM-DD HH24:MI:SS'),0,'Workflow Simulation Execution Time',22,'EE01','Amount of time the performer of the activity needs to perform the task in Duration Unit','Y','Y','N','N','N','N','Y','Working Time',0,0,TO_TIMESTAMP('2010-02-15 13:06:34','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:06:35 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58727 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 15, 2010 1:06:36 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,58978,58728,0,53307,TO_TIMESTAMP('2010-02-15 13:06:35','YYYY-MM-DD HH24:MI:SS'),0,'Client/Tenant for this installation.',10,'EE01','A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','Y','Y','Y','N','N','N','N','Client',10,0,TO_TIMESTAMP('2010-02-15 13:06:35','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:06:36 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58728 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 15, 2010 1:06:37 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,59026,50010,58729,0,53307,TO_TIMESTAMP('2010-02-15 13:06:36','YYYY-MM-DD HH24:MI:SS'),0,10,'EE01','Y','Y','Y','N','N','Y','Y','Product Planning',20,0,TO_TIMESTAMP('2010-02-15 13:06:36','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:06:37 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58729 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 15, 2010 1:06:38 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,59019,50010,58730,0,53307,TO_TIMESTAMP('2010-02-15 13:06:37','YYYY-MM-DD HH24:MI:SS'),0,'Key of the Organization',22,'EE01','Y','Y','Y','N','N','N','N','Org Key',30,0,TO_TIMESTAMP('2010-02-15 13:06:37','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:06:38 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58730 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 15, 2010 1:06:39 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,58979,50010,58731,0,53307,TO_TIMESTAMP('2010-02-15 13:06:38','YYYY-MM-DD HH24:MI:SS'),0,'Organizational entity within client',10,'EE01','An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','Y','Y','Y','N','N','N','Y','Organization',40,0,TO_TIMESTAMP('2010-02-15 13:06:38','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:06:39 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58731 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 15, 2010 1:06:39 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,59017,50010,58732,0,53307,TO_TIMESTAMP('2010-02-15 13:06:39','YYYY-MM-DD HH24:MI:SS'),0,'Key of the Product',22,'EE01','Y','Y','Y','N','N','N','N','Product Key',50,0,TO_TIMESTAMP('2010-02-15 13:06:39','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:06:39 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58732 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 15, 2010 1:06:40 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,58997,50010,58733,0,53307,TO_TIMESTAMP('2010-02-15 13:06:39','YYYY-MM-DD HH24:MI:SS'),0,'Product, Service, Item',22,'EE01','Identifies an item which is either purchased or sold in this organization.','Y','Y','Y','N','N','N','Y','Product',60,0,TO_TIMESTAMP('2010-02-15 13:06:39','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:06:40 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58733 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 15, 2010 1:06:40 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,59016,50010,58734,0,53307,TO_TIMESTAMP('2010-02-15 13:06:40','YYYY-MM-DD HH24:MI:SS'),0,'Sales Representative or Company Agent',22,'EE01','The Sales Representative indicates the Sales Rep for this Region. Any Sales Rep must be a valid internal user.','Y','Y','Y','N','N','N','N','Sales Representative',70,0,TO_TIMESTAMP('2010-02-15 13:06:40','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:06:40 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58734 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 15, 2010 1:06:41 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,59023,50010,58735,0,53307,TO_TIMESTAMP('2010-02-15 13:06:40','YYYY-MM-DD HH24:MI:SS'),0,'Key of the Resource',22,'EE01','Y','Y','Y','N','N','N','N','Resource Key',80,0,TO_TIMESTAMP('2010-02-15 13:06:40','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:06:41 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58735 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 15, 2010 1:06:41 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,59008,50010,58736,0,53307,TO_TIMESTAMP('2010-02-15 13:06:41','YYYY-MM-DD HH24:MI:SS'),0,'Resource',22,'EE01','Y','Y','Y','N','N','N','Y','Resource',90,0,TO_TIMESTAMP('2010-02-15 13:06:41','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:06:41 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58736 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 15, 2010 1:06:42 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,59018,50010,58737,0,53307,TO_TIMESTAMP('2010-02-15 13:06:41','YYYY-MM-DD HH24:MI:SS'),0,'Key of the Warehouse',22,'EE01','Key to identify the Warehouse','Y','Y','Y','N','N','N','N','Warehouse Key',100,0,TO_TIMESTAMP('2010-02-15 13:06:41','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:06:42 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58737 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 15, 2010 1:06:43 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,58998,50010,58738,0,53307,TO_TIMESTAMP('2010-02-15 13:06:42','YYYY-MM-DD HH24:MI:SS'),0,'Storage Warehouse and Service Point',22,'EE01','The Warehouse identifies a unique Warehouse where products are stored or Services are provided.','Y','Y','Y','N','N','N','Y','Warehouse',110,0,TO_TIMESTAMP('2010-02-15 13:06:42','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:06:43 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58738 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 15, 2010 1:06:43 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,59024,50010,58739,0,53307,TO_TIMESTAMP('2010-02-15 13:06:43','YYYY-MM-DD HH24:MI:SS'),0,'Search Key of the Planning',22,'EE01','Y','Y','Y','N','N','N','N','Planner Key',120,0,TO_TIMESTAMP('2010-02-15 13:06:43','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:06:43 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58739 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 15, 2010 1:06:44 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,59005,50010,58740,0,53307,TO_TIMESTAMP('2010-02-15 13:06:43','YYYY-MM-DD HH24:MI:SS'),0,22,'EE01','Y','Y','Y','N','N','N','Y','Planner',130,0,TO_TIMESTAMP('2010-02-15 13:06:43','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:06:44 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58740 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 15, 2010 1:06:45 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,59021,50010,58741,0,53307,TO_TIMESTAMP('2010-02-15 13:06:44','YYYY-MM-DD HH24:MI:SS'),0,'Key of Product BOM',22,'EE01','Y','Y','Y','N','N','N','N','Product BOM Key',140,0,TO_TIMESTAMP('2010-02-15 13:06:44','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:06:45 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58741 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 15, 2010 1:06:46 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,59006,50010,58742,0,53307,TO_TIMESTAMP('2010-02-15 13:06:45','YYYY-MM-DD HH24:MI:SS'),0,'BOM & Formula',22,'EE01','Y','Y','Y','N','N','N','Y','BOM & Formula',150,0,TO_TIMESTAMP('2010-02-15 13:06:45','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:06:46 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58742 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 15, 2010 1:06:46 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,58991,50010,58743,0,53307,TO_TIMESTAMP('2010-02-15 13:06:46','YYYY-MM-DD HH24:MI:SS'),0,'Workflow or combination of tasks',60,'EE01','The Workflow field identifies a unique Workflow in the system.','Y','Y','Y','N','N','N','N','Workflow',160,0,TO_TIMESTAMP('2010-02-15 13:06:46','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:06:46 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58743 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 15, 2010 1:06:47 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,59020,50010,58744,0,53307,TO_TIMESTAMP('2010-02-15 13:06:46','YYYY-MM-DD HH24:MI:SS'),0,'Key of the Network Distribution',22,'EE01','Y','Y','Y','N','N','N','N','Network Distribution Key',170,0,TO_TIMESTAMP('2010-02-15 13:06:46','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:06:47 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58744 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 15, 2010 1:06:48 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,58992,50010,58745,0,53307,TO_TIMESTAMP('2010-02-15 13:06:47','YYYY-MM-DD HH24:MI:SS'),0,22,'EE01','Y','Y','Y','N','N','N','Y','Network Distribution',180,0,TO_TIMESTAMP('2010-02-15 13:06:47','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:06:48 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58745 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 15, 2010 1:06:48 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,58995,50010,58746,0,53307,TO_TIMESTAMP('2010-02-15 13:06:48','YYYY-MM-DD HH24:MI:SS'),0,1,'EE01','Y','Y','Y','N','N','N','N','Is MPS',190,0,TO_TIMESTAMP('2010-02-15 13:06:48','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:06:48 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58746 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 15, 2010 1:06:49 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,58994,50010,58747,0,53307,TO_TIMESTAMP('2010-02-15 13:06:48','YYYY-MM-DD HH24:MI:SS'),0,'Indicates whether planned orders will be generated by MRP',1,'EE01','Indicates whether planned orders will be generated by MRP, if this flag is not just MRP generate a ''Create'' action notice','Y','Y','Y','N','N','N','Y','Create Plan',200,0,TO_TIMESTAMP('2010-02-15 13:06:48','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:06:49 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58747 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 15, 2010 1:06:49 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,58993,50010,58748,0,53307,TO_TIMESTAMP('2010-02-15 13:06:49','YYYY-MM-DD HH24:MI:SS'),0,'Promised days between order and delivery',10,'EE01','The Promised Delivery Time indicates the number of days between the order date and the date that delivery was promised.','Y','Y','Y','N','N','N','N','Promised Delivery Time',210,0,TO_TIMESTAMP('2010-02-15 13:06:49','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:06:49 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58748 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 15, 2010 1:06:50 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,59009,50010,58749,0,53307,TO_TIMESTAMP('2010-02-15 13:06:49','YYYY-MM-DD HH24:MI:SS'),0,22,'EE01','Y','Y','Y','N','N','N','Y','Time Fence',220,0,TO_TIMESTAMP('2010-02-15 13:06:49','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:06:50 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58749 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 15, 2010 1:06:51 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,59010,50010,58750,0,53307,TO_TIMESTAMP('2010-02-15 13:06:50','YYYY-MM-DD HH24:MI:SS'),0,10,'EE01','Y','Y','Y','N','N','N','N','Transfert Time',230,0,TO_TIMESTAMP('2010-02-15 13:06:50','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:06:51 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58750 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 15, 2010 1:06:51 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,59003,50010,58751,0,53307,TO_TIMESTAMP('2010-02-15 13:06:51','YYYY-MM-DD HH24:MI:SS'),0,3,'EE01','Y','Y','Y','N','N','N','Y','Order Policy',240,0,TO_TIMESTAMP('2010-02-15 13:06:51','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:06:51 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58751 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 15, 2010 1:06:52 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,59002,50010,58752,0,53307,TO_TIMESTAMP('2010-02-15 13:06:51','YYYY-MM-DD HH24:MI:SS'),0,22,'EE01','Y','Y','Y','N','N','N','N','Order Period',250,0,TO_TIMESTAMP('2010-02-15 13:06:51','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:06:52 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58752 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 15, 2010 1:06:52 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,59004,50010,58753,0,53307,TO_TIMESTAMP('2010-02-15 13:06:52','YYYY-MM-DD HH24:MI:SS'),0,22,'EE01','Y','Y','Y','N','N','N','Y','Order Qty',260,0,TO_TIMESTAMP('2010-02-15 13:06:52','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:06:52 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58753 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 15, 2010 1:06:53 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,59001,50010,58754,0,53307,TO_TIMESTAMP('2010-02-15 13:06:52','YYYY-MM-DD HH24:MI:SS'),0,'Package order size in UOM (e.g. order set of 5 units)',14,'EE01','The Order Pack Quantity indicates the number of units in each pack of this product.','Y','Y','Y','N','N','N','N','Order Pack Qty',270,0,TO_TIMESTAMP('2010-02-15 13:06:52','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:06:53 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58754 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 15, 2010 1:06:54 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,59000,50010,58755,0,53307,TO_TIMESTAMP('2010-02-15 13:06:53','YYYY-MM-DD HH24:MI:SS'),0,'Minimum order quantity in UOM',14,'EE01','The Minimum Order Quantity indicates the smallest quantity of this product which can be ordered.','Y','Y','Y','N','N','N','Y','Minimum Order Qty',280,0,TO_TIMESTAMP('2010-02-15 13:06:53','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:06:54 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58755 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 15, 2010 1:06:54 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,58999,50010,58756,0,53307,TO_TIMESTAMP('2010-02-15 13:06:54','YYYY-MM-DD HH24:MI:SS'),0,'Maximum order quantity in UOM',10,'EE01','The Maximum Order Quantity indicates the biggest quantity of this product which can be ordered.','Y','Y','Y','N','N','N','N','Maximum Order Qty',290,0,TO_TIMESTAMP('2010-02-15 13:06:54','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:06:54 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58756 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 15, 2010 1:06:55 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,59007,50010,58757,0,53307,TO_TIMESTAMP('2010-02-15 13:06:54','YYYY-MM-DD HH24:MI:SS'),0,'Safety stock is a term used to describe a level of stock that is maintained below the cycle stock to buffer against stock-outs',22,'EE01','Safety stock is defined as extra units of inventory carried as protection against possible stockouts. It is held when an organization cannot accurately predict demand and/or lead time for the product. + +Rereference: +http://en.wikipedia.org/wiki/Safety_stock','Y','Y','Y','N','N','N','Y','Safety Stock Qty',300,0,TO_TIMESTAMP('2010-02-15 13:06:54','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:06:55 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58757 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 15, 2010 1:06:56 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,59012,50010,58758,0,53307,TO_TIMESTAMP('2010-02-15 13:06:55','YYYY-MM-DD HH24:MI:SS'),0,'The Yield is the percentage of a lot that is expected to be of acceptable wuality may fall below 100 percent',22,'EE01','ADempiere Calculate the total yield for a product from the yield for each activity when the process Workflow Cost Roll-Up is executed. + +The expected yield for an Activity can be expressed as: + +Yield = Acceptable Units at Activity End x 100 + +The Total manufacturing yield for a product is determined by multiplying the yied percentage for each activity. + +Manufacturing Yield = Yield % for Activity 10 x Yied % for Activity 20 , etc + +Take care when setting yield to anything but 100% particularly when yied is used for multiples activities + +','Y','Y','Y','N','N','N','N','Yield %',310,0,TO_TIMESTAMP('2010-02-15 13:06:55','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:06:56 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58758 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 15, 2010 1:06:57 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,58996,50010,58759,0,53307,TO_TIMESTAMP('2010-02-15 13:06:56','YYYY-MM-DD HH24:MI:SS'),0,'Phantom Component',1,'EE01','Phantom Component are not stored and produced with the product. This is an option to avild maintaining an Engineering and Manufacturing Bill of Materials.','Y','Y','Y','N','N','N','Y','Phantom',320,0,TO_TIMESTAMP('2010-02-15 13:06:56','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:06:57 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58759 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 15, 2010 1:06:57 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,58985,106,58760,0,53307,TO_TIMESTAMP('2010-02-15 13:06:57','YYYY-MM-DD HH24:MI:SS'),0,'The Key of the Business Partner',22,'EE01','Y','Y','Y','N','N','N','N','Business Partner Key',330,0,TO_TIMESTAMP('2010-02-15 13:06:57','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:06:57 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58760 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 15, 2010 1:06:58 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,58986,106,58761,0,53307,TO_TIMESTAMP('2010-02-15 13:06:57','YYYY-MM-DD HH24:MI:SS'),0,'Identifies a Business Partner',22,'EE01','A Business Partner is anyone with whom you transact. This can include Vendor, Customer, Employee or Salesperson','Y','Y','Y','N','N','N','Y','Business Partner ',340,0,TO_TIMESTAMP('2010-02-15 13:06:57','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:06:58 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58761 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 15, 2010 1:06:59 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,59027,106,58762,0,53307,TO_TIMESTAMP('2010-02-15 13:06:58','YYYY-MM-DD HH24:MI:SS'),0,'Product Key of the Business Partner',22,'EE01','The Business Partner Product Key identifies the number used by the Business Partner for this product. It can be printed on orders and invoices when you include the Product Key in the print format.','Y','Y','Y','N','N','N','N','Partner Product Key',350,0,TO_TIMESTAMP('2010-02-15 13:06:58','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:06:59 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58762 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 15, 2010 1:06:59 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,59022,106,58763,0,53307,TO_TIMESTAMP('2010-02-15 13:06:59','YYYY-MM-DD HH24:MI:SS'),0,'Key of the Forecast',22,'EE01','Y','Y','Y','N','N','N','N','Forecast Key',360,0,TO_TIMESTAMP('2010-02-15 13:06:59','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:06:59 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58763 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 15, 2010 1:07:00 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,59014,106,58764,0,53307,TO_TIMESTAMP('2010-02-15 13:06:59','YYYY-MM-DD HH24:MI:SS'),0,'Material Forecast',22,'EE01','Material Forecast','Y','Y','Y','N','N','N','N','Forecast',370,0,TO_TIMESTAMP('2010-02-15 13:06:59','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:07:00 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58764 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 15, 2010 1:07:01 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,59025,106,58765,0,53307,TO_TIMESTAMP('2010-02-15 13:07:00','YYYY-MM-DD HH24:MI:SS'),0,'Forecast Line',10,'EE01','Forecast of Product Qyantity by Period','Y','Y','Y','N','N','Y','Y','Forecast Line',380,0,TO_TIMESTAMP('2010-02-15 13:07:00','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:07:01 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58765 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 15, 2010 1:07:02 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,59013,106,58766,0,53307,TO_TIMESTAMP('2010-02-15 13:07:01','YYYY-MM-DD HH24:MI:SS'),0,'Date Order was promised',7,'EE01','The Date Promised indicates the date, if any, that an Order was promised for.','Y','Y','Y','N','N','N','N','Date Promised',390,0,TO_TIMESTAMP('2010-02-15 13:07:01','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:07:02 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58766 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 15, 2010 1:07:02 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,59015,106,58767,0,53307,TO_TIMESTAMP('2010-02-15 13:07:02','YYYY-MM-DD HH24:MI:SS'),0,'Quantity',22,'EE01','The Quantity indicates the number of a specific product or item for this document.','Y','Y','Y','N','N','N','Y','Quantity',400,0,TO_TIMESTAMP('2010-02-15 13:07:02','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:07:02 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58767 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 15, 2010 1:07:03 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,58987,58768,0,53307,TO_TIMESTAMP('2010-02-15 13:07:02','YYYY-MM-DD HH24:MI:SS'),0,'Messages generated from import process',2000,'EE01','The Import Error Message displays any error messages generated during the import process.','Y','Y','Y','N','N','Y','N','Import Error Message',410,0,TO_TIMESTAMP('2010-02-15 13:07:02','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:07:03 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58768 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 15, 2010 1:07:04 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,58988,58769,0,53307,TO_TIMESTAMP('2010-02-15 13:07:03','YYYY-MM-DD HH24:MI:SS'),0,'Has this import been processed',1,'EE01','The Imported check box indicates if this import has been processed.','Y','Y','Y','N','N','Y','N','Imported',420,0,TO_TIMESTAMP('2010-02-15 13:07:03','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:07:04 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58769 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 15, 2010 1:07:04 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,58989,58770,0,53307,TO_TIMESTAMP('2010-02-15 13:07:04','YYYY-MM-DD HH24:MI:SS'),0,'The document has been processed',1,'EE01','The Processed checkbox indicates that a document has been processed.','Y','Y','Y','N','N','Y','Y','Processed',430,0,TO_TIMESTAMP('2010-02-15 13:07:04','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:07:04 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58770 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 15, 2010 1:07:05 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,58990,58771,0,53307,TO_TIMESTAMP('2010-02-15 13:07:04','YYYY-MM-DD HH24:MI:SS'),0,1,'EE01','Y','N','Y','N','N','N','N','Import Product Planning Data',440,0,TO_TIMESTAMP('2010-02-15 13:07:04','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:07:05 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58771 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 15, 2010 1:07:06 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,58977,58772,0,53307,TO_TIMESTAMP('2010-02-15 13:07:05','YYYY-MM-DD HH24:MI:SS'),0,10,'EE01','Y','Y','N','N','N','N','N','Import Product Planning',0,0,TO_TIMESTAMP('2010-02-15 13:07:05','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:07:06 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58772 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 15, 2010 1:07:07 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Menu (AD_Client_ID,AD_Menu_ID,AD_Org_ID,AD_Window_ID,"action",Created,CreatedBy,EntityType,IsActive,IsReadOnly,IsSOTrx,IsSummary,Name,Updated,UpdatedBy) VALUES (0,53264,0,53109,'W',TO_TIMESTAMP('2010-02-15 13:07:06','YYYY-MM-DD HH24:MI:SS'),0,'EE01','Y','N','N','N','Import Product Planning',TO_TIMESTAMP('2010-02-15 13:07:06','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Feb 15, 2010 1:07:07 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_Menu_Trl (AD_Language,AD_Menu_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Menu_ID, t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Menu t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Menu_ID=53264 AND NOT EXISTS (SELECT * FROM AD_Menu_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Menu_ID=t.AD_Menu_ID) +; + +-- Feb 15, 2010 1:07:07 PM CST +-- Create new importer for Planning Data and Forecast +INSERT INTO AD_TREENODEMM(AD_Client_ID, AD_Org_ID, CreatedBy, UpdatedBy, Parent_ID, SeqNo, AD_Tree_ID, Node_ID)VALUES(0, 0, 0, 0, 163,4, 10, 53264) +; + diff --git a/migration/354a-trunk/postgresql/666_BF2952456_PP_Identifiers.sql b/migration/354a-trunk/postgresql/666_BF2952456_PP_Identifiers.sql new file mode 100644 index 0000000000..c91bcb3572 --- /dev/null +++ b/migration/354a-trunk/postgresql/666_BF2952456_PP_Identifiers.sql @@ -0,0 +1,20 @@ +-- Feb 15, 2010 5:40:55 PM CST +-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator +UPDATE AD_Column SET AD_Reference_ID=19, AD_Reference_Value_ID=NULL, IsIdentifier='Y', IsUpdateable='N', SeqNo=1,Updated=TO_TIMESTAMP('2010-02-15 17:40:55','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Column_ID=53389 +; + +-- Feb 15, 2010 5:41:22 PM CST +-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator +UPDATE AD_Column SET Help=NULL, IsIdentifier='Y', SeqNo=2,Updated=TO_TIMESTAMP('2010-02-15 17:41:22','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Column_ID=53400 +; + +-- Feb 15, 2010 5:41:22 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Field SET Name='Resource', Description='Resource', Help=NULL WHERE AD_Column_ID=53400 AND IsCentrallyMaintained='Y' +; + +-- Feb 15, 2010 5:41:44 PM CST +-- Create new importer for Planning Data and Forecast +UPDATE AD_Column SET AD_Reference_ID=19, AD_Reference_Value_ID=NULL, IsIdentifier='Y', SeqNo=3,Updated=TO_TIMESTAMP('2010-02-15 17:41:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Column_ID=53390 +; + diff --git a/migration/354a-trunk/postgresql/667_FR2956390_SchedulerEnhancement.sql b/migration/354a-trunk/postgresql/667_FR2956390_SchedulerEnhancement.sql new file mode 100644 index 0000000000..ade82e2b3b --- /dev/null +++ b/migration/354a-trunk/postgresql/667_FR2956390_SchedulerEnhancement.sql @@ -0,0 +1,160 @@ +-- Feb 19, 2010 5:22:38 PM MYT +-- adding cron4j to the Adempiere scheduler - ID: 2950261 +INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,Description,EntityType,Help,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,54123,0,'IsIgnoreProcessingTime',TO_TIMESTAMP('2010-02-19 17:22:35','YYYY-MM-DD HH24:MI:SS'),100,'Do not include processing time for the DateNextRun calculation','D','When this is selected, the previous DateNextRun is always use as the source for the next DateNextRun calculation.','Y','Ignore Processing Time','Ignore Proccessing Time',TO_TIMESTAMP('2010-02-19 17:22:35','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Feb 19, 2010 5:22:38 PM MYT +-- adding cron4j to the Adempiere scheduler - ID: 2950261 +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=54123 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID) +; + +-- Feb 19, 2010 5:26:11 PM MYT +-- adding cron4j to the Adempiere scheduler - ID: 2950261 +INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,Description,EntityType,Help,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,54124,0,'CronPattern',TO_TIMESTAMP('2010-02-19 17:26:04','YYYY-MM-DD HH24:MI:SS'),100,'Cron pattern to define when the process should be invoked.','D','Cron pattern to define when the process should be invoked. See http://en.wikipedia.org/wiki/Cron#crontab_syntax for cron scheduling syntax and example.','Y','Cron Scheduling Pattern','Cron Scheduling Pattern',TO_TIMESTAMP('2010-02-19 17:26:04','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Feb 19, 2010 5:26:11 PM MYT +-- adding cron4j to the Adempiere scheduler - ID: 2950261 +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=54124 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID) +; + +-- Feb 19, 2010 5:29:11 PM MYT +-- adding cron4j to the Adempiere scheduler - ID: 2950261 +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,Help,IsActive,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,59028,54123,0,20,688,'IsIgnoreProcessingTime',TO_TIMESTAMP('2010-02-19 17:29:09','YYYY-MM-DD HH24:MI:SS'),100,'N','Do not include processing time for the DateNextRun calculation','D',1,'When this is selected, the previous DateNextRun is always use as the source for the next DateNextRun calculation.','Y','Y','N','N','N','N','N','N','N','N','N','N','Y','Ignore Processing Time',0,TO_TIMESTAMP('2010-02-19 17:29:09','YYYY-MM-DD HH24:MI:SS'),100,1.000000000000) +; + +-- Feb 19, 2010 5:29:11 PM MYT +-- adding cron4j to the Adempiere scheduler - ID: 2950261 +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59028 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 19, 2010 5:29:16 PM MYT +-- adding cron4j to the Adempiere scheduler - ID: 2950261 +ALTER TABLE AD_Scheduler ADD COLUMN IsIgnoreProcessingTime CHAR(1) DEFAULT 'N' CHECK (IsIgnoreProcessingTime IN ('Y','N')) +; + +-- Feb 19, 2010 5:46:42 PM MYT +-- adding cron4j to the Adempiere scheduler - ID: 2950261 +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,59029,54124,0,10,688,'CronPattern',TO_TIMESTAMP('2010-02-19 17:46:38','YYYY-MM-DD HH24:MI:SS'),100,'Cron pattern to define when the process should be invoked.','D',255,'Cron pattern to define when the process should be invoked. See http://en.wikipedia.org/wiki/Cron#crontab_syntax for cron scheduling syntax and example.','Y','Y','N','N','N','N','N','N','N','N','N','N','Y','Cron Scheduling Pattern',0,TO_TIMESTAMP('2010-02-19 17:46:38','YYYY-MM-DD HH24:MI:SS'),100,1.000000000000) +; + +-- Feb 19, 2010 5:46:42 PM MYT +-- adding cron4j to the Adempiere scheduler - ID: 2950261 +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59029 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Feb 19, 2010 5:46:46 PM MYT +-- adding cron4j to the Adempiere scheduler - ID: 2950261 +ALTER TABLE AD_Scheduler ADD COLUMN CronPattern VARCHAR(255) DEFAULT NULL +; + +-- Feb 19, 2010 5:47:11 PM MYT +-- adding cron4j to the Adempiere scheduler - ID: 2950261 +UPDATE AD_Column SET IsMandatory='N',Updated=TO_TIMESTAMP('2010-02-19 17:47:11','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=11247 +; + +-- Feb 19, 2010 5:47:18 PM MYT +-- adding cron4j to the Adempiere scheduler - ID: 2950261 +UPDATE AD_Column SET IsMandatory='N',Updated=TO_TIMESTAMP('2010-02-19 17:47:18','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=11255 +; + +-- Feb 19, 2010 5:48:07 PM MYT +-- adding cron4j to the Adempiere scheduler - ID: 2950261 +UPDATE AD_Ref_List SET IsActive='N',Updated=TO_TIMESTAMP('2010-02-19 17:48:07','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Ref_List_ID=665 +; + +-- Feb 19, 2010 5:48:10 PM MYT +-- adding cron4j to the Adempiere scheduler - ID: 2950261 +UPDATE AD_Ref_List SET IsActive='N',Updated=TO_TIMESTAMP('2010-02-19 17:48:10','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Ref_List_ID=664 +; + +-- Feb 19, 2010 5:49:04 PM MYT +-- adding cron4j to the Adempiere scheduler - ID: 2950261 +INSERT INTO AD_Ref_List (AD_Client_ID,AD_Org_ID,AD_Reference_ID,AD_Ref_List_ID,Created,CreatedBy,Description,EntityType,IsActive,Name,Updated,UpdatedBy,Value) VALUES (0,0,318,53574,TO_TIMESTAMP('2010-02-19 17:49:02','YYYY-MM-DD HH24:MI:SS'),100,'Use cron style scheduling pattern','D','Y','Cron Scheduling Pattern',TO_TIMESTAMP('2010-02-19 17:49:02','YYYY-MM-DD HH24:MI:SS'),100,'C') +; + +-- Feb 19, 2010 5:49:04 PM MYT +-- adding cron4j to the Adempiere scheduler - ID: 2950261 +INSERT INTO AD_Ref_List_Trl (AD_Language,AD_Ref_List_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Ref_List_ID, t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Ref_List t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Ref_List_ID=53574 AND NOT EXISTS (SELECT * FROM AD_Ref_List_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Ref_List_ID=t.AD_Ref_List_ID) +; + +-- Feb 19, 2010 5:53:21 PM MYT +-- adding cron4j to the Adempiere scheduler - ID: 2950261 +UPDATE AD_Field SET IsActive='N',Updated=TO_TIMESTAMP('2010-02-19 17:53:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=10053 +; + +-- Feb 19, 2010 5:53:26 PM MYT +-- adding cron4j to the Adempiere scheduler - ID: 2950261 +UPDATE AD_Field SET IsActive='N',Updated=TO_TIMESTAMP('2010-02-19 17:53:26','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=10052 +; + +-- Feb 19, 2010 5:54:51 PM MYT +-- adding cron4j to the Adempiere scheduler - ID: 2950261 +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,DisplayLogic,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,59028,58773,0,589,TO_TIMESTAMP('2010-02-19 17:54:49','YYYY-MM-DD HH24:MI:SS'),100,'Do not include processing time for the DateNextRun calculation',10,'@ScheduleType@=F','D','When this is selected, the previous DateNextRun is always use as the source for the next DateNextRun calculation.','Y','Y','Y','N','N','N','N','N','Ignore Processing Time',160,0,TO_TIMESTAMP('2010-02-19 17:54:49','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Feb 19, 2010 5:54:51 PM MYT +-- adding cron4j to the Adempiere scheduler - ID: 2950261 +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58773 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 19, 2010 5:55:49 PM MYT +-- adding cron4j to the Adempiere scheduler - ID: 2950261 +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,DisplayLogic,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsMandatory,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,59029,58774,0,589,TO_TIMESTAMP('2010-02-19 17:55:48','YYYY-MM-DD HH24:MI:SS'),100,'Cron pattern to define when the process should be invoked.',60,'@ScheduleType@=C','D','Cron pattern to define when the process should be invoked. See http://en.wikipedia.org/wiki/Cron#crontab_syntax for cron scheduling syntax and example.','Y','Y','Y','N','N','N','Y','N','N','Cron Scheduling Pattern',170,0,TO_TIMESTAMP('2010-02-19 17:55:48','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Feb 19, 2010 5:55:49 PM MYT +-- adding cron4j to the Adempiere scheduler - ID: 2950261 +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58774 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Feb 19, 2010 5:57:03 PM MYT +-- adding cron4j to the Adempiere scheduler - ID: 2950261 +UPDATE AD_Field SET SeqNo=0,IsDisplayed='N' WHERE AD_Field_ID=10053 +; + +-- Feb 19, 2010 5:57:03 PM MYT +-- adding cron4j to the Adempiere scheduler - ID: 2950261 +UPDATE AD_Field SET SeqNo=0,IsDisplayed='N' WHERE AD_Field_ID=10052 +; + +-- Feb 19, 2010 5:57:03 PM MYT +-- adding cron4j to the Adempiere scheduler - ID: 2950261 +UPDATE AD_Field SET SeqNo=80,IsDisplayed='Y' WHERE AD_Field_ID=9437 +; + +-- Feb 19, 2010 5:57:03 PM MYT +-- adding cron4j to the Adempiere scheduler - ID: 2950261 +UPDATE AD_Field SET SeqNo=90,IsDisplayed='Y' WHERE AD_Field_ID=9430 +; + +-- Feb 19, 2010 5:57:03 PM MYT +-- adding cron4j to the Adempiere scheduler - ID: 2950261 +UPDATE AD_Field SET SeqNo=100,IsDisplayed='Y' WHERE AD_Field_ID=58773 +; + +-- Feb 19, 2010 5:57:03 PM MYT +-- adding cron4j to the Adempiere scheduler - ID: 2950261 +UPDATE AD_Field SET SeqNo=110,IsDisplayed='Y' WHERE AD_Field_ID=58774 +; + +-- Feb 19, 2010 5:57:21 PM MYT +-- adding cron4j to the Adempiere scheduler - ID: 2950261 +UPDATE AD_Field SET IsMandatory='Y',Updated=TO_TIMESTAMP('2010-02-19 17:57:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=9430 +; + +-- Feb 19, 2010 5:57:28 PM MYT +-- adding cron4j to the Adempiere scheduler - ID: 2950261 +UPDATE AD_Field SET IsMandatory='Y',Updated=TO_TIMESTAMP('2010-02-19 17:57:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=9437 +; + +-- Feb 22, 2010 9:31:45 AM MYT +-- adding cron4j to the Adempiere scheduler - ID: 2950261 +INSERT INTO AD_Message (AD_Client_ID,AD_Message_ID,AD_Org_ID,Created,CreatedBy,EntityType,IsActive,MsgText,MsgTip,MsgType,Updated,UpdatedBy,Value) VALUES (0,53095,0,TO_TIMESTAMP('2010-02-22 09:31:41','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Invalid cron scheduling pattern','Invalid cron scheduling pattern - check syntax','E',TO_TIMESTAMP('2010-02-22 09:31:41','YYYY-MM-DD HH24:MI:SS'),100,'InvalidCronPattern') +; + +-- Feb 22, 2010 9:31:45 AM MYT +-- adding cron4j to the Adempiere scheduler - ID: 2950261 +INSERT INTO AD_Message_Trl (AD_Language,AD_Message_ID, MsgText,MsgTip, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Message_ID, t.MsgText,t.MsgTip, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Message t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Message_ID=53095 AND NOT EXISTS (SELECT * FROM AD_Message_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Message_ID=t.AD_Message_ID) +; + diff --git a/migration/354a-trunk/postgresql/668_FR2957782_PaySelection_DueDate_Para.sql b/migration/354a-trunk/postgresql/668_FR2957782_PaySelection_DueDate_Para.sql new file mode 100644 index 0000000000..88cdb5d5c1 --- /dev/null +++ b/migration/354a-trunk/postgresql/668_FR2957782_PaySelection_DueDate_Para.sql @@ -0,0 +1,10 @@ +-- Feb 24, 2010 4:03:13 PM EST +-- Payment selection due date parameter +INSERT INTO AD_Process_Para (AD_Client_ID,AD_Element_ID,AD_Org_ID,AD_Process_ID,AD_Process_Para_ID,AD_Reference_ID,ColumnName,Created,CreatedBy,Description,DisplayLogic,EntityType,FieldLength,Help,IsActive,IsCentrallyMaintained,IsMandatory,IsRange,Name,SeqNo,Updated,UpdatedBy) VALUES (0,2000,0,156,53404,15,'DueDate',TO_TIMESTAMP('2010-02-24 16:03:03','YYYY-MM-DD HH24:MI:SS'),100,'Date when the payment is due','@OnlyDue@=Y','D',7,'Date when the payment is due without deductions or discount','Y','Y','N','N','Due Date',45,TO_TIMESTAMP('2010-02-24 16:03:03','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Feb 24, 2010 4:03:13 PM EST +-- Payment selection due date parameter +INSERT INTO AD_Process_Para_Trl (AD_Language,AD_Process_Para_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Process_Para_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Process_Para t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Process_Para_ID=53404 AND NOT EXISTS (SELECT * FROM AD_Process_Para_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Process_Para_ID=t.AD_Process_Para_ID) +; + diff --git a/migration/354a-trunk/postgresql/669_BF2904257.sql b/migration/354a-trunk/postgresql/669_BF2904257.sql new file mode 100644 index 0000000000..46c8ddcd14 --- /dev/null +++ b/migration/354a-trunk/postgresql/669_BF2904257.sql @@ -0,0 +1,5 @@ +-- 01-mar-2010 12:10:16 COT +-- Bug_2904257_wrong validation sql for M_InOutShipment/Receipt (RMA) +UPDATE AD_Val_Rule SET Code='M_InOutLine.M_InOut_ID=@InOut_ID@',Updated=TO_TIMESTAMP('2010-03-01 12:10:16','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Val_Rule_ID=52001 +; + diff --git a/migration/354a-trunk/postgresql/670_FR2962094_AddProcesssedOnColumn.sql b/migration/354a-trunk/postgresql/670_FR2962094_AddProcesssedOnColumn.sql new file mode 100644 index 0000000000..35437b6717 --- /dev/null +++ b/migration/354a-trunk/postgresql/670_FR2962094_AddProcesssedOnColumn.sql @@ -0,0 +1,237 @@ +-- Mar 2, 2010 2:06:30 PM COT +-- FR_2962094_Finish implementation of weighted average costing +INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,Description,EntityType,Help,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,54128,0,'ProcessedOn',TO_TIMESTAMP('2010-03-02 14:06:28','YYYY-MM-DD HH24:MI:SS'),100,'The date+time (expressed in decimal format) when the document has been processed','D','The ProcessedOn Date+Time save the exact moment (nanoseconds precision if allowed by the DB) when a document has been processed.','Y','Processed On','Processed On',TO_TIMESTAMP('2010-03-02 14:06:28','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Mar 2, 2010 2:06:30 PM COT +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=54128 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID) +; + +-- Mar 2, 2010 2:08:58 PM COT +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,59034,54128,0,22,735,'ProcessedOn',TO_TIMESTAMP('2010-03-02 14:08:57','YYYY-MM-DD HH24:MI:SS'),100,'The date+time (expressed in decimal format) when the document has been processed','D',20,'The ProcessedOn Date+Time save the exact moment (nanoseconds precision if allowed by the DB) when a document has been processed.','Y','N','N','N','N','N','N','N','N','N','Y','Processed On',0,TO_TIMESTAMP('2010-03-02 14:08:57','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Mar 2, 2010 2:08:58 PM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59034 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 2, 2010 2:09:03 PM COT +ALTER TABLE C_AllocationHdr ADD COLUMN ProcessedOn NUMERIC DEFAULT NULL +; + +-- Mar 2, 2010 2:09:54 PM COT +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,59035,54128,0,22,392,'ProcessedOn',TO_TIMESTAMP('2010-03-02 14:09:54','YYYY-MM-DD HH24:MI:SS'),100,'The date+time (expressed in decimal format) when the document has been processed','D',20,'The ProcessedOn Date+Time save the exact moment (nanoseconds precision if allowed by the DB) when a document has been processed.','Y','N','N','N','N','N','N','N','N','N','Y','Processed On',0,TO_TIMESTAMP('2010-03-02 14:09:54','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Mar 2, 2010 2:09:54 PM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59035 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 2, 2010 2:09:56 PM COT +ALTER TABLE C_BankStatement ADD COLUMN ProcessedOn NUMERIC DEFAULT NULL +; + +-- Mar 2, 2010 2:10:39 PM COT +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,59036,54128,0,22,407,'ProcessedOn',TO_TIMESTAMP('2010-03-02 14:10:38','YYYY-MM-DD HH24:MI:SS'),100,'The date+time (expressed in decimal format) when the document has been processed','D',20,'The ProcessedOn Date+Time save the exact moment (nanoseconds precision if allowed by the DB) when a document has been processed.','Y','N','N','N','N','N','N','N','N','N','Y','Processed On',0,TO_TIMESTAMP('2010-03-02 14:10:38','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Mar 2, 2010 2:10:39 PM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59036 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 2, 2010 2:10:42 PM COT +ALTER TABLE C_Cash ADD COLUMN ProcessedOn NUMERIC DEFAULT NULL +; + +-- Mar 2, 2010 2:11:19 PM COT +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,59037,54128,0,22,318,'ProcessedOn',TO_TIMESTAMP('2010-03-02 14:11:19','YYYY-MM-DD HH24:MI:SS'),100,'The date+time (expressed in decimal format) when the document has been processed','D',20,'The ProcessedOn Date+Time save the exact moment (nanoseconds precision if allowed by the DB) when a document has been processed.','Y','N','N','N','N','N','N','N','N','N','Y','Processed On',0,TO_TIMESTAMP('2010-03-02 14:11:19','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Mar 2, 2010 2:11:19 PM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59037 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 2, 2010 2:11:22 PM COT +ALTER TABLE C_Invoice ADD COLUMN ProcessedOn NUMERIC DEFAULT NULL +; + +-- Mar 2, 2010 2:11:48 PM COT +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,59038,54128,0,22,259,'ProcessedOn',TO_TIMESTAMP('2010-03-02 14:11:48','YYYY-MM-DD HH24:MI:SS'),100,'The date+time (expressed in decimal format) when the document has been processed','D',20,'The ProcessedOn Date+Time save the exact moment (nanoseconds precision if allowed by the DB) when a document has been processed.','Y','N','N','N','N','N','N','N','N','N','Y','Processed On',0,TO_TIMESTAMP('2010-03-02 14:11:48','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Mar 2, 2010 2:11:48 PM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59038 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 2, 2010 2:11:51 PM COT +ALTER TABLE C_Order ADD COLUMN ProcessedOn NUMERIC DEFAULT NULL +; + +-- Mar 2, 2010 2:12:19 PM COT +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,59039,54128,0,22,335,'ProcessedOn',TO_TIMESTAMP('2010-03-02 14:12:15','YYYY-MM-DD HH24:MI:SS'),100,'The date+time (expressed in decimal format) when the document has been processed','D',20,'The ProcessedOn Date+Time save the exact moment (nanoseconds precision if allowed by the DB) when a document has been processed.','Y','N','N','N','N','N','N','N','N','N','Y','Processed On',0,TO_TIMESTAMP('2010-03-02 14:12:15','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Mar 2, 2010 2:12:19 PM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59039 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 2, 2010 2:12:22 PM COT +ALTER TABLE C_Payment ADD COLUMN ProcessedOn NUMERIC DEFAULT NULL +; + +-- Mar 2, 2010 2:12:53 PM COT +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,59040,54128,0,22,623,'ProcessedOn',TO_TIMESTAMP('2010-03-02 14:12:52','YYYY-MM-DD HH24:MI:SS'),100,'The date+time (expressed in decimal format) when the document has been processed','D',20,'The ProcessedOn Date+Time save the exact moment (nanoseconds precision if allowed by the DB) when a document has been processed.','Y','N','N','N','N','N','N','N','N','N','Y','Processed On',0,TO_TIMESTAMP('2010-03-02 14:12:52','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Mar 2, 2010 2:12:53 PM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59040 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 2, 2010 2:12:55 PM COT +ALTER TABLE C_ProjectIssue ADD COLUMN ProcessedOn NUMERIC DEFAULT NULL +; + +-- Mar 2, 2010 2:13:31 PM COT +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,59041,54128,0,22,53037,'ProcessedOn',TO_TIMESTAMP('2010-03-02 14:13:31','YYYY-MM-DD HH24:MI:SS'),100,'The date+time (expressed in decimal format) when the document has been processed','D',20,'The ProcessedOn Date+Time save the exact moment (nanoseconds precision if allowed by the DB) when a document has been processed.','Y','N','N','N','N','N','N','N','N','N','Y','Processed On',0,TO_TIMESTAMP('2010-03-02 14:13:31','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Mar 2, 2010 2:13:31 PM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59041 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 2, 2010 2:13:34 PM COT +ALTER TABLE DD_Order ADD COLUMN ProcessedOn NUMERIC DEFAULT NULL +; + +-- Mar 2, 2010 2:13:58 PM COT +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,59042,54128,0,22,224,'ProcessedOn',TO_TIMESTAMP('2010-03-02 14:13:57','YYYY-MM-DD HH24:MI:SS'),100,'The date+time (expressed in decimal format) when the document has been processed','D',20,'The ProcessedOn Date+Time save the exact moment (nanoseconds precision if allowed by the DB) when a document has been processed.','Y','N','N','N','N','N','N','N','N','N','Y','Processed On',0,TO_TIMESTAMP('2010-03-02 14:13:57','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Mar 2, 2010 2:13:58 PM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59042 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 2, 2010 2:14:00 PM COT +ALTER TABLE GL_Journal ADD COLUMN ProcessedOn NUMERIC DEFAULT NULL +; + +-- Mar 2, 2010 2:14:24 PM COT +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,59043,54128,0,22,53092,'ProcessedOn',TO_TIMESTAMP('2010-03-02 14:14:24','YYYY-MM-DD HH24:MI:SS'),100,'The date+time (expressed in decimal format) when the document has been processed','D',20,'The ProcessedOn Date+Time save the exact moment (nanoseconds precision if allowed by the DB) when a document has been processed.','Y','N','N','N','N','N','N','N','N','N','Y','Processed On',0,TO_TIMESTAMP('2010-03-02 14:14:24','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Mar 2, 2010 2:14:24 PM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59043 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 2, 2010 2:14:36 PM COT +ALTER TABLE HR_Process ADD COLUMN ProcessedOn NUMERIC DEFAULT NULL +; + +-- Mar 2, 2010 2:15:02 PM COT +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,59044,54128,0,22,319,'ProcessedOn',TO_TIMESTAMP('2010-03-02 14:15:00','YYYY-MM-DD HH24:MI:SS'),100,'The date+time (expressed in decimal format) when the document has been processed','D',20,'The ProcessedOn Date+Time save the exact moment (nanoseconds precision if allowed by the DB) when a document has been processed.','Y','N','N','N','N','N','N','N','N','N','Y','Processed On',0,TO_TIMESTAMP('2010-03-02 14:15:00','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Mar 2, 2010 2:15:02 PM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59044 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 2, 2010 2:15:05 PM COT +ALTER TABLE M_InOut ADD COLUMN ProcessedOn NUMERIC DEFAULT NULL +; + +-- Mar 2, 2010 2:15:29 PM COT +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,59045,54128,0,22,321,'ProcessedOn',TO_TIMESTAMP('2010-03-02 14:15:28','YYYY-MM-DD HH24:MI:SS'),100,'The date+time (expressed in decimal format) when the document has been processed','D',20,'The ProcessedOn Date+Time save the exact moment (nanoseconds precision if allowed by the DB) when a document has been processed.','Y','N','N','N','N','N','N','N','N','N','Y','Processed On',0,TO_TIMESTAMP('2010-03-02 14:15:28','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Mar 2, 2010 2:15:29 PM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59045 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 2, 2010 2:15:30 PM COT +ALTER TABLE M_Inventory ADD COLUMN ProcessedOn NUMERIC DEFAULT NULL +; + +-- Mar 2, 2010 2:15:52 PM COT +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,59046,54128,0,22,472,'ProcessedOn',TO_TIMESTAMP('2010-03-02 14:15:51','YYYY-MM-DD HH24:MI:SS'),100,'The date+time (expressed in decimal format) when the document has been processed','D',20,'The ProcessedOn Date+Time save the exact moment (nanoseconds precision if allowed by the DB) when a document has been processed.','Y','N','N','N','N','N','N','N','N','N','Y','Processed On',0,TO_TIMESTAMP('2010-03-02 14:15:51','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Mar 2, 2010 2:15:52 PM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59046 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 2, 2010 2:15:53 PM COT +ALTER TABLE M_MatchInv ADD COLUMN ProcessedOn NUMERIC DEFAULT NULL +; + +-- Mar 2, 2010 2:16:16 PM COT +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,59047,54128,0,22,473,'ProcessedOn',TO_TIMESTAMP('2010-03-02 14:16:15','YYYY-MM-DD HH24:MI:SS'),100,'The date+time (expressed in decimal format) when the document has been processed','D',20,'The ProcessedOn Date+Time save the exact moment (nanoseconds precision if allowed by the DB) when a document has been processed.','Y','N','N','N','N','N','N','N','N','N','Y','Processed On',0,TO_TIMESTAMP('2010-03-02 14:16:15','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Mar 2, 2010 2:16:16 PM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59047 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 2, 2010 2:16:17 PM COT +ALTER TABLE M_MatchPO ADD COLUMN ProcessedOn NUMERIC DEFAULT NULL +; + +-- Mar 2, 2010 2:16:43 PM COT +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,59048,54128,0,22,323,'ProcessedOn',TO_TIMESTAMP('2010-03-02 14:16:42','YYYY-MM-DD HH24:MI:SS'),100,'The date+time (expressed in decimal format) when the document has been processed','D',20,'The ProcessedOn Date+Time save the exact moment (nanoseconds precision if allowed by the DB) when a document has been processed.','Y','N','N','N','N','N','N','N','N','N','Y','Processed On',0,TO_TIMESTAMP('2010-03-02 14:16:42','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Mar 2, 2010 2:16:43 PM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59048 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 2, 2010 2:16:44 PM COT +ALTER TABLE M_Movement ADD COLUMN ProcessedOn NUMERIC DEFAULT NULL +; + +-- Mar 2, 2010 2:17:09 PM COT +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,59049,54128,0,22,325,'ProcessedOn',TO_TIMESTAMP('2010-03-02 14:17:09','YYYY-MM-DD HH24:MI:SS'),100,'The date+time (expressed in decimal format) when the document has been processed','D',20,'The ProcessedOn Date+Time save the exact moment (nanoseconds precision if allowed by the DB) when a document has been processed.','Y','N','N','N','N','N','N','N','N','N','Y','Processed On',0,TO_TIMESTAMP('2010-03-02 14:17:09','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Mar 2, 2010 2:17:09 PM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59049 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 2, 2010 2:17:11 PM COT +ALTER TABLE M_Production ADD COLUMN ProcessedOn NUMERIC DEFAULT NULL +; + +-- Mar 2, 2010 2:17:33 PM COT +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,59050,54128,0,22,702,'ProcessedOn',TO_TIMESTAMP('2010-03-02 14:17:33','YYYY-MM-DD HH24:MI:SS'),100,'The date+time (expressed in decimal format) when the document has been processed','D',20,'The ProcessedOn Date+Time save the exact moment (nanoseconds precision if allowed by the DB) when a document has been processed.','Y','N','N','N','N','N','N','N','N','N','Y','Processed On',0,TO_TIMESTAMP('2010-03-02 14:17:33','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Mar 2, 2010 2:17:33 PM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59050 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 2, 2010 2:17:35 PM COT +ALTER TABLE M_Requisition ADD COLUMN ProcessedOn NUMERIC DEFAULT NULL +; + +-- Mar 2, 2010 2:18:10 PM COT +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,59051,54128,0,22,53035,'ProcessedOn',TO_TIMESTAMP('2010-03-02 14:18:09','YYYY-MM-DD HH24:MI:SS'),100,'The date+time (expressed in decimal format) when the document has been processed','D',20,'The ProcessedOn Date+Time save the exact moment (nanoseconds precision if allowed by the DB) when a document has been processed.','Y','N','N','N','N','N','N','N','N','N','Y','Processed On',0,TO_TIMESTAMP('2010-03-02 14:18:09','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Mar 2, 2010 2:18:10 PM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59051 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 2, 2010 2:18:12 PM COT +ALTER TABLE PP_Cost_Collector ADD COLUMN ProcessedOn NUMERIC DEFAULT NULL +; + +-- Mar 2, 2010 2:18:38 PM COT +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAlwaysUpdateable,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,59052,54128,0,22,53027,'ProcessedOn',TO_TIMESTAMP('2010-03-02 14:18:38','YYYY-MM-DD HH24:MI:SS'),100,'The date+time (expressed in decimal format) when the document has been processed','D',20,'The ProcessedOn Date+Time save the exact moment (nanoseconds precision if allowed by the DB) when a document has been processed.','Y','N','N','N','N','N','N','N','N','N','Y','Processed On',0,TO_TIMESTAMP('2010-03-02 14:18:38','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Mar 2, 2010 2:18:38 PM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59052 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 2, 2010 2:18:40 PM COT +ALTER TABLE PP_Order ADD COLUMN ProcessedOn NUMERIC DEFAULT NULL +; + diff --git a/migration/354a-trunk/postgresql/671_FR2962094_FillProcesssedOn.sql b/migration/354a-trunk/postgresql/671_FR2962094_FillProcesssedOn.sql new file mode 100644 index 0000000000..5d62b2c315 --- /dev/null +++ b/migration/354a-trunk/postgresql/671_FR2962094_FillProcesssedOn.sql @@ -0,0 +1,421 @@ +-- create temporary index +CREATE INDEX tmp_ad_wf_activity_speed ON ad_wf_activity(ad_table_id, record_id); + +-- ****** SET ProcessedOn on table C_AllocationHdr ****** + +-- try to get the processed from ad_changelog +update C_AllocationHdr set processedon = +(select max(EXTRACT(EPOCH FROM updated)*1000) from ad_changelog + where ad_table_id = 735 and record_id = C_AllocationHdr.C_AllocationHdr_id and ad_column_id = 12309 + and (newvalue = 'Y' or newvalue = 'true') and (oldvalue = 'false' or oldvalue = 'NULL' or oldvalue is null)) +where processedon is null and processed = 'Y'; + +-- if not then try to get the processed from ad_wf_activity +update C_AllocationHdr set processedon = +(select max(EXTRACT(EPOCH FROM a.updated)*1000) from ad_wf_activity a, ad_wf_node n +where a.ad_table_id = 735 and a.record_id = C_AllocationHdr.C_AllocationHdr_id +and a.ad_wf_node_id = n.ad_wf_node_id and n.docaction = 'CO' and a.wfstate = 'CC') +where processedon is null and processed = 'Y'; + +-- fallback to created date +update C_AllocationHdr set processedon = EXTRACT(EPOCH FROM created)*1000 +where processedon is null and processed = 'Y'; + + + +-- ****** SET ProcessedOn on table C_BankStatement ****** + +-- try to get the processed from ad_changelog +update C_BankStatement set processedon = +(select max(EXTRACT(EPOCH FROM updated)*1000) from ad_changelog + where ad_table_id = 392 and record_id = C_BankStatement.C_BankStatement_id and ad_column_id = 4924 + and (newvalue = 'Y' or newvalue = 'true') and (oldvalue = 'false' or oldvalue = 'NULL' or oldvalue is null)) +where processedon is null and processed = 'Y'; + +-- if not then try to get the processed from ad_wf_activity +update C_BankStatement set processedon = +(select max(EXTRACT(EPOCH FROM a.updated)*1000) from ad_wf_activity a, ad_wf_node n +where a.ad_table_id = 392 and a.record_id = C_BankStatement.C_BankStatement_id +and a.ad_wf_node_id = n.ad_wf_node_id and n.docaction = 'CO' and a.wfstate = 'CC') +where processedon is null and processed = 'Y'; + +-- fallback to created date +update C_BankStatement set processedon = EXTRACT(EPOCH FROM created)*1000 +where processedon is null and processed = 'Y'; + + + +-- ****** SET ProcessedOn on table C_Cash ****** + +-- try to get the processed from ad_changelog +update C_Cash set processedon = +(select max(EXTRACT(EPOCH FROM updated)*1000) from ad_changelog + where ad_table_id = 407 and record_id = C_Cash.C_Cash_id and ad_column_id = 5258 + and (newvalue = 'Y' or newvalue = 'true') and (oldvalue = 'false' or oldvalue = 'NULL' or oldvalue is null)) +where processedon is null and processed = 'Y'; + +-- if not then try to get the processed from ad_wf_activity +update C_Cash set processedon = +(select max(EXTRACT(EPOCH FROM a.updated)*1000) from ad_wf_activity a, ad_wf_node n +where a.ad_table_id = 407 and a.record_id = C_Cash.C_Cash_id +and a.ad_wf_node_id = n.ad_wf_node_id and n.docaction = 'CO' and a.wfstate = 'CC') +where processedon is null and processed = 'Y'; + +-- fallback to created date +update C_Cash set processedon = EXTRACT(EPOCH FROM created)*1000 +where processedon is null and processed = 'Y'; + + + +-- ****** SET ProcessedOn on table C_Invoice ****** + +-- try to get the processed from ad_changelog +update C_Invoice set processedon = +(select max(EXTRACT(EPOCH FROM updated)*1000) from ad_changelog + where ad_table_id = 318 and record_id = C_Invoice.C_Invoice_id and ad_column_id = 3497 + and (newvalue = 'Y' or newvalue = 'true') and (oldvalue = 'false' or oldvalue = 'NULL' or oldvalue is null)) +where processedon is null and processed = 'Y'; + +-- if not then try to get the processed from ad_wf_activity +update C_Invoice set processedon = +(select max(EXTRACT(EPOCH FROM a.updated)*1000) from ad_wf_activity a, ad_wf_node n +where a.ad_table_id = 318 and a.record_id = C_Invoice.C_Invoice_id +and a.ad_wf_node_id = n.ad_wf_node_id and n.docaction = 'CO' and a.wfstate = 'CC') +where processedon is null and processed = 'Y'; + +-- fallback to created date +update C_Invoice set processedon = EXTRACT(EPOCH FROM created)*1000 +where processedon is null and processed = 'Y'; + + + +-- ****** SET ProcessedOn on table C_Order ****** + +-- try to get the processed from ad_changelog +update C_Order set processedon = +(select max(EXTRACT(EPOCH FROM updated)*1000) from ad_changelog + where ad_table_id = 259 and record_id = C_Order.C_Order_id and ad_column_id = 3398 + and (newvalue = 'Y' or newvalue = 'true') and (oldvalue = 'false' or oldvalue = 'NULL' or oldvalue is null)) +where processedon is null and processed = 'Y'; + +-- if not then try to get the processed from ad_wf_activity +update C_Order set processedon = +(select max(EXTRACT(EPOCH FROM a.updated)*1000) from ad_wf_activity a, ad_wf_node n +where a.ad_table_id = 259 and a.record_id = C_Order.C_Order_id +and a.ad_wf_node_id = n.ad_wf_node_id and n.docaction = 'CO' and a.wfstate = 'CC') +where processedon is null and processed = 'Y'; + +-- fallback to created date +update C_Order set processedon = EXTRACT(EPOCH FROM created)*1000 +where processedon is null and processed = 'Y'; + + + +-- ****** SET ProcessedOn on table C_Payment ****** + +-- try to get the processed from ad_changelog +update C_Payment set processedon = +(select max(EXTRACT(EPOCH FROM updated)*1000) from ad_changelog + where ad_table_id = 335 and record_id = C_Payment.C_Payment_id and ad_column_id = 3878 + and (newvalue = 'Y' or newvalue = 'true') and (oldvalue = 'false' or oldvalue = 'NULL' or oldvalue is null)) +where processedon is null and processed = 'Y'; + +-- if not then try to get the processed from ad_wf_activity +update C_Payment set processedon = +(select max(EXTRACT(EPOCH FROM a.updated)*1000) from ad_wf_activity a, ad_wf_node n +where a.ad_table_id = 335 and a.record_id = C_Payment.C_Payment_id +and a.ad_wf_node_id = n.ad_wf_node_id and n.docaction = 'CO' and a.wfstate = 'CC') +where processedon is null and processed = 'Y'; + +-- fallback to created date +update C_Payment set processedon = EXTRACT(EPOCH FROM created)*1000 +where processedon is null and processed = 'Y'; + + + +-- ****** SET ProcessedOn on table C_ProjectIssue ****** + +-- try to get the processed from ad_changelog +update C_ProjectIssue set processedon = +(select max(EXTRACT(EPOCH FROM updated)*1000) from ad_changelog + where ad_table_id = 623 and record_id = C_ProjectIssue.C_ProjectIssue_id and ad_column_id = 9842 + and (newvalue = 'Y' or newvalue = 'true') and (oldvalue = 'false' or oldvalue = 'NULL' or oldvalue is null)) +where processedon is null and processed = 'Y'; + +-- if not then try to get the processed from ad_wf_activity +update C_ProjectIssue set processedon = +(select max(EXTRACT(EPOCH FROM a.updated)*1000) from ad_wf_activity a, ad_wf_node n +where a.ad_table_id = 623 and a.record_id = C_ProjectIssue.C_ProjectIssue_id +and a.ad_wf_node_id = n.ad_wf_node_id and n.docaction = 'CO' and a.wfstate = 'CC') +where processedon is null and processed = 'Y'; + +-- fallback to created date +update C_ProjectIssue set processedon = EXTRACT(EPOCH FROM created)*1000 +where processedon is null and processed = 'Y'; + + + +-- ****** SET ProcessedOn on table DD_Order ****** + +-- try to get the processed from ad_changelog +update DD_Order set processedon = +(select max(EXTRACT(EPOCH FROM updated)*1000) from ad_changelog + where ad_table_id = 53037 and record_id = DD_Order.DD_Order_id and ad_column_id = 53912 + and (newvalue = 'Y' or newvalue = 'true') and (oldvalue = 'false' or oldvalue = 'NULL' or oldvalue is null)) +where processedon is null and processed = 'Y'; + +-- if not then try to get the processed from ad_wf_activity +update DD_Order set processedon = +(select max(EXTRACT(EPOCH FROM a.updated)*1000) from ad_wf_activity a, ad_wf_node n +where a.ad_table_id = 53037 and a.record_id = DD_Order.DD_Order_id +and a.ad_wf_node_id = n.ad_wf_node_id and n.docaction = 'CO' and a.wfstate = 'CC') +where processedon is null and processed = 'Y'; + +-- fallback to created date +update DD_Order set processedon = EXTRACT(EPOCH FROM created)*1000 +where processedon is null and processed = 'Y'; + + + +-- ****** SET ProcessedOn on table GL_Journal ****** + +-- try to get the processed from ad_changelog +update GL_Journal set processedon = +(select max(EXTRACT(EPOCH FROM updated)*1000) from ad_changelog + where ad_table_id = 224 and record_id = GL_Journal.GL_Journal_id and ad_column_id = 5953 + and (newvalue = 'Y' or newvalue = 'true') and (oldvalue = 'false' or oldvalue = 'NULL' or oldvalue is null)) +where processedon is null and processed = 'Y'; + +-- if not then try to get the processed from ad_wf_activity +update GL_Journal set processedon = +(select max(EXTRACT(EPOCH FROM a.updated)*1000) from ad_wf_activity a, ad_wf_node n +where a.ad_table_id = 224 and a.record_id = GL_Journal.GL_Journal_id +and a.ad_wf_node_id = n.ad_wf_node_id and n.docaction = 'CO' and a.wfstate = 'CC') +where processedon is null and processed = 'Y'; + +-- fallback to created date +update GL_Journal set processedon = EXTRACT(EPOCH FROM created)*1000 +where processedon is null and processed = 'Y'; + + + +-- ****** SET ProcessedOn on table HR_Process ****** + +-- try to get the processed from ad_changelog +update HR_Process set processedon = +(select max(EXTRACT(EPOCH FROM updated)*1000) from ad_changelog + where ad_table_id = 53092 and record_id = HR_Process.HR_Process_id and ad_column_id = 54876 + and (newvalue = 'Y' or newvalue = 'true') and (oldvalue = 'false' or oldvalue = 'NULL' or oldvalue is null)) +where processedon is null and processed = 'Y'; + +-- if not then try to get the processed from ad_wf_activity +update HR_Process set processedon = +(select max(EXTRACT(EPOCH FROM a.updated)*1000) from ad_wf_activity a, ad_wf_node n +where a.ad_table_id = 53092 and a.record_id = HR_Process.HR_Process_id +and a.ad_wf_node_id = n.ad_wf_node_id and n.docaction = 'CO' and a.wfstate = 'CC') +where processedon is null and processed = 'Y'; + +-- fallback to created date +update HR_Process set processedon = EXTRACT(EPOCH FROM created)*1000 +where processedon is null and processed = 'Y'; + + + +-- ****** SET ProcessedOn on table M_InOut ****** + +-- try to get the processed from ad_changelog +update M_InOut set processedon = +(select max(EXTRACT(EPOCH FROM updated)*1000) from ad_changelog + where ad_table_id = 319 and record_id = M_InOut.M_InOut_id and ad_column_id = 3518 + and (newvalue = 'Y' or newvalue = 'true') and (oldvalue = 'false' or oldvalue = 'NULL' or oldvalue is null)) +where processedon is null and processed = 'Y'; + +-- if not then try to get the processed from ad_wf_activity +update M_InOut set processedon = +(select max(EXTRACT(EPOCH FROM a.updated)*1000) from ad_wf_activity a, ad_wf_node n +where a.ad_table_id = 319 and a.record_id = M_InOut.M_InOut_id +and a.ad_wf_node_id = n.ad_wf_node_id and n.docaction = 'CO' and a.wfstate = 'CC') +where processedon is null and processed = 'Y'; + +-- fallback to created date +update M_InOut set processedon = EXTRACT(EPOCH FROM created)*1000 +where processedon is null and processed = 'Y'; + + + +-- ****** SET ProcessedOn on table M_Inventory ****** + +-- try to get the processed from ad_changelog +update M_Inventory set processedon = +(select max(EXTRACT(EPOCH FROM updated)*1000) from ad_changelog + where ad_table_id = 321 and record_id = M_Inventory.M_Inventory_id and ad_column_id = 3553 + and (newvalue = 'Y' or newvalue = 'true') and (oldvalue = 'false' or oldvalue = 'NULL' or oldvalue is null)) +where processedon is null and processed = 'Y'; + +-- if not then try to get the processed from ad_wf_activity +update M_Inventory set processedon = +(select max(EXTRACT(EPOCH FROM a.updated)*1000) from ad_wf_activity a, ad_wf_node n +where a.ad_table_id = 321 and a.record_id = M_Inventory.M_Inventory_id +and a.ad_wf_node_id = n.ad_wf_node_id and n.docaction = 'CO' and a.wfstate = 'CC') +where processedon is null and processed = 'Y'; + +-- fallback to created date +update M_Inventory set processedon = EXTRACT(EPOCH FROM created)*1000 +where processedon is null and processed = 'Y'; + + + +-- ****** SET ProcessedOn on table M_MatchInv ****** + +-- try to get the processed from ad_changelog +update M_MatchInv set processedon = +(select max(EXTRACT(EPOCH FROM updated)*1000) from ad_changelog + where ad_table_id = 472 and record_id = M_MatchInv.M_MatchInv_id and ad_column_id = 6511 + and (newvalue = 'Y' or newvalue = 'true') and (oldvalue = 'false' or oldvalue = 'NULL' or oldvalue is null)) +where processedon is null and processed = 'Y'; + +-- if not then try to get the processed from ad_wf_activity +update M_MatchInv set processedon = +(select max(EXTRACT(EPOCH FROM a.updated)*1000) from ad_wf_activity a, ad_wf_node n +where a.ad_table_id = 472 and a.record_id = M_MatchInv.M_MatchInv_id +and a.ad_wf_node_id = n.ad_wf_node_id and n.docaction = 'CO' and a.wfstate = 'CC') +where processedon is null and processed = 'Y'; + +-- fallback to created date +update M_MatchInv set processedon = EXTRACT(EPOCH FROM created)*1000 +where processedon is null and processed = 'Y'; + + + +-- ****** SET ProcessedOn on table M_MatchPO ****** + +-- try to get the processed from ad_changelog +update M_MatchPO set processedon = +(select max(EXTRACT(EPOCH FROM updated)*1000) from ad_changelog + where ad_table_id = 473 and record_id = M_MatchPO.M_MatchPO_id and ad_column_id = 6527 + and (newvalue = 'Y' or newvalue = 'true') and (oldvalue = 'false' or oldvalue = 'NULL' or oldvalue is null)) +where processedon is null and processed = 'Y'; + +-- if not then try to get the processed from ad_wf_activity +update M_MatchPO set processedon = +(select max(EXTRACT(EPOCH FROM a.updated)*1000) from ad_wf_activity a, ad_wf_node n +where a.ad_table_id = 473 and a.record_id = M_MatchPO.M_MatchPO_id +and a.ad_wf_node_id = n.ad_wf_node_id and n.docaction = 'CO' and a.wfstate = 'CC') +where processedon is null and processed = 'Y'; + +-- fallback to created date +update M_MatchPO set processedon = EXTRACT(EPOCH FROM created)*1000 +where processedon is null and processed = 'Y'; + + + +-- ****** SET ProcessedOn on table M_Movement ****** + +-- try to get the processed from ad_changelog +update M_Movement set processedon = +(select max(EXTRACT(EPOCH FROM updated)*1000) from ad_changelog + where ad_table_id = 323 and record_id = M_Movement.M_Movement_id and ad_column_id = 3580 + and (newvalue = 'Y' or newvalue = 'true') and (oldvalue = 'false' or oldvalue = 'NULL' or oldvalue is null)) +where processedon is null and processed = 'Y'; + +-- if not then try to get the processed from ad_wf_activity +update M_Movement set processedon = +(select max(EXTRACT(EPOCH FROM a.updated)*1000) from ad_wf_activity a, ad_wf_node n +where a.ad_table_id = 323 and a.record_id = M_Movement.M_Movement_id +and a.ad_wf_node_id = n.ad_wf_node_id and n.docaction = 'CO' and a.wfstate = 'CC') +where processedon is null and processed = 'Y'; + +-- fallback to created date +update M_Movement set processedon = EXTRACT(EPOCH FROM created)*1000 +where processedon is null and processed = 'Y'; + + + +-- ****** SET ProcessedOn on table M_Production ****** + +-- try to get the processed from ad_changelog +update M_Production set processedon = +(select max(EXTRACT(EPOCH FROM updated)*1000) from ad_changelog + where ad_table_id = 325 and record_id = M_Production.M_Production_id and ad_column_id = 3609 + and (newvalue = 'Y' or newvalue = 'true') and (oldvalue = 'false' or oldvalue = 'NULL' or oldvalue is null)) +where processedon is null and processed = 'Y'; + +-- if not then try to get the processed from ad_wf_activity +update M_Production set processedon = +(select max(EXTRACT(EPOCH FROM a.updated)*1000) from ad_wf_activity a, ad_wf_node n +where a.ad_table_id = 325 and a.record_id = M_Production.M_Production_id +and a.ad_wf_node_id = n.ad_wf_node_id and n.docaction = 'CO' and a.wfstate = 'CC') +where processedon is null and processed = 'Y'; + +-- fallback to created date +update M_Production set processedon = EXTRACT(EPOCH FROM created)*1000 +where processedon is null and processed = 'Y'; + + + +-- ****** SET ProcessedOn on table M_Requisition ****** + +-- try to get the processed from ad_changelog +update M_Requisition set processedon = +(select max(EXTRACT(EPOCH FROM updated)*1000) from ad_changelog + where ad_table_id = 702 and record_id = M_Requisition.M_Requisition_id and ad_column_id = 11473 + and (newvalue = 'Y' or newvalue = 'true') and (oldvalue = 'false' or oldvalue = 'NULL' or oldvalue is null)) +where processedon is null and processed = 'Y'; + +-- if not then try to get the processed from ad_wf_activity +update M_Requisition set processedon = +(select max(EXTRACT(EPOCH FROM a.updated)*1000) from ad_wf_activity a, ad_wf_node n +where a.ad_table_id = 702 and a.record_id = M_Requisition.M_Requisition_id +and a.ad_wf_node_id = n.ad_wf_node_id and n.docaction = 'CO' and a.wfstate = 'CC') +where processedon is null and processed = 'Y'; + +-- fallback to created date +update M_Requisition set processedon = EXTRACT(EPOCH FROM created)*1000 +where processedon is null and processed = 'Y'; + + + +-- ****** SET ProcessedOn on table PP_Cost_Collector ****** + +-- try to get the processed from ad_changelog +update PP_Cost_Collector set processedon = +(select max(EXTRACT(EPOCH FROM updated)*1000) from ad_changelog + where ad_table_id = 53035 and record_id = PP_Cost_Collector.PP_Cost_Collector_id and ad_column_id = 53834 + and (newvalue = 'Y' or newvalue = 'true') and (oldvalue = 'false' or oldvalue = 'NULL' or oldvalue is null)) +where processedon is null and processed = 'Y'; + +-- if not then try to get the processed from ad_wf_activity +update PP_Cost_Collector set processedon = +(select max(EXTRACT(EPOCH FROM a.updated)*1000) from ad_wf_activity a, ad_wf_node n +where a.ad_table_id = 53035 and a.record_id = PP_Cost_Collector.PP_Cost_Collector_id +and a.ad_wf_node_id = n.ad_wf_node_id and n.docaction = 'CO' and a.wfstate = 'CC') +where processedon is null and processed = 'Y'; + +-- fallback to created date +update PP_Cost_Collector set processedon = EXTRACT(EPOCH FROM created)*1000 +where processedon is null and processed = 'Y'; + + + +-- ****** SET ProcessedOn on table PP_Order ****** + +-- try to get the processed from ad_changelog +update PP_Order set processedon = +(select max(EXTRACT(EPOCH FROM updated)*1000) from ad_changelog + where ad_table_id = 53027 and record_id = PP_Order.PP_Order_id and ad_column_id = 53664 + and (newvalue = 'Y' or newvalue = 'true') and (oldvalue = 'false' or oldvalue = 'NULL' or oldvalue is null)) +where processedon is null and processed = 'Y'; + +-- if not then try to get the processed from ad_wf_activity +update PP_Order set processedon = +(select max(EXTRACT(EPOCH FROM a.updated)*1000) from ad_wf_activity a, ad_wf_node n +where a.ad_table_id = 53027 and a.record_id = PP_Order.PP_Order_id +and a.ad_wf_node_id = n.ad_wf_node_id and n.docaction = 'CO' and a.wfstate = 'CC') +where processedon is null and processed = 'Y'; + +-- fallback to created date +update PP_Order set processedon = EXTRACT(EPOCH FROM created)*1000 +where processedon is null and processed = 'Y'; + +-- drop temporary index +DROP INDEX tmp_ad_wf_activity_speed; diff --git a/migration/354a-trunk/postgresql/672_BF2948897.sql b/migration/354a-trunk/postgresql/672_BF2948897.sql new file mode 100644 index 0000000000..05588a7d2a --- /dev/null +++ b/migration/354a-trunk/postgresql/672_BF2948897.sql @@ -0,0 +1,15 @@ +-- Mar 4, 2010 1:33:05 PM COT +-- BF2948897_Fixed Assets Dictionary Errors +UPDATE AD_Tab SET WhereClause='A_Depreciation_Entry.A_Entry_Type=''DIS''',Updated=TO_TIMESTAMP('2010-03-04 13:33:05','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=53141 +; + +-- Mar 4, 2010 1:33:13 PM COT +-- BF2948897_Fixed Assets Dictionary Errors +UPDATE AD_Tab SET WhereClause='A_Depreciation_Entry.A_Entry_Type=''SPL''',Updated=TO_TIMESTAMP('2010-03-04 13:33:13','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=53151 +; + +-- Mar 4, 2010 1:33:21 PM COT +-- BF2948897_Fixed Assets Dictionary Errors +UPDATE AD_Tab SET WhereClause='A_Depreciation_Entry.A_Entry_Type=''TRN''',Updated=TO_TIMESTAMP('2010-03-04 13:33:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=53140 +; + diff --git a/migration/354a-trunk/postgresql/673_BF2948897.sql b/migration/354a-trunk/postgresql/673_BF2948897.sql new file mode 100644 index 0000000000..d915069e7c --- /dev/null +++ b/migration/354a-trunk/postgresql/673_BF2948897.sql @@ -0,0 +1,105 @@ +-- Mar 4, 2010 1:54:35 PM COT +-- BF2948897_Fixed Assets Dictionary Errors +UPDATE AD_Column SET AD_Reference_ID=20,Updated=TO_TIMESTAMP('2010-03-04 13:54:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=55347 +; + +-- Mar 4, 2010 1:55:33 PM COT +-- BF2948897_Fixed Assets Dictionary Errors +UPDATE AD_Column SET AD_Process_ID=NULL, AD_Reference_ID=20,Updated=TO_TIMESTAMP('2010-03-04 13:55:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=55557 +; + +-- Mar 4, 2010 1:56:07 PM COT +-- BF2948897_Fixed Assets Dictionary Errors +INSERT INTO t_alter_column values('a_depreciation','Processed','CHAR(1)',null,'Y') +; + +-- Mar 4, 2010 1:56:08 PM COT +-- BF2948897_Fixed Assets Dictionary Errors +UPDATE A_Depreciation SET Processed='Y' WHERE Processed IS NULL +; + +-- Mar 4, 2010 1:56:28 PM COT +-- BF2948897_Fixed Assets Dictionary Errors +UPDATE AD_Column SET DefaultValue='N',Updated=TO_TIMESTAMP('2010-03-04 13:56:28','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=55557 +; + +-- Mar 4, 2010 1:56:30 PM COT +-- BF2948897_Fixed Assets Dictionary Errors +INSERT INTO t_alter_column values('a_depreciation_entry','Processed','CHAR(1)',null,'N') +; + +-- Mar 4, 2010 1:56:31 PM COT +-- BF2948897_Fixed Assets Dictionary Errors +UPDATE A_Depreciation_Entry SET Processed='N' WHERE Processed IS NULL +; + +-- Mar 4, 2010 1:56:58 PM COT +-- BF2948897_Fixed Assets Dictionary Errors +UPDATE AD_Column SET AD_Process_ID=53111, AD_Reference_ID=28,Updated=TO_TIMESTAMP('2010-03-04 13:56:58','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=55703 +; + +-- Mar 4, 2010 1:57:00 PM COT +-- BF2948897_Fixed Assets Dictionary Errors +INSERT INTO t_alter_column values('a_depreciation_build','Processing','CHAR(1)',null,'NULL') +; + +-- Mar 4, 2010 1:57:15 PM COT +-- BF2948897_Fixed Assets Dictionary Errors +UPDATE AD_Column SET AD_Process_ID=NULL, AD_Reference_ID=20, DefaultValue='N',Updated=TO_TIMESTAMP('2010-03-04 13:57:15','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=55700 +; + +-- Mar 4, 2010 1:57:19 PM COT +-- BF2948897_Fixed Assets Dictionary Errors +INSERT INTO t_alter_column values('a_depreciation_build','Processed','CHAR(1)',null,'N') +; + +-- Mar 4, 2010 1:58:11 PM COT +-- BF2948897_Fixed Assets Dictionary Errors +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Process_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,59065,524,0,53123,28,53125,'Processing',TO_TIMESTAMP('2010-03-04 13:58:09','YYYY-MM-DD HH24:MI:SS'),100,'D',1,'Y','Y','N','N','N','N','N','Y','N','N','Y','N','Y','Process Now',TO_TIMESTAMP('2010-03-04 13:58:09','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Mar 4, 2010 1:58:11 PM COT +-- BF2948897_Fixed Assets Dictionary Errors +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59065 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 4, 2010 1:58:36 PM COT +-- BF2948897_Fixed Assets Dictionary Errors +UPDATE AD_Column SET IsMandatory='N',Updated=TO_TIMESTAMP('2010-03-04 13:58:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=59065 +; + +-- Mar 4, 2010 1:58:38 PM COT +-- BF2948897_Fixed Assets Dictionary Errors +ALTER TABLE A_Depreciation_Convention ADD COLUMN Processing CHAR(1) DEFAULT NULL +; + +-- Mar 4, 2010 1:58:51 PM COT +-- BF2948897_Fixed Assets Dictionary Errors +UPDATE AD_Column SET AD_Process_ID=NULL, AD_Reference_ID=20, DefaultValue='N',Updated=TO_TIMESTAMP('2010-03-04 13:58:51','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=55736 +; + +-- Mar 4, 2010 1:58:54 PM COT +-- BF2948897_Fixed Assets Dictionary Errors +INSERT INTO t_alter_column values('a_depreciation_convention','Processed','CHAR(1)',null,'N') +; + +-- Mar 4, 2010 1:58:54 PM COT +-- BF2948897_Fixed Assets Dictionary Errors +UPDATE A_Depreciation_Convention SET Processed='N' WHERE Processed IS NULL +; + +-- Mar 4, 2010 1:59:46 PM COT +-- BF2948897_Fixed Assets Dictionary Errors +UPDATE AD_Column SET AD_Process_ID=NULL, AD_Reference_ID=20,Updated=TO_TIMESTAMP('2010-03-04 13:59:46','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=55747 +; + +-- Mar 4, 2010 1:59:49 PM COT +-- BF2948897_Fixed Assets Dictionary Errors +INSERT INTO t_alter_column values('a_depreciation_method','Processed','CHAR(1)',null,'Y') +; + +-- Mar 4, 2010 1:59:49 PM COT +-- BF2948897_Fixed Assets Dictionary Errors +UPDATE A_Depreciation_Method SET Processed='Y' WHERE Processed IS NULL +; + diff --git a/migration/354a-trunk/postgresql/674_FR2965494.sql b/migration/354a-trunk/postgresql/674_FR2965494.sql new file mode 100644 index 0000000000..f33d0790b1 --- /dev/null +++ b/migration/354a-trunk/postgresql/674_FR2965494.sql @@ -0,0 +1,311 @@ +-- Mar 8, 2010 4:20:41 PM CET +-- Import of Order Source +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,59066,53942,0,19,591,'C_OrderSource_ID',TO_TIMESTAMP('2010-03-08 16:20:39','YYYY-MM-DD HH24:MI:SS'),100,'D',10,'Y','N','N','N','N','N','N','N','N','N','N','N','Y','Order Source',0,TO_TIMESTAMP('2010-03-08 16:20:39','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Mar 8, 2010 4:20:41 PM CET +-- Import of Order Source +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59066 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 8, 2010 4:20:44 PM CET +-- Import of Order Source +ALTER TABLE I_Order ADD COLUMN C_OrderSource_ID NUMERIC(10) DEFAULT NULL +; + +-- Mar 8, 2010 4:23:40 PM CET +-- Import of Order Source +INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,54129,0,'C_OrderSourceValue',TO_TIMESTAMP('2010-03-08 16:23:39','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','Order Source Key','Order Source Key',TO_TIMESTAMP('2010-03-08 16:23:39','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Mar 8, 2010 4:23:40 PM CET +-- Import of Order Source +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=54129 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID) +; + +-- Mar 8, 2010 4:27:20 PM CET +-- Import of Order Source +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,EntityType,FieldLength,IsActive,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,59068,54129,0,10,591,'C_OrderSourceValue',TO_TIMESTAMP('2010-03-08 16:27:19','YYYY-MM-DD HH24:MI:SS'),100,'D',40,'Y','Y','N','N','N','N','N','N','N','N','N','N','Y','Order Source Key',0,TO_TIMESTAMP('2010-03-08 16:27:19','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Mar 8, 2010 4:27:20 PM CET +-- Import of Order Source +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59068 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 8, 2010 4:27:27 PM CET +-- Import of Order Source +ALTER TABLE I_Order ADD COLUMN C_OrderSourceValue VARCHAR(40) DEFAULT NULL +; + + + +-- Mar 8, 2010 4:32:35 PM CET +-- Import of Order Source +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,59068,58779,0,512,TO_TIMESTAMP('2010-03-08 16:32:33','YYYY-MM-DD HH24:MI:SS'),100,0,'D','Y','Y','Y','N','N','N','N','N','Order Source Key',590,0,TO_TIMESTAMP('2010-03-08 16:32:33','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Mar 8, 2010 4:32:35 PM CET +-- Import of Order Source +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58779 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Mar 8, 2010 4:33:50 PM CET +-- Import of Order Source +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,59066,58780,0,512,TO_TIMESTAMP('2010-03-08 16:33:47','YYYY-MM-DD HH24:MI:SS'),100,0,'D','Y','Y','Y','N','N','N','N','N','Order Source',600,0,TO_TIMESTAMP('2010-03-08 16:33:47','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Mar 8, 2010 4:33:50 PM CET +-- Import of Order Source +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58780 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Mar 8, 2010 4:33:58 PM CET +-- Import of Order Source +UPDATE AD_Field SET IsSameLine='Y',Updated=TO_TIMESTAMP('2010-03-08 16:33:58','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=58780 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=0,IsDisplayed='N' WHERE AD_Field_ID=7347 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=0,IsDisplayed='N' WHERE AD_Field_ID=7334 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=10,IsDisplayed='Y' WHERE AD_Field_ID=7328 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=20,IsDisplayed='Y' WHERE AD_Field_ID=7319 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=30,IsDisplayed='Y' WHERE AD_Field_ID=7323 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=40,IsDisplayed='Y' WHERE AD_Field_ID=7324 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=50,IsDisplayed='Y' WHERE AD_Field_ID=7337 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=60,IsDisplayed='Y' WHERE AD_Field_ID=7315 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=70,IsDisplayed='Y' WHERE AD_Field_ID=7355 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=80,IsDisplayed='Y' WHERE AD_Field_ID=7356 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=90,IsDisplayed='Y' WHERE AD_Field_ID=7338 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=100,IsDisplayed='Y' WHERE AD_Field_ID=7322 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=110,IsDisplayed='Y' WHERE AD_Field_ID=7359 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=120,IsDisplayed='Y' WHERE AD_Field_ID=7336 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=130,IsDisplayed='Y' WHERE AD_Field_ID=7318 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=140,IsDisplayed='Y' WHERE AD_Field_ID=7330 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=150,IsDisplayed='Y' WHERE AD_Field_ID=7339 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=160,IsDisplayed='Y' WHERE AD_Field_ID=7325 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=170,IsDisplayed='Y' WHERE AD_Field_ID=7341 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=180,IsDisplayed='Y' WHERE AD_Field_ID=7346 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=190,IsDisplayed='Y' WHERE AD_Field_ID=7345 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=200,IsDisplayed='Y' WHERE AD_Field_ID=7331 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=210,IsDisplayed='Y' WHERE AD_Field_ID=7317 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=220,IsDisplayed='Y' WHERE AD_Field_ID=7360 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=230,IsDisplayed='Y' WHERE AD_Field_ID=7354 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=240,IsDisplayed='Y' WHERE AD_Field_ID=7340 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=250,IsDisplayed='Y' WHERE AD_Field_ID=7645 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=260,IsDisplayed='Y' WHERE AD_Field_ID=7332 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=270,IsDisplayed='Y' WHERE AD_Field_ID=7353 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=280,IsDisplayed='Y' WHERE AD_Field_ID=7361 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=290,IsDisplayed='Y' WHERE AD_Field_ID=7358 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=300,IsDisplayed='Y' WHERE AD_Field_ID=7350 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=310,IsDisplayed='Y' WHERE AD_Field_ID=7640 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=320,IsDisplayed='Y' WHERE AD_Field_ID=7644 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=330,IsDisplayed='Y' WHERE AD_Field_ID=7641 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=340,IsDisplayed='Y' WHERE AD_Field_ID=7326 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=350,IsDisplayed='Y' WHERE AD_Field_ID=7642 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=360,IsDisplayed='Y' WHERE AD_Field_ID=7643 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=370,IsDisplayed='Y' WHERE AD_Field_ID=7343 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=380,IsDisplayed='Y' WHERE AD_Field_ID=8262 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=390,IsDisplayed='Y' WHERE AD_Field_ID=8263 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=400,IsDisplayed='Y' WHERE AD_Field_ID=7329 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=410,IsDisplayed='Y' WHERE AD_Field_ID=7357 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=420,IsDisplayed='Y' WHERE AD_Field_ID=56402 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=430,IsDisplayed='Y' WHERE AD_Field_ID=56403 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=570,IsDisplayed='Y' WHERE AD_Field_ID=58779 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=580,IsDisplayed='Y' WHERE AD_Field_ID=58780 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=590,IsDisplayed='Y' WHERE AD_Field_ID=7327 +; + +-- Mar 8, 2010 4:35:20 PM CET +-- Import of Order Source +UPDATE AD_Field SET SeqNo=600,IsDisplayed='Y' WHERE AD_Field_ID=7335 +; diff --git a/migration/354a-trunk/postgresql/675_FR2962094_AddAverageCostVarianceDefaultAcct.sql b/migration/354a-trunk/postgresql/675_FR2962094_AddAverageCostVarianceDefaultAcct.sql new file mode 100644 index 0000000000..dba1cfa8dc --- /dev/null +++ b/migration/354a-trunk/postgresql/675_FR2962094_AddAverageCostVarianceDefaultAcct.sql @@ -0,0 +1,413 @@ +-- Mar 8, 2010 8:44:44 PM COT +-- FR2962094_Finish implementation of weighted average costing +INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,Description,EntityType,Help,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,54132,0,'P_AverageCostVariance_Acct',TO_TIMESTAMP('2010-03-08 20:44:43','YYYY-MM-DD HH24:MI:SS'),100,'Average Cost Variance','D','The Average Cost Variance is used in weighted average costing to reflect differences when posting costs for negative inventory.','Y','Average Cost Variance','Average Cost Variance',TO_TIMESTAMP('2010-03-08 20:44:43','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Mar 8, 2010 8:44:44 PM COT +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=54132 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID) +; + +-- Mar 8, 2010 8:46:06 PM COT +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,59071,54132,0,25,315,'P_AverageCostVariance_Acct',TO_TIMESTAMP('2010-03-08 20:46:05','YYYY-MM-DD HH24:MI:SS'),100,'Average Cost Variance','D',10,'The Average Cost Variance is used in weighted average costing to reflect differences when posting costs for negative inventory.','Y','Y','N','N','N','N','N','N','N','N','N','N','Y','Average Cost Variance',TO_TIMESTAMP('2010-03-08 20:46:05','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Mar 8, 2010 8:46:06 PM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59071 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 8, 2010 8:46:19 PM COT +ALTER TABLE C_AcctSchema_Default ADD COLUMN P_AverageCostVariance_Acct NUMERIC(10) DEFAULT NULL +; + +-- Mar 8, 2010 8:46:45 PM COT +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,59072,54132,0,25,401,'P_AverageCostVariance_Acct',TO_TIMESTAMP('2010-03-08 20:46:45','YYYY-MM-DD HH24:MI:SS'),100,'Average Cost Variance','D',10,'The Average Cost Variance is used in weighted average costing to reflect differences when posting costs for negative inventory.','Y','Y','N','N','N','N','N','N','N','N','N','N','Y','Average Cost Variance',TO_TIMESTAMP('2010-03-08 20:46:45','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Mar 8, 2010 8:46:45 PM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59072 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 8, 2010 8:46:50 PM COT +ALTER TABLE M_Product_Category_Acct ADD COLUMN P_AverageCostVariance_Acct NUMERIC(10) DEFAULT NULL +; + +-- Mar 8, 2010 8:47:12 PM COT +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,Updated,UpdatedBy,Version) VALUES (0,59073,54132,0,25,273,'P_AverageCostVariance_Acct',TO_TIMESTAMP('2010-03-08 20:47:11','YYYY-MM-DD HH24:MI:SS'),100,'Average Cost Variance','D',10,'The Average Cost Variance is used in weighted average costing to reflect differences when posting costs for negative inventory.','Y','Y','N','N','N','N','N','N','N','N','N','N','Y','Average Cost Variance',TO_TIMESTAMP('2010-03-08 20:47:11','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Mar 8, 2010 8:47:12 PM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=59073 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 8, 2010 8:47:17 PM COT +ALTER TABLE M_Product_Acct ADD COLUMN P_AverageCostVariance_Acct NUMERIC(10) DEFAULT NULL +; + +-- Mar 8, 2010 8:49:30 PM COT +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_FieldGroup_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,59071,106,58783,0,252,TO_TIMESTAMP('2010-03-08 20:49:29','YYYY-MM-DD HH24:MI:SS'),100,'Average Cost Variance',26,'D','The Average Cost Variance is used in weighted average costing to reflect differences when posting costs for negative inventory.','Y','Y','Y','N','N','N','N','N','Average Cost Variance',770,0,TO_TIMESTAMP('2010-03-08 20:49:29','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Mar 8, 2010 8:49:30 PM COT +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58783 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Mar 8, 2010 8:50:01 PM COT +UPDATE AD_Field SET SeqNo=280,IsDisplayed='Y' WHERE AD_Field_ID=58783 +; + +-- Mar 8, 2010 8:50:01 PM COT +UPDATE AD_Field SET SeqNo=290,IsDisplayed='Y' WHERE AD_Field_ID=4861 +; + +-- Mar 8, 2010 8:50:01 PM COT +UPDATE AD_Field SET SeqNo=300,IsDisplayed='Y' WHERE AD_Field_ID=4862 +; + +-- Mar 8, 2010 8:50:01 PM COT +UPDATE AD_Field SET SeqNo=310,IsDisplayed='Y' WHERE AD_Field_ID=2663 +; + +-- Mar 8, 2010 8:50:01 PM COT +UPDATE AD_Field SET SeqNo=320,IsDisplayed='Y' WHERE AD_Field_ID=4863 +; + +-- Mar 8, 2010 8:50:01 PM COT +UPDATE AD_Field SET SeqNo=330,IsDisplayed='Y' WHERE AD_Field_ID=2662 +; + +-- Mar 8, 2010 8:50:01 PM COT +UPDATE AD_Field SET SeqNo=340,IsDisplayed='Y' WHERE AD_Field_ID=3824 +; + +-- Mar 8, 2010 8:50:01 PM COT +UPDATE AD_Field SET SeqNo=350,IsDisplayed='Y' WHERE AD_Field_ID=2654 +; + +-- Mar 8, 2010 8:50:01 PM COT +UPDATE AD_Field SET SeqNo=360,IsDisplayed='Y' WHERE AD_Field_ID=3835 +; + +-- Mar 8, 2010 8:50:01 PM COT +UPDATE AD_Field SET SeqNo=370,IsDisplayed='Y' WHERE AD_Field_ID=56529 +; + +-- Mar 8, 2010 8:50:01 PM COT +UPDATE AD_Field SET SeqNo=380,IsDisplayed='Y' WHERE AD_Field_ID=56522 +; + +-- Mar 8, 2010 8:50:01 PM COT +UPDATE AD_Field SET SeqNo=390,IsDisplayed='Y' WHERE AD_Field_ID=56524 +; + +-- Mar 8, 2010 8:50:01 PM COT +UPDATE AD_Field SET SeqNo=400,IsDisplayed='Y' WHERE AD_Field_ID=56528 +; + +-- Mar 8, 2010 8:50:01 PM COT +UPDATE AD_Field SET SeqNo=410,IsDisplayed='Y' WHERE AD_Field_ID=56527 +; + +-- Mar 8, 2010 8:50:01 PM COT +UPDATE AD_Field SET SeqNo=420,IsDisplayed='Y' WHERE AD_Field_ID=56525 +; + +-- Mar 8, 2010 8:50:01 PM COT +UPDATE AD_Field SET SeqNo=430,IsDisplayed='Y' WHERE AD_Field_ID=56523 +; + +-- Mar 8, 2010 8:50:01 PM COT +UPDATE AD_Field SET SeqNo=440,IsDisplayed='Y' WHERE AD_Field_ID=56520 +; + +-- Mar 8, 2010 8:50:01 PM COT +UPDATE AD_Field SET SeqNo=450,IsDisplayed='Y' WHERE AD_Field_ID=56521 +; + +-- Mar 8, 2010 8:50:01 PM COT +UPDATE AD_Field SET SeqNo=460,IsDisplayed='Y' WHERE AD_Field_ID=56526 +; + +-- Mar 8, 2010 8:50:01 PM COT +UPDATE AD_Field SET SeqNo=470,IsDisplayed='Y' WHERE AD_Field_ID=56550 +; + +-- Mar 8, 2010 8:50:01 PM COT +UPDATE AD_Field SET SeqNo=480,IsDisplayed='Y' WHERE AD_Field_ID=56551 +; + +-- Mar 8, 2010 8:50:01 PM COT +UPDATE AD_Field SET SeqNo=490,IsDisplayed='Y' WHERE AD_Field_ID=3842 +; + +-- Mar 8, 2010 8:50:01 PM COT +UPDATE AD_Field SET SeqNo=500,IsDisplayed='Y' WHERE AD_Field_ID=3841 +; + +-- Mar 8, 2010 8:50:01 PM COT +UPDATE AD_Field SET SeqNo=510,IsDisplayed='Y' WHERE AD_Field_ID=3846 +; + +-- Mar 8, 2010 8:50:01 PM COT +UPDATE AD_Field SET SeqNo=520,IsDisplayed='Y' WHERE AD_Field_ID=5133 +; + +-- Mar 8, 2010 8:50:01 PM COT +UPDATE AD_Field SET SeqNo=530,IsDisplayed='Y' WHERE AD_Field_ID=5132 +; + +-- Mar 8, 2010 8:50:02 PM COT +UPDATE AD_Field SET SeqNo=540,IsDisplayed='Y' WHERE AD_Field_ID=3843 +; + +-- Mar 8, 2010 8:50:02 PM COT +UPDATE AD_Field SET SeqNo=550,IsDisplayed='Y' WHERE AD_Field_ID=3845 +; + +-- Mar 8, 2010 8:50:02 PM COT +UPDATE AD_Field SET SeqNo=560,IsDisplayed='Y' WHERE AD_Field_ID=3844 +; + +-- Mar 8, 2010 8:50:02 PM COT +UPDATE AD_Field SET SeqNo=570,IsDisplayed='Y' WHERE AD_Field_ID=3849 +; + +-- Mar 8, 2010 8:50:02 PM COT +UPDATE AD_Field SET SeqNo=580,IsDisplayed='Y' WHERE AD_Field_ID=3850 +; + +-- Mar 8, 2010 8:50:02 PM COT +UPDATE AD_Field SET SeqNo=590,IsDisplayed='Y' WHERE AD_Field_ID=5138 +; + +-- Mar 8, 2010 8:50:02 PM COT +UPDATE AD_Field SET SeqNo=600,IsDisplayed='Y' WHERE AD_Field_ID=3847 +; + +-- Mar 8, 2010 8:50:02 PM COT +UPDATE AD_Field SET SeqNo=610,IsDisplayed='Y' WHERE AD_Field_ID=3839 +; + +-- Mar 8, 2010 8:50:02 PM COT +UPDATE AD_Field SET SeqNo=620,IsDisplayed='Y' WHERE AD_Field_ID=3837 +; + +-- Mar 8, 2010 8:50:02 PM COT +UPDATE AD_Field SET SeqNo=630,IsDisplayed='Y' WHERE AD_Field_ID=3840 +; + +-- Mar 8, 2010 8:50:02 PM COT +UPDATE AD_Field SET SeqNo=640,IsDisplayed='Y' WHERE AD_Field_ID=3838 +; + +-- Mar 8, 2010 8:50:02 PM COT +UPDATE AD_Field SET SeqNo=650,IsDisplayed='Y' WHERE AD_Field_ID=3836 +; + +-- Mar 8, 2010 8:50:02 PM COT +UPDATE AD_Field SET SeqNo=660,IsDisplayed='Y' WHERE AD_Field_ID=3851 +; + +-- Mar 8, 2010 8:50:02 PM COT +UPDATE AD_Field SET SeqNo=670,IsDisplayed='Y' WHERE AD_Field_ID=3852 +; + +-- Mar 8, 2010 8:50:02 PM COT +UPDATE AD_Field SET SeqNo=680,IsDisplayed='Y' WHERE AD_Field_ID=3830 +; + +-- Mar 8, 2010 8:50:02 PM COT +UPDATE AD_Field SET SeqNo=690,IsDisplayed='Y' WHERE AD_Field_ID=3831 +; + +-- Mar 8, 2010 8:50:02 PM COT +UPDATE AD_Field SET SeqNo=700,IsDisplayed='Y' WHERE AD_Field_ID=3832 +; + +-- Mar 8, 2010 8:50:02 PM COT +UPDATE AD_Field SET SeqNo=710,IsDisplayed='Y' WHERE AD_Field_ID=3833 +; + +-- Mar 8, 2010 8:50:02 PM COT +UPDATE AD_Field SET SeqNo=720,IsDisplayed='Y' WHERE AD_Field_ID=4092 +; + +-- Mar 8, 2010 8:50:02 PM COT +UPDATE AD_Field SET SeqNo=730,IsDisplayed='Y' WHERE AD_Field_ID=4093 +; + +-- Mar 8, 2010 8:50:02 PM COT +UPDATE AD_Field SET SeqNo=740,IsDisplayed='Y' WHERE AD_Field_ID=5134 +; + +-- Mar 8, 2010 8:50:02 PM COT +UPDATE AD_Field SET SeqNo=750,IsDisplayed='Y' WHERE AD_Field_ID=4094 +; + +-- Mar 8, 2010 8:50:02 PM COT +UPDATE AD_Field SET SeqNo=760,IsDisplayed='Y' WHERE AD_Field_ID=4095 +; + +-- Mar 8, 2010 8:50:02 PM COT +UPDATE AD_Field SET SeqNo=770,IsDisplayed='Y' WHERE AD_Field_ID=3823 +; + +-- Mar 8, 2010 8:50:56 PM COT +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,59072,58784,0,324,TO_TIMESTAMP('2010-03-08 20:50:55','YYYY-MM-DD HH24:MI:SS'),100,'Average Cost Variance',26,'D','The Average Cost Variance is used in weighted average costing to reflect differences when posting costs for negative inventory.','Y','Y','Y','N','N','N','N','N','Average Cost Variance',310,0,TO_TIMESTAMP('2010-03-08 20:50:55','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Mar 8, 2010 8:50:56 PM COT +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58784 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Mar 8, 2010 8:51:06 PM COT +UPDATE AD_Field SET SeqNo=150,IsDisplayed='Y' WHERE AD_Field_ID=58784 +; + +-- Mar 8, 2010 8:51:06 PM COT +UPDATE AD_Field SET SeqNo=160,IsDisplayed='Y' WHERE AD_Field_ID=4872 +; + +-- Mar 8, 2010 8:51:06 PM COT +UPDATE AD_Field SET SeqNo=170,IsDisplayed='Y' WHERE AD_Field_ID=4873 +; + +-- Mar 8, 2010 8:51:06 PM COT +UPDATE AD_Field SET SeqNo=180,IsDisplayed='Y' WHERE AD_Field_ID=3944 +; + +-- Mar 8, 2010 8:51:06 PM COT +UPDATE AD_Field SET SeqNo=190,IsDisplayed='Y' WHERE AD_Field_ID=56539 +; + +-- Mar 8, 2010 8:51:06 PM COT +UPDATE AD_Field SET SeqNo=200,IsDisplayed='Y' WHERE AD_Field_ID=56532 +; + +-- Mar 8, 2010 8:51:06 PM COT +UPDATE AD_Field SET SeqNo=210,IsDisplayed='Y' WHERE AD_Field_ID=56534 +; + +-- Mar 8, 2010 8:51:06 PM COT +UPDATE AD_Field SET SeqNo=220,IsDisplayed='Y' WHERE AD_Field_ID=56538 +; + +-- Mar 8, 2010 8:51:06 PM COT +UPDATE AD_Field SET SeqNo=230,IsDisplayed='Y' WHERE AD_Field_ID=56537 +; + +-- Mar 8, 2010 8:51:06 PM COT +UPDATE AD_Field SET SeqNo=240,IsDisplayed='Y' WHERE AD_Field_ID=56535 +; + +-- Mar 8, 2010 8:51:06 PM COT +UPDATE AD_Field SET SeqNo=250,IsDisplayed='Y' WHERE AD_Field_ID=56533 +; + +-- Mar 8, 2010 8:51:06 PM COT +UPDATE AD_Field SET SeqNo=260,IsDisplayed='Y' WHERE AD_Field_ID=56530 +; + +-- Mar 8, 2010 8:51:06 PM COT +UPDATE AD_Field SET SeqNo=270,IsDisplayed='Y' WHERE AD_Field_ID=56531 +; + +-- Mar 8, 2010 8:51:06 PM COT +UPDATE AD_Field SET SeqNo=280,IsDisplayed='Y' WHERE AD_Field_ID=56536 +; + +-- Mar 8, 2010 8:51:06 PM COT +UPDATE AD_Field SET SeqNo=290,IsDisplayed='Y' WHERE AD_Field_ID=56552 +; + +-- Mar 8, 2010 8:51:06 PM COT +UPDATE AD_Field SET SeqNo=300,IsDisplayed='Y' WHERE AD_Field_ID=56553 +; + +-- Mar 8, 2010 8:51:06 PM COT +UPDATE AD_Field SET SeqNo=310,IsDisplayed='Y' WHERE AD_Field_ID=3945 +; + +-- Mar 8, 2010 8:51:50 PM COT +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,59073,58785,0,210,TO_TIMESTAMP('2010-03-08 20:51:49','YYYY-MM-DD HH24:MI:SS'),100,'Average Cost Variance',26,'D','The Average Cost Variance is used in weighted average costing to reflect differences when posting costs for negative inventory.','Y','Y','Y','N','N','N','N','N','Average Cost Variance',280,0,TO_TIMESTAMP('2010-03-08 20:51:49','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Mar 8, 2010 8:51:50 PM COT +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=58785 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Mar 8, 2010 8:51:59 PM COT +UPDATE AD_Field SET SeqNo=130,IsDisplayed='Y' WHERE AD_Field_ID=58785 +; + +-- Mar 8, 2010 8:51:59 PM COT +UPDATE AD_Field SET SeqNo=140,IsDisplayed='Y' WHERE AD_Field_ID=4868 +; + +-- Mar 8, 2010 8:51:59 PM COT +UPDATE AD_Field SET SeqNo=150,IsDisplayed='Y' WHERE AD_Field_ID=4869 +; + +-- Mar 8, 2010 8:51:59 PM COT +UPDATE AD_Field SET SeqNo=160,IsDisplayed='Y' WHERE AD_Field_ID=2608 +; + +-- Mar 8, 2010 8:51:59 PM COT +UPDATE AD_Field SET SeqNo=170,IsDisplayed='Y' WHERE AD_Field_ID=56549 +; + +-- Mar 8, 2010 8:51:59 PM COT +UPDATE AD_Field SET SeqNo=180,IsDisplayed='Y' WHERE AD_Field_ID=56542 +; + +-- Mar 8, 2010 8:51:59 PM COT +UPDATE AD_Field SET SeqNo=190,IsDisplayed='Y' WHERE AD_Field_ID=56544 +; + +-- Mar 8, 2010 8:51:59 PM COT +UPDATE AD_Field SET SeqNo=200,IsDisplayed='Y' WHERE AD_Field_ID=56548 +; + +-- Mar 8, 2010 8:51:59 PM COT +UPDATE AD_Field SET SeqNo=210,IsDisplayed='Y' WHERE AD_Field_ID=56547 +; + +-- Mar 8, 2010 8:51:59 PM COT +UPDATE AD_Field SET SeqNo=220,IsDisplayed='Y' WHERE AD_Field_ID=56545 +; + +-- Mar 8, 2010 8:51:59 PM COT +UPDATE AD_Field SET SeqNo=230,IsDisplayed='Y' WHERE AD_Field_ID=56543 +; + +-- Mar 8, 2010 8:51:59 PM COT +UPDATE AD_Field SET SeqNo=240,IsDisplayed='Y' WHERE AD_Field_ID=56540 +; + +-- Mar 8, 2010 8:51:59 PM COT +UPDATE AD_Field SET SeqNo=250,IsDisplayed='Y' WHERE AD_Field_ID=56541 +; + +-- Mar 8, 2010 8:51:59 PM COT +UPDATE AD_Field SET SeqNo=260,IsDisplayed='Y' WHERE AD_Field_ID=56546 +; + +-- Mar 8, 2010 8:51:59 PM COT +UPDATE AD_Field SET SeqNo=270,IsDisplayed='Y' WHERE AD_Field_ID=56554 +; + +-- Mar 8, 2010 8:51:59 PM COT +UPDATE AD_Field SET SeqNo=280,IsDisplayed='Y' WHERE AD_Field_ID=56555 +; + +-- Mar 8, 2010 9:03:21 PM COT +UPDATE AD_Field SET IsMandatory='Y',Updated=TO_TIMESTAMP('2010-03-08 21:03:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=58783 +; + +-- Mar 8, 2010 9:03:44 PM COT +UPDATE AD_Field SET IsMandatory='Y',Updated=TO_TIMESTAMP('2010-03-08 21:03:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=58784 +; + +-- Mar 8, 2010 9:04:06 PM COT +UPDATE AD_Field SET IsMandatory='Y',Updated=TO_TIMESTAMP('2010-03-08 21:04:06','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=58785 +; + diff --git a/migration/354a-trunk/postgresql/676_FR2962094_SetAverageCostVarianceGW.sql b/migration/354a-trunk/postgresql/676_FR2962094_SetAverageCostVarianceGW.sql new file mode 100644 index 0000000000..a5551fb94f --- /dev/null +++ b/migration/354a-trunk/postgresql/676_FR2962094_SetAverageCostVarianceGW.sql @@ -0,0 +1,56 @@ +-- Mar 8, 2010 8:56:27 PM COT +-- FR2962094_Finish implementation of weighted average costing +INSERT INTO C_ElementValue (AccountSign,AccountType,AD_Client_ID,AD_Org_ID,C_Element_ID,C_ElementValue_ID,Created,CreatedBy,Description,IsActive,IsBankAccount,IsDocControlled,IsForeignCurrency,IsSummary,Name,PostActual,PostBudget,PostEncumbrance,PostStatistical,Updated,UpdatedBy,Value) VALUES ('N','E',11,0,105,50017,TO_TIMESTAMP('2010-03-08 20:56:26','YYYY-MM-DD HH24:MI:SS'),100,'Account for Average Cost Variance','Y','N','Y','N','N','Average Cost Variance','Y','Y','Y','Y',TO_TIMESTAMP('2010-03-08 20:56:26','YYYY-MM-DD HH24:MI:SS'),100,'58800') +; + +-- Mar 8, 2010 8:56:27 PM COT +INSERT INTO C_ElementValue_Trl (AD_Language,C_ElementValue_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.C_ElementValue_ID, t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, C_ElementValue t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.C_ElementValue_ID=50017 AND NOT EXISTS (SELECT * FROM C_ElementValue_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.C_ElementValue_ID=t.C_ElementValue_ID) +; + +-- Mar 8, 2010 8:56:27 PM COT +INSERT INTO AD_TreeNode (AD_Client_ID,AD_Org_ID, IsActive,Created,CreatedBy,Updated,UpdatedBy, AD_Tree_ID, Node_ID, Parent_ID, SeqNo) SELECT t.AD_Client_ID, 0, 'Y', CURRENT_TIMESTAMP, 100, CURRENT_TIMESTAMP, 100,t.AD_Tree_ID, 50017, 0, 999 FROM AD_Tree t WHERE t.AD_Client_ID=11 AND t.IsActive='Y' AND EXISTS (SELECT * FROM C_Element ae WHERE ae.C_Element_ID=105 AND t.AD_Tree_ID=ae.AD_Tree_ID) AND NOT EXISTS (SELECT * FROM AD_TreeNode e WHERE e.AD_Tree_ID=t.AD_Tree_ID AND Node_ID=50017) +; + +-- Mar 8, 2010 8:56:34 PM COT +UPDATE AD_TreeNode SET Parent_ID=443, SeqNo=0, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=101 AND Node_ID=444 +; + +-- Mar 8, 2010 8:56:34 PM COT +UPDATE AD_TreeNode SET Parent_ID=443, SeqNo=1, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=101 AND Node_ID=445 +; + +-- Mar 8, 2010 8:56:34 PM COT +UPDATE AD_TreeNode SET Parent_ID=443, SeqNo=2, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=101 AND Node_ID=635 +; + +-- Mar 8, 2010 8:56:34 PM COT +UPDATE AD_TreeNode SET Parent_ID=443, SeqNo=3, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=101 AND Node_ID=50001 +; + +-- Mar 8, 2010 8:56:34 PM COT +UPDATE AD_TreeNode SET Parent_ID=443, SeqNo=4, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=101 AND Node_ID=50002 +; + +-- Mar 8, 2010 8:56:34 PM COT +UPDATE AD_TreeNode SET Parent_ID=443, SeqNo=5, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=101 AND Node_ID=50003 +; + +-- Mar 8, 2010 8:56:34 PM COT +UPDATE AD_TreeNode SET Parent_ID=443, SeqNo=6, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=101 AND Node_ID=50004 +; + +-- Mar 8, 2010 8:56:34 PM COT +UPDATE AD_TreeNode SET Parent_ID=443, SeqNo=7, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=101 AND Node_ID=50017 +; + +-- Mar 8, 2010 8:58:19 PM COT +INSERT INTO C_ValidCombination (Account_ID,AD_Client_ID,AD_Org_ID,C_AcctSchema_ID,Combination,Created,CreatedBy,C_ValidCombination_ID,Description,IsActive,IsFullyQualified,Updated,UpdatedBy) VALUES (50017,11,11,101,'HQ-58800-_-_-_-_',TO_TIMESTAMP('2010-03-08 20:58:18','YYYY-MM-DD HH24:MI:SS'),100,50013,'HQ-Average Cost Variance-_-_-_-_','Y','Y',TO_TIMESTAMP('2010-03-08 20:58:18','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Mar 8, 2010 8:58:32 PM COT +UPDATE C_AcctSchema_Default SET P_AverageCostVariance_Acct=50013,Updated=TO_TIMESTAMP('2010-03-08 20:58:32','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE C_AcctSchema_ID=101 +; + +UPDATE M_Product_Category_Acct SET P_AverageCostVariance_Acct=50013,Updated=TO_TIMESTAMP('2010-03-08 20:58:32','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE C_AcctSchema_ID=101; + +UPDATE M_Product_Acct SET P_AverageCostVariance_Acct=50013,Updated=TO_TIMESTAMP('2010-03-08 20:58:32','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE C_AcctSchema_ID=101; diff --git a/migration/354a-trunk/postgresql/677_BT_2092712_Unalloc_payment_report.sql b/migration/354a-trunk/postgresql/677_BT_2092712_Unalloc_payment_report.sql new file mode 100644 index 0000000000..f4c7bf7056 --- /dev/null +++ b/migration/354a-trunk/postgresql/677_BT_2092712_Unalloc_payment_report.sql @@ -0,0 +1 @@ +UPDATE AD_ReportView SET WHERECLAUSE = 'DocStatus IN (''CO'',''CL'') AND IsAllocated=''N''' where ad_reportview_id=155; \ No newline at end of file diff --git a/migration/354a-trunk/postgresql/678_BF_1774758.sql b/migration/354a-trunk/postgresql/678_BF_1774758.sql new file mode 100644 index 0000000000..5532c1953f --- /dev/null +++ b/migration/354a-trunk/postgresql/678_BF_1774758.sql @@ -0,0 +1,9 @@ +-- +-- BF [ 1774758 ] No default Sales Representant in request window +-- + +UPDATE AD_COLUMN + SET DefaultValue = '@#AD_User_ID@' + WHERE DefaultValue = '@AD_User_ID@' AND AD_Column_ID = 5432; + +COMMIT; diff --git a/migration/354a-trunk/postgresql/679_BF2042466FixProductURL.sql b/migration/354a-trunk/postgresql/679_BF2042466FixProductURL.sql new file mode 100644 index 0000000000..288c346a03 --- /dev/null +++ b/migration/354a-trunk/postgresql/679_BF2042466FixProductURL.sql @@ -0,0 +1,8 @@ +-- Mar 11, 2010 3:09:41 PM COT +UPDATE M_Product SET DescriptionURL='http://www.adempiere.com/index.php/SampleProductDescriptionForDocumentation', ImageURL='http://www.adempiere.com/images/f/f5/C32.png', IsStocked='N',Updated=TO_TIMESTAMP('2010-03-11 15:09:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE M_Product_ID=146 +; + +-- Mar 11, 2010 3:09:58 PM COT +UPDATE M_Product SET ImageURL='http://www.adempiere.com/images/f/f5/C32.png', IsStocked='N',Updated=TO_TIMESTAMP('2010-03-11 15:09:58','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE M_Product_ID=126 +; + diff --git a/migration/354a-trunk/postgresql/680_BF2970013.sql b/migration/354a-trunk/postgresql/680_BF2970013.sql new file mode 100644 index 0000000000..b19c9d78d0 --- /dev/null +++ b/migration/354a-trunk/postgresql/680_BF2970013.sql @@ -0,0 +1,82 @@ +-- Mar 13, 2010 5:43:23 PM COT +-- BF2970013_Process Para uniqueness required +UPDATE AD_Process_Para SET SeqNo=20,Updated=TO_TIMESTAMP('2010-03-13 17:43:23','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=131 +; + +-- Mar 13, 2010 5:43:25 PM COT +UPDATE AD_Process_Para SET SeqNo=30,Updated=TO_TIMESTAMP('2010-03-13 17:43:25','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=244 +; + +-- Mar 13, 2010 5:43:27 PM COT +UPDATE AD_Process_Para SET SeqNo=40,Updated=TO_TIMESTAMP('2010-03-13 17:43:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=53074 +; + +-- Mar 13, 2010 5:43:33 PM COT +UPDATE AD_Process_Para SET SeqNo=50,Updated=TO_TIMESTAMP('2010-03-13 17:43:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=53073 +; + +-- Mar 13, 2010 5:43:58 PM COT +UPDATE AD_Process_Para SET SeqNo=50,Updated=TO_TIMESTAMP('2010-03-13 17:43:58','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=471 +; + +-- Mar 13, 2010 5:44:32 PM COT +UPDATE AD_Process_Para SET SeqNo=140,Updated=TO_TIMESTAMP('2010-03-13 17:44:32','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=453 +; + +-- Mar 13, 2010 5:45:12 PM COT +UPDATE AD_Process_Para SET SeqNo=140,Updated=TO_TIMESTAMP('2010-03-13 17:45:12','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=454 +; + +-- Mar 13, 2010 5:45:56 PM COT +UPDATE AD_Process_Para SET SeqNo=50,Updated=TO_TIMESTAMP('2010-03-13 17:45:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=397 +; + +-- Mar 13, 2010 5:46:18 PM COT +UPDATE AD_Process_Para SET SeqNo=30,Updated=TO_TIMESTAMP('2010-03-13 17:46:18','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=588 +; + +-- Mar 13, 2010 5:46:20 PM COT +UPDATE AD_Process_Para SET SeqNo=40,Updated=TO_TIMESTAMP('2010-03-13 17:46:20','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=585 +; + +-- Mar 13, 2010 5:46:22 PM COT +UPDATE AD_Process_Para SET SeqNo=50,Updated=TO_TIMESTAMP('2010-03-13 17:46:22','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=53153 +; + +-- Mar 13, 2010 5:46:23 PM COT +UPDATE AD_Process_Para SET SeqNo=60,Updated=TO_TIMESTAMP('2010-03-13 17:46:23','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=53154 +; + +-- Mar 13, 2010 5:46:25 PM COT +UPDATE AD_Process_Para SET SeqNo=70,Updated=TO_TIMESTAMP('2010-03-13 17:46:25','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=586 +; + +-- Mar 13, 2010 5:46:27 PM COT +UPDATE AD_Process_Para SET SeqNo=80,Updated=TO_TIMESTAMP('2010-03-13 17:46:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=587 +; + +-- Mar 13, 2010 5:46:55 PM COT +UPDATE AD_Process_Para SET SeqNo=40,Updated=TO_TIMESTAMP('2010-03-13 17:46:55','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=53066 +; + +-- Mar 13, 2010 5:46:56 PM COT +UPDATE AD_Process_Para SET SeqNo=50,Updated=TO_TIMESTAMP('2010-03-13 17:46:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=53067 +; + +-- Mar 13, 2010 5:47:22 PM COT +UPDATE AD_Process_Para SET SeqNo=140,Updated=TO_TIMESTAMP('2010-03-13 17:47:22','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=53123 +; + +-- Mar 13, 2010 5:47:43 PM COT +UPDATE AD_Process_Para SET SeqNo=60,Updated=TO_TIMESTAMP('2010-03-13 17:47:43','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=53275 +; + +-- Mar 13, 2010 5:47:46 PM COT +UPDATE AD_Process_Para SET SeqNo=70,Updated=TO_TIMESTAMP('2010-03-13 17:47:46','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=53280 +; + +-- Mar 13, 2010 5:47:50 PM COT +UPDATE AD_Process_Para SET EntityType='EE01',Updated=TO_TIMESTAMP('2010-03-13 17:47:50','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=53275 +; + +create unique index ad_procpara_procseqno on ad_process_para (ad_process_id, seqno); diff --git a/migration/354a-trunk/postgresql/681_BF2968442.sql b/migration/354a-trunk/postgresql/681_BF2968442.sql new file mode 100644 index 0000000000..50a5bfb19a --- /dev/null +++ b/migration/354a-trunk/postgresql/681_BF2968442.sql @@ -0,0 +1,146 @@ +-- Mar 13, 2010 11:54:49 PM COT +-- BF_2968442_Post without Application Server +UPDATE AD_Element SET Description='Post the accounting immediately for testing (Deprecated)', Help='If selected, the accounting consequences are immediately generated when completing a document. Otherwise the document is posted by a batch process. You should select this only if you are testing. +Deprecated column - use instead the functionality Client Accounting.', Name='Post Immediately (Deprecated)',Updated=TO_TIMESTAMP('2010-03-13 23:54:49','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=2843 +; + +-- Mar 13, 2010 11:54:49 PM COT +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=2843 +; + +-- Mar 13, 2010 11:54:49 PM COT +UPDATE AD_Column SET ColumnName='IsPostImmediate', Name='Post Immediately (Deprecated)', Description='Post the accounting immediately for testing (Deprecated)', Help='If selected, the accounting consequences are immediately generated when completing a document. Otherwise the document is posted by a batch process. You should select this only if you are testing. +Deprecated column - use instead the functionality Client Accounting.' WHERE AD_Element_ID=2843 +; + +-- Mar 13, 2010 11:54:50 PM COT +UPDATE AD_Process_Para SET ColumnName='IsPostImmediate', Name='Post Immediately (Deprecated)', Description='Post the accounting immediately for testing (Deprecated)', Help='If selected, the accounting consequences are immediately generated when completing a document. Otherwise the document is posted by a batch process. You should select this only if you are testing. +Deprecated column - use instead the functionality Client Accounting.', AD_Element_ID=2843 WHERE UPPER(ColumnName)='ISPOSTIMMEDIATE' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL +; + +-- Mar 13, 2010 11:54:50 PM COT +UPDATE AD_Process_Para SET ColumnName='IsPostImmediate', Name='Post Immediately (Deprecated)', Description='Post the accounting immediately for testing (Deprecated)', Help='If selected, the accounting consequences are immediately generated when completing a document. Otherwise the document is posted by a batch process. You should select this only if you are testing. +Deprecated column - use instead the functionality Client Accounting.' WHERE AD_Element_ID=2843 AND IsCentrallyMaintained='Y' +; + +-- Mar 13, 2010 11:54:50 PM COT +UPDATE AD_Field SET Name='Post Immediately (Deprecated)', Description='Post the accounting immediately for testing (Deprecated)', Help='If selected, the accounting consequences are immediately generated when completing a document. Otherwise the document is posted by a batch process. You should select this only if you are testing. +Deprecated column - use instead the functionality Client Accounting.' WHERE AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=2843) AND IsCentrallyMaintained='Y' +; + +-- Mar 13, 2010 11:54:50 PM COT +UPDATE AD_PrintFormatItem SET PrintName='Post Immediate', Name='Post Immediately (Deprecated)' WHERE IsCentrallyMaintained='Y' AND EXISTS (SELECT * FROM AD_Column c WHERE c.AD_Column_ID=AD_PrintFormatItem.AD_Column_ID AND c.AD_Element_ID=2843) +; + +-- Mar 13, 2010 11:55:40 PM COT +UPDATE AD_Field SET IsSameLine='N',Updated=TO_TIMESTAMP('2010-03-13 23:55:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=12326 +; + +-- Mar 13, 2010 11:55:55 PM COT +UPDATE AD_Field SET SeqNo=0,IsDisplayed='N' WHERE AD_Field_ID=12327 +; + +-- Mar 13, 2010 11:55:55 PM COT +UPDATE AD_Field SET SeqNo=20,IsDisplayed='Y' WHERE AD_Field_ID=317 +; + +-- Mar 13, 2010 11:55:55 PM COT +UPDATE AD_Field SET SeqNo=30,IsDisplayed='Y' WHERE AD_Field_ID=318 +; + +-- Mar 13, 2010 11:55:55 PM COT +UPDATE AD_Field SET SeqNo=40,IsDisplayed='Y' WHERE AD_Field_ID=319 +; + +-- Mar 13, 2010 11:55:55 PM COT +UPDATE AD_Field SET SeqNo=50,IsDisplayed='Y' WHERE AD_Field_ID=10318 +; + +-- Mar 13, 2010 11:55:55 PM COT +UPDATE AD_Field SET SeqNo=60,IsDisplayed='Y' WHERE AD_Field_ID=5160 +; + +-- Mar 13, 2010 11:55:55 PM COT +UPDATE AD_Field SET SeqNo=70,IsDisplayed='Y' WHERE AD_Field_ID=5759 +; + +-- Mar 13, 2010 11:55:55 PM COT +UPDATE AD_Field SET SeqNo=80,IsDisplayed='Y' WHERE AD_Field_ID=11025 +; + +-- Mar 13, 2010 11:55:55 PM COT +UPDATE AD_Field SET SeqNo=90,IsDisplayed='Y' WHERE AD_Field_ID=11205 +; + +-- Mar 13, 2010 11:55:55 PM COT +UPDATE AD_Field SET SeqNo=100,IsDisplayed='Y' WHERE AD_Field_ID=3813 +; + +-- Mar 13, 2010 11:55:55 PM COT +UPDATE AD_Field SET SeqNo=110,IsDisplayed='Y' WHERE AD_Field_ID=5887 +; + +-- Mar 13, 2010 11:55:55 PM COT +UPDATE AD_Field SET SeqNo=120,IsDisplayed='Y' WHERE AD_Field_ID=5161 +; + +-- Mar 13, 2010 11:55:55 PM COT +UPDATE AD_Field SET SeqNo=130,IsDisplayed='Y' WHERE AD_Field_ID=5162 +; + +-- Mar 13, 2010 11:55:55 PM COT +UPDATE AD_Field SET SeqNo=140,IsDisplayed='Y' WHERE AD_Field_ID=5163 +; + +-- Mar 13, 2010 11:55:55 PM COT +UPDATE AD_Field SET SeqNo=150,IsDisplayed='Y' WHERE AD_Field_ID=5164 +; + +-- Mar 13, 2010 11:55:55 PM COT +UPDATE AD_Field SET SeqNo=160,IsDisplayed='Y' WHERE AD_Field_ID=12099 +; + +-- Mar 13, 2010 11:55:55 PM COT +UPDATE AD_Field SET SeqNo=170,IsDisplayed='Y' WHERE AD_Field_ID=12098 +; + +-- Mar 13, 2010 11:55:55 PM COT +UPDATE AD_Field SET SeqNo=180,IsDisplayed='Y' WHERE AD_Field_ID=11024 +; + +-- Mar 13, 2010 11:55:55 PM COT +UPDATE AD_Field SET SeqNo=190,IsDisplayed='Y' WHERE AD_Field_ID=12326 +; + +-- Mar 13, 2010 11:55:55 PM COT +UPDATE AD_Field SET SeqNo=200,IsDisplayed='Y' WHERE AD_Field_ID=50158 +; + +-- Mar 13, 2010 11:55:55 PM COT +UPDATE AD_Field SET SeqNo=210,IsDisplayed='Y' WHERE AD_Field_ID=50159 +; + +-- Mar 13, 2010 11:55:55 PM COT +UPDATE AD_Field SET SeqNo=220,IsDisplayed='Y' WHERE AD_Field_ID=50160 +; + +-- Mar 13, 2010 11:55:55 PM COT +UPDATE AD_Field SET SeqNo=230,IsDisplayed='Y' WHERE AD_Field_ID=50184 +; + +-- Mar 13, 2010 11:55:56 PM COT +UPDATE AD_Field SET SeqNo=240,IsDisplayed='Y' WHERE AD_Field_ID=50185 +; + +-- Mar 13, 2010 11:55:56 PM COT +UPDATE AD_Field SET SeqNo=250,IsDisplayed='Y' WHERE AD_Field_ID=50186 +; + +-- Mar 13, 2010 11:55:56 PM COT +UPDATE AD_Field SET SeqNo=260,IsDisplayed='Y' WHERE AD_Field_ID=54238 +; + +-- Mar 13, 2010 11:55:56 PM COT +UPDATE AD_Field SET SeqNo=270,IsDisplayed='Y' WHERE AD_Field_ID=54680 +; + diff --git a/plugins/TestPlugin/plugin.xml b/plugins/TestPlugin/plugin.xml index 9abc5ee788..7d9b37eee3 100644 --- a/plugins/TestPlugin/plugin.xml +++ b/plugins/TestPlugin/plugin.xml @@ -8,6 +8,11 @@ columnName="Description" tableName="C_Order"> + + diff --git a/serverRoot/.classpath b/serverRoot/.classpath index e3f33e23b5..7b34e694b2 100644 --- a/serverRoot/.classpath +++ b/serverRoot/.classpath @@ -8,6 +8,7 @@ + diff --git a/serverRoot/build.xml b/serverRoot/build.xml index b6a84908c2..0239bd688b 100644 --- a/serverRoot/build.xml +++ b/serverRoot/build.xml @@ -38,6 +38,7 @@ + diff --git a/serverRoot/src/main/server/org/adempiere/server/rpl/imp/TopicListener.java b/serverRoot/src/main/server/org/adempiere/server/rpl/imp/TopicListener.java index 39bf952c95..8a36c9f545 100644 --- a/serverRoot/src/main/server/org/adempiere/server/rpl/imp/TopicListener.java +++ b/serverRoot/src/main/server/org/adempiere/server/rpl/imp/TopicListener.java @@ -279,7 +279,7 @@ public class TopicListener implements MessageListener { TextMessage txtMessage = (TextMessage) message; String text = txtMessage.getText(); - //log.finest("Received message: \n" + text ); + log.finest("Received message: \n" + text ); Document documentToBeImported = XMLHelper.createDocumentFromString( text ); StringBuffer result = new StringBuffer(); @@ -288,28 +288,45 @@ public class TopicListener implements MessageListener { impHelper.importXMLDocument(result, documentToBeImported, trxName ); - - MIMPProcessorLog pLog = new MIMPProcessorLog(replicationProcessor.getMImportProcessor(), "Imported Document!"); - //pLog.setReference("topicName = " + topicName ); - if (text.length() > 2000 ) { - pLog.setTextMsg( text.substring(0, 1999) ); - } else { - pLog.setTextMsg( text); + log.finest("Replicated ..."); + + if(replicationProcessor != null) + { + MIMPProcessorLog pLog = new MIMPProcessorLog(replicationProcessor.getMImportProcessor(), "Imported Document!"); + //pLog.setReference("topicName = " + topicName ); + if (text.length() > 2000 ) { + pLog.setTextMsg( text.substring(0, 1999) ); + } else { + pLog.setTextMsg( text); + } + + pLog.saveEx(); } - boolean resultSave = pLog.save(); - log.finest("Result Save = " + resultSave); - session.commit(); - } catch (Exception e) { - replicationProcessor.setProcessRunning(false); - try { + } + catch (Exception e) + { + log.finest("Rollback = " + e.toString()); + try + { session.rollback(); - } catch (JMSException e1) { - e1.printStackTrace(); + stop(); + //replicationProcessor.interrupt(); + //replicationProcessor.join(); + replicationProcessor.setProcessRunning(false); + } + /*catch (InterruptedException e1) { + // TODO Auto-generated catch block + e1.printStackTrace(); + }*/ + catch (JMSException e2) + { + e2.printStackTrace(); } e.printStackTrace(); + } } else { diff --git a/serverRoot/src/main/server/org/compiere/server/AcctProcessor.java b/serverRoot/src/main/server/org/compiere/server/AcctProcessor.java index 078697159f..31f9f4fa7c 100644 --- a/serverRoot/src/main/server/org/compiere/server/AcctProcessor.java +++ b/serverRoot/src/main/server/org/compiere/server/AcctProcessor.java @@ -16,9 +16,13 @@ *****************************************************************************/ package org.compiere.server; +import java.math.BigDecimal; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.Timestamp; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; import java.util.logging.Level; import org.compiere.acct.Doc; @@ -28,6 +32,7 @@ import org.compiere.model.MAcctSchema; import org.compiere.model.MClient; import org.compiere.model.MCost; import org.compiere.util.DB; +import org.compiere.util.Env; import org.compiere.util.TimeUtil; @@ -88,31 +93,101 @@ public class AcctProcessor extends AdempiereServer */ private void postSession() { - for (int i = 0; i < Doc.getDocumentsTableID().length; i++) + List listProcessedOn = new ArrayList(); + listProcessedOn.add(Env.ZERO); // to include potential null values + + //get current time from db + Timestamp ts = DB.getSQLValueTS(null, "SELECT CURRENT_TIMESTAMP FROM DUAL"); + + //go back 2 second to be safe (to avoid posting documents being completed at this precise moment) + long ms = ts.getTime()- (2 * 1000); + ts = new Timestamp(ms); + long mili = ts.getTime(); + BigDecimal value = new BigDecimal(Long.toString(mili)); + + //first pass, collect all ts (FR 2962094 - required for weighted average costing) + int[] documentsTableID = Doc.getDocumentsTableID(); + String[] documentsTableName = Doc.getDocumentsTableName(); + for (int i = 0; i < documentsTableID.length; i++) { - int AD_Table_ID = Doc.getDocumentsTableID()[i]; - String TableName = Doc.getDocumentsTableName()[i]; + int AD_Table_ID = documentsTableID[i]; + String TableName = documentsTableName[i]; + // Post only special documents + if (m_model.getAD_Table_ID() != 0 + && m_model.getAD_Table_ID() != AD_Table_ID) + continue; + + StringBuffer sql = new StringBuffer ("SELECT DISTINCT ProcessedOn FROM ").append(TableName) + .append(" WHERE AD_Client_ID=? AND ProcessedOn 0) + } // for tableID + + } // for processedOn + + for (int i = 0; i < documentsTableID.length; i++) + { + String TableName = documentsTableName[i]; + if (count[i] > 0) { - m_summary.append(TableName).append("=").append(count); - if (countError > 0) - m_summary.append("(Errors=").append(countError).append(")"); + m_summary.append(TableName).append("=").append(count[i]); + if (countError[i] > 0) + m_summary.append("(Errors=").append(countError[i]).append(")"); m_summary.append(" - "); log.finer(getName() + ": " + m_summary.toString()); } else log.finer(getName() + ": " + TableName + " - no work"); } + } // postSession /** diff --git a/serverRoot/src/main/server/org/compiere/server/AdempiereServer.java b/serverRoot/src/main/server/org/compiere/server/AdempiereServer.java index 00286c0202..d15467d74a 100644 --- a/serverRoot/src/main/server/org/compiere/server/AdempiereServer.java +++ b/serverRoot/src/main/server/org/compiere/server/AdempiereServer.java @@ -22,6 +22,7 @@ import java.util.logging.Level; import org.compiere.ldap.LdapProcessor; import org.compiere.model.AdempiereProcessor; +import org.compiere.model.AdempiereProcessor2; import org.compiere.model.AdempiereProcessorLog; import org.compiere.model.MAcctProcessor; import org.compiere.model.MAlertProcessor; @@ -31,7 +32,6 @@ import org.compiere.model.MLdapProcessor; import org.compiere.model.MRequestProcessor; import org.compiere.model.MScheduler; import org.compiere.model.MSystem; -import org.compiere.model.X_R_RequestProcessor; import org.compiere.util.CLogger; import org.compiere.util.Env; import org.compiere.util.TimeUtil; @@ -39,7 +39,7 @@ import org.compiere.wf.MWorkflowProcessor; /** * Adempiere Server Base - * + * * @author Jorg Janke * @version $Id: AdempiereServer.java,v 1.3 2006/10/09 00:23:26 jjanke Exp $ */ @@ -70,7 +70,7 @@ public abstract class AdempiereServer extends Thread throw new IllegalArgumentException("Unknown Processor"); } // create - + /************************************************************************** * Server Base Class * @param model model @@ -85,7 +85,10 @@ public abstract class AdempiereServer extends Thread p_system = MSystem.get(m_ctx); p_client = MClient.get(m_ctx); Env.setContext(m_ctx, "#AD_Client_ID", p_client.getAD_Client_ID()); - m_initialNap = initialNap; + m_initialNap = initialNap; + Timestamp dateNextRun = getDateNextRun(true); + if (dateNextRun != null) + m_nextWork = dateNextRun.getTime(); // log.info(model.getName() + " - " + getThreadGroup()); } // ServerBase @@ -93,7 +96,7 @@ public abstract class AdempiereServer extends Thread protected AdempiereProcessor p_model; /** Initial nap is seconds */ private int m_initialNap = 0; - + /** Miliseconds to sleep - 10 Min default */ private long m_sleepMS = 600000; /** Sleeping */ @@ -110,16 +113,16 @@ public abstract class AdempiereServer extends Thread private long m_runTotalMS = 0; /** When to run next */ private long m_nextWork = 0; - + /** Logger */ protected CLogger log = CLogger.getCLogger(getClass()); /** Context */ private Properties m_ctx = null; /** System */ - protected static MSystem p_system = null; + protected static MSystem p_system = null; /** Client */ - protected MClient p_client = null; - + protected MClient p_client = null; + /** * Get Server Context * @return context @@ -128,7 +131,7 @@ public abstract class AdempiereServer extends Thread { return m_ctx; } // getCtx - + /** * @return Returns the sleepMS. */ @@ -136,8 +139,8 @@ public abstract class AdempiereServer extends Thread { return m_sleepMS; } // getSleepMS - - + + /** * Sleep for set time * @return true if not interrupted @@ -175,7 +178,7 @@ public abstract class AdempiereServer extends Thread doWork(); long now = System.currentTimeMillis(); // --------------- - + p_runCount++; m_runLastMS = now - p_startWork; m_runTotalMS += m_runLastMS; @@ -185,7 +188,7 @@ public abstract class AdempiereServer extends Thread // log.fine(getName() + ": " + getStatistics()); } // runNow - + /************************************************************************** * Run async */ @@ -201,7 +204,7 @@ public abstract class AdempiereServer extends Thread log.log(Level.SEVERE, getName() + ": pre-nap interrupted", e); return; } - + m_start = System.currentTimeMillis(); while (true) { @@ -223,21 +226,44 @@ public abstract class AdempiereServer extends Thread log.info (getName() + ": interrupted"); break; } - + // --------------- p_startWork = System.currentTimeMillis(); doWork(); now = System.currentTimeMillis(); // --------------- - + p_runCount++; m_runLastMS = now - p_startWork; m_runTotalMS += m_runLastMS; // - m_sleepMS = calculateSleep(); - m_nextWork = now + m_sleepMS; + m_sleepMS = calculateSleep(); + Timestamp lastRun = new Timestamp(now); + if (p_model instanceof AdempiereProcessor2) + { + AdempiereProcessor2 ap = (AdempiereProcessor2) p_model; + if (ap.isIgnoreProcessingTime()) + { + lastRun = new Timestamp(p_startWork); + if (m_nextWork <= 0) + m_nextWork = p_startWork; + m_nextWork = m_nextWork + m_sleepMS; + while (m_nextWork < now) + { + m_nextWork = m_nextWork + m_sleepMS; + } + } + else + { + m_nextWork = now + m_sleepMS; + } + } + else + { + m_nextWork = now + m_sleepMS; + } // - p_model.setDateLastRun(new Timestamp(now)); + p_model.setDateLastRun(lastRun); p_model.setDateNextRun(new Timestamp(m_nextWork)); p_model.save(); // @@ -254,12 +280,12 @@ public abstract class AdempiereServer extends Thread */ public String getStatistics() { - return "Run #" + p_runCount + return "Run #" + p_runCount + " - Last=" + TimeUtil.formatElapsed(m_runLastMS) + " - Total=" + TimeUtil.formatElapsed(m_runTotalMS) + " - Next " + TimeUtil.formatElapsed(m_nextWork - System.currentTimeMillis()); } // getStatistics - + /** * Do the actual Work */ @@ -289,7 +315,7 @@ public abstract class AdempiereServer extends Thread { return p_model.getDateNextRun(requery); } // getDateNextRun - + /** * Get the date Last run * @return date lext run @@ -307,7 +333,7 @@ public abstract class AdempiereServer extends Thread { return p_model.getDescription(); } // getDescription - + /** * Get Model * @return Model @@ -316,7 +342,7 @@ public abstract class AdempiereServer extends Thread { return p_model; } // getModel - + /** * Calculate Sleep ms * @return miliseconds @@ -331,11 +357,11 @@ public abstract class AdempiereServer extends Thread long typeSec = 600; // 10 minutes if (frequencyType == null) typeSec = 300; // 5 minutes - else if (X_R_RequestProcessor.FREQUENCYTYPE_Minute.equals(frequencyType)) + else if (MRequestProcessor.FREQUENCYTYPE_Minute.equals(frequencyType)) typeSec = 60; - else if (X_R_RequestProcessor.FREQUENCYTYPE_Hour.equals(frequencyType)) + else if (MRequestProcessor.FREQUENCYTYPE_Hour.equals(frequencyType)) typeSec = 3600; - else if (X_R_RequestProcessor.FREQUENCYTYPE_Day.equals(frequencyType)) + else if (MRequestProcessor.FREQUENCYTYPE_Day.equals(frequencyType)) typeSec = 86400; // return typeSec * 1000 * frequency; // ms @@ -349,7 +375,7 @@ public abstract class AdempiereServer extends Thread { return m_sleeping; } // isSleeping - + /** * String Representation * @return info @@ -379,7 +405,7 @@ public abstract class AdempiereServer extends Thread long ms = (now-m_start) / 1000; return (int)ms; } // getSecondsAlive - + /** * Get Start Time * @return start time @@ -390,7 +416,7 @@ public abstract class AdempiereServer extends Thread return null; return new Timestamp (m_start); } // getStartTime - + /** * Get Processor Logs * @return logs diff --git a/serverRoot/src/main/server/org/compiere/server/ReplicationProcessor.java b/serverRoot/src/main/server/org/compiere/server/ReplicationProcessor.java index cc691d5cc2..fed57b86c7 100644 --- a/serverRoot/src/main/server/org/compiere/server/ReplicationProcessor.java +++ b/serverRoot/src/main/server/org/compiere/server/ReplicationProcessor.java @@ -85,62 +85,66 @@ public class ReplicationProcessor extends AdempiereServer { @SuppressWarnings("unchecked") @Override - protected void doWork() { - if (isProcessRunning) { + protected void doWork() + { + if (isProcessRunning) + { // process is already started successfully! - } else { - // process is not started! - - m_summary = new StringBuffer(); - String trxName = mImportProcessor.get_TrxName(); - if ( trxName == null || "".equals(trxName) ) { + } + else + { + // process is not started! + + m_summary = new StringBuffer(); + String trxName = mImportProcessor.get_TrxName(); + if ( trxName == null || "".equals(trxName) ) + { // trxName = "ImportProcessor-" + System.currentTimeMillis(); - } - log.fine("trxName = " + trxName); - log.fine("ImportProcessor = " + mImportProcessor); - - int IMP_ProcessorType_ID = 0; - IMP_ProcessorType_ID = mImportProcessor.getIMP_Processor_Type_ID(); - X_IMP_Processor_Type impProcessor_Type = new X_IMP_Processor_Type(mImportProcessor.getCtx(), IMP_ProcessorType_ID, trxName ); - log.fine("impProcessor_Type = " + impProcessor_Type); // TODO --- REMOVE - - String javaClass = impProcessor_Type.getJavaClass(); - IImportProcessor importProcessor = null; - try { - Class clazz = Class.forName(javaClass); - importProcessor = (IImportProcessor)clazz.newInstance(); - - importProcessor.process(mImportProcessor.getCtx(), this, trxName ); - - } catch (Exception e) { + } + log.fine("trxName = " + trxName); + log.fine("ImportProcessor = " + mImportProcessor); + + int IMP_ProcessorType_ID = 0; + IMP_ProcessorType_ID = mImportProcessor.getIMP_Processor_Type_ID(); + X_IMP_Processor_Type impProcessor_Type = new X_IMP_Processor_Type(mImportProcessor.getCtx(), IMP_ProcessorType_ID, trxName ); + log.fine("impProcessor_Type = " + impProcessor_Type); // TODO --- REMOVE + + String javaClass = impProcessor_Type.getJavaClass(); + IImportProcessor importProcessor = null; + try + { + Class clazz = Class.forName(javaClass); + importProcessor = (IImportProcessor)clazz.newInstance(); + importProcessor.process(mImportProcessor.getCtx(), this, trxName ); + } + catch (Exception e) + { isProcessRunning = false; log.fine("ReplicationProcessor caught an exception !!!" ); e.printStackTrace(); - - log.severe( e.getMessage() ); - + log.severe(e.getMessage()); MIMPProcessorLog pLog = new MIMPProcessorLog(mImportProcessor, e.getMessage() ); pLog.setReference("#" + String.valueOf(p_runCount) + " - " + TimeUtil.formatElapsed(new Timestamp(p_startWork))); - boolean resultSave = pLog.save(); - - try { - importProcessor.stop(); - } catch (Exception e1) { - e1.printStackTrace(); - MIMPProcessorLog pLog2 = new MIMPProcessorLog(mImportProcessor, e1.getMessage() ); - - boolean resultSave2 = pLog2.save(); + pLog.saveEx(); + try + { + importProcessor.stop(); } - } - + catch (Exception e1) + { + e1.printStackTrace(); + MIMPProcessorLog pLog2 = new MIMPProcessorLog(mImportProcessor, e1.getMessage() ); + pLog2.saveEx(); + } + } // int no = mImportProcessor.deleteLog(); m_summary.append("Logs Records deleted=").append(no).append("; "); // MIMPProcessorLog pLog = new MIMPProcessorLog(mImportProcessor, m_summary.toString()); pLog.setReference("#" + String.valueOf(p_runCount) + " - " + TimeUtil.formatElapsed(new Timestamp(p_startWork))); - boolean resultSave = pLog.save(); + pLog.saveEx(); } } diff --git a/serverRoot/src/main/server/org/compiere/server/Scheduler.java b/serverRoot/src/main/server/org/compiere/server/Scheduler.java index 1860df0e10..50019624be 100644 --- a/serverRoot/src/main/server/org/compiere/server/Scheduler.java +++ b/serverRoot/src/main/server/org/compiere/server/Scheduler.java @@ -16,17 +16,24 @@ *****************************************************************************/ package org.compiere.server; +import it.sauronsoftware.cron4j.Predictor; +import it.sauronsoftware.cron4j.SchedulingPattern; + import java.io.File; import java.math.BigDecimal; import java.sql.Timestamp; +import java.text.SimpleDateFormat; +import java.util.Properties; import java.util.logging.Level; import org.compiere.model.MAttachment; import org.compiere.model.MClient; import org.compiere.model.MNote; +import org.compiere.model.MOrgInfo; import org.compiere.model.MPInstance; import org.compiere.model.MPInstancePara; import org.compiere.model.MProcess; +import org.compiere.model.MRole; import org.compiere.model.MScheduler; import org.compiere.model.MSchedulerLog; import org.compiere.model.MSchedulerPara; @@ -42,7 +49,7 @@ import org.compiere.util.Trx; /** * Scheduler - * + * * @author Jorg Janke * @version $Id: Scheduler.java,v 1.5 2006/07/30 00:53:33 jjanke Exp $ */ @@ -66,6 +73,12 @@ public class Scheduler extends AdempiereServer /** Transaction */ private Trx m_trx = null; + private it.sauronsoftware.cron4j.Scheduler cronScheduler; + private Predictor predictor; + + // ctx for the report/process + Properties m_schedulerctx = new Properties(); + /** * Work */ @@ -73,15 +86,36 @@ public class Scheduler extends AdempiereServer { m_summary = new StringBuffer(m_model.toString()) .append(" - "); - // - MProcess process = m_model.getProcess(); + + // Prepare a ctx for the report/process - BF [1966880] + m_schedulerctx.clear(); + MClient schedclient = MClient.get(getCtx(), m_model.getAD_Client_ID()); + Env.setContext(m_schedulerctx, "#AD_Client_ID", schedclient.getAD_Client_ID()); + Env.setContext(m_schedulerctx, "#AD_Language", schedclient.getAD_Language()); + Env.setContext(m_schedulerctx, "#AD_Org_ID", m_model.getAD_Org_ID()); + if (m_model.getAD_Org_ID() != 0) { + MOrgInfo schedorg = MOrgInfo.get(getCtx(), m_model.getAD_Org_ID()); + if (schedorg.getM_Warehouse_ID() > 0) + Env.setContext(m_schedulerctx, "#M_Warehouse_ID", schedorg.getM_Warehouse_ID()); + } + Env.setContext(m_schedulerctx, "#AD_User_ID", getAD_User_ID()); + Env.setContext(m_schedulerctx, "#SalesRep_ID", getAD_User_ID()); + // TODO: It can be convenient to add AD_Scheduler.AD_Role_ID + MUser scheduser = MUser.get(getCtx(), getAD_User_ID()); + MRole[] schedroles = scheduser.getRoles(m_model.getAD_Org_ID()); + if (schedroles != null && schedroles.length > 0) + Env.setContext(m_schedulerctx, "#AD_Role_ID", schedroles[0].getAD_Role_ID()); // first role, ordered by AD_Role_ID + Timestamp ts = new Timestamp(System.currentTimeMillis()); + SimpleDateFormat dateFormat4Timestamp = new SimpleDateFormat("yyyy-MM-dd"); + Env.setContext(m_schedulerctx, "#Date", dateFormat4Timestamp.format(ts)+" 00:00:00" ); // JDBC format + Properties currentctx = Env.getCtx(); + Env.setCtx(m_schedulerctx); + + MProcess process = new MProcess(m_schedulerctx, m_model.getAD_Process_ID(), null); try { m_trx = Trx.get(Trx.createTrxName("Scheduler"), true); - if (process.isReport()) - m_summary.append(runReport(process)); - else - m_summary.append(runProcess(process)); + m_summary.append(runProcess(process)); m_trx.commit(true); } catch (Exception e) @@ -91,93 +125,27 @@ public class Scheduler extends AdempiereServer log.log(Level.WARNING, process.toString(), e); m_summary.append(e.toString()); } - finally + finally { if (m_trx != null) m_trx.close(); } + // Restore system context + Env.setCtx(currentctx); + // int no = m_model.deleteLog(); - m_summary.append("Logs deleted=").append(no); + m_summary.append(" Logs deleted=").append(no); // MSchedulerLog pLog = new MSchedulerLog(m_model, m_summary.toString()); - pLog.setReference("#" + String.valueOf(p_runCount) + pLog.setReference("#" + String.valueOf(p_runCount) + " - " + TimeUtil.formatElapsed(new Timestamp(p_startWork))); pLog.save(); } // doWork /** - * Run Report - * @param process - * @return summary - * @throws Exception - */ - private String runReport(MProcess process) throws Exception - { log.info(process.toString()); - if (!process.isReport() || process.getAD_ReportView_ID() == 0) - return "Not a Report AD_Process_ID=" + process.getAD_Process_ID() - + " - " + process.getName(); - // Process - int AD_Table_ID = 0; - int Record_ID = 0; - // - MPInstance pInstance = new MPInstance(process, Record_ID); - fillParameter(pInstance); - // - ProcessInfo pi = new ProcessInfo (process.getName(), process.getAD_Process_ID(), - AD_Table_ID, Record_ID); - pi.setAD_User_ID(getAD_User_ID()); - pi.setAD_Client_ID(m_model.getAD_Client_ID()); - pi.setAD_PInstance_ID(pInstance.getAD_PInstance_ID()); - if (!process.processIt(pi, m_trx) && pi.getClassName() != null) - return "Process failed: (" + pi.getClassName() + ") " + pi.getSummary(); - - // Report - ReportEngine re = ReportEngine.get(getCtx(), pi); - if (re == null) - return "Cannot create Report AD_Process_ID=" + process.getAD_Process_ID() - + " - " + process.getName(); - File report = re.getPDF(); - // Notice - int AD_Message_ID = 884; // HARDCODED SchedulerResult - MUser from = new MUser(getCtx(), pi.getAD_User_ID(), null); - Integer[] userIDs = m_model.getRecipientAD_User_IDs(); - for (int i = 0; i < userIDs.length; i++) - { - MUser user = new MUser(getCtx(), userIDs[i].intValue(), null); - boolean email = user.isNotificationEMail(); - boolean notice = user.isNotificationNote(); - - if (notice) - { - MNote note = new MNote(getCtx(), - AD_Message_ID, userIDs[i].intValue(), m_trx.getTrxName()); - note.setClientOrg(m_model.getAD_Client_ID(), m_model.getAD_Org_ID()); - note.setTextMsg(m_model.getName()); - note.setDescription(m_model.getDescription()); - note.setRecord(AD_Table_ID, Record_ID); - note.save(); - // Attachment - MAttachment attachment = new MAttachment (getCtx(), - MNote.Table_ID, note.getAD_Note_ID(), m_trx.getTrxName()); - attachment.setClientOrg(m_model.getAD_Client_ID(), m_model.getAD_Org_ID()); - attachment.addEntry(report); - attachment.setTextMsg(m_model.getName()); - attachment.save(); - } - if (email) - { - MClient client = MClient.get(m_model.getCtx(), m_model.getAD_Client_ID()); - client.sendEMail(from, user, m_model.getName(), m_model.getDescription(), report); - } - } - // - return pi.getSummary(); - } // runReport - - /** - * Run Process + * Run Process or Report * @param process process * @return summary * @throws Exception @@ -185,6 +153,9 @@ public class Scheduler extends AdempiereServer private String runProcess(MProcess process) throws Exception { log.info(process.toString()); + + boolean isReport = (process.isReport() || process.getAD_ReportView_ID() > 0); + // Process (see also MWFActivity.performWork int AD_Table_ID = 0; int Record_ID = 0; @@ -192,20 +163,17 @@ public class Scheduler extends AdempiereServer MPInstance pInstance = new MPInstance(process, Record_ID); fillParameter(pInstance); // - ProcessInfo pi = new ProcessInfo (process.getName(), process.getAD_Process_ID(), - AD_Table_ID, Record_ID); - int AD_User_ID = getAD_User_ID(); - - pi.setAD_User_ID(AD_User_ID); + ProcessInfo pi = new ProcessInfo (process.getName(), process.getAD_Process_ID(), AD_Table_ID, Record_ID); + pi.setAD_User_ID(getAD_User_ID()); pi.setAD_Client_ID(m_model.getAD_Client_ID()); pi.setAD_PInstance_ID(pInstance.getAD_PInstance_ID()); MUser from = new MUser(getCtx(), pi.getAD_User_ID(), null); - //notify supervisor if error - if ( !process.processIt(pi, m_trx) ) + if ( !process.processIt(pi, m_trx) ) // note, this call close the transaction, don't use m_trx below { + // notify supervisor if error int supervisor = m_model.getSupervisor_ID(); - if (supervisor > 0) + if (supervisor > 0) { MUser user = new MUser(getCtx(), supervisor, null); boolean email = user.isNotificationEMail(); @@ -214,15 +182,14 @@ public class Scheduler extends AdempiereServer if (email || notice) ProcessInfoUtil.setLogFromDB(pi); - if (email) + if (email) { MClient client = MClient.get(m_model.getCtx(), m_model.getAD_Client_ID()); client.sendEMail(from, user, process.getName(), pi.getSummary() + " " + pi.getLogInfo(), null); } if (notice) { - int AD_Message_ID = 442; //ProcessRunError - MNote note = new MNote(getCtx(), - AD_Message_ID, supervisor, null); + int AD_Message_ID = 442; // HARDCODED ProcessRunError + MNote note = new MNote(getCtx(), AD_Message_ID, supervisor, null); note.setClientOrg(m_model.getAD_Client_ID(), m_model.getAD_Org_ID()); note.setTextMsg(pi.getSummary()); //note.setDescription(); @@ -230,34 +197,68 @@ public class Scheduler extends AdempiereServer note.save(); } } - } - else - { + } + else + { + // notify recipients on success Integer[] userIDs = m_model.getRecipientAD_User_IDs(); if (userIDs.length > 0) { ProcessInfoUtil.setLogFromDB(pi); - for (int i = 0; i < userIDs.length; i++) + for (int i = 0; i < userIDs.length; i++) { MUser user = new MUser(getCtx(), userIDs[i].intValue(), null); boolean email = user.isNotificationEMail(); boolean notice = user.isNotificationNote(); - if (email) - { - MClient client = MClient.get(m_model.getCtx(), m_model.getAD_Client_ID()); - client.sendEMail(from, user, process.getName(), pi.getSummary() + " " + pi.getLogInfo(), null); + File report = null; + if (isReport) { + // Report + ReportEngine re = ReportEngine.get(m_schedulerctx, pi); + if (re == null) + return "Cannot create Report AD_Process_ID=" + process.getAD_Process_ID() + + " - " + process.getName(); + report = re.getPDF(); + } + if (notice) { - int AD_Message_ID = 441; //ProcessOK - MNote note = new MNote(getCtx(), - AD_Message_ID, userIDs[i].intValue(), null); + int AD_Message_ID = 441; // ProcessOK + if (isReport) + AD_Message_ID = 884; // HARDCODED SchedulerResult + MNote note = new MNote(getCtx(), AD_Message_ID, userIDs[i].intValue(), null); note.setClientOrg(m_model.getAD_Client_ID(), m_model.getAD_Org_ID()); - note.setTextMsg(pi.getSummary()); - //note.setDescription(); - note.setRecord(MPInstance.Table_ID, pi.getAD_PInstance_ID()); - note.save(); + if (isReport) { + note.setTextMsg(m_model.getName()); + note.setDescription(m_model.getDescription()); + note.setRecord(AD_Table_ID, Record_ID); + } else { + note.setTextMsg(pi.getSummary()); + // note.setDescription(); + note.setRecord(MPInstance.Table_ID, pi.getAD_PInstance_ID()); + } + if (note.save()) { + if (isReport) { + // Attachment + MAttachment attachment = new MAttachment (getCtx(), MNote.Table_ID, note.getAD_Note_ID(), null); + attachment.setClientOrg(m_model.getAD_Client_ID(), m_model.getAD_Org_ID()); + attachment.addEntry(report); + attachment.setTextMsg(m_model.getName()); + attachment.save(); + } + } } + + if (email) + { + MClient client = MClient.get(m_model.getCtx(), m_model.getAD_Client_ID()); + if (isReport) { + client.sendEMail(from, user, m_model.getName(), m_model.getDescription(), report); + } else { + client.sendEMail(from, user, process.getName(), pi.getSummary() + " " + pi.getLogInfo(), null); + } + } + } } } @@ -268,10 +269,10 @@ public class Scheduler extends AdempiereServer int AD_User_ID; if (m_model.getSupervisor_ID() > 0) AD_User_ID = m_model.getSupervisor_ID(); - else if (m_model.getUpdatedBy() > 0) - AD_User_ID = m_model.getUpdatedBy(); else if (m_model.getCreatedBy() > 0) AD_User_ID = m_model.getCreatedBy(); + else if (m_model.getUpdatedBy() > 0) + AD_User_ID = m_model.getUpdatedBy(); else AD_User_ID = 100; //fall back to SuperUser return AD_User_ID; @@ -300,7 +301,8 @@ public class Scheduler extends AdempiereServer if (variable == null || (variable != null && variable.length() == 0)) value = null; - else if (variable.indexOf('@') != -1) // we have a variable + else if ( variable.indexOf('@') != -1 + && variable.indexOf('@') != variable.lastIndexOf('@')) // we have a variable / BF [1926032] { // Strip int index = variable.indexOf('@'); @@ -314,29 +316,31 @@ public class Scheduler extends AdempiereServer } columnName = columnName.substring(0, index); // try Env - String env = Env.getContext(getCtx(), columnName); + String env = Env.getContext(m_schedulerctx, columnName); + if (env == null || env.length() == 0) + env = Env.getContext(getCtx(), columnName); if (env.length() == 0) { log.warning(sPara.getColumnName() - + " - not in environment =" + columnName + + " - not in environment =" + columnName + "(" + variable + ")"); break; } else value = env; } // @variable@ - + // No Value if (value == null) { log.fine(sPara.getColumnName() + " - empty"); break; } - + // Convert to Type try { - if (DisplayType.isNumeric(sPara.getDisplayType()) + if (DisplayType.isNumeric(sPara.getDisplayType()) || DisplayType.isID(sPara.getDisplayType())) { BigDecimal bd = null; @@ -384,7 +388,7 @@ public class Scheduler extends AdempiereServer } // instance parameter loop } // fillParameter - + /** * Get Server Info * @return info @@ -394,4 +398,34 @@ public class Scheduler extends AdempiereServer return "#" + p_runCount + " - Last=" + m_summary.toString(); } // getServerInfo + @Override + public void run() { + String cronPattern = (String) m_model.getCronPattern(); + if (cronPattern != null && cronPattern.trim().length() > 0 && SchedulingPattern.validate(cronPattern)) { + cronScheduler = new it.sauronsoftware.cron4j.Scheduler(); + cronScheduler.schedule(cronPattern, new Runnable() { + public void run() { + runNow(); + long next = predictor.nextMatchingTime(); + p_model.setDateNextRun(new Timestamp(next)); + p_model.save(); + } + }); + predictor = new Predictor(cronPattern); + long next = predictor.nextMatchingTime(); + p_model.setDateNextRun(new Timestamp(next)); + p_model.save(); + cronScheduler.start(); + while (true) { + if (!sleep()) { + cronScheduler.stop(); + break; + } else if (!cronScheduler.isStarted()) { + break; + } + } + } else { + super.run(); + } + } } // Scheduler diff --git a/tools/.classpath b/tools/.classpath index e16067af75..3d9be19ad1 100644 --- a/tools/.classpath +++ b/tools/.classpath @@ -10,6 +10,8 @@ + + diff --git a/zkwebui/WEB-INF/src/org/adempiere/webui/ValuePreference.java b/zkwebui/WEB-INF/src/org/adempiere/webui/ValuePreference.java index 418ae00db2..0455a3ef43 100644 --- a/zkwebui/WEB-INF/src/org/adempiere/webui/ValuePreference.java +++ b/zkwebui/WEB-INF/src/org/adempiere/webui/ValuePreference.java @@ -44,6 +44,7 @@ import org.zkoss.zk.ui.event.EventListener; import org.zkoss.zk.ui.event.Events; import org.zkoss.zul.Div; import org.zkoss.zul.Separator; +import org.zkoss.zul.Space; import org.zkoss.zul.Vbox; /** @@ -54,7 +55,7 @@ import org.zkoss.zul.Vbox; * @version $Id: ValuePreference.java,v 1.2 2006/07/30 00:51:28 jjanke Exp $ */ public class ValuePreference extends Window implements EventListener -{ +{ /** * */ @@ -307,6 +308,12 @@ public class ValuePreference extends Window implements EventListener row.appendChild(cbWindow); rows.appendChild(row); + row = new Row(); + row.setSpans("1, 5"); + row.appendChild(new Space()); + row.appendChild(lExplanation); + rows.appendChild(row); + // Separator separator = new Separator(); separator.setBar(true); @@ -429,7 +436,6 @@ public class ValuePreference extends Window implements EventListener if (Env.getLanguage(Env.getCtx()).isBaseLanguage()) { lExplanation.setValue(expl.toString ()); - this.invalidate(); } } // setExplanation diff --git a/zkwebui/WEB-INF/src/org/adempiere/webui/apps/AEnv.java b/zkwebui/WEB-INF/src/org/adempiere/webui/apps/AEnv.java index 9d6394916d..173e37e14e 100644 --- a/zkwebui/WEB-INF/src/org/adempiere/webui/apps/AEnv.java +++ b/zkwebui/WEB-INF/src/org/adempiere/webui/apps/AEnv.java @@ -38,15 +38,15 @@ import javax.servlet.ServletRequest; import org.adempiere.webui.component.Window; import org.adempiere.webui.session.SessionManager; -import org.compiere.apps.ALogin; -import org.compiere.db.CConnection; -import org.compiere.interfaces.Server; +import org.compiere.acct.Doc; import org.compiere.model.GridWindowVO; import org.compiere.model.Lookup; +import org.compiere.model.MAcctSchema; import org.compiere.model.MQuery; import org.compiere.process.DocumentEngine; import org.compiere.util.CCache; import org.compiere.util.CLogger; +import org.compiere.util.CacheMgt; import org.compiere.util.DB; import org.compiere.util.Env; import org.compiere.util.Ini; @@ -226,25 +226,6 @@ public final class AEnv /** Logger */ private static CLogger log = CLogger.getCLogger(AEnv.class); - /** - * Is AppsServer Active ? - * @return true if active - */ - public static boolean isServerActive() - { - return CConnection.get().isAppsServerOK(true); - } // isServerActive - - /** - * Get Server Version - * @return Apps Server Version - * @see ALogin#checkVersion - */ - public static String getServerVersion () - { - return CConnection.get().getServerVersion(); - } // getServerVersion - /** Window Cache */ private static Map> windowCache = new HashMap>(); @@ -336,11 +317,13 @@ public final class AEnv int AD_Table_ID, int Record_ID, boolean force) { - log.config("Window=" + WindowNo + log.info("Window=" + WindowNo + ", AD_Table_ID=" + AD_Table_ID + "/" + Record_ID + ", Force=" + force); - String error = DocumentEngine.postImmediate(Env.getCtx(), AD_Client_ID, AD_Table_ID, Record_ID, force, null); + String error = null; + MAcctSchema[] ass = MAcctSchema.getClientAcctSchema(Env.getCtx(), AD_Client_ID); + error = Doc.postImmediate(ass, AD_Table_ID, Record_ID, force, null); return error; } // postImmediate @@ -355,24 +338,7 @@ public final class AEnv log.config("TableName=" + tableName + ", Record_ID=" + Record_ID); - // try to get from Server when enabled - if (isServerActive()) - { - log.config("trying server"); - try - { - Server server = CConnection.get().getServer(); - if (server != null) - { - server.cacheReset(tableName, Record_ID); - } - } - catch (Exception e) - { - log.log(Level.SEVERE, "(RE)", e); - } - } - + CacheMgt.get().reset(tableName, Record_ID); } // cacheReset /** diff --git a/zkwebui/WEB-INF/src/org/adempiere/webui/apps/WReport.java b/zkwebui/WEB-INF/src/org/adempiere/webui/apps/WReport.java index e6430fe7a3..3a45136093 100644 --- a/zkwebui/WEB-INF/src/org/adempiere/webui/apps/WReport.java +++ b/zkwebui/WEB-INF/src/org/adempiere/webui/apps/WReport.java @@ -205,7 +205,7 @@ public class WReport implements EventListener { if(pf != null && pf.getJasperProcess_ID() > 0) { // It's a report using the JasperReports engine - ProcessInfo pi = new ProcessInfo ("", pf.getJasperProcess_ID()); + ProcessInfo pi = new ProcessInfo ("", pf.getJasperProcess_ID(), pf.getAD_Table_ID(), Record_ID); // Execute Process WProcessCtl.process(null, WindowNo, pi, null); diff --git a/zkwebui/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromShipmentUI.java b/zkwebui/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromShipmentUI.java index a5654db63a..4559287e4e 100644 --- a/zkwebui/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromShipmentUI.java +++ b/zkwebui/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromShipmentUI.java @@ -440,7 +440,7 @@ public class WCreateFromShipmentUI extends CreateFromShipment implements EventLi orderField.removeAllItems(); orderField.addItem(pp); - ArrayList list = loadOrderData(C_BPartner_ID, forInvoice, false); + ArrayList list = loadOrderData(C_BPartner_ID, forInvoice, sameWarehouseCb.isSelected()); for(KeyNamePair knp : list) orderField.addItem(knp); diff --git a/zkwebui/WEB-INF/src/org/adempiere/webui/apps/form/WPayment.java b/zkwebui/WEB-INF/src/org/adempiere/webui/apps/form/WPayment.java index 3213ecd5fc..d0e4accfbc 100644 --- a/zkwebui/WEB-INF/src/org/adempiere/webui/apps/form/WPayment.java +++ b/zkwebui/WEB-INF/src/org/adempiere/webui/apps/form/WPayment.java @@ -21,7 +21,6 @@ import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Timestamp; -import java.text.DecimalFormat; import java.util.ArrayList; import java.util.Enumeration; import java.util.HashMap; @@ -56,15 +55,17 @@ import org.compiere.model.MOrder; import org.compiere.model.MPayment; import org.compiere.model.MPaymentValidate; import org.compiere.model.MRole; +import org.compiere.model.MSysConfig; import org.compiere.model.X_C_Order; import org.compiere.process.DocAction; import org.compiere.util.CLogger; import org.compiere.util.DB; -import org.compiere.util.DisplayType; import org.compiere.util.Env; import org.compiere.util.KeyNamePair; import org.compiere.util.Msg; import org.compiere.util.TimeUtil; +import org.compiere.util.Trx; +import org.compiere.util.TrxRunnable; import org.compiere.util.ValueNamePair; import org.zkoss.zk.ui.event.Event; import org.zkoss.zk.ui.event.EventListener; @@ -178,6 +179,7 @@ public class WPayment extends Window /** Invoice Currency */ private int m_C_Currency_ID = 0; private int m_AD_Client_ID = 0; + private boolean m_Cash_As_Payment = true; private int m_AD_Org_ID = 0; private int m_C_BPartner_ID = 0; private BigDecimal m_Amount = Env.ZERO; // Payment Amount @@ -185,7 +187,6 @@ public class WPayment extends Window private boolean m_initOK = false; /** Only allow changing Rule */ private boolean m_onlyRule = false; - private DecimalFormat m_Format = DisplayType.getNumberFormat(DisplayType.Amount); private static Hashtable s_Currencies = null; // EMU Currencies private boolean m_needSave = false; @@ -197,7 +198,6 @@ public class WPayment extends Window private Borderlayout mainLayout = new Borderlayout(); private Panel northPanel = new Panel(); private Panel centerPanel = new Panel(); -// private FlowLayout northLayout = new FlowLayout(); private Listbox paymentCombo = ListboxFactory.newDropdownListbox(); private Label paymentLabel = new Label(); private List centerLayout = new ArrayList(); @@ -244,6 +244,8 @@ public class WPayment extends Window private Button sOnline = new Button(); private Listbox sBankAccountCombo = ListboxFactory.newDropdownListbox(); private Label sBankAccountLabel = new Label(); + private Listbox bBankAccountCombo = ListboxFactory.newDropdownListbox(); + private Label bBankAccountLabel = new Label(); private Grid pPanelLayout = GridFactory.newGridLayout(); private Label bCashBookLabel = new Label(); private Listbox bCashBookCombo = ListboxFactory.newDropdownListbox(); @@ -272,7 +274,6 @@ public class WPayment extends Window mainLayout.appendChild(center); center.appendChild(centerPanel); // -// northPanel.setLayout(northLayout); paymentLabel.setText(Msg.translate(Env.getCtx(), "PaymentRule")); North north = new North(); north.setStyle("border: none"); @@ -285,11 +286,8 @@ public class WPayment extends Window // CreditCard kPanel.appendChild(kLayout); kNumberField.setWidth("160pt"); -// kNumberField.setHeight("21em"); kExpField.setWidth("40pt"); -// kExpField.setHeight("21em"); kApprovalField.setWidth("120pt"); -// kApprovalField.setHeight("21em"); kTypeLabel.setText(Msg.translate(Env.getCtx(), "CreditCardType")); kNumberLabel.setText(Msg.translate(Env.getCtx(), "CreditCardNumber")); kExpLabel.setText(Msg.getMsg(Env.getCtx(), "Expires")); @@ -381,16 +379,13 @@ public class WPayment extends Window sPanel.appendChild(sPanelLayout); sBankAccountLabel.setText(Msg.translate(Env.getCtx(), "C_BankAccount_ID")); sAmountLabel.setText(Msg.getMsg(Env.getCtx(), "Amount")); - //sAmountField.setText(""); sRoutingLabel.setText(Msg.translate(Env.getCtx(), "RoutingNo")); sNumberLabel.setText(Msg.translate(Env.getCtx(), "AccountNo")); sCheckLabel.setText(Msg.translate(Env.getCtx(), "CheckNo")); sCheckField.setCols(8); sCurrencyLabel.setText(Msg.translate(Env.getCtx(), "C_Currency_ID")); sNumberField.setWidth("100pt"); -// sNumberField.setHeight("100em"); sRoutingField.setWidth("70pt"); -// sRoutingField.setHeight("21em"); sStatus.setText(" "); sOnline.setLabel(Msg.getMsg(Env.getCtx(), "Online")); LayoutUtils.addSclass("action-text-button", sOnline); @@ -464,8 +459,14 @@ public class WPayment extends Window rows = bPanelLayout.newRows(); row = rows.newRow(); - row.appendChild(bCashBookLabel.rightAlign()); - row.appendChild(bCashBookCombo); + if (m_Cash_As_Payment) { + bBankAccountLabel.setText(Msg.translate(Env.getCtx(), "C_BankAccount_ID")); + row.appendChild(bBankAccountLabel.rightAlign()); + row.appendChild(bBankAccountCombo); + } else { + row.appendChild(bCashBookLabel.rightAlign()); + row.appendChild(bCashBookCombo); + } row = rows.newRow(); row.appendChild(bCurrencyLabel.rightAlign()); @@ -554,6 +555,7 @@ public class WPayment extends Window * Get Data from Grid */ m_AD_Client_ID = ((Integer)m_mTab.getValue("AD_Client_ID")).intValue(); + m_Cash_As_Payment = MSysConfig.getBooleanValue("CASH_AS_PAYMENT",true, m_AD_Client_ID); m_AD_Org_ID = ((Integer)m_mTab.getValue("AD_Org_ID")).intValue(); m_C_BPartner_ID = ((Integer)m_mTab.getValue("C_BPartner_ID")).intValue(); m_PaymentRule = (String)m_mTab.getValue("PaymentRule"); @@ -595,6 +597,8 @@ public class WPayment extends Window tRoutingField.setText(m_mPayment.getRoutingNo()); tNumberField.setText(m_mPayment.getAccountNo()); tStatus.setText(m_mPayment.getR_PnRef()); + // Cash + bAmountField.setValue(m_mPayment.getPayAmt()); } } if (m_mPayment == null) @@ -719,7 +723,6 @@ public class WPayment extends Window SQL = "SELECT a.C_BP_BankAccount_ID, NVL(b.Name, ' ')||a.AccountNo AS Acct " + "FROM C_BP_BankAccount a,C_Bank b " + "WHERE C_BPartner_ID=? AND a.IsActive='Y'"; - kp = null; try { PreparedStatement pstmt = DB.prepareStatement(SQL, null); @@ -731,7 +734,6 @@ public class WPayment extends Window String name = rs.getString(2); KeyNamePair pp = new KeyNamePair(key, name); tAccountCombo.addItem(pp); - // kp = pp; } rs.close(); pstmt.close(); @@ -740,9 +742,6 @@ public class WPayment extends Window { log.log(Level.SEVERE, SQL, eac); } - // Set Selection - if (kp != null) - tAccountCombo.setSelectedKeyNamePair(kp); /** * Load Credit Cards @@ -779,6 +778,7 @@ public class WPayment extends Window String name = rs.getString(2); KeyNamePair pp = new KeyNamePair(key, name); sBankAccountCombo.addItem(pp); + bBankAccountCombo.addItem(pp); if (key == m_C_BankAccount_ID) kp = pp; if (kp == null && rs.getString(3).equals("Y")) // Default @@ -793,7 +793,10 @@ public class WPayment extends Window } // Set Selection if (kp != null) + { sBankAccountCombo.setSelectedKeyNamePair(kp); + bBankAccountCombo.setSelectedKeyNamePair(kp); + } /** @@ -966,13 +969,49 @@ public class WPayment extends Window } } + /************************************************************************** + * Save Changes + * @return true, if Window can exit + */ + private boolean saveChanges() { + // BF [ 1920179 ] perform the save in a trx's context. + final boolean[] success = new boolean[] { false }; + final TrxRunnable r = new TrxRunnable() { + + public void run(String trxName) { + success[0] = saveChangesInTrx(trxName); + } + }; + try { + Trx.run(r); + } catch (Throwable e) { + success[0] = false; + FDialog.error(m_WindowNo, this, "PaymentError", e.getLocalizedMessage()); + } + if (m_cashLine != null) + m_cashLine.set_TrxName(null); + if (m_mPayment != null) + m_mPayment.set_TrxName(null); + if (m_mPaymentOriginal != null) + m_mPayment.set_TrxName(null); + return success[0]; + } // saveChanges + /************************************************************************** * Save Changes * @return true, if eindow can exit */ - private boolean saveChanges() + private boolean saveChangesInTrx(final String trxName) { + // set trxname for class objects + if (m_cashLine != null) + m_cashLine.set_TrxName(trxName); + if (m_mPayment != null) + m_mPayment.set_TrxName(trxName); + if (m_mPaymentOriginal != null) + m_mPaymentOriginal.set_TrxName(trxName); + ValueNamePair vp = paymentCombo.getSelectedItem().toValueNamePair(); String newPaymentRule = vp.getValue(); log.info("New Rule: " + newPaymentRule); @@ -992,14 +1031,25 @@ public class WPayment extends Window int newC_CashBook_ID = m_C_CashBook_ID; String newCCType = m_CCType; int newC_BankAccount_ID = 0; + String payTypes = m_Cash_As_Payment ? "KTSDB" : "KTSD"; // B (Cash) (Currency) if (newPaymentRule.equals(X_C_Order.PAYMENTRULE_Cash)) { - ListItem selected = bCashBookCombo.getSelectedItem(); - KeyNamePair kp = selected != null ? selected.toKeyNamePair() : null; - if (kp != null) - newC_CashBook_ID = kp.getKey(); + if (m_Cash_As_Payment){ + // get bank account + ListItem selected = bBankAccountCombo.getSelectedItem(); + KeyNamePair kp = selected != null ? selected.toKeyNamePair() : null; + if (kp != null) + newC_BankAccount_ID = kp.getKey(); + } else { + // get cash book + ListItem selected = bCashBookCombo.getSelectedItem(); + KeyNamePair kp = selected != null ? selected.toKeyNamePair() : null; + if (kp != null) + newC_CashBook_ID = kp.getKey(); + } + newDateAcct = (Timestamp)bDateField.getValue(); // Get changes to cash amount @@ -1043,18 +1093,6 @@ public class WPayment extends Window else return false; - // find Bank Account if not qualified yet - if ("KTSD".indexOf(newPaymentRule) != -1 && newC_BankAccount_ID == 0) - { - String tender = MPayment.TENDERTYPE_CreditCard; - if (newPaymentRule.equals(MOrder.PAYMENTRULE_DirectDeposit)) - tender = MPayment.TENDERTYPE_DirectDeposit; - else if (newPaymentRule.equals(MOrder.PAYMENTRULE_DirectDebit)) - tender = MPayment.TENDERTYPE_DirectDebit; - else if (newPaymentRule.equals(MOrder.PAYMENTRULE_Check)) - tender = MPayment.TENDERTYPE_Check; - } - /*********************** * Changed PaymentRule */ @@ -1076,7 +1114,7 @@ public class WPayment extends Window newC_CashLine_ID = 0; // reset } // We had a change in Payment type (e.g. Check to CC) - else if ("KTSD".indexOf(m_PaymentRule) != -1 && "KTSD".indexOf(newPaymentRule) != -1 && m_mPaymentOriginal != null) + else if (payTypes.indexOf(m_PaymentRule) != -1 && payTypes.indexOf(newPaymentRule) != -1 && m_mPaymentOriginal != null) { log.fine("Old Payment(1) - " + m_mPaymentOriginal); m_mPaymentOriginal.setDocAction(DocAction.ACTION_Reverse_Correct); @@ -1089,7 +1127,7 @@ public class WPayment extends Window m_mPayment.resetNew(); } // We had a Payment and something else (e.g. Check to Cash) - else if ("KTSD".indexOf(m_PaymentRule) != -1 && "KTSD".indexOf(newPaymentRule) == -1) + else if (payTypes.indexOf(m_PaymentRule) != -1 && payTypes.indexOf(newPaymentRule) == -1) { log.fine("Old Payment(2) - " + m_mPaymentOriginal); if (m_mPaymentOriginal != null) @@ -1139,10 +1177,9 @@ public class WPayment extends Window /*********************** * CashBook */ - if (newPaymentRule.equals(X_C_Order.PAYMENTRULE_Cash)) + if (newPaymentRule.equals(X_C_Order.PAYMENTRULE_Cash) && !m_Cash_As_Payment) { log.fine("Cash"); - String description = (String)m_mTab.getValue("DocumentNo"); if (C_Invoice_ID == 0 && order == null) { @@ -1157,11 +1194,8 @@ public class WPayment extends Window && payAmount.compareTo(m_cashLine.getAmount()) != 0) { log.config("Changed CashBook Amount"); - //m_cashLine.setAmount(payAmount); m_cashLine.setAmount((BigDecimal) bAmountField.getValue()); - // ADialog.info(m_WindowNo, this, "m_cashLine - Changed Amount", "Amount: "+m_cashLine.getAmount()); - if (m_cashLine.save()) - log.config("CashAmt Changed"); + m_cashLine.saveEx(); } // Different Date/CashBook if (m_cashLine != null @@ -1170,8 +1204,7 @@ public class WPayment extends Window { log.config("Changed CashBook/Date: " + m_C_CashBook_ID + "->" + newC_CashBook_ID); MCashLine reverse = m_cashLine.createReversal(); - if (!reverse.save()) - FDialog.error(m_WindowNo, this, "PaymentError", "CashNotCancelled"); + reverse.saveEx(); m_cashLine = null; } @@ -1204,29 +1237,25 @@ public class WPayment extends Window m_needSave = true; } cl.setAmount((BigDecimal)bAmountField.getValue()); - if (cl.save()) - { - log.config("CashCreated"); - if (invoice == null && C_Invoice_ID != 0) - { - invoice = new MInvoice (Env.getCtx(), C_Invoice_ID, null); - } - if (invoice != null) { - invoice.setC_CashLine_ID(cl.getC_CashLine_ID()); - invoice.save(); - } - if (order == null && C_Order_ID != 0) - { - order = new MOrder (Env.getCtx(), C_Order_ID, null); - } - if (order != null) { - order.setC_CashLine_ID(cl.getC_CashLine_ID()); - order.save(); - } - log.config("Update Order & Invoice with CashLine"); + cl.saveEx(); + log.config("CashCreated"); + if (invoice == null && C_Invoice_ID != 0) + { + invoice = new MInvoice (Env.getCtx(), C_Invoice_ID, null); + } + if (invoice != null) { + invoice.setC_CashLine_ID(cl.getC_CashLine_ID()); + invoice.saveEx(trxName); } - else - FDialog.error(m_WindowNo, this, "PaymentError", "CashNotCreated"); + if (order == null && C_Order_ID != 0) + { + order = new MOrder (Env.getCtx(), C_Order_ID, null); + } + if (order != null) { + order.setC_CashLine_ID(cl.getC_CashLine_ID()); + order.saveEx(trxName); + } + log.config("Update Order & Invoice with CashLine"); } } } // have invoice @@ -1234,7 +1263,8 @@ public class WPayment extends Window /*********************** * Payments */ - if ("KS".indexOf(newPaymentRule) != -1) + if (("KS".indexOf(newPaymentRule) != -1) || + (newPaymentRule.equals(MOrder.PAYMENTRULE_Cash) && m_Cash_As_Payment)) { log.fine("Payment - " + newPaymentRule); // Set Amount @@ -1261,6 +1291,13 @@ public class WPayment extends Window // Get changes to check amount m_mPayment.setAmount(m_C_Currency_ID, (BigDecimal) sAmountField.getValue()); } + else if (newPaymentRule.equals(MOrder.PAYMENTRULE_Cash)) + { + // Get changes to cash amount + m_mPayment.setTenderType(MPayment.TENDERTYPE_Cash); + m_mPayment.setBankCash(newC_BankAccount_ID, m_isSOTrx, MPayment.TENDERTYPE_Cash); + m_mPayment.setAmount(m_C_Currency_ID, payAmount); + } m_mPayment.setC_BPartner_ID(m_C_BPartner_ID); m_mPayment.setC_Invoice_ID(C_Invoice_ID); if (order != null) @@ -1270,14 +1307,13 @@ public class WPayment extends Window } m_mPayment.setDateTrx(m_DateAcct); m_mPayment.setDateAcct(m_DateAcct); - if (!m_mPayment.save()) - FDialog.error(m_WindowNo, this, "PaymentError", "PaymentNotCreated"); + m_mPayment.saveEx(); // Save/Post if (m_mPayment.get_ID() > 0 && MPayment.DOCSTATUS_Drafted.equals(m_mPayment.getDocStatus())) { boolean ok = m_mPayment.processIt(DocAction.ACTION_Complete); - m_mPayment.save(); + m_mPayment.saveEx(); if (ok) FDialog.info(m_WindowNo, this, "PaymentCreated", m_mPayment.getDocumentNo()); else @@ -1334,10 +1370,6 @@ public class WPayment extends Window if (m_onlyRule) return true; - Timestamp DateAcct = m_DateAcct; - int C_PaymentTerm_ID = m_C_PaymentTerm_ID; - int C_CashBook_ID = m_C_CashBook_ID; - String CCType = m_CCType; // int C_BankAccount_ID = 0; @@ -1348,41 +1380,20 @@ public class WPayment extends Window // B (Cash) (Currency) if (PaymentRule.equals(MOrder.PAYMENTRULE_Cash)) { - ListItem selected = bCashBookCombo.getSelectedItem(); - KeyNamePair kp = selected != null ? selected.toKeyNamePair() : null; - if (kp != null) - C_CashBook_ID = kp.getKey(); - DateAcct = (Timestamp)bDateField.getValue(); + if (m_Cash_As_Payment) + { + ListItem selected = bBankAccountCombo.getSelectedItem(); + KeyNamePair kp = selected != null ? selected.toKeyNamePair() : null; + if (kp != null) + C_BankAccount_ID = kp.getKey(); + } } // K (CreditCard) Type, Number, Exp, Approval else if (PaymentRule.equals(MOrder.PAYMENTRULE_CreditCard)) { - ListItem selected = kTypeCombo.getSelectedItem(); - vp = selected != null ? selected.toValueNamePair() : null; - if (vp != null) - CCType = vp.getValue(); - // - String error = MPaymentValidate.validateCreditCardNumber(kNumberField.getText(), CCType); - if (error.length() != 0) - { - if (error.indexOf('?') == -1) - { - FDialog.error(m_WindowNo, this, error); - dataOK = false; - } - else // warning - { - if (!FDialog.ask(m_WindowNo, this, error)) - dataOK = false; - } - } - error = MPaymentValidate.validateCreditCardExp(kExpField.getText()); - if(error.length() != 0) - { - FDialog.error(m_WindowNo, this, error); - dataOK = false; - } + // Validation of the credit card number is moved to the payment processor. + // Different payment processors can have different validation rules. } // T (Transfer) BPartner_Bank @@ -1402,10 +1413,7 @@ public class WPayment extends Window // P (PaymentTerm) PaymentTerm else if (PaymentRule.equals(X_C_Order.PAYMENTRULE_OnCredit)) { - ListItem selected = pTermCombo.getSelectedItem(); - KeyNamePair kp = selected != null ? selected.toKeyNamePair() : null; - if (kp != null) - C_PaymentTerm_ID = kp.getKey(); + // ok } // S (Check) (Currency) CheckNo, Routing @@ -1441,19 +1449,15 @@ public class WPayment extends Window } // find Bank Account if not qualified yet - if ("KTSD".indexOf(PaymentRule) != -1 && C_BankAccount_ID == 0) + if (("KTSD".indexOf(PaymentRule) != -1 || + (PaymentRule.equals(MOrder.PAYMENTRULE_Cash) && m_Cash_As_Payment)) + && C_BankAccount_ID == 0) { - String tender = MPayment.TENDERTYPE_CreditCard; - if (PaymentRule.equals(MOrder.PAYMENTRULE_DirectDeposit)) - tender = MPayment.TENDERTYPE_DirectDeposit; - else if (PaymentRule.equals(MOrder.PAYMENTRULE_DirectDebit)) - tender = MPayment.TENDERTYPE_DirectDebit; - else if (PaymentRule.equals(MOrder.PAYMENTRULE_Check)) - tender = MPayment.TENDERTYPE_Check; - // Check must have a bank account - if (C_BankAccount_ID == 0 && "S".equals(PaymentRule)) - { - FDialog.error(m_WindowNo, this, "PaymentNoProcessor"); + // Check & Cash (Payment) must have a bank account + if (C_BankAccount_ID == 0 && (PaymentRule.equals(MOrder.PAYMENTRULE_Check)) || + (PaymentRule.equals(MOrder.PAYMENTRULE_Cash) && m_Cash_As_Payment)) + { + FDialog.error(m_WindowNo, this, "FillMandatory", bBankAccountLabel.getValue()); dataOK = false; } } diff --git a/zkwebui/WEB-INF/src/org/adempiere/webui/apps/graph/WGraph.java b/zkwebui/WEB-INF/src/org/adempiere/webui/apps/graph/WGraph.java index 70a972caea..3bbbe7d55b 100644 --- a/zkwebui/WEB-INF/src/org/adempiere/webui/apps/graph/WGraph.java +++ b/zkwebui/WEB-INF/src/org/adempiere/webui/apps/graph/WGraph.java @@ -86,7 +86,7 @@ public class WGraph extends Div implements IdSpace { private boolean m_renderChart = true; - /** Zero/Zero Coordibate point */ + /** Zero/Zero Coordinate point */ private Point m_point0_0 = null; /** Logger */ diff --git a/zkwebui/WEB-INF/src/org/adempiere/webui/apps/wf/WWFActivity.java b/zkwebui/WEB-INF/src/org/adempiere/webui/apps/wf/WWFActivity.java index 47fe61101e..93f0107bea 100644 --- a/zkwebui/WEB-INF/src/org/adempiere/webui/apps/wf/WWFActivity.java +++ b/zkwebui/WEB-INF/src/org/adempiere/webui/apps/wf/WWFActivity.java @@ -494,6 +494,7 @@ public class WWFActivity extends ADForm implements EventListener m_column = node.getColumn(); if (m_column != null && m_column.get_ID() != 0) { + fAnswerList.removeAllItems(); int dt = m_column.getAD_Reference_ID(); if (dt == DisplayType.YesNo) { diff --git a/zkwebui/WEB-INF/src/org/adempiere/webui/component/AbstractADTab.java b/zkwebui/WEB-INF/src/org/adempiere/webui/component/AbstractADTab.java index c0bb78cf44..dc42ddc373 100644 --- a/zkwebui/WEB-INF/src/org/adempiere/webui/component/AbstractADTab.java +++ b/zkwebui/WEB-INF/src/org/adempiere/webui/component/AbstractADTab.java @@ -18,14 +18,18 @@ package org.adempiere.webui.component; import java.util.ArrayList; +import java.util.Collections; import java.util.List; +import org.adempiere.webui.panel.ADSortTab; import org.adempiere.webui.panel.ADTabpanel; import org.adempiere.webui.panel.IADTabpanel; import org.adempiere.webui.part.AbstractUIPart; import org.compiere.model.DataStatusEvent; +import org.compiere.model.GridField; import org.compiere.model.GridTab; import org.compiere.util.CLogger; +import org.compiere.util.Env; import org.compiere.util.Evaluator; /** @@ -119,6 +123,7 @@ public abstract class AbstractADTab extends AbstractUIPart implements IADTab canJump = canNavigateTo(oldIndex, newIndex); if (canJump) { + prepareContext(newIndex, newTab); doTabSelectionChanged(oldIndex, newIndex); } } @@ -126,6 +131,63 @@ public abstract class AbstractADTab extends AbstractUIPart implements IADTab return canJump; } + private void prepareContext(int newIndex, IADTabpanel newTab) { + //update context + if (newTab != null) + { + List parents = new ArrayList(); + //get parent list + if (newIndex > 0) + { + int currentLevel = newTab.getTabLevel(); + for (int i = newIndex - 1; i >= 0; i--) + { + IADTabpanel adtab = tabPanelList.get(i); + if (adtab.getGridTab() == null) continue; + if (adtab instanceof ADSortTab) continue; + if (adtab.getTabLevel() < currentLevel || i == 0) + { + parents.add(i); + currentLevel = adtab.getTabLevel(); + } + } + Collections.reverse(parents); + } + else + { + parents.add(0); + } + + //clear context + for (int i = 0; i < tabPanelList.size(); i++) + { + IADTabpanel adtab = tabPanelList.get(i); + if (adtab.getGridTab() == null) continue; + if (adtab instanceof ADSortTab) continue; + GridField[] fields = adtab.getGridTab().getFields(); + for (GridField gf : fields) + { + Env.setContext(Env.getCtx(), gf.getWindowNo(), gf.getColumnName(), ""); + } + } + + //add parent value to context + if (!parents.isEmpty()) + { + for(int i : parents) + { + IADTabpanel adtab = tabPanelList.get(i); + + GridField[] fields = adtab.getGridTab().getFields(); + for (GridField gf : fields) + { + gf.updateContext(); + } + } + } + } + } + protected abstract void doTabSelectionChanged(int oldIndex, int newIndex); public boolean isDisplay(int index) { diff --git a/zkwebui/WEB-INF/src/org/adempiere/webui/editor/WTableDirEditor.java b/zkwebui/WEB-INF/src/org/adempiere/webui/editor/WTableDirEditor.java index faf30abf5f..73cba4b739 100644 --- a/zkwebui/WEB-INF/src/org/adempiere/webui/editor/WTableDirEditor.java +++ b/zkwebui/WEB-INF/src/org/adempiere/webui/editor/WTableDirEditor.java @@ -246,6 +246,7 @@ ContextMenuListener, IZoomableEditor { int size = lookup.getSize(); + boolean found = false; for (int i = 0; i < size; i++) { Object obj = lookup.getElementAt(i); @@ -253,28 +254,52 @@ ContextMenuListener, IZoomableEditor { KeyNamePair lookupKNPair = (KeyNamePair) obj; getComponent().appendItem(lookupKNPair.getName(), lookupKNPair.getKey()); + if (!found && oldValue != null && oldValue instanceof Integer && + lookupKNPair.getKey() == (Integer)oldValue) + { + found = true; + } } else if (obj instanceof ValueNamePair) { ValueNamePair lookupKNPair = (ValueNamePair) obj; getComponent().appendItem(lookupKNPair.getName(), lookupKNPair.getValue()); - } + if (!found && oldValue != null && lookupKNPair.getValue().equals(oldValue.toString())) + { + found = true; + } + } + } + if (!found && oldValue != null) + { + NamePair pair = lookup.getDirect(oldValue, false, false); + if (pair != null) { + if (pair instanceof KeyNamePair) { + int key = ((KeyNamePair)pair).getKey(); + getComponent().appendItem(pair.getName(), key); + } else if (pair instanceof ValueNamePair) { + ValueNamePair valueNamePair = (ValueNamePair) pair; + getComponent().appendItem(valueNamePair.getName(), valueNamePair.getValue()); + } + } } - } + } } else { if (lookup != null) { NamePair pair = lookup.getDirect(oldValue, false, false); - if (pair instanceof KeyNamePair) { - int key = ((KeyNamePair)pair).getKey(); - getComponent().appendItem(pair.getName(), key); - } else if (pair instanceof ValueNamePair) { - ValueNamePair valueNamePair = (ValueNamePair) pair; - getComponent().appendItem(valueNamePair.getName(), valueNamePair.getValue()); - } - } + if (pair != null) { + if (pair instanceof KeyNamePair) { + int key = ((KeyNamePair)pair).getKey(); + getComponent().appendItem(pair.getName(), key); + } else if (pair instanceof ValueNamePair) { + ValueNamePair valueNamePair = (ValueNamePair) pair; + getComponent().appendItem(valueNamePair.getName(), valueNamePair.getValue()); + } + } + } } getComponent().setValue(oldValue); } diff --git a/zkwebui/WEB-INF/src/org/adempiere/webui/panel/ADSortTab.java b/zkwebui/WEB-INF/src/org/adempiere/webui/panel/ADSortTab.java index 9d85527f26..3173bcdbd7 100644 --- a/zkwebui/WEB-INF/src/org/adempiere/webui/panel/ADSortTab.java +++ b/zkwebui/WEB-INF/src/org/adempiere/webui/panel/ADSortTab.java @@ -138,7 +138,7 @@ public class ADSortTab extends Panel implements IADTabpanel private boolean uiCreated; /** - * Dyanamic Init + * Dynamic Init * @param AD_Table_ID Table No * @param AD_ColumnSortOrder_ID Sort Column * @param AD_ColumnSortYesNo_ID YesNo Column @@ -701,7 +701,7 @@ public class ADSortTab extends Panel implements IADTabpanel { saveData(); adWindowPanel = null; - } // dispoase + } // dispose /** * List Item diff --git a/zkwebui/WEB-INF/src/org/adempiere/webui/panel/ADTabpanel.java b/zkwebui/WEB-INF/src/org/adempiere/webui/panel/ADTabpanel.java index 1e2e2463e4..84cb8ec12c 100644 --- a/zkwebui/WEB-INF/src/org/adempiere/webui/panel/ADTabpanel.java +++ b/zkwebui/WEB-INF/src/org/adempiere/webui/panel/ADTabpanel.java @@ -426,12 +426,12 @@ DataStatusListener, IADTabpanel, VetoableChangeListener editor.setGridTab(this.getGridTab()); field.addPropertyChangeListener(editor); editors.add(editor); - editorIds.add(editor.getComponent().getUuid()); - if (field.isFieldOnly()) + editorIds.add(editor.getComponent().getUuid()); + if (field.isFieldOnly()) { row.appendChild(createSpacer()); - } - else + } + else { Div div = new Div(); div.setAlign("right"); @@ -478,12 +478,12 @@ DataStatusListener, IADTabpanel, VetoableChangeListener label.setStyle("cursor: pointer; text-decoration: underline;"); label.addEventListener(Events.ON_CLICK, new ZoomListener((IZoomableEditor) editor)); } - + label.setContext(popupMenu.getId()); } } } - else if (field.isHeading()) + else if (field.isHeading()) { //display just a label if we are "heading only" Label label = new Label(field.getHeader()); @@ -1144,5 +1144,15 @@ DataStatusListener, IADTabpanel, VetoableChangeListener public boolean isGridView() { return listPanel.isVisible(); } + + public IADTabpanel findEmbeddedPanel(GridTab gTab) { + IADTabpanel panel = null; + for(EmbeddedPanel ep : includedPanel) { + if (ep.tabPanel.getGridTab().equals(gTab)) { + return ep.tabPanel; + } + } + return panel; + } } diff --git a/zkwebui/WEB-INF/src/org/adempiere/webui/panel/AbstractADWindowPanel.java b/zkwebui/WEB-INF/src/org/adempiere/webui/panel/AbstractADWindowPanel.java index c2eaf05207..ffbdc3533c 100644 --- a/zkwebui/WEB-INF/src/org/adempiere/webui/panel/AbstractADWindowPanel.java +++ b/zkwebui/WEB-INF/src/org/adempiere/webui/panel/AbstractADWindowPanel.java @@ -24,6 +24,7 @@ import java.util.Iterator; import java.util.Map; import java.util.Properties; import java.util.Set; +import java.util.TreeMap; import java.util.Vector; import java.util.logging.Level; @@ -99,7 +100,7 @@ import org.zkoss.zul.Menupopup; * @version $Revision: 0.10 $ * * @author Cristina Ghita, www.arhipac.ro - * @see FR [ 2877111 ] See identifiers columns when delete records https://sourceforge.net/tracker/?func=detail&atid=879335&aid=2877111&group_id=176962 + * @see FR [ 2877111 ] See identifiers columns when delete records https://sourceforge.net/tracker/?func=detail&atid=879335&aid=2877111&group_id=176962 * * @author hengsin, hengsin.low@idalica.com * @see FR [2887701] https://sourceforge.net/tracker/?func=detail&atid=879335&aid=2887701&group_id=176962 @@ -255,7 +256,7 @@ public abstract class AbstractADWindowPanel extends AbstractUIPart implements To int checkad_user_id = -1; if (currSess != null && currSess.getAttribute("Check_AD_User_ID") != null) checkad_user_id = (Integer)currSess.getAttribute("Check_AD_User_ID"); - if (checkad_user_id!=Env.getAD_User_ID(ctx)) + if (checkad_user_id!=Env.getAD_User_ID(ctx)) { String msg = "Bug 2832968 SessionUser=" + checkad_user_id @@ -263,10 +264,10 @@ public abstract class AbstractADWindowPanel extends AbstractUIPart implements To + Env.getAD_User_ID(ctx) + ". Please report conditions to your system administrator or in sf tracker 2832968"; logger.warning(msg); - throw new ApplicationException(msg); + throw new ApplicationException(msg); } // End of temporary code for [ adempiere-ZK Web Client-2832968 ] User context lost? - + // Set AutoCommit for this Window if (embeddedTabindex < 0) { @@ -294,11 +295,23 @@ public abstract class AbstractADWindowPanel extends AbstractUIPart implements To m_onlyCurrentRows = embeddedTabindex < 0 && gridWindow.isTransaction(); + MQuery detailQuery = null; /** * Window Tabs */ if (embeddedTabindex < 0) { + if (query != null && query.getZoomTableName() != null && query.getZoomColumnName() != null + && query.getZoomValue() instanceof Integer && (Integer)query.getZoomValue() > 0) + { + if (!query.getZoomTableName().equalsIgnoreCase(gridWindow.getTab(0).getTableName())) + { + detailQuery = query; + query = new MQuery(); + query.addRestriction("1=2"); + } + } + int tabSize = gridWindow.getTabCount(); for (int tab = 0; tab < tabSize; tab++) @@ -330,8 +343,8 @@ public abstract class AbstractADWindowPanel extends AbstractUIPart implements To { toolbar.enableHistoryRecords(true); } - - if (zoomToDetailTab(query)) + + if (detailQuery != null && zoomToDetailTab(detailQuery)) { return true; } @@ -363,48 +376,11 @@ public abstract class AbstractADWindowPanel extends AbstractUIPart implements To gTab = gridWindow.getTab(tab); if (gTab.isSortTab()) continue; - if (gTab.getTabLevel() == 1 && gTab.getTableName().equalsIgnoreCase(query.getZoomTableName())) + if (gTab.getTableName().equalsIgnoreCase(query.getZoomTableName())) { - GridField[] fields = gTab.getFields(); - for (GridField field : fields) - { - if (field.getColumnName().equalsIgnoreCase(query.getZoomColumnName())) - { - if (query.getZoomValue() != null && query.getZoomValue() instanceof Integer) - { - if (!includedMap.containsKey(gTab.getAD_Tab_ID())) - { - IADTabpanel tp = adTab.findADTabpanel(gTab); - tp.createUI(); - tp.query(); - } - GridTable table = gTab.getTableModel(); - int count = table.getRowCount(); - for(int i = 0; i < count; i++) - { - int id = table.getKeyID(i); - if (id == ((Integer)query.getZoomValue()).intValue()) - { - if (!includedMap.containsKey(gTab.getAD_Tab_ID())) - { - setActiveTab(tab); - } - gTab.setCurrentRow(i); - return true; - } - } - } - else - { - if (!includedMap.containsKey(gTab.getAD_Tab_ID())) - { - setActiveTab(tab); - } - return true; - } - break; - } - } + if (doZoomToDetail(gTab, query, tab)) { + return true; + } } } } @@ -412,6 +388,108 @@ public abstract class AbstractADWindowPanel extends AbstractUIPart implements To return false; } + private boolean doZoomToDetail(GridTab gTab, MQuery query, int tabIndex) { + GridField[] fields = gTab.getFields(); + for (GridField field : fields) + { + if (field.getColumnName().equalsIgnoreCase(query.getZoomColumnName())) + { + gridWindow.initTab(tabIndex); + int parentId = DB.getSQLValue(null, "SELECT " + gTab.getLinkColumnName() + " FROM " + gTab.getTableName() + " WHERE " + query.getWhereClause()); + if (parentId > 0) + { + MapparentMap = new TreeMap(); + int index = tabIndex; + int oldpid = parentId; + GridTab currentTab = gTab; + while (index > 0) + { + index--; + GridTab pTab = gridWindow.getTab(index); + if (pTab.getTabLevel() < currentTab.getTabLevel()) + { + gridWindow.initTab(index); + if (index > 0) + { + if (pTab.getLinkColumnName() != null && pTab.getLinkColumnName().trim().length() > 0) + { + int pid = DB.getSQLValue(null, "SELECT " + pTab.getLinkColumnName() + " FROM " + pTab.getTableName() + " WHERE " + currentTab.getLinkColumnName() + " = ?", oldpid); + if (pid > 0) + { + parentMap.put(index, new Object[]{currentTab.getLinkColumnName(), oldpid}); + oldpid = pid; + currentTab = pTab; + } + else + { + parentMap.clear(); + break; + } + } + } + else + { + parentMap.put(index, new Object[]{currentTab.getLinkColumnName(), oldpid}); + } + } + } + + for(Map.Entry entry : parentMap.entrySet()) + { + GridTab pTab = gridWindow.getTab(entry.getKey()); + Object[] value = entry.getValue(); + MQuery pquery = new MQuery(pTab.getAD_Table_ID()); + pquery.addRestriction((String)value[0], "=", value[1]); + pTab.setQuery(pquery); + IADTabpanel tp = adTab.findADTabpanel(pTab); + tp.createUI(); + tp.query(); + } + + MQuery targetQuery = new MQuery(gTab.getAD_Table_ID()); + targetQuery.addRestriction(gTab.getLinkColumnName(), "=", parentId); + gTab.setQuery(targetQuery); + IADTabpanel gc = null; + if (!includedMap.containsKey(gTab.getAD_Tab_ID())) + { + gc = adTab.findADTabpanel(gTab); + } + else + { + ADTabpanel parent = (ADTabpanel)includedMap.get(gTab.getAD_Tab_ID()); + gc = parent.findEmbeddedPanel(gTab); + } + gc.createUI(); + gc.query(false, 0, 0); + + GridTable table = gTab.getTableModel(); + int count = table.getRowCount(); + for(int i = 0; i < count; i++) + { + int id = table.getKeyID(i); + if (id == ((Integer)query.getZoomValue()).intValue()) + { + if (!includedMap.containsKey(gTab.getAD_Tab_ID())) + { + setActiveTab(gridWindow.getTabIndex(gTab)); + } + else + { + IADTabpanel parent = includedMap.get(gTab.getAD_Tab_ID()); + int pindex = gridWindow.getTabIndex(parent.getGridTab()); + if (pindex >= 0) + setActiveTab(pindex); + } + gTab.setCurrentRow(i); + return true; + } + } + } + } + } + return false; + } + private void initEmbeddedTab(MQuery query, int tabIndex) { GridTab gTab = gridWindow.getTab(tabIndex); gTab.addDataStatusListener(this); @@ -986,9 +1064,9 @@ public abstract class AbstractADWindowPanel extends AbstractUIPart implements To { toolbar.lock(curTab.isLocked()); } - + toolbar.enablePrint(curTab.isPrinted()); - + if (gridWindow.isTransaction() && isFirstTab()) { toolbar.enableHistoryRecords(true); @@ -1370,7 +1448,7 @@ public abstract class AbstractADWindowPanel extends AbstractUIPart implements To { statusBar.setStatusLine(Msg.getMsg(Env.getCtx(), msg), true, true); } - //other error will be catch in the dataStatusChanged event + //other error will be catch in the dataStatusChanged event } /** @@ -1414,7 +1492,7 @@ public abstract class AbstractADWindowPanel extends AbstractUIPart implements To final Listbox listbox = new Listbox(); listbox.setHeight("400px"); - + Vector data = new Vector(); // FR [ 2877111 ] final String keyColumnName = curTab.getKeyColumnName(); @@ -1463,7 +1541,7 @@ public abstract class AbstractADWindowPanel extends AbstractUIPart implements To data.add(displayValue.toString()); } // FR [ 2877111 ] - + for(int i = 0; i < data.size(); i++) { String record = data.get(i); @@ -1565,7 +1643,7 @@ public abstract class AbstractADWindowPanel extends AbstractUIPart implements To if (!getComponent().getDesktop().isServerPushEnabled()) getComponent().getDesktop().enableServerPush(true); - ProcessModalDialog dialog = new ProcessModalDialog(this,0, + ProcessModalDialog dialog = new ProcessModalDialog(this,getWindowNo(), AD_Process_ID,table_ID, record_ID, true); if (dialog.isValid()) { dialog.setPosition("center"); @@ -1785,7 +1863,7 @@ public abstract class AbstractADWindowPanel extends AbstractUIPart implements To } boolean isProcessMandatory = false; - + // Pop up Payment Rules if (col.equals("PaymentRule")) diff --git a/zkwebui/WEB-INF/src/org/adempiere/webui/panel/InfoPAttributePanel.java b/zkwebui/WEB-INF/src/org/adempiere/webui/panel/InfoPAttributePanel.java index fefeebb248..341b3841f3 100644 --- a/zkwebui/WEB-INF/src/org/adempiere/webui/panel/InfoPAttributePanel.java +++ b/zkwebui/WEB-INF/src/org/adempiere/webui/panel/InfoPAttributePanel.java @@ -34,6 +34,7 @@ import org.adempiere.webui.editor.WNumberEditor; import org.adempiere.webui.editor.WStringEditor; import org.compiere.apps.search.InfoPAttribute; import org.compiere.model.MAttribute; +import org.compiere.model.MAttributeSet; import org.compiere.model.MRole; import org.compiere.util.CLogger; import org.compiere.util.DB; @@ -60,8 +61,11 @@ public class InfoPAttributePanel extends Window implements EventListener /** * */ - private static final long serialVersionUID = -6385043105828153806L; + private static final long serialVersionUID = -4922961793415942591L; + /* the attribute set selected on the InfoProduct window */ + private int p_M_AttributeSet_ID = 0; + /** * Constructor. * Called from InfoProduct,cmd_InfoPAttribute @@ -70,6 +74,9 @@ public class InfoPAttributePanel extends Window implements EventListener public InfoPAttributePanel(Window parent) { super(); + if (parent instanceof InfoProductPanel) { + p_M_AttributeSet_ID = ((InfoProductPanel)parent).getM_AttributeSet_ID(); + } setTitle(Msg.getMsg(Env.getCtx(), "InfoPAttribute")); this.setBorder("normal"); this.setMaximizable(true); @@ -141,6 +148,16 @@ public class InfoPAttributePanel extends Window implements EventListener private void dynInit() { addAttributes(); + + boolean isGuarantee = true; + boolean isSerial = true; + boolean isLot = true; + if (p_M_AttributeSet_ID > 0) { + MAttributeSet as = new MAttributeSet(Env.getCtx(), p_M_AttributeSet_ID, null); + isGuarantee = as.isGuaranteeDate(); + isSerial = as.isSerNo(); + isLot = as.isLot(); + } // String s = Msg.translate(Env.getCtx(), "GuaranteeDate"); guaranteeDateSelection = new Listbox(); @@ -154,39 +171,47 @@ public class InfoPAttributePanel extends Window implements EventListener initLotSelection(); // Fixed Instance Selection Fields - Row row = new Row(); - rows.appendChild(row); - Div div = new Div(); - div.setAlign("right"); - div.appendChild(serNoLabel); - row.appendChild(div); - row.appendChild(serNoField.getComponent()); - serNoField.getComponent().setWidth("150px"); + Row row; + Div div; + if (isSerial) { + row = new Row(); + rows.appendChild(row); + div = new Div(); + div.setAlign("right"); + div.appendChild(serNoLabel); + row.appendChild(div); + row.appendChild(serNoField.getComponent()); + serNoField.getComponent().setWidth("150px"); + } - row = new Row(); - rows.appendChild(row); - div = new Div(); - div.setAlign("right"); - div.appendChild(lotLabel); - row.appendChild(div); - row.appendChild(lotField.getComponent()); - lotField.getComponent().setWidth("150px"); + if (isLot) { + row = new Row(); + rows.appendChild(row); + div = new Div(); + div.setAlign("right"); + div.appendChild(lotLabel); + row.appendChild(div); + row.appendChild(lotField.getComponent()); + lotField.getComponent().setWidth("150px"); - row = new Row(); - rows.appendChild(row); - div = new Div(); - div.setAlign("right"); - div.appendChild(lotLabel2); - row.appendChild(div); - row.appendChild(lotSelection); - - row = new Row(); - rows.appendChild(row); - div = new Div(); - div.setAlign("right"); - div.appendChild(guaranteeDateSelection); - row.appendChild(div); - row.appendChild(guaranteeDateField); + row = new Row(); + rows.appendChild(row); + div = new Div(); + div.setAlign("right"); + div.appendChild(lotLabel2); + row.appendChild(div); + row.appendChild(lotSelection); + } + + if (isGuarantee) { + row = new Row(); + rows.appendChild(row); + div = new Div(); + div.setAlign("right"); + div.appendChild(guaranteeDateSelection); + row.appendChild(div); + row.appendChild(guaranteeDateField); + } } // dynInit /** @@ -197,17 +222,23 @@ public class InfoPAttributePanel extends Window implements EventListener { PreparedStatement pstmt = null; ResultSet rs = null; + String whereAttributeSet; + if (p_M_AttributeSet_ID > 0) + whereAttributeSet = "AND M_Attribute_ID IN (SELECT M_Attribute_ID FROM M_AttributeUse WHERE M_AttributeSet_ID="+p_M_AttributeSet_ID+")"; + else + whereAttributeSet = ""; String sql = MRole.getDefault().addAccessSQL( "SELECT M_Attribute_ID, Name, Description, AttributeValueType, IsInstanceAttribute " + "FROM M_Attribute " + "WHERE IsActive='Y' " - + "ORDER BY IsInstanceAttribute, Name", + + whereAttributeSet + + " ORDER BY IsInstanceAttribute, Name", "M_Attribute", MRole.SQL_NOTQUALIFIED, MRole.SQL_RO); + boolean instanceLine = false; try { pstmt = DB.prepareStatement(sql, null); rs = pstmt.executeQuery(); - boolean instanceLine = false; while (rs.next()) { int attribute_ID = rs.getInt(1); @@ -307,6 +338,38 @@ public class InfoPAttributePanel extends Window implements EventListener DB.close(rs, pstmt); rs = null; pstmt = null; } + + // print instance line if not printed + if (!instanceLine) { + boolean isGuarantee = true; + boolean isSerial = true; + boolean isLot = true; + if (p_M_AttributeSet_ID > 0) { + MAttributeSet as = new MAttributeSet(Env.getCtx(), p_M_AttributeSet_ID, null); + isGuarantee = as.isGuaranteeDate(); + isSerial = as.isSerNo(); + isLot = as.isLot(); + } + if (isGuarantee || isSerial || isLot) { + Row row = new Row(); + rows.appendChild(row); + row.setSpans("2"); + Label group = new Label(Msg.translate(Env.getCtx(), "IsInstanceAttribute")); + row.appendChild(group); + rows.appendChild(row); + + row = new Row(); + rows.appendChild(row); + row.setSpans("2"); + Separator separator = new Separator(); + separator.setBar(true); + row.appendChild(separator); + rows.appendChild(row); + + instanceLine = true; + } + } + return 0; } // addProductAttributes @@ -358,8 +421,13 @@ public class InfoPAttributePanel extends Window implements EventListener ArrayList list = new ArrayList(); list.add(new KeyNamePair(-1, "")); + String whereAttributeSet; + if (p_M_AttributeSet_ID > 0) + whereAttributeSet = "AND M_Product_ID IN (SELECT M_Product_ID FROM M_Product WHERE M_AttributeSet_ID="+p_M_AttributeSet_ID+")"; + else + whereAttributeSet = ""; String sql = MRole.getDefault().addAccessSQL( - "SELECT M_Lot_ID, Name FROM M_Lot WHERE IsActive='Y' ORDER BY 2", + "SELECT M_Lot_ID, Name FROM M_Lot WHERE IsActive='Y' " + whereAttributeSet + " ORDER BY 2", "M_Lot", MRole.SQL_NOTQUALIFIED, MRole.SQL_RO); PreparedStatement pstmt = null; ResultSet rs = null; diff --git a/zkwebui/WEB-INF/src/org/adempiere/webui/panel/InfoPanel.java b/zkwebui/WEB-INF/src/org/adempiere/webui/panel/InfoPanel.java index aed59da0a0..aec4839b52 100644 --- a/zkwebui/WEB-INF/src/org/adempiere/webui/panel/InfoPanel.java +++ b/zkwebui/WEB-INF/src/org/adempiere/webui/panel/InfoPanel.java @@ -383,7 +383,7 @@ public abstract class InfoPanel extends Window implements EventListener, WTableM MTable table = MTable.get(Env.getCtx(), tableName); if (table != null) { - m_useDatabasePaging = table.isHighVolume() && DB.getDatabase().isPagingSupported(); + m_useDatabasePaging = table.isHighVolume(); } } // prepareTable @@ -450,7 +450,6 @@ public abstract class InfoPanel extends Window implements EventListener, WTableM protected void renderItems() { - Vector columnHeader = getColumnHeader(p_layout); if (m_count > 0) { if (m_count > PAGE_SIZE) @@ -504,7 +503,7 @@ public abstract class InfoPanel extends Window implements EventListener, WTableM { if (start+1 >= cacheStart && end+1 <= cacheEnd) { - return end == -1 ? line : line.subList(start, end); + return end == -1 ? line : line.subList(start-cacheStart+1, end-cacheStart+2); } } @@ -548,7 +547,7 @@ public abstract class InfoPanel extends Window implements EventListener, WTableM String dataSql = Msg.parseTranslation(Env.getCtx(), sql.toString()); // Variables dataSql = MRole.getDefault().addAccessSQL(dataSql, getTableName(), MRole.SQL_FULLYQUALIFIED, MRole.SQL_RO); - if (end > start && DB.getDatabase().isPagingSupported()) + if (end > start && m_useDatabasePaging && DB.getDatabase().isPagingSupported()) { dataSql = DB.getDatabase().addPagingSQL(dataSql, cacheStart, cacheEnd); } @@ -560,10 +559,26 @@ public abstract class InfoPanel extends Window implements EventListener, WTableM log.fine("Start query - " + (System.currentTimeMillis()-startTime) + "ms"); m_rs = m_pstmt.executeQuery(); log.fine("End query - " + (System.currentTimeMillis()-startTime) + "ms"); + //skips the row that we dont need if we can't use native db paging + if (end > start && m_useDatabasePaging && !DB.getDatabase().isPagingSupported()) + { + for (int i = 0; i < cacheStart - 1; i++) + { + if (!m_rs.next()) + break; + } + } + int rowPointer = cacheStart-1; while (m_rs.next()) { + rowPointer++; readData(m_rs); + //check now of rows loaded, break if we hit the suppose end + if (m_useDatabasePaging && rowPointer >= cacheEnd) + { + break; + } } } diff --git a/zkwebui/WEB-INF/src/org/adempiere/webui/panel/InfoProductPanel.java b/zkwebui/WEB-INF/src/org/adempiere/webui/panel/InfoProductPanel.java index 27bc24bc84..c9c1e607c5 100644 --- a/zkwebui/WEB-INF/src/org/adempiere/webui/panel/InfoProductPanel.java +++ b/zkwebui/WEB-INF/src/org/adempiere/webui/panel/InfoProductPanel.java @@ -97,7 +97,7 @@ public class InfoProductPanel extends InfoPanel implements EventListener /** * */ - private static final long serialVersionUID = 73880400775610395L; + private static final long serialVersionUID = 6804975825156657866L; private Label lblValue = new Label(); private Textbox fieldValue = new Textbox(); private Label lblName = new Label(); @@ -116,6 +116,8 @@ public class InfoProductPanel extends InfoPanel implements EventListener private Label lblProductCategory = new Label(); private Listbox pickProductCategory = new Listbox(); // + private Label lblAS = new Label(); + private Listbox pickAS = new Listbox(); // Elaine 2008/11/25 private Borderlayout borderlayout = new Borderlayout(); @@ -219,6 +221,8 @@ public class InfoProductPanel extends InfoPanel implements EventListener lblProductCategory = new Label(); lblProductCategory.setValue(Msg.translate(Env.getCtx(), "M_Product_Category_ID")); // + lblAS = new Label(); + lblAS.setValue(Msg.translate(Env.getCtx(), "M_AttributeSet_ID")); lblWarehouse = new Label(); lblWarehouse.setValue(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "Warehouse"))); lblVendor = new Label(); @@ -251,6 +255,12 @@ public class InfoProductPanel extends InfoPanel implements EventListener pickProductCategory.setWidth("150px"); pickProductCategory.addEventListener(Events.ON_SELECT, this); // + pickAS = new Listbox(); + pickAS.setRows(0); + pickAS.setMultiple(false); + pickAS.setMold("select"); + pickAS.setWidth("150px"); + pickAS.addEventListener(Events.ON_SELECT, this); pickWarehouse = new Listbox(); pickWarehouse.setRows(0); @@ -281,8 +291,6 @@ public class InfoProductPanel extends InfoPanel implements EventListener row.appendChild(fieldUPC); row.appendChild(lblWarehouse.rightAlign()); row.appendChild(pickWarehouse); - row.appendChild(lblPriceList.rightAlign()); - row.appendChild(pickPriceList); row.appendChild(m_InfoPAttributeButton); row = new Row(); @@ -294,11 +302,18 @@ public class InfoProductPanel extends InfoPanel implements EventListener row.appendChild(fieldSKU); row.appendChild(lblVendor.rightAlign()); row.appendChild(fieldVendor); - row.appendChild(lblProductCategory.rightAlign()); - row.appendChild(pickProductCategory); // - // Product Attribute Instance + row = new Row(); + rows.appendChild(row); + row.appendChild(lblPriceList.rightAlign()); + row.appendChild(pickPriceList); + row.appendChild(lblProductCategory.rightAlign()); + row.appendChild(pickProductCategory); + row.appendChild(lblAS.rightAlign()); + row.appendChild(pickAS); + + // Product Attribute Instance m_PAttributeButton = confirmPanel.createButton(ConfirmPanel.A_PATTRIBUTE); confirmPanel.addComponentsLeft(m_PAttributeButton); m_PAttributeButton.addActionListener(this); @@ -609,6 +624,7 @@ public class InfoProductPanel extends InfoPanel implements EventListener pickWarehouse.addEventListener(Events.ON_SELECT,this); pickPriceList.addEventListener(Events.ON_SELECT,this); pickProductCategory.addEventListener(Events.ON_SELECT, this); // Elaine 2008/11/21 + pickAS.addEventListener(Events.ON_SELECT, this); } // initInfo /** @@ -670,7 +686,15 @@ public class InfoProductPanel extends InfoPanel implements EventListener for (KeyNamePair kn : DB.getKeyNamePairs(SQL, true)) { pickProductCategory.addItem(kn); } - // + + // Attribute Sets + SQL = MRole.getDefault().addAccessSQL ( + "SELECT M_AttributeSet_ID, Name FROM M_AttributeSet WHERE IsActive='Y'", + "M_AttributeSet", MRole.SQL_NOTQUALIFIED, MRole.SQL_RO) + + " ORDER BY Name"; + for (KeyNamePair kn : DB.getKeyNamePairs(SQL, true)) { + pickAS.addItem(kn); + } } catch (SQLException e) { @@ -797,6 +821,11 @@ public class InfoProductPanel extends InfoPanel implements EventListener } // + // Optional Attribute Set + if (getM_AttributeSet_ID() > 0) { + where.append(" AND p.M_AttributeSet_ID=?"); + } + // Product Attribute Search if (m_pAttributeWhere != null) { @@ -875,6 +904,11 @@ public class InfoProductPanel extends InfoPanel implements EventListener log.fine("M_Product_Category_ID=" + M_Product_Category_ID); } // + int M_AttributeSet_ID = getM_AttributeSet_ID(); + if (M_AttributeSet_ID > 0) { + pstmt.setInt(index++, M_AttributeSet_ID); + log.fine("M_AttributeSet_ID=" + M_AttributeSet_ID); + } // Rest of Parameter in Query for Attribute Search if (m_pAttributeWhere != null) return; @@ -1389,4 +1423,16 @@ public class InfoProductPanel extends InfoPanel implements EventListener return M_Product_Category_ID; } // + + public int getM_AttributeSet_ID() + { + int M_AttributeSet_ID = 0; + + ListItem itemAS = (ListItem)pickAS.getSelectedItem(); + if (itemAS!=null) + M_AttributeSet_ID = Integer.parseInt(itemAS.getValue().toString()); + + return M_AttributeSet_ID; + } + } // InfoProduct diff --git a/zkwebui/WEB-INF/src/org/adempiere/webui/panel/RolePanel.java b/zkwebui/WEB-INF/src/org/adempiere/webui/panel/RolePanel.java index e841796386..552ed38640 100644 --- a/zkwebui/WEB-INF/src/org/adempiere/webui/panel/RolePanel.java +++ b/zkwebui/WEB-INF/src/org/adempiere/webui/panel/RolePanel.java @@ -93,9 +93,6 @@ public class RolePanel extends Window implements EventListener, Deferrable if(rolesKNPairs == null) throw new ApplicationException("Login is invalid, UserName: " + userName + " and Password:" + password); - //set app server credentials - CConnection.get().setAppServerCredential(userName, password); - initComponents(); init(); this.setId("rolePanel"); diff --git a/zkwebui/WEB-INF/src/org/adempiere/webui/panel/WDocActionPanel.java b/zkwebui/WEB-INF/src/org/adempiere/webui/panel/WDocActionPanel.java index 4da7aa865a..df818243db 100644 --- a/zkwebui/WEB-INF/src/org/adempiere/webui/panel/WDocActionPanel.java +++ b/zkwebui/WEB-INF/src/org/adempiere/webui/panel/WDocActionPanel.java @@ -176,6 +176,7 @@ public class WDocActionPanel extends Window implements EventListener * Fill actionCombo */ + boolean firstadded = true; for (int i = 0; i < index; i++) { // Serach for option and add it @@ -185,11 +186,17 @@ public class WDocActionPanel extends Window implements EventListener { if (options[i].equals(s_value[j])) { - lstDocAction.appendItem(s_name[j],s_value[j]); + Listitem newitem = lstDocAction.appendItem(s_name[j],s_value[j]); + if (firstadded) { + // select by default the first added item - can be changed below + lstDocAction.setSelectedItem(newitem); + firstadded = false; + } added = true; } } } + // look if the current DocAction is within the list and assign it as selected if it exists List lst = (List)lstDocAction.getItems(); for(Listitem item: lst) { From e92f647b61659e44ea6f51bebce7b2db00754ed4 Mon Sep 17 00:00:00 2001 From: joergviola Date: Wed, 17 Mar 2010 19:48:19 +0000 Subject: [PATCH 24/46] Extension Point FormPanel Some fixes on 2pack integration https://sourceforge.net/tracker/?func=detail&aid=2700937&group_id=176962&atid=879334 --- base/plugin.xml | 1 + .../org.compiere.apps.form.FormPanel.exsd | 102 ++++++++++++++++++ base/src/org/adempiere/base/Core.java | 6 ++ .../src/org/adempiere/client/Activator.java | 25 ++++- client/src/org/adempiere/client/Client.java | 18 ++++ .../src/org/compiere/apps/form/FormFrame.java | 7 +- .../src/org/compiere/apps/form/FormPanel.java | 4 +- plugins/pipo/META-INF/MANIFEST.MF | 3 + plugins/pipo/plugin.xml | 2 +- .../pipo/{ => srv}/PipoDictionaryService.java | 4 +- tools/.classpath | 1 + tools/META-INF/MANIFEST.MF | 46 +++++++- tools/build.properties | 6 +- 13 files changed, 215 insertions(+), 10 deletions(-) create mode 100644 base/schema/org.compiere.apps.form.FormPanel.exsd create mode 100644 client/src/org/adempiere/client/Client.java rename plugins/pipo/src/org/adempiere/pipo/{ => srv}/PipoDictionaryService.java (94%) diff --git a/base/plugin.xml b/base/plugin.xml index d960b2b036..e956db1f4d 100644 --- a/base/plugin.xml +++ b/base/plugin.xml @@ -4,5 +4,6 @@ + diff --git a/base/schema/org.compiere.apps.form.FormPanel.exsd b/base/schema/org.compiere.apps.form.FormPanel.exsd new file mode 100644 index 0000000000..9cd2b89745 --- /dev/null +++ b/base/schema/org.compiere.apps.form.FormPanel.exsd @@ -0,0 +1,102 @@ + + + + + + + + + [Enter description of this extension point.] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + [Enter the first release in which this extension point appears.] + + + + + + + + + [Enter extension point usage example here.] + + + + + + + + + [Enter API information here.] + + + + + + + + + [Enter information about supplied implementation of this extension point.] + + + + + diff --git a/base/src/org/adempiere/base/Core.java b/base/src/org/adempiere/base/Core.java index c5e5431ada..2b204f7d71 100644 --- a/base/src/org/adempiere/base/Core.java +++ b/base/src/org/adempiere/base/Core.java @@ -11,6 +11,8 @@ import java.util.List; */ public class Core { + public static final String OSGI_PREFIX = "osgi://"; + public static IResourceFinder getResourceFinder() { return new IResourceFinder() { @@ -34,5 +36,9 @@ public class Core { return Service.list(IColumnCallout.class, query); } + public static boolean isExtension(String className) { + return className.startsWith(OSGI_PREFIX); + } + } diff --git a/client/src/org/adempiere/client/Activator.java b/client/src/org/adempiere/client/Activator.java index fb5fec09f0..36e34f5279 100644 --- a/client/src/org/adempiere/client/Activator.java +++ b/client/src/org/adempiere/client/Activator.java @@ -1,12 +1,35 @@ package org.adempiere.client; +import org.compiere.util.CLogger; import org.eclipse.core.runtime.Plugin; +import org.osgi.framework.Bundle; import org.osgi.framework.BundleContext; +import org.osgi.framework.BundleException; public class Activator extends Plugin { + private static final String ADMEPIERE_PREFIX = "org.adempiere"; + private static CLogger log = CLogger.getCLogger(Activator.class); + @Override public void start(BundleContext context) throws Exception { - System.out.println("Starting client"); + log.info("Starting client"); org.compiere.AdempiereClient.main(new String[]{}); + activateAll(context.getBundles()); + } + + private void activateAll(Bundle[] bundles) { + for (Bundle bundle : bundles) { + if (shouldStart(bundle)) + try { + bundle.start(); + log.info("Started "+bundle.getSymbolicName()); + } catch (BundleException e) { + log.warning("Could not start "+bundle.getSymbolicName()); + } + } + } + + private boolean shouldStart(Bundle bundle) { + return bundle.getSymbolicName().startsWith(ADMEPIERE_PREFIX); } } diff --git a/client/src/org/adempiere/client/Client.java b/client/src/org/adempiere/client/Client.java new file mode 100644 index 0000000000..0fd064200e --- /dev/null +++ b/client/src/org/adempiere/client/Client.java @@ -0,0 +1,18 @@ +package org.adempiere.client; + +import org.adempiere.base.Core; +import org.adempiere.base.Service; +import org.adempiere.base.ServiceQuery; +import org.compiere.apps.form.FormPanel; + +public class Client { + + public static FormPanel getFormPanel(String className) { + if (Core.isExtension(className)) + className = className.substring(Core.OSGI_PREFIX.length()); + ServiceQuery query = new ServiceQuery(); + query.put("class", className); + return Service.locate(FormPanel.class, query ); + } + +} diff --git a/client/src/org/compiere/apps/form/FormFrame.java b/client/src/org/compiere/apps/form/FormFrame.java index fa741e19e0..bfed07e3b1 100644 --- a/client/src/org/compiere/apps/form/FormFrame.java +++ b/client/src/org/compiere/apps/form/FormFrame.java @@ -32,6 +32,8 @@ import javax.swing.JMenu; import javax.swing.JMenuBar; import javax.swing.KeyStroke; +import org.adempiere.base.Core; +import org.adempiere.client.Client; import org.compiere.apps.AEnv; import org.compiere.apps.AGlassPane; import org.compiere.apps.AMenu; @@ -303,7 +305,10 @@ public class FormFrame extends CFrame try { // Create instance w/o parameters - m_panel = (FormPanel)Class.forName(className).newInstance(); + if (Core.isExtension(className)) + m_panel = Client.getFormPanel(className); + else + m_panel = (FormPanel)Class.forName(className).newInstance(); } catch (Exception e) { diff --git a/client/src/org/compiere/apps/form/FormPanel.java b/client/src/org/compiere/apps/form/FormPanel.java index 443ac21be5..f0adf52f76 100644 --- a/client/src/org/compiere/apps/form/FormPanel.java +++ b/client/src/org/compiere/apps/form/FormPanel.java @@ -16,13 +16,15 @@ *****************************************************************************/ package org.compiere.apps.form; +import org.adempiere.base.IService; + /** * Form Panel Interface. * for communicating between FormFrame and JPanel * @author Jorg Janke * @version $Id: FormPanel.java,v 1.2 2006/07/30 00:51:28 jjanke Exp $ */ -public interface FormPanel +public interface FormPanel extends IService { /** * Initialize Panel diff --git a/plugins/pipo/META-INF/MANIFEST.MF b/plugins/pipo/META-INF/MANIFEST.MF index 7614ebbee9..8908263f8d 100644 --- a/plugins/pipo/META-INF/MANIFEST.MF +++ b/plugins/pipo/META-INF/MANIFEST.MF @@ -8,3 +8,6 @@ Import-Package: org.adempiere.base, org.adempiere.pipo, org.compiere, org.compiere.util +Export-Package: org.adempiere.pipo.srv +Require-Bundle: org.adempiere.base;bundle-version="0.0.0", + org.adempiere.tools;bundle-version="0.0.0" diff --git a/plugins/pipo/plugin.xml b/plugins/pipo/plugin.xml index 61312c4cbb..5ac7a83ec5 100644 --- a/plugins/pipo/plugin.xml +++ b/plugins/pipo/plugin.xml @@ -4,7 +4,7 @@ + class="org.adempiere.pipo.srv.PipoDictionaryService"> diff --git a/plugins/pipo/src/org/adempiere/pipo/PipoDictionaryService.java b/plugins/pipo/src/org/adempiere/pipo/srv/PipoDictionaryService.java similarity index 94% rename from plugins/pipo/src/org/adempiere/pipo/PipoDictionaryService.java rename to plugins/pipo/src/org/adempiere/pipo/srv/PipoDictionaryService.java index 300fc164a6..c955dd4457 100644 --- a/plugins/pipo/src/org/adempiere/pipo/PipoDictionaryService.java +++ b/plugins/pipo/src/org/adempiere/pipo/srv/PipoDictionaryService.java @@ -1,4 +1,4 @@ -package org.adempiere.pipo; +package org.adempiere.pipo.srv; import java.io.File; import java.io.InputStream; @@ -9,6 +9,8 @@ import javax.xml.parsers.SAXParser; import javax.xml.parsers.SAXParserFactory; import org.adempiere.base.IDictionaryService; +import org.adempiere.pipo.PackIn; +import org.adempiere.pipo.PackInHandler; import org.compiere.Adempiere; import org.compiere.util.DB; import org.compiere.util.Trx; diff --git a/tools/.classpath b/tools/.classpath index 3d9be19ad1..e69130761d 100644 --- a/tools/.classpath +++ b/tools/.classpath @@ -1,6 +1,7 @@ + diff --git a/tools/META-INF/MANIFEST.MF b/tools/META-INF/MANIFEST.MF index dc79ccc1b6..cb19c49b15 100644 --- a/tools/META-INF/MANIFEST.MF +++ b/tools/META-INF/MANIFEST.MF @@ -50,9 +50,11 @@ Bundle-ClassPath: tools.jar, lib/ojdbc14.jar, lib/postgresql.jar, lib/wizard.jar, - lib/xercesImpl.jar, lib/xjavadoc-1.1.jar, - lib/xml-apis.jar + lib/xml-apis.jar, + lib/cron4j-2.2.1.jar, + lib/payflow.jar, + lib/xercesImpl.jar Export-Package: Lib, Lib.email, Lib.encodings, @@ -707,6 +709,7 @@ Export-Package: Lib, org.apache.ecs.storage, org.apache.ecs.xhtml;uses:="org.apache.ecs", org.apache.ecs.xml;uses:="org.apache.ecs", + org.apache.html.dom, org.apache.log4j;uses:="org.apache.log4j.or,org.apache.log4j.spi,org.apache.log4j.helpers", org.apache.log4j.chainsaw; uses:="javax.swing.event, @@ -863,6 +866,42 @@ Export-Package: Lib, org.apache.taglibs.standard.tag.rt.xml;uses:="org.xml.sax,org.apache.taglibs.standard.tag.common.xml,javax.xml.transform", org.apache.taglibs.standard.tei;uses:="javax.servlet.jsp.tagext", org.apache.taglibs.standard.tlv;uses:="org.xml.sax,javax.servlet.jsp.tagext,org.xml.sax.helpers", + org.apache.wml, + org.apache.wml.dom, + org.apache.xerces.dom, + org.apache.xerces.dom.events, + org.apache.xerces.dom3.as, + org.apache.xerces.impl, + org.apache.xerces.impl.dtd, + org.apache.xerces.impl.dtd.models, + org.apache.xerces.impl.dv, + org.apache.xerces.impl.dv.dtd, + org.apache.xerces.impl.dv.util, + org.apache.xerces.impl.dv.xs, + org.apache.xerces.impl.io, + org.apache.xerces.impl.msg, + org.apache.xerces.impl.validation, + org.apache.xerces.impl.xpath, + org.apache.xerces.impl.xpath.regex, + org.apache.xerces.impl.xs, + org.apache.xerces.impl.xs.identity, + org.apache.xerces.impl.xs.models, + org.apache.xerces.impl.xs.opti, + org.apache.xerces.impl.xs.traversers, + org.apache.xerces.impl.xs.util, + org.apache.xerces.jaxp, + org.apache.xerces.jaxp.datatype, + org.apache.xerces.jaxp.validation, + org.apache.xerces.parsers, + org.apache.xerces.util, + org.apache.xerces.xinclude, + org.apache.xerces.xni, + org.apache.xerces.xni.grammars, + org.apache.xerces.xni.parser, + org.apache.xerces.xpointer, + org.apache.xerces.xs, + org.apache.xerces.xs.datatypes, + org.apache.xml.serialize, org.codehaus.groovy, org.codehaus.groovy.ant; uses:="groovyjarjarasm.asm.tree, @@ -1431,4 +1470,5 @@ Export-Package: Lib, org.apache.tools.ant.taskdefs, org.apache.tools.ant.types, org.python.core, - jline" + jline", + org.w3c.dom.html diff --git a/tools/build.properties b/tools/build.properties index db996bc655..96b9a4dc42 100644 --- a/tools/build.properties +++ b/tools/build.properties @@ -47,6 +47,8 @@ bin.includes = META-INF/,\ lib/ojdbc14.jar,\ lib/postgresql.jar,\ lib/wizard.jar,\ - lib/xercesImpl.jar,\ lib/xjavadoc-1.1.jar,\ - lib/xml-apis.jar + lib/xml-apis.jar,\ + lib/cron4j-2.2.1.jar,\ + lib/payflow.jar,\ + lib/xercesImpl.jar From 3fa24305c749fbfc4c100534c89384d6881ed0cb Mon Sep 17 00:00:00 2001 From: joergviola Date: Wed, 17 Mar 2010 19:49:56 +0000 Subject: [PATCH 25/46] Plugin for displaying plugins. https://sourceforge.net/tracker/?func=detail&aid=2700937&group_id=176962&atid=879334 --- plugins/pluginList/.classpath | 7 + plugins/pluginList/.project | 28 ++++ .../.settings/org.eclipse.jdt.core.prefs | 8 + .../.settings/org.eclipse.pde.core.prefs | 4 + plugins/pluginList/META-INF/MANIFEST.MF | 13 ++ plugins/pluginList/META-INF/PackOut.xml | 13 ++ plugins/pluginList/build.properties | 5 + plugins/pluginList/plugin.xml | 11 ++ .../org/adempiere/plugin/list/Activator.java | 19 +++ .../org/adempiere/plugin/list/PluginList.java | 142 ++++++++++++++++++ 10 files changed, 250 insertions(+) create mode 100644 plugins/pluginList/.classpath create mode 100644 plugins/pluginList/.project create mode 100644 plugins/pluginList/.settings/org.eclipse.jdt.core.prefs create mode 100644 plugins/pluginList/.settings/org.eclipse.pde.core.prefs create mode 100644 plugins/pluginList/META-INF/MANIFEST.MF create mode 100644 plugins/pluginList/META-INF/PackOut.xml create mode 100644 plugins/pluginList/build.properties create mode 100644 plugins/pluginList/plugin.xml create mode 100644 plugins/pluginList/src/org/adempiere/plugin/list/Activator.java create mode 100644 plugins/pluginList/src/org/adempiere/plugin/list/PluginList.java diff --git a/plugins/pluginList/.classpath b/plugins/pluginList/.classpath new file mode 100644 index 0000000000..ad32c83a78 --- /dev/null +++ b/plugins/pluginList/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/plugins/pluginList/.project b/plugins/pluginList/.project new file mode 100644 index 0000000000..9a8e142dee --- /dev/null +++ b/plugins/pluginList/.project @@ -0,0 +1,28 @@ + + + pluginList + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + + diff --git a/plugins/pluginList/.settings/org.eclipse.jdt.core.prefs b/plugins/pluginList/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000000..a9df5ee2a9 --- /dev/null +++ b/plugins/pluginList/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,8 @@ +#Mon Mar 15 20:45:28 CET 2010 +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 +org.eclipse.jdt.core.compiler.compliance=1.6 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.6 diff --git a/plugins/pluginList/.settings/org.eclipse.pde.core.prefs b/plugins/pluginList/.settings/org.eclipse.pde.core.prefs new file mode 100644 index 0000000000..b83250f900 --- /dev/null +++ b/plugins/pluginList/.settings/org.eclipse.pde.core.prefs @@ -0,0 +1,4 @@ +#Wed Mar 17 17:21:50 CET 2010 +eclipse.preferences.version=1 +pluginProject.extensions=true +resolve.requirebundle=false diff --git a/plugins/pluginList/META-INF/MANIFEST.MF b/plugins/pluginList/META-INF/MANIFEST.MF new file mode 100644 index 0000000000..0153c951bb --- /dev/null +++ b/plugins/pluginList/META-INF/MANIFEST.MF @@ -0,0 +1,13 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: PluginList +Bundle-SymbolicName: org.adempiere.plugin.list;singleton:=true +Bundle-Version: 0.0.0.2 +Bundle-Activator: org.adempiere.plugin.list.Activator +Bundle-ActivationPolicy: lazy +Bundle-RequiredExecutionEnvironment: JavaSE-1.6 +Eclipse-LazyStart: true +Import-Package: org.osgi.framework;version="1.3.0" +Require-Bundle: org.adempiere.pluginUtils;bundle-version="0.0.0", + org.adempiere.base;bundle-version="0.0.0", + org.adempiere.client;bundle-version="0.0.0" diff --git a/plugins/pluginList/META-INF/PackOut.xml b/plugins/pluginList/META-INF/PackOut.xml new file mode 100644 index 0000000000..333bcac9c3 --- /dev/null +++ b/plugins/pluginList/META-INF/PackOut.xml @@ -0,0 +1,13 @@ + + +

    +
    +
    + diff --git a/plugins/pluginList/build.properties b/plugins/pluginList/build.properties new file mode 100644 index 0000000000..e9863e281e --- /dev/null +++ b/plugins/pluginList/build.properties @@ -0,0 +1,5 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + plugin.xml diff --git a/plugins/pluginList/plugin.xml b/plugins/pluginList/plugin.xml new file mode 100644 index 0000000000..802aa740db --- /dev/null +++ b/plugins/pluginList/plugin.xml @@ -0,0 +1,11 @@ + + + + + + + + + diff --git a/plugins/pluginList/src/org/adempiere/plugin/list/Activator.java b/plugins/pluginList/src/org/adempiere/plugin/list/Activator.java new file mode 100644 index 0000000000..0ccbe00ba0 --- /dev/null +++ b/plugins/pluginList/src/org/adempiere/plugin/list/Activator.java @@ -0,0 +1,19 @@ +package org.adempiere.plugin.list; + +import org.adempiere.plugin.utils.AdempiereActivator; +import org.osgi.framework.BundleActivator; +import org.osgi.framework.BundleContext; + +public class Activator extends AdempiereActivator implements BundleActivator { + + static private BundleContext ctx; + + @Override + public void start() { + ctx = getContext(); + } + + public static BundleContext getPluginContext() { + return ctx; + } +} diff --git a/plugins/pluginList/src/org/adempiere/plugin/list/PluginList.java b/plugins/pluginList/src/org/adempiere/plugin/list/PluginList.java new file mode 100644 index 0000000000..7c521f93c8 --- /dev/null +++ b/plugins/pluginList/src/org/adempiere/plugin/list/PluginList.java @@ -0,0 +1,142 @@ +package org.adempiere.plugin.list; + +import java.awt.BorderLayout; +import java.awt.Component; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.util.Vector; +import java.util.logging.Level; + +import javax.swing.JButton; +import javax.swing.JScrollPane; +import javax.swing.table.DefaultTableModel; + +import org.compiere.apps.form.FormFrame; +import org.compiere.apps.form.FormPanel; +import org.compiere.apps.form.VFileImport; +import org.compiere.minigrid.MiniTable; +import org.compiere.swing.CPanel; +import org.compiere.util.CLogger; +import org.osgi.framework.Bundle; +import org.osgi.framework.BundleContext; +import org.osgi.framework.BundleException; + +public class PluginList implements FormPanel, ActionListener { + + private static CLogger log = CLogger.getCLogger(PluginList.class); + private int m_WindowNo; + private FormFrame m_frame; + private CPanel northPanel = new CPanel(); + private CPanel centerPanel = new CPanel(); + private CPanel confirmPanel = new CPanel(); + private MiniTable pluginTable = new MiniTable(); + private JScrollPane centerScrollPane = new JScrollPane(); + private JButton refreshButton = new JButton(); + + @Override + public void dispose() { + if (m_frame != null) + m_frame.dispose(); + m_frame = null; + } + + @Override + public void init(int WindowNo, FormFrame frame) { + log.info(""); + m_WindowNo = WindowNo; + m_frame = frame; + try + { + jbInit(); + frame.getContentPane().add(northPanel, BorderLayout.NORTH); + frame.getContentPane().add(centerPanel, BorderLayout.CENTER); + frame.getContentPane().add(confirmPanel, BorderLayout.SOUTH); + } + catch(Exception e) + { + log.log(Level.SEVERE, "init", e); + } + } + + private void jbInit() { + centerPanel.add(centerScrollPane, BorderLayout.CENTER); + centerScrollPane.getViewport().add(pluginTable, null); + updatePlugins(); + + refreshButton.setText("Refresh"); + refreshButton.addActionListener(this); + confirmPanel.add(refreshButton); + } + + private void updatePlugins() { + DefaultTableModel dataModel = new DefaultTableModel(getData(), getColumnNames()); + pluginTable.setModel(dataModel); + pluginTable.autoSize(); + } + + private Vector> getData() { + BundleContext ctx = getContext(); + Vector> result = new Vector>(); + for (Bundle bundle : ctx.getBundles()) { + Vector col = new Vector(); + col.add(bundle.getBundleId()); + col.add(state(bundle.getState())); + col.add(bundle.getSymbolicName()); + col.add(bundle.getVersion()); + result.add(col); + } + return result; + } + + private BundleContext getContext() { + return Activator.getPluginContext(); + } + + private String state(int state) { + switch (state) { + case Bundle.ACTIVE: + return "ACTIVE"; + case Bundle.INSTALLED: + return "INSTALLED"; + case Bundle.RESOLVED: + return "RESOLVED"; + case Bundle.STARTING: + return "STARTING"; + case Bundle.STOPPING: + return "STOPPING"; + case Bundle.UNINSTALLED: + return "UNINSTALLED"; + default: + return "UNKNOWN"; + } + } + + private Vector getColumnNames() { + Vector result = new Vector(); + result.add("Id"); + result.add("State"); + result.add("Name"); + result.add("Version"); + return result; + } + + @Override + public void actionPerformed(ActionEvent e) { + if (e.getSource().equals(refreshButton)) + refreshClicked(e); + } + + private void refreshClicked(ActionEvent e) { + int row = pluginTable.getSelectedRow(); + if (row==-1) + return; + long id = (Long) pluginTable.getValueAt(row, 0); + Bundle bundle = getContext().getBundle(id); + try { + bundle.update(); + } catch (BundleException ex) { + log.log(Level.SEVERE, "refresh", ex); + } + } + +} From fdc26ca69c87b7d0d3c488daf1eddb9f13e9d1c4 Mon Sep 17 00:00:00 2001 From: joergviola Date: Sun, 21 Mar 2010 09:38:19 +0000 Subject: [PATCH 26/46] added again --- tools/build.xml | 484 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 484 insertions(+) create mode 100644 tools/build.xml diff --git a/tools/build.xml b/tools/build.xml new file mode 100644 index 0000000000..eb199dbab4 --- /dev/null +++ b/tools/build.xml @@ -0,0 +1,484 @@ + + + + + + + + + The resulting CCTools.jar and CSTools.jar + repackage all third party libraries + in a single jar for simplified start and version control. + The resuling Server CSTools.jar is added to EARs + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From c539b46b061b2f48fad6b91396641133dbd97db8 Mon Sep 17 00:00:00 2001 From: joergviola Date: Wed, 28 Apr 2010 20:52:56 +0000 Subject: [PATCH 27/46] App Server support for base https://sourceforge.net/tracker/?func=detail&aid=2700937&group_id=176962&atid=879334 --- base/.classpath | 1 - base/META-INF/MANIFEST.MF | 3 +- base/build.properties | 22 +--- base/build.xml | 24 +++++ base/plugin.xml | 1 + .../org.adempiere.as.IApplicationServer.exsd | 102 ++++++++++++++++++ base/src/org/adempiere/as/ASFactory.java | 18 +--- .../org/adempiere/as/IApplicationServer.java | 4 +- base/src/org/adempiere/base/Service.java | 24 ++++- base/src/org/compiere/db/CConnection.java | 2 +- 10 files changed, 156 insertions(+), 45 deletions(-) create mode 100644 base/schema/org.adempiere.as.IApplicationServer.exsd diff --git a/base/.classpath b/base/.classpath index d0089b380c..545484a141 100644 --- a/base/.classpath +++ b/base/.classpath @@ -7,7 +7,6 @@ - diff --git a/base/META-INF/MANIFEST.MF b/base/META-INF/MANIFEST.MF index 1f3a8841a3..53b20775e5 100644 --- a/base/META-INF/MANIFEST.MF +++ b/base/META-INF/MANIFEST.MF @@ -62,4 +62,5 @@ Export-Package: org.adempiere.apps.graph, org.compiere.util, org.compiere.wf Require-Bundle: org.eclipse.core.runtime;bundle-version="3.5.0", - org.adempiere.tools;bundle-version="0.0.0" + org.adempiere.tools;bundle-version="0.0.0", + org.adempiere.jboss;bundle-version="0.0.0" diff --git a/base/build.properties b/base/build.properties index f0410d0383..164171b6b9 100644 --- a/base/build.properties +++ b/base/build.properties @@ -1,26 +1,6 @@ -source.base.jar = src/ +source.base.jar = src/,build/ bin.includes = META-INF/,\ - ../tools/lib/commons-net-1.4.0.jar,\ - ../tools/lib/ant.jar,\ - ../tools/lib/jpedal.jar,\ - ../tools/lib/jnlp.jar,\ - ../tools/lib/junit.jar,\ - client/jbossall-client.jar,\ - ../tools/lib/postgresql.jar,\ - ../tools/lib/ocrs12.jar,\ - ../tools/lib/ojdbc14.jar,\ - ../tools/lib/c3p0-0.9.1.2.jar,\ - ../tools/lib/script-api.jar,\ - ../tools/lib/barbecue-1.5-beta1.jar,\ - ../tools/lib/poi-3.0.1-FINAL-20070705.jar,\ - ../tools/lib/jcommon-1.0.14.jar,\ - ../tools/lib/jfreechart-1.0.11.jar,\ - ../tools/lib/swingx-0.9.0.jar,\ - ../tools/lib/looks-2.0.4.jar,\ - ../tools/lib/commons-collections-3.1.jar,\ - ../tools/lib/activemq-core-5.0.0.jar,\ base.jar,\ - lib/looks-2.0.4.jar,\ plugin.xml jars.extra.classpath = platform:/plugin/org.adempiere.tools/lib/activation.jar,\ platform:/plugin/org.adempiere.tools/lib/activemq-core-5.0.0.jar,\ diff --git a/base/build.xml b/base/build.xml index c1a02a9fda..ad7632522f 100644 --- a/base/build.xml +++ b/base/build.xml @@ -18,6 +18,7 @@ + @@ -105,6 +106,29 @@ + + + + + + + + + + + + diff --git a/base/plugin.xml b/base/plugin.xml index e956db1f4d..8041937132 100644 --- a/base/plugin.xml +++ b/base/plugin.xml @@ -5,5 +5,6 @@ + diff --git a/base/schema/org.adempiere.as.IApplicationServer.exsd b/base/schema/org.adempiere.as.IApplicationServer.exsd new file mode 100644 index 0000000000..3009c74a74 --- /dev/null +++ b/base/schema/org.adempiere.as.IApplicationServer.exsd @@ -0,0 +1,102 @@ + + + + + + + + + [Enter description of this extension point.] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + [Enter the first release in which this extension point appears.] + + + + + + + + + [Enter extension point usage example here.] + + + + + + + + + [Enter API information here.] + + + + + + + + + [Enter information about supplied implementation of this extension point.] + + + + + diff --git a/base/src/org/adempiere/as/ASFactory.java b/base/src/org/adempiere/as/ASFactory.java index 1235194f09..4a9e33b29c 100644 --- a/base/src/org/adempiere/as/ASFactory.java +++ b/base/src/org/adempiere/as/ASFactory.java @@ -14,6 +14,8 @@ package org.adempiere.as; import java.util.Hashtable; +import org.adempiere.base.Service; + /** * * @author Low Heng Sin @@ -28,24 +30,10 @@ public class ASFactory { JBOSS, GLASS_FISH }; - private final static String[] AS_Classes = new String[] { - "org.adempiere.as.jboss.JBoss", - "org.adempiere.as.glassfish.GlassFish" - }; - private static IApplicationServer applicationServer; static { - //detect the installed application server - for(String s : AS_Classes) { - try { - Class c = Class.forName(s); - IApplicationServer server = (IApplicationServer) c.newInstance(); - applicationServer = server; - break; - } catch (Throwable t) { - } - } + applicationServer = Service.locate(IApplicationServer.class); if (applicationServer == null) { applicationServer = new IApplicationServer() { diff --git a/base/src/org/adempiere/as/IApplicationServer.java b/base/src/org/adempiere/as/IApplicationServer.java index e42b090445..c5d6de51f6 100644 --- a/base/src/org/adempiere/as/IApplicationServer.java +++ b/base/src/org/adempiere/as/IApplicationServer.java @@ -14,12 +14,14 @@ package org.adempiere.as; import java.util.Hashtable; +import org.adempiere.base.IService; + /** * * @author Low Heng Sin * */ -public interface IApplicationServer { +public interface IApplicationServer extends IService { /** * @param AppsHost * @param AppsPort diff --git a/base/src/org/adempiere/base/Service.java b/base/src/org/adempiere/base/Service.java index bc397e5c24..763c77b313 100644 --- a/base/src/org/adempiere/base/Service.java +++ b/base/src/org/adempiere/base/Service.java @@ -18,8 +18,6 @@ package org.adempiere.base; import java.util.List; -import org.adempiere.base.equinox.EquinoxServiceLocator; - /** * This is a very simple factory for service locators * @@ -28,21 +26,37 @@ import org.adempiere.base.equinox.EquinoxServiceLocator; */ public class Service { + private static final String LOCATOR_CLASS = "ServiceLocator"; + private static final String DEFAULT_LOCATOR_CLASS = "org.adempiere.base.equinox.EquinoxServiceLocator"; + private static IServiceLocator theLocator; public static IServiceLocator locator() { if (theLocator == null) { synchronized (Service.class) { if (theLocator == null) { - theLocator = new EquinoxServiceLocator(); - System.out - .println("Started service locator: " + theLocator); + theLocator = createServiceLocator(); } } } return theLocator; } + private static IServiceLocator createServiceLocator() { + String className = System.getProperty(LOCATOR_CLASS); + if (className==null) + className = DEFAULT_LOCATOR_CLASS; + try { + Class clazz = Class.forName(className); + IServiceLocator locator = (IServiceLocator) clazz.newInstance(); + System.out.println("Started service locator: " + locator); + return locator; + } catch (Exception e) { + e.printStackTrace(); + return null; + } + } + public static T locate(Class type) { return locator().locate(type); } diff --git a/base/src/org/compiere/db/CConnection.java b/base/src/org/compiere/db/CConnection.java index 690365119e..04e073984a 100644 --- a/base/src/org/compiere/db/CConnection.java +++ b/base/src/org/compiere/db/CConnection.java @@ -18,6 +18,7 @@ package org.compiere.db; import java.io.Serializable; import java.lang.reflect.Proxy; +import java.rmi.RMISecurityManager; import java.sql.Connection; import java.sql.DatabaseMetaData; import java.sql.SQLException; @@ -1630,7 +1631,6 @@ public class CConnection implements Serializable, Cloneable private Object lookup(String jndiName) throws NamingException { InitialContext ctx = getInitialContext(Ini.isClient()); - if (useComponentNamespace) { try From cb2b5beb679c876f6dc19dd0ef0436083df45020 Mon Sep 17 00:00:00 2001 From: joergviola Date: Wed, 28 Apr 2010 20:54:38 +0000 Subject: [PATCH 28/46] Application Extension for client https://sourceforge.net/tracker/?func=detail&aid=2700937&group_id=176962&atid=879334 --- client/META-INF/MANIFEST.MF | 3 ++- client/build.properties | 2 +- client/build.xml | 20 ++++++++++++++++++- client/plugin.xml | 7 +++++++ .../src/org/adempiere/client/Activator.java | 4 ++-- .../src/org/adempiere/client/Application.java | 19 ++++++++++++++++++ 6 files changed, 50 insertions(+), 5 deletions(-) create mode 100644 client/src/org/adempiere/client/Application.java diff --git a/client/META-INF/MANIFEST.MF b/client/META-INF/MANIFEST.MF index ccec30c3b1..2ae61ac6b4 100644 --- a/client/META-INF/MANIFEST.MF +++ b/client/META-INF/MANIFEST.MF @@ -198,5 +198,6 @@ Export-Package: com.keypoint, org.jfree.util Require-Bundle: org.adempiere.base;bundle-version="0.0.0", org.eclipse.core.runtime;bundle-version="3.5.0", - org.adempiere.tools;bundle-version="0.0.0" + org.adempiere.tools;bundle-version="0.0.0", + org.adempiere.jbossfacet;bundle-version="0.0.0" Bundle-Activator: org.adempiere.client.Activator diff --git a/client/build.properties b/client/build.properties index 865179574d..fa5b12cd3f 100644 --- a/client/build.properties +++ b/client/build.properties @@ -1,4 +1,4 @@ -source.client.jar = src/ +source.client.jar = src/,build/ bin.includes = META-INF/,\ lib/swingx-0.9.0.jar,\ lib/groovy-all-1.5.1.jar,\ diff --git a/client/build.xml b/client/build.xml index 49eaad85c4..46ddd0ddc6 100644 --- a/client/build.xml +++ b/client/build.xml @@ -17,13 +17,24 @@ + + + + + + + + + + + @@ -112,7 +123,14 @@ - + + + + diff --git a/client/plugin.xml b/client/plugin.xml index 071f08d40f..4321a36281 100644 --- a/client/plugin.xml +++ b/client/plugin.xml @@ -9,5 +9,12 @@ class="org.compiere.util.ResourceFinder"> + + + + + diff --git a/client/src/org/adempiere/client/Activator.java b/client/src/org/adempiere/client/Activator.java index 36e34f5279..4f4c31bc1c 100644 --- a/client/src/org/adempiere/client/Activator.java +++ b/client/src/org/adempiere/client/Activator.java @@ -1,5 +1,7 @@ package org.adempiere.client; +import java.rmi.RMISecurityManager; + import org.compiere.util.CLogger; import org.eclipse.core.runtime.Plugin; import org.osgi.framework.Bundle; @@ -12,8 +14,6 @@ public class Activator extends Plugin { @Override public void start(BundleContext context) throws Exception { - log.info("Starting client"); - org.compiere.AdempiereClient.main(new String[]{}); activateAll(context.getBundles()); } diff --git a/client/src/org/adempiere/client/Application.java b/client/src/org/adempiere/client/Application.java new file mode 100644 index 0000000000..a58e0870c3 --- /dev/null +++ b/client/src/org/adempiere/client/Application.java @@ -0,0 +1,19 @@ +package org.adempiere.client; + +import org.compiere.util.CLogger; +import org.eclipse.equinox.app.IApplication; +import org.eclipse.equinox.app.IApplicationContext; + +public class Application implements IApplication { + private static CLogger log = CLogger.getCLogger(Application.class); + + public Object start(IApplicationContext ctx) throws Exception { + log.info("Starting client"); + org.compiere.AdempiereClient.main(new String[]{}); + return IApplication.EXIT_OK; + } + + public void stop() { + } + +} From 4623a11668b17cba6664e24381544cf27ac4309b Mon Sep 17 00:00:00 2001 From: joergviola Date: Wed, 28 Apr 2010 20:56:18 +0000 Subject: [PATCH 29/46] Put eclipse runtime into core for application support https://sourceforge.net/tracker/?func=detail&aid=2700937&group_id=176962&atid=879334 --- equinox-target/build.xml | 8 ++++++++ equinox-target/equinox.target | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/equinox-target/build.xml b/equinox-target/build.xml index e4addb3f5f..8de1b62c7b 100644 --- a/equinox-target/build.xml +++ b/equinox-target/build.xml @@ -39,6 +39,14 @@ the following responsibilities: + + + + + + + + diff --git a/equinox-target/equinox.target b/equinox-target/equinox.target index b89f86c920..f2414856e2 100644 --- a/equinox-target/equinox.target +++ b/equinox-target/equinox.target @@ -1,4 +1,4 @@ - + From 44a323ff99d6fb16519983cddeae05a21ca32261 Mon Sep 17 00:00:00 2001 From: joergviola Date: Wed, 28 Apr 2010 20:59:00 +0000 Subject: [PATCH 30/46] Turned install into an equinox plugin providing an eclipse application Modified build script to deploy the equinox container https://sourceforge.net/tracker/?func=detail&aid=2700937&group_id=176962&atid=879334 --- install/.classpath | 1 + install/.project | 67 +++++++++++-------- install/Adempiere/RUN_setup.sh | 7 +- install/Adempiere/build.xml | 8 +-- install/META-INF/MANIFEST.MF | 19 ++++++ install/build.properties | 10 +++ install/build.xml | 28 ++++++-- install/plugin.xml | 12 ++++ .../src/org/compiere/install/Application.java | 16 +++++ .../compiere/install/ConfigurationPanel.java | 7 +- 10 files changed, 135 insertions(+), 40 deletions(-) create mode 100644 install/META-INF/MANIFEST.MF create mode 100644 install/build.properties create mode 100644 install/plugin.xml create mode 100644 install/src/org/compiere/install/Application.java diff --git a/install/.classpath b/install/.classpath index 3590689cb1..db61ac4f82 100644 --- a/install/.classpath +++ b/install/.classpath @@ -14,5 +14,6 @@ + diff --git a/install/.project b/install/.project index e7adf24f52..3dca82a6da 100644 --- a/install/.project +++ b/install/.project @@ -1,28 +1,39 @@ - - - install - - - base - client - dbPort - extend - jboss - looks - print - server - serverApps - serverRoot - tools - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - + + + install + + + base + client + dbPort + extend + jboss + looks + print + server + serverApps + serverRoot + tools + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.pde.PluginNature + + diff --git a/install/Adempiere/RUN_setup.sh b/install/Adempiere/RUN_setup.sh index 6b53ff082e..92bb165778 100644 --- a/install/Adempiere/RUN_setup.sh +++ b/install/Adempiere/RUN_setup.sh @@ -26,7 +26,10 @@ ARGS=CONFIG # To test the OCI driver, add -DTestOCI=Y to the command - example: # $JAVA -classpath $CP -DADEMPIERE_HOME=$ADEMPIERE_HOME -DTestOCI=Y org.compiere.install.Setup $ARGS -$JAVA -classpath $CP -DADEMPIERE_HOME=$ADEMPIERE_HOME org.compiere.install.Setup $ARGS +# $JAVA -classpath $CP -DADEMPIERE_HOME=$ADEMPIERE_HOME org.compiere.install.Setup $ARGS +# OSGi: +$JAVA -jar osgi/org.eclipse.osgi_3.5.0.v20090520.jar -clean -console -application org.adempiere.Install + #echo =================================== #echo Setup Adempiere Server Environment @@ -41,7 +44,7 @@ find . -name '*.sh' -exec chmod a+x '{}' \; # Sign database build cd utils -. ./RUN_SignDatabaseBuild.sh +#. ./RUN_SignDatabaseBuild.sh . ./RUN_UnixEnv.sh diff --git a/install/Adempiere/build.xml b/install/Adempiere/build.xml index 5bb8abc49c..f2a0d63e77 100644 --- a/install/Adempiere/build.xml +++ b/install/Adempiere/build.xml @@ -338,7 +338,7 @@ - @@ -349,7 +349,7 @@ - + @@ -515,7 +515,7 @@ - diff --git a/install/META-INF/MANIFEST.MF b/install/META-INF/MANIFEST.MF new file mode 100644 index 0000000000..27b97b25a4 --- /dev/null +++ b/install/META-INF/MANIFEST.MF @@ -0,0 +1,19 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: install +Bundle-SymbolicName: org.adempiere.install;singleton:=true +Bundle-Version: 0.0.0.1 +Bundle-ClassPath: install.jar, + lib/ant.jar, + lib/ant-commons-net.jar, + lib/ant-launcher.jar, + lib/commons-net-1.4.0.jar, + lib/ocrs12.jar, + lib/ojdbc14.jar +Export-Package: images, + org.compiere.install +Require-Bundle: org.eclipse.core.runtime;bundle-version="3.5.0", + org.adempiere.base;bundle-version="0.0.0", + org.adempiere.client;bundle-version="0.0.0", + org.adempiere.tools;bundle-version="0.0.0" +Bundle-Activator: org.compiere.install.Activator diff --git a/install/build.properties b/install/build.properties new file mode 100644 index 0000000000..f467f3ebcf --- /dev/null +++ b/install/build.properties @@ -0,0 +1,10 @@ +source.install.jar = src/,build/ +bin.includes = META-INF/,\ + lib/ant.jar,\ + lib/ant-commons-net.jar,\ + lib/ant-launcher.jar,\ + lib/commons-net-1.4.0.jar,\ + lib/ocrs12.jar,\ + lib/ojdbc14.jar,\ + install.jar,\ + plugin.xml diff --git a/install/build.xml b/install/build.xml index 3c9ff1bd8e..3d427721e2 100644 --- a/install/build.xml +++ b/install/build.xml @@ -16,6 +16,7 @@ + @@ -117,7 +118,7 @@ - - - + AdempiereHome - + + + + + + + + + + + + + @@ -264,6 +277,13 @@ + + + diff --git a/install/plugin.xml b/install/plugin.xml new file mode 100644 index 0000000000..4f264a6626 --- /dev/null +++ b/install/plugin.xml @@ -0,0 +1,12 @@ + + + + + + + + + + diff --git a/install/src/org/compiere/install/Application.java b/install/src/org/compiere/install/Application.java new file mode 100644 index 0000000000..e29ec94eac --- /dev/null +++ b/install/src/org/compiere/install/Application.java @@ -0,0 +1,16 @@ +package org.compiere.install; + +import org.eclipse.equinox.app.IApplication; +import org.eclipse.equinox.app.IApplicationContext; + +public class Application implements IApplication { + + public Object start(IApplicationContext arg0) throws Exception { + Setup.main(new String[]{}); + return null; + } + + public void stop() { + } + +} diff --git a/install/src/org/compiere/install/ConfigurationPanel.java b/install/src/org/compiere/install/ConfigurationPanel.java index e2d3be1e14..03013bcd5d 100644 --- a/install/src/org/compiere/install/ConfigurationPanel.java +++ b/install/src/org/compiere/install/ConfigurationPanel.java @@ -36,6 +36,7 @@ import javax.swing.JSeparator; import javax.swing.SwingUtilities; import javax.swing.border.TitledBorder; +import org.adempiere.base.Core; import org.apache.tools.ant.Main; import org.compiere.Adempiere; import org.compiere.swing.CButton; @@ -47,6 +48,8 @@ import org.compiere.swing.CPassword; import org.compiere.swing.CTextField; import org.compiere.util.CLogger; +import com.sfcommerce.jpaymentcomponent.ssl.Client; + /** * Configuration Panel @@ -98,8 +101,8 @@ public class ConfigurationPanel extends CPanel implements ActionListener private ConfigurationData m_data = new ConfigurationData(this); private static ImageIcon iOpen = new ImageIcon(ConfigurationPanel.class.getResource("openFile.gif")); - private static ImageIcon iSave = new ImageIcon(Adempiere.class.getResource("images/Save16.gif")); - private static ImageIcon iHelp = new ImageIcon(Adempiere.class.getResource("images/Help16.gif")); + private static ImageIcon iSave = new ImageIcon(Core.getResourceFinder().getResource("images/Save16.gif")); + private static ImageIcon iHelp = new ImageIcon(Core.getResourceFinder().getResource("images/Help16.gif")); // ------------- Static UI From b7d5d32e4b42dd47a525a7f51a6ef72bf168f52b Mon Sep 17 00:00:00 2001 From: joergviola Date: Wed, 28 Apr 2010 21:00:52 +0000 Subject: [PATCH 31/46] Turned into plugins for app server support. Presumably obsolete. https://sourceforge.net/tracker/?func=detail&aid=2700937&group_id=176962&atid=879334 --- jboss/.classpath | 26 ++++---- jboss/.project | 45 ++++++++----- jboss/META-INF/MANIFEST.MF | 114 ++++++++++++++++++++++++++++++++ jboss/build.properties | 9 +++ jboss/build.xml | 22 ++++++ jbossfacet/.classpath | 3 +- jbossfacet/.project | 45 ++++++++----- jbossfacet/META-INF/MANIFEST.MF | 10 +++ jbossfacet/build.properties | 4 ++ jbossfacet/build.xml | 17 +++++ jbossfacet/plugin.xml | 11 +++ 11 files changed, 258 insertions(+), 48 deletions(-) create mode 100644 jboss/META-INF/MANIFEST.MF create mode 100644 jboss/build.properties create mode 100644 jboss/build.xml create mode 100644 jbossfacet/META-INF/MANIFEST.MF create mode 100644 jbossfacet/build.properties create mode 100644 jbossfacet/build.xml create mode 100644 jbossfacet/plugin.xml diff --git a/jboss/.classpath b/jboss/.classpath index 58fbfeb7d5..c0559fe568 100644 --- a/jboss/.classpath +++ b/jboss/.classpath @@ -1,12 +1,14 @@ - - - - - - - - - - - - + + + + + + + + + + + + + + diff --git a/jboss/.project b/jboss/.project index d538ec80ef..ac83f0cff5 100644 --- a/jboss/.project +++ b/jboss/.project @@ -1,17 +1,28 @@ - - - jboss - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - + + + jboss + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.pde.PluginNature + + diff --git a/jboss/META-INF/MANIFEST.MF b/jboss/META-INF/MANIFEST.MF new file mode 100644 index 0000000000..7af0dba21b --- /dev/null +++ b/jboss/META-INF/MANIFEST.MF @@ -0,0 +1,114 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: jboss +Bundle-SymbolicName: org.adempiere.jboss +Bundle-Version: 0.0.0.1 +Bundle-ClassPath: client/jboss-client.jar, + client/jboss-common-client.jar, + client/jboss-j2ee.jar, + client/jbosssx-client.jar, + client/jboss-transaction-client.jar, + client/jnp-client.jar, + client/jmx-invoker-adaptor-client.jar, + client/jbossall-client.jar +Export-Package: EDU.oswego.cs.dl.util.concurrent, + EDU.oswego.cs.dl.util.concurrent.misc, + javax.ejb, + javax.ejb.spi, + javax.enterprise.deploy.model, + javax.enterprise.deploy.model.exceptions, + javax.enterprise.deploy.shared, + javax.enterprise.deploy.shared.factories, + javax.enterprise.deploy.spi, + javax.enterprise.deploy.spi.exceptions, + javax.enterprise.deploy.spi.factories, + javax.enterprise.deploy.spi.status, + javax.jms, + javax.management, + javax.management.loading, + javax.management.modelmbean, + javax.management.monitor, + javax.management.openmbean, + javax.management.relation, + javax.management.timer, + javax.resource, + javax.resource.cci, + javax.resource.spi, + javax.resource.spi.endpoint, + javax.resource.spi.security, + javax.resource.spi.work, + javax.security.jacc, + javax.sql, + javax.transaction, + javax.transaction.xa, + javax.xml.registry, + javax.xml.registry.infomodel, + org.apache.xerces.impl.xs, + org.jboss.corba, + org.jboss.crypto, + org.jboss.crypto.digest, + org.jboss.ejb, + org.jboss.ejb.plugins.cmp.jdbc, + org.jboss.ejb.plugins.keygenerator, + org.jboss.invocation, + org.jboss.invocation.http.interfaces, + org.jboss.invocation.jrmp.interfaces, + org.jboss.invocation.jrmp.server, + org.jboss.invocation.pooled.interfaces, + org.jboss.invocation.unified.interfaces, + org.jboss.invocation.unified.marshall, + org.jboss.jmx.adaptor.rmi, + org.jboss.jmx.connector.invoker.client, + org.jboss.logging, + org.jboss.logging.appender, + org.jboss.logging.filter, + org.jboss.logging.layout, + org.jboss.logging.util, + org.jboss.monitor.client, + org.jboss.naming, + org.jboss.naming.client.java, + org.jboss.naming.interceptors, + org.jboss.net.protocol, + org.jboss.net.protocol.file, + org.jboss.net.protocol.http, + org.jboss.net.protocol.njar, + org.jboss.net.protocol.resource, + org.jboss.net.sockets, + org.jboss.net.ssl, + org.jboss.proxy, + org.jboss.proxy.compiler, + org.jboss.proxy.ejb, + org.jboss.proxy.ejb.handle, + org.jboss.security, + org.jboss.security.auth.callback, + org.jboss.security.auth.login, + org.jboss.security.jndi, + org.jboss.security.plugins, + org.jboss.security.ssl, + org.jboss.tm, + org.jboss.tm.integrity, + org.jboss.tm.usertx.client, + org.jboss.tm.usertx.interfaces, + org.jboss.tm.usertx.server, + org.jboss.util, + org.jboss.util.coerce, + org.jboss.util.collection, + org.jboss.util.deadlock, + org.jboss.util.file, + org.jboss.util.id, + org.jboss.util.loading, + org.jboss.util.naming, + org.jboss.util.platform, + org.jboss.util.property, + org.jboss.util.property.jmx, + org.jboss.util.propertyeditor, + org.jboss.util.state, + org.jboss.util.state.xml, + org.jboss.util.stream, + org.jboss.util.threadpool, + org.jboss.util.timeout, + org.jboss.util.xml, + org.jnp.interfaces, + org.jnp.interfaces.java, + org.jnp.interfaces.jnp, + org.jnp.server diff --git a/jboss/build.properties b/jboss/build.properties new file mode 100644 index 0000000000..94b04f62d7 --- /dev/null +++ b/jboss/build.properties @@ -0,0 +1,9 @@ +bin.includes = META-INF/,\ + client/jboss-client.jar,\ + client/jboss-common-client.jar,\ + client/jboss-j2ee.jar,\ + client/jbosssx-client.jar,\ + client/jboss-transaction-client.jar,\ + client/jnp-client.jar,\ + client/jmx-invoker-adaptor-client.jar,\ + client/jbossall-client.jar diff --git a/jboss/build.xml b/jboss/build.xml new file mode 100644 index 0000000000..9def206026 --- /dev/null +++ b/jboss/build.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + diff --git a/jbossfacet/.classpath b/jbossfacet/.classpath index b7d5653ef7..751c8f2e50 100644 --- a/jbossfacet/.classpath +++ b/jbossfacet/.classpath @@ -2,7 +2,6 @@ - - + diff --git a/jbossfacet/.project b/jbossfacet/.project index 69df8d58d9..1a5341a63f 100644 --- a/jbossfacet/.project +++ b/jbossfacet/.project @@ -1,17 +1,28 @@ - - - jbossfacet - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - - + + + jbossfacet + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.pde.PluginNature + + diff --git a/jbossfacet/META-INF/MANIFEST.MF b/jbossfacet/META-INF/MANIFEST.MF new file mode 100644 index 0000000000..c9667bd0aa --- /dev/null +++ b/jbossfacet/META-INF/MANIFEST.MF @@ -0,0 +1,10 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: jbossfacet +Bundle-SymbolicName: org.adempiere.jbossfacet;singleton:=true +Bundle-Version: 0.0.0.1 +Export-Package: org.adempiere.as.jboss +Require-Bundle: org.adempiere.jboss;bundle-version="0.0.0" +Import-Package: org.adempiere.as, + org.compiere.util + diff --git a/jbossfacet/build.properties b/jbossfacet/build.properties new file mode 100644 index 0000000000..cc91072ece --- /dev/null +++ b/jbossfacet/build.properties @@ -0,0 +1,4 @@ +source.. = src/ +bin.includes = META-INF/,\ + .,\ + plugin.xml diff --git a/jbossfacet/build.xml b/jbossfacet/build.xml new file mode 100644 index 0000000000..99afc190bb --- /dev/null +++ b/jbossfacet/build.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/jbossfacet/plugin.xml b/jbossfacet/plugin.xml new file mode 100644 index 0000000000..b143c32bd0 --- /dev/null +++ b/jbossfacet/plugin.xml @@ -0,0 +1,11 @@ + + + + + + + + + From fa145ada2ec773b0f025ca126529b35ba6546ede Mon Sep 17 00:00:00 2001 From: joergviola Date: Wed, 28 Apr 2010 21:07:32 +0000 Subject: [PATCH 32/46] ant update ant4eclipse https://sourceforge.net/tracker/?func=detail&aid=2700937&group_id=176962&atid=879334 --- tools/.classpath | 10 +- tools/META-INF/MANIFEST.MF | 197 +++- tools/build.properties | 16 +- tools/build.xml | 129 ++- .../lib/ant4eclipse/macros/a4e-jdt-macros.xml | 195 ++++ .../lib/ant4eclipse/macros/a4e-pde-macros.xml | 852 ++++++++++++++++++ .../macros/a4e-platform-macros.xml | 29 + 7 files changed, 1384 insertions(+), 44 deletions(-) create mode 100644 tools/lib/ant4eclipse/macros/a4e-jdt-macros.xml create mode 100644 tools/lib/ant4eclipse/macros/a4e-pde-macros.xml create mode 100644 tools/lib/ant4eclipse/macros/a4e-platform-macros.xml diff --git a/tools/.classpath b/tools/.classpath index e69130761d..aa3824b517 100644 --- a/tools/.classpath +++ b/tools/.classpath @@ -1,6 +1,14 @@ + + + + + + + + @@ -11,8 +19,6 @@ - - diff --git a/tools/META-INF/MANIFEST.MF b/tools/META-INF/MANIFEST.MF index cb19c49b15..dfaca5b950 100644 --- a/tools/META-INF/MANIFEST.MF +++ b/tools/META-INF/MANIFEST.MF @@ -29,21 +29,15 @@ Bundle-ClassPath: tools.jar, lib/jfreechart-1.0.11.jar, lib/javaee.jar, lib/c3p0-0.9.1.2.jar, - lib/activemq-core-5.0.0.jar, lib/ant-commons-net.jar, lib/ant-contrib-1.0b1.jar, lib/ant-launcher.jar, - lib/ant.jar, lib/c3p0-oracle-thin-extras-0.9.1.2.jar, lib/cglib.jar, lib/commons-codec.jar, - lib/commons-collections-3.1.jar, lib/commons-logging.jar, - lib/commons-net-1.4.0.jar, lib/jgraph.jar, - lib/jpedal.jar, lib/jsp-api.jar, - lib/junit.jar, lib/logkit.jar, lib/looks-2.0.4.jar, lib/ocrs12.jar, @@ -52,9 +46,15 @@ Bundle-ClassPath: tools.jar, lib/wizard.jar, lib/xjavadoc-1.1.jar, lib/xml-apis.jar, + lib/xercesImpl.jar, + lib/junit.jar, + lib/commons-collections-3.1.jar, + lib/ant.jar, + lib/jpedal.jar, + lib/activemq-core-5.0.0.jar, + lib/commons-net-1.4.0.jar, lib/cron4j-2.2.1.jar, - lib/payflow.jar, - lib/xercesImpl.jar + lib/payflow.jar Export-Package: Lib, Lib.email, Lib.encodings, @@ -411,6 +411,7 @@ Export-Package: Lib, groovyjarjarasm.asm.signature, groovyjarjarasm.asm.tree;uses:="groovyjarjarasm.asm", groovyjarjarcommonscli, + it.sauronsoftware.cron4j, javatests, javax.activation, javax.annotation, @@ -512,6 +513,15 @@ Export-Package: Lib, javax.resource.spi.work;uses:="javax.resource,javax.transaction.xa", javax.script, javax.security.jacc;uses:="javax.servlet.http", + javax.servlet, + javax.servlet.http, + javax.servlet.jsp, + javax.servlet.jsp.el, + javax.servlet.jsp.jstl.core, + javax.servlet.jsp.jstl.fmt, + javax.servlet.jsp.jstl.sql, + javax.servlet.jsp.jstl.tlv, + javax.servlet.jsp.tagext, javax.transaction;uses:="javax.transaction.xa", javax.transaction.xa, javax.xml.bind; @@ -590,6 +600,12 @@ Export-Package: Lib, org.w3c.dom, javax.xml.ws, javax.xml.transform", + junit.awtui, + junit.extensions, + junit.framework, + junit.runner, + junit.swingui, + junit.textui, jxxload_help;uses:="org.python.core", net.miginfocom.layout, net.miginfocom.swing;uses:="net.miginfocom.layout", @@ -704,6 +720,104 @@ Export-Package: Lib, oracle.jdbc.driver, oracle.sql.converter", oracle.sql.converter;uses:="oracle.jdbc.internal,oracle.i18n.text,oracle.i18n.text.converter", + org.apache.activemq, + org.apache.activemq.advisory, + org.apache.activemq.blob, + org.apache.activemq.broker, + org.apache.activemq.broker.ft, + org.apache.activemq.broker.jmx, + org.apache.activemq.broker.region, + org.apache.activemq.broker.region.cursors, + org.apache.activemq.broker.region.group, + org.apache.activemq.broker.region.policy, + org.apache.activemq.broker.region.virtual, + org.apache.activemq.broker.util, + org.apache.activemq.broker.view, + org.apache.activemq.camel, + org.apache.activemq.camel.component, + org.apache.activemq.camel.converter, + org.apache.activemq.command, + org.apache.activemq.filter, + org.apache.activemq.jaas, + org.apache.activemq.jndi, + org.apache.activemq.kaha, + org.apache.activemq.kaha.impl, + org.apache.activemq.kaha.impl.async, + org.apache.activemq.kaha.impl.container, + org.apache.activemq.kaha.impl.data, + org.apache.activemq.kaha.impl.index, + org.apache.activemq.kaha.impl.index.hash, + org.apache.activemq.kaha.impl.index.tree, + org.apache.activemq.management, + org.apache.activemq.memory, + org.apache.activemq.memory.buffer, + org.apache.activemq.memory.list, + org.apache.activemq.network, + org.apache.activemq.network.jms, + org.apache.activemq.openwire, + org.apache.activemq.openwire.tool, + org.apache.activemq.openwire.v1, + org.apache.activemq.openwire.v2, + org.apache.activemq.openwire.v3, + org.apache.activemq.pool, + org.apache.activemq.proxy, + org.apache.activemq.security, + org.apache.activemq.selector, + org.apache.activemq.spring, + org.apache.activemq.state, + org.apache.activemq.store, + org.apache.activemq.store.amq, + org.apache.activemq.store.jdbc, + org.apache.activemq.store.jdbc.adapter, + org.apache.activemq.store.journal, + org.apache.activemq.store.kahadaptor, + org.apache.activemq.store.memory, + org.apache.activemq.thread, + org.apache.activemq.transaction, + org.apache.activemq.transport, + org.apache.activemq.transport.discovery, + org.apache.activemq.transport.discovery.multicast, + org.apache.activemq.transport.discovery.rendezvous, + org.apache.activemq.transport.discovery.simple, + org.apache.activemq.transport.failover, + org.apache.activemq.transport.fanout, + org.apache.activemq.transport.mock, + org.apache.activemq.transport.multicast, + org.apache.activemq.transport.nio, + org.apache.activemq.transport.peer, + org.apache.activemq.transport.reliable, + org.apache.activemq.transport.stomp, + org.apache.activemq.transport.tcp, + org.apache.activemq.transport.udp, + org.apache.activemq.transport.vm, + org.apache.activemq.usage, + org.apache.activemq.util, + org.apache.activemq.wireformat, + org.apache.activemq.xbean, + org.apache.commons.collections, + org.apache.commons.collections.bag, + org.apache.commons.collections.bidimap, + org.apache.commons.collections.buffer, + org.apache.commons.collections.collection, + org.apache.commons.collections.comparators, + org.apache.commons.collections.functors, + org.apache.commons.collections.iterators, + org.apache.commons.collections.keyvalue, + org.apache.commons.collections.list, + org.apache.commons.collections.map, + org.apache.commons.collections.set, + org.apache.commons.net, + org.apache.commons.net.bsd, + org.apache.commons.net.ftp, + org.apache.commons.net.ftp.parser, + org.apache.commons.net.io, + org.apache.commons.net.nntp, + org.apache.commons.net.ntp, + org.apache.commons.net.pop3, + org.apache.commons.net.smtp, + org.apache.commons.net.telnet, + org.apache.commons.net.tftp, + org.apache.commons.net.util, org.apache.ecs;uses:="org.apache.ecs.xhtml", org.apache.ecs.filter;uses:="org.apache.ecs", org.apache.ecs.storage, @@ -866,6 +980,31 @@ Export-Package: Lib, org.apache.taglibs.standard.tag.rt.xml;uses:="org.xml.sax,org.apache.taglibs.standard.tag.common.xml,javax.xml.transform", org.apache.taglibs.standard.tei;uses:="javax.servlet.jsp.tagext", org.apache.taglibs.standard.tlv;uses:="org.xml.sax,javax.servlet.jsp.tagext,org.xml.sax.helpers", + org.apache.tools.ant, + org.apache.tools.ant.filters, + org.apache.tools.ant.filters.util, + org.apache.tools.ant.helper, + org.apache.tools.ant.input, + org.apache.tools.ant.listener, + org.apache.tools.ant.loader, + org.apache.tools.ant.taskdefs, + org.apache.tools.ant.taskdefs.compilers, + org.apache.tools.ant.taskdefs.condition, + org.apache.tools.ant.taskdefs.cvslib, + org.apache.tools.ant.taskdefs.email, + org.apache.tools.ant.taskdefs.rmic, + org.apache.tools.ant.types, + org.apache.tools.ant.types.mappers, + org.apache.tools.ant.types.resolver, + org.apache.tools.ant.types.selectors, + org.apache.tools.ant.types.selectors.modifiedselector, + org.apache.tools.ant.util, + org.apache.tools.ant.util.facade, + org.apache.tools.ant.util.regexp, + org.apache.tools.bzip2, + org.apache.tools.mail, + org.apache.tools.tar, + org.apache.tools.zip, org.apache.wml, org.apache.wml.dom, org.apache.xerces.dom, @@ -1405,6 +1544,45 @@ Export-Package: Lib, org.jfree.ui.action;uses:="javax.swing", org.jfree.ui.tabbedui;uses:="javax.swing", org.jfree.util;uses:="org.jfree.base.config,org.jfree.ui,javax.swing", + org.jpedal, + org.jpedal.color, + org.jpedal.examples, + org.jpedal.examples.acroform, + org.jpedal.examples.contentextractor, + org.jpedal.examples.handlers, + org.jpedal.examples.images, + org.jpedal.examples.jpaneldemo, + org.jpedal.examples.printing, + org.jpedal.examples.simpleviewer, + org.jpedal.examples.simpleviewer.gui, + org.jpedal.examples.simpleviewer.gui.generic, + org.jpedal.examples.simpleviewer.gui.popups, + org.jpedal.examples.simpleviewer.gui.swing, + org.jpedal.examples.simpleviewer.paper, + org.jpedal.examples.simpleviewer.utils, + org.jpedal.examples.text, + org.jpedal.examples.text.extractheadlines, + org.jpedal.exception, + org.jpedal.external, + org.jpedal.fonts, + org.jpedal.fonts.glyph, + org.jpedal.fonts.tt, + org.jpedal.function, + org.jpedal.grouping, + org.jpedal.gui, + org.jpedal.images, + org.jpedal.io, + org.jpedal.objects, + org.jpedal.objects.acroforms, + org.jpedal.objects.acroforms.listeners, + org.jpedal.objects.outlines, + org.jpedal.objects.structuredtext, + org.jpedal.parser, + org.jpedal.render, + org.jpedal.storypad, + org.jpedal.sun, + org.jpedal.utils, + org.jpedal.utils.repositories, org.postgresql;uses:="org.postgresql.largeobject,org.postgresql.fastpath,org.postgresql.copy", org.postgresql.copy;uses:="org.postgresql.core,org.postgresql", org.postgresql.core;uses:="org.postgresql.jdbc2,org.postgresql.copy,org.postgresql", @@ -1471,4 +1649,5 @@ Export-Package: Lib, org.apache.tools.ant.types, org.python.core, jline", - org.w3c.dom.html + org.w3c.dom.html, + paypal.payflow diff --git a/tools/build.properties b/tools/build.properties index 96b9a4dc42..7606177720 100644 --- a/tools/build.properties +++ b/tools/build.properties @@ -24,23 +24,17 @@ bin.includes = META-INF/,\ lib/jfreechart-1.0.11.jar,\ lib/javaee.jar,\ tools.jar,\ - lib/activemq-core-5.0.0.jar,\ lib/ant-commons-net.jar,\ lib/ant-contrib-1.0b1.jar,\ lib/ant-launcher.jar,\ - lib/ant.jar,\ lib/c3p0-0.9.1.2.jar,\ lib/c3p0-oracle-thin-extras-0.9.1.2.jar,\ lib/cglib.jar,\ lib/commons-codec.jar,\ - lib/commons-collections-3.1.jar,\ lib/commons-logging.jar,\ - lib/commons-net-1.4.0.jar,\ lib/copyLibraries.bat,\ lib/jgraph.jar,\ - lib/jpedal.jar,\ lib/jsp-api.jar,\ - lib/junit.jar,\ lib/logkit.jar,\ lib/looks-2.0.4.jar,\ lib/ocrs12.jar,\ @@ -49,6 +43,12 @@ bin.includes = META-INF/,\ lib/wizard.jar,\ lib/xjavadoc-1.1.jar,\ lib/xml-apis.jar,\ + lib/xercesImpl.jar,\ + lib/junit.jar,\ + lib/commons-collections-3.1.jar,\ + lib/ant.jar,\ + lib/jpedal.jar,\ + lib/activemq-core-5.0.0.jar,\ + lib/commons-net-1.4.0.jar,\ lib/cron4j-2.2.1.jar,\ - lib/payflow.jar,\ - lib/xercesImpl.jar + lib/payflow.jar diff --git a/tools/build.xml b/tools/build.xml index eb199dbab4..f4a641f0c3 100644 --- a/tools/build.xml +++ b/tools/build.xml @@ -21,6 +21,9 @@ + + + @@ -67,7 +70,7 @@ - + @@ -229,6 +232,12 @@ + + + + + + @@ -257,7 +266,7 @@ - + @@ -309,6 +318,10 @@ + + + + @@ -341,36 +354,42 @@ - - - - + + + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + @@ -417,7 +436,7 @@ - + @@ -466,6 +485,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tools/lib/ant4eclipse/macros/a4e-jdt-macros.xml b/tools/lib/ant4eclipse/macros/a4e-jdt-macros.xml new file mode 100644 index 0000000000..cf2fc68462 --- /dev/null +++ b/tools/lib/ant4eclipse/macros/a4e-jdt-macros.xml @@ -0,0 +1,195 @@ + + + + + + + + + + + + + eclipse.preferences.version=1${line.separator} + org.eclipse.jdt.core.compiler.codegen.targetPlatform=@{targetlevel}${line.separator} + org.eclipse.jdt.core.compiler.compliance=@{targetlevel}${line.separator} + org.eclipse.jdt.core.compiler.source=@{sourcelevel}${line.separator} + + + + + + + + + + + + + + + + + + + + + + + + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * * * Building project @{projectName} + * * * in workspace @{workspaceDirectory} + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + + + + + + + + + + + + + + + + + + + + + + + + + * Cleaning output directory '${buildJdtProject.output.directory}' + + + + + + + + + + + Compiling jdt project '${buildJdtProject.project.name}' + - source directories -> ${buildJdtProject.source.directories} + - output directories -> ${buildJdtProject.default.output.directory} + - bootclasspath -> ${buildJdtProject.boot.classpath} + - classpath -> ${buildJdtProject.classpath.absolute.compiletime} + + + + + + + + + + + + + + + + + + + + + + + + + + + + Copying resources from directory '${buildJdtProject.source.directory}' to '${buildJdtProject.output.directory}' + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tools/lib/ant4eclipse/macros/a4e-pde-macros.xml b/tools/lib/ant4eclipse/macros/a4e-pde-macros.xml new file mode 100644 index 0000000000..eaf6abdce2 --- /dev/null +++ b/tools/lib/ant4eclipse/macros/a4e-pde-macros.xml @@ -0,0 +1,852 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Compiling pde project '${buildPlugin.project.name}' + + + + + + + + + + + + + + + + + + + + + + + + + + Copying resources from directory '${buildPlugin.source.directory}' to '${buildPlugin.output.directory}' + + + + + + + + + + + + + + + + + + Packing library '${buildPlugin.library.name}' + + + + + + + + + Copying resources from directory '${executePluginLibrary.output.directory}' to '@{destination}/${a4e.temp.directory}/${buildPlugin.library.name}' + + + + + + + Copying resources from directory '${executePluginLibrary.source.directory}' to '@{destination}/${a4e.temp.directory}/${buildPlugin.library.name}' + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Packing library '.' + + + + + + + + + Copying resources from directory '${executePluginLibrary.output.directory}' to '${buildPlugin.project.directory}/${a4e.self.directory}' + + + + + + + Copying resources from directory '${executePluginLibrary.source.directory}' to '${buildPlugin.project.directory}/${a4e.self.directory}' + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Scrubbing directory '@{dir}' + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Building product ${executeProduct.product.name} version ${executeProduct.product.version} + + + + + + + + + Scrubbing directory '@{destination}' + + + + + + + + + + + + + + + + -> Building included feature '${executeProduct.feature.id}' - '${executeProduct.feature.version}' + + + + + + + + + + + -> Building included plugin '${executeProduct.plugin.id}' from project: ${executeProduct.plugin.projectName} + + + + + + + + + + + Copying bundle '${executeProduct.plugin.file} (${executeProduct.plugin.id})' + + + + + + + + + + + + version=1.0.0 + name=${executeProduct.product.name} + id=${executeProduct.product.id} + + + + + + + + + + + + -vmargs + + + @{vmarg} + + + + + + + + + + + + + + + + + + + # Product Runtime Configuration File + eclipse.application=${executeProduct.product.applicationid} + osgi.bundles.defaultStartLevel=4 + eclipse.product=${executeProduct.product.id} + osgi.splashPath=platform:/base/plugins/org.eclipse.platform + osgi.bundles=org.eclipse.core.runtime@start,org.eclipse.osgi@start,org.eclipse.equinox.common@2:start,org.eclipse.update.configurator@3:start + + + + + + + + + + + + + + + + + + + + + + + Building product ${executeProduct.product.name} successfully build. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Building feature '${executeFeature.feature.id}_${executeFeature.feature.version}' + - feature.isSource: '${executeFeature.feature.isSource}' + + + + + Scrubbing directory '@{destination}' + + + + + + + -> Building included feature '${executeFeature.feature.id}' + + + + + + + Building plug-in project '${executeFeature.plugin.filename} (${executeFeature.plugin.id}_${executeFeature.plugin.resolvedversion})' + + + + + + Copying bundle '${executeFeature.plugin.file} (${executeFeature.plugin.id}_${executeFeature.plugin.resolvedversion})' + + + + + + + + + Building feature project '${executeFeature.feature.file.name} (${executeFeature.feature.id}_${executeFeature.feature.resolved.version})' + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Copying feature '${executeFeature.feature.file} (${executeFeature.feature.id}_${executeFeature.feature.resolved.version})' + + + + + + + + + Feature '${executeFeature.feature.id}_${executeFeature.feature.version}' successfully built. + + + + + + + + \ No newline at end of file diff --git a/tools/lib/ant4eclipse/macros/a4e-platform-macros.xml b/tools/lib/ant4eclipse/macros/a4e-platform-macros.xml new file mode 100644 index 0000000000..d661ac214e --- /dev/null +++ b/tools/lib/ant4eclipse/macros/a4e-platform-macros.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file From 6bb6bd0e1a094be81446ff0cf151988182560b01 Mon Sep 17 00:00:00 2001 From: joergviola Date: Wed, 28 Apr 2010 21:08:43 +0000 Subject: [PATCH 33/46] use standard deployment for OSGi https://sourceforge.net/tracker/?func=detail&aid=2700937&group_id=176962&atid=879334 --- utils/RUN_Adempiere.sh | 4 +++- utils_dev/RUN_build.sh | 12 +++++++----- utils_dev/RUN_plugin.sh | 8 ++++++++ utils_dev/build.properties | 2 +- utils_dev/build.xml | 31 +++++++++++++++++++++++++++++-- utils_dev/properties.xml | 21 ++++++++++++++++++++- 6 files changed, 68 insertions(+), 10 deletions(-) create mode 100755 utils_dev/RUN_plugin.sh diff --git a/utils/RUN_Adempiere.sh b/utils/RUN_Adempiere.sh index 64eea36f3e..bce91f2d0a 100644 --- a/utils/RUN_Adempiere.sh +++ b/utils/RUN_Adempiere.sh @@ -38,5 +38,7 @@ PROP= # SECURE=-DADEMPIERE_SECURE=org.compiere.util.Secure SECURE= -$JAVA -Xms32m -Xmx512m -DADEMPIERE_HOME=$ADEMPIERE_HOME $PROP $SECURE -classpath $CLASSPATH org.compiere.Adempiere +#$JAVA -Xms32m -Xmx512m -DADEMPIERE_HOME=$ADEMPIERE_HOME $PROP $SECURE -classpath $CLASSPATH org.compiere.Adempiere +# OSGi: +$JAVA -Xms32m -Xmx512m -DADEMPIERE_HOME=$ADEMPIERE_HOME $PROP $SECURE -jar $ADEMPIERE_HOME/osgi/org.eclipse.osgi_3.5.0.v20090520.jar -clean -console -application org.adempiere.Client diff --git a/utils_dev/RUN_build.sh b/utils_dev/RUN_build.sh index 8f19e63278..d43fb4d4d7 100755 --- a/utils_dev/RUN_build.sh +++ b/utils_dev/RUN_build.sh @@ -22,16 +22,18 @@ if [ ! -f $JAVA_HOME/lib/tools.jar ] ; then exit fi -#classpath -export ANT_CLASSPATH=$CLASSPATH:../tools/lib/ant.jar:../tools/lib/ant-launcher.jar:../tools/lib/ant-swing.jar:../tools/lib/ant-commons-net.jar:../tools/lib/commons-net.jar:$JAVA_HOME/lib/tools.jar +ANTLIB="-lib ../tools/lib/ant4eclipse/ -lib ../equinox-target/org.eclipse.osgi_3.5.0.v20090520.jar -lib ../tools/lib/ant-contrib-1.0b1.jar" -export ANT_OPTS="-Xms128m -Xmx512m" +#classpath +export ANT_CLASSPATH=../tools/lib/ant-launcher.jar + +export ANT_OPTS="-Xms128m -Xmx512m -Dworkspace=`pwd`/.." echo Cleanup ... -$JAVA_HOME/bin/java $ANT_OPTS -classpath $ANT_CLASSPATH -Dant.home="." org.apache.tools.ant.Main clean +$JAVA_HOME/bin/java $ANT_OPTS -classpath $ANT_CLASSPATH org.apache.tools.ant.launch.Launcher $ANTLIB clean echo Building ... -$JAVA_HOME/bin/java $ANT_OPTS -classpath $ANT_CLASSPATH -Dant.home="." org.apache.tools.ant.Main -logger org.apache.tools.ant.listener.MailLogger complete +$JAVA_HOME/bin/java $ANT_OPTS -classpath $ANT_CLASSPATH org.apache.tools.ant.launch.Launcher -logger org.apache.tools.ant.listener.MailLogger $ANTLIB complete echo Done ... diff --git a/utils_dev/RUN_plugin.sh b/utils_dev/RUN_plugin.sh new file mode 100755 index 0000000000..f147058e54 --- /dev/null +++ b/utils_dev/RUN_plugin.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +export ANT_OPTS="-Xms128m -Xmx512m -Dworkspace=`pwd`/.." + +ANT4ECLIPSE=../tools/lib/ant4eclipse/ +ANT4OSGI=../equinox-target/org.eclipse.osgi_3.5.0.v20090520.jar + +ant -Dplugin=$1 -lib $ANT4ECLIPSE -lib $ANT4OSGI -lib ../tools/lib/ant-contrib-1.0b1.jar plugin diff --git a/utils_dev/build.properties b/utils_dev/build.properties index 5ca0f646be..7758bf354f 100644 --- a/utils_dev/build.properties +++ b/utils_dev/build.properties @@ -3,7 +3,7 @@ env.ADEMPIERE_ROOT=${env.ADEMPIERE_SOURCE}/adempiere env.ADEMPIERE_HOME=${env.ADEMPIERE_ROOT}/Adempiere env.ADEMPIERE_INSTALL=${env.ADEMPIERE_SOURCE}/adempiere/install env.ADEMPIERE_VERSION=ADempiere -env.ADEMPIERE_VERSION_FILE=354a +env.ADEMPIERE_VERSION_FILE=400pr01 env.ADEMPIERE_VENDOR=ADempiere env.ENCODING=UTF-8 env.XDOCLET_HOME=${env.ADEMPIERE_SOURCE}/tools diff --git a/utils_dev/build.xml b/utils_dev/build.xml index ad3347605d..6f23d61776 100644 --- a/utils_dev/build.xml +++ b/utils_dev/build.xml @@ -2,7 +2,7 @@ - + This buildfile is used to build the Adempiere system. @@ -31,9 +31,10 @@ - + + @@ -92,6 +93,32 @@ --> + + + + + + + + + + + + + + + + diff --git a/utils_dev/properties.xml b/utils_dev/properties.xml index be1e2401c9..24a5b3739a 100644 --- a/utils_dev/properties.xml +++ b/utils_dev/properties.xml @@ -1,5 +1,7 @@ - + + This project file sets all properties needed during build and installation. This file is imported in all other build.xml @@ -14,4 +16,21 @@ + + + + + + + + + + + + + + + From af10f8607624a12e082f6fae34fc6367189b4577 Mon Sep 17 00:00:00 2001 From: joergviola Date: Wed, 28 Apr 2010 21:14:31 +0000 Subject: [PATCH 34/46] adaptions for standard deployment https://sourceforge.net/tracker/?func=detail&aid=2700937&group_id=176962&atid=879334 --- zkwebui/.classpath | 7 ------- zkwebui/build.properties | 2 +- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/zkwebui/.classpath b/zkwebui/.classpath index 62840c5d7a..0001d6d74d 100644 --- a/zkwebui/.classpath +++ b/zkwebui/.classpath @@ -40,13 +40,6 @@ - - - - - - - diff --git a/zkwebui/build.properties b/zkwebui/build.properties index d6b0947bc2..df471ede22 100644 --- a/zkwebui/build.properties +++ b/zkwebui/build.properties @@ -51,6 +51,6 @@ bin.includes = META-INF/,\ WEB-INF/lib/zcommon.jar,\ WEB-INF/lib/zhtml.jar,\ -output.zkwebui.jar = bin/ +output.zkwebui.jar = WEB-INF/classes jars.compile.order = zkwebui.jar From 5dc7b6c0f4dd9dad0a60fd2884462c1eee032835 Mon Sep 17 00:00:00 2001 From: joergviola Date: Thu, 29 Apr 2010 18:07:38 +0000 Subject: [PATCH 35/46] Fix: CInstall no longer required https://sourceforge.net/tracker/?func=detail&aid=2700937&group_id=176962&atid=879334 --- install/build.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/build.xml b/install/build.xml index 3d427721e2..acda31c8e2 100644 --- a/install/build.xml +++ b/install/build.xml @@ -179,8 +179,8 @@ - - AdempiereHome From 515f51407ad4ab341f08cffc36cb18aa6d2c07ab Mon Sep 17 00:00:00 2001 From: joergviola Date: Fri, 30 Apr 2010 10:43:18 +0000 Subject: [PATCH 36/46] Fixed classpath problem https://sourceforge.net/tracker/?func=detail&aid=2700937&group_id=176962&atid=879334 --- jbossfacet/META-INF/MANIFEST.MF | 1 + jbossfacet/build.properties | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/jbossfacet/META-INF/MANIFEST.MF b/jbossfacet/META-INF/MANIFEST.MF index c9667bd0aa..718025aa4d 100644 --- a/jbossfacet/META-INF/MANIFEST.MF +++ b/jbossfacet/META-INF/MANIFEST.MF @@ -3,6 +3,7 @@ Bundle-ManifestVersion: 2 Bundle-Name: jbossfacet Bundle-SymbolicName: org.adempiere.jbossfacet;singleton:=true Bundle-Version: 0.0.0.1 +Bundle-ClassPath: jbossfacet.jar Export-Package: org.adempiere.as.jboss Require-Bundle: org.adempiere.jboss;bundle-version="0.0.0" Import-Package: org.adempiere.as, diff --git a/jbossfacet/build.properties b/jbossfacet/build.properties index cc91072ece..59014d6cd2 100644 --- a/jbossfacet/build.properties +++ b/jbossfacet/build.properties @@ -1,4 +1,5 @@ -source.. = src/ +source.jbossfacet.jar = bin/ bin.includes = META-INF/,\ .,\ - plugin.xml + plugin.xml,\ + jbossfacet.jar From 206c7bf4fd27ea3f47ea2703ee7b31a4920b100f Mon Sep 17 00:00:00 2001 From: joergviola Date: Fri, 30 Apr 2010 10:45:27 +0000 Subject: [PATCH 37/46] Fixed classpath problem https://sourceforge.net/tracker/?func=detail&aid=2700937&group_id=176962&atid=879334 --- interfaces/.classpath | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 interfaces/.classpath diff --git a/interfaces/.classpath b/interfaces/.classpath new file mode 100644 index 0000000000..8c49c50367 --- /dev/null +++ b/interfaces/.classpath @@ -0,0 +1,5 @@ + + + + + From e8c554fb89df8a320077c4377b7893695c9376d5 Mon Sep 17 00:00:00 2001 From: joergviola Date: Thu, 6 May 2010 14:37:24 +0000 Subject: [PATCH 38/46] Failure in tools plugin build: ECS not available! https://sourceforge.net/tracker/?func=detail&aid=2700937&group_id=176962&atid=879334 --- tools/build.properties | 2 +- utils_dev/build.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/build.properties b/tools/build.properties index 7606177720..8f19b5c9eb 100644 --- a/tools/build.properties +++ b/tools/build.properties @@ -1,4 +1,4 @@ -source.tools.jar = src/ +source.tools.jar = src/,build/ bin.includes = META-INF/,\ lib/jstl.jar,\ lib/Verisign.jar,\ diff --git a/utils_dev/build.xml b/utils_dev/build.xml index 6f23d61776..e11afcca25 100644 --- a/utils_dev/build.xml +++ b/utils_dev/build.xml @@ -111,7 +111,7 @@ From c499e73fb19b06027dbb2b5bac73993a1342af08 Mon Sep 17 00:00:00 2001 From: joergviola Date: Thu, 6 May 2010 17:56:57 +0000 Subject: [PATCH 39/46] zkwebui now deployable again in standard deployment https://sourceforge.net/tracker/?func=detail&aid=2700937&group_id=176962&atid=879334 --- JasperReports/build.properties | 2 +- equinox-target/build.xml | 8 ++++++++ install/Adempiere/build.xml | 15 ++++++++++++++- install/build.xml | 8 ++++++++ utils_dev/build.xml | 7 +++++++ zkwebui/build.properties | 1 - 6 files changed, 38 insertions(+), 3 deletions(-) diff --git a/JasperReports/build.properties b/JasperReports/build.properties index 4651ea48f1..e87b6126ed 100644 --- a/JasperReports/build.properties +++ b/JasperReports/build.properties @@ -1,4 +1,4 @@ -source.JasperReports.jar = src/ +source.JasperReports.jar = src/, build/ bin.includes = META-INF/,\ lib/postgresql.jar,\ lib/ocrs12.jar,\ diff --git a/equinox-target/build.xml b/equinox-target/build.xml index 8de1b62c7b..cdfa4c718b 100644 --- a/equinox-target/build.xml +++ b/equinox-target/build.xml @@ -69,6 +69,14 @@ the following responsibilities: + + + + + + + + diff --git a/install/Adempiere/build.xml b/install/Adempiere/build.xml index f2a0d63e77..648fa9b3d4 100644 --- a/install/Adempiere/build.xml +++ b/install/Adempiere/build.xml @@ -515,10 +515,23 @@ - + + + + + + + + + + + + diff --git a/install/build.xml b/install/build.xml index acda31c8e2..eed7ef889f 100644 --- a/install/build.xml +++ b/install/build.xml @@ -197,6 +197,14 @@ + + + + + + + + diff --git a/utils_dev/build.xml b/utils_dev/build.xml index e11afcca25..706d90869a 100644 --- a/utils_dev/build.xml +++ b/utils_dev/build.xml @@ -103,6 +103,13 @@ destination="${env.ADEMPIERE_ROOT}/Adempiere/osgi" buildSourceJar="false" clean="no"/> + + diff --git a/zkwebui/build.properties b/zkwebui/build.properties index df471ede22..b2ab62524a 100644 --- a/zkwebui/build.properties +++ b/zkwebui/build.properties @@ -25,7 +25,6 @@ bin.includes = META-INF/,\ WEB-INF/lib/ognl.jar,\ WEB-INF/lib/timelinez-sources.jar,\ WEB-INF/lib/timeplotz.jar,\ - WEB-INF/lib/xercesImpl.jar,\ WEB-INF/lib/zcommon-sources.jar,\ WEB-INF/lib/zcommons-el.jar,\ WEB-INF/lib/zhtml-sources.jar,\ From 63df9c535af77ea71cb7030dc6b4ef099e0c392a Mon Sep 17 00:00:00 2001 From: eloy_gomez Date: Tue, 18 May 2010 10:44:46 +0000 Subject: [PATCH 40/46] Restore functionality to setup windows and unix env files after setup. --- install/Adempiere/build.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/Adempiere/build.xml b/install/Adempiere/build.xml index 648fa9b3d4..14d438ce77 100644 --- a/install/Adempiere/build.xml +++ b/install/Adempiere/build.xml @@ -515,7 +515,7 @@ - From fca91a6f4cfeed4f3ffffe8f215b69c08a5a68e6 Mon Sep 17 00:00:00 2001 From: Heng Sin Low Date: Wed, 19 May 2010 23:27:37 +0000 Subject: [PATCH 41/46] added src/ so that we can run in eclipse without doing the build script stuff --- jbossfacet/build.properties | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/jbossfacet/build.properties b/jbossfacet/build.properties index 59014d6cd2..8d2492d81d 100644 --- a/jbossfacet/build.properties +++ b/jbossfacet/build.properties @@ -1,5 +1,7 @@ -source.jbossfacet.jar = bin/ +source.jbossfacet.jar = src/,\ + bin/ bin.includes = META-INF/,\ .,\ plugin.xml,\ jbossfacet.jar +output.jbossfacet.jar = bin/ From dec3d9ed24a68ead74a659272966f23e151014fe Mon Sep 17 00:00:00 2001 From: Heng Sin Low Date: Wed, 19 May 2010 23:30:18 +0000 Subject: [PATCH 42/46] use variable instead of hard coded path - make running in eclipse easier --- equinox-target/equinox.target | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/equinox-target/equinox.target b/equinox-target/equinox.target index f2414856e2..090df68307 100644 --- a/equinox-target/equinox.target +++ b/equinox-target/equinox.target @@ -3,6 +3,6 @@ - + From f591982a570e50ea4aa7a834cb65a5b36beb6f11 Mon Sep 17 00:00:00 2001 From: Heng Sin Low Date: Wed, 19 May 2010 23:33:33 +0000 Subject: [PATCH 43/46] remove org.apache.tools.ant.types.resolver from exported package, not found in tools/lib/ant.jar --- tools/META-INF/MANIFEST.MF | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/META-INF/MANIFEST.MF b/tools/META-INF/MANIFEST.MF index dfaca5b950..cb7201a8d1 100644 --- a/tools/META-INF/MANIFEST.MF +++ b/tools/META-INF/MANIFEST.MF @@ -995,7 +995,6 @@ Export-Package: Lib, org.apache.tools.ant.taskdefs.rmic, org.apache.tools.ant.types, org.apache.tools.ant.types.mappers, - org.apache.tools.ant.types.resolver, org.apache.tools.ant.types.selectors, org.apache.tools.ant.types.selectors.modifiedselector, org.apache.tools.ant.util, From 8240aa9f02f5c605a3c7d4460a2d955090067219 Mon Sep 17 00:00:00 2001 From: "Redhuan D. Oon" Date: Sat, 22 May 2010 01:33:03 +0000 Subject: [PATCH 44/46] NOTE TO JOERG VIOLA. I am starting to remove unwanted imports and also synching slowly with Trunk. Please advice if its ok. --- base/src/org/compiere/util/Env.java | 6 ------ 1 file changed, 6 deletions(-) diff --git a/base/src/org/compiere/util/Env.java b/base/src/org/compiere/util/Env.java index aa25b4e9ea..04fa436817 100644 --- a/base/src/org/compiere/util/Env.java +++ b/base/src/org/compiere/util/Env.java @@ -48,8 +48,6 @@ import javax.swing.SwingUtilities; import org.adempiere.base.Core; import org.adempiere.base.IResourceFinder; -import org.adempiere.base.Service; -import org.compiere.Adempiere; import org.compiere.db.CConnection; import org.compiere.model.MClient; import org.compiere.model.MLookupCache; @@ -57,10 +55,6 @@ import org.compiere.model.MRole; import org.compiere.model.MSession; import org.compiere.model.PO; import org.compiere.swing.CFrame; -import org.eclipse.core.runtime.IConfigurationElement; -import org.eclipse.core.runtime.Platform; - -import com.sun.xml.internal.ws.util.ServiceFinder; /** From 180221152a4ed9c9ee9e38c69c999dde08ba33c2 Mon Sep 17 00:00:00 2001 From: "Redhuan D. Oon" Date: Sat, 22 May 2010 02:37:33 +0000 Subject: [PATCH 45/46] Reverting my 12382 as Joerg's changes in Revision: 11357 was intentional --- base/src/org/compiere/util/Env.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/base/src/org/compiere/util/Env.java b/base/src/org/compiere/util/Env.java index 04fa436817..aa25b4e9ea 100644 --- a/base/src/org/compiere/util/Env.java +++ b/base/src/org/compiere/util/Env.java @@ -48,6 +48,8 @@ import javax.swing.SwingUtilities; import org.adempiere.base.Core; import org.adempiere.base.IResourceFinder; +import org.adempiere.base.Service; +import org.compiere.Adempiere; import org.compiere.db.CConnection; import org.compiere.model.MClient; import org.compiere.model.MLookupCache; @@ -55,6 +57,10 @@ import org.compiere.model.MRole; import org.compiere.model.MSession; import org.compiere.model.PO; import org.compiere.swing.CFrame; +import org.eclipse.core.runtime.IConfigurationElement; +import org.eclipse.core.runtime.Platform; + +import com.sun.xml.internal.ws.util.ServiceFinder; /** From 4e53264e7e41d0caaf82adc28d7838898ca72ac8 Mon Sep 17 00:00:00 2001 From: eloy_gomez Date: Fri, 4 Jun 2010 12:32:36 +0000 Subject: [PATCH 46/46] add IMenuAction extension point. See https://sourceforge.net/tracker/?func=detail&atid=883808&aid=3011521&group_id=176962 Link to SF Tracker: http://sourceforge.net/support/tracker.php?aid=3011521 --- client/META-INF/MANIFEST.MF | 1 + client/plugin.xml | 1 + .../org.adempiere.osgi.IMenuAction.exsd | 101 ++++++++++++++++++ .../adempiere/osgi/AbstractMenuAction.java | 35 ++++++ .../src/org/adempiere/osgi/IMenuAction.java | 11 ++ client/src/org/compiere/apps/APanel.java | 9 ++ 6 files changed, 158 insertions(+) create mode 100644 client/schema/org.adempiere.osgi.IMenuAction.exsd create mode 100644 client/src/org/adempiere/osgi/AbstractMenuAction.java create mode 100644 client/src/org/adempiere/osgi/IMenuAction.java diff --git a/client/META-INF/MANIFEST.MF b/client/META-INF/MANIFEST.MF index 2ae61ac6b4..e23362587e 100644 --- a/client/META-INF/MANIFEST.MF +++ b/client/META-INF/MANIFEST.MF @@ -52,6 +52,7 @@ Export-Package: com.keypoint, groovyjarjarasm.asm.tree, groovyjarjarcommonscli, org.adempiere.apps.graph, + org.adempiere.osgi, org.codehaus.groovy, org.codehaus.groovy.ant, org.codehaus.groovy.antlr, diff --git a/client/plugin.xml b/client/plugin.xml index 4321a36281..3a52fae1c2 100644 --- a/client/plugin.xml +++ b/client/plugin.xml @@ -1,6 +1,7 @@ + + + + + + + + [Enter description of this extension point.] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + [Enter the first release in which this extension point appears.] + + + + + + + + + [Enter extension point usage example here.] + + + + + + + + + [Enter API information here.] + + + + + + + + + [Enter information about supplied implementation of this extension point.] + + + + + diff --git a/client/src/org/adempiere/osgi/AbstractMenuAction.java b/client/src/org/adempiere/osgi/AbstractMenuAction.java new file mode 100644 index 0000000000..164c2777d0 --- /dev/null +++ b/client/src/org/adempiere/osgi/AbstractMenuAction.java @@ -0,0 +1,35 @@ +package org.adempiere.osgi; + +import javax.swing.JMenu; +import javax.swing.JMenuBar; + +import org.compiere.util.CLogger; +import org.compiere.util.Env; +import org.compiere.util.Msg; + +public abstract class AbstractMenuAction implements IMenuAction { + + protected CLogger log = CLogger.getCLogger(getClass()); + + protected JMenu getMenu(JMenuBar menuBar, String label) { + + // Translated text + String text = Msg.getMsg(Env.getCtx(), label); + int pos = text.indexOf('&'); + if (pos != -1) { + text = text.substring(0, pos) + text.substring(pos+1); + } + + for (int i=0; i < menuBar.getMenuCount(); i++) { + JMenu menu = menuBar.getMenu(i); + if (text.equals(menu.getText())) { + return menu; + } + } + // menu not found. + log.warning("Menu " + label + " not found."); + return null; + } + + +} diff --git a/client/src/org/adempiere/osgi/IMenuAction.java b/client/src/org/adempiere/osgi/IMenuAction.java new file mode 100644 index 0000000000..b47dc1dce5 --- /dev/null +++ b/client/src/org/adempiere/osgi/IMenuAction.java @@ -0,0 +1,11 @@ +package org.adempiere.osgi; + +import javax.swing.JMenuBar; + +import org.adempiere.base.IService; + +public interface IMenuAction extends IService { + + public void addAction(JMenuBar menuBar); + +} diff --git a/client/src/org/compiere/apps/APanel.java b/client/src/org/compiere/apps/APanel.java index 1303153e46..49670e80ca 100644 --- a/client/src/org/compiere/apps/APanel.java +++ b/client/src/org/compiere/apps/APanel.java @@ -33,6 +33,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.Iterator; +import java.util.List; import java.util.Map; import java.util.Properties; import java.util.TreeMap; @@ -59,6 +60,8 @@ import javax.swing.SwingUtilities; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; +import org.adempiere.base.Service; +import org.adempiere.osgi.IMenuAction; import org.compiere.apps.form.FormFrame; import org.compiere.apps.search.Find; import org.compiere.grid.APanelTab; @@ -525,6 +528,12 @@ public final class APanel extends CPanel toolBar.add(aEnd.getButton()); } + // Create OSGi menu actions.. + List osgiActions = Service.list(IMenuAction.class); + for (IMenuAction action:osgiActions) { + action.addAction(menuBar); + } + // if (CLogMgt.isLevelAll()) Util.printActionInputMap(this);