From 7bc1e373c92e7fc9b39358b5c1d387766d3e5c67 Mon Sep 17 00:00:00 2001 From: Elaine Tan Date: Fri, 18 Jan 2013 19:14:02 +0800 Subject: [PATCH 1/3] Change "CreateFrom" factory to use OSGi service --- org.adempiere.ui.swing/META-INF/MANIFEST.MF | 2 +- .../OSGI-INF/defaultcreatefromfactory.xml | 7 ++ org.adempiere.ui.swing/build.properties | 3 +- .../grid/DefaultCreateFromFactory.java | 46 ++++++++ .../org/compiere/grid/VCreateFromFactory.java | 95 ++-------------- org.adempiere.ui.zk/META-INF/MANIFEST.MF | 2 +- .../OSGI-INF/defaultcreatefromfactory.xml | 7 ++ .../apps/form/DefaultCreateFromFactory.java | 48 ++++++++ .../webui/apps/form/WCreateFromFactory.java | 96 ++-------------- org.adempiere.ui.zk/build.properties | 103 +++++++++--------- .../org/compiere/grid/ICreateFromFactory.java | 27 +++++ 11 files changed, 212 insertions(+), 224 deletions(-) create mode 100644 org.adempiere.ui.swing/OSGI-INF/defaultcreatefromfactory.xml create mode 100644 org.adempiere.ui.swing/src/org/compiere/grid/DefaultCreateFromFactory.java create mode 100644 org.adempiere.ui.zk/OSGI-INF/defaultcreatefromfactory.xml create mode 100644 org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/DefaultCreateFromFactory.java create mode 100644 org.adempiere.ui/src/org/compiere/grid/ICreateFromFactory.java diff --git a/org.adempiere.ui.swing/META-INF/MANIFEST.MF b/org.adempiere.ui.swing/META-INF/MANIFEST.MF index aad0c8369d..eee6d481fa 100644 --- a/org.adempiere.ui.swing/META-INF/MANIFEST.MF +++ b/org.adempiere.ui.swing/META-INF/MANIFEST.MF @@ -87,5 +87,5 @@ Import-Package: javax.net.ssl, org.restlet.security, org.restlet.service, org.restlet.util -Service-Component: OSGI-INF/defaultpaymentformfactory.xml, OSGI-INF/serverinterface.xml, OSGI-INF/statusinterface.xml, OSGI-INF/defaultprintshippinglabel.xml +Service-Component: OSGI-INF/defaultpaymentformfactory.xml, OSGI-INF/serverinterface.xml, OSGI-INF/statusinterface.xml, OSGI-INF/defaultprintshippinglabel.xml, OSGI-INF/defaultcreatefromfactory.xml Bundle-ActivationPolicy: lazy diff --git a/org.adempiere.ui.swing/OSGI-INF/defaultcreatefromfactory.xml b/org.adempiere.ui.swing/OSGI-INF/defaultcreatefromfactory.xml new file mode 100644 index 0000000000..d8241452e3 --- /dev/null +++ b/org.adempiere.ui.swing/OSGI-INF/defaultcreatefromfactory.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/org.adempiere.ui.swing/build.properties b/org.adempiere.ui.swing/build.properties index 5ed359bc4f..bf2bd422c8 100644 --- a/org.adempiere.ui.swing/build.properties +++ b/org.adempiere.ui.swing/build.properties @@ -7,6 +7,7 @@ bin.includes = META-INF/,\ jpedal.jar,\ OSGI-INF/,\ OSGI-INF/defaultpaymentformfactory.xml,\ - OSGI-INF/defaultprintshippinglabel.xml + OSGI-INF/defaultprintshippinglabel.xml,\ + OSGI-INF/defaultcreatefromfactory.xml source.client.jar = src/ output.client.jar = build/ diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/DefaultCreateFromFactory.java b/org.adempiere.ui.swing/src/org/compiere/grid/DefaultCreateFromFactory.java new file mode 100644 index 0000000000..94d2f1f5bb --- /dev/null +++ b/org.adempiere.ui.swing/src/org/compiere/grid/DefaultCreateFromFactory.java @@ -0,0 +1,46 @@ +/****************************************************************************** + * Copyright (C) 2013 Elaine Tan * + * Copyright (C) 2013 Trek Global + * 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.grid; + +import org.compiere.model.GridTab; +import org.compiere.model.I_C_BankStatement; +import org.compiere.model.I_C_Invoice; +import org.compiere.model.I_M_InOut; +import org.compiere.model.I_M_PackageMPS; +import org.compiere.model.I_M_RMA; + +/** + * + * @author Elaine + * + */ +public class DefaultCreateFromFactory implements ICreateFromFactory { + + @Override + public ICreateFrom create(GridTab mTab) { + String tableName = mTab.getTableName(); + if (tableName.equals(I_C_Invoice.Table_Name)) + return new VCreateFromInvoiceUI(mTab); + else if (tableName.equals(I_C_BankStatement.Table_Name)) + return new VCreateFromStatementUI(mTab); + else if (tableName.equals(I_M_InOut.Table_Name)) + return new VCreateFromShipmentUI(mTab); + else if (tableName.equals(I_M_RMA.Table_Name)) + return new VCreateFromRMAUI(mTab); + else if (tableName.equals(I_M_PackageMPS.Table_Name)) + return new VCreateFromPackageShipmentUI(mTab); + return null; + } + +} diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/VCreateFromFactory.java b/org.adempiere.ui.swing/src/org/compiere/grid/VCreateFromFactory.java index 5aa7a483b1..2eb8f4e4f4 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/VCreateFromFactory.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/VCreateFromFactory.java @@ -13,98 +13,23 @@ *****************************************************************************/ package org.compiere.grid; -import java.util.HashMap; -import java.util.logging.Level; +import java.util.List; +import org.adempiere.base.Service; import org.compiere.model.GridTab; -import org.compiere.model.I_C_BankStatement; -import org.compiere.model.I_C_Invoice; -import org.compiere.model.I_M_InOut; -import org.compiere.model.I_M_PackageMPS; -import org.compiere.model.I_M_RMA; -import org.compiere.util.CLogger; -import org.compiere.util.Env; public class VCreateFromFactory { - /** Static Logger */ - private static CLogger s_log = CLogger.getCLogger (VCreateFromFactory.class); - - /** Registered classes map (AD_Table_ID -> Class) */ - private static HashMap> s_registeredClasses = null; - - /** - * Register custom VCreateFrom* class - * @param ad_table_id - * @param cl custom class - */ - public static final void registerClass(int ad_table_id, Class cl) - { - s_registeredClasses.put(ad_table_id, cl); - s_log.info("Registered AD_Table_ID="+ad_table_id+", Class="+cl); - } - - static - { - // Register defaults: - s_registeredClasses = new HashMap>(); - s_registeredClasses.put(I_C_Invoice.Table_ID, VCreateFromInvoiceUI.class); - - s_registeredClasses.put(I_C_BankStatement.Table_ID, VCreateFromStatementUI.class); - s_registeredClasses.put(I_M_InOut.Table_ID, VCreateFromShipmentUI.class); - s_registeredClasses.put(I_M_RMA.Table_ID, VCreateFromRMAUI.class); - - s_registeredClasses.put(I_M_PackageMPS.Table_ID, VCreateFromPackageShipmentUI.class); - } - - /** - * Factory - called from APanel - * @param mTab Model Tab for the trx - * @return JDialog - */ public static ICreateFrom create (GridTab mTab) { - // dynamic init preparation - int AD_Table_ID = Env.getContextAsInt(Env.getCtx(), mTab.getWindowNo(), mTab.getTabNo(), "_TabInfo_AD_Table_ID"); - - ICreateFrom retValue = null; - Class cl = s_registeredClasses.get(AD_Table_ID); - if (cl != null) + ICreateFrom createFrom = null; + List factories = Service.locator().list(ICreateFromFactory.class).getServices(); + for (ICreateFromFactory factory : factories) { - try - { - java.lang.reflect.Constructor ctor = cl.getConstructor(GridTab.class); - retValue = ctor.newInstance(mTab); - } - catch (Throwable e) - { - s_log.log(Level.SEVERE, e.getLocalizedMessage(), e); - return null; - } + createFrom = factory.create(mTab); + if (createFrom != null) + break; } - if (retValue == null) - { - AD_Table_ID = Env.getContextAsInt(Env.getCtx(), mTab.getWindowNo(), "BaseTable_ID"); - - retValue = null; - cl = s_registeredClasses.get(AD_Table_ID); - if (cl != null) - { - try - { - java.lang.reflect.Constructor ctor = cl.getConstructor(GridTab.class); - retValue = ctor.newInstance(mTab); - } - catch (Throwable e) - { - s_log.log(Level.SEVERE, e.getLocalizedMessage(), e); - return null; - } - } - - s_log.info("Unsupported AD_Table_ID=" + AD_Table_ID); - return null; - } - return retValue; - } // create + return createFrom; + } } \ No newline at end of file diff --git a/org.adempiere.ui.zk/META-INF/MANIFEST.MF b/org.adempiere.ui.zk/META-INF/MANIFEST.MF index 67079f49a1..4b10a488ba 100644 --- a/org.adempiere.ui.zk/META-INF/MANIFEST.MF +++ b/org.adempiere.ui.zk/META-INF/MANIFEST.MF @@ -58,4 +58,4 @@ Bundle-Activator: org.adempiere.webui.WebUIActivator Eclipse-ExtensibleAPI: true Eclipse-RegisterBuddy: org.zkoss.zk.library Web-ContextPath: webui -Service-Component: OSGI-INF/reportviewerprovider.xml, OSGI-INF/defaultinfofactory.xml, OSGI-INF/defaulteditorfactory.xml, OSGI-INF/jrviewerprovider.xml, OSGI-INF/resourcefinder.xml, OSGI-INF/defaultpaymentformfactory.xml, OSGI-INF/processfactory.xml, OSGI-INF/defaultprintshippinglabel.xml +Service-Component: OSGI-INF/reportviewerprovider.xml, OSGI-INF/defaultinfofactory.xml, OSGI-INF/defaulteditorfactory.xml, OSGI-INF/jrviewerprovider.xml, OSGI-INF/resourcefinder.xml, OSGI-INF/defaultpaymentformfactory.xml, OSGI-INF/processfactory.xml, OSGI-INF/defaultprintshippinglabel.xml, OSGI-INF/defaultcreatefromfactory.xml diff --git a/org.adempiere.ui.zk/OSGI-INF/defaultcreatefromfactory.xml b/org.adempiere.ui.zk/OSGI-INF/defaultcreatefromfactory.xml new file mode 100644 index 0000000000..11e052760b --- /dev/null +++ b/org.adempiere.ui.zk/OSGI-INF/defaultcreatefromfactory.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/DefaultCreateFromFactory.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/DefaultCreateFromFactory.java new file mode 100644 index 0000000000..be20ea36d3 --- /dev/null +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/DefaultCreateFromFactory.java @@ -0,0 +1,48 @@ +/****************************************************************************** + * Copyright (C) 2013 Elaine Tan * + * Copyright (C) 2013 Trek Global + * 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.adempiere.webui.apps.form; + +import org.compiere.grid.ICreateFrom; +import org.compiere.grid.ICreateFromFactory; +import org.compiere.model.GridTab; +import org.compiere.model.I_C_BankStatement; +import org.compiere.model.I_C_Invoice; +import org.compiere.model.I_M_InOut; +import org.compiere.model.I_M_PackageMPS; +import org.compiere.model.I_M_RMA; + +/** + * + * @author Elaine + * + */ +public class DefaultCreateFromFactory implements ICreateFromFactory { + + @Override + public ICreateFrom create(GridTab mTab) { + String tableName = mTab.getTableName(); + if (tableName.equals(I_C_Invoice.Table_Name)) + return new WCreateFromInvoiceUI(mTab); + else if (tableName.equals(I_C_BankStatement.Table_Name)) + return new WCreateFromStatementUI(mTab); + else if (tableName.equals(I_M_InOut.Table_Name)) + return new WCreateFromShipmentUI(mTab); + else if (tableName.equals(I_M_RMA.Table_Name)) + return new WCreateFromRMAUI(mTab); + else if (tableName.equals(I_M_PackageMPS.Table_Name)) + return new WCreateFromPackageShipmentUI(mTab); + return null; + } + +} \ No newline at end of file diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromFactory.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromFactory.java index 5128f60fb7..6527b5b55c 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromFactory.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WCreateFromFactory.java @@ -13,99 +13,25 @@ *****************************************************************************/ package org.adempiere.webui.apps.form; -import java.util.HashMap; -import java.util.logging.Level; +import java.util.List; +import org.adempiere.base.Service; import org.compiere.grid.ICreateFrom; +import org.compiere.grid.ICreateFromFactory; import org.compiere.model.GridTab; -import org.compiere.model.I_C_BankStatement; -import org.compiere.model.I_C_Invoice; -import org.compiere.model.I_M_InOut; -import org.compiere.model.I_M_PackageMPS; -import org.compiere.model.I_M_RMA; -import org.compiere.util.CLogger; -import org.compiere.util.Env; public class WCreateFromFactory { - /** Static Logger */ - private static CLogger s_log = CLogger.getCLogger (WCreateFromFactory.class); - - /** Registered classes map (AD_Table_ID -> Class) */ - private static HashMap> s_registeredClasses = null; - - /** - * Register custom VCreateFrom* class - * @param ad_table_id - * @param cl custom class - */ - public static final void registerClass(int ad_table_id, Class cl) - { - s_registeredClasses.put(ad_table_id, cl); - s_log.info("Registered AD_Table_ID="+ad_table_id+", Class="+cl); - } - - static - { - // Register defaults: - s_registeredClasses = new HashMap>(); - s_registeredClasses.put(I_C_Invoice.Table_ID, WCreateFromInvoiceUI.class); - - s_registeredClasses.put(I_C_BankStatement.Table_ID, WCreateFromStatementUI.class); - s_registeredClasses.put(I_M_InOut.Table_ID, WCreateFromShipmentUI.class); - s_registeredClasses.put(I_M_RMA.Table_ID, WCreateFromRMAUI.class); - - s_registeredClasses.put(I_M_PackageMPS.Table_ID, WCreateFromPackageShipmentUI.class); - } - - /** - * Factory - called from APanel - * @param mTab Model Tab for the trx - * @return JDialog - */ public static ICreateFrom create (GridTab mTab) { - // dynamic init preparation - int AD_Table_ID = Env.getContextAsInt(Env.getCtx(), mTab.getWindowNo(), mTab.getTabNo(), "_TabInfo_AD_Table_ID"); - - ICreateFrom retValue = null; - Class cl = s_registeredClasses.get(AD_Table_ID); - if (cl != null) + ICreateFrom createFrom = null; + List factories = Service.locator().list(ICreateFromFactory.class).getServices(); + for (ICreateFromFactory factory : factories) { - try - { - java.lang.reflect.Constructor ctor = cl.getConstructor(GridTab.class); - retValue = ctor.newInstance(mTab); - } - catch (Throwable e) - { - s_log.log(Level.SEVERE, e.getLocalizedMessage(), e); - return null; - } + createFrom = factory.create(mTab); + if (createFrom != null) + break; } - if (retValue == null) - { - AD_Table_ID = Env.getContextAsInt(Env.getCtx(), mTab.getWindowNo(), "BaseTable_ID"); - - retValue = null; - cl = s_registeredClasses.get(AD_Table_ID); - if (cl != null) - { - try - { - java.lang.reflect.Constructor ctor = cl.getConstructor(GridTab.class); - retValue = ctor.newInstance(mTab); - } - catch (Throwable e) - { - s_log.log(Level.SEVERE, e.getLocalizedMessage(), e); - return null; - } - } - - s_log.info("Unsupported AD_Table_ID=" + AD_Table_ID); - return null; - } - return retValue; - } // create + return createFrom; + } } diff --git a/org.adempiere.ui.zk/build.properties b/org.adempiere.ui.zk/build.properties index 3d0f449a43..d9633f002f 100644 --- a/org.adempiere.ui.zk/build.properties +++ b/org.adempiere.ui.zk/build.properties @@ -1,51 +1,52 @@ -output.. = WEB-INF/classes/ -bin.includes = META-INF/,\ - WEB-INF/,\ - css/,\ - images/,\ - index.zul,\ - js/,\ - theme/,\ - theme.zs,\ - zul/,\ - timeout.zul,\ - plugin.xml,\ - WEB-INF/classes/,\ - calendar.css,\ - calendar.zul,\ - calendar_mini.zul,\ - divarrow.zul,\ - divtab.zul,\ - OSGI-INF/,\ - OSGI-INF/reportviewerprovider.xml,\ - OSGI-INF/defaultinfofactory.xml,\ - OSGI-INF/defaulteditorfactory.xml,\ - OSGI-INF/jrviewerprovider.xml,\ - OSGI-INF/resourcefinder.xml,\ - OSGI-INF/defaultpaymentformfactory.xml,\ - OSGI-INF/processfactory.xml,\ - OSGI-INF/defaultprintshippinglabel.xml,\ - WEB-INF/lib/atmosphere-compat-jbossweb-1.0.4.jar,\ - WEB-INF/lib/atmosphere-compat-tomcat-1.0.4.jar,\ - WEB-INF/lib/atmosphere-compat-tomcat7-1.0.4.jar,\ - WEB-INF/lib/atmosphere-runtime-1.0.4.jar -src.includes = WEB-INF/classes/,\ - WEB-INF/tld/,\ - WEB-INF/web.xml,\ - WEB-INF/xsd/,\ - WEB-INF/zk.xml,\ - css/,\ - images/,\ - index.zul,\ - js/,\ - theme/,\ - theme.zs,\ - zul/,\ - calendar.css,\ - calendar.zul,\ - calendar_mini.zul,\ - divarrow.zul,\ - divtab.zul -source.. = WEB-INF/src/ -bin.excludes = WEB-INF/src/,\ - WEB-INF/web-2.5.xml +output.. = WEB-INF/classes/ +bin.includes = META-INF/,\ + WEB-INF/,\ + css/,\ + images/,\ + index.zul,\ + js/,\ + theme/,\ + theme.zs,\ + zul/,\ + timeout.zul,\ + plugin.xml,\ + WEB-INF/classes/,\ + calendar.css,\ + calendar.zul,\ + calendar_mini.zul,\ + divarrow.zul,\ + divtab.zul,\ + OSGI-INF/,\ + OSGI-INF/reportviewerprovider.xml,\ + OSGI-INF/defaultinfofactory.xml,\ + OSGI-INF/defaulteditorfactory.xml,\ + OSGI-INF/jrviewerprovider.xml,\ + OSGI-INF/resourcefinder.xml,\ + OSGI-INF/defaultpaymentformfactory.xml,\ + OSGI-INF/processfactory.xml,\ + OSGI-INF/defaultprintshippinglabel.xml,\ + WEB-INF/lib/atmosphere-compat-jbossweb-1.0.4.jar,\ + WEB-INF/lib/atmosphere-compat-tomcat-1.0.4.jar,\ + WEB-INF/lib/atmosphere-compat-tomcat7-1.0.4.jar,\ + WEB-INF/lib/atmosphere-runtime-1.0.4.jar,\ + OSGI-INF/defaultcreatefromfactory.xml +src.includes = WEB-INF/classes/,\ + WEB-INF/tld/,\ + WEB-INF/web.xml,\ + WEB-INF/xsd/,\ + WEB-INF/zk.xml,\ + css/,\ + images/,\ + index.zul,\ + js/,\ + theme/,\ + theme.zs,\ + zul/,\ + calendar.css,\ + calendar.zul,\ + calendar_mini.zul,\ + divarrow.zul,\ + divtab.zul +source.. = WEB-INF/src/ +bin.excludes = WEB-INF/src/,\ + WEB-INF/web-2.5.xml diff --git a/org.adempiere.ui/src/org/compiere/grid/ICreateFromFactory.java b/org.adempiere.ui/src/org/compiere/grid/ICreateFromFactory.java new file mode 100644 index 0000000000..28796205e7 --- /dev/null +++ b/org.adempiere.ui/src/org/compiere/grid/ICreateFromFactory.java @@ -0,0 +1,27 @@ +/****************************************************************************** + * Copyright (C) 2013 Elaine Tan * + * Copyright (C) 2013 Trek Global + * 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.grid; + +import org.compiere.model.GridTab; + +/** + * + * @author Elaine + * + */ +public interface ICreateFromFactory { + + public ICreateFrom create(GridTab mTab); + +} From 5448d70f3fee2b25317b640ca09232dcb2e197aa Mon Sep 17 00:00:00 2001 From: Elaine Tan Date: Fri, 18 Jan 2013 19:16:40 +0800 Subject: [PATCH 2/3] Ticket #1001770: RMA improvements - support optional shipment/receipt line in rma line and rma tax. --- .../oracle/201301181905_TICKET-1001770.sql | 917 ++++++++++++++++++ .../201301181905_TICKET-1001770.sql | 917 ++++++++++++++++++ .../adempiere/process/InOutGenerateRMA.java | 20 +- .../adempiere/process/InvoiceGenerateRMA.java | 2 +- .../src/org/compiere/model/I_M_RMALine.java | 15 + .../src/org/compiere/model/I_M_RMATax.java | 200 ++++ .../src/org/compiere/model/MRMA.java | 130 ++- .../src/org/compiere/model/MRMALine.java | 156 ++- .../src/org/compiere/model/MRMATax.java | 273 ++++++ .../src/org/compiere/model/X_M_RMALine.java | 31 +- .../src/org/compiere/model/X_M_RMATax.java | 236 +++++ 11 files changed, 2854 insertions(+), 43 deletions(-) create mode 100644 migration/i1.0a-release/oracle/201301181905_TICKET-1001770.sql create mode 100644 migration/i1.0a-release/postgresql/201301181905_TICKET-1001770.sql create mode 100644 org.adempiere.base/src/org/compiere/model/I_M_RMATax.java create mode 100644 org.adempiere.base/src/org/compiere/model/MRMATax.java create mode 100644 org.adempiere.base/src/org/compiere/model/X_M_RMATax.java diff --git a/migration/i1.0a-release/oracle/201301181905_TICKET-1001770.sql b/migration/i1.0a-release/oracle/201301181905_TICKET-1001770.sql new file mode 100644 index 0000000000..a5097cc646 --- /dev/null +++ b/migration/i1.0a-release/oracle/201301181905_TICKET-1001770.sql @@ -0,0 +1,917 @@ +-- Jan 18, 2013 4:52:01 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Column (Version,IsSyncDatabase,IsEncrypted,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID,SeqNoSelection,IsToolbarButton,IsAlwaysUpdateable) VALUES (0,'N','N',660,208382,'D','N','N','N',0,'N',10,'N',19,'N',213,'N','Y','08e6d70e-0e85-418b-85b8-d662b950e701','Y','C_Tax_ID','Tax identifier','The Tax indicates the type of tax used in document line.','Tax','Y',100,TO_DATE('2013-01-18 16:51:59','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_DATE('2013-01-18 16:51:59','YYYY-MM-DD HH24:MI:SS'),100,0,0,'N','N') +; + +-- Jan 18, 2013 4:52:01 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) 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,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=208382 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) +; + +-- Jan 18, 2013 4:52:06 PM SGT +-- Ticket 1001770: RMA improvements +ALTER TABLE M_RMALine ADD C_Tax_ID NUMBER(10) DEFAULT NULL +; + +UPDATE M_RMALine rl SET C_Tax_ID = ( +SELECT CASE WHEN il.C_Tax_ID IS NOT NULL THEN il.C_Tax_ID ELSE ol.C_Tax_ID END +FROM M_InOutLine iol +LEFT JOIN C_InvoiceLine il ON iol.M_InOutLine_ID = il.M_InOutLine_ID +LEFT JOIN C_OrderLine ol ON iol.C_OrderLine_ID = ol.C_OrderLine_ID +WHERE rl.M_InOutLine_ID = iol.M_InOutLine_ID +) +WHERE rl.M_InOutLine_ID IS NOT NULL; + +UPDATE M_RMALine rl SET C_Tax_ID = ( +SELECT t.C_Tax_ID +FROM C_Tax t +WHERE t.AD_Client_ID=rl.AD_Client_ID +AND t.IsActive = 'Y' +AND t.IsTaxExempt = 'Y' +AND t.ValidFrom < getdate() ORDER BY IsDefault DESC) +WHERE rl.M_InOutLine_ID IS NULL;-- Jan 18, 2013 4:59:37 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Column SET IsMandatory='Y',Updated=TO_DATE('2013-01-18 16:59:37','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=208382 +; + +-- Jan 18, 2013 4:59:39 PM SGT +-- Ticket 1001770: RMA improvements +ALTER TABLE M_RMALine MODIFY C_Tax_ID NUMBER(10) +; + +-- Jan 18, 2013 4:59:39 PM SGT +-- Ticket 1001770: RMA improvements +ALTER TABLE M_RMALine MODIFY C_Tax_ID NOT NULL +; + +-- Jan 18, 2013 5:00:31 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Table (IsSecurityEnabled,AccessLevel,LoadSeq,AD_Window_ID,AD_Table_ID,IsHighVolume,IsView,IsChangeLog,EntityType,ReplicationType,AD_Table_UU,IsCentrallyMaintained,IsDeleteable,TableName,Description,PO_Window_ID,Name,AD_Client_ID,IsActive,AD_Org_ID,Updated,CreatedBy,UpdatedBy,Created) VALUES ('N','1',145,320,200055,'N','N','N','D','L','298e09ea-6dbc-4ecb-bc34-d98739b4347f','Y','Y','M_RMATax','Return Material Authorization Tax',53099,'RMA Tax',0,'Y',0,TO_DATE('2013-01-18 17:00:30','YYYY-MM-DD HH24:MI:SS'),100,100,TO_DATE('2013-01-18 17:00:30','YYYY-MM-DD HH24:MI:SS')) +; + +-- Jan 18, 2013 5:00:31 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Table_Trl (AD_Language,AD_Table_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Table_Trl_UU ) 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,Generate_UUID() FROM AD_Language l, AD_Table t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Table_ID=200055 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) +; + +-- Jan 18, 2013 5:00:33 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Sequence (UpdatedBy,StartNewYear,CurrentNextSys,IsTableID,CurrentNext,IsAudited,IsAutoSequence,AD_Sequence_ID,AD_Sequence_UU,Description,Name,IncrementNo,AD_Org_ID,AD_Client_ID,Created,CreatedBy,Updated,IsActive,StartNo) VALUES (100,'N',200000,'Y',1000000,'N','Y',200050,'da791086-8393-4349-a410-be079d3153d8','Table M_RMATax','M_RMATax',1,0,0,TO_DATE('2013-01-18 17:00:32','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2013-01-18 17:00:32','YYYY-MM-DD HH24:MI:SS'),'Y',1000000) +; + +-- Jan 18, 2013 5:00:41 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Column (Version,IsSyncDatabase,IsEncrypted,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,AD_Val_Rule_ID,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,DefaultValue,Help,Name,IsAllowCopy,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID,IsToolbarButton,IsAlwaysUpdateable) VALUES (1,'N','N',200055,208383,'D','Y','N','N','N',22,'N',19,129,'N',102,'N','Y','8595ba8a-1211-4ec6-b91d-7f46b76aeeed','N','AD_Client_ID','Client/Tenant for this installation.','@AD_Client_ID@','A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','Client','N',100,TO_DATE('2013-01-18 17:00:40','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_DATE('2013-01-18 17:00:40','YYYY-MM-DD HH24:MI:SS'),100,0,'N','N') +; + +-- Jan 18, 2013 5:00:41 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) 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,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=208383 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) +; + +-- Jan 18, 2013 5:00:42 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Column (Version,IsSyncDatabase,IsEncrypted,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,AD_Val_Rule_ID,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,DefaultValue,Help,Name,IsAllowCopy,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID,IsToolbarButton,IsAlwaysUpdateable) VALUES (1,'N','N',200055,208384,'D','Y','N','N','N',22,'N',19,130,'N',113,'N','Y','3fe85743-f55a-4750-8650-56507cd41f48','N','AD_Org_ID','Organizational entity within client','@AD_Org_ID@','An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','Organization','N',100,TO_DATE('2013-01-18 17:00:41','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_DATE('2013-01-18 17:00:41','YYYY-MM-DD HH24:MI:SS'),100,0,'N','N') +; + +-- Jan 18, 2013 5:00:42 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) 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,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=208384 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) +; + +-- Jan 18, 2013 5:00:43 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Column (Version,IsSyncDatabase,IsEncrypted,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID,IsToolbarButton,IsAlwaysUpdateable) VALUES (1,'N','N',200055,208385,'D','Y','N','N','Y',22,'N',30,'N',558,'N','Y','bf483ef9-6d1c-495c-9ae9-e117a31b3f27','N','C_Order_ID','Order','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.','Order','Y',100,TO_DATE('2013-01-18 17:00:42','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_DATE('2013-01-18 17:00:42','YYYY-MM-DD HH24:MI:SS'),100,0,'N','N') +; + +-- Jan 18, 2013 5:00:43 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) 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,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=208385 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) +; + +-- Jan 18, 2013 5:00:44 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Element (ColumnName,AD_Element_ID,EntityType,Name,PrintName,AD_Element_UU,AD_Client_ID,Created,Updated,AD_Org_ID,CreatedBy,UpdatedBy,IsActive) VALUES ('M_RMATax_UU',202194,'D','M_RMATax_UU','M_RMATax_UU','de6a4308-2c53-426a-ad7a-def5ee38fb87',0,TO_DATE('2013-01-18 17:00:43','YYYY-MM-DD HH24:MI:SS'),TO_DATE('2013-01-18 17:00:43','YYYY-MM-DD HH24:MI:SS'),0,100,100,'Y') +; + +-- Jan 18, 2013 5:00:44 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Help,PO_Description,PO_Help,Description,Name,PrintName,PO_Name,PO_PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Element_Trl_UU ) SELECT l.AD_Language,t.AD_Element_ID, t.Help,t.PO_Description,t.PO_Help,t.Description,t.Name,t.PrintName,t.PO_Name,t.PO_PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=202194 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) +; + +-- Jan 18, 2013 5:00:45 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Column (Version,IsSyncDatabase,IsEncrypted,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Name,IsAllowCopy,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID,IsToolbarButton,IsAlwaysUpdateable) VALUES (1.00,'N','N',200055,208386,'D','N','N','N','N',36,'N',10,'N',202194,'N','Y','527a6a3d-b00d-4ac0-af6b-cc5c3dffd81c','Y','M_RMATax_UU','M_RMATax_UU','N',100,TO_DATE('2013-01-18 17:00:43','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_DATE('2013-01-18 17:00:43','YYYY-MM-DD HH24:MI:SS'),100,0,'N','N') +; + +-- Jan 18, 2013 5:00:45 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) 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,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=208386 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) +; + +-- Jan 18, 2013 5:00:46 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Column (Version,IsSyncDatabase,IsEncrypted,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID,IsToolbarButton,IsAlwaysUpdateable) VALUES (1,'N','N',200055,208387,'D','Y','N','N','Y',22,'N',19,'N',213,'N','Y','718e0bcb-d693-4aae-af32-9d25e333fa4c','N','C_Tax_ID','Tax identifier','The Tax indicates the type of tax used in document line.','Tax','Y',100,TO_DATE('2013-01-18 17:00:45','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_DATE('2013-01-18 17:00:45','YYYY-MM-DD HH24:MI:SS'),100,0,'N','N') +; + +-- Jan 18, 2013 5:00:46 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) 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,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=208387 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) +; + +-- Jan 18, 2013 5:00:46 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Column (Version,IsSyncDatabase,IsEncrypted,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID,IsToolbarButton,IsAlwaysUpdateable) VALUES (1,'N','N',200055,208388,'D','Y','N','N','N',7,'N',16,'N',245,'N','Y','a690c1bd-01d6-4d33-8816-550592918a76','N','Created','Date this record was created','The Created field indicates the date that this record was created.','Created','N',100,TO_DATE('2013-01-18 17:00:46','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_DATE('2013-01-18 17:00:46','YYYY-MM-DD HH24:MI:SS'),100,0,'N','N') +; + +-- Jan 18, 2013 5:00:47 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) 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,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=208388 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) +; + +-- Jan 18, 2013 5:00:47 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Column (Version,IsSyncDatabase,IsEncrypted,AD_Table_ID,AD_Column_ID,EntityType,AD_Reference_Value_ID,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID,IsToolbarButton,IsAlwaysUpdateable) VALUES (1,'N','N',200055,208389,'D',110,'Y','N','N','N',22,'N',18,'N',246,'N','Y','6d732e19-2310-48b5-882a-85d8d424a4cd','N','CreatedBy','User who created this records','The Created By field indicates the user who created this record.','Created By','N',100,TO_DATE('2013-01-18 17:00:47','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_DATE('2013-01-18 17:00:47','YYYY-MM-DD HH24:MI:SS'),100,0,'N','N') +; + +-- Jan 18, 2013 5:00:47 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) 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,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=208389 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) +; + +-- Jan 18, 2013 5:00:48 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Column (Version,IsSyncDatabase,IsEncrypted,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,DefaultValue,Help,Name,IsAllowCopy,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID,IsToolbarButton,IsAlwaysUpdateable) VALUES (1,'N','N',200055,208390,'D','Y','N','N','N',1,'N',20,'N',348,'N','Y','c8793533-f511-4700-8402-159ec00a0fde','Y','IsActive','The record is active in the system','Y','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.','Active','N',100,TO_DATE('2013-01-18 17:00:47','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_DATE('2013-01-18 17:00:47','YYYY-MM-DD HH24:MI:SS'),100,0,'N','N') +; + +-- Jan 18, 2013 5:00:48 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) 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,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=208390 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) +; + +-- Jan 18, 2013 5:00:49 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Column (Version,IsSyncDatabase,IsEncrypted,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID,IsToolbarButton,IsAlwaysUpdateable) VALUES (1,'N','N',200055,208391,'D','Y','N','N',0,'N',1,'N',20,'N',1065,'N','Y','182bd9c5-2dc1-4456-818c-fcb199e0cd8d','Y','IsTaxIncluded','Tax is included in the price ','The Tax Included checkbox indicates if the prices include tax. This is also known as the gross price.','Price includes Tax','Y',100,TO_DATE('2013-01-18 17:00:48','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_DATE('2013-01-18 17:00:48','YYYY-MM-DD HH24:MI:SS'),100,0,'N','N') +; + +-- Jan 18, 2013 5:00:49 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) 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,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=208391 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) +; + +-- Jan 18, 2013 5:00:50 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Column (Version,IsSyncDatabase,IsEncrypted,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID,IsToolbarButton,IsAlwaysUpdateable) VALUES (1,'N','N',200055,208392,'D','Y','N','N',0,'N',1,'N',20,'N',1047,'N','Y','ddfe564a-9085-4193-98cb-dbbb19f129d3','Y','Processed','The document has been processed','The Processed checkbox indicates that a document has been processed.','Processed','Y',100,TO_DATE('2013-01-18 17:00:49','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_DATE('2013-01-18 17:00:49','YYYY-MM-DD HH24:MI:SS'),100,0,'N','N') +; + +-- Jan 18, 2013 5:00:50 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) 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,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=208392 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) +; + +-- Jan 18, 2013 5:00:51 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Column (Version,IsSyncDatabase,IsEncrypted,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID,IsToolbarButton,IsAlwaysUpdateable) VALUES (1,'N','N',200055,208393,'D','Y','N','N','N',22,'N',12,'N',1133,'N','Y','fc895533-0ea5-4f9f-bd7a-2e8fd69bbb42','N','TaxAmt','Tax Amount for a document','The Tax Amount displays the total tax amount for a document.','Tax Amount','Y',100,TO_DATE('2013-01-18 17:00:50','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_DATE('2013-01-18 17:00:50','YYYY-MM-DD HH24:MI:SS'),100,0,'N','N') +; + +-- Jan 18, 2013 5:00:51 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) 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,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=208393 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) +; + +-- Jan 18, 2013 5:00:51 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Column (Version,IsSyncDatabase,IsEncrypted,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID,IsToolbarButton,IsAlwaysUpdateable) VALUES (1,'N','N',200055,208394,'D','Y','N','N','N',22,'N',12,'N',1134,'N','Y','efc186f9-ba73-4711-a499-16fda1cfbf2b','N','TaxBaseAmt','Base for calculating the tax amount','The Tax Base Amount indicates the base amount used for calculating the tax amount.','Tax base Amount','Y',100,TO_DATE('2013-01-18 17:00:51','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_DATE('2013-01-18 17:00:51','YYYY-MM-DD HH24:MI:SS'),100,0,'N','N') +; + +-- Jan 18, 2013 5:00:51 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) 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,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=208394 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) +; + +-- Jan 18, 2013 5:00:52 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Column (Version,IsSyncDatabase,IsEncrypted,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID,IsToolbarButton,IsAlwaysUpdateable) VALUES (1,'N','N',200055,208395,'D','Y','N','N','N',7,'N',16,'N',607,'N','Y','b9b679d0-113d-4e70-b241-13424b9bed41','N','Updated','Date this record was updated','The Updated field indicates the date that this record was updated.','Updated','N',100,TO_DATE('2013-01-18 17:00:51','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_DATE('2013-01-18 17:00:51','YYYY-MM-DD HH24:MI:SS'),100,0,'N','N') +; + +-- Jan 18, 2013 5:00:52 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) 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,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=208395 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) +; + +-- Jan 18, 2013 5:00:53 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Column (Version,IsSyncDatabase,IsEncrypted,AD_Table_ID,AD_Column_ID,EntityType,AD_Reference_Value_ID,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID,IsToolbarButton,IsAlwaysUpdateable) VALUES (1,'N','N',200055,208396,'D',110,'Y','N','N','N',22,'N',18,'N',608,'N','Y','02658f9d-f73a-4de2-be47-bb26d0f76a3e','N','UpdatedBy','User who updated this records','The Updated By field indicates the user who updated this record.','Updated By','N',100,TO_DATE('2013-01-18 17:00:52','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_DATE('2013-01-18 17:00:52','YYYY-MM-DD HH24:MI:SS'),100,0,'N','N') +; + +-- Jan 18, 2013 5:00:53 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) 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,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=208396 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) +; + +-- Jan 18, 2013 5:01:26 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Column SET AD_Element_ID=2412, IsUpdateable='N', ColumnName='M_RMA_ID', Description='Return Material Authorization', Help='A Return Material Authorization may be required to accept returns and to create Credit Memos', Name='RMA',Updated=TO_DATE('2013-01-18 17:01:26','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=208385 +; + +-- Jan 18, 2013 5:01:26 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Column_Trl SET IsTranslated='N' WHERE AD_Column_ID=208385 +; + +-- Jan 18, 2013 5:01:26 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET Name='RMA', Description='Return Material Authorization', Help='A Return Material Authorization may be required to accept returns and to create Credit Memos' WHERE AD_Column_ID=208385 AND IsCentrallyMaintained='Y' +; + +-- Jan 18, 2013 5:02:07 PM SGT +-- Ticket 1001770: RMA improvements +CREATE TABLE M_RMATax (AD_Client_ID NUMBER(10) NOT NULL, AD_Org_ID NUMBER(10) NOT NULL, C_Tax_ID NUMBER(10) NOT NULL, Created DATE NOT NULL, CreatedBy NUMBER(10) NOT NULL, IsActive CHAR(1) DEFAULT 'Y' CHECK (IsActive IN ('Y','N')) NOT NULL, IsTaxIncluded CHAR(1) CHECK (IsTaxIncluded IN ('Y','N')) NOT NULL, M_RMA_ID NUMBER(10) NOT NULL, M_RMATax_UU NVARCHAR2(36) DEFAULT NULL , Processed CHAR(1) CHECK (Processed IN ('Y','N')) NOT NULL, TaxAmt NUMBER NOT NULL, TaxBaseAmt NUMBER NOT NULL, Updated DATE NOT NULL, UpdatedBy NUMBER(10) NOT NULL, CONSTRAINT M_RMATax_Key PRIMARY KEY (C_Tax_ID, M_RMA_ID)) +; + +-- Jan 18, 2013 5:02:56 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,EntityType,Name,IsFieldOnly,IsDisplayed,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',629,36,'N','N',60949,'Y',201660,'N','D','M_RMALine_UU','N','Y','a262b6b1-c890-4c85-a974-4af6b28f2f15',100,0,TO_DATE('2013-01-18 17:02:55','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2013-01-18 17:02:55','YYYY-MM-DD HH24:MI:SS'),'Y') +; + +-- Jan 18, 2013 5:02:56 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=201660 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) +; + +-- Jan 18, 2013 5:02:57 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,IsFieldOnly,IsDisplayed,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',629,22,'N','N',57792,'Y',201661,'N','The Invoiced Quantity indicates the quantity of a product that have been invoiced.','D','Invoiced Quantity','Quantity Invoiced','N','Y','25f4b674-b6ac-4b55-8bb6-d4f6c4ef207b',100,0,TO_DATE('2013-01-18 17:02:56','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2013-01-18 17:02:56','YYYY-MM-DD HH24:MI:SS'),'Y') +; + +-- Jan 18, 2013 5:02:57 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=201661 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) +; + +-- Jan 18, 2013 5:02:57 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,EntityType,Name,IsFieldOnly,IsDisplayed,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',629,22,'N','N',57791,'Y',201662,'N','D','Referenced RMA Line','N','Y','671f0cdf-975c-438e-9904-3ba0034e45e8',100,0,TO_DATE('2013-01-18 17:02:57','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2013-01-18 17:02:57','YYYY-MM-DD HH24:MI:SS'),'Y') +; + +-- Jan 18, 2013 5:02:57 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=201662 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) +; + +-- Jan 18, 2013 5:02:58 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,IsFieldOnly,IsDisplayed,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',629,10,'N','N',208382,'Y',201663,'N','The Tax indicates the type of tax used in document line.','D','Tax identifier','Tax','N','Y','085358dd-5812-430f-9efe-9b73dec92b6d',100,0,TO_DATE('2013-01-18 17:02:58','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2013-01-18 17:02:58','YYYY-MM-DD HH24:MI:SS'),'Y') +; + +-- Jan 18, 2013 5:02:58 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=201663 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) +; + +-- Jan 18, 2013 5:03:31 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNo=0,IsDisplayed='N' WHERE AD_Field_ID=201660 +; + +-- Jan 18, 2013 5:03:31 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNo=0,IsDisplayed='N' WHERE AD_Field_ID=201661 +; + +-- Jan 18, 2013 5:03:31 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNo=0,IsDisplayed='N' WHERE AD_Field_ID=201662 +; + +-- Jan 18, 2013 5:03:31 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNo=110,IsDisplayed='Y' WHERE AD_Field_ID=201663 +; + +-- Jan 18, 2013 5:03:31 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNo=120,IsDisplayed='Y' WHERE AD_Field_ID=52004 +; + +-- Jan 18, 2013 5:03:37 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=9317 +; + +-- Jan 18, 2013 5:03:37 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=201660 +; + +-- Jan 18, 2013 5:03:37 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=201661 +; + +-- Jan 18, 2013 5:03:37 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=201662 +; + +-- Jan 18, 2013 5:03:37 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNoGrid=10,IsDisplayedGrid='Y' WHERE AD_Field_ID=9311 +; + +-- Jan 18, 2013 5:03:37 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNoGrid=20,IsDisplayedGrid='Y' WHERE AD_Field_ID=9314 +; + +-- Jan 18, 2013 5:03:37 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNoGrid=30,IsDisplayedGrid='Y' WHERE AD_Field_ID=52005 +; + +-- Jan 18, 2013 5:03:37 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNoGrid=40,IsDisplayedGrid='Y' WHERE AD_Field_ID=9315 +; + +-- Jan 18, 2013 5:03:37 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNoGrid=50,IsDisplayedGrid='Y' WHERE AD_Field_ID=9310 +; + +-- Jan 18, 2013 5:03:37 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNoGrid=60,IsDisplayedGrid='Y' WHERE AD_Field_ID=9312 +; + +-- Jan 18, 2013 5:03:37 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNoGrid=70,IsDisplayedGrid='Y' WHERE AD_Field_ID=52002 +; + +-- Jan 18, 2013 5:03:37 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNoGrid=80,IsDisplayedGrid='Y' WHERE AD_Field_ID=9316 +; + +-- Jan 18, 2013 5:03:37 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNoGrid=90,IsDisplayedGrid='Y' WHERE AD_Field_ID=52001 +; + +-- Jan 18, 2013 5:03:37 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNoGrid=100,IsDisplayedGrid='Y' WHERE AD_Field_ID=201663 +; + +-- Jan 18, 2013 5:04:27 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET ColumnSpan=2,Updated=TO_DATE('2013-01-18 17:04:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201663 +; + +-- Jan 18, 2013 5:05:24 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Tab (ImportFields,Processing,IsSingleRow,AD_Window_ID,SeqNo,Help,IsTranslationTab,IsSortTab,AD_Table_ID,HasTree,IsReadOnly,IsInfoTab,AD_Column_ID,AD_Tab_UU,IsInsertRecord,IsAdvancedTab,TabLevel,EntityType,Name,Description,AD_Tab_ID,AD_Client_ID,Updated,AD_Org_ID,Created,CreatedBy,UpdatedBy,IsActive) VALUES ('N','N','N',320,30,'The RMA Tax Tab displays the tax amount for a RMA based on the lines entered.','N','N',200055,'N','Y','N',208385,'c6a404bb-f31a-42e7-aaa4-e4ef95043b24','N','N',1,'D','RMA Tax','RMA Tax',200065,0,TO_DATE('2013-01-18 17:05:23','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2013-01-18 17:05:23','YYYY-MM-DD HH24:MI:SS'),100,100,'Y') +; + +-- Jan 18, 2013 5:05:24 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Tab_Trl (AD_Language,AD_Tab_ID, Help,CommitWarning,Name,Description, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Tab_Trl_UU ) SELECT l.AD_Language,t.AD_Tab_ID, t.Help,t.CommitWarning,t.Name,t.Description, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Tab t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Tab_ID=200065 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) +; + +-- Jan 18, 2013 5:05:26 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,IsFieldOnly,IsDisplayed,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',200065,1,'N','N',208390,'Y',201664,'N','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.','D','The record is active in the system','Active','N','Y','c9d4c511-2c45-423b-ac4c-6f3a08097b62',100,0,TO_DATE('2013-01-18 17:05:25','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2013-01-18 17:05:25','YYYY-MM-DD HH24:MI:SS'),'Y') +; + +-- Jan 18, 2013 5:05:26 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=201664 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) +; + +-- Jan 18, 2013 5:05:27 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,IsFieldOnly,IsDisplayed,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',200065,22,'N','N',208383,'Y',201665,'N','A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','D','Client/Tenant for this installation.','Client','N','Y','2cdc5aa8-aae8-46f3-8238-cf165292732f',100,0,TO_DATE('2013-01-18 17:05:26','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2013-01-18 17:05:26','YYYY-MM-DD HH24:MI:SS'),'Y') +; + +-- Jan 18, 2013 5:05:27 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=201665 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) +; + +-- Jan 18, 2013 5:05:28 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,EntityType,Name,IsFieldOnly,IsDisplayed,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',200065,36,'N','N',208386,'Y',201666,'N','D','M_RMATax_UU','N','Y','301a7e21-5aaf-48c6-a517-d16742f9f94c',100,0,TO_DATE('2013-01-18 17:05:27','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2013-01-18 17:05:27','YYYY-MM-DD HH24:MI:SS'),'Y') +; + +-- Jan 18, 2013 5:05:28 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=201666 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) +; + +-- Jan 18, 2013 5:05:29 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,IsFieldOnly,IsDisplayed,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',200065,22,'N','N',208384,'Y',201667,'N','An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','D','Organizational entity within client','Organization','N','Y','eb8268c4-b965-45d6-b27f-b198c050b8eb',100,0,TO_DATE('2013-01-18 17:05:28','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2013-01-18 17:05:28','YYYY-MM-DD HH24:MI:SS'),'Y') +; + +-- Jan 18, 2013 5:05:29 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=201667 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) +; + +-- Jan 18, 2013 5:05:30 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,IsFieldOnly,IsDisplayed,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',200065,1,'N','N',208391,'Y',201668,'N','The Tax Included checkbox indicates if the prices include tax. This is also known as the gross price.','D','Tax is included in the price ','Price includes Tax','N','Y','9e82ee49-a5df-4a92-99c0-1ae992da860a',100,0,TO_DATE('2013-01-18 17:05:29','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2013-01-18 17:05:29','YYYY-MM-DD HH24:MI:SS'),'Y') +; + +-- Jan 18, 2013 5:05:30 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=201668 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) +; + +-- Jan 18, 2013 5:05:30 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,IsFieldOnly,IsDisplayed,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',200065,1,'N','N',208392,'Y',201669,'N','The Processed checkbox indicates that a document has been processed.','D','The document has been processed','Processed','N','Y','679b7f15-7f3c-40a4-876c-60da0f77c65d',100,0,TO_DATE('2013-01-18 17:05:30','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2013-01-18 17:05:30','YYYY-MM-DD HH24:MI:SS'),'Y') +; + +-- Jan 18, 2013 5:05:30 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=201669 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) +; + +-- Jan 18, 2013 5:05:31 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,IsFieldOnly,IsDisplayed,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',200065,22,'N','N',208385,'Y',201670,'N','A Return Material Authorization may be required to accept returns and to create Credit Memos','D','Return Material Authorization','RMA','N','Y','404d7b87-c65c-4b28-a257-b43e9d26e8d2',100,0,TO_DATE('2013-01-18 17:05:30','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2013-01-18 17:05:30','YYYY-MM-DD HH24:MI:SS'),'Y') +; + +-- Jan 18, 2013 5:05:31 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=201670 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) +; + +-- Jan 18, 2013 5:05:32 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,IsFieldOnly,IsDisplayed,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',200065,22,'N','N',208387,'Y',201671,'N','The Tax indicates the type of tax used in document line.','D','Tax identifier','Tax','N','Y','13d6c87b-bda6-4950-a6ae-3f316f2b65e7',100,0,TO_DATE('2013-01-18 17:05:31','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2013-01-18 17:05:31','YYYY-MM-DD HH24:MI:SS'),'Y') +; + +-- Jan 18, 2013 5:05:32 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=201671 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) +; + +-- Jan 18, 2013 5:05:33 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,IsFieldOnly,IsDisplayed,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',200065,22,'N','N',208393,'Y',201672,'N','The Tax Amount displays the total tax amount for a document.','D','Tax Amount for a document','Tax Amount','N','Y','09af15f0-fc73-4239-8a1b-ec31621c1aac',100,0,TO_DATE('2013-01-18 17:05:32','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2013-01-18 17:05:32','YYYY-MM-DD HH24:MI:SS'),'Y') +; + +-- Jan 18, 2013 5:05:33 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=201672 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) +; + +-- Jan 18, 2013 5:05:34 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,IsFieldOnly,IsDisplayed,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',200065,22,'N','N',208394,'Y',201673,'N','The Tax Base Amount indicates the base amount used for calculating the tax amount.','D','Base for calculating the tax amount','Tax base Amount','N','Y','a2ad8fee-bbab-4263-b667-f548e880dbfe',100,0,TO_DATE('2013-01-18 17:05:33','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2013-01-18 17:05:33','YYYY-MM-DD HH24:MI:SS'),'Y') +; + +-- Jan 18, 2013 5:05:34 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=201673 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) +; + +-- Jan 18, 2013 5:05:56 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNo=0,IsDisplayed='N' WHERE AD_Field_ID=201664 +; + +-- Jan 18, 2013 5:05:56 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNo=0,IsDisplayed='N' WHERE AD_Field_ID=201666 +; + +-- Jan 18, 2013 5:05:56 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNo=0,IsDisplayed='N' WHERE AD_Field_ID=201669 +; + +-- Jan 18, 2013 5:05:56 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNo=10,IsDisplayed='Y' WHERE AD_Field_ID=201665 +; + +-- Jan 18, 2013 5:05:56 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNo=20,IsDisplayed='Y' WHERE AD_Field_ID=201667 +; + +-- Jan 18, 2013 5:05:56 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNo=30,IsDisplayed='Y' WHERE AD_Field_ID=201670 +; + +-- Jan 18, 2013 5:05:56 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNo=40,IsDisplayed='Y' WHERE AD_Field_ID=201671 +; + +-- Jan 18, 2013 5:05:56 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNo=50,IsDisplayed='Y' WHERE AD_Field_ID=201672 +; + +-- Jan 18, 2013 5:05:56 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNo=60,IsDisplayed='Y' WHERE AD_Field_ID=201673 +; + +-- Jan 18, 2013 5:05:56 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNo=70,IsDisplayed='Y' WHERE AD_Field_ID=201668 +; + +-- Jan 18, 2013 5:06:14 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=201664 +; + +-- Jan 18, 2013 5:06:14 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=201665 +; + +-- Jan 18, 2013 5:06:14 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=201666 +; + +-- Jan 18, 2013 5:06:14 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=201669 +; + +-- Jan 18, 2013 5:06:14 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNoGrid=10,IsDisplayedGrid='Y' WHERE AD_Field_ID=201667 +; + +-- Jan 18, 2013 5:06:14 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNoGrid=20,IsDisplayedGrid='Y' WHERE AD_Field_ID=201670 +; + +-- Jan 18, 2013 5:06:14 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNoGrid=30,IsDisplayedGrid='Y' WHERE AD_Field_ID=201671 +; + +-- Jan 18, 2013 5:06:14 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNoGrid=40,IsDisplayedGrid='Y' WHERE AD_Field_ID=201672 +; + +-- Jan 18, 2013 5:06:14 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNoGrid=50,IsDisplayedGrid='Y' WHERE AD_Field_ID=201673 +; + +-- Jan 18, 2013 5:06:14 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNoGrid=60,IsDisplayedGrid='Y' WHERE AD_Field_ID=201668 +; + +-- Jan 18, 2013 5:06:42 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET IsReadOnly='Y',Updated=TO_DATE('2013-01-18 17:06:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201665 +; + +-- Jan 18, 2013 5:06:43 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET IsReadOnly='Y',Updated=TO_DATE('2013-01-18 17:06:43','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201670 +; + +-- Jan 18, 2013 5:06:44 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET IsReadOnly='Y',Updated=TO_DATE('2013-01-18 17:06:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201672 +; + +-- Jan 18, 2013 5:06:44 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET IsReadOnly='Y',Updated=TO_DATE('2013-01-18 17:06:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201673 +; + +-- Jan 18, 2013 5:07:04 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET IsReadOnly='Y',Updated=TO_DATE('2013-01-18 17:07:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201668 +; + +-- Jan 18, 2013 5:07:10 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET XPosition=4, ColumnSpan=2,Updated=TO_DATE('2013-01-18 17:07:10','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201673 +; + +-- Jan 18, 2013 5:07:11 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET XPosition=2, ColumnSpan=2,Updated=TO_DATE('2013-01-18 17:07:11','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201668 +; + +-- Jan 18, 2013 5:07:12 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET ColumnSpan=2,Updated=TO_DATE('2013-01-18 17:07:12','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201672 +; + +-- Jan 18, 2013 5:07:12 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET ColumnSpan=2,Updated=TO_DATE('2013-01-18 17:07:12','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201671 +; + +-- Jan 18, 2013 5:07:14 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET ColumnSpan=2,Updated=TO_DATE('2013-01-18 17:07:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201670 +; + +-- Jan 18, 2013 5:07:15 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET ColumnSpan=2,Updated=TO_DATE('2013-01-18 17:07:15','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201667 +; + +-- Jan 18, 2013 5:07:21 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET ColumnSpan=2,Updated=TO_DATE('2013-01-18 17:07:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201665 +; + +-- Jan 18, 2013 5:07:27 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET IsSameLine='Y',Updated=TO_DATE('2013-01-18 17:07:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201673 +; + +-- Jan 18, 2013 5:07:56 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,EntityType,Name,IsFieldOnly,IsDisplayed,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',53281,36,'N','N',60949,'Y',201674,'N','D','M_RMALine_UU','N','Y','e556a4d4-23fa-41de-8b67-f76dc9cbe7a1',100,0,TO_DATE('2013-01-18 17:07:55','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2013-01-18 17:07:55','YYYY-MM-DD HH24:MI:SS'),'Y') +; + +-- Jan 18, 2013 5:07:56 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=201674 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) +; + +-- Jan 18, 2013 5:07:57 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,IsFieldOnly,IsDisplayed,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',53281,22,'N','N',57792,'Y',201675,'N','The Invoiced Quantity indicates the quantity of a product that have been invoiced.','D','Invoiced Quantity','Quantity Invoiced','N','Y','aabdec36-722c-48b2-9d26-c0daad9b13ca',100,0,TO_DATE('2013-01-18 17:07:56','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2013-01-18 17:07:56','YYYY-MM-DD HH24:MI:SS'),'Y') +; + +-- Jan 18, 2013 5:07:57 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=201675 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) +; + +-- Jan 18, 2013 5:07:58 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,EntityType,Name,IsFieldOnly,IsDisplayed,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',53281,22,'N','N',57791,'Y',201676,'N','D','Referenced RMA Line','N','Y','a9dab917-43a2-4c3e-8304-ccb23fc936c0',100,0,TO_DATE('2013-01-18 17:07:57','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2013-01-18 17:07:57','YYYY-MM-DD HH24:MI:SS'),'Y') +; + +-- Jan 18, 2013 5:07:58 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=201676 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) +; + +-- Jan 18, 2013 5:07:58 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,IsFieldOnly,IsDisplayed,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',53281,10,'N','N',208382,'Y',201677,'N','The Tax indicates the type of tax used in document line.','D','Tax identifier','Tax','N','Y','ab1f4145-601c-47e0-aa8b-332c18696f87',100,0,TO_DATE('2013-01-18 17:07:58','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2013-01-18 17:07:58','YYYY-MM-DD HH24:MI:SS'),'Y') +; + +-- Jan 18, 2013 5:07:58 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=201677 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) +; + +-- Jan 18, 2013 5:08:09 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNo=0,IsDisplayed='N' WHERE AD_Field_ID=201674 +; + +-- Jan 18, 2013 5:08:09 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNo=0,IsDisplayed='N' WHERE AD_Field_ID=201675 +; + +-- Jan 18, 2013 5:08:09 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNo=0,IsDisplayed='N' WHERE AD_Field_ID=201676 +; + +-- Jan 18, 2013 5:08:09 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNo=110,IsDisplayed='Y' WHERE AD_Field_ID=201677 +; + +-- Jan 18, 2013 5:08:09 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNo=120,IsDisplayed='Y' WHERE AD_Field_ID=57980 +; + +-- Jan 18, 2013 5:08:17 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=57970 +; + +-- Jan 18, 2013 5:08:17 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=201674 +; + +-- Jan 18, 2013 5:08:17 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=201675 +; + +-- Jan 18, 2013 5:08:17 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=201676 +; + +-- Jan 18, 2013 5:08:17 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNoGrid=10,IsDisplayedGrid='Y' WHERE AD_Field_ID=57971 +; + +-- Jan 18, 2013 5:08:17 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNoGrid=20,IsDisplayedGrid='Y' WHERE AD_Field_ID=57972 +; + +-- Jan 18, 2013 5:08:17 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNoGrid=30,IsDisplayedGrid='Y' WHERE AD_Field_ID=57973 +; + +-- Jan 18, 2013 5:08:17 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNoGrid=40,IsDisplayedGrid='Y' WHERE AD_Field_ID=57974 +; + +-- Jan 18, 2013 5:08:17 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNoGrid=50,IsDisplayedGrid='Y' WHERE AD_Field_ID=57975 +; + +-- Jan 18, 2013 5:08:18 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNoGrid=60,IsDisplayedGrid='Y' WHERE AD_Field_ID=57976 +; + +-- Jan 18, 2013 5:08:18 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNoGrid=70,IsDisplayedGrid='Y' WHERE AD_Field_ID=57977 +; + +-- Jan 18, 2013 5:08:18 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNoGrid=80,IsDisplayedGrid='Y' WHERE AD_Field_ID=57978 +; + +-- Jan 18, 2013 5:08:18 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNoGrid=90,IsDisplayedGrid='Y' WHERE AD_Field_ID=57979 +; + +-- Jan 18, 2013 5:08:18 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNoGrid=100,IsDisplayedGrid='Y' WHERE AD_Field_ID=201677 +; + +-- Jan 18, 2013 5:08:42 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET ColumnSpan=2,Updated=TO_DATE('2013-01-18 17:08:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201677 +; + +-- Jan 18, 2013 5:08:47 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET DisplayLength=14,Updated=TO_DATE('2013-01-18 17:08:47','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201677 +; + +-- Jan 18, 2013 5:09:04 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET DisplayLength=14,Updated=TO_DATE('2013-01-18 17:09:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201663 +; + +-- Jan 18, 2013 5:10:08 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Tab (ImportFields,Processing,IsSingleRow,AD_Window_ID,SeqNo,Help,IsTranslationTab,IsSortTab,AD_Table_ID,HasTree,IsReadOnly,IsInfoTab,AD_Column_ID,AD_Tab_UU,IsInsertRecord,IsAdvancedTab,TabLevel,EntityType,Name,Description,AD_Tab_ID,AD_Client_ID,Updated,AD_Org_ID,Created,CreatedBy,UpdatedBy,IsActive) VALUES ('N','N','N',53099,30,'The RMA Tax Tab displays the tax associated with the RMA Lines.','N','N',200055,'N','Y','N',208385,'6ff733fc-e3cf-423d-887f-4c8b1eb91c97','N','N',1,'D','RMA Tax','RMA Tax',200066,0,TO_DATE('2013-01-18 17:10:07','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2013-01-18 17:10:07','YYYY-MM-DD HH24:MI:SS'),100,100,'Y') +; + +-- Jan 18, 2013 5:10:08 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Tab_Trl (AD_Language,AD_Tab_ID, Help,CommitWarning,Name,Description, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Tab_Trl_UU ) SELECT l.AD_Language,t.AD_Tab_ID, t.Help,t.CommitWarning,t.Name,t.Description, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Tab t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Tab_ID=200066 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) +; + +-- Jan 18, 2013 5:10:14 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field (NumLines,IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,IsFieldOnly,IsDisplayed,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan,IsQuickEntry) VALUES (1,'N',200066,1,'N','N',208390,0,'Y',201678,'N','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.','D','The record is active in the system','Active','N','N','7f6c0fa5-6d65-4f1d-9bf1-0dcc193e14ed',100,0,TO_DATE('2013-01-18 17:10:13','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2013-01-18 17:10:13','YYYY-MM-DD HH24:MI:SS'),'Y','N',0,1,1,'N') +; + +-- Jan 18, 2013 5:10:14 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=201678 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) +; + +-- Jan 18, 2013 5:10:15 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field (NumLines,IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,EntityType,Name,IsFieldOnly,IsDisplayed,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan,IsQuickEntry) VALUES (1,'N',200066,36,'N','N',208386,0,'Y',201679,'N','D','M_RMATax_UU','N','N','a75a3819-abde-43c3-b1b6-154929bc2e05',100,0,TO_DATE('2013-01-18 17:10:14','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2013-01-18 17:10:14','YYYY-MM-DD HH24:MI:SS'),'Y','N',0,1,1,'N') +; + +-- Jan 18, 2013 5:10:15 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=201679 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) +; + +-- Jan 18, 2013 5:10:15 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field (NumLines,IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,IsFieldOnly,IsDisplayed,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan,IsQuickEntry) VALUES (1,'N',200066,1,'N','N',208392,0,'Y',201680,'N','The Processed checkbox indicates that a document has been processed.','D','The document has been processed','Processed','N','N','a311c623-e1d4-44fb-9c20-3a003565f5ef',100,0,TO_DATE('2013-01-18 17:10:15','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2013-01-18 17:10:15','YYYY-MM-DD HH24:MI:SS'),'Y','N',0,1,1,'N') +; + +-- Jan 18, 2013 5:10:15 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=201680 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) +; + +-- Jan 18, 2013 5:10:16 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field (NumLines,IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,IsFieldOnly,IsDisplayed,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan,IsQuickEntry) VALUES (1,'N',200066,22,'N','N',208383,10,'Y',201681,'Y','A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','D','Client/Tenant for this installation.','Client','N','Y','0c1f846a-d0e9-4962-9fd7-fc8fe6edb8e8',100,0,TO_DATE('2013-01-18 17:10:15','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2013-01-18 17:10:15','YYYY-MM-DD HH24:MI:SS'),'Y','N',0,1,2,'N') +; + +-- Jan 18, 2013 5:10:16 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=201681 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) +; + +-- Jan 18, 2013 5:10:17 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field (NumLines,IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,IsFieldOnly,IsDisplayed,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan,IsQuickEntry) VALUES (1,'N',200066,22,'N','N',208384,20,'Y',201682,'N','An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','D','Organizational entity within client','Organization','N','Y','61509d7a-3fb5-4fd5-a8e7-33845bf47e25',100,0,TO_DATE('2013-01-18 17:10:16','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2013-01-18 17:10:16','YYYY-MM-DD HH24:MI:SS'),'Y','Y',10,1,2,'N') +; + +-- Jan 18, 2013 5:10:17 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=201682 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) +; + +-- Jan 18, 2013 5:10:19 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field (NumLines,IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,IsFieldOnly,IsDisplayed,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan,IsQuickEntry) VALUES (1,'N',200066,22,'N','N',208385,30,'Y',201683,'Y','A Return Material Authorization may be required to accept returns and to create Credit Memos','D','Return Material Authorization','RMA','N','Y','979dca3f-a651-4351-827b-f7c7a5c679a0',100,0,TO_DATE('2013-01-18 17:10:17','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2013-01-18 17:10:17','YYYY-MM-DD HH24:MI:SS'),'Y','Y',20,1,2,'N') +; + +-- Jan 18, 2013 5:10:19 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=201683 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) +; + +-- Jan 18, 2013 5:10:20 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field (NumLines,IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,IsFieldOnly,IsDisplayed,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan,IsQuickEntry) VALUES (1,'N',200066,22,'N','N',208387,40,'Y',201684,'N','The Tax indicates the type of tax used in document line.','D','Tax identifier','Tax','N','Y','4243ba57-783a-4681-aab8-dc1f8bec76cd',100,0,TO_DATE('2013-01-18 17:10:19','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2013-01-18 17:10:19','YYYY-MM-DD HH24:MI:SS'),'Y','Y',30,1,2,'N') +; + +-- Jan 18, 2013 5:10:20 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=201684 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) +; + +-- Jan 18, 2013 5:10:20 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field (NumLines,IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,IsFieldOnly,IsDisplayed,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan,IsQuickEntry) VALUES (1,'N',200066,22,'N','N',208393,50,'Y',201685,'Y','The Tax Amount displays the total tax amount for a document.','D','Tax Amount for a document','Tax Amount','N','Y','7808dd51-7112-4b63-810e-e70f5e915a07',100,0,TO_DATE('2013-01-18 17:10:20','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2013-01-18 17:10:20','YYYY-MM-DD HH24:MI:SS'),'Y','Y',40,1,2,'N') +; + +-- Jan 18, 2013 5:10:20 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=201685 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) +; + +-- Jan 18, 2013 5:10:21 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field (NumLines,IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,IsFieldOnly,IsDisplayed,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan,IsQuickEntry) VALUES (1,'N',200066,22,'Y','N',208394,60,'Y',201686,'Y','The Tax Base Amount indicates the base amount used for calculating the tax amount.','D','Base for calculating the tax amount','Tax base Amount','N','Y','a56c59af-1253-45e5-9875-5ffb89acfc42',100,0,TO_DATE('2013-01-18 17:10:20','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2013-01-18 17:10:20','YYYY-MM-DD HH24:MI:SS'),'Y','Y',50,4,2,'N') +; + +-- Jan 18, 2013 5:10:21 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=201686 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) +; + +-- Jan 18, 2013 5:10:22 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field (NumLines,IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,IsFieldOnly,IsDisplayed,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan,IsQuickEntry) VALUES (1,'N',200066,1,'N','N',208391,70,'Y',201687,'Y','The Tax Included checkbox indicates if the prices include tax. This is also known as the gross price.','D','Tax is included in the price ','Price includes Tax','N','Y','101855b4-d848-4e42-85e6-d93f7e001a41',100,0,TO_DATE('2013-01-18 17:10:21','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2013-01-18 17:10:21','YYYY-MM-DD HH24:MI:SS'),'Y','Y',60,2,2,'N') +; + +-- Jan 18, 2013 5:10:22 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=201687 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) +; + +SELECT register_migration_script('201301181905_TICKET-1001770.sql') FROM dual +; \ No newline at end of file diff --git a/migration/i1.0a-release/postgresql/201301181905_TICKET-1001770.sql b/migration/i1.0a-release/postgresql/201301181905_TICKET-1001770.sql new file mode 100644 index 0000000000..7e3413f885 --- /dev/null +++ b/migration/i1.0a-release/postgresql/201301181905_TICKET-1001770.sql @@ -0,0 +1,917 @@ +-- Jan 18, 2013 4:52:01 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Column (Version,IsSyncDatabase,IsEncrypted,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID,SeqNoSelection,IsToolbarButton,IsAlwaysUpdateable) VALUES (0,'N','N',660,208382,'D','N','N','N',0,'N',10,'N',19,'N',213,'N','Y','08e6d70e-0e85-418b-85b8-d662b950e701','Y','C_Tax_ID','Tax identifier','The Tax indicates the type of tax used in document line.','Tax','Y',100,TO_TIMESTAMP('2013-01-18 16:51:59','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_TIMESTAMP('2013-01-18 16:51:59','YYYY-MM-DD HH24:MI:SS'),100,0,0,'N','N') +; + +-- Jan 18, 2013 4:52:01 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) 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,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=208382 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) +; + +-- Jan 18, 2013 4:52:06 PM SGT +-- Ticket 1001770: RMA improvements +ALTER TABLE M_RMALine ADD COLUMN C_Tax_ID NUMERIC(10) DEFAULT NULL +; + +UPDATE M_RMALine rl SET C_Tax_ID = ( +SELECT CASE WHEN il.C_Tax_ID IS NOT NULL THEN il.C_Tax_ID ELSE ol.C_Tax_ID END +FROM M_InOutLine iol +LEFT JOIN C_InvoiceLine il ON iol.M_InOutLine_ID = il.M_InOutLine_ID +LEFT JOIN C_OrderLine ol ON iol.C_OrderLine_ID = ol.C_OrderLine_ID +WHERE rl.M_InOutLine_ID = iol.M_InOutLine_ID +) +WHERE rl.M_InOutLine_ID IS NOT NULL; + +UPDATE M_RMALine rl SET C_Tax_ID = ( +SELECT t.C_Tax_ID +FROM C_Tax t +WHERE t.AD_Client_ID=rl.AD_Client_ID +AND t.IsActive = 'Y' +AND t.IsTaxExempt = 'Y' +AND t.ValidFrom < getdate() ORDER BY IsDefault DESC) +WHERE rl.M_InOutLine_ID IS NULL;-- Jan 18, 2013 4:59:37 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Column SET IsMandatory='Y',Updated=TO_TIMESTAMP('2013-01-18 16:59:37','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=208382 +; + +-- Jan 18, 2013 4:59:39 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO t_alter_column values('m_rmaline','C_Tax_ID','NUMERIC(10)',null,null) +; + +-- Jan 18, 2013 4:59:39 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO t_alter_column values('m_rmaline','C_Tax_ID',null,'NOT NULL',null) +; + +-- Jan 18, 2013 5:00:31 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Table (IsSecurityEnabled,AccessLevel,LoadSeq,AD_Window_ID,AD_Table_ID,IsHighVolume,IsView,IsChangeLog,EntityType,ReplicationType,AD_Table_UU,IsCentrallyMaintained,IsDeleteable,TableName,Description,PO_Window_ID,Name,AD_Client_ID,IsActive,AD_Org_ID,Updated,CreatedBy,UpdatedBy,Created) VALUES ('N','1',145,320,200055,'N','N','N','D','L','298e09ea-6dbc-4ecb-bc34-d98739b4347f','Y','Y','M_RMATax','Return Material Authorization Tax',53099,'RMA Tax',0,'Y',0,TO_TIMESTAMP('2013-01-18 17:00:30','YYYY-MM-DD HH24:MI:SS'),100,100,TO_TIMESTAMP('2013-01-18 17:00:30','YYYY-MM-DD HH24:MI:SS')) +; + +-- Jan 18, 2013 5:00:31 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Table_Trl (AD_Language,AD_Table_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Table_Trl_UU ) 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,Generate_UUID() FROM AD_Language l, AD_Table t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Table_ID=200055 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) +; + +-- Jan 18, 2013 5:00:33 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Sequence (UpdatedBy,StartNewYear,CurrentNextSys,IsTableID,CurrentNext,IsAudited,IsAutoSequence,AD_Sequence_ID,AD_Sequence_UU,Description,Name,IncrementNo,AD_Org_ID,AD_Client_ID,Created,CreatedBy,Updated,IsActive,StartNo) VALUES (100,'N',200000,'Y',1000000,'N','Y',200050,'da791086-8393-4349-a410-be079d3153d8','Table M_RMATax','M_RMATax',1,0,0,TO_TIMESTAMP('2013-01-18 17:00:32','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2013-01-18 17:00:32','YYYY-MM-DD HH24:MI:SS'),'Y',1000000) +; + +-- Jan 18, 2013 5:00:41 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Column (Version,IsSyncDatabase,IsEncrypted,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,AD_Val_Rule_ID,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,DefaultValue,Help,Name,IsAllowCopy,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID,IsToolbarButton,IsAlwaysUpdateable) VALUES (1,'N','N',200055,208383,'D','Y','N','N','N',22,'N',19,129,'N',102,'N','Y','8595ba8a-1211-4ec6-b91d-7f46b76aeeed','N','AD_Client_ID','Client/Tenant for this installation.','@AD_Client_ID@','A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','Client','N',100,TO_TIMESTAMP('2013-01-18 17:00:40','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_TIMESTAMP('2013-01-18 17:00:40','YYYY-MM-DD HH24:MI:SS'),100,0,'N','N') +; + +-- Jan 18, 2013 5:00:41 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) 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,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=208383 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) +; + +-- Jan 18, 2013 5:00:42 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Column (Version,IsSyncDatabase,IsEncrypted,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,AD_Val_Rule_ID,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,DefaultValue,Help,Name,IsAllowCopy,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID,IsToolbarButton,IsAlwaysUpdateable) VALUES (1,'N','N',200055,208384,'D','Y','N','N','N',22,'N',19,130,'N',113,'N','Y','3fe85743-f55a-4750-8650-56507cd41f48','N','AD_Org_ID','Organizational entity within client','@AD_Org_ID@','An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','Organization','N',100,TO_TIMESTAMP('2013-01-18 17:00:41','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_TIMESTAMP('2013-01-18 17:00:41','YYYY-MM-DD HH24:MI:SS'),100,0,'N','N') +; + +-- Jan 18, 2013 5:00:42 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) 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,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=208384 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) +; + +-- Jan 18, 2013 5:00:43 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Column (Version,IsSyncDatabase,IsEncrypted,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID,IsToolbarButton,IsAlwaysUpdateable) VALUES (1,'N','N',200055,208385,'D','Y','N','N','Y',22,'N',30,'N',558,'N','Y','bf483ef9-6d1c-495c-9ae9-e117a31b3f27','N','C_Order_ID','Order','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.','Order','Y',100,TO_TIMESTAMP('2013-01-18 17:00:42','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_TIMESTAMP('2013-01-18 17:00:42','YYYY-MM-DD HH24:MI:SS'),100,0,'N','N') +; + +-- Jan 18, 2013 5:00:43 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) 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,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=208385 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) +; + +-- Jan 18, 2013 5:00:44 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Element (ColumnName,AD_Element_ID,EntityType,Name,PrintName,AD_Element_UU,AD_Client_ID,Created,Updated,AD_Org_ID,CreatedBy,UpdatedBy,IsActive) VALUES ('M_RMATax_UU',202194,'D','M_RMATax_UU','M_RMATax_UU','de6a4308-2c53-426a-ad7a-def5ee38fb87',0,TO_TIMESTAMP('2013-01-18 17:00:43','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2013-01-18 17:00:43','YYYY-MM-DD HH24:MI:SS'),0,100,100,'Y') +; + +-- Jan 18, 2013 5:00:44 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Help,PO_Description,PO_Help,Description,Name,PrintName,PO_Name,PO_PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Element_Trl_UU ) SELECT l.AD_Language,t.AD_Element_ID, t.Help,t.PO_Description,t.PO_Help,t.Description,t.Name,t.PrintName,t.PO_Name,t.PO_PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=202194 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) +; + +-- Jan 18, 2013 5:00:45 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Column (Version,IsSyncDatabase,IsEncrypted,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Name,IsAllowCopy,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID,IsToolbarButton,IsAlwaysUpdateable) VALUES (1.00,'N','N',200055,208386,'D','N','N','N','N',36,'N',10,'N',202194,'N','Y','527a6a3d-b00d-4ac0-af6b-cc5c3dffd81c','Y','M_RMATax_UU','M_RMATax_UU','N',100,TO_TIMESTAMP('2013-01-18 17:00:43','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_TIMESTAMP('2013-01-18 17:00:43','YYYY-MM-DD HH24:MI:SS'),100,0,'N','N') +; + +-- Jan 18, 2013 5:00:45 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) 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,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=208386 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) +; + +-- Jan 18, 2013 5:00:46 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Column (Version,IsSyncDatabase,IsEncrypted,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID,IsToolbarButton,IsAlwaysUpdateable) VALUES (1,'N','N',200055,208387,'D','Y','N','N','Y',22,'N',19,'N',213,'N','Y','718e0bcb-d693-4aae-af32-9d25e333fa4c','N','C_Tax_ID','Tax identifier','The Tax indicates the type of tax used in document line.','Tax','Y',100,TO_TIMESTAMP('2013-01-18 17:00:45','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_TIMESTAMP('2013-01-18 17:00:45','YYYY-MM-DD HH24:MI:SS'),100,0,'N','N') +; + +-- Jan 18, 2013 5:00:46 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) 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,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=208387 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) +; + +-- Jan 18, 2013 5:00:46 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Column (Version,IsSyncDatabase,IsEncrypted,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID,IsToolbarButton,IsAlwaysUpdateable) VALUES (1,'N','N',200055,208388,'D','Y','N','N','N',7,'N',16,'N',245,'N','Y','a690c1bd-01d6-4d33-8816-550592918a76','N','Created','Date this record was created','The Created field indicates the date that this record was created.','Created','N',100,TO_TIMESTAMP('2013-01-18 17:00:46','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_TIMESTAMP('2013-01-18 17:00:46','YYYY-MM-DD HH24:MI:SS'),100,0,'N','N') +; + +-- Jan 18, 2013 5:00:47 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) 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,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=208388 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) +; + +-- Jan 18, 2013 5:00:47 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Column (Version,IsSyncDatabase,IsEncrypted,AD_Table_ID,AD_Column_ID,EntityType,AD_Reference_Value_ID,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID,IsToolbarButton,IsAlwaysUpdateable) VALUES (1,'N','N',200055,208389,'D',110,'Y','N','N','N',22,'N',18,'N',246,'N','Y','6d732e19-2310-48b5-882a-85d8d424a4cd','N','CreatedBy','User who created this records','The Created By field indicates the user who created this record.','Created By','N',100,TO_TIMESTAMP('2013-01-18 17:00:47','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_TIMESTAMP('2013-01-18 17:00:47','YYYY-MM-DD HH24:MI:SS'),100,0,'N','N') +; + +-- Jan 18, 2013 5:00:47 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) 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,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=208389 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) +; + +-- Jan 18, 2013 5:00:48 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Column (Version,IsSyncDatabase,IsEncrypted,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,DefaultValue,Help,Name,IsAllowCopy,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID,IsToolbarButton,IsAlwaysUpdateable) VALUES (1,'N','N',200055,208390,'D','Y','N','N','N',1,'N',20,'N',348,'N','Y','c8793533-f511-4700-8402-159ec00a0fde','Y','IsActive','The record is active in the system','Y','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.','Active','N',100,TO_TIMESTAMP('2013-01-18 17:00:47','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_TIMESTAMP('2013-01-18 17:00:47','YYYY-MM-DD HH24:MI:SS'),100,0,'N','N') +; + +-- Jan 18, 2013 5:00:48 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) 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,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=208390 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) +; + +-- Jan 18, 2013 5:00:49 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Column (Version,IsSyncDatabase,IsEncrypted,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID,IsToolbarButton,IsAlwaysUpdateable) VALUES (1,'N','N',200055,208391,'D','Y','N','N',0,'N',1,'N',20,'N',1065,'N','Y','182bd9c5-2dc1-4456-818c-fcb199e0cd8d','Y','IsTaxIncluded','Tax is included in the price ','The Tax Included checkbox indicates if the prices include tax. This is also known as the gross price.','Price includes Tax','Y',100,TO_TIMESTAMP('2013-01-18 17:00:48','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_TIMESTAMP('2013-01-18 17:00:48','YYYY-MM-DD HH24:MI:SS'),100,0,'N','N') +; + +-- Jan 18, 2013 5:00:49 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) 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,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=208391 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) +; + +-- Jan 18, 2013 5:00:50 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Column (Version,IsSyncDatabase,IsEncrypted,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID,IsToolbarButton,IsAlwaysUpdateable) VALUES (1,'N','N',200055,208392,'D','Y','N','N',0,'N',1,'N',20,'N',1047,'N','Y','ddfe564a-9085-4193-98cb-dbbb19f129d3','Y','Processed','The document has been processed','The Processed checkbox indicates that a document has been processed.','Processed','Y',100,TO_TIMESTAMP('2013-01-18 17:00:49','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_TIMESTAMP('2013-01-18 17:00:49','YYYY-MM-DD HH24:MI:SS'),100,0,'N','N') +; + +-- Jan 18, 2013 5:00:50 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) 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,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=208392 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) +; + +-- Jan 18, 2013 5:00:51 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Column (Version,IsSyncDatabase,IsEncrypted,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID,IsToolbarButton,IsAlwaysUpdateable) VALUES (1,'N','N',200055,208393,'D','Y','N','N','N',22,'N',12,'N',1133,'N','Y','fc895533-0ea5-4f9f-bd7a-2e8fd69bbb42','N','TaxAmt','Tax Amount for a document','The Tax Amount displays the total tax amount for a document.','Tax Amount','Y',100,TO_TIMESTAMP('2013-01-18 17:00:50','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_TIMESTAMP('2013-01-18 17:00:50','YYYY-MM-DD HH24:MI:SS'),100,0,'N','N') +; + +-- Jan 18, 2013 5:00:51 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) 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,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=208393 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) +; + +-- Jan 18, 2013 5:00:51 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Column (Version,IsSyncDatabase,IsEncrypted,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID,IsToolbarButton,IsAlwaysUpdateable) VALUES (1,'N','N',200055,208394,'D','Y','N','N','N',22,'N',12,'N',1134,'N','Y','efc186f9-ba73-4711-a499-16fda1cfbf2b','N','TaxBaseAmt','Base for calculating the tax amount','The Tax Base Amount indicates the base amount used for calculating the tax amount.','Tax base Amount','Y',100,TO_TIMESTAMP('2013-01-18 17:00:51','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_TIMESTAMP('2013-01-18 17:00:51','YYYY-MM-DD HH24:MI:SS'),100,0,'N','N') +; + +-- Jan 18, 2013 5:00:51 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) 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,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=208394 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) +; + +-- Jan 18, 2013 5:00:52 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Column (Version,IsSyncDatabase,IsEncrypted,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID,IsToolbarButton,IsAlwaysUpdateable) VALUES (1,'N','N',200055,208395,'D','Y','N','N','N',7,'N',16,'N',607,'N','Y','b9b679d0-113d-4e70-b241-13424b9bed41','N','Updated','Date this record was updated','The Updated field indicates the date that this record was updated.','Updated','N',100,TO_TIMESTAMP('2013-01-18 17:00:51','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_TIMESTAMP('2013-01-18 17:00:51','YYYY-MM-DD HH24:MI:SS'),100,0,'N','N') +; + +-- Jan 18, 2013 5:00:52 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) 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,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=208395 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) +; + +-- Jan 18, 2013 5:00:53 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Column (Version,IsSyncDatabase,IsEncrypted,AD_Table_ID,AD_Column_ID,EntityType,AD_Reference_Value_ID,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,Description,Help,Name,IsAllowCopy,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID,IsToolbarButton,IsAlwaysUpdateable) VALUES (1,'N','N',200055,208396,'D',110,'Y','N','N','N',22,'N',18,'N',608,'N','Y','02658f9d-f73a-4de2-be47-bb26d0f76a3e','N','UpdatedBy','User who updated this records','The Updated By field indicates the user who updated this record.','Updated By','N',100,TO_TIMESTAMP('2013-01-18 17:00:52','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_TIMESTAMP('2013-01-18 17:00:52','YYYY-MM-DD HH24:MI:SS'),100,0,'N','N') +; + +-- Jan 18, 2013 5:00:53 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) 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,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=208396 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) +; + +-- Jan 18, 2013 5:01:26 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Column SET AD_Element_ID=2412, IsUpdateable='N', ColumnName='M_RMA_ID', Description='Return Material Authorization', Help='A Return Material Authorization may be required to accept returns and to create Credit Memos', Name='RMA',Updated=TO_TIMESTAMP('2013-01-18 17:01:26','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=208385 +; + +-- Jan 18, 2013 5:01:26 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Column_Trl SET IsTranslated='N' WHERE AD_Column_ID=208385 +; + +-- Jan 18, 2013 5:01:26 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET Name='RMA', Description='Return Material Authorization', Help='A Return Material Authorization may be required to accept returns and to create Credit Memos' WHERE AD_Column_ID=208385 AND IsCentrallyMaintained='Y' +; + +-- Jan 18, 2013 5:02:07 PM SGT +-- Ticket 1001770: RMA improvements +CREATE TABLE M_RMATax (AD_Client_ID NUMERIC(10) NOT NULL, AD_Org_ID NUMERIC(10) NOT NULL, C_Tax_ID NUMERIC(10) NOT NULL, Created TIMESTAMP NOT NULL, CreatedBy NUMERIC(10) NOT NULL, IsActive CHAR(1) DEFAULT 'Y' CHECK (IsActive IN ('Y','N')) NOT NULL, IsTaxIncluded CHAR(1) CHECK (IsTaxIncluded IN ('Y','N')) NOT NULL, M_RMA_ID NUMERIC(10) NOT NULL, M_RMATax_UU VARCHAR(36) DEFAULT NULL , Processed CHAR(1) CHECK (Processed IN ('Y','N')) NOT NULL, TaxAmt NUMERIC NOT NULL, TaxBaseAmt NUMERIC NOT NULL, Updated TIMESTAMP NOT NULL, UpdatedBy NUMERIC(10) NOT NULL, CONSTRAINT M_RMATax_Key PRIMARY KEY (C_Tax_ID, M_RMA_ID)) +; + +-- Jan 18, 2013 5:02:56 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,EntityType,Name,IsFieldOnly,IsDisplayed,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',629,36,'N','N',60949,'Y',201660,'N','D','M_RMALine_UU','N','Y','a262b6b1-c890-4c85-a974-4af6b28f2f15',100,0,TO_TIMESTAMP('2013-01-18 17:02:55','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2013-01-18 17:02:55','YYYY-MM-DD HH24:MI:SS'),'Y') +; + +-- Jan 18, 2013 5:02:56 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=201660 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) +; + +-- Jan 18, 2013 5:02:57 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,IsFieldOnly,IsDisplayed,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',629,22,'N','N',57792,'Y',201661,'N','The Invoiced Quantity indicates the quantity of a product that have been invoiced.','D','Invoiced Quantity','Quantity Invoiced','N','Y','25f4b674-b6ac-4b55-8bb6-d4f6c4ef207b',100,0,TO_TIMESTAMP('2013-01-18 17:02:56','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2013-01-18 17:02:56','YYYY-MM-DD HH24:MI:SS'),'Y') +; + +-- Jan 18, 2013 5:02:57 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=201661 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) +; + +-- Jan 18, 2013 5:02:57 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,EntityType,Name,IsFieldOnly,IsDisplayed,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',629,22,'N','N',57791,'Y',201662,'N','D','Referenced RMA Line','N','Y','671f0cdf-975c-438e-9904-3ba0034e45e8',100,0,TO_TIMESTAMP('2013-01-18 17:02:57','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2013-01-18 17:02:57','YYYY-MM-DD HH24:MI:SS'),'Y') +; + +-- Jan 18, 2013 5:02:58 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=201662 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) +; + +-- Jan 18, 2013 5:02:58 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,IsFieldOnly,IsDisplayed,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',629,10,'N','N',208382,'Y',201663,'N','The Tax indicates the type of tax used in document line.','D','Tax identifier','Tax','N','Y','085358dd-5812-430f-9efe-9b73dec92b6d',100,0,TO_TIMESTAMP('2013-01-18 17:02:58','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2013-01-18 17:02:58','YYYY-MM-DD HH24:MI:SS'),'Y') +; + +-- Jan 18, 2013 5:02:58 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=201663 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) +; + +-- Jan 18, 2013 5:03:31 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNo=0,IsDisplayed='N' WHERE AD_Field_ID=201660 +; + +-- Jan 18, 2013 5:03:31 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNo=0,IsDisplayed='N' WHERE AD_Field_ID=201661 +; + +-- Jan 18, 2013 5:03:31 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNo=0,IsDisplayed='N' WHERE AD_Field_ID=201662 +; + +-- Jan 18, 2013 5:03:31 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNo=110,IsDisplayed='Y' WHERE AD_Field_ID=201663 +; + +-- Jan 18, 2013 5:03:31 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNo=120,IsDisplayed='Y' WHERE AD_Field_ID=52004 +; + +-- Jan 18, 2013 5:03:37 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=9317 +; + +-- Jan 18, 2013 5:03:37 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=201660 +; + +-- Jan 18, 2013 5:03:37 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=201661 +; + +-- Jan 18, 2013 5:03:37 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=201662 +; + +-- Jan 18, 2013 5:03:37 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNoGrid=10,IsDisplayedGrid='Y' WHERE AD_Field_ID=9311 +; + +-- Jan 18, 2013 5:03:37 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNoGrid=20,IsDisplayedGrid='Y' WHERE AD_Field_ID=9314 +; + +-- Jan 18, 2013 5:03:37 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNoGrid=30,IsDisplayedGrid='Y' WHERE AD_Field_ID=52005 +; + +-- Jan 18, 2013 5:03:37 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNoGrid=40,IsDisplayedGrid='Y' WHERE AD_Field_ID=9315 +; + +-- Jan 18, 2013 5:03:37 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNoGrid=50,IsDisplayedGrid='Y' WHERE AD_Field_ID=9310 +; + +-- Jan 18, 2013 5:03:37 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNoGrid=60,IsDisplayedGrid='Y' WHERE AD_Field_ID=9312 +; + +-- Jan 18, 2013 5:03:37 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNoGrid=70,IsDisplayedGrid='Y' WHERE AD_Field_ID=52002 +; + +-- Jan 18, 2013 5:03:37 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNoGrid=80,IsDisplayedGrid='Y' WHERE AD_Field_ID=9316 +; + +-- Jan 18, 2013 5:03:37 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNoGrid=90,IsDisplayedGrid='Y' WHERE AD_Field_ID=52001 +; + +-- Jan 18, 2013 5:03:37 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNoGrid=100,IsDisplayedGrid='Y' WHERE AD_Field_ID=201663 +; + +-- Jan 18, 2013 5:04:27 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET ColumnSpan=2,Updated=TO_TIMESTAMP('2013-01-18 17:04:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201663 +; + +-- Jan 18, 2013 5:05:24 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Tab (ImportFields,Processing,IsSingleRow,AD_Window_ID,SeqNo,Help,IsTranslationTab,IsSortTab,AD_Table_ID,HasTree,IsReadOnly,IsInfoTab,AD_Column_ID,AD_Tab_UU,IsInsertRecord,IsAdvancedTab,TabLevel,EntityType,Name,Description,AD_Tab_ID,AD_Client_ID,Updated,AD_Org_ID,Created,CreatedBy,UpdatedBy,IsActive) VALUES ('N','N','N',320,30,'The RMA Tax Tab displays the tax amount for a RMA based on the lines entered.','N','N',200055,'N','Y','N',208385,'c6a404bb-f31a-42e7-aaa4-e4ef95043b24','N','N',1,'D','RMA Tax','RMA Tax',200065,0,TO_TIMESTAMP('2013-01-18 17:05:23','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2013-01-18 17:05:23','YYYY-MM-DD HH24:MI:SS'),100,100,'Y') +; + +-- Jan 18, 2013 5:05:24 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Tab_Trl (AD_Language,AD_Tab_ID, Help,CommitWarning,Name,Description, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Tab_Trl_UU ) SELECT l.AD_Language,t.AD_Tab_ID, t.Help,t.CommitWarning,t.Name,t.Description, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Tab t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Tab_ID=200065 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) +; + +-- Jan 18, 2013 5:05:26 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,IsFieldOnly,IsDisplayed,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',200065,1,'N','N',208390,'Y',201664,'N','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.','D','The record is active in the system','Active','N','Y','c9d4c511-2c45-423b-ac4c-6f3a08097b62',100,0,TO_TIMESTAMP('2013-01-18 17:05:25','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2013-01-18 17:05:25','YYYY-MM-DD HH24:MI:SS'),'Y') +; + +-- Jan 18, 2013 5:05:26 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=201664 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) +; + +-- Jan 18, 2013 5:05:27 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,IsFieldOnly,IsDisplayed,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',200065,22,'N','N',208383,'Y',201665,'N','A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','D','Client/Tenant for this installation.','Client','N','Y','2cdc5aa8-aae8-46f3-8238-cf165292732f',100,0,TO_TIMESTAMP('2013-01-18 17:05:26','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2013-01-18 17:05:26','YYYY-MM-DD HH24:MI:SS'),'Y') +; + +-- Jan 18, 2013 5:05:27 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=201665 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) +; + +-- Jan 18, 2013 5:05:28 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,EntityType,Name,IsFieldOnly,IsDisplayed,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',200065,36,'N','N',208386,'Y',201666,'N','D','M_RMATax_UU','N','Y','301a7e21-5aaf-48c6-a517-d16742f9f94c',100,0,TO_TIMESTAMP('2013-01-18 17:05:27','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2013-01-18 17:05:27','YYYY-MM-DD HH24:MI:SS'),'Y') +; + +-- Jan 18, 2013 5:05:28 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=201666 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) +; + +-- Jan 18, 2013 5:05:29 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,IsFieldOnly,IsDisplayed,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',200065,22,'N','N',208384,'Y',201667,'N','An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','D','Organizational entity within client','Organization','N','Y','eb8268c4-b965-45d6-b27f-b198c050b8eb',100,0,TO_TIMESTAMP('2013-01-18 17:05:28','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2013-01-18 17:05:28','YYYY-MM-DD HH24:MI:SS'),'Y') +; + +-- Jan 18, 2013 5:05:29 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=201667 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) +; + +-- Jan 18, 2013 5:05:30 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,IsFieldOnly,IsDisplayed,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',200065,1,'N','N',208391,'Y',201668,'N','The Tax Included checkbox indicates if the prices include tax. This is also known as the gross price.','D','Tax is included in the price ','Price includes Tax','N','Y','9e82ee49-a5df-4a92-99c0-1ae992da860a',100,0,TO_TIMESTAMP('2013-01-18 17:05:29','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2013-01-18 17:05:29','YYYY-MM-DD HH24:MI:SS'),'Y') +; + +-- Jan 18, 2013 5:05:30 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=201668 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) +; + +-- Jan 18, 2013 5:05:30 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,IsFieldOnly,IsDisplayed,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',200065,1,'N','N',208392,'Y',201669,'N','The Processed checkbox indicates that a document has been processed.','D','The document has been processed','Processed','N','Y','679b7f15-7f3c-40a4-876c-60da0f77c65d',100,0,TO_TIMESTAMP('2013-01-18 17:05:30','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2013-01-18 17:05:30','YYYY-MM-DD HH24:MI:SS'),'Y') +; + +-- Jan 18, 2013 5:05:30 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=201669 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) +; + +-- Jan 18, 2013 5:05:31 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,IsFieldOnly,IsDisplayed,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',200065,22,'N','N',208385,'Y',201670,'N','A Return Material Authorization may be required to accept returns and to create Credit Memos','D','Return Material Authorization','RMA','N','Y','404d7b87-c65c-4b28-a257-b43e9d26e8d2',100,0,TO_TIMESTAMP('2013-01-18 17:05:30','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2013-01-18 17:05:30','YYYY-MM-DD HH24:MI:SS'),'Y') +; + +-- Jan 18, 2013 5:05:31 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=201670 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) +; + +-- Jan 18, 2013 5:05:32 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,IsFieldOnly,IsDisplayed,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',200065,22,'N','N',208387,'Y',201671,'N','The Tax indicates the type of tax used in document line.','D','Tax identifier','Tax','N','Y','13d6c87b-bda6-4950-a6ae-3f316f2b65e7',100,0,TO_TIMESTAMP('2013-01-18 17:05:31','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2013-01-18 17:05:31','YYYY-MM-DD HH24:MI:SS'),'Y') +; + +-- Jan 18, 2013 5:05:32 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=201671 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) +; + +-- Jan 18, 2013 5:05:33 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,IsFieldOnly,IsDisplayed,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',200065,22,'N','N',208393,'Y',201672,'N','The Tax Amount displays the total tax amount for a document.','D','Tax Amount for a document','Tax Amount','N','Y','09af15f0-fc73-4239-8a1b-ec31621c1aac',100,0,TO_TIMESTAMP('2013-01-18 17:05:32','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2013-01-18 17:05:32','YYYY-MM-DD HH24:MI:SS'),'Y') +; + +-- Jan 18, 2013 5:05:33 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=201672 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) +; + +-- Jan 18, 2013 5:05:34 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,IsFieldOnly,IsDisplayed,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',200065,22,'N','N',208394,'Y',201673,'N','The Tax Base Amount indicates the base amount used for calculating the tax amount.','D','Base for calculating the tax amount','Tax base Amount','N','Y','a2ad8fee-bbab-4263-b667-f548e880dbfe',100,0,TO_TIMESTAMP('2013-01-18 17:05:33','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2013-01-18 17:05:33','YYYY-MM-DD HH24:MI:SS'),'Y') +; + +-- Jan 18, 2013 5:05:34 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=201673 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) +; + +-- Jan 18, 2013 5:05:56 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNo=0,IsDisplayed='N' WHERE AD_Field_ID=201664 +; + +-- Jan 18, 2013 5:05:56 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNo=0,IsDisplayed='N' WHERE AD_Field_ID=201666 +; + +-- Jan 18, 2013 5:05:56 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNo=0,IsDisplayed='N' WHERE AD_Field_ID=201669 +; + +-- Jan 18, 2013 5:05:56 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNo=10,IsDisplayed='Y' WHERE AD_Field_ID=201665 +; + +-- Jan 18, 2013 5:05:56 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNo=20,IsDisplayed='Y' WHERE AD_Field_ID=201667 +; + +-- Jan 18, 2013 5:05:56 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNo=30,IsDisplayed='Y' WHERE AD_Field_ID=201670 +; + +-- Jan 18, 2013 5:05:56 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNo=40,IsDisplayed='Y' WHERE AD_Field_ID=201671 +; + +-- Jan 18, 2013 5:05:56 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNo=50,IsDisplayed='Y' WHERE AD_Field_ID=201672 +; + +-- Jan 18, 2013 5:05:56 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNo=60,IsDisplayed='Y' WHERE AD_Field_ID=201673 +; + +-- Jan 18, 2013 5:05:56 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNo=70,IsDisplayed='Y' WHERE AD_Field_ID=201668 +; + +-- Jan 18, 2013 5:06:14 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=201664 +; + +-- Jan 18, 2013 5:06:14 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=201665 +; + +-- Jan 18, 2013 5:06:14 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=201666 +; + +-- Jan 18, 2013 5:06:14 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=201669 +; + +-- Jan 18, 2013 5:06:14 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNoGrid=10,IsDisplayedGrid='Y' WHERE AD_Field_ID=201667 +; + +-- Jan 18, 2013 5:06:14 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNoGrid=20,IsDisplayedGrid='Y' WHERE AD_Field_ID=201670 +; + +-- Jan 18, 2013 5:06:14 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNoGrid=30,IsDisplayedGrid='Y' WHERE AD_Field_ID=201671 +; + +-- Jan 18, 2013 5:06:14 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNoGrid=40,IsDisplayedGrid='Y' WHERE AD_Field_ID=201672 +; + +-- Jan 18, 2013 5:06:14 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNoGrid=50,IsDisplayedGrid='Y' WHERE AD_Field_ID=201673 +; + +-- Jan 18, 2013 5:06:14 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNoGrid=60,IsDisplayedGrid='Y' WHERE AD_Field_ID=201668 +; + +-- Jan 18, 2013 5:06:42 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET IsReadOnly='Y',Updated=TO_TIMESTAMP('2013-01-18 17:06:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201665 +; + +-- Jan 18, 2013 5:06:43 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET IsReadOnly='Y',Updated=TO_TIMESTAMP('2013-01-18 17:06:43','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201670 +; + +-- Jan 18, 2013 5:06:44 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET IsReadOnly='Y',Updated=TO_TIMESTAMP('2013-01-18 17:06:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201672 +; + +-- Jan 18, 2013 5:06:44 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET IsReadOnly='Y',Updated=TO_TIMESTAMP('2013-01-18 17:06:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201673 +; + +-- Jan 18, 2013 5:07:04 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET IsReadOnly='Y',Updated=TO_TIMESTAMP('2013-01-18 17:07:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201668 +; + +-- Jan 18, 2013 5:07:10 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET XPosition=4, ColumnSpan=2,Updated=TO_TIMESTAMP('2013-01-18 17:07:10','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201673 +; + +-- Jan 18, 2013 5:07:11 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET XPosition=2, ColumnSpan=2,Updated=TO_TIMESTAMP('2013-01-18 17:07:11','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201668 +; + +-- Jan 18, 2013 5:07:12 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET ColumnSpan=2,Updated=TO_TIMESTAMP('2013-01-18 17:07:12','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201672 +; + +-- Jan 18, 2013 5:07:12 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET ColumnSpan=2,Updated=TO_TIMESTAMP('2013-01-18 17:07:12','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201671 +; + +-- Jan 18, 2013 5:07:14 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET ColumnSpan=2,Updated=TO_TIMESTAMP('2013-01-18 17:07:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201670 +; + +-- Jan 18, 2013 5:07:15 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET ColumnSpan=2,Updated=TO_TIMESTAMP('2013-01-18 17:07:15','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201667 +; + +-- Jan 18, 2013 5:07:21 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET ColumnSpan=2,Updated=TO_TIMESTAMP('2013-01-18 17:07:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201665 +; + +-- Jan 18, 2013 5:07:27 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET IsSameLine='Y',Updated=TO_TIMESTAMP('2013-01-18 17:07:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201673 +; + +-- Jan 18, 2013 5:07:56 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,EntityType,Name,IsFieldOnly,IsDisplayed,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',53281,36,'N','N',60949,'Y',201674,'N','D','M_RMALine_UU','N','Y','e556a4d4-23fa-41de-8b67-f76dc9cbe7a1',100,0,TO_TIMESTAMP('2013-01-18 17:07:55','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2013-01-18 17:07:55','YYYY-MM-DD HH24:MI:SS'),'Y') +; + +-- Jan 18, 2013 5:07:56 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=201674 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) +; + +-- Jan 18, 2013 5:07:57 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,IsFieldOnly,IsDisplayed,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',53281,22,'N','N',57792,'Y',201675,'N','The Invoiced Quantity indicates the quantity of a product that have been invoiced.','D','Invoiced Quantity','Quantity Invoiced','N','Y','aabdec36-722c-48b2-9d26-c0daad9b13ca',100,0,TO_TIMESTAMP('2013-01-18 17:07:56','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2013-01-18 17:07:56','YYYY-MM-DD HH24:MI:SS'),'Y') +; + +-- Jan 18, 2013 5:07:57 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=201675 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) +; + +-- Jan 18, 2013 5:07:58 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,EntityType,Name,IsFieldOnly,IsDisplayed,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',53281,22,'N','N',57791,'Y',201676,'N','D','Referenced RMA Line','N','Y','a9dab917-43a2-4c3e-8304-ccb23fc936c0',100,0,TO_TIMESTAMP('2013-01-18 17:07:57','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2013-01-18 17:07:57','YYYY-MM-DD HH24:MI:SS'),'Y') +; + +-- Jan 18, 2013 5:07:58 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=201676 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) +; + +-- Jan 18, 2013 5:07:58 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field (IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,IsFieldOnly,IsDisplayed,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive) VALUES ('N',53281,10,'N','N',208382,'Y',201677,'N','The Tax indicates the type of tax used in document line.','D','Tax identifier','Tax','N','Y','ab1f4145-601c-47e0-aa8b-332c18696f87',100,0,TO_TIMESTAMP('2013-01-18 17:07:58','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2013-01-18 17:07:58','YYYY-MM-DD HH24:MI:SS'),'Y') +; + +-- Jan 18, 2013 5:07:58 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=201677 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) +; + +-- Jan 18, 2013 5:08:09 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNo=0,IsDisplayed='N' WHERE AD_Field_ID=201674 +; + +-- Jan 18, 2013 5:08:09 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNo=0,IsDisplayed='N' WHERE AD_Field_ID=201675 +; + +-- Jan 18, 2013 5:08:09 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNo=0,IsDisplayed='N' WHERE AD_Field_ID=201676 +; + +-- Jan 18, 2013 5:08:09 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNo=110,IsDisplayed='Y' WHERE AD_Field_ID=201677 +; + +-- Jan 18, 2013 5:08:09 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNo=120,IsDisplayed='Y' WHERE AD_Field_ID=57980 +; + +-- Jan 18, 2013 5:08:17 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=57970 +; + +-- Jan 18, 2013 5:08:17 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=201674 +; + +-- Jan 18, 2013 5:08:17 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=201675 +; + +-- Jan 18, 2013 5:08:17 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNoGrid=0,IsDisplayedGrid='N' WHERE AD_Field_ID=201676 +; + +-- Jan 18, 2013 5:08:17 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNoGrid=10,IsDisplayedGrid='Y' WHERE AD_Field_ID=57971 +; + +-- Jan 18, 2013 5:08:17 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNoGrid=20,IsDisplayedGrid='Y' WHERE AD_Field_ID=57972 +; + +-- Jan 18, 2013 5:08:17 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNoGrid=30,IsDisplayedGrid='Y' WHERE AD_Field_ID=57973 +; + +-- Jan 18, 2013 5:08:17 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNoGrid=40,IsDisplayedGrid='Y' WHERE AD_Field_ID=57974 +; + +-- Jan 18, 2013 5:08:17 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNoGrid=50,IsDisplayedGrid='Y' WHERE AD_Field_ID=57975 +; + +-- Jan 18, 2013 5:08:18 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNoGrid=60,IsDisplayedGrid='Y' WHERE AD_Field_ID=57976 +; + +-- Jan 18, 2013 5:08:18 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNoGrid=70,IsDisplayedGrid='Y' WHERE AD_Field_ID=57977 +; + +-- Jan 18, 2013 5:08:18 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNoGrid=80,IsDisplayedGrid='Y' WHERE AD_Field_ID=57978 +; + +-- Jan 18, 2013 5:08:18 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNoGrid=90,IsDisplayedGrid='Y' WHERE AD_Field_ID=57979 +; + +-- Jan 18, 2013 5:08:18 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET SeqNoGrid=100,IsDisplayedGrid='Y' WHERE AD_Field_ID=201677 +; + +-- Jan 18, 2013 5:08:42 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET ColumnSpan=2,Updated=TO_TIMESTAMP('2013-01-18 17:08:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201677 +; + +-- Jan 18, 2013 5:08:47 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET DisplayLength=14,Updated=TO_TIMESTAMP('2013-01-18 17:08:47','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201677 +; + +-- Jan 18, 2013 5:09:04 PM SGT +-- Ticket 1001770: RMA improvements +UPDATE AD_Field SET DisplayLength=14,Updated=TO_TIMESTAMP('2013-01-18 17:09:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201663 +; + +-- Jan 18, 2013 5:10:08 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Tab (ImportFields,Processing,IsSingleRow,AD_Window_ID,SeqNo,Help,IsTranslationTab,IsSortTab,AD_Table_ID,HasTree,IsReadOnly,IsInfoTab,AD_Column_ID,AD_Tab_UU,IsInsertRecord,IsAdvancedTab,TabLevel,EntityType,Name,Description,AD_Tab_ID,AD_Client_ID,Updated,AD_Org_ID,Created,CreatedBy,UpdatedBy,IsActive) VALUES ('N','N','N',53099,30,'The RMA Tax Tab displays the tax associated with the RMA Lines.','N','N',200055,'N','Y','N',208385,'6ff733fc-e3cf-423d-887f-4c8b1eb91c97','N','N',1,'D','RMA Tax','RMA Tax',200066,0,TO_TIMESTAMP('2013-01-18 17:10:07','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2013-01-18 17:10:07','YYYY-MM-DD HH24:MI:SS'),100,100,'Y') +; + +-- Jan 18, 2013 5:10:08 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Tab_Trl (AD_Language,AD_Tab_ID, Help,CommitWarning,Name,Description, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Tab_Trl_UU ) SELECT l.AD_Language,t.AD_Tab_ID, t.Help,t.CommitWarning,t.Name,t.Description, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Tab t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Tab_ID=200066 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) +; + +-- Jan 18, 2013 5:10:14 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field (NumLines,IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,IsFieldOnly,IsDisplayed,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan,IsQuickEntry) VALUES (1,'N',200066,1,'N','N',208390,0,'Y',201678,'N','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.','D','The record is active in the system','Active','N','N','7f6c0fa5-6d65-4f1d-9bf1-0dcc193e14ed',100,0,TO_TIMESTAMP('2013-01-18 17:10:13','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2013-01-18 17:10:13','YYYY-MM-DD HH24:MI:SS'),'Y','N',0,1,1,'N') +; + +-- Jan 18, 2013 5:10:14 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=201678 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) +; + +-- Jan 18, 2013 5:10:15 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field (NumLines,IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,EntityType,Name,IsFieldOnly,IsDisplayed,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan,IsQuickEntry) VALUES (1,'N',200066,36,'N','N',208386,0,'Y',201679,'N','D','M_RMATax_UU','N','N','a75a3819-abde-43c3-b1b6-154929bc2e05',100,0,TO_TIMESTAMP('2013-01-18 17:10:14','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2013-01-18 17:10:14','YYYY-MM-DD HH24:MI:SS'),'Y','N',0,1,1,'N') +; + +-- Jan 18, 2013 5:10:15 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=201679 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) +; + +-- Jan 18, 2013 5:10:15 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field (NumLines,IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,IsFieldOnly,IsDisplayed,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan,IsQuickEntry) VALUES (1,'N',200066,1,'N','N',208392,0,'Y',201680,'N','The Processed checkbox indicates that a document has been processed.','D','The document has been processed','Processed','N','N','a311c623-e1d4-44fb-9c20-3a003565f5ef',100,0,TO_TIMESTAMP('2013-01-18 17:10:15','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2013-01-18 17:10:15','YYYY-MM-DD HH24:MI:SS'),'Y','N',0,1,1,'N') +; + +-- Jan 18, 2013 5:10:15 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=201680 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) +; + +-- Jan 18, 2013 5:10:16 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field (NumLines,IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,IsFieldOnly,IsDisplayed,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan,IsQuickEntry) VALUES (1,'N',200066,22,'N','N',208383,10,'Y',201681,'Y','A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','D','Client/Tenant for this installation.','Client','N','Y','0c1f846a-d0e9-4962-9fd7-fc8fe6edb8e8',100,0,TO_TIMESTAMP('2013-01-18 17:10:15','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2013-01-18 17:10:15','YYYY-MM-DD HH24:MI:SS'),'Y','N',0,1,2,'N') +; + +-- Jan 18, 2013 5:10:16 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=201681 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) +; + +-- Jan 18, 2013 5:10:17 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field (NumLines,IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,IsFieldOnly,IsDisplayed,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan,IsQuickEntry) VALUES (1,'N',200066,22,'N','N',208384,20,'Y',201682,'N','An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','D','Organizational entity within client','Organization','N','Y','61509d7a-3fb5-4fd5-a8e7-33845bf47e25',100,0,TO_TIMESTAMP('2013-01-18 17:10:16','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2013-01-18 17:10:16','YYYY-MM-DD HH24:MI:SS'),'Y','Y',10,1,2,'N') +; + +-- Jan 18, 2013 5:10:17 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=201682 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) +; + +-- Jan 18, 2013 5:10:19 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field (NumLines,IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,IsFieldOnly,IsDisplayed,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan,IsQuickEntry) VALUES (1,'N',200066,22,'N','N',208385,30,'Y',201683,'Y','A Return Material Authorization may be required to accept returns and to create Credit Memos','D','Return Material Authorization','RMA','N','Y','979dca3f-a651-4351-827b-f7c7a5c679a0',100,0,TO_TIMESTAMP('2013-01-18 17:10:17','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2013-01-18 17:10:17','YYYY-MM-DD HH24:MI:SS'),'Y','Y',20,1,2,'N') +; + +-- Jan 18, 2013 5:10:19 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=201683 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) +; + +-- Jan 18, 2013 5:10:20 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field (NumLines,IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,IsFieldOnly,IsDisplayed,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan,IsQuickEntry) VALUES (1,'N',200066,22,'N','N',208387,40,'Y',201684,'N','The Tax indicates the type of tax used in document line.','D','Tax identifier','Tax','N','Y','4243ba57-783a-4681-aab8-dc1f8bec76cd',100,0,TO_TIMESTAMP('2013-01-18 17:10:19','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2013-01-18 17:10:19','YYYY-MM-DD HH24:MI:SS'),'Y','Y',30,1,2,'N') +; + +-- Jan 18, 2013 5:10:20 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=201684 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) +; + +-- Jan 18, 2013 5:10:20 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field (NumLines,IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,IsFieldOnly,IsDisplayed,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan,IsQuickEntry) VALUES (1,'N',200066,22,'N','N',208393,50,'Y',201685,'Y','The Tax Amount displays the total tax amount for a document.','D','Tax Amount for a document','Tax Amount','N','Y','7808dd51-7112-4b63-810e-e70f5e915a07',100,0,TO_TIMESTAMP('2013-01-18 17:10:20','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2013-01-18 17:10:20','YYYY-MM-DD HH24:MI:SS'),'Y','Y',40,1,2,'N') +; + +-- Jan 18, 2013 5:10:20 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=201685 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) +; + +-- Jan 18, 2013 5:10:21 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field (NumLines,IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,IsFieldOnly,IsDisplayed,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan,IsQuickEntry) VALUES (1,'N',200066,22,'Y','N',208394,60,'Y',201686,'Y','The Tax Base Amount indicates the base amount used for calculating the tax amount.','D','Base for calculating the tax amount','Tax base Amount','N','Y','a56c59af-1253-45e5-9875-5ffb89acfc42',100,0,TO_TIMESTAMP('2013-01-18 17:10:20','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2013-01-18 17:10:20','YYYY-MM-DD HH24:MI:SS'),'Y','Y',50,4,2,'N') +; + +-- Jan 18, 2013 5:10:21 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=201686 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) +; + +-- Jan 18, 2013 5:10:22 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field (NumLines,IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,IsFieldOnly,IsDisplayed,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan,IsQuickEntry) VALUES (1,'N',200066,1,'N','N',208391,70,'Y',201687,'Y','The Tax Included checkbox indicates if the prices include tax. This is also known as the gross price.','D','Tax is included in the price ','Price includes Tax','N','Y','101855b4-d848-4e42-85e6-d93f7e001a41',100,0,TO_TIMESTAMP('2013-01-18 17:10:21','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2013-01-18 17:10:21','YYYY-MM-DD HH24:MI:SS'),'Y','Y',60,2,2,'N') +; + +-- Jan 18, 2013 5:10:22 PM SGT +-- Ticket 1001770: RMA improvements +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=201687 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) +; + +SELECT register_migration_script('201301181905_TICKET-1001770.sql') FROM dual +; \ No newline at end of file diff --git a/org.adempiere.base.process/src/org/adempiere/process/InOutGenerateRMA.java b/org.adempiere.base.process/src/org/adempiere/process/InOutGenerateRMA.java index a72f5811c3..b0f7128bad 100644 --- a/org.adempiere.base.process/src/org/adempiere/process/InOutGenerateRMA.java +++ b/org.adempiere.base.process/src/org/adempiere/process/InOutGenerateRMA.java @@ -184,17 +184,29 @@ public class InOutGenerateRMA extends SvrProcess MRMALine rmaLines[] = rma.getLines(true); for (MRMALine rmaLine : rmaLines) { - if (rmaLine.getM_InOutLine_ID() != 0) + if (rmaLine.getM_InOutLine_ID() != 0 || rmaLine.getC_Charge_ID() != 0) { MInOutLine shipLine = new MInOutLine(shipment); shipLine.setM_RMALine_ID(rmaLine.get_ID()); shipLine.setLine(rmaLine.getLine()); shipLine.setDescription(rmaLine.getDescription()); - shipLine.setM_Product_ID(rmaLine.getM_Product_ID()); - shipLine.setM_AttributeSetInstance_ID(rmaLine.getM_AttributeSetInstance_ID()); + + if (rmaLine.getC_Charge_ID() != 0) + { + shipLine.setC_Charge_ID(rmaLine.getC_Charge_ID()); + shipLine.set_ValueNoCheck(MInOutLine.COLUMNNAME_M_Product_ID, null); + shipLine.set_ValueNoCheck(MInOutLine.COLUMNNAME_M_AttributeSetInstance_ID, null); + shipLine.set_ValueNoCheck(MInOutLine.COLUMNNAME_M_Locator_ID, null); + } + else + { + shipLine.setM_Product_ID(rmaLine.getM_Product_ID()); + shipLine.setM_AttributeSetInstance_ID(rmaLine.getM_AttributeSetInstance_ID()); + shipLine.setM_Locator_ID(rmaLine.getM_Locator_ID()); + } + shipLine.setC_UOM_ID(rmaLine.getC_UOM_ID()); shipLine.setQty(rmaLine.getQty()); - shipLine.setM_Locator_ID(rmaLine.getM_Locator_ID()); shipLine.setC_Project_ID(rmaLine.getC_Project_ID()); shipLine.setC_Campaign_ID(rmaLine.getC_Campaign_ID()); shipLine.setC_Activity_ID(rmaLine.getC_Activity_ID()); diff --git a/org.adempiere.base.process/src/org/adempiere/process/InvoiceGenerateRMA.java b/org.adempiere.base.process/src/org/adempiere/process/InvoiceGenerateRMA.java index 6d5b7d53fc..7cc1cb869f 100644 --- a/org.adempiere.base.process/src/org/adempiere/process/InvoiceGenerateRMA.java +++ b/org.adempiere.base.process/src/org/adempiere/process/InvoiceGenerateRMA.java @@ -164,7 +164,7 @@ public class InvoiceGenerateRMA extends SvrProcess for (MRMALine rmaLine : rmaLines) { - if (rmaLine.getM_InOutLine_ID() == 0) + if (rmaLine.getM_InOutLine_ID() == 0 && rmaLine.getC_Charge_ID() == 0) { StringBuilder msgiste = new StringBuilder("No customer return line - RMA = ") .append(rma.getDocumentNo()).append(", Line = ").append(rmaLine.getLine()); diff --git a/org.adempiere.base/src/org/compiere/model/I_M_RMALine.java b/org.adempiere.base/src/org/compiere/model/I_M_RMALine.java index 596d1014b3..389f8510dc 100644 --- a/org.adempiere.base/src/org/compiere/model/I_M_RMALine.java +++ b/org.adempiere.base/src/org/compiere/model/I_M_RMALine.java @@ -90,6 +90,21 @@ public interface I_M_RMALine public org.compiere.model.I_C_Charge getC_Charge() throws RuntimeException; + /** Column name C_Tax_ID */ + public static final String COLUMNNAME_C_Tax_ID = "C_Tax_ID"; + + /** Set Tax. + * Tax identifier + */ + public void setC_Tax_ID (int C_Tax_ID); + + /** Get Tax. + * Tax identifier + */ + public int getC_Tax_ID(); + + public org.compiere.model.I_C_Tax getC_Tax() throws RuntimeException; + /** Column name Created */ public static final String COLUMNNAME_Created = "Created"; diff --git a/org.adempiere.base/src/org/compiere/model/I_M_RMATax.java b/org.adempiere.base/src/org/compiere/model/I_M_RMATax.java new file mode 100644 index 0000000000..bcf9aa79a9 --- /dev/null +++ b/org.adempiere.base/src/org/compiere/model/I_M_RMATax.java @@ -0,0 +1,200 @@ +/****************************************************************************** + * Product: iDempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2012 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.math.BigDecimal; +import java.sql.Timestamp; +import org.compiere.util.KeyNamePair; + +/** Generated Interface for M_RMATax + * @author iDempiere (generated) + * @version Release 1.0a + */ +public interface I_M_RMATax +{ + + /** TableName=M_RMATax */ + public static final String Table_Name = "M_RMATax"; + + /** AD_Table_ID=200055 */ + public static final int Table_ID = 200055; + + KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); + + /** AccessLevel = 1 - Org + */ + BigDecimal accessLevel = BigDecimal.valueOf(1); + + /** 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 C_Tax_ID */ + public static final String COLUMNNAME_C_Tax_ID = "C_Tax_ID"; + + /** Set Tax. + * Tax identifier + */ + public void setC_Tax_ID (int C_Tax_ID); + + /** Get Tax. + * Tax identifier + */ + public int getC_Tax_ID(); + + public org.compiere.model.I_C_Tax getC_Tax() 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 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 IsTaxIncluded */ + public static final String COLUMNNAME_IsTaxIncluded = "IsTaxIncluded"; + + /** Set Price includes Tax. + * Tax is included in the price + */ + public void setIsTaxIncluded (boolean IsTaxIncluded); + + /** Get Price includes Tax. + * Tax is included in the price + */ + public boolean isTaxIncluded(); + + /** Column name M_RMA_ID */ + public static final String COLUMNNAME_M_RMA_ID = "M_RMA_ID"; + + /** Set RMA. + * Return Material Authorization + */ + public void setM_RMA_ID (int M_RMA_ID); + + /** Get RMA. + * Return Material Authorization + */ + public int getM_RMA_ID(); + + public org.compiere.model.I_M_RMA getM_RMA() throws RuntimeException; + + /** Column name M_RMATax_UU */ + public static final String COLUMNNAME_M_RMATax_UU = "M_RMATax_UU"; + + /** Set M_RMATax_UU */ + public void setM_RMATax_UU (String M_RMATax_UU); + + /** Get M_RMATax_UU */ + public String getM_RMATax_UU(); + + /** 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 TaxAmt */ + public static final String COLUMNNAME_TaxAmt = "TaxAmt"; + + /** Set Tax Amount. + * Tax Amount for a document + */ + public void setTaxAmt (BigDecimal TaxAmt); + + /** Get Tax Amount. + * Tax Amount for a document + */ + public BigDecimal getTaxAmt(); + + /** Column name TaxBaseAmt */ + public static final String COLUMNNAME_TaxBaseAmt = "TaxBaseAmt"; + + /** Set Tax base Amount. + * Base for calculating the tax amount + */ + public void setTaxBaseAmt (BigDecimal TaxBaseAmt); + + /** Get Tax base Amount. + * Base for calculating the tax amount + */ + public BigDecimal getTaxBaseAmt(); + + /** 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(); +} diff --git a/org.adempiere.base/src/org/compiere/model/MRMA.java b/org.adempiere.base/src/org/compiere/model/MRMA.java index 926553edf2..e901ac55c6 100644 --- a/org.adempiere.base/src/org/compiere/model/MRMA.java +++ b/org.adempiere.base/src/org/compiere/model/MRMA.java @@ -81,6 +81,8 @@ public class MRMA extends X_M_RMA implements DocAction /** Lines */ private MRMALine[] m_lines = null; + /** Tax Lines */ + private MRMATax[] m_taxes = null; /** The Shipment */ private MInOut m_inout = null; @@ -105,6 +107,23 @@ public class MRMA extends X_M_RMA implements DocAction list.toArray (m_lines); return m_lines; } // getLines + + /** + * Get Taxes of RMA + * @param requery requery + * @return array of taxes + */ + public MRMATax[] getTaxes(boolean requery) + { + if (m_taxes != null && !requery) + return m_taxes; + // + List list = new Query(getCtx(), I_M_RMATax.Table_Name, "M_RMA_ID=?", get_TrxName()) + .setParameters(get_ID()) + .list(); + m_taxes = list.toArray(new MRMATax[list.size()]); + return m_taxes; + } /** * Get Shipment @@ -323,11 +342,21 @@ public class MRMA extends X_M_RMA implements DocAction for (MRMALine line : lines) { - if (!line.checkQty()) { - m_processMsg = "@AmtReturned>Shipped@"; - return DocAction.STATUS_Invalid; + if (line.getM_InOutLine_ID() != 0) + { + if (!line.checkQty()) + { + m_processMsg = "@AmtReturned>Shipped@"; + return DocAction.STATUS_Invalid; + } } } + + if (!calculateTaxTotal()) + { + m_processMsg = "Error calculating tax"; + return DocAction.STATUS_Invalid; + } // Updates Amount setAmt(getTotalAmount()); @@ -339,6 +368,84 @@ public class MRMA extends X_M_RMA implements DocAction m_justPrepared = true; return DocAction.STATUS_InProgress; } // prepareIt + + /** + * Calculate Tax and Total + * @return true if tax total calculated + */ + public boolean calculateTaxTotal() + { + log.fine(""); + // Delete Taxes + DB.executeUpdateEx("DELETE M_RMATax WHERE M_RMA_ID=" + getM_RMA_ID(), get_TrxName()); + m_taxes = null; + + // Lines + BigDecimal totalLines = Env.ZERO; + ArrayList taxList = new ArrayList(); + MRMALine[] lines = getLines(false); + for (int i = 0; i < lines.length; i++) + { + MRMALine line = lines[i]; + Integer taxID = new Integer(line.getC_Tax_ID()); + if (!taxList.contains(taxID)) + { + MRMATax oTax = MRMATax.get (line, getPrecision(), + false, get_TrxName()); // current Tax + oTax.setIsTaxIncluded(isTaxIncluded()); + if (!oTax.calculateTaxFromLines()) + return false; + if (!oTax.save(get_TrxName())) + return false; + taxList.add(taxID); + } + totalLines = totalLines.add(line.getLineNetAmt()); + } + + // Taxes + BigDecimal grandTotal = totalLines; + MRMATax[] taxes = getTaxes(true); + for (int i = 0; i < taxes.length; i++) + { + MRMATax oTax = taxes[i]; + MTax tax = oTax.getTax(); + if (tax.isSummary()) + { + MTax[] cTaxes = tax.getChildTaxes(false); + for (int j = 0; j < cTaxes.length; j++) + { + MTax cTax = cTaxes[j]; + BigDecimal taxAmt = cTax.calculateTax(oTax.getTaxBaseAmt(), isTaxIncluded(), getPrecision()); + // + MRMATax newOTax = new MRMATax(getCtx(), 0, get_TrxName()); + newOTax.setClientOrg(this); + newOTax.setM_RMA_ID(getM_RMA_ID()); + newOTax.setC_Tax_ID(cTax.getC_Tax_ID()); + newOTax.setPrecision(getPrecision()); + newOTax.setIsTaxIncluded(isTaxIncluded()); + newOTax.setTaxBaseAmt(oTax.getTaxBaseAmt()); + newOTax.setTaxAmt(taxAmt); + if (!newOTax.save(get_TrxName())) + return false; + // + if (!isTaxIncluded()) + grandTotal = grandTotal.add(taxAmt); + } + if (!oTax.delete(true, get_TrxName())) + return false; + if (!oTax.save(get_TrxName())) + return false; + } + else + { + if (!isTaxIncluded()) + grandTotal = grandTotal.add(oTax.getTaxAmt()); + } + } + // + setAmt(grandTotal); + return true; + } /** * Approve Document @@ -654,6 +761,14 @@ public class MRMA extends X_M_RMA implements DocAction return false; } + // update taxes + MRMATax[] taxes = getTaxes(true); + for (MRMATax tax : taxes ) + { + if ( !(tax.calculateTaxFromLines() && tax.save()) ) + return false; + } + // After Void m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_VOID); if (m_processMsg != null) @@ -743,6 +858,15 @@ public class MRMA extends X_M_RMA implements DocAction return false; } // reActivateIt + + /** + * Get Currency Precision + * @return precision + */ + public int getPrecision() + { + return MCurrency.getStdPrecision(getCtx(), getC_Currency_ID()); + } /** * Set Processed. diff --git a/org.adempiere.base/src/org/compiere/model/MRMALine.java b/org.adempiere.base/src/org/compiere/model/MRMALine.java index aba1e32c84..a2e045f7dd 100644 --- a/org.adempiere.base/src/org/compiere/model/MRMALine.java +++ b/org.adempiere.base/src/org/compiere/model/MRMALine.java @@ -50,7 +50,7 @@ public class MRMALine extends X_M_RMALine if (M_RMALine_ID == 0) { setQty(Env.ONE); - this.setQtyDelivered(Env.ONE); + this.setQtyDelivered(Env.ZERO); } init(); @@ -69,12 +69,17 @@ public class MRMALine extends X_M_RMALine } // MRMALine /** Shipment Line */ - private MInOutLine m_ioLine = null; + private MInOutLine m_ioLine = null; + /** Product */ + private MProduct m_product = null; + /** Charge */ + private MCharge m_charge = null; + /** Tax */ + private MTax m_tax = null; /** Parent */ - private MRMA m_parent = null; + private MRMA m_parent = null; private int precision = 0; - private int taxId = 0; private BigDecimal unitAmount = Env.ZERO; private BigDecimal originalQty = Env.ZERO; @@ -90,7 +95,7 @@ public class MRMALine extends X_M_RMALine + "AND IsTaxExempt='Y' AND ValidFrom < SYSDATE ORDER BY IsDefault DESC"; // Set tax for charge as exempt - taxId = DB.getSQLValueEx(null, sql, Env.getAD_Client_ID(getCtx())); + setC_Tax_ID(DB.getSQLValueEx(null, sql, Env.getAD_Client_ID(getCtx()))); m_ioLine = null; } else @@ -108,7 +113,7 @@ public class MRMALine extends X_M_RMALine precision = invoiceLine.getPrecision(); unitAmount = invoiceLine.getPriceEntered(); originalQty = invoiceLine.getQtyInvoiced(); - taxId = invoiceLine.getC_Tax_ID(); + setC_Tax_ID(invoiceLine.getC_Tax_ID()); } else if (m_ioLine.getC_OrderLine_ID() != 0) { @@ -116,7 +121,7 @@ public class MRMALine extends X_M_RMALine precision = orderLine.getPrecision(); unitAmount = orderLine.getPriceEntered(); originalQty = orderLine.getQtyDelivered(); - taxId = orderLine.getC_Tax_ID(); + setC_Tax_ID(orderLine.getC_Tax_ID()); } else { @@ -189,22 +194,54 @@ public class MRMALine extends X_M_RMALine */ public BigDecimal getTotalAmt() { - BigDecimal totalAmt = Env.ZERO; - BigDecimal taxAmt = Env.ZERO; - - if (Env.ZERO.compareTo(getQty()) != 0 && Env.ZERO.compareTo(getAmt()) != 0) - { - totalAmt = getQty().multiply(getAmt()); - if (!getParent().isTaxIncluded()) - { - MTax tax = MTax.get (getCtx(), taxId); - taxAmt = tax.calculateTax(getQty().multiply(unitAmount), - getParent().isTaxIncluded(), precision); - } - } - - totalAmt = totalAmt.add(taxAmt); - return totalAmt; + BigDecimal bd = getAmt().multiply(getQty()); + + boolean documentLevel = getTax().isDocumentLevel(); + + // juddm: Tax Exempt & Tax Included in Price List & not Document Level - Adjust Line Amount + // http://sourceforge.net/tracker/index.php?func=detail&aid=1733602&group_id=176962&atid=879332 + if (getParent().isTaxIncluded() && !documentLevel) { + BigDecimal taxStdAmt = Env.ZERO, taxThisAmt = Env.ZERO; + + MTax orderTax = getTax(); + MTax stdTax = null; + + // get the standard tax + if (getProduct() == null) + { + if (getCharge() != null) // Charge + { + stdTax = new MTax (getCtx(), + ((MTaxCategory) getCharge().getC_TaxCategory()).getDefaultTax().getC_Tax_ID(), + get_TrxName()); + } + + } + else // Product + stdTax = new MTax (getCtx(), + ((MTaxCategory) getProduct().getC_TaxCategory()).getDefaultTax().getC_Tax_ID(), + get_TrxName()); + + if (stdTax != null) + { + log.fine("stdTax rate is " + stdTax.getRate()); + log.fine("orderTax rate is " + orderTax.getRate()); + + taxThisAmt = taxThisAmt.add(orderTax.calculateTax(bd, getParent().isTaxIncluded(), getPrecision())); + taxStdAmt = taxStdAmt.add(stdTax.calculateTax(bd, getParent().isTaxIncluded(), getPrecision())); + + bd = bd.subtract(taxStdAmt).add(taxThisAmt); + + log.fine("Price List includes Tax and Tax Changed on Order Line: New Tax Amt: " + + taxThisAmt + " Standard Tax Amt: " + taxStdAmt + " Line Net Amt: " + bd); + } + + } + int precision = getPrecision(); + if (bd.scale() > precision) + bd = bd.setScale(precision, BigDecimal.ROUND_HALF_UP); + + return bd; } // getAmt /** @@ -308,14 +345,36 @@ public class MRMALine extends X_M_RMALine return true; } + + private boolean updateOrderTax(boolean oldTax) { + MRMATax tax = MRMATax.get (this, getPrecision(), oldTax, get_TrxName()); + if (tax != null) { + if (!tax.calculateTaxFromLines()) + return false; + if (tax.getTaxAmt().signum() != 0) { + if (!tax.save(get_TrxName())) + return false; + } + else { + if (!tax.is_new() && !tax.delete(false, get_TrxName())) + return false; + } + } + return true; + } @Override protected boolean afterSave(boolean newRecord, boolean success) { if (!success) - { return success; - } + if (!newRecord && is_ValueChanged("C_Tax_ID")) + { + // Recalculate Tax for old Tax + if (!getParent().isProcessed()) + if (!updateOrderTax(true)) + return false; + } return updateHeaderAmt(); } @@ -341,6 +400,11 @@ public class MRMALine extends X_M_RMALine if (isProcessed() && !is_ValueChanged(COLUMNNAME_Processed)) return true; + // Recalculate Tax for this Tax + if (!getParent().isProcessed()) + if (!updateOrderTax(false)) + return false; + // Update RMA Header String sql = "UPDATE M_RMA " + " SET Amt=" @@ -410,6 +474,39 @@ public class MRMALine extends X_M_RMALine return m_ioLine.getM_Product_ID(); } + /** + * Get Product + * @return product or null + */ + public MProduct getProduct() + { + if (m_product == null && getM_Product_ID() != 0) + m_product = MProduct.get (getCtx(), getM_Product_ID()); + return m_product; + } + + /** + * Get Charge + * @return product or null + */ + public MCharge getCharge() + { + if (m_charge == null && getC_Charge_ID() != 0) + m_charge = MCharge.get (getCtx(), getC_Charge_ID()); + return m_charge; + } + + /** + * Get Tax + * @return tax + */ + protected MTax getTax() + { + if (m_tax == null) + m_tax = MTax.get(getCtx(), getC_Tax_ID()); + return m_tax; + } + /** * Get Project * @return project if based on shipment line and 0 for charge based @@ -540,13 +637,4 @@ public class MRMALine extends X_M_RMALine return m_ioLine.getM_Locator_ID(); } - /** - * Get Tax - * @return Tax based on Invoice/Order line and Tax exempt for charge based - */ - public int getC_Tax_ID() - { - return taxId; - } - } // MRMALine diff --git a/org.adempiere.base/src/org/compiere/model/MRMATax.java b/org.adempiere.base/src/org/compiere/model/MRMATax.java new file mode 100644 index 0000000000..dd1d433cf3 --- /dev/null +++ b/org.adempiere.base/src/org/compiere/model/MRMATax.java @@ -0,0 +1,273 @@ +/****************************************************************************** + * Copyright (C) 2013 Elaine Tan * + * Copyright (C) 2013 Trek Global + * 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; + +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; + +/** + * + * @author Elaine + * + */ +public class MRMATax extends X_M_RMATax +{ + /** + * + */ + private static final long serialVersionUID = -8702466449639865049L; + + /** + * Get Tax Line for RMA Line + * @param line RMA line + * @param precision currency precision + * @param oldTax get old tax + * @param trxName transaction + * @return existing or new tax + */ + public static MRMATax get (MRMALine line, int precision, + boolean oldTax, String trxName) + { + MRMATax retValue = null; + if (line == null || line.getM_RMA_ID() == 0) + { + s_log.fine("No RMA"); + return null; + } + int C_Tax_ID = line.getC_Tax_ID(); + boolean isOldTax = oldTax && line.is_ValueChanged(MRMATax.COLUMNNAME_C_Tax_ID); + if (isOldTax) + { + Object old = line.get_ValueOld(MRMATax.COLUMNNAME_C_Tax_ID); + if (old == null) + { + s_log.fine("No Old Tax"); + return null; + } + C_Tax_ID = ((Integer)old).intValue(); + } + if (C_Tax_ID == 0) + { + s_log.fine("No Tax"); + return null; + } + + String sql = "SELECT * FROM M_RMATax WHERE M_RMA_ID=? AND C_Tax_ID=?"; + PreparedStatement pstmt = null; + try + { + pstmt = DB.prepareStatement (sql, trxName); + pstmt.setInt (1, line.getM_RMA_ID()); + pstmt.setInt (2, C_Tax_ID); + ResultSet rs = pstmt.executeQuery (); + if (rs.next ()) + retValue = new MRMATax (line.getCtx(), 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; + } + if (retValue != null) + { + retValue.setPrecision(precision); + retValue.set_TrxName(trxName); + s_log.fine("(old=" + oldTax + ") " + retValue); + return retValue; + } + // If the old tax was required and there is no MOrderTax for that + // return null, and not create another MOrderTax - teo_sarca [ 1583825 ] + else { + if (isOldTax) + return null; + } + + // Create New + retValue = new MRMATax(line.getCtx(), 0, trxName); + retValue.set_TrxName(trxName); + retValue.setClientOrg(line); + retValue.setM_RMA_ID(line.getM_RMA_ID()); + retValue.setC_Tax_ID(line.getC_Tax_ID()); + retValue.setPrecision(precision); + retValue.setIsTaxIncluded(line.getParent().isTaxIncluded()); + s_log.fine("(new) " + retValue); + return retValue; + } + + /** Static Logger */ + private static CLogger s_log = CLogger.getCLogger (MRMATax.class); + + /************************************************************************** + * Persistence Constructor + * @param ctx context + * @param ignored ignored + * @param trxName transaction + */ + public MRMATax (Properties ctx, int ignored, String trxName) + { + super(ctx, 0, trxName); + if (ignored != 0) + throw new IllegalArgumentException("Multi-Key"); + setTaxAmt (Env.ZERO); + setTaxBaseAmt (Env.ZERO); + setIsTaxIncluded(false); + } + + /** + * Load Constructor. + * Set Precision and TaxIncluded for tax calculations! + * @param ctx context + * @param rs result set + * @param trxName transaction + */ + public MRMATax (Properties ctx, ResultSet rs, String trxName) + { + super(ctx, rs, trxName); + } + + /** Tax */ + private MTax m_tax = null; + /** Cached Precision */ + private Integer m_precision = null; + + /** + * Get Precision + * @return Returns the precision or 2 + */ + private int getPrecision () + { + if (m_precision == null) + return 2; + return m_precision.intValue(); + } // getPrecision + + /** + * Set Precision + * @param precision The precision to set. + */ + protected void setPrecision (int precision) + { + m_precision = new Integer(precision); + } // setPrecision + + /** + * Get Tax + * @return tax + */ + protected MTax getTax() + { + if (m_tax == null) + m_tax = MTax.get(getCtx(), getC_Tax_ID()); + return m_tax; + } // getTax + + /************************************************************************** + * Calculate/Set Tax Amt from Order Lines + * @return true if calculated + */ + public boolean calculateTaxFromLines () + { + BigDecimal taxBaseAmt = Env.ZERO; + BigDecimal taxAmt = Env.ZERO; + // + boolean documentLevel = getTax().isDocumentLevel(); + MTax tax = getTax(); + // + String sql = "SELECT LineNetAmt FROM M_RMALine WHERE M_RMA_ID=? AND C_Tax_ID=?"; + PreparedStatement pstmt = null; + try + { + pstmt = DB.prepareStatement (sql, get_TrxName()); + pstmt.setInt (1, getM_RMA_ID()); + pstmt.setInt (2, getC_Tax_ID()); + ResultSet rs = pstmt.executeQuery (); + while (rs.next ()) + { + BigDecimal baseAmt = rs.getBigDecimal(1); + taxBaseAmt = taxBaseAmt.add(baseAmt); + // + if (!documentLevel) // calculate line tax + taxAmt = taxAmt.add(tax.calculateTax(baseAmt, isTaxIncluded(), getPrecision())); + } + rs.close (); + pstmt.close (); + pstmt = null; + } + catch (Exception e) + { + log.log(Level.SEVERE, get_TrxName(), e); + taxBaseAmt = null; + } + try + { + if (pstmt != null) + pstmt.close (); + pstmt = null; + } + catch (Exception e) + { + pstmt = null; + } + // + if (taxBaseAmt == null) + return false; + + // Calculate Tax + if (documentLevel) // document level + taxAmt = tax.calculateTax(taxBaseAmt, isTaxIncluded(), getPrecision()); + setTaxAmt(taxAmt); + + // Set Base + if (isTaxIncluded()) + setTaxBaseAmt (taxBaseAmt.subtract(taxAmt)); + else + setTaxBaseAmt (taxBaseAmt); + log.fine(toString()); + return true; + } // calculateTaxFromLines + + /** + * String Representation + * @return info + */ + public String toString () + { + StringBuffer sb = new StringBuffer ("MRMATax[") + .append("M_RMA_ID=").append(getM_RMA_ID()) + .append(", C_Tax_ID=").append(getC_Tax_ID()) + .append(", Base=").append(getTaxBaseAmt()) + .append(", Tax=").append(getTaxAmt()) + .append ("]"); + return sb.toString (); + } // toString +} diff --git a/org.adempiere.base/src/org/compiere/model/X_M_RMALine.java b/org.adempiere.base/src/org/compiere/model/X_M_RMALine.java index d37ab61484..023e70a89b 100644 --- a/org.adempiere.base/src/org/compiere/model/X_M_RMALine.java +++ b/org.adempiere.base/src/org/compiere/model/X_M_RMALine.java @@ -32,7 +32,7 @@ public class X_M_RMALine extends PO implements I_M_RMALine, I_Persistent /** * */ - private static final long serialVersionUID = 20121031L; + private static final long serialVersionUID = 20130118L; /** Standard Constructor */ public X_M_RMALine (Properties ctx, int M_RMALine_ID, String trxName) @@ -40,6 +40,7 @@ public class X_M_RMALine extends PO implements I_M_RMALine, I_Persistent super (ctx, M_RMALine_ID, trxName); /** if (M_RMALine_ID == 0) { + setC_Tax_ID (0); setM_RMA_ID (0); setM_RMALine_ID (0); setProcessed (false); @@ -123,6 +124,34 @@ public class X_M_RMALine extends PO implements I_M_RMALine, I_Persistent return ii.intValue(); } + public org.compiere.model.I_C_Tax getC_Tax() throws RuntimeException + { + return (org.compiere.model.I_C_Tax)MTable.get(getCtx(), org.compiere.model.I_C_Tax.Table_Name) + .getPO(getC_Tax_ID(), get_TrxName()); } + + /** Set Tax. + @param C_Tax_ID + Tax identifier + */ + public void setC_Tax_ID (int C_Tax_ID) + { + if (C_Tax_ID < 1) + set_Value (COLUMNNAME_C_Tax_ID, null); + else + set_Value (COLUMNNAME_C_Tax_ID, Integer.valueOf(C_Tax_ID)); + } + + /** Get Tax. + @return Tax identifier + */ + public int getC_Tax_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_C_Tax_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + /** Set Description. @param Description Optional short description of the record diff --git a/org.adempiere.base/src/org/compiere/model/X_M_RMATax.java b/org.adempiere.base/src/org/compiere/model/X_M_RMATax.java new file mode 100644 index 0000000000..200ae79b6c --- /dev/null +++ b/org.adempiere.base/src/org/compiere/model/X_M_RMATax.java @@ -0,0 +1,236 @@ +/****************************************************************************** + * Product: iDempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2012 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.compiere.model; + +import java.math.BigDecimal; +import java.sql.ResultSet; +import java.util.Properties; +import org.compiere.util.Env; + +/** Generated Model for M_RMATax + * @author iDempiere (generated) + * @version Release 1.0a - $Id$ */ +public class X_M_RMATax extends PO implements I_M_RMATax, I_Persistent +{ + + /** + * + */ + private static final long serialVersionUID = 20130118L; + + /** Standard Constructor */ + public X_M_RMATax (Properties ctx, int M_RMATax_ID, String trxName) + { + super (ctx, M_RMATax_ID, trxName); + /** if (M_RMATax_ID == 0) + { + setC_Tax_ID (0); + setIsTaxIncluded (false); + setM_RMA_ID (0); + setProcessed (false); + setTaxAmt (Env.ZERO); + setTaxBaseAmt (Env.ZERO); + } */ + } + + /** Load Constructor */ + public X_M_RMATax (Properties ctx, ResultSet rs, String trxName) + { + super (ctx, rs, trxName); + } + + /** AccessLevel + * @return 1 - Org + */ + 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_M_RMATax[") + .append(get_ID()).append("]"); + return sb.toString(); + } + + public org.compiere.model.I_C_Tax getC_Tax() throws RuntimeException + { + return (org.compiere.model.I_C_Tax)MTable.get(getCtx(), org.compiere.model.I_C_Tax.Table_Name) + .getPO(getC_Tax_ID(), get_TrxName()); } + + /** Set Tax. + @param C_Tax_ID + Tax identifier + */ + public void setC_Tax_ID (int C_Tax_ID) + { + if (C_Tax_ID < 1) + set_ValueNoCheck (COLUMNNAME_C_Tax_ID, null); + else + set_ValueNoCheck (COLUMNNAME_C_Tax_ID, Integer.valueOf(C_Tax_ID)); + } + + /** Get Tax. + @return Tax identifier + */ + public int getC_Tax_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_C_Tax_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Price includes Tax. + @param IsTaxIncluded + Tax is included in the price + */ + public void setIsTaxIncluded (boolean IsTaxIncluded) + { + set_Value (COLUMNNAME_IsTaxIncluded, Boolean.valueOf(IsTaxIncluded)); + } + + /** Get Price includes Tax. + @return Tax is included in the price + */ + public boolean isTaxIncluded () + { + Object oo = get_Value(COLUMNNAME_IsTaxIncluded); + if (oo != null) + { + if (oo instanceof Boolean) + return ((Boolean)oo).booleanValue(); + return "Y".equals(oo); + } + return false; + } + + public org.compiere.model.I_M_RMA getM_RMA() throws RuntimeException + { + return (org.compiere.model.I_M_RMA)MTable.get(getCtx(), org.compiere.model.I_M_RMA.Table_Name) + .getPO(getM_RMA_ID(), get_TrxName()); } + + /** Set RMA. + @param M_RMA_ID + Return Material Authorization + */ + public void setM_RMA_ID (int M_RMA_ID) + { + if (M_RMA_ID < 1) + set_ValueNoCheck (COLUMNNAME_M_RMA_ID, null); + else + set_ValueNoCheck (COLUMNNAME_M_RMA_ID, Integer.valueOf(M_RMA_ID)); + } + + /** Get RMA. + @return Return Material Authorization + */ + public int getM_RMA_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_M_RMA_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set M_RMATax_UU. + @param M_RMATax_UU M_RMATax_UU */ + public void setM_RMATax_UU (String M_RMATax_UU) + { + set_Value (COLUMNNAME_M_RMATax_UU, M_RMATax_UU); + } + + /** Get M_RMATax_UU. + @return M_RMATax_UU */ + public String getM_RMATax_UU () + { + return (String)get_Value(COLUMNNAME_M_RMATax_UU); + } + + /** Set Processed. + @param Processed + The document has been processed + */ + public void setProcessed (boolean Processed) + { + set_Value (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 Tax Amount. + @param TaxAmt + Tax Amount for a document + */ + public void setTaxAmt (BigDecimal TaxAmt) + { + set_ValueNoCheck (COLUMNNAME_TaxAmt, TaxAmt); + } + + /** Get Tax Amount. + @return Tax Amount for a document + */ + public BigDecimal getTaxAmt () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_TaxAmt); + if (bd == null) + return Env.ZERO; + return bd; + } + + /** Set Tax base Amount. + @param TaxBaseAmt + Base for calculating the tax amount + */ + public void setTaxBaseAmt (BigDecimal TaxBaseAmt) + { + set_ValueNoCheck (COLUMNNAME_TaxBaseAmt, TaxBaseAmt); + } + + /** Get Tax base Amount. + @return Base for calculating the tax amount + */ + public BigDecimal getTaxBaseAmt () + { + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_TaxBaseAmt); + if (bd == null) + return Env.ZERO; + return bd; + } +} \ No newline at end of file From 626bc5c9771abcb48a0e7c6339f2032f6ca4b64d Mon Sep 17 00:00:00 2001 From: Elaine Tan Date: Fri, 18 Jan 2013 19:51:05 +0800 Subject: [PATCH 3/3] Ticket #1002158: Dashboard Columns - Bug --- .../src/org/adempiere/webui/desktop/DashboardController.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/DashboardController.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/DashboardController.java index b721a572f8..f2a636643e 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/DashboardController.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/DashboardController.java @@ -141,7 +141,7 @@ public class DashboardController implements EventListener { dps = MDashboardPreference.getForSession(isShowInDashboard, AD_User_ID, AD_Role_ID); // based on user and role noOfCols = MDashboardPreference.getForSessionColumnCount(isShowInDashboard, AD_User_ID, AD_Role_ID); - int dashboardWidth = isShowInDashboard ? 98 : 100; + int dashboardWidth = isShowInDashboard ? 98 : 99; width = noOfCols <= 0 ? dashboardWidth : dashboardWidth / noOfCols; int useWidth = 0; for (final MDashboardPreference dp : dps) @@ -395,6 +395,7 @@ public class DashboardController implements EventListener { { // additional column dashboardColumnLayout = new Vlayout(); + dashboardColumnLayout.setWidth("100%"); dashboardColumnLayout.setAttribute("ColumnNo", currentColumnNo + 1); dashboardColumnLayout.setAttribute("IsShowInDashboard", isShowInDashboard); dashboardColumnLayout.setAttribute("IsAdditionalColumn", true);