From 211d2f67b0b095057dc2247c6329403d48cc4b91 Mon Sep 17 00:00:00 2001 From: Dirk Niemeyer Date: Wed, 4 Apr 2012 11:29:44 -0500 Subject: [PATCH 01/29] IDEMPIERE-177 Complete Window Customization functionality --- .../model/CalloutWindowCustomization.java | 137 +++++++++++++++ .../src/org/compiere/model/GridFieldVO.java | 30 ++++ .../src/org/compiere/model/GridTabVO.java | 17 ++ .../src/org/compiere/model/GridWindowVO.java | 14 ++ .../src/org/compiere/model/MTree.java | 15 +- .../src/org/compiere/model/MUserDefField.java | 113 +++++++++++++ .../src/org/compiere/model/MUserDefTab.java | 115 +++++++++++++ .../src/org/compiere/model/MUserDefWin.java | 160 ++++++++++++++++++ 8 files changed, 600 insertions(+), 1 deletion(-) create mode 100644 org.adempiere.base.callout/src/org/compiere/model/CalloutWindowCustomization.java create mode 100644 org.adempiere.base/src/org/compiere/model/MUserDefField.java create mode 100644 org.adempiere.base/src/org/compiere/model/MUserDefTab.java create mode 100644 org.adempiere.base/src/org/compiere/model/MUserDefWin.java diff --git a/org.adempiere.base.callout/src/org/compiere/model/CalloutWindowCustomization.java b/org.adempiere.base.callout/src/org/compiere/model/CalloutWindowCustomization.java new file mode 100644 index 0000000000..68c0eece09 --- /dev/null +++ b/org.adempiere.base.callout/src/org/compiere/model/CalloutWindowCustomization.java @@ -0,0 +1,137 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 2012 Dirk Niemeyer * + * Copyright (C) 2012 action 42 GmbH * + * 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.util.Properties; + +import org.adempiere.model.GridTabWrapper; +import org.compiere.util.Env; + + +/** + * Window Customization Callout + * + * @author Dirk Niemeyer, action42 GmbH + */ +public class CalloutWindowCustomization extends CalloutEngine +{ + + /** + * + */ + private static final long serialVersionUID = 1L; + + /** + * Set fields to current values from DB for selected window. + * @param ctx context + * @param WindowNo window no + * @param mTab tab + * @param mField field + * @param value value + * @return null or error message + */ + public String window (Properties ctx, int WindowNo, GridTab mTab, GridField mField, Object value) + { + Integer AD_Window_ID = (Integer)value; + if (AD_Window_ID == null || AD_Window_ID.intValue() == 0) + return ""; + + I_AD_UserDef_Win ud_win = GridTabWrapper.create(mTab, I_AD_UserDef_Win.class); + + MWindow window = new MWindow(Env.getCtx(),AD_Window_ID, null); + String lang = (String)mTab.getValue("AD_Language"); + + ud_win.setName(window.get_Translation("Name", lang)); + ud_win.setDescription(window.get_Translation("Description", lang)); + ud_win.setHelp(window.get_Translation("Help", lang)); + + // XXX what for? + ud_win.setIsDefault(window.isDefault()); + + // default from menu, actual from role + // XXX Read Only + // XXX User updateable + + return NO_ERROR; + } // storeAttachmentOnFilesystem + + /** + * Set fields to current values from DB for selected Tab + * @param ctx context + * @param WindowNo window no + * @param mTab tab + * @param mField field + * @param value value + * @return null or error message + */ + public String tab (Properties ctx, int WindowNo, GridTab mTab, GridField mField, Object value) + { + Integer p_AD_Tab_ID = (Integer)value; + if (p_AD_Tab_ID == null || p_AD_Tab_ID.intValue() == 0) + return ""; + + I_AD_UserDef_Tab ud_tab = GridTabWrapper.create(mTab, I_AD_UserDef_Tab.class); + + MTab tab = new MTab(Env.getCtx(),p_AD_Tab_ID, null); + String lang = Env.getContext(ctx, WindowNo, "AD_Language"); + + ud_tab.setName(tab.get_Translation("Name", lang)); + ud_tab.setDescription(tab.get_Translation("Description", lang)); + ud_tab.setHelp(tab.get_Translation("Help", lang)); + + ud_tab.setIsSingleRow(tab.isSingleRow()); + ud_tab.setIsReadOnly(tab.isReadOnly()); + + return NO_ERROR; + } // storeArchiveOnFileSystem + + /** + * Set fields to current values from DB for selected Tab + * @param ctx context + * @param WindowNo window no + * @param mTab tab + * @param mField field + * @param value value + * @return null or error message + */ + public String field (Properties ctx, int WindowNo, GridTab mTab, GridField mField, Object value) + { + Integer p_AD_Field_ID = (Integer)value; + if (p_AD_Field_ID == null || p_AD_Field_ID.intValue() == 0) + return ""; + + I_AD_UserDef_Field ud_field = GridTabWrapper.create(mTab, I_AD_UserDef_Field.class); + + MField field = new MField(Env.getCtx(),p_AD_Field_ID, null); + String lang = Env.getContext(ctx, WindowNo, "AD_Language"); + + ud_field.setName(field.get_Translation("Name", lang)); + ud_field.setDescription(field.get_Translation("Description", lang)); + ud_field.setHelp(field.get_Translation("Help", lang)); + + ud_field.setIsDisplayed(field.isDisplayed()); + ud_field.setDisplayLength(field.getDisplayLength()); + ud_field.setDisplayLogic(field.getDisplayLogic()); + ud_field.setIsReadOnly(field.isReadOnly()); + // XXX from column? set to true for starters + ud_field.setIsUpdateable(true); + ud_field.setSeqNo(field.getSeqNo()); + ud_field.setIsSameLine(field.isSameLine()); + ud_field.setSortNo(field.getSortNo().intValue()); + + return NO_ERROR; + } // storeArchiveOnFileSystem + +} // CalloutClient diff --git a/org.adempiere.base/src/org/compiere/model/GridFieldVO.java b/org.adempiere.base/src/org/compiere/model/GridFieldVO.java index 446291c4a3..5eb1868686 100644 --- a/org.adempiere.base/src/org/compiere/model/GridFieldVO.java +++ b/org.adempiere.base/src/org/compiere/model/GridFieldVO.java @@ -203,6 +203,36 @@ public class GridFieldVO implements Serializable if (! client.isDisplayField(AD_Field_ID)) vo.IsDisplayed = false; } + // FR IDEMPIERE-177 + // Field Customization + if (vo.IsDisplayed) { + MUserDefField userDef = null; + userDef = MUserDefField.get(vo.ctx,AD_Field_ID, AD_Tab_ID, AD_Window_ID); + if (userDef != null) + { + vo.IsDisplayed = userDef.isDisplayed(); + if (userDef.getName() != null) + vo.Header = userDef.getName(); + if (userDef.getDescription() != null) + vo.Description = userDef.getDescription(); + if (userDef.getHelp() != null) + vo.Help = userDef.getHelp(); + vo.IsReadOnly = userDef.isReadOnly(); + vo.IsSameLine = userDef.isSameLine(); + vo.IsUpdateable = userDef.isUpdateable(); + if (userDef.getDisplayLength() > 0) + vo.DisplayLength = userDef.getDisplayLength(); + if (userDef.getDisplayLogic() != null) + vo.DisplayLogic = userDef.getDisplayLogic(); + if (userDef.getDefaultValue() != null) + vo.DefaultValue = userDef.getDefaultValue(); + if (userDef.getSortNo() > 0) + vo.SortNo = userDef.getSortNo(); + // ToDo SeqNo + //if (userDef.getSeqNo() > 0) + // vo.SeqNo = userDef.getSeqNo(); + } + } // vo.initFinish(); return vo; diff --git a/org.adempiere.base/src/org/compiere/model/GridTabVO.java b/org.adempiere.base/src/org/compiere/model/GridTabVO.java index 747fe23203..0ba49db8f8 100644 --- a/org.adempiere.base/src/org/compiere/model/GridTabVO.java +++ b/org.adempiere.base/src/org/compiere/model/GridTabVO.java @@ -101,7 +101,11 @@ public class GridTabVO implements Evaluatee, Serializable { vo.AD_Tab_ID = rs.getInt("AD_Tab_ID"); Env.setContext(vo.ctx, vo.WindowNo, vo.TabNo, GridTab.CTX_AD_Tab_ID, String.valueOf(vo.AD_Tab_ID)); + // FR IDEMPIERE-177 + MUserDefTab userDef = MUserDefTab.get(vo.ctx, vo.AD_Tab_ID, vo.AD_Window_ID); vo.Name = rs.getString("Name"); + if (userDef != null) + vo.Name = userDef.getName(); Env.setContext(vo.ctx, vo.WindowNo, vo.TabNo, GridTab.CTX_Name, vo.Name); // Translation Tab ** @@ -159,7 +163,12 @@ public class GridTabVO implements Evaluatee, Serializable } if (rs.getString("IsReadOnly").equals("Y")) vo.IsReadOnly = true; + if (userDef != null) + vo.IsReadOnly = userDef.isReadOnly(); vo.ReadOnlyLogic = rs.getString("ReadOnlyLogic"); + if (userDef != null) + vo.ReadOnlyLogic = userDef.get_ValueAsString("ReadOnlyLogic"); + if (rs.getString("IsInsertRecord").equals("N")) vo.IsInsertRecord = false; @@ -167,12 +176,20 @@ public class GridTabVO implements Evaluatee, Serializable vo.Description = rs.getString("Description"); if (vo.Description == null) vo.Description = ""; + if (userDef != null && userDef.getDescription() != null) + vo.Description = userDef.getDescription(); + vo.Help = rs.getString("Help"); if (vo.Help == null) vo.Help = ""; + if (userDef != null && userDef.getHelp() != null) + vo.Help = userDef.getHelp(); if (rs.getString("IsSingleRow").equals("Y")) vo.IsSingleRow = true; + if (userDef != null) + vo.IsSingleRow = userDef.isSingleRow(); + if (rs.getString("HasTree").equals("Y")) vo.HasTree = true; diff --git a/org.adempiere.base/src/org/compiere/model/GridWindowVO.java b/org.adempiere.base/src/org/compiere/model/GridWindowVO.java index a20ca7ab17..ccd6b2b0b1 100644 --- a/org.adempiere.base/src/org/compiere/model/GridWindowVO.java +++ b/org.adempiere.base/src/org/compiere/model/GridWindowVO.java @@ -183,6 +183,20 @@ public class GridWindowVO implements Serializable return null; } + // FR IDEMPIERE-177 + // User Customization + MUserDefWin userDef = MUserDefWin.getBestMatch(ctx, AD_Window_ID); + if (userDef != null) + { + if (userDef.getName() != null) + vo.Name = userDef.getName(); + if (userDef.getDescription() != null) + vo.Description = userDef.getDescription(); + if (userDef.getHelp() != null) + vo.Help = userDef.getHelp(); + // ToDo userDef.isDefault, userDef.isReadOnly, userDef.isUserUpdateable + } + // Create Tabs createTabs (vo); if (vo.Tabs == null || vo.Tabs.size() == 0) diff --git a/org.adempiere.base/src/org/compiere/model/MTree.java b/org.adempiere.base/src/org/compiere/model/MTree.java index 08c351e21d..8ca2f8aef0 100644 --- a/org.adempiere.base/src/org/compiere/model/MTree.java +++ b/org.adempiere.base/src/org/compiere/model/MTree.java @@ -509,7 +509,20 @@ public class MTree extends MTree_Base MRole role = MRole.getDefault(getCtx(), false); Boolean access = null; if (X_AD_Menu.ACTION_Window.equals(actionColor)) - access = role.getWindowAccess(AD_Window_ID); + { + access = role.getWindowAccess(AD_Window_ID); + // FR XXX + // Get Window Customization + MUserDefWin userDef = null; + userDef = MUserDefWin.getBestMatch(getCtx(), AD_Window_ID); + if (userDef != null) + { + if (userDef.getName() != null) + name = userDef.getName(); + if (userDef.getDescription() != null) + description = userDef.getDescription(); + } + } else if (X_AD_Menu.ACTION_Process.equals(actionColor) || X_AD_Menu.ACTION_Report.equals(actionColor)) access = role.getProcessAccess(AD_Process_ID); diff --git a/org.adempiere.base/src/org/compiere/model/MUserDefField.java b/org.adempiere.base/src/org/compiere/model/MUserDefField.java new file mode 100644 index 0000000000..58dd863bcc --- /dev/null +++ b/org.adempiere.base/src/org/compiere/model/MUserDefField.java @@ -0,0 +1,113 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 2012 Dirk Niemeyer * + * Copyright (C) 2012 action 42 GmbH * + * 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.sql.*; +import java.util.*; +import java.util.logging.Level; + +import org.compiere.util.CLogger; +import org.compiere.util.DB; + + +/** + * + * @author Dirk Niemeyer, action42 GmbH + * @version $Id$ + */ +public class MUserDefField extends X_AD_UserDef_Field +{ + /** + * + */ + private static final long serialVersionUID = 1L; + + + /** + * Standard constructor. + * You must implement this constructor for Adempiere Persistency + * @param ctx context + * @param ID the primary key ID + * @param trxName transaction + */ + public MUserDefField (Properties ctx, int ID, String trxName) + { + super (ctx, ID, trxName); + } // MyModelExample + + /** + * Optional Load Constructor. + * You would use this constructor to load several business objects. + * + * SELECT * FROM MyModelExample WHERE ... + * + * @param ctx context + * @param rs result set + * @param trxName transaction + */ + public MUserDefField (Properties ctx, ResultSet rs, String trxName) + { + super (ctx, rs, trxName); + } // MyModelExample + + + public static MUserDefField get (Properties ctx, int AD_Field_ID, int AD_Tab_ID, int AD_Window_ID ) + { + + MUserDefWin userdefWin = MUserDefWin.getBestMatch(ctx, AD_Window_ID); + if (userdefWin == null) + return null; + MUserDefTab userdefTab = MUserDefTab.getMatch(ctx, AD_Tab_ID, userdefWin.getAD_UserDef_Win_ID()); + if (userdefTab == null) + return null; + + MUserDefField retValue = null; + + StringBuffer sql = new StringBuffer("SELECT * " + + " FROM AD_UserDef_Field f " + + " WHERE f.AD_Field_ID=? AND f.IsActive='Y' " + + " AND f.AD_UserDef_Tab_ID=? "); + + PreparedStatement pstmt = null; + ResultSet rs = null; + try + { + // create statement + pstmt = DB.prepareStatement(sql.toString(), null); + pstmt.setInt(1, AD_Field_ID); + pstmt.setInt(2, userdefTab.getAD_UserDef_Tab_ID()); + // get data + rs = pstmt.executeQuery(); + if (rs.next()) + { + retValue = new MUserDefField(ctx,rs,null); + } + } + catch (SQLException ex) + { + CLogger.get().log(Level.SEVERE, sql.toString(), ex); + return null; + } + finally + { + DB.close(rs, pstmt); + rs = null; + pstmt = null; + } + + return retValue; + } + +} // MyModelExample diff --git a/org.adempiere.base/src/org/compiere/model/MUserDefTab.java b/org.adempiere.base/src/org/compiere/model/MUserDefTab.java new file mode 100644 index 0000000000..b9ad53bd19 --- /dev/null +++ b/org.adempiere.base/src/org/compiere/model/MUserDefTab.java @@ -0,0 +1,115 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 2012 Dirk Niemeyer * + * Copyright (C) 2012 action 42 GmbH * + * 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.sql.*; +import java.util.*; +import java.util.logging.Level; + +import org.compiere.util.CLogger; +import org.compiere.util.DB; + + +/** + * + * @author Dirk Niemeyer, action 42 GmbH + * @version $Id$ + */ +public class MUserDefTab extends X_AD_UserDef_Tab +{ + /** + * + */ + private static final long serialVersionUID = 1L; + + /** + * Standard constructor. + * You must implement this constructor for Adempiere Persistency + * @param ctx context + * @param ID the primary key ID + * @param trxName transaction + */ + public MUserDefTab (Properties ctx, int ID, String trxName) + { + super (ctx, ID, trxName); + } // MyModelExample + + /** + * Optional Load Constructor. + * You would use this constructor to load several business objects. + * + * SELECT * FROM MyModelExample WHERE ... + * + * @param ctx context + * @param rs result set + * @param trxName transaction + */ + public MUserDefTab (Properties ctx, ResultSet rs, String trxName) + { + super (ctx, rs, trxName); + } // MyModelExample + + + public static MUserDefTab getMatch (Properties ctx, int AD_Tab_ID, int AD_UserDefWin_ID ) + { + + MUserDefTab retValue = null; + + StringBuffer sql = new StringBuffer("SELECT * " + + " FROM AD_UserDef_Tab " + + " WHERE AD_UserDef_Win_ID=? AND IsActive='Y' " + + " AND AD_Tab_ID=? "); + + PreparedStatement pstmt = null; + ResultSet rs = null; + try + { + // create statement + pstmt = DB.prepareStatement(sql.toString(), null); + pstmt.setInt(1, AD_UserDefWin_ID); + pstmt.setInt(2, AD_Tab_ID); + // get data + rs = pstmt.executeQuery(); + if (rs.next()) + { + retValue = new MUserDefTab(ctx,rs,null); + } + } + catch (SQLException ex) + { + CLogger.get().log(Level.SEVERE, sql.toString(), ex); + return null; + } + finally + { + DB.close(rs, pstmt); + rs = null; + pstmt = null; + } + + return retValue; + } + + public static MUserDefTab get (Properties ctx, int AD_Tab_ID, int AD_Window_ID) { + + MUserDefWin userdefWin = MUserDefWin.getBestMatch(ctx, AD_Window_ID); + if (userdefWin == null) + return null; + + return getMatch(ctx, AD_Tab_ID, userdefWin.getAD_UserDef_Win_ID()); + + } + +} // MyModelExample diff --git a/org.adempiere.base/src/org/compiere/model/MUserDefWin.java b/org.adempiere.base/src/org/compiere/model/MUserDefWin.java new file mode 100644 index 0000000000..6a7d93acd5 --- /dev/null +++ b/org.adempiere.base/src/org/compiere/model/MUserDefWin.java @@ -0,0 +1,160 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 2012 Dirk Niemeyer * + * Copyright (C) 2012 action 42 GmbH * + * 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.sql.*; +import java.util.*; +import java.util.logging.Level; + +import org.compiere.util.CLogger; +import org.compiere.util.DB; +import org.compiere.util.Env; + +/** + * + * @author Dirk Niemeyer, action42 GmbH + * @version $Id$ + */ +public class MUserDefWin extends X_AD_UserDef_Win +{ + /** + * + */ + private static final long serialVersionUID = 1L; + + /** + * Standard constructor. + * You must implement this constructor for Adempiere Persistency + * @param ctx context + * @param ID the primary key ID + * @param trxName transaction + */ + public MUserDefWin (Properties ctx, int ID, String trxName) + { + super (ctx, ID, trxName); + } // MyModelExample + + /** + * Optional Load Constructor. + * You would use this constructor to load several business objects. + * + * SELECT * FROM MyModelExample WHERE ... + * + * @param ctx context + * @param rs result set + * @param trxName transaction + */ + public MUserDefWin (Properties ctx, ResultSet rs, String trxName) + { + super (ctx, rs, trxName); + } // MyModelExample + + + private static MUserDefWin[] getAll (Properties ctx, int window_ID ) + { + + List list = new ArrayList(); + + StringBuffer sql = new StringBuffer("SELECT * " + + " FROM AD_UserDef_Win w " + + " WHERE w.AD_Window_ID=? AND w.IsActive='Y' " + + " AND w.AD_Language=? " + + " AND w.AD_Client_ID=? "); + PreparedStatement pstmt = null; + ResultSet rs = null; + try + { + // create statement + pstmt = DB.prepareStatement(sql.toString(), null); + pstmt.setInt(1, window_ID); + pstmt.setString(2, Env.getAD_Language(ctx)); + pstmt.setInt(3, Env.getAD_Client_ID(ctx)); + // get data + rs = pstmt.executeQuery(); + while (rs.next()) + { + MUserDefWin userDef = new MUserDefWin(Env.getCtx(),rs,null); + list.add(userDef); + } + } + catch (SQLException ex) + { + CLogger.get().log(Level.SEVERE, sql.toString(), ex); + return null; + } + finally + { + DB.close(rs, pstmt); + rs = null; + pstmt = null; + } + + if (list.size() == 0) + return null; + + return list.toArray(new MUserDefWin[list.size()]); + + } + + public static MUserDefWin getBestMatch (Properties ctx, int window_ID) + { + // parameters + final int AD_Org_ID = Env.getAD_Org_ID(ctx); + //final int anyOrg = 0; + final int AD_Role_ID = Env.getAD_Role_ID(ctx); + //final String anyRole = "NULL"; + final int AD_User_ID = Env.getAD_User_ID(ctx); + //final String anyUser = "NULL"; + + // candidates + MUserDefWin[] candidates = getAll(ctx, window_ID); + if (candidates == null) + return null; + final int size = candidates.length; + int[] weight = new int[size]; + + // this user + this role + this org => weight = 7 + // this user + this role + any org => weight = 6 + // this user + any role + this org => weight = 5 + // this user + any role + any org => weight = 4 + // any user + this role + this org => weight = 3 + // any user + this role + any org => weight = 2 + // any user + any role + this org => weight = 1 + // any user + any role + any org => weight = 0 + for (int i=0; i < size; i++) + { + weight[i] = 0; + if (candidates[i].getAD_User_ID() == AD_User_ID) + weight[i] = weight[i] + 4; + if (candidates[i].getAD_Role_ID() == AD_Role_ID) + weight[i] = weight[i] + 2; + if (candidates[i].getAD_Org_ID() == AD_Org_ID) + weight[i] = weight[i] + 1; + // others are implicit + } + + int maximum = weight[0]; // start with the first value + int maxindex = 0; + for (int j=0; j maximum) { + maximum = weight[j]; // new maximum + maxindex = j; + } + } + + return candidates[maxindex]; + } + +} // MUserDefWin From f34782257d17c8ebdc40855cabaf7e9d8d62c1bd Mon Sep 17 00:00:00 2001 From: Dirk Niemeyer Date: Tue, 6 Mar 2012 11:10:20 +0100 Subject: [PATCH 02/29] IDEMPIERE-177 Corrected selection process --- .../src/org/compiere/model/MUserDefWin.java | 34 +++++++++++++++---- 1 file changed, 27 insertions(+), 7 deletions(-) diff --git a/org.adempiere.base/src/org/compiere/model/MUserDefWin.java b/org.adempiere.base/src/org/compiere/model/MUserDefWin.java index 6a7d93acd5..e19d118074 100644 --- a/org.adempiere.base/src/org/compiere/model/MUserDefWin.java +++ b/org.adempiere.base/src/org/compiere/model/MUserDefWin.java @@ -133,16 +133,32 @@ public class MUserDefWin extends X_AD_UserDef_Win // any user + this role + any org => weight = 2 // any user + any role + this org => weight = 1 // any user + any role + any org => weight = 0 + // other user or other role or other org => weight = -1 and thus ruled out for (int i=0; i < size; i++) { weight[i] = 0; - if (candidates[i].getAD_User_ID() == AD_User_ID) - weight[i] = weight[i] + 4; - if (candidates[i].getAD_Role_ID() == AD_Role_ID) - weight[i] = weight[i] + 2; - if (candidates[i].getAD_Org_ID() == AD_Org_ID) - weight[i] = weight[i] + 1; - // others are implicit + if (candidates[i].getAD_User_ID() > 0) { + if (candidates[i].getAD_User_ID() == AD_User_ID) { + weight[i] = weight[i] + 4; + } else { + weight[i] = -1; + } + } + if (weight[i] > -1 && candidates[i].getAD_Role_ID() > 0) { + if (candidates[i].getAD_Role_ID() == AD_Role_ID) { + weight[i] = weight[i] + 2; + } else { + weight[i] = -1; + } + } + if (weight[i] > -1 && candidates[i].getAD_Org_ID() > 0) { + if (candidates[i].getAD_Org_ID() == AD_Org_ID) { + weight[i] = weight[i] + 1; + } else { + weight[i] = -1; + } + } + // others are implicit } int maximum = weight[0]; // start with the first value @@ -154,7 +170,11 @@ public class MUserDefWin extends X_AD_UserDef_Win } } + if (weight[maxindex] > -1) { return candidates[maxindex]; + } else { + return null; + } } } // MUserDefWin From b826db0c0c67b7dba3352d9f13eda5458b803593 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Wed, 4 Apr 2012 11:34:29 -0500 Subject: [PATCH 03/29] IDEMPIERE-177 Model Generated for iDempiere --- .../compiere/model/I_AD_UserDef_Field.java | 15 ++++- .../org/compiere/model/I_AD_UserDef_Tab.java | 28 +++++++++- .../org/compiere/model/I_AD_UserDef_Win.java | 17 ++++-- .../compiere/model/X_AD_UserDef_Field.java | 48 ++++++++++------ .../org/compiere/model/X_AD_UserDef_Tab.java | 56 ++++++++++++++----- .../org/compiere/model/X_AD_UserDef_Win.java | 46 +++++++++------ 6 files changed, 154 insertions(+), 56 deletions(-) diff --git a/org.adempiere.base/src/org/compiere/model/I_AD_UserDef_Field.java b/org.adempiere.base/src/org/compiere/model/I_AD_UserDef_Field.java index 25d58a2aaf..019141a21d 100644 --- a/org.adempiere.base/src/org/compiere/model/I_AD_UserDef_Field.java +++ b/org.adempiere.base/src/org/compiere/model/I_AD_UserDef_Field.java @@ -31,7 +31,7 @@ public interface I_AD_UserDef_Field public static final String Table_Name = "AD_UserDef_Field"; /** AD_Table_ID=464 */ - public static final int Table_ID = MTable.getTable_ID(Table_Name); + public static final int Table_ID = 464; KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); @@ -62,7 +62,7 @@ public interface I_AD_UserDef_Field */ public int getAD_Field_ID(); - public I_AD_Field getAD_Field() throws RuntimeException; + public org.compiere.model.I_AD_Field getAD_Field() throws RuntimeException; /** Column name AD_Org_ID */ public static final String COLUMNNAME_AD_Org_ID = "AD_Org_ID"; @@ -86,6 +86,15 @@ public interface I_AD_UserDef_Field /** Get User defined Field */ public int getAD_UserDef_Field_ID(); + /** Column name AD_UserDef_Field_UU */ + public static final String COLUMNNAME_AD_UserDef_Field_UU = "AD_UserDef_Field_UU"; + + /** Set AD_UserDef_Field_UU */ + public void setAD_UserDef_Field_UU (String AD_UserDef_Field_UU); + + /** Get AD_UserDef_Field_UU */ + public String getAD_UserDef_Field_UU(); + /** Column name AD_UserDef_Tab_ID */ public static final String COLUMNNAME_AD_UserDef_Tab_ID = "AD_UserDef_Tab_ID"; @@ -95,7 +104,7 @@ public interface I_AD_UserDef_Field /** Get User defined Tab */ public int getAD_UserDef_Tab_ID(); - public I_AD_UserDef_Tab getAD_UserDef_Tab() throws RuntimeException; + public org.compiere.model.I_AD_UserDef_Tab getAD_UserDef_Tab() throws RuntimeException; /** Column name Created */ public static final String COLUMNNAME_Created = "Created"; diff --git a/org.adempiere.base/src/org/compiere/model/I_AD_UserDef_Tab.java b/org.adempiere.base/src/org/compiere/model/I_AD_UserDef_Tab.java index 723d43b8fe..b1a493072a 100644 --- a/org.adempiere.base/src/org/compiere/model/I_AD_UserDef_Tab.java +++ b/org.adempiere.base/src/org/compiere/model/I_AD_UserDef_Tab.java @@ -31,7 +31,7 @@ public interface I_AD_UserDef_Tab public static final String Table_Name = "AD_UserDef_Tab"; /** AD_Table_ID=466 */ - public static final int Table_ID = MTable.getTable_ID(Table_Name); + public static final int Table_ID = 466; KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); @@ -75,7 +75,7 @@ public interface I_AD_UserDef_Tab */ public int getAD_Tab_ID(); - public I_AD_Tab getAD_Tab() throws RuntimeException; + public org.compiere.model.I_AD_Tab getAD_Tab() throws RuntimeException; /** Column name AD_UserDef_Tab_ID */ public static final String COLUMNNAME_AD_UserDef_Tab_ID = "AD_UserDef_Tab_ID"; @@ -86,6 +86,15 @@ public interface I_AD_UserDef_Tab /** Get User defined Tab */ public int getAD_UserDef_Tab_ID(); + /** Column name AD_UserDef_Tab_UU */ + public static final String COLUMNNAME_AD_UserDef_Tab_UU = "AD_UserDef_Tab_UU"; + + /** Set AD_UserDef_Tab_UU */ + public void setAD_UserDef_Tab_UU (String AD_UserDef_Tab_UU); + + /** Get AD_UserDef_Tab_UU */ + public String getAD_UserDef_Tab_UU(); + /** Column name AD_UserDef_Win_ID */ public static final String COLUMNNAME_AD_UserDef_Win_ID = "AD_UserDef_Win_ID"; @@ -95,7 +104,7 @@ public interface I_AD_UserDef_Tab /** Get User defined Window */ public int getAD_UserDef_Win_ID(); - public I_AD_UserDef_Win getAD_UserDef_Win() throws RuntimeException; + public org.compiere.model.I_AD_UserDef_Win getAD_UserDef_Win() throws RuntimeException; /** Column name Created */ public static final String COLUMNNAME_Created = "Created"; @@ -204,6 +213,19 @@ public interface I_AD_UserDef_Tab */ public String getName(); + /** Column name ReadOnlyLogic */ + public static final String COLUMNNAME_ReadOnlyLogic = "ReadOnlyLogic"; + + /** Set Read Only Logic. + * Logic to determine if field is read only (applies only when field is read-write) + */ + public void setReadOnlyLogic (String ReadOnlyLogic); + + /** Get Read Only Logic. + * Logic to determine if field is read only (applies only when field is read-write) + */ + public String getReadOnlyLogic(); + /** Column name Updated */ public static final String COLUMNNAME_Updated = "Updated"; diff --git a/org.adempiere.base/src/org/compiere/model/I_AD_UserDef_Win.java b/org.adempiere.base/src/org/compiere/model/I_AD_UserDef_Win.java index 51e2dcce52..db6a4e2edf 100644 --- a/org.adempiere.base/src/org/compiere/model/I_AD_UserDef_Win.java +++ b/org.adempiere.base/src/org/compiere/model/I_AD_UserDef_Win.java @@ -31,7 +31,7 @@ public interface I_AD_UserDef_Win public static final String Table_Name = "AD_UserDef_Win"; /** AD_Table_ID=467 */ - public static final int Table_ID = MTable.getTable_ID(Table_Name); + public static final int Table_ID = 467; KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); @@ -88,7 +88,7 @@ public interface I_AD_UserDef_Win */ public int getAD_Role_ID(); - public I_AD_Role getAD_Role() throws RuntimeException; + public org.compiere.model.I_AD_Role getAD_Role() throws RuntimeException; /** Column name AD_UserDef_Win_ID */ public static final String COLUMNNAME_AD_UserDef_Win_ID = "AD_UserDef_Win_ID"; @@ -99,6 +99,15 @@ public interface I_AD_UserDef_Win /** Get User defined Window */ public int getAD_UserDef_Win_ID(); + /** Column name AD_UserDef_Win_UU */ + public static final String COLUMNNAME_AD_UserDef_Win_UU = "AD_UserDef_Win_UU"; + + /** Set AD_UserDef_Win_UU */ + public void setAD_UserDef_Win_UU (String AD_UserDef_Win_UU); + + /** Get AD_UserDef_Win_UU */ + public String getAD_UserDef_Win_UU(); + /** Column name AD_User_ID */ public static final String COLUMNNAME_AD_User_ID = "AD_User_ID"; @@ -112,7 +121,7 @@ public interface I_AD_UserDef_Win */ public int getAD_User_ID(); - public I_AD_User getAD_User() throws RuntimeException; + public org.compiere.model.I_AD_User getAD_User() throws RuntimeException; /** Column name AD_Window_ID */ public static final String COLUMNNAME_AD_Window_ID = "AD_Window_ID"; @@ -127,7 +136,7 @@ public interface I_AD_UserDef_Win */ public int getAD_Window_ID(); - public I_AD_Window getAD_Window() throws RuntimeException; + public org.compiere.model.I_AD_Window getAD_Window() throws RuntimeException; /** Column name Created */ public static final String COLUMNNAME_Created = "Created"; diff --git a/org.adempiere.base/src/org/compiere/model/X_AD_UserDef_Field.java b/org.adempiere.base/src/org/compiere/model/X_AD_UserDef_Field.java index eb0f622721..6d84180dfb 100644 --- a/org.adempiere.base/src/org/compiere/model/X_AD_UserDef_Field.java +++ b/org.adempiere.base/src/org/compiere/model/X_AD_UserDef_Field.java @@ -30,7 +30,7 @@ public class X_AD_UserDef_Field extends PO implements I_AD_UserDef_Field, I_Pers /** * */ - private static final long serialVersionUID = 20100614L; + private static final long serialVersionUID = 20120404L; /** Standard Constructor */ public X_AD_UserDef_Field (Properties ctx, int AD_UserDef_Field_ID, String trxName) @@ -41,12 +41,14 @@ public class X_AD_UserDef_Field extends PO implements I_AD_UserDef_Field, I_Pers setAD_Field_ID (0); setAD_UserDef_Field_ID (0); setAD_UserDef_Tab_ID (0); - setDefaultValue (null); - setIsDisplayed (false); + setIsDisplayed (true); +// 'Y' setIsReadOnly (false); +// 'N' setIsSameLine (false); - setName (null); +// 'N' setSeqNo (0); +// 0 } */ } @@ -78,9 +80,9 @@ public class X_AD_UserDef_Field extends PO implements I_AD_UserDef_Field, I_Pers return sb.toString(); } - public I_AD_Field getAD_Field() throws RuntimeException + public org.compiere.model.I_AD_Field getAD_Field() throws RuntimeException { - return (I_AD_Field)MTable.get(getCtx(), I_AD_Field.Table_Name) + return (org.compiere.model.I_AD_Field)MTable.get(getCtx(), org.compiere.model.I_AD_Field.Table_Name) .getPO(getAD_Field_ID(), get_TrxName()); } /** Set Field. @@ -106,6 +108,14 @@ public class X_AD_UserDef_Field extends PO implements I_AD_UserDef_Field, I_Pers return ii.intValue(); } + /** Get Record ID/ColumnName + @return ID/ColumnName pair + */ + public KeyNamePair getKeyNamePair() + { + return new KeyNamePair(get_ID(), String.valueOf(getAD_Field_ID())); + } + /** Set User defined Field. @param AD_UserDef_Field_ID User defined Field */ public void setAD_UserDef_Field_ID (int AD_UserDef_Field_ID) @@ -126,9 +136,23 @@ public class X_AD_UserDef_Field extends PO implements I_AD_UserDef_Field, I_Pers return ii.intValue(); } - public I_AD_UserDef_Tab getAD_UserDef_Tab() throws RuntimeException + /** Set AD_UserDef_Field_UU. + @param AD_UserDef_Field_UU AD_UserDef_Field_UU */ + public void setAD_UserDef_Field_UU (String AD_UserDef_Field_UU) + { + set_Value (COLUMNNAME_AD_UserDef_Field_UU, AD_UserDef_Field_UU); + } + + /** Get AD_UserDef_Field_UU. + @return AD_UserDef_Field_UU */ + public String getAD_UserDef_Field_UU () + { + return (String)get_Value(COLUMNNAME_AD_UserDef_Field_UU); + } + + public org.compiere.model.I_AD_UserDef_Tab getAD_UserDef_Tab() throws RuntimeException { - return (I_AD_UserDef_Tab)MTable.get(getCtx(), I_AD_UserDef_Tab.Table_Name) + return (org.compiere.model.I_AD_UserDef_Tab)MTable.get(getCtx(), org.compiere.model.I_AD_UserDef_Tab.Table_Name) .getPO(getAD_UserDef_Tab_ID(), get_TrxName()); } /** Set User defined Tab. @@ -352,14 +376,6 @@ public class X_AD_UserDef_Field extends PO implements I_AD_UserDef_Field, I_Pers return (String)get_Value(COLUMNNAME_Name); } - /** Get Record ID/ColumnName - @return ID/ColumnName pair - */ - public KeyNamePair getKeyNamePair() - { - return new KeyNamePair(get_ID(), getName()); - } - /** Set Sequence. @param SeqNo Method of ordering records; lowest number comes first diff --git a/org.adempiere.base/src/org/compiere/model/X_AD_UserDef_Tab.java b/org.adempiere.base/src/org/compiere/model/X_AD_UserDef_Tab.java index 2e44e3c5f4..ce1a236487 100644 --- a/org.adempiere.base/src/org/compiere/model/X_AD_UserDef_Tab.java +++ b/org.adempiere.base/src/org/compiere/model/X_AD_UserDef_Tab.java @@ -30,7 +30,7 @@ public class X_AD_UserDef_Tab extends PO implements I_AD_UserDef_Tab, I_Persiste /** * */ - private static final long serialVersionUID = 20100614L; + private static final long serialVersionUID = 20120404L; /** Standard Constructor */ public X_AD_UserDef_Tab (Properties ctx, int AD_UserDef_Tab_ID, String trxName) @@ -44,7 +44,6 @@ public class X_AD_UserDef_Tab extends PO implements I_AD_UserDef_Tab, I_Persiste setIsMultiRowOnly (false); setIsReadOnly (false); setIsSingleRow (false); - setName (null); } */ } @@ -76,9 +75,9 @@ public class X_AD_UserDef_Tab extends PO implements I_AD_UserDef_Tab, I_Persiste return sb.toString(); } - public I_AD_Tab getAD_Tab() throws RuntimeException + public org.compiere.model.I_AD_Tab getAD_Tab() throws RuntimeException { - return (I_AD_Tab)MTable.get(getCtx(), I_AD_Tab.Table_Name) + return (org.compiere.model.I_AD_Tab)MTable.get(getCtx(), org.compiere.model.I_AD_Tab.Table_Name) .getPO(getAD_Tab_ID(), get_TrxName()); } /** Set Tab. @@ -104,6 +103,14 @@ public class X_AD_UserDef_Tab extends PO implements I_AD_UserDef_Tab, I_Persiste return ii.intValue(); } + /** Get Record ID/ColumnName + @return ID/ColumnName pair + */ + public KeyNamePair getKeyNamePair() + { + return new KeyNamePair(get_ID(), String.valueOf(getAD_Tab_ID())); + } + /** Set User defined Tab. @param AD_UserDef_Tab_ID User defined Tab */ public void setAD_UserDef_Tab_ID (int AD_UserDef_Tab_ID) @@ -124,9 +131,23 @@ public class X_AD_UserDef_Tab extends PO implements I_AD_UserDef_Tab, I_Persiste return ii.intValue(); } - public I_AD_UserDef_Win getAD_UserDef_Win() throws RuntimeException + /** Set AD_UserDef_Tab_UU. + @param AD_UserDef_Tab_UU AD_UserDef_Tab_UU */ + public void setAD_UserDef_Tab_UU (String AD_UserDef_Tab_UU) + { + set_Value (COLUMNNAME_AD_UserDef_Tab_UU, AD_UserDef_Tab_UU); + } + + /** Get AD_UserDef_Tab_UU. + @return AD_UserDef_Tab_UU */ + public String getAD_UserDef_Tab_UU () + { + return (String)get_Value(COLUMNNAME_AD_UserDef_Tab_UU); + } + + public org.compiere.model.I_AD_UserDef_Win getAD_UserDef_Win() throws RuntimeException { - return (I_AD_UserDef_Win)MTable.get(getCtx(), I_AD_UserDef_Win.Table_Name) + return (org.compiere.model.I_AD_UserDef_Win)MTable.get(getCtx(), org.compiere.model.I_AD_UserDef_Win.Table_Name) .getPO(getAD_UserDef_Win_ID(), get_TrxName()); } /** Set User defined Window. @@ -272,11 +293,20 @@ public class X_AD_UserDef_Tab extends PO implements I_AD_UserDef_Tab, I_Persiste return (String)get_Value(COLUMNNAME_Name); } - /** Get Record ID/ColumnName - @return ID/ColumnName pair - */ - public KeyNamePair getKeyNamePair() - { - return new KeyNamePair(get_ID(), getName()); - } + /** Set Read Only Logic. + @param ReadOnlyLogic + Logic to determine if field is read only (applies only when field is read-write) + */ + public void setReadOnlyLogic (String ReadOnlyLogic) + { + set_Value (COLUMNNAME_ReadOnlyLogic, ReadOnlyLogic); + } + + /** Get Read Only Logic. + @return Logic to determine if field is read only (applies only when field is read-write) + */ + public String getReadOnlyLogic () + { + return (String)get_Value(COLUMNNAME_ReadOnlyLogic); + } } \ No newline at end of file diff --git a/org.adempiere.base/src/org/compiere/model/X_AD_UserDef_Win.java b/org.adempiere.base/src/org/compiere/model/X_AD_UserDef_Win.java index 9b56d14214..b954c014db 100644 --- a/org.adempiere.base/src/org/compiere/model/X_AD_UserDef_Win.java +++ b/org.adempiere.base/src/org/compiere/model/X_AD_UserDef_Win.java @@ -30,7 +30,7 @@ public class X_AD_UserDef_Win extends PO implements I_AD_UserDef_Win, I_Persiste /** * */ - private static final long serialVersionUID = 20100614L; + private static final long serialVersionUID = 20120404L; /** Standard Constructor */ public X_AD_UserDef_Win (Properties ctx, int AD_UserDef_Win_ID, String trxName) @@ -38,13 +38,11 @@ public class X_AD_UserDef_Win extends PO implements I_AD_UserDef_Win, I_Persiste super (ctx, AD_UserDef_Win_ID, trxName); /** if (AD_UserDef_Win_ID == 0) { - setAD_Language (null); setAD_UserDef_Win_ID (0); setAD_Window_ID (0); setIsDefault (false); setIsReadOnly (false); setIsUserUpdateable (false); - setName (null); } */ } @@ -96,9 +94,9 @@ public class X_AD_UserDef_Win extends PO implements I_AD_UserDef_Win, I_Persiste return (String)get_Value(COLUMNNAME_AD_Language); } - public I_AD_Role getAD_Role() throws RuntimeException + public org.compiere.model.I_AD_Role getAD_Role() throws RuntimeException { - return (I_AD_Role)MTable.get(getCtx(), I_AD_Role.Table_Name) + return (org.compiere.model.I_AD_Role)MTable.get(getCtx(), org.compiere.model.I_AD_Role.Table_Name) .getPO(getAD_Role_ID(), get_TrxName()); } /** Set Role. @@ -144,9 +142,23 @@ public class X_AD_UserDef_Win extends PO implements I_AD_UserDef_Win, I_Persiste return ii.intValue(); } - public I_AD_User getAD_User() throws RuntimeException + /** Set AD_UserDef_Win_UU. + @param AD_UserDef_Win_UU AD_UserDef_Win_UU */ + public void setAD_UserDef_Win_UU (String AD_UserDef_Win_UU) + { + set_Value (COLUMNNAME_AD_UserDef_Win_UU, AD_UserDef_Win_UU); + } + + /** Get AD_UserDef_Win_UU. + @return AD_UserDef_Win_UU */ + public String getAD_UserDef_Win_UU () + { + return (String)get_Value(COLUMNNAME_AD_UserDef_Win_UU); + } + + public org.compiere.model.I_AD_User getAD_User() throws RuntimeException { - return (I_AD_User)MTable.get(getCtx(), I_AD_User.Table_Name) + return (org.compiere.model.I_AD_User)MTable.get(getCtx(), org.compiere.model.I_AD_User.Table_Name) .getPO(getAD_User_ID(), get_TrxName()); } /** Set User/Contact. @@ -172,9 +184,9 @@ public class X_AD_UserDef_Win extends PO implements I_AD_UserDef_Win, I_Persiste return ii.intValue(); } - public I_AD_Window getAD_Window() throws RuntimeException + public org.compiere.model.I_AD_Window getAD_Window() throws RuntimeException { - return (I_AD_Window)MTable.get(getCtx(), I_AD_Window.Table_Name) + return (org.compiere.model.I_AD_Window)MTable.get(getCtx(), org.compiere.model.I_AD_Window.Table_Name) .getPO(getAD_Window_ID(), get_TrxName()); } /** Set Window. @@ -200,6 +212,14 @@ public class X_AD_UserDef_Win extends PO implements I_AD_UserDef_Win, I_Persiste return ii.intValue(); } + /** Get Record ID/ColumnName + @return ID/ColumnName pair + */ + public KeyNamePair getKeyNamePair() + { + return new KeyNamePair(get_ID(), String.valueOf(getAD_Window_ID())); + } + /** Set Description. @param Description Optional short description of the record @@ -322,12 +342,4 @@ public class X_AD_UserDef_Win extends PO implements I_AD_UserDef_Win, I_Persiste { return (String)get_Value(COLUMNNAME_Name); } - - /** Get Record ID/ColumnName - @return ID/ColumnName pair - */ - public KeyNamePair getKeyNamePair() - { - return new KeyNamePair(get_ID(), getName()); - } } \ No newline at end of file From 8ff43d60e911de0fd7af13f15adcd206f4074c9f Mon Sep 17 00:00:00 2001 From: Dirk Niemeyer Date: Wed, 7 Mar 2012 12:09:42 +0100 Subject: [PATCH 04/29] IDEMPIERE-177 Added missing migration scripts --- ...830_IDEMPIERE-177_Window_Customization.sql | 177 ++++++++++++++++++ ...830_IDEMPIERE-177_Window_Customization.sql | 177 ++++++++++++++++++ 2 files changed, 354 insertions(+) create mode 100644 migration/360lts-release/oracle/830_IDEMPIERE-177_Window_Customization.sql create mode 100644 migration/360lts-release/postgresql/830_IDEMPIERE-177_Window_Customization.sql diff --git a/migration/360lts-release/oracle/830_IDEMPIERE-177_Window_Customization.sql b/migration/360lts-release/oracle/830_IDEMPIERE-177_Window_Customization.sql new file mode 100644 index 0000000000..f2c13cf806 --- /dev/null +++ b/migration/360lts-release/oracle/830_IDEMPIERE-177_Window_Customization.sql @@ -0,0 +1,177 @@ +-- Aug 9, 2010 8:47:17 PM CEST +-- Default comment for updating dictionary +UPDATE AD_Column SET IsMandatory='N',Updated=TO_DATE('2010-08-09 20:47:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=13424 +; + +-- Aug 9, 2010 8:48:24 PM CEST +-- Default comment for updating dictionary +UPDATE AD_Column SET DefaultValue='''Y''',Updated=TO_DATE('2010-08-09 20:48:24','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6349 +; + +-- Aug 9, 2010 8:48:38 PM CEST +-- Default comment for updating dictionary +UPDATE AD_Column SET DefaultValue='''N''',Updated=TO_DATE('2010-08-09 20:48:38','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6352 +; + +-- Aug 9, 2010 8:48:42 PM CEST +-- Default comment for updating dictionary +ALTER TABLE AD_UserDef_Field MODIFY IsReadOnly CHAR(1) DEFAULT 'N' +; + +-- Aug 9, 2010 8:48:43 PM CEST +-- Default comment for updating dictionary +UPDATE AD_UserDef_Field SET IsReadOnly='N' WHERE IsReadOnly IS NULL +; + +-- Aug 9, 2010 8:49:01 PM CEST +-- Default comment for updating dictionary +ALTER TABLE AD_UserDef_Field MODIFY IsDisplayed CHAR(1) DEFAULT 'Y' +; + +-- Aug 9, 2010 8:49:01 PM CEST +-- Default comment for updating dictionary +UPDATE AD_UserDef_Field SET IsDisplayed='Y' WHERE IsDisplayed IS NULL +; + +-- Aug 9, 2010 8:49:19 PM CEST +-- Default comment for updating dictionary +UPDATE AD_Column SET DefaultValue='''N''',Updated=TO_DATE('2010-08-09 20:49:19','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6356 +; + +-- Aug 9, 2010 8:49:23 PM CEST +-- Default comment for updating dictionary +ALTER TABLE AD_UserDef_Field MODIFY IsSameLine CHAR(1) DEFAULT 'N' +; + +-- Aug 9, 2010 8:49:23 PM CEST +-- Default comment for updating dictionary +UPDATE AD_UserDef_Field SET IsSameLine='N' WHERE IsSameLine IS NULL +; + +-- Aug 9, 2010 8:49:47 PM CEST +-- Default comment for updating dictionary +UPDATE AD_Column SET DefaultValue='0',Updated=TO_DATE('2010-08-09 20:49:47','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6355 +; + +-- Aug 9, 2010 8:49:51 PM CEST +-- Default comment for updating dictionary +ALTER TABLE AD_UserDef_Field MODIFY SeqNo NUMBER(10) DEFAULT 0 +; + +-- Aug 9, 2010 8:49:51 PM CEST +-- Default comment for updating dictionary +UPDATE AD_UserDef_Field SET SeqNo=0 WHERE SeqNo IS NULL +; + +-- Aug 9, 2010 8:52:43 PM CEST +-- Default comment for updating dictionary +UPDATE AD_Column SET DefaultValue='''''',Updated=TO_DATE('2010-08-09 20:52:43','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6351 +; + +-- Aug 9, 2010 8:52:50 PM CEST +-- Default comment for updating dictionary +ALTER TABLE AD_UserDef_Field MODIFY DisplayLogic NVARCHAR2(2000) DEFAULT '' +; + +-- Aug 9, 2010 8:52:50 PM CEST +-- Default comment for updating dictionary +ALTER TABLE AD_UserDef_Field MODIFY DisplayLogic NULL +; + +-- Aug 9, 2010 8:55:45 PM CEST +-- Default comment for updating dictionary +ALTER TABLE AD_UserDef_Field MODIFY DefaultValue NVARCHAR2(2000) DEFAULT '' +; + +-- Aug 9, 2010 8:55:45 PM CEST +-- Default comment for updating dictionary +ALTER TABLE AD_UserDef_Field MODIFY DefaultValue NULL +; + +-- Mar 5, 2012 2:16:34 PM CET +-- IDEMPIERE-177 Window Customization +UPDATE AD_Column SET Callout='org.compiere.model.CalloutWindowCustomization.window',Updated=TO_TIMESTAMP('2012-03-05 14:16:34','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6395 +; + +-- Mar 5, 2012 2:35:54 PM CET +-- IDEMPIERE-177 Window Customization +INSERT INTO AD_Val_Rule (AD_Client_ID,AD_Org_ID,AD_Val_Rule_ID,Code,Created,CreatedBy,EntityType,IsActive,Name,Type,Updated,UpdatedBy) VALUES (0,0,200000,'AD_Window.AD_Window_ID IN (SELECT AD_Window_Access.AD_Window_ID FROM AD_Window_Access WHERE AD_Window_Access.AD_Role_ID=@#AD_Role_ID@)',TO_TIMESTAMP('2012-03-05 14:35:52','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','AD_Window of Role','S',TO_TIMESTAMP('2012-03-05 14:35:52','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Mar 5, 2012 2:36:34 PM CET +-- IDEMPIERE-177 Window Customization +UPDATE AD_Column SET AD_Val_Rule_ID=200000,Updated=TO_TIMESTAMP('2012-03-05 14:36:34','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6395 +; + +-- Mar 5, 2012 2:48:07 PM CET +-- IDEMPIERE-177 Window Customization +UPDATE AD_Column SET AD_Val_Rule_ID=163,Updated=TO_TIMESTAMP('2012-03-05 14:48:07','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6380 +; + +-- Mar 5, 2012 3:41:45 PM CET +-- IDEMPIERE-177 Window Customization +UPDATE AD_Column SET Callout='org.compiere.model.CalloutWindowCustomization.tab',Updated=TO_TIMESTAMP('2012-03-05 15:41:45','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6380 +; + +-- Mar 5, 2012 3:51:23 PM CET +-- IDEMPIERE-177 Window Customization +UPDATE AD_Column SET AD_Val_Rule_ID=52005,Updated=TO_TIMESTAMP('2012-03-05 15:51:23','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6345 +; + +-- Mar 5, 2012 3:53:30 PM CET +-- IDEMPIERE-177 Window Customization +UPDATE AD_Column SET Callout='org.compiere.model.CalloutWindowCustomization.field',Updated=TO_TIMESTAMP('2012-03-05 15:53:30','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6345 +; + +-- Mar 7, 2012 11:02:11 AM CET +-- IDEMPIERE-177 Window Customization +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAllowCopy,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,200018,1663,0,10,466,'ReadOnlyLogic',TO_DATE('2012-03-07 11:02:09','YYYY-MM-DD HH24:MI:SS'),100,'Logic to determine if field is read only (applies only when field is read-write)','D',2000,'format := {expression} [{logic} {expression}]
+expression := @{context}@{operand}{value} or @{context}@{operand}{value}
+logic := {|}|{&}
+context := any global or window context
+value := strings or numbers
+logic operators := AND or OR with the previous result from left to right
+operand := eq{=}, gt{>}, le{<}, not{~^!}
+Examples:
+@AD_Table_ID@=14 | @Language@!GERGER
+@PriceLimit@>10 | @PriceList@>@PriceActual@
+@Name@>J
+Strings may be in single quotes (optional)','Y','Y','Y','N','N','N','N','N','N','N','N','N','N','Y','Read Only Logic',0,TO_DATE('2012-03-07 11:02:09','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Mar 7, 2012 11:02:11 AM CET +-- IDEMPIERE-177 Window Customization +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200018 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 7, 2012 11:02:19 AM CET +-- IDEMPIERE-177 Window Customization +ALTER TABLE AD_UserDef_Tab ADD ReadOnlyLogic NVARCHAR2(2000) DEFAULT NULL +; + +-- Mar 7, 2012 11:02:34 AM CET +-- IDEMPIERE-177 Window Customization +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,200018,200003,0,394,TO_DATE('2012-03-07 11:02:33','YYYY-MM-DD HH24:MI:SS'),100,'Logic to determine if field is read only (applies only when field is read-write)',2000,'D','format := {expression} [{logic} {expression}]
+expression := @{context}@{operand}{value} or @{context}@{operand}{value}
+logic := {|}|{&}
+context := any global or window context
+value := strings or numbers
+logic operators := AND or OR with the previous result from left to right
+operand := eq{=}, gt{>}, le{<}, not{~^!}
+Examples:
+@AD_Table_ID@=14 | @Language@!GERGER
+@PriceLimit@>10 | @PriceList@>@PriceActual@
+@Name@>J
+Strings may be in single quotes (optional)','Y','Y','Y','N','N','N','N','N','Read Only Logic',TO_DATE('2012-03-07 11:02:33','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Mar 7, 2012 11:02:34 AM CET +-- IDEMPIERE-177 Window Customization +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200003 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Mar 7, 2012 11:02:41 AM CET +-- IDEMPIERE-177 Window Customization +UPDATE AD_Field SET SeqNo=120,IsDisplayed='Y' WHERE AD_Field_ID=200003 +; + diff --git a/migration/360lts-release/postgresql/830_IDEMPIERE-177_Window_Customization.sql b/migration/360lts-release/postgresql/830_IDEMPIERE-177_Window_Customization.sql new file mode 100644 index 0000000000..9ef3e90452 --- /dev/null +++ b/migration/360lts-release/postgresql/830_IDEMPIERE-177_Window_Customization.sql @@ -0,0 +1,177 @@ +-- Aug 9, 2010 8:47:17 PM CEST +-- Default comment for updating dictionary +UPDATE AD_Column SET IsMandatory='N',Updated=TO_TIMESTAMP('2010-08-09 20:47:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=13424 +; + +-- Aug 9, 2010 8:48:24 PM CEST +-- Default comment for updating dictionary +UPDATE AD_Column SET DefaultValue='''Y''',Updated=TO_TIMESTAMP('2010-08-09 20:48:24','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6349 +; + +-- Aug 9, 2010 8:48:38 PM CEST +-- Default comment for updating dictionary +UPDATE AD_Column SET DefaultValue='''N''',Updated=TO_TIMESTAMP('2010-08-09 20:48:38','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6352 +; + +-- Aug 9, 2010 8:48:42 PM CEST +-- Default comment for updating dictionary +insert into t_alter_column values('ad_userdef_field','IsReadOnly','CHAR(1)',null,'N') +; + +-- Aug 9, 2010 8:48:43 PM CEST +-- Default comment for updating dictionary +UPDATE AD_UserDef_Field SET IsReadOnly='N' WHERE IsReadOnly IS NULL +; + +-- Aug 9, 2010 8:49:01 PM CEST +-- Default comment for updating dictionary +insert into t_alter_column values('ad_userdef_field','IsDisplayed','CHAR(1)',null,'Y') +; + +-- Aug 9, 2010 8:49:01 PM CEST +-- Default comment for updating dictionary +UPDATE AD_UserDef_Field SET IsDisplayed='Y' WHERE IsDisplayed IS NULL +; + +-- Aug 9, 2010 8:49:19 PM CEST +-- Default comment for updating dictionary +UPDATE AD_Column SET DefaultValue='''N''',Updated=TO_TIMESTAMP('2010-08-09 20:49:19','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6356 +; + +-- Aug 9, 2010 8:49:23 PM CEST +-- Default comment for updating dictionary +insert into t_alter_column values('ad_userdef_field','IsSameLine','CHAR(1)',null,'N') +; + +-- Aug 9, 2010 8:49:23 PM CEST +-- Default comment for updating dictionary +UPDATE AD_UserDef_Field SET IsSameLine='N' WHERE IsSameLine IS NULL +; + +-- Aug 9, 2010 8:49:47 PM CEST +-- Default comment for updating dictionary +UPDATE AD_Column SET DefaultValue='0',Updated=TO_TIMESTAMP('2010-08-09 20:49:47','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6355 +; + +-- Aug 9, 2010 8:49:51 PM CEST +-- Default comment for updating dictionary +insert into t_alter_column values('ad_userdef_field','SeqNo','NUMERIC(10)',null,'0') +; + +-- Aug 9, 2010 8:49:51 PM CEST +-- Default comment for updating dictionary +UPDATE AD_UserDef_Field SET SeqNo=0 WHERE SeqNo IS NULL +; + +-- Aug 9, 2010 8:52:43 PM CEST +-- Default comment for updating dictionary +UPDATE AD_Column SET DefaultValue='''''',Updated=TO_TIMESTAMP('2010-08-09 20:52:43','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6351 +; + +-- Aug 9, 2010 8:52:50 PM CEST +-- Default comment for updating dictionary +insert into t_alter_column values('ad_userdef_field','DisplayLogic','VARCHAR(2000)',null,'') +; + +-- Aug 9, 2010 8:52:50 PM CEST +-- Default comment for updating dictionary +insert into t_alter_column values('ad_userdef_field','DisplayLogic',null,'NULL',null) +; + +-- Aug 9, 2010 8:55:45 PM CEST +-- Default comment for updating dictionary +insert into t_alter_column values('ad_userdef_field','DefaultValue','VARCHAR(2000)',null,'') +; + +-- Aug 9, 2010 8:55:45 PM CEST +-- Default comment for updating dictionary +insert into t_alter_column values('ad_userdef_field','DefaultValue',null,'NULL',null) +; + +-- Mar 5, 2012 2:16:34 PM CET +-- IDEMPIERE-177 Window Customization +UPDATE AD_Column SET Callout='org.compiere.model.CalloutWindowCustomization.window',Updated=TO_DATE('2012-03-05 14:16:34','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6395 +; + +-- Mar 5, 2012 2:35:54 PM CET +-- IDEMPIERE-177 Window Customization +INSERT INTO AD_Val_Rule (AD_Client_ID,AD_Org_ID,AD_Val_Rule_ID,Code,Created,CreatedBy,EntityType,IsActive,Name,Type,Updated,UpdatedBy) VALUES (0,0,200000,'AD_Window.AD_Window_ID IN (SELECT AD_Window_Access.AD_Window_ID FROM AD_Window_Access WHERE AD_Window_Access.AD_Role_ID=@#AD_Role_ID@)',TO_DATE('2012-03-05 14:35:52','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','AD_Window of Role','S',TO_DATE('2012-03-05 14:35:52','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Mar 5, 2012 2:36:34 PM CET +-- IDEMPIERE-177 Window Customization +UPDATE AD_Column SET AD_Val_Rule_ID=200000,Updated=TO_DATE('2012-03-05 14:36:34','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6395 +; + +-- Mar 5, 2012 2:48:07 PM CET +-- IDEMPIERE-177 Window Customization +UPDATE AD_Column SET AD_Val_Rule_ID=163,Updated=TO_DATE('2012-03-05 14:48:07','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6380 +; + +-- Mar 5, 2012 3:41:45 PM CET +-- IDEMPIERE-177 Window Customization +UPDATE AD_Column SET Callout='org.compiere.model.CalloutWindowCustomization.tab',Updated=TO_DATE('2012-03-05 15:41:45','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6380 +; + +-- Mar 5, 2012 3:51:23 PM CET +-- IDEMPIERE-177 Window Customization +UPDATE AD_Column SET AD_Val_Rule_ID=52005,Updated=TO_DATE('2012-03-05 15:51:23','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6345 +; + +-- Mar 5, 2012 3:53:30 PM CET +-- IDEMPIERE-177 Window Customization +UPDATE AD_Column SET Callout='org.compiere.model.CalloutWindowCustomization.field',Updated=TO_DATE('2012-03-05 15:53:30','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6345 +; + +-- Mar 7, 2012 11:02:11 AM CET +-- IDEMPIERE-177 Window Customization +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAllowCopy,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,200018,1663,0,10,466,'ReadOnlyLogic',TO_TIMESTAMP('2012-03-07 11:02:09','YYYY-MM-DD HH24:MI:SS'),100,'Logic to determine if field is read only (applies only when field is read-write)','D',2000,'format := {expression} [{logic} {expression}]
+expression := @{context}@{operand}{value} or @{context}@{operand}{value}
+logic := {|}|{&}
+context := any global or window context
+value := strings or numbers
+logic operators := AND or OR with the previous result from left to right
+operand := eq{=}, gt{>}, le{<}, not{~^!}
+Examples:
+@AD_Table_ID@=14 | @Language@!GERGER
+@PriceLimit@>10 | @PriceList@>@PriceActual@
+@Name@>J
+Strings may be in single quotes (optional)','Y','Y','Y','N','N','N','N','N','N','N','N','N','N','Y','Read Only Logic',0,TO_TIMESTAMP('2012-03-07 11:02:09','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- Mar 7, 2012 11:02:11 AM CET +-- IDEMPIERE-177 Window Customization +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200018 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 7, 2012 11:02:19 AM CET +-- IDEMPIERE-177 Window Customization +ALTER TABLE AD_UserDef_Tab ADD COLUMN ReadOnlyLogic VARCHAR(2000) DEFAULT NULL +; + +-- Mar 7, 2012 11:02:34 AM CET +-- IDEMPIERE-177 Window Customization +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,Updated,UpdatedBy) VALUES (0,200018,200003,0,394,TO_TIMESTAMP('2012-03-07 11:02:33','YYYY-MM-DD HH24:MI:SS'),100,'Logic to determine if field is read only (applies only when field is read-write)',2000,'D','format := {expression} [{logic} {expression}]
+expression := @{context}@{operand}{value} or @{context}@{operand}{value}
+logic := {|}|{&}
+context := any global or window context
+value := strings or numbers
+logic operators := AND or OR with the previous result from left to right
+operand := eq{=}, gt{>}, le{<}, not{~^!}
+Examples:
+@AD_Table_ID@=14 | @Language@!GERGER
+@PriceLimit@>10 | @PriceList@>@PriceActual@
+@Name@>J
+Strings may be in single quotes (optional)','Y','Y','Y','N','N','N','N','N','Read Only Logic',TO_TIMESTAMP('2012-03-07 11:02:33','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Mar 7, 2012 11:02:34 AM CET +-- IDEMPIERE-177 Window Customization +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200003 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Mar 7, 2012 11:02:41 AM CET +-- IDEMPIERE-177 Window Customization +UPDATE AD_Field SET SeqNo=120,IsDisplayed='Y' WHERE AD_Field_ID=200003 +; + From b2a9801ed327338941f763642fb094b897e5c53f Mon Sep 17 00:00:00 2001 From: Heng Sin Low Date: Mon, 26 Mar 2012 10:42:05 +0800 Subject: [PATCH 05/29] IDEMPIERE-209 Costing: clean up reversal code. IDEMPIERE-210 Costing: Revert [ 1693997 ] Calculation of cost should happen when transaction complete. --- .../src/org/compiere/acct/Doc_InOut.java | 226 ++++++++++-------- .../src/org/compiere/acct/Doc_Inventory.java | 44 ++-- .../src/org/compiere/acct/Doc_MatchInv.java | 121 ++++++---- .../src/org/compiere/acct/Doc_MatchPO.java | 106 ++++++++ .../src/org/compiere/acct/Doc_Movement.java | 41 +++- .../src/org/compiere/acct/Doc_Production.java | 8 +- .../src/org/compiere/model/MInventory.java | 73 +----- .../src/org/compiere/model/MMatchInv.java | 148 +++--------- .../src/org/compiere/model/MMatchPO.java | 151 ++---------- 9 files changed, 420 insertions(+), 498 deletions(-) diff --git a/org.adempiere.base/src/org/compiere/acct/Doc_InOut.java b/org.adempiere.base/src/org/compiere/acct/Doc_InOut.java index 697d7d432e..358e78ebf6 100644 --- a/org.adempiere.base/src/org/compiere/acct/Doc_InOut.java +++ b/org.adempiere.base/src/org/compiere/acct/Doc_InOut.java @@ -163,23 +163,34 @@ public class Doc_InOut extends Doc { for (int i = 0; i < p_lines.length; i++) { - DocLine line = p_lines[i]; - // MZ Goodwill - // if Shipment CostDetail exist then get Cost from Cost Detail - BigDecimal costs = line.getProductCosts(as, line.getAD_Org_ID(), true, "M_InOutLine_ID=?"); - // end MZ - if (costs == null || costs.signum() == 0) // zero costs OK + DocLine line = p_lines[i]; + BigDecimal costs = null; + if (!isReversal(line)) { - MProduct product = line.getProduct(); - if (product.isStocked()) + // MZ Goodwill + // if Shipment CostDetail exist then get Cost from Cost Detail + costs = line.getProductCosts(as, line.getAD_Org_ID(), true, "M_InOutLine_ID=?"); + + // end MZ + if (costs == null || costs.signum() == 0) // zero costs OK { - p_Error = "No Costs for " + line.getProduct().getName(); - log.log(Level.WARNING, p_Error); - return null; + MProduct product = line.getProduct(); + if (product.isStocked()) + { + p_Error = "No Costs for " + line.getProduct().getName(); + log.log(Level.WARNING, p_Error); + return null; + } + else // ignore service + continue; } - else // ignore service - continue; } + else + { + //temp to avoid NPE + costs = BigDecimal.ZERO; + } + // CoGS DR dr = fact.createLine(line, line.getAccount(ProductCost.ACCTTYPE_P_Cogs, as), @@ -195,8 +206,8 @@ public class Doc_InOut extends Doc dr.setLocationFromBPartner(getC_BPartner_Location_ID(), false); // to Loc dr.setAD_Org_ID(line.getOrder_Org_ID()); // Revenue X-Org dr.setQty(line.getQty().negate()); - if (m_DocStatus.equals(MInOut.DOCSTATUS_Reversed) - && m_Reversal_ID !=0 && line.getReversalLine_ID() != 0) + + if (isReversal(line)) { // Set AmtAcctDr from Original Shipment/Receipt if (!dr.updateReverseLine (MInOut.Table_ID, @@ -220,8 +231,8 @@ public class Doc_InOut extends Doc cr.setM_Locator_ID(line.getM_Locator_ID()); cr.setLocationFromLocator(line.getM_Locator_ID(), true); // from Loc cr.setLocationFromBPartner(getC_BPartner_Location_ID(), false); // to Loc - if (m_DocStatus.equals(MInOut.DOCSTATUS_Reversed) - && m_Reversal_ID !=0 && line.getReversalLine_ID() != 0) + + if (isReversal(line)) { // Set AmtAcctCr from Original Shipment/Receipt if (!cr.updateReverseLine (MInOut.Table_ID, @@ -235,11 +246,15 @@ public class Doc_InOut extends Doc // if (line.getM_Product_ID() != 0) { - MCostDetail.createShipment(as, line.getAD_Org_ID(), + if (!MCostDetail.createShipment(as, line.getAD_Org_ID(), line.getM_Product_ID(), line.getM_AttributeSetInstance_ID(), line.get_ID(), 0, costs, line.getQty(), - line.getDescription(), true, getTrxName()); + line.getDescription(), true, getTrxName())) + { + p_Error = "Failed to create cost detail record"; + return null; + } } } // for all lines updateProductInfo(as.getC_AcctSchema_ID()); // only for SO! @@ -264,22 +279,30 @@ public class Doc_InOut extends Doc for (int i = 0; i < p_lines.length; i++) { DocLine line = p_lines[i]; - // MZ Goodwill - // if Shipment CostDetail exist then get Cost from Cost Detail - BigDecimal costs = line.getProductCosts(as, line.getAD_Org_ID(), true, "M_InOutLine_ID=?"); - // end MZ - - if (costs == null || costs.signum() == 0) // zero costs OK + BigDecimal costs = null; + if (!isReversal(line)) { - MProduct product = line.getProduct(); - if (product.isStocked()) + // MZ Goodwill + // if Shipment CostDetail exist then get Cost from Cost Detail + costs = line.getProductCosts(as, line.getAD_Org_ID(), true, "M_InOutLine_ID=?"); + // end MZ + + if (costs == null || costs.signum() == 0) // zero costs OK { - p_Error = "No Costs for " + line.getProduct().getName(); - log.log(Level.WARNING, p_Error); - return null; + MProduct product = line.getProduct(); + if (product.isStocked()) + { + p_Error = "No Costs for " + line.getProduct().getName(); + log.log(Level.WARNING, p_Error); + return null; + } + else // ignore service + continue; } - else // ignore service - continue; + } + else + { + costs = BigDecimal.ZERO; } // Inventory DR dr = fact.createLine(line, @@ -294,8 +317,7 @@ public class Doc_InOut extends Doc dr.setM_Locator_ID(line.getM_Locator_ID()); dr.setLocationFromLocator(line.getM_Locator_ID(), true); // from Loc dr.setLocationFromBPartner(getC_BPartner_Location_ID(), false); // to Loc - if (m_DocStatus.equals(MInOut.DOCSTATUS_Reversed) - && m_Reversal_ID !=0 && line.getReversalLine_ID() != 0) + if (isReversal(line)) { // Set AmtAcctDr from Original Shipment/Receipt if (!dr.updateReverseLine (MInOut.Table_ID, @@ -309,11 +331,15 @@ public class Doc_InOut extends Doc // if (line.getM_Product_ID() != 0) { - MCostDetail.createShipment(as, line.getAD_Org_ID(), + if (!MCostDetail.createShipment(as, line.getAD_Org_ID(), line.getM_Product_ID(), line.getM_AttributeSetInstance_ID(), line.get_ID(), 0, costs, line.getQty(), - line.getDescription(), true, getTrxName()); + line.getDescription(), true, getTrxName())) + { + p_Error = "Failed to create cost detail record"; + return null; + } } // CoGS CR @@ -331,8 +357,7 @@ public class Doc_InOut extends Doc cr.setLocationFromBPartner(getC_BPartner_Location_ID(), false); // to Loc cr.setAD_Org_ID(line.getOrder_Org_ID()); // Revenue X-Org cr.setQty(line.getQty().negate()); - if (m_DocStatus.equals(MInOut.DOCSTATUS_Reversed) - && m_Reversal_ID !=0 && line.getReversalLine_ID() != 0) + if (isReversal(line)) { // Set AmtAcctCr from Original Shipment/Receipt if (!cr.updateReverseLine (MInOut.Table_ID, @@ -357,48 +382,55 @@ public class Doc_InOut extends Doc DocLine line = p_lines[i]; BigDecimal costs = null; MProduct product = line.getProduct(); - //get costing method for product - String costingMethod = product.getCostingMethod(as); - if (MAcctSchema.COSTINGMETHOD_AveragePO.equals(costingMethod) || - MAcctSchema.COSTINGMETHOD_LastPOPrice.equals(costingMethod) ) + if (!isReversal(line)) { - int C_OrderLine_ID = line.getC_OrderLine_ID(); - // Low - check if c_orderline_id is valid - if (C_OrderLine_ID > 0) + //get costing method for product + String costingMethod = product.getCostingMethod(as); + if (MAcctSchema.COSTINGMETHOD_AveragePO.equals(costingMethod) || + MAcctSchema.COSTINGMETHOD_LastPOPrice.equals(costingMethod) ) { - MOrderLine orderLine = new MOrderLine (getCtx(), C_OrderLine_ID, getTrxName()); - // Elaine 2008/06/26 - C_Currency_ID = orderLine.getC_Currency_ID(); - // - costs = orderLine.getPriceCost(); - if (costs == null || costs.signum() == 0) - { - costs = orderLine.getPriceActual(); - // Goodwill: Correct included Tax - int C_Tax_ID = orderLine.getC_Tax_ID(); - if (orderLine.isTaxIncluded() && C_Tax_ID != 0) - { - MTax tax = MTax.get(getCtx(), C_Tax_ID); - if (!tax.isZeroTax()) + int C_OrderLine_ID = line.getC_OrderLine_ID(); + // Low - check if c_orderline_id is valid + if (C_OrderLine_ID > 0) + { + MOrderLine orderLine = new MOrderLine (getCtx(), C_OrderLine_ID, getTrxName()); + // Elaine 2008/06/26 + C_Currency_ID = orderLine.getC_Currency_ID(); + // + costs = orderLine.getPriceCost(); + if (costs == null || costs.signum() == 0) + { + costs = orderLine.getPriceActual(); + // Goodwill: Correct included Tax + int C_Tax_ID = orderLine.getC_Tax_ID(); + if (orderLine.isTaxIncluded() && C_Tax_ID != 0) { - int stdPrecision = MCurrency.getStdPrecision(getCtx(), C_Currency_ID); - BigDecimal costTax = tax.calculateTax(costs, true, stdPrecision); - log.fine("Costs=" + costs + " - Tax=" + costTax); - costs = costs.subtract(costTax); - } - } // correct included Tax - } - costs = costs.multiply(line.getQty()); - } - else - { - costs = line.getProductCosts(as, line.getAD_Org_ID(), false); // current costs - } - // - } + MTax tax = MTax.get(getCtx(), C_Tax_ID); + if (!tax.isZeroTax()) + { + int stdPrecision = MCurrency.getStdPrecision(getCtx(), C_Currency_ID); + BigDecimal costTax = tax.calculateTax(costs, true, stdPrecision); + log.fine("Costs=" + costs + " - Tax=" + costTax); + costs = costs.subtract(costTax); + } + } // correct included Tax + } + costs = costs.multiply(line.getQty()); + } + else + { + costs = line.getProductCosts(as, line.getAD_Org_ID(), false); // current costs + } + // + } + else + { + costs = line.getProductCosts(as, line.getAD_Org_ID(), false); // current costs + } + } else { - costs = line.getProductCosts(as, line.getAD_Org_ID(), false); // current costs + costs = BigDecimal.ZERO; } if (costs == null || costs.signum() == 0) { @@ -434,7 +466,7 @@ public class Doc_InOut extends Doc dr.setM_Locator_ID(line.getM_Locator_ID()); dr.setLocationFromBPartner(getC_BPartner_Location_ID(), true); // from Loc dr.setLocationFromLocator(line.getM_Locator_ID(), false); // to Loc - if (m_DocStatus.equals(MInOut.DOCSTATUS_Reversed) && m_Reversal_ID !=0 && line.getReversalLine_ID() != 0) + if (isReversal(line)) { // Set AmtAcctDr from Original Shipment/Receipt if (!dr.updateReverseLine (MInOut.Table_ID, @@ -464,7 +496,7 @@ public class Doc_InOut extends Doc cr.setLocationFromBPartner(getC_BPartner_Location_ID(), true); // from Loc cr.setLocationFromLocator(line.getM_Locator_ID(), false); // to Loc cr.setQty(line.getQty().negate()); - if (m_DocStatus.equals(MInOut.DOCSTATUS_Reversed) && m_Reversal_ID !=0 && line.getReversalLine_ID() != 0) + if (isReversal(line)) { // Set AmtAcctCr from Original Shipment/Receipt if (!cr.updateReverseLine (MInOut.Table_ID, @@ -487,34 +519,19 @@ public class Doc_InOut extends Doc DocLine line = p_lines[i]; BigDecimal costs = null; MProduct product = line.getProduct(); - /* - * BF: [ 2048984 ] Purchase Return costing logic - //get costing method for product - String costingMethod = product.getCostingMethod(as); - if (MAcctSchema.COSTINGMETHOD_AveragePO.equals(costingMethod) || - MAcctSchema.COSTINGMETHOD_LastPOPrice.equals(costingMethod) ) + if (!isReversal(line)) { - int C_OrderLine_ID = line.getC_OrderLine_ID(); - MOrderLine orderLine = new MOrderLine (getCtx(), C_OrderLine_ID, getTrxName()); - costs = orderLine.getPriceCost(); + costs = line.getProductCosts(as, line.getAD_Org_ID(), false); // current costs if (costs == null || costs.signum() == 0) - costs = orderLine.getPriceActual(); - costs = costs.multiply(line.getQty()); - // Elaine 2008/06/26 - C_Currency_ID = orderLine.getC_Currency_ID(); - // + { + p_Error = "Resubmit - No Costs for " + product.getName(); + log.log(Level.WARNING, p_Error); + return null; + } } else { - costs = line.getProductCosts(as, line.getAD_Org_ID(), false); // current costs - } - */ - costs = line.getProductCosts(as, line.getAD_Org_ID(), false); // current costs - if (costs == null || costs.signum() == 0) - { - p_Error = "Resubmit - No Costs for " + product.getName(); - log.log(Level.WARNING, p_Error); - return null; + costs = BigDecimal.ZERO; } // NotInvoicedReceipt DR // Elaine 2008/06/26 @@ -535,7 +552,7 @@ public class Doc_InOut extends Doc dr.setLocationFromBPartner(getC_BPartner_Location_ID(), true); // from Loc dr.setLocationFromLocator(line.getM_Locator_ID(), false); // to Loc dr.setQty(line.getQty().negate()); - if (m_DocStatus.equals(MInOut.DOCSTATUS_Reversed) && m_Reversal_ID !=0 && line.getReversalLine_ID() != 0) + if (isReversal(line)) { // Set AmtAcctDr from Original Shipment/Receipt if (!dr.updateReverseLine (MInOut.Table_ID, @@ -565,7 +582,7 @@ public class Doc_InOut extends Doc cr.setM_Locator_ID(line.getM_Locator_ID()); cr.setLocationFromBPartner(getC_BPartner_Location_ID(), true); // from Loc cr.setLocationFromLocator(line.getM_Locator_ID(), false); // to Loc - if (m_DocStatus.equals(MInOut.DOCSTATUS_Reversed) && m_Reversal_ID !=0 && line.getReversalLine_ID() != 0) + if (isReversal(line)) { // Set AmtAcctCr from Original Shipment/Receipt if (!cr.updateReverseLine (MInOut.Table_ID, @@ -588,6 +605,11 @@ public class Doc_InOut extends Doc return facts; } // createFact + private boolean isReversal(DocLine line) { + return m_DocStatus.equals(MInOut.DOCSTATUS_Reversed) + && m_Reversal_ID !=0 && line.getReversalLine_ID() != 0; + } + /** * Update Sales Order Costing Product Info (old). diff --git a/org.adempiere.base/src/org/compiere/acct/Doc_Inventory.java b/org.adempiere.base/src/org/compiere/acct/Doc_Inventory.java index a90baf94f7..1fb0e6f9f0 100644 --- a/org.adempiere.base/src/org/compiere/acct/Doc_Inventory.java +++ b/org.adempiere.base/src/org/compiere/acct/Doc_Inventory.java @@ -22,6 +22,7 @@ import java.util.ArrayList; import org.compiere.model.MAccount; import org.compiere.model.MAcctSchema; +import org.compiere.model.MCostDetail; import org.compiere.model.MInventory; import org.compiere.model.MInventoryLine; import org.compiere.model.ProductCost; @@ -147,14 +148,22 @@ public class Doc_Inventory extends Doc for (int i = 0; i < p_lines.length; i++) { DocLine line = p_lines[i]; - // MZ Goodwill - // if Physical Inventory CostDetail is exist then get Cost from Cost Detail - BigDecimal costs = line.getProductCosts(as, line.getAD_Org_ID(), true, "M_InventoryLine_ID=?"); - // end MZ - if (costs == null || costs.signum() == 0) + BigDecimal costs = null; + if (!isReversal(line)) { - p_Error = "No Costs for " + line.getProduct().getName(); - return null; + // MZ Goodwill + // if Physical Inventory CostDetail is exist then get Cost from Cost Detail + costs = line.getProductCosts(as, line.getAD_Org_ID(), true, "M_InventoryLine_ID=?"); + // end MZ + if (costs == null || costs.signum() == 0) + { + p_Error = "No Costs for " + line.getProduct().getName(); + return null; + } + } + else + { + costs = BigDecimal.ZERO; } // Inventory DR CR dr = fact.createLine(line, @@ -164,7 +173,7 @@ public class Doc_Inventory extends Doc if (dr == null) continue; dr.setM_Locator_ID(line.getM_Locator_ID()); - if (m_DocStatus.equals(MInventory.DOCSTATUS_Reversed) && m_Reversal_ID !=0 && line.getReversalLine_ID() != 0) + if (isReversal(line)) { // Set AmtAcctDr from Original Phys.Inventory if (!dr.updateReverseLine (MInventory.Table_ID, @@ -178,9 +187,7 @@ public class Doc_Inventory extends Doc // InventoryDiff DR CR // or Charge MAccount invDiff = null; - if (m_DocStatus.equals(MInventory.DOCSTATUS_Reversed) - && m_Reversal_ID != 0 - && line.getReversalLine_ID() != 0 + if (isReversal(line) && line.getC_Charge_ID() != 0) { invDiff = line.getChargeAccount(as, costs); } else { @@ -198,7 +205,7 @@ public class Doc_Inventory extends Doc if (line.getC_Charge_ID() != 0) // explicit overwrite for charge cr.setAD_Org_ID(line.getAD_Org_ID()); - if (m_DocStatus.equals(MInventory.DOCSTATUS_Reversed) && m_Reversal_ID !=0 && line.getReversalLine_ID() != 0) + if (isReversal(line)) { // Set AmtAcctCr from Original Phys.Inventory if (!cr.updateReverseLine (MInventory.Table_ID, @@ -211,12 +218,15 @@ public class Doc_Inventory extends Doc } // Cost Detail - /* Source move to MInventory.createCostDetail() - MCostDetail.createInventory(as, line.getAD_Org_ID(), + if (!MCostDetail.createInventory(as, line.getAD_Org_ID(), line.getM_Product_ID(), line.getM_AttributeSetInstance_ID(), line.get_ID(), 0, costs, line.getQty(), - line.getDescription(), getTrxName());*/ + line.getDescription(), getTrxName())) + { + p_Error = "Failed to create cost detail record"; + return null; + } } // ArrayList facts = new ArrayList(); @@ -224,4 +234,8 @@ public class Doc_Inventory extends Doc return facts; } // createFact + private boolean isReversal(DocLine line) { + return m_DocStatus.equals(MInventory.DOCSTATUS_Reversed) && m_Reversal_ID !=0 && line.getReversalLine_ID() != 0; + } + } // Doc_Inventory diff --git a/org.adempiere.base/src/org/compiere/acct/Doc_MatchInv.java b/org.adempiere.base/src/org/compiere/acct/Doc_MatchInv.java index 03171feaed..59c24aff92 100644 --- a/org.adempiere.base/src/org/compiere/acct/Doc_MatchInv.java +++ b/org.adempiere.base/src/org/compiere/acct/Doc_MatchInv.java @@ -24,6 +24,7 @@ import org.compiere.model.MAccount; import org.compiere.model.MAcctSchema; import org.compiere.model.MAcctSchemaElement; import org.compiere.model.MConversionRate; +import org.compiere.model.MCostDetail; import org.compiere.model.MInOut; import org.compiere.model.MInOutLine; import org.compiere.model.MInvoice; @@ -305,55 +306,13 @@ public class Doc_MatchInv extends Doc } log.fine("IPV=" + ipv + "; Balance=" + fact.getSourceBalance()); -// Elaine 2008/6/20 -/* Source move to MInvoice.createMatchInvCostDetail() - // Cost Detail Record - data from Expense/IncClearing (CR) record - // MZ Goodwill - // Create Cost Detail Matched Invoice using Total Amount and Total Qty based on InvoiceLine - MMatchInv[] mInv = MMatchInv.getInvoiceLine(getCtx(), m_invoiceLine.getC_InvoiceLine_ID(), getTrxName()); - BigDecimal tQty = Env.ZERO; - BigDecimal tAmt = Env.ZERO; - for (int i = 0 ; i < mInv.length ; i++) + String error = createMatchInvCostDetail(as); + if (error != null && error.trim().length() > 0) { - if (mInv[i].isPosted() && mInv[i].getM_MatchInv_ID() != get_ID()) - { - tQty = tQty.add(mInv[i].getQty()); - multiplier = mInv[i].getQty() - .divide(m_invoiceLine.getQtyInvoiced(), 12, BigDecimal.ROUND_HALF_UP).abs(); - tAmt = tAmt.add(m_invoiceLine.getLineNetAmt().multiply(multiplier)); - } + p_Error = error; + return null; } - tAmt = tAmt.add(cr.getAcctBalance().negate()); //Invoice Price - - // Different currency - MInvoice invoice = m_invoiceLine.getParent(); - if (as.getC_Currency_ID() != invoice.getC_Currency_ID()) - { - tAmt = MConversionRate.convert(getCtx(), tAmt, - invoice.getC_Currency_ID(), as.getC_Currency_ID(), - invoice.getDateAcct(), invoice.getC_ConversionType_ID(), - invoice.getAD_Client_ID(), invoice.getAD_Org_ID()); - if (tAmt == null) - { - p_Error = "AP Invoice not convertible - " + as.getName(); - return null; - } - } - - // set Qty to negative value when MovementType is Vendor Returns - MInOut receipt = m_receiptLine.getParent(); - if (receipt.getMovementType().equals(MInOut.MOVEMENTTYPE_VendorReturns)) - tQty = tQty.add(getQty().negate()); // Qty is set to negative value - else - tQty = tQty.add(getQty()); - - // Set Total Amount and Total Quantity from Matched Invoice - MCostDetail.createInvoice(as, getAD_Org_ID(), - getM_Product_ID(), matchInv.getM_AttributeSetInstance_ID(), - m_invoiceLine.getC_InvoiceLine_ID(), 0, // No cost element - tAmt, tQty, getDescription(), getTrxName()); - // end MZ -*/ + // Update Costing updateProductInfo(as.getC_AcctSchema_ID(), MAcctSchema.COSTINGMETHOD_StandardCosting.equals(as.getCostingMethod())); @@ -390,6 +349,74 @@ public class Doc_MatchInv extends Doc return false; } + // Elaine 2008/6/20 + private String createMatchInvCostDetail(MAcctSchema as) + { + if (m_invoiceLine != null && m_invoiceLine.get_ID() > 0 + && m_receiptLine != null && m_receiptLine.get_ID() > 0) + { + BigDecimal LineNetAmt = m_invoiceLine.getLineNetAmt(); + BigDecimal multiplier = getQty() + .divide(m_invoiceLine.getQtyInvoiced(), 12, BigDecimal.ROUND_HALF_UP) + .abs(); + if (multiplier.compareTo(Env.ONE) != 0) + LineNetAmt = LineNetAmt.multiply(multiplier); + + // Source from Doc_MatchInv.createFacts(MAcctSchema) + // Cost Detail Record - data from Expense/IncClearing (CR) record + // MZ Goodwill + // Create Cost Detail Matched Invoice using Total Amount and Total Qty based on InvoiceLine + MMatchInv[] mInv = MMatchInv.getInvoiceLine(getCtx(), m_invoiceLine.getC_InvoiceLine_ID(), getTrxName()); + BigDecimal tQty = Env.ZERO; + BigDecimal tAmt = Env.ZERO; + for (int i = 0 ; i < mInv.length ; i++) + { + if (mInv[i].isPosted() && mInv[i].getM_MatchInv_ID() != get_ID()) + { + tQty = tQty.add(mInv[i].getQty()); + multiplier = mInv[i].getQty() + .divide(m_invoiceLine.getQtyInvoiced(), 12, BigDecimal.ROUND_HALF_UP).abs(); + tAmt = tAmt.add(m_invoiceLine.getLineNetAmt().multiply(multiplier)); + } + } + tAmt = tAmt.add(LineNetAmt); //Invoice Price + + // Different currency + MInvoice invoice = m_invoiceLine.getParent(); + if (as.getC_Currency_ID() != invoice.getC_Currency_ID()) + { + tAmt = MConversionRate.convert(getCtx(), tAmt, + invoice.getC_Currency_ID(), as.getC_Currency_ID(), + invoice.getDateAcct(), invoice.getC_ConversionType_ID(), + invoice.getAD_Client_ID(), invoice.getAD_Org_ID()); + if (tAmt == null) + { + return "AP Invoice not convertible - " + as.getName(); + } + } + + // set Qty to negative value when MovementType is Vendor Returns + MInOut receipt = m_receiptLine.getParent(); + if (receipt.getMovementType().equals(MInOut.MOVEMENTTYPE_VendorReturns)) + tQty = tQty.add(getQty().negate()); // Qty is set to negative value + else + tQty = tQty.add(getQty()); + + MMatchInv matchInv = (MMatchInv)getPO(); + // Set Total Amount and Total Quantity from Matched Invoice + if (!MCostDetail.createInvoice(as, getAD_Org_ID(), + getM_Product_ID(), matchInv.getM_AttributeSetInstance_ID(), + m_invoiceLine.getC_InvoiceLine_ID(), 0, // No cost element + tAmt, tQty, getDescription(), getTrxName())) + { + return "Failed to create cost detail record"; + } + // end MZ + } + + return ""; + } + /** * Update Product Info (old). * - Costing (CostStandardCumQty, CostStandardCumAmt, CostAverageCumQty, CostAverageCumAmt) diff --git a/org.adempiere.base/src/org/compiere/acct/Doc_MatchPO.java b/org.adempiere.base/src/org/compiere/acct/Doc_MatchPO.java index 0daf4f959c..c91f9635e2 100644 --- a/org.adempiere.base/src/org/compiere/acct/Doc_MatchPO.java +++ b/org.adempiere.base/src/org/compiere/acct/Doc_MatchPO.java @@ -26,12 +26,15 @@ import org.compiere.model.MAccount; import org.compiere.model.MAcctSchema; import org.compiere.model.MAcctSchemaElement; import org.compiere.model.MConversionRate; +import org.compiere.model.MCostDetail; +import org.compiere.model.MCurrency; import org.compiere.model.MInOut; import org.compiere.model.MInOutLine; import org.compiere.model.MMatchPO; import org.compiere.model.MOrder; import org.compiere.model.MOrderLine; import org.compiere.model.MProduct; +import org.compiere.model.MTax; import org.compiere.model.ProductCost; import org.compiere.model.X_M_InOut; import org.compiere.util.DB; @@ -64,6 +67,7 @@ public class Doc_MatchPO extends Doc // private int m_M_InOutLine_ID = 0; private MInOutLine m_ioLine = null; + @SuppressWarnings("unused") private int m_C_InvoiceLine_ID = 0; private ProductCost m_pc; @@ -167,6 +171,13 @@ public class Doc_MatchPO extends Doc poCost = poCost.setScale(as.getCostingPrecision(), BigDecimal.ROUND_HALF_UP); } + String costingError = createMatchPOCostDetail(as); + if (costingError != null && costingError.trim().length() > 0) + { + p_Error = costingError; + return null; + } + // Calculate PPV for standard costing MProduct product = MProduct.get(getCtx(), getM_Product_ID()); String costingMethod = product.getCostingMethod(as); @@ -305,5 +316,100 @@ public class Doc_MatchPO extends Doc int no = DB.executeUpdate(sql.toString(), getTrxName()); log.fine("M_Product_Costing - Updated=" + no); } // updateProductInfo + + // Elaine 2008/6/20 + private String createMatchPOCostDetail(MAcctSchema as) + { + if (m_ioLine != null && m_ioLine.getM_InOutLine_ID() > 0 && + m_oLine != null && m_oLine.getC_OrderLine_ID() > 0) + { + MMatchPO mMatchPO = (MMatchPO) getPO(); + + // Purchase Order Line + BigDecimal poCost = m_oLine.getPriceCost(); + if (poCost == null || poCost.signum() == 0) + { + poCost = m_oLine.getPriceActual(); + // Goodwill: Correct included Tax + int C_Tax_ID = m_oLine.getC_Tax_ID(); + if (m_oLine.isTaxIncluded() && C_Tax_ID != 0) + { + MTax tax = MTax.get(getCtx(), C_Tax_ID); + if (!tax.isZeroTax()) + { + int stdPrecision = MCurrency.getStdPrecision(getCtx(), m_oLine.getC_Currency_ID()); + BigDecimal costTax = tax.calculateTax(poCost, true, stdPrecision); + log.fine("Costs=" + poCost + " - Tax=" + costTax); + poCost = poCost.subtract(costTax); + } + } // correct included Tax + } + + // Source from Doc_MatchPO.createFacts(MAcctSchema) + MInOut inOut = m_ioLine.getParent(); + boolean isReturnTrx = inOut.getMovementType().equals(X_M_InOut.MOVEMENTTYPE_VendorReturns); + + // Create PO Cost Detail Record first + // MZ Goodwill + // Create Cost Detail Matched PO using Total Amount and Total Qty based on OrderLine + MMatchPO[] mPO = MMatchPO.getOrderLine(getCtx(), m_oLine.getC_OrderLine_ID(), getTrxName()); + BigDecimal tQty = Env.ZERO; + BigDecimal tAmt = Env.ZERO; + for (int i = 0 ; i < mPO.length ; i++) + { + if (mPO[i].getM_AttributeSetInstance_ID() == mMatchPO.getM_AttributeSetInstance_ID() + && mPO[i].getM_MatchPO_ID() != mMatchPO.getM_MatchPO_ID()) + { + BigDecimal qty = (isReturnTrx ? mPO[i].getQty().negate() : mPO[i].getQty()); + tQty = tQty.add(qty); + tAmt = tAmt.add(poCost.multiply(qty)); + } + } + + poCost = poCost.multiply(getQty()); // Delivered so far + tAmt = tAmt.add(isReturnTrx ? poCost.negate() : poCost); + tQty = tQty.add(isReturnTrx ? getQty().negate() : getQty()); + + // Different currency + if (m_oLine.getC_Currency_ID() != as.getC_Currency_ID()) + { + MOrder order = m_oLine.getParent(); + Timestamp dateAcct = order.getDateAcct(); + //get costing method for product + MProduct product = MProduct.get(getCtx(), getM_Product_ID()); + String costingMethod = product.getCostingMethod(as); + if (MAcctSchema.COSTINGMETHOD_AveragePO.equals(costingMethod) || + MAcctSchema.COSTINGMETHOD_LastPOPrice.equals(costingMethod) ) + dateAcct = inOut.getDateAcct(); //Movement Date + // + BigDecimal rate = MConversionRate.getRate( + order.getC_Currency_ID(), as.getC_Currency_ID(), + dateAcct, order.getC_ConversionType_ID(), + m_oLine.getAD_Client_ID(), m_oLine.getAD_Org_ID()); + if (rate == null) + { + return "Purchase Order not convertible - " + as.getName(); + } + poCost = poCost.multiply(rate); + if (poCost.scale() > as.getCostingPrecision()) + poCost = poCost.setScale(as.getCostingPrecision(), BigDecimal.ROUND_HALF_UP); + tAmt = tAmt.multiply(rate); + if (tAmt.scale() > as.getCostingPrecision()) + tAmt = tAmt.setScale(as.getCostingPrecision(), BigDecimal.ROUND_HALF_UP); + } + + // Set Total Amount and Total Quantity from Matched PO + if (!MCostDetail.createOrder(as, m_oLine.getAD_Org_ID(), + getM_Product_ID(), mMatchPO.getM_AttributeSetInstance_ID(), + m_oLine.getC_OrderLine_ID(), 0, // no cost element + tAmt, tQty, // Delivered + m_oLine.getDescription(), getTrxName())) + { + return "SaveError"; + } + // end MZ + } + return ""; + } } // Doc_MatchPO diff --git a/org.adempiere.base/src/org/compiere/acct/Doc_Movement.java b/org.adempiere.base/src/org/compiere/acct/Doc_Movement.java index cedfcd1637..36b31b4279 100644 --- a/org.adempiere.base/src/org/compiere/acct/Doc_Movement.java +++ b/org.adempiere.base/src/org/compiere/acct/Doc_Movement.java @@ -131,10 +131,19 @@ public class Doc_Movement extends Doc for (int i = 0; i < p_lines.length; i++) { DocLine line = p_lines[i]; - // MZ Goodwill - // if Inventory Move CostDetail exist then get Cost from Cost Detail - BigDecimal costs = line.getProductCosts(as, line.getAD_Org_ID(), true, "M_MovementLine_ID=? AND IsSOTrx='N'"); - // end MZ + BigDecimal costs = null; + + if (!isReversal(line)) + { + // MZ Goodwill + // if Inventory Move CostDetail exist then get Cost from Cost Detail + costs = line.getProductCosts(as, line.getAD_Org_ID(), true, "M_MovementLine_ID=? AND IsSOTrx='N'"); + // end MZ + } + else + { + costs = BigDecimal.ZERO; + } // ** Inventory DR CR dr = fact.createLine(line, @@ -144,7 +153,7 @@ public class Doc_Movement extends Doc continue; dr.setM_Locator_ID(line.getM_Locator_ID()); dr.setQty(line.getQty().negate()); // outgoing - if (m_DocStatus.equals(MMovement.DOCSTATUS_Reversed) && m_Reversal_ID !=0 && line.getReversalLine_ID() != 0) + if (isReversal(line)) { // Set AmtAcctDr from Original Movement if (!dr.updateReverseLine (MMovement.Table_ID, @@ -163,7 +172,7 @@ public class Doc_Movement extends Doc continue; cr.setM_Locator_ID(line.getM_LocatorTo_ID()); cr.setQty(line.getQty()); - if (m_DocStatus.equals(MMovement.DOCSTATUS_Reversed) && m_Reversal_ID !=0 && line.getReversalLine_ID() != 0) + if (isReversal(line)) { // Set AmtAcctCr from Original Movement if (!cr.updateReverseLine (MMovement.Table_ID, @@ -186,17 +195,25 @@ public class Doc_Movement extends Doc if (description == null) description = ""; // Cost Detail From - MCostDetail.createMovement(as, dr.getAD_Org_ID(), // locator org + if (!MCostDetail.createMovement(as, dr.getAD_Org_ID(), // locator org line.getM_Product_ID(), line.getM_AttributeSetInstance_ID(), line.get_ID(), 0, costs.negate(), line.getQty().negate(), true, - description + "(|->)", getTrxName()); + description + "(|->)", getTrxName())) + { + p_Error = "Failed to create cost detail record"; + return null; + } // Cost Detail To - MCostDetail.createMovement(as, cr.getAD_Org_ID(), // locator org + if (!MCostDetail.createMovement(as, cr.getAD_Org_ID(), // locator org line.getM_Product_ID(), line.getM_AttributeSetInstance_ID(), line.get_ID(), 0, costs, line.getQty(), false, - description + "(|<-)", getTrxName()); + description + "(|<-)", getTrxName())) + { + p_Error = "Failed to create cost detail record"; + return null; + } } } @@ -206,4 +223,8 @@ public class Doc_Movement extends Doc return facts; } // createFact + private boolean isReversal(DocLine line) { + return m_DocStatus.equals(MMovement.DOCSTATUS_Reversed) && m_Reversal_ID !=0 && line.getReversalLine_ID() != 0; + } + } // Doc_Movement diff --git a/org.adempiere.base/src/org/compiere/acct/Doc_Production.java b/org.adempiere.base/src/org/compiere/acct/Doc_Production.java index b9a31fda4b..de3e61dac1 100644 --- a/org.adempiere.base/src/org/compiere/acct/Doc_Production.java +++ b/org.adempiere.base/src/org/compiere/acct/Doc_Production.java @@ -228,11 +228,15 @@ public class Doc_Production extends Doc description = ""; if (line.isProductionBOM()) description += "(*)"; - MCostDetail.createProduction(as, line.getAD_Org_ID(), + if (!MCostDetail.createProduction(as, line.getAD_Org_ID(), line.getM_Product_ID(), line.getM_AttributeSetInstance_ID(), line.get_ID(), 0, costs, line.getQty(), - description, getTrxName()); + description, getTrxName())) + { + p_Error = "Failed to create cost detail record"; + return null; + } } // ArrayList facts = new ArrayList(); diff --git a/org.adempiere.base/src/org/compiere/model/MInventory.java b/org.adempiere.base/src/org/compiere/model/MInventory.java index 4553306e98..196927cc3e 100644 --- a/org.adempiere.base/src/org/compiere/model/MInventory.java +++ b/org.adempiere.base/src/org/compiere/model/MInventory.java @@ -473,14 +473,6 @@ public class MInventory extends X_M_Inventory implements DocAction m_processMsg = "Transaction not inserted(2)"; return DocAction.STATUS_Invalid; } - if(QtyMA.signum() != 0) - { - String err = createCostDetail(line, ma.getM_AttributeSetInstance_ID() , QtyMA.negate()); - if (err != null && err.length() > 0) { - m_processMsg = err; - return DocAction.STATUS_Invalid; - } - } qtyDiff = QtyNew; @@ -530,16 +522,7 @@ public class MInventory extends X_M_Inventory implements DocAction { m_processMsg = "Transaction not inserted(2)"; return DocAction.STATUS_Invalid; - } - - if(qtyDiff.signum() != 0) - { - String err = createCostDetail(line, line.getM_AttributeSetInstance_ID(), qtyDiff); - if (err != null && err.length() > 0) { - m_processMsg = err; - return DocAction.STATUS_Invalid; - } - } + } } // Fallback } // stock movement @@ -941,60 +924,6 @@ public class MInventory extends X_M_Inventory implements DocAction return m_reversal; } // isReversal - /** - * Create Cost Detail - * @param line - * @param Qty - * @return an EMPTY String on success otherwise an ERROR message - */ - private String createCostDetail(MInventoryLine line, int M_AttributeSetInstance_ID, BigDecimal qty) - { - // Get Account Schemas to create MCostDetail - MAcctSchema[] acctschemas = MAcctSchema.getClientAcctSchema(getCtx(), getAD_Client_ID()); - for(int asn = 0; asn < acctschemas.length; asn++) - { - MAcctSchema as = acctschemas[asn]; - - if (as.isSkipOrg(getAD_Org_ID()) || as.isSkipOrg(line.getAD_Org_ID())) - { - continue; - } - - BigDecimal costs = Env.ZERO; - if (isReversal()) - { - String sql = "SELECT amt * -1 FROM M_CostDetail WHERE M_InventoryLine_ID=?"; // negate costs - MProduct product = new MProduct(getCtx(), line.getM_Product_ID(), line.get_TrxName()); - String CostingLevel = product.getCostingLevel(as); - if (MAcctSchema.COSTINGLEVEL_Organization.equals(CostingLevel)) - sql = sql + " AND AD_Org_ID=" + getAD_Org_ID(); - else if (MAcctSchema.COSTINGLEVEL_BatchLot.equals(CostingLevel) && M_AttributeSetInstance_ID != 0) - sql = sql + " AND M_AttributeSetInstance_ID=" + M_AttributeSetInstance_ID; - costs = DB.getSQLValueBD(line.get_TrxName(), sql, line.getReversalLine_ID()); - } - else - { - ProductCost pc = new ProductCost (getCtx(), - line.getM_Product_ID(), M_AttributeSetInstance_ID, line.get_TrxName()); - pc.setQty(qty); - costs = pc.getProductCosts(as, line.getAD_Org_ID(), as.getCostingMethod(), 0,true); - } - if (costs == null) - { - return "No Costs for " + line.getProduct().getName(); - } - - // Set Total Amount and Total Quantity from Inventory - MCostDetail.createInventory(as, line.getAD_Org_ID(), - line.getM_Product_ID(), M_AttributeSetInstance_ID, - line.getM_InventoryLine_ID(), 0, // no cost element - costs, qty, - line.getDescription(), line.get_TrxName()); - } - - return ""; - } - /** * Document Status is Complete or Closed * @return true if CO, CL or RE diff --git a/org.adempiere.base/src/org/compiere/model/MMatchInv.java b/org.adempiere.base/src/org/compiere/model/MMatchInv.java index 25792ba48d..5953dec070 100644 --- a/org.adempiere.base/src/org/compiere/model/MMatchInv.java +++ b/org.adempiere.base/src/org/compiere/model/MMatchInv.java @@ -136,6 +136,7 @@ public class MMatchInv extends X_M_MatchInv /** Static Logger */ + @SuppressWarnings("unused") private static CLogger s_log = CLogger.getCLogger (MMatchInv.class); @@ -221,29 +222,6 @@ public class MMatchInv extends X_M_MatchInv return true; } // beforeSave - /** - * After Save. - * Set Order Qty Delivered/Invoiced - * @param newRecord new - * @param success success - * @return success - */ - protected boolean afterSave (boolean newRecord, boolean success) - { - if (newRecord && success) - { - // Elaine 2008/6/20 - String err = createMatchInvCostDetail(); - if(err != null && err.length() > 0) - { - s_log.warning(err); - return false; - } - } - // - return success; - } // afterSave - /** * Get the later Date Acct from invoice or shipment * @return date or null @@ -329,81 +307,6 @@ public class MMatchInv extends X_M_MatchInv return success; } // afterDelete - - // Elaine 2008/6/20 - private String createMatchInvCostDetail() - { - MInvoiceLine invoiceLine = new MInvoiceLine (getCtx(), getC_InvoiceLine_ID(), get_TrxName()); - - // Get Account Schemas to create MCostDetail - MAcctSchema[] acctschemas = MAcctSchema.getClientAcctSchema(getCtx(), getAD_Client_ID()); - for(int asn = 0; asn < acctschemas.length; asn++) - { - MAcctSchema as = acctschemas[asn]; - - if (as.isSkipOrg(getAD_Org_ID())) - { - continue; - } - - BigDecimal LineNetAmt = invoiceLine.getLineNetAmt(); - BigDecimal multiplier = getQty() - .divide(invoiceLine.getQtyInvoiced(), 12, BigDecimal.ROUND_HALF_UP) - .abs(); - if (multiplier.compareTo(Env.ONE) != 0) - LineNetAmt = LineNetAmt.multiply(multiplier); - - // Source from Doc_MatchInv.createFacts(MAcctSchema) - // Cost Detail Record - data from Expense/IncClearing (CR) record - // MZ Goodwill - // Create Cost Detail Matched Invoice using Total Amount and Total Qty based on InvoiceLine - MMatchInv[] mInv = MMatchInv.getInvoiceLine(getCtx(), invoiceLine.getC_InvoiceLine_ID(), get_TrxName()); - BigDecimal tQty = Env.ZERO; - BigDecimal tAmt = Env.ZERO; - for (int i = 0 ; i < mInv.length ; i++) - { - if (mInv[i].isPosted() && mInv[i].getM_MatchInv_ID() != get_ID()) - { - tQty = tQty.add(mInv[i].getQty()); - multiplier = mInv[i].getQty() - .divide(invoiceLine.getQtyInvoiced(), 12, BigDecimal.ROUND_HALF_UP).abs(); - tAmt = tAmt.add(invoiceLine.getLineNetAmt().multiply(multiplier)); - } - } - tAmt = tAmt.add(LineNetAmt); //Invoice Price - - // Different currency - MInvoice invoice = invoiceLine.getParent(); - if (as.getC_Currency_ID() != invoice.getC_Currency_ID()) - { - tAmt = MConversionRate.convert(getCtx(), tAmt, - invoice.getC_Currency_ID(), as.getC_Currency_ID(), - invoice.getDateAcct(), invoice.getC_ConversionType_ID(), - invoice.getAD_Client_ID(), invoice.getAD_Org_ID()); - if (tAmt == null) - { - return "AP Invoice not convertible - " + as.getName(); - } - } - - // set Qty to negative value when MovementType is Vendor Returns - MInOutLine receiptLine = new MInOutLine (getCtx(),getM_InOutLine_ID(), get_TrxName()); - MInOut receipt = receiptLine.getParent(); - if (receipt.getMovementType().equals(MInOut.MOVEMENTTYPE_VendorReturns)) - tQty = tQty.add(getQty().negate()); // Qty is set to negative value - else - tQty = tQty.add(getQty()); - - // Set Total Amount and Total Quantity from Matched Invoice - MCostDetail.createInvoice(as, getAD_Org_ID(), - getM_Product_ID(), getM_AttributeSetInstance_ID(), - invoiceLine.getC_InvoiceLine_ID(), 0, // No cost element - tAmt, tQty, getDescription(), get_TrxName()); - // end MZ - } - - return ""; - } // //AZ Goodwill private String deleteMatchInvCostDetail() @@ -424,29 +327,36 @@ public class MMatchInv extends X_M_MatchInv getC_InvoiceLine_ID(), getM_AttributeSetInstance_ID(), as.getC_AcctSchema_ID(), get_TrxName()); if (cd != null) { - MInOut receipt = (new MInOutLine(getCtx(),getM_InOutLine_ID(),get_TrxName())).getParent(); - BigDecimal qty = getQty(); - if (receipt.getMovementType().equals(MInOut.MOVEMENTTYPE_VendorReturns)) - qty = getQty().negate(); - // - BigDecimal price = null; - if (cd.getQty().compareTo(Env.ZERO) == 0) // avoid division by zero - price = Env.ZERO; - else - price = cd.getAmt().divide(cd.getQty(),12,BigDecimal.ROUND_HALF_UP); - cd.setDeltaAmt(price.multiply(qty.negate())); - cd.setDeltaQty(qty.negate()); - cd.setProcessed(false); - // - cd.setAmt(price.multiply(cd.getQty().subtract(qty))); - cd.setQty(cd.getQty().subtract(qty)); - if (!cd.isProcessed()) - { - cd.process(); - } - if (cd.getQty().compareTo(Env.ZERO) == 0) + if (cd.isProcessed()) { + MInOut receipt = (new MInOutLine(getCtx(),getM_InOutLine_ID(),get_TrxName())).getParent(); + BigDecimal qty = getQty(); + if (receipt.getMovementType().equals(MInOut.MOVEMENTTYPE_VendorReturns)) + qty = getQty().negate(); + // + BigDecimal price = null; + if (cd.getQty().compareTo(Env.ZERO) == 0) // avoid division by zero + price = Env.ZERO; + else + price = cd.getAmt().divide(cd.getQty(),12,BigDecimal.ROUND_HALF_UP); + cd.setDeltaAmt(price.multiply(qty.negate())); + cd.setDeltaQty(qty.negate()); cd.setProcessed(false); + // + cd.setAmt(price.multiply(cd.getQty().subtract(qty))); + cd.setQty(cd.getQty().subtract(qty)); + if (!cd.isProcessed()) + { + cd.process(); + } + if (cd.getQty().compareTo(Env.ZERO) == 0) + { + cd.setProcessed(false); + cd.delete(true); + } + } + else + { cd.delete(true); } } diff --git a/org.adempiere.base/src/org/compiere/model/MMatchPO.java b/org.adempiere.base/src/org/compiere/model/MMatchPO.java index 2f73b62204..a7365f3c69 100644 --- a/org.adempiere.base/src/org/compiere/model/MMatchPO.java +++ b/org.adempiere.base/src/org/compiere/model/MMatchPO.java @@ -619,17 +619,6 @@ public class MMatchPO extends X_M_MatchPO } } - if (newRecord || m_isInOutLineChange) - { - // Elaine 2008/6/20 - String err = createMatchPOCostDetail(); - if(err != null && err.length() > 0) - { - s_log.warning(err); - return false; - } - } - return true; } // beforeSave @@ -853,113 +842,6 @@ public class MMatchPO extends X_M_MatchPO s_log.info("Success #" + success + " - Error #" + errors); } // consolidate - // Elaine 2008/6/20 - private String createMatchPOCostDetail() - { - if (getM_InOutLine_ID() != 0) - { - MOrderLine oLine = getOrderLine(); - - // Get Account Schemas to create MCostDetail - MAcctSchema[] acctschemas = MAcctSchema.getClientAcctSchema(getCtx(), getAD_Client_ID()); - for(int asn = 0; asn < acctschemas.length; asn++) - { - MAcctSchema as = acctschemas[asn]; - - if (as.isSkipOrg(getAD_Org_ID())) - { - continue; - } - - // Purchase Order Line - BigDecimal poCost = oLine.getPriceCost(); - if (poCost == null || poCost.signum() == 0) - { - poCost = oLine.getPriceActual(); - // Goodwill: Correct included Tax - int C_Tax_ID = oLine.getC_Tax_ID(); - if (oLine.isTaxIncluded() && C_Tax_ID != 0) - { - MTax tax = MTax.get(getCtx(), C_Tax_ID); - if (!tax.isZeroTax()) - { - int stdPrecision = MCurrency.getStdPrecision(getCtx(), oLine.getC_Currency_ID()); - BigDecimal costTax = tax.calculateTax(poCost, true, stdPrecision); - log.fine("Costs=" + poCost + " - Tax=" + costTax); - poCost = poCost.subtract(costTax); - } - } // correct included Tax - } - - // Source from Doc_MatchPO.createFacts(MAcctSchema) - MInOutLine receiptLine = new MInOutLine (getCtx(), getM_InOutLine_ID(), get_TrxName()); - MInOut inOut = receiptLine.getParent(); - boolean isReturnTrx = inOut.getMovementType().equals(X_M_InOut.MOVEMENTTYPE_VendorReturns); - - // Create PO Cost Detail Record first - // MZ Goodwill - // Create Cost Detail Matched PO using Total Amount and Total Qty based on OrderLine - MMatchPO[] mPO = MMatchPO.getOrderLine(getCtx(), oLine.getC_OrderLine_ID(), get_TrxName()); - BigDecimal tQty = Env.ZERO; - BigDecimal tAmt = Env.ZERO; - for (int i = 0 ; i < mPO.length ; i++) - { - if (mPO[i].getM_AttributeSetInstance_ID() == getM_AttributeSetInstance_ID() - && mPO[i].getM_MatchPO_ID() != get_ID()) - { - BigDecimal qty = (isReturnTrx ? mPO[i].getQty().negate() : mPO[i].getQty()); - tQty = tQty.add(qty); - tAmt = tAmt.add(poCost.multiply(qty)); - } - } - - poCost = poCost.multiply(getQty()); // Delivered so far - tAmt = tAmt.add(isReturnTrx ? poCost.negate() : poCost); - tQty = tQty.add(isReturnTrx ? getQty().negate() : getQty()); - - // Different currency - if (oLine.getC_Currency_ID() != as.getC_Currency_ID()) - { - MOrder order = oLine.getParent(); - Timestamp dateAcct = order.getDateAcct(); - //get costing method for product - MProduct product = MProduct.get(getCtx(), getM_Product_ID()); - String costingMethod = product.getCostingMethod(as); - if (MAcctSchema.COSTINGMETHOD_AveragePO.equals(costingMethod) || - MAcctSchema.COSTINGMETHOD_LastPOPrice.equals(costingMethod) ) - dateAcct = inOut.getDateAcct(); //Movement Date - // - BigDecimal rate = MConversionRate.getRate( - order.getC_Currency_ID(), as.getC_Currency_ID(), - dateAcct, order.getC_ConversionType_ID(), - oLine.getAD_Client_ID(), oLine.getAD_Org_ID()); - if (rate == null) - { - return "Purchase Order not convertible - " + as.getName(); - } - poCost = poCost.multiply(rate); - if (poCost.scale() > as.getCostingPrecision()) - poCost = poCost.setScale(as.getCostingPrecision(), BigDecimal.ROUND_HALF_UP); - tAmt = tAmt.multiply(rate); - if (tAmt.scale() > as.getCostingPrecision()) - tAmt = tAmt.setScale(as.getCostingPrecision(), BigDecimal.ROUND_HALF_UP); - } - - // Set Total Amount and Total Quantity from Matched PO - if (!MCostDetail.createOrder(as, oLine.getAD_Org_ID(), - getM_Product_ID(), getM_AttributeSetInstance_ID(), - oLine.getC_OrderLine_ID(), 0, // no cost element - tAmt, tQty, // Delivered - oLine.getDescription(), get_TrxName())) - { - return "SaveError"; - } - // end MZ - } - } - return ""; - } - //AZ Goodwill private String deleteMatchPOCostDetail() { @@ -979,24 +861,31 @@ public class MMatchPO extends X_M_MatchPO getC_OrderLine_ID(), getM_AttributeSetInstance_ID(), as.getC_AcctSchema_ID(), get_TrxName()); if (cd != null) { - if (cd.getQty().compareTo(Env.ZERO) > 0) + if (cd.isProcessed()) { - BigDecimal price = cd.getAmt().divide(cd.getQty(),12,BigDecimal.ROUND_HALF_UP); - cd.setDeltaAmt(price.multiply(getQty().negate())); - cd.setDeltaQty(getQty().negate()); - cd.setProcessed(false); - // - cd.setAmt(price.multiply(cd.getQty().subtract(getQty()))); - cd.setQty(cd.getQty().subtract(getQty())); - if (!cd.isProcessed()) + if (cd.getQty().compareTo(Env.ZERO) > 0) { - cd.process(); + BigDecimal price = cd.getAmt().divide(cd.getQty(),12,BigDecimal.ROUND_HALF_UP); + cd.setDeltaAmt(price.multiply(getQty().negate())); + cd.setDeltaQty(getQty().negate()); + cd.setProcessed(false); + // + cd.setAmt(price.multiply(cd.getQty().subtract(getQty()))); + cd.setQty(cd.getQty().subtract(getQty())); + if (!cd.isProcessed()) + { + cd.process(); + } + } + //after process clean-up + if (cd.getQty().compareTo(Env.ZERO) == 0) + { + cd.setProcessed(false); + cd.delete(true); } } - //after process clean-up - if (cd.getQty().compareTo(Env.ZERO) == 0) + else { - cd.setProcessed(false); cd.delete(true); } } From 69fc191cc7fef69e4d8994aa726c4b43d7ee3e73 Mon Sep 17 00:00:00 2001 From: Heng Sin Low Date: Mon, 26 Mar 2012 14:14:35 +0800 Subject: [PATCH 06/29] IDEMPIERE-210 Costing: Revert [ 1693997 ] Calculation of cost should happen when transaction complete. Fixed a regression introduce in previous revision. --- .../src/org/compiere/acct/Doc_InOut.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/org.adempiere.base/src/org/compiere/acct/Doc_InOut.java b/org.adempiere.base/src/org/compiere/acct/Doc_InOut.java index 358e78ebf6..7700595f28 100644 --- a/org.adempiere.base/src/org/compiere/acct/Doc_InOut.java +++ b/org.adempiere.base/src/org/compiere/acct/Doc_InOut.java @@ -427,17 +427,19 @@ public class Doc_InOut extends Doc { costs = line.getProductCosts(as, line.getAD_Org_ID(), false); // current costs } + + if (costs == null || costs.signum() == 0) + { + p_Error = "Resubmit - No Costs for " + product.getName(); + log.log(Level.WARNING, p_Error); + return null; + } } else { costs = BigDecimal.ZERO; } - if (costs == null || costs.signum() == 0) - { - p_Error = "Resubmit - No Costs for " + product.getName(); - log.log(Level.WARNING, p_Error); - return null; - } + // Inventory/Asset DR MAccount assets = line.getAccount(ProductCost.ACCTTYPE_P_Asset, as); if (product.isService()) From be6b85f531c3b79fd88f1f6884cff42c0cd11564 Mon Sep 17 00:00:00 2001 From: Heng Sin Low Date: Mon, 26 Mar 2012 15:07:02 +0800 Subject: [PATCH 07/29] IDEMPIERE-212 Costing: MatchPO required for Average PO and Last PO Costing method - adapted from http://sistematika.web.id/2008/10/10/accounting-generated-for-adempiere-material-receipt-activity/ --- org.adempiere.base/src/org/compiere/acct/Doc_InOut.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/org.adempiere.base/src/org/compiere/acct/Doc_InOut.java b/org.adempiere.base/src/org/compiere/acct/Doc_InOut.java index 7700595f28..d873a50dd0 100644 --- a/org.adempiere.base/src/org/compiere/acct/Doc_InOut.java +++ b/org.adempiere.base/src/org/compiere/acct/Doc_InOut.java @@ -419,7 +419,9 @@ public class Doc_InOut extends Doc } else { - costs = line.getProductCosts(as, line.getAD_Org_ID(), false); // current costs + p_Error = "Resubmit - No Costs for " + product.getName(); + log.log(Level.WARNING, p_Error); + return null; } // } From 1982a8b331a22068a24d6f02c5579b70f956c6fe Mon Sep 17 00:00:00 2001 From: Heng Sin Low Date: Mon, 26 Mar 2012 15:17:25 +0800 Subject: [PATCH 08/29] IDEMPIERE-213 Costing: Seed/Initial Cost Clean up --- .../src/org/compiere/model/MCost.java | 73 +++++++++++++------ .../src/org/compiere/model/MCostDetail.java | 27 +++++-- 2 files changed, 72 insertions(+), 28 deletions(-) diff --git a/org.adempiere.base/src/org/compiere/model/MCost.java b/org.adempiere.base/src/org/compiere/model/MCost.java index e01ff10958..d4a8f9d238 100644 --- a/org.adempiere.base/src/org/compiere/model/MCost.java +++ b/org.adempiere.base/src/org/compiere/model/MCost.java @@ -214,11 +214,7 @@ public class MCost extends X_M_Cost { if (zeroCostsOK) return Env.ZERO; - materialCostEach = getSeedCosts(product, M_ASI_ID, - as, Org_ID, costingMethod, C_OrderLine_ID); } - if (materialCostEach == null) - return null; // Material Costs BigDecimal materialCost = materialCostEach.multiply(qty); @@ -278,13 +274,13 @@ public class MCost extends X_M_Cost BigDecimal retValue = null; // Direct Data if (MCostElement.COSTINGMETHOD_AverageInvoice.equals(costingMethod)) - retValue = calculateAverageInv(product, M_ASI_ID, as, Org_ID); + return null; else if (MCostElement.COSTINGMETHOD_AveragePO.equals(costingMethod)) - retValue = calculateAveragePO(product, M_ASI_ID, as, Org_ID); + return null; else if (MCostElement.COSTINGMETHOD_Fifo.equals(costingMethod)) - retValue = calculateFiFo(product, M_ASI_ID, as, Org_ID); + return null; else if (MCostElement.COSTINGMETHOD_Lifo.equals(costingMethod)) - retValue = calculateLiFo(product, M_ASI_ID, as, Org_ID); + return null; else if (MCostElement.COSTINGMETHOD_LastInvoice.equals(costingMethod)) retValue = getLastInvoicePrice(product, M_ASI_ID, Org_ID, as.getC_Currency_ID()); else if (MCostElement.COSTINGMETHOD_LastPOPrice.equals(costingMethod)) @@ -298,7 +294,7 @@ public class MCost extends X_M_Cost { // migrate old costs MProductCosting pc = MProductCosting.get(product.getCtx(), product.getM_Product_ID(), - as.getC_AcctSchema_ID(), null); + as.getC_AcctSchema_ID(), product.get_TrxName()); if (pc != null) retValue = pc.getCurrentCostPrice(); } @@ -306,7 +302,7 @@ public class MCost extends X_M_Cost ; else throw new IllegalArgumentException("Unknown Costing Method = " + costingMethod); - if (retValue != null && retValue.signum() != 0) + if (retValue != null && retValue.signum() > 0) { s_log.fine(product.getName() + ", CostingMethod=" + costingMethod + " - " + retValue); return retValue; @@ -316,7 +312,7 @@ public class MCost extends X_M_Cost if (C_OrderLine_ID != 0) { retValue = getPOPrice(product, C_OrderLine_ID, as.getC_Currency_ID()); - if (retValue != null && retValue.signum() != 0) + if (retValue != null && retValue.signum() > 0) { s_log.fine(product.getName() + ", PO - " + retValue); return retValue; @@ -327,8 +323,8 @@ public class MCost extends X_M_Cost if (!MCostElement.COSTINGMETHOD_StandardCosting.equals(costingMethod)) { MCostElement ce = MCostElement.getMaterialCostElement(as, MCostElement.COSTINGMETHOD_StandardCosting); - MCost cost = get(product, M_ASI_ID, as, Org_ID, ce.getM_CostElement_ID()); - if (cost != null && cost.getCurrentCostPrice().signum() != 0) + MCost cost = get(product, M_ASI_ID, as, Org_ID, ce.getM_CostElement_ID(), product.get_TrxName()); + if (cost != null && cost.getCurrentCostPrice().signum() > 0) { s_log.fine(product.getName() + ", Standard - " + cost); return cost.getCurrentCostPrice(); @@ -337,15 +333,14 @@ public class MCost extends X_M_Cost // We do not have a price // PO first - if (MCostElement.COSTINGMETHOD_AveragePO.equals(costingMethod) - || MCostElement.COSTINGMETHOD_LastPOPrice.equals(costingMethod) + if (MCostElement.COSTINGMETHOD_LastPOPrice.equals(costingMethod) || MCostElement.COSTINGMETHOD_StandardCosting.equals(costingMethod)) { // try Last PO retValue = getLastPOPrice(product, M_ASI_ID, Org_ID, as.getC_Currency_ID()); if (Org_ID != 0 && (retValue == null || retValue.signum() == 0)) retValue = getLastPOPrice(product, M_ASI_ID, 0, as.getC_Currency_ID()); - if (retValue != null && retValue.signum() != 0) + if (retValue != null && retValue.signum() > 0) { s_log.fine(product.getName() + ", LastPO = " + retValue); return retValue; @@ -366,15 +361,14 @@ public class MCost extends X_M_Cost // Still Nothing // Inv second - if (MCostElement.COSTINGMETHOD_AveragePO.equals(costingMethod) - || MCostElement.COSTINGMETHOD_LastPOPrice.equals(costingMethod) + if (MCostElement.COSTINGMETHOD_LastPOPrice.equals(costingMethod) || MCostElement.COSTINGMETHOD_StandardCosting.equals(costingMethod)) { // try last Inv retValue = getLastInvoicePrice(product, M_ASI_ID, Org_ID, as.getC_Currency_ID()); if (Org_ID != 0 && (retValue == null || retValue.signum() == 0)) retValue = getLastInvoicePrice(product, M_ASI_ID, 0, as.getC_Currency_ID()); - if (retValue != null && retValue.signum() != 0) + if (retValue != null && retValue.signum() > 0) { s_log.fine(product.getName() + ", LastInv = " + retValue); return retValue; @@ -386,7 +380,7 @@ public class MCost extends X_M_Cost retValue = getLastPOPrice(product, M_ASI_ID, Org_ID, as.getC_Currency_ID()); if (Org_ID != 0 && (retValue == null || retValue.signum() == 0)) retValue = getLastPOPrice(product, M_ASI_ID, 0, as.getC_Currency_ID()); - if (retValue != null && retValue.signum() != 0) + if (retValue != null && retValue.signum() > 0) { s_log.fine(product.getName() + ", LastPO = " + retValue); return retValue; @@ -394,7 +388,7 @@ public class MCost extends X_M_Cost } // Still nothing try ProductPO - MProductPO[] pos = MProductPO.getOfProduct(product.getCtx(), product.getM_Product_ID(), null); + MProductPO[] pos = MProductPO.getOfProduct(product.getCtx(), product.getM_Product_ID(), product.get_TrxName()); for (int i = 0; i < pos.length; i++) { BigDecimal price = pos[i].getPricePO(); @@ -423,13 +417,48 @@ public class MCost extends X_M_Cost } // Still nothing try Purchase Price List - // .... + BigDecimal price = getSeedCostFromPriceList(product, as, Org_ID); + if (price != null && price.signum() > 0) + { + retValue = price; + } s_log.fine(product.getName() + " = " + retValue); return retValue; } // getSeedCosts + private static BigDecimal getSeedCostFromPriceList(MProduct product, + MAcctSchema as, int orgID) { + String sql = "SELECT pp.PriceList, pp.PriceStd FROM M_ProductPrice pp" + + " INNER JOIN M_PriceList_Version plv ON (pp.M_PriceList_Version_ID = plv.M_PriceList_Version_ID AND plv.ValidFrom <= trunc(sysdate))" + + " INNER JOIN M_PriceList pl ON (plv.M_PriceList_ID = pl.M_PriceList_ID AND pl.IsSOPriceList = 'N')" + + " WHERE pp.AD_Client_ID = ? AND pp.AD_Org_ID IN (0, ?) AND pp.M_Product_ID = ? AND pp.PriceList > 0 AND pp.IsActive = 'Y' " + + " ORDER BY pp.AD_Org_ID Desc, plv.ValidFrom Desc"; + PreparedStatement st = null; + ResultSet rs = null; + try { + st = DB.prepareStatement(sql, product.get_TrxName()); + st.setInt(1, as.getAD_Client_ID()); + st.setInt(2, orgID); + st.setInt(3, product.getM_Product_ID()); + rs = st.executeQuery(); + if (rs.next()) { + BigDecimal priceList = rs.getBigDecimal(1); + BigDecimal priceStd = rs.getBigDecimal(2); + if (priceStd != null && priceStd.signum() > 0) + return priceStd; + else + return priceList; + } + } catch (SQLException e) { + throw new DBException(e, sql); + } finally { + DB.close(rs, st); + } + return BigDecimal.ZERO; + } + /** * Get Last Invoice Price in currency * @param product product diff --git a/org.adempiere.base/src/org/compiere/model/MCostDetail.java b/org.adempiere.base/src/org/compiere/model/MCostDetail.java index fa6cde40aa..cf0f7cc69b 100644 --- a/org.adempiere.base/src/org/compiere/model/MCostDetail.java +++ b/org.adempiere.base/src/org/compiere/model/MCostDetail.java @@ -892,6 +892,23 @@ public class MCostDetail extends X_M_CostDetail cost.add(amt, qty); log.finer("PO - LastPO - " + cost); } + else if (ce.isStandardCosting()) + { + // Update cost record only if it is zero + if (cost.getCurrentCostPrice().signum() == 0 + && cost.getCurrentCostPriceLL().signum() == 0) + { + cost.setCurrentCostPrice(price); + if (cost.getCurrentCostPrice().signum() == 0) + { + cost.setCurrentCostPrice(MCost.getSeedCosts(product, M_ASI_ID, + as, Org_ID, ce.getCostingMethod(), getC_OrderLine_ID())); + } + log.finest("PO - Standard - CurrentCostPrice(seed)="+cost.getCurrentCostPrice()+", price="+price); + } + cost.add(amt, qty); + log.finer("PO - Standard - " + cost); + } else if (ce.isUserDefined()) { // Interface @@ -948,10 +965,8 @@ public class MCostDetail extends X_M_CostDetail } else if (ce.isStandardCosting()) { - // Update cost record only if newly created. - // Elsewhere we risk to set the CurrentCostPrice to an undesired price. - if (cost.is_new() - && cost.getCurrentCostPrice().signum() == 0 + // Update cost record only if it is zero + if (cost.getCurrentCostPrice().signum() == 0 && cost.getCurrentCostPriceLL().signum() == 0) { cost.setCurrentCostPrice(price); @@ -962,8 +977,8 @@ public class MCostDetail extends X_M_CostDetail as, Org_ID, ce.getCostingMethod(), getC_OrderLine_ID())); log.finest("Inv - Standard - CurrentCostPrice(seed)="+cost.getCurrentCostPrice()+", price="+price); } - } - cost.add(amt, qty); + cost.add(amt, qty); + } log.finer("Inv - Standard - " + cost); } else if (ce.isUserDefined()) From 5d06421394d934bfdf4b3110bb4e70c862ef3d9a Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Mon, 2 Apr 2012 17:25:16 -0500 Subject: [PATCH 09/29] IDEMPIERE-117 Add cost history table and cost movement view - fix folder for generated model class --- .../org/{adempiere => compiere}/model/I_M_CostHistory.java | 3 +-- org.adempiere.base/src/org/compiere/model/MCostDetail.java | 2 +- .../org/{adempiere => compiere}/model/X_M_CostHistory.java | 5 ++--- 3 files changed, 4 insertions(+), 6 deletions(-) rename org.adempiere.base/src/org/{adempiere => compiere}/model/I_M_CostHistory.java (99%) rename org.adempiere.base/src/org/{adempiere => compiere}/model/X_M_CostHistory.java (98%) diff --git a/org.adempiere.base/src/org/adempiere/model/I_M_CostHistory.java b/org.adempiere.base/src/org/compiere/model/I_M_CostHistory.java similarity index 99% rename from org.adempiere.base/src/org/adempiere/model/I_M_CostHistory.java rename to org.adempiere.base/src/org/compiere/model/I_M_CostHistory.java index 3aeb9c05c6..5ff875fa73 100644 --- a/org.adempiere.base/src/org/adempiere/model/I_M_CostHistory.java +++ b/org.adempiere.base/src/org/compiere/model/I_M_CostHistory.java @@ -14,11 +14,10 @@ * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * * or via info@compiere.org or http://www.compiere.org/license.html * *****************************************************************************/ -package org.adempiere.model; +package org.compiere.model; import java.math.BigDecimal; import java.sql.Timestamp; -import org.compiere.model.*; import org.compiere.util.KeyNamePair; /** Generated Interface for M_CostHistory diff --git a/org.adempiere.base/src/org/compiere/model/MCostDetail.java b/org.adempiere.base/src/org/compiere/model/MCostDetail.java index cf0f7cc69b..85cfef48d7 100644 --- a/org.adempiere.base/src/org/compiere/model/MCostDetail.java +++ b/org.adempiere.base/src/org/compiere/model/MCostDetail.java @@ -23,7 +23,7 @@ import java.util.List; import java.util.Properties; import java.util.logging.Level; -import org.adempiere.model.X_M_CostHistory; +import org.compiere.model.X_M_CostHistory; import org.compiere.util.CLogger; import org.compiere.util.DB; import org.compiere.util.Env; diff --git a/org.adempiere.base/src/org/adempiere/model/X_M_CostHistory.java b/org.adempiere.base/src/org/compiere/model/X_M_CostHistory.java similarity index 98% rename from org.adempiere.base/src/org/adempiere/model/X_M_CostHistory.java rename to org.adempiere.base/src/org/compiere/model/X_M_CostHistory.java index a05c2bd75f..80edfbcf38 100644 --- a/org.adempiere.base/src/org/adempiere/model/X_M_CostHistory.java +++ b/org.adempiere.base/src/org/compiere/model/X_M_CostHistory.java @@ -15,12 +15,11 @@ * or via info@compiere.org or http://www.compiere.org/license.html * *****************************************************************************/ /** Generated Model - DO NOT CHANGE */ -package org.adempiere.model; +package org.compiere.model; import java.math.BigDecimal; import java.sql.ResultSet; import java.util.Properties; -import org.compiere.model.*; import org.compiere.util.Env; /** Generated Model for M_CostHistory @@ -32,7 +31,7 @@ public class X_M_CostHistory extends PO implements I_M_CostHistory, I_Persistent /** * */ - private static final long serialVersionUID = 20120308L; + private static final long serialVersionUID = 20120402L; /** Standard Constructor */ public X_M_CostHistory (Properties ctx, int M_CostHistory_ID, String trxName) From 80194f7a37c972d7aed48a336d4dc7968dc9a931 Mon Sep 17 00:00:00 2001 From: Dirk Niemeyer Date: Tue, 3 Apr 2012 15:29:48 +0200 Subject: [PATCH 10/29] IDEMPIERE-177 AD_Language and name for entry made optional Caching best matching entry for UserDefWin --- ...830_IDEMPIERE-177_Window_Customization.sql | 30 ++++++++----- ...830_IDEMPIERE-177_Window_Customization.sql | 20 +++++++++ .../src/org/compiere/model/MUserDefField.java | 13 ++++-- .../src/org/compiere/model/MUserDefTab.java | 26 ++++++++--- .../src/org/compiere/model/MUserDefWin.java | 44 ++++++++++++++++--- 5 files changed, 107 insertions(+), 26 deletions(-) diff --git a/migration/360lts-release/oracle/830_IDEMPIERE-177_Window_Customization.sql b/migration/360lts-release/oracle/830_IDEMPIERE-177_Window_Customization.sql index f2c13cf806..ff93cc3158 100644 --- a/migration/360lts-release/oracle/830_IDEMPIERE-177_Window_Customization.sql +++ b/migration/360lts-release/oracle/830_IDEMPIERE-177_Window_Customization.sql @@ -73,21 +73,11 @@ UPDATE AD_Column SET DefaultValue='''''',Updated=TO_DATE('2010-08-09 20:52:43',' ALTER TABLE AD_UserDef_Field MODIFY DisplayLogic NVARCHAR2(2000) DEFAULT '' ; --- Aug 9, 2010 8:52:50 PM CEST --- Default comment for updating dictionary -ALTER TABLE AD_UserDef_Field MODIFY DisplayLogic NULL -; - -- Aug 9, 2010 8:55:45 PM CEST -- Default comment for updating dictionary ALTER TABLE AD_UserDef_Field MODIFY DefaultValue NVARCHAR2(2000) DEFAULT '' ; --- Aug 9, 2010 8:55:45 PM CEST --- Default comment for updating dictionary -ALTER TABLE AD_UserDef_Field MODIFY DefaultValue NULL -; - -- Mar 5, 2012 2:16:34 PM CET -- IDEMPIERE-177 Window Customization UPDATE AD_Column SET Callout='org.compiere.model.CalloutWindowCustomization.window',Updated=TO_TIMESTAMP('2012-03-05 14:16:34','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6395 @@ -175,3 +165,23 @@ INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTran UPDATE AD_Field SET SeqNo=120,IsDisplayed='Y' WHERE AD_Field_ID=200003 ; +-- Apr 3, 2012 3:11:59 PM CEST +-- IDEMPIERE-177 Window Customization +UPDATE AD_Column SET IsMandatory='N',Updated=TO_DATE('2012-04-03 15:11:59','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6396 +; + +-- Apr 3, 2012 3:13:25 PM CEST +-- IDEMPIERE-177 Window Customization +UPDATE AD_Column SET IsMandatory='N',Updated=TO_DATE('2012-04-03 15:13:25','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6399 +; + +-- Apr 3, 2012 3:15:11 PM CEST +-- IDEMPIERE-177 Window Customization +UPDATE AD_Column SET IsMandatory='N',Updated=TO_DATE('2012-04-03 15:15:11','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6381 +; + +-- Apr 3, 2012 3:16:32 PM CEST +-- IDEMPIERE-177 Window Customization +UPDATE AD_Column SET IsMandatory='N',Updated=TO_DATE('2012-04-03 15:16:32','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6346 +; + diff --git a/migration/360lts-release/postgresql/830_IDEMPIERE-177_Window_Customization.sql b/migration/360lts-release/postgresql/830_IDEMPIERE-177_Window_Customization.sql index 9ef3e90452..ee8df52f74 100644 --- a/migration/360lts-release/postgresql/830_IDEMPIERE-177_Window_Customization.sql +++ b/migration/360lts-release/postgresql/830_IDEMPIERE-177_Window_Customization.sql @@ -175,3 +175,23 @@ INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTran UPDATE AD_Field SET SeqNo=120,IsDisplayed='Y' WHERE AD_Field_ID=200003 ; +-- Apr 3, 2012 3:11:59 PM CEST +-- IDEMPIERE-177 Window Customization +UPDATE AD_Column SET IsMandatory='N',Updated=TO_TIMESTAMP('2012-04-03 15:11:59','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6396 +; + +-- Apr 3, 2012 3:13:25 PM CEST +-- IDEMPIERE-177 Window Customization +UPDATE AD_Column SET IsMandatory='N',Updated=TO_TIMESTAMP('2012-04-03 15:13:25','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6399 +; + +-- Apr 3, 2012 3:15:11 PM CEST +-- IDEMPIERE-177 Window Customization +UPDATE AD_Column SET IsMandatory='N',Updated=TO_TIMESTAMP('2012-04-03 15:15:11','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6381 +; + +-- Apr 3, 2012 3:16:32 PM CEST +-- IDEMPIERE-177 Window Customization +UPDATE AD_Column SET IsMandatory='N',Updated=TO_TIMESTAMP('2012-04-03 15:16:32','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6346 +; + diff --git a/org.adempiere.base/src/org/compiere/model/MUserDefField.java b/org.adempiere.base/src/org/compiere/model/MUserDefField.java index 58dd863bcc..2a97dcb745 100644 --- a/org.adempiere.base/src/org/compiere/model/MUserDefField.java +++ b/org.adempiere.base/src/org/compiere/model/MUserDefField.java @@ -23,7 +23,7 @@ import org.compiere.util.DB; /** - * + * User overrides for field model * @author Dirk Niemeyer, action42 GmbH * @version $Id$ */ @@ -32,7 +32,7 @@ public class MUserDefField extends X_AD_UserDef_Field /** * */ - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 20120403114400L; /** @@ -62,7 +62,14 @@ public class MUserDefField extends X_AD_UserDef_Field super (ctx, rs, trxName); } // MyModelExample - + /** + * Get matching MUserDefField related to current field and user definition for window and tab + * @param ctx + * @param AD_Field_ID + * @param AD_Tab_ID + * @param AD_Window_ID + * @return + */ public static MUserDefField get (Properties ctx, int AD_Field_ID, int AD_Tab_ID, int AD_Window_ID ) { diff --git a/org.adempiere.base/src/org/compiere/model/MUserDefTab.java b/org.adempiere.base/src/org/compiere/model/MUserDefTab.java index b9ad53bd19..2aa893877e 100644 --- a/org.adempiere.base/src/org/compiere/model/MUserDefTab.java +++ b/org.adempiere.base/src/org/compiere/model/MUserDefTab.java @@ -23,16 +23,17 @@ import org.compiere.util.DB; /** - * + * User overrides for tab model * @author Dirk Niemeyer, action 42 GmbH * @version $Id$ + * */ public class MUserDefTab extends X_AD_UserDef_Tab { /** * */ - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 20120403111900L; /** * Standard constructor. @@ -44,7 +45,7 @@ public class MUserDefTab extends X_AD_UserDef_Tab public MUserDefTab (Properties ctx, int ID, String trxName) { super (ctx, ID, trxName); - } // MyModelExample + } // MUserDefTab /** * Optional Load Constructor. @@ -59,9 +60,15 @@ public class MUserDefTab extends X_AD_UserDef_Tab public MUserDefTab (Properties ctx, ResultSet rs, String trxName) { super (ctx, rs, trxName); - } // MyModelExample - + } // MUserDefTab + /** + * Get matching MUserDefTab related to current tab and user definition for window + * @param ctx + * @param AD_Tab_ID + * @param AD_UserDefWin_ID + * @return + */ public static MUserDefTab getMatch (Properties ctx, int AD_Tab_ID, int AD_UserDefWin_ID ) { @@ -102,6 +109,13 @@ public class MUserDefTab extends X_AD_UserDef_Tab return retValue; } + /** + * Get matching MUserDefTab related to current tab and window + * @param ctx + * @param AD_Tab_ID + * @param AD_Window_ID + * @return + */ public static MUserDefTab get (Properties ctx, int AD_Tab_ID, int AD_Window_ID) { MUserDefWin userdefWin = MUserDefWin.getBestMatch(ctx, AD_Window_ID); @@ -112,4 +126,4 @@ public class MUserDefTab extends X_AD_UserDef_Tab } -} // MyModelExample +} // MUserDefTab diff --git a/org.adempiere.base/src/org/compiere/model/MUserDefWin.java b/org.adempiere.base/src/org/compiere/model/MUserDefWin.java index e19d118074..21d2df1e57 100644 --- a/org.adempiere.base/src/org/compiere/model/MUserDefWin.java +++ b/org.adempiere.base/src/org/compiere/model/MUserDefWin.java @@ -18,21 +18,23 @@ import java.sql.*; import java.util.*; import java.util.logging.Level; +import org.compiere.util.CCache; import org.compiere.util.CLogger; import org.compiere.util.DB; import org.compiere.util.Env; /** - * + * User overrides for window model * @author Dirk Niemeyer, action42 GmbH * @version $Id$ + * */ public class MUserDefWin extends X_AD_UserDef_Win { /** * */ - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 20120403122300L; /** * Standard constructor. @@ -44,7 +46,7 @@ public class MUserDefWin extends X_AD_UserDef_Win public MUserDefWin (Properties ctx, int ID, String trxName) { super (ctx, ID, trxName); - } // MyModelExample + } // MUserDefWin /** * Optional Load Constructor. @@ -59,9 +61,14 @@ public class MUserDefWin extends X_AD_UserDef_Win public MUserDefWin (Properties ctx, ResultSet rs, String trxName) { super (ctx, rs, trxName); - } // MyModelExample - + } // MUserDefWin + /** + * Get all MUserDefWin entries related to window + * @param ctx context + * @param window_ID window + * @return Array of MUserDefWin for window + */ private static MUserDefWin[] getAll (Properties ctx, int window_ID ) { @@ -70,7 +77,8 @@ public class MUserDefWin extends X_AD_UserDef_Win StringBuffer sql = new StringBuffer("SELECT * " + " FROM AD_UserDef_Win w " + " WHERE w.AD_Window_ID=? AND w.IsActive='Y' " - + " AND w.AD_Language=? " + // limit to current login language or no specific language + + " AND (w.AD_Language=? OR w.AD_Language IS NULL)" + " AND w.AD_Client_ID=? "); PreparedStatement pstmt = null; ResultSet rs = null; @@ -108,8 +116,21 @@ public class MUserDefWin extends X_AD_UserDef_Win } + /** + * Get best matching MUserDefWin for current window + * the best match is cached + * @param ctx + * @param window_ID + * @return best matching MUserDefWin + */ public static MUserDefWin getBestMatch (Properties ctx, int window_ID) { + // Check Cache + Integer key = new Integer(window_ID); + MUserDefWin retValue = (MUserDefWin)s_cache.get(key); + if (retValue != null) + return retValue; + // parameters final int AD_Org_ID = Env.getAD_Org_ID(ctx); //final int anyOrg = 0; @@ -158,6 +179,10 @@ public class MUserDefWin extends X_AD_UserDef_Win weight[i] = -1; } } + // prefer if related to current login language + if (weight[i] > -1 && candidates[i].getAD_Language().equalsIgnoreCase(Env.getAD_Language(ctx))) { + weight[i] = weight[i] + 8; + } // others are implicit } @@ -171,10 +196,15 @@ public class MUserDefWin extends X_AD_UserDef_Win } if (weight[maxindex] > -1) { - return candidates[maxindex]; + retValue=candidates[maxindex]; + s_cache.put(key, retValue); + return retValue; } else { return null; } } + + /** Cache of selected MUserDefWin entries **/ + private static CCache s_cache = new CCache("AD_UserDef_Win", 3); // 3 weights } // MUserDefWin From c9ef6c51efaf411fad1870ae39d7d15e732e7870 Mon Sep 17 00:00:00 2001 From: Dirk Niemeyer Date: Tue, 3 Apr 2012 15:31:27 +0200 Subject: [PATCH 11/29] IDEMPIERE-177 Correction in migration script --- .../830_IDEMPIERE-177_Window_Customization.sql | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/migration/360lts-release/postgresql/830_IDEMPIERE-177_Window_Customization.sql b/migration/360lts-release/postgresql/830_IDEMPIERE-177_Window_Customization.sql index ee8df52f74..54f17504ba 100644 --- a/migration/360lts-release/postgresql/830_IDEMPIERE-177_Window_Customization.sql +++ b/migration/360lts-release/postgresql/830_IDEMPIERE-177_Window_Customization.sql @@ -73,21 +73,11 @@ UPDATE AD_Column SET DefaultValue='''''',Updated=TO_TIMESTAMP('2010-08-09 20:52: insert into t_alter_column values('ad_userdef_field','DisplayLogic','VARCHAR(2000)',null,'') ; --- Aug 9, 2010 8:52:50 PM CEST --- Default comment for updating dictionary -insert into t_alter_column values('ad_userdef_field','DisplayLogic',null,'NULL',null) -; - -- Aug 9, 2010 8:55:45 PM CEST -- Default comment for updating dictionary insert into t_alter_column values('ad_userdef_field','DefaultValue','VARCHAR(2000)',null,'') ; --- Aug 9, 2010 8:55:45 PM CEST --- Default comment for updating dictionary -insert into t_alter_column values('ad_userdef_field','DefaultValue',null,'NULL',null) -; - -- Mar 5, 2012 2:16:34 PM CET -- IDEMPIERE-177 Window Customization UPDATE AD_Column SET Callout='org.compiere.model.CalloutWindowCustomization.window',Updated=TO_DATE('2012-03-05 14:16:34','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6395 From 0e8a8fbc7a9f722e746910f3a5649b743519f2ca Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Tue, 3 Apr 2012 11:27:39 -0500 Subject: [PATCH 12/29] IDEMPIERE-117 Add cost history table and cost movement view - synchronizing with transition version (needed for fitnesse tests of avg cost) --- .../360lts-release/oracle/824z_UpdateUU.sql | 205 ++++++++++++++++++ .../postgresql/824z_UpdateUU.sql | 205 ++++++++++++++++++ 2 files changed, 410 insertions(+) create mode 100644 migration/360lts-release/oracle/824z_UpdateUU.sql create mode 100644 migration/360lts-release/postgresql/824z_UpdateUU.sql diff --git a/migration/360lts-release/oracle/824z_UpdateUU.sql b/migration/360lts-release/oracle/824z_UpdateUU.sql new file mode 100644 index 0000000000..e70881d434 --- /dev/null +++ b/migration/360lts-release/oracle/824z_UpdateUU.sql @@ -0,0 +1,205 @@ +-- required to fill UU columns for installations coming from transition version + +UPDATE AD_Table SET AD_Table_UU='8c8d6676-6538-44f1-abf8-e480da7250b2' WHERE AD_Table_ID=200001; + +UPDATE AD_Column SET AD_Column_UU='1bbcd29a-4935-4908-bea6-4f8dc313d501' WHERE AD_Column_ID=200020; + +UPDATE AD_Column SET AD_Column_UU='45063c04-4fb3-46a6-b1e1-828ac5ce614c' WHERE AD_Column_ID=200021; + +UPDATE AD_Column SET AD_Column_UU='e32147f8-ad0d-41a9-afc6-ad70da9ddd5f' WHERE AD_Column_ID=200022; + +UPDATE AD_Column SET AD_Column_UU='6ff59e2a-33cd-4e8a-b9cd-8a377978f53c' WHERE AD_Column_ID=200023; + +UPDATE AD_Column SET AD_Column_UU='2e7271de-7b31-4b10-8ffc-983789141192' WHERE AD_Column_ID=200024; + +UPDATE AD_Column SET AD_Column_UU='4af1df12-baec-453a-bec9-bec84e71617e' WHERE AD_Column_ID=200025; + +UPDATE AD_Column SET AD_Column_UU='1232b0fb-6166-4ecf-a172-02dde4c7256a' WHERE AD_Column_ID=200026; + +UPDATE AD_Column SET AD_Column_UU='b9ea7299-e3d8-4ab1-9ff4-332e8ed562d6' WHERE AD_Column_ID=200027; + +UPDATE AD_Element SET AD_Element_UU='58eb631b-8cb1-4bab-93d0-bf9f51accd2e' WHERE AD_Element_ID=200005; + +UPDATE AD_Column SET AD_Column_UU='30905aed-94c4-4e8c-b2ce-de9aa41b1586' WHERE AD_Column_ID=200028; + +UPDATE AD_Element SET AD_Element_UU='c6a0fa10-0414-4257-9990-5fcb38a91ef3' WHERE AD_Element_ID=200006; + +UPDATE AD_Column SET AD_Column_UU='f2d3a898-4321-4a39-a8f6-f29f9daed67b' WHERE AD_Column_ID=200029; + +UPDATE AD_Element SET AD_Element_UU='069a7d89-cfe4-4f89-9f32-919b7caef225' WHERE AD_Element_ID=200007; + +UPDATE AD_Column SET AD_Column_UU='03a9f86d-8d7f-424b-ac2d-06b0390263e5' WHERE AD_Column_ID=200030; + +UPDATE AD_Column SET AD_Column_UU='453e63fd-79ec-4453-be2a-61a90cd3847d' WHERE AD_Column_ID=200031; + +UPDATE AD_Element SET AD_Element_UU='f0219a4d-ea25-473c-896a-1fe5dc6c25b8' WHERE AD_Element_ID=200008; + +UPDATE AD_Column SET AD_Column_UU='8440b8a0-7a07-48cd-92f2-8a72cd8afd50' WHERE AD_Column_ID=200032; + +UPDATE AD_Element SET AD_Element_UU='f2bfdcd4-9015-4135-b738-189f96469f03' WHERE AD_Element_ID=200009; + +UPDATE AD_Column SET AD_Column_UU='1b12534a-0973-4a1e-97e2-58bcc4478a10' WHERE AD_Column_ID=200033; + +UPDATE AD_Element SET AD_Element_UU='8f1543e0-6597-48bc-b0b0-1817bac20415' WHERE AD_Element_ID=200010; + +UPDATE AD_Column SET AD_Column_UU='58ee58db-f841-4965-8af5-13ff54068f4e' WHERE AD_Column_ID=200034; + +UPDATE AD_Element SET AD_Element_UU='de1b3615-148c-4cb1-9897-7fd0b5188320' WHERE AD_Element_ID=200011; + +UPDATE AD_Column SET AD_Column_UU='9129c55a-0a13-4db7-b64d-bdc9fc740a4b' WHERE AD_Column_ID=200035; + +UPDATE AD_Element SET AD_Element_UU='13f4a559-a32b-4118-a89b-b61d826bec35' WHERE AD_Element_ID=200012; + +UPDATE AD_Column SET AD_Column_UU='56e4fd27-9418-4104-823c-7c7ebd7d0e91' WHERE AD_Column_ID=200036; + +UPDATE AD_Element SET AD_Element_UU='c556911d-90fa-4e52-a569-92588720cc6c' WHERE AD_Element_ID=200013; + +UPDATE AD_Column SET AD_Column_UU='a6ff1e46-b660-4ca5-8b55-f831e2633b94' WHERE AD_Column_ID=200037; + +UPDATE AD_Element SET AD_Element_UU='ddc61868-2b75-49d8-a117-4d7460c09647' WHERE AD_Element_ID=200014; + +UPDATE AD_Column SET AD_Column_UU='a4bf053d-8778-4f9a-a9ed-3063d27e729b' WHERE AD_Column_ID=200038; + +UPDATE AD_Column SET AD_Column_UU='f44e0d81-fb24-414e-8f8b-b818a9fbb408' WHERE AD_Column_ID=200039; + +UPDATE AD_Column SET AD_Column_UU='717ff97a-bdbf-4cd0-9499-33446a8e17fd' WHERE AD_Column_ID=200040; + +UPDATE AD_Table SET AD_Table_UU='0ec6736e-94ff-4ff4-ae56-c3be505e1e00' WHERE AD_Table_ID=200002; + +UPDATE AD_Sequence SET AD_Sequence_UU='9e99f812-6480-4053-94d9-d987b2f28665' WHERE AD_Sequence_ID=200001; + +UPDATE AD_Column SET AD_Column_UU='6997dbc7-f6c2-4575-8fe6-c560c881c1ee' WHERE AD_Column_ID=200041; + +UPDATE AD_Column SET AD_Column_UU='06443f4d-f34c-40ed-91f1-f68f2099d770' WHERE AD_Column_ID=200042; + +UPDATE AD_Column SET AD_Column_UU='fc5b5b47-8f8c-4c72-b2d7-ec0da9186030' WHERE AD_Column_ID=200043; + +UPDATE AD_Column SET AD_Column_UU='7522bd43-da4f-40d7-bdd0-1d9ef2b37d4b' WHERE AD_Column_ID=200044; + +UPDATE AD_Column SET AD_Column_UU='7874a621-6c70-476c-96e8-abba949270e2' WHERE AD_Column_ID=200045; + +UPDATE AD_Column SET AD_Column_UU='9718d2ad-1e01-49b7-b7c7-0ddf78925b67' WHERE AD_Column_ID=200046; + +UPDATE AD_Column SET AD_Column_UU='c29855c1-dcc7-403c-86f6-30efb29e54a5' WHERE AD_Column_ID=200047; + +UPDATE AD_Column SET AD_Column_UU='1e1dd8bc-358c-4b4c-b6b6-b6c496cd7d9e' WHERE AD_Column_ID=200048; + +UPDATE AD_Column SET AD_Column_UU='0a26379d-e54f-434e-a570-38cd58176542' WHERE AD_Column_ID=200049; + +UPDATE AD_Column SET AD_Column_UU='33f411f6-b519-410d-a2c5-cfdad5a0520c' WHERE AD_Column_ID=200050; + +UPDATE AD_Column SET AD_Column_UU='77b74eff-9785-4985-9d6a-0c2e02e4c41a' WHERE AD_Column_ID=200051; + +UPDATE AD_Column SET AD_Column_UU='02aeafef-79ef-43af-b76c-02cb5d92aea7' WHERE AD_Column_ID=200052; + +UPDATE AD_Column SET AD_Column_UU='707ef80f-74d9-42ab-a507-ea0b9b87ef24' WHERE AD_Column_ID=200053; + +UPDATE AD_Column SET AD_Column_UU='3f6af769-b634-43a5-9889-20ff0480f371' WHERE AD_Column_ID=200054; + +UPDATE AD_Column SET AD_Column_UU='c28a3f40-c3a8-446e-83eb-9b461c458236' WHERE AD_Column_ID=200055; + +UPDATE AD_Column SET AD_Column_UU='7c0e70c0-32a6-49c4-bf9c-f1a0746c8b02' WHERE AD_Column_ID=200056; + +UPDATE AD_Column SET AD_Column_UU='f76c1c40-dbe9-42ee-9edd-9430d6b70fae' WHERE AD_Column_ID=200057; + +UPDATE AD_Column SET AD_Column_UU='419e470f-e2ee-4ce8-8460-1500140d71cc' WHERE AD_Column_ID=200058; + +UPDATE AD_Column SET AD_Column_UU='159d2c37-c8ca-46bd-8cdb-e1c3abf3008e' WHERE AD_Column_ID=200059; + +UPDATE AD_Column SET AD_Column_UU='aeaf777e-3671-4498-aaec-4dbc37163906' WHERE AD_Column_ID=200060; + +UPDATE AD_Column SET AD_Column_UU='992335c0-322b-4c02-b749-135e28931bfd' WHERE AD_Column_ID=200061; + +UPDATE AD_Column SET AD_Column_UU='c06c3c93-eaa1-4564-a778-42b10f5539c1' WHERE AD_Column_ID=200062; + +UPDATE AD_Column SET AD_Column_UU='7fbdb857-e16e-4d2d-836b-0251d935723b' WHERE AD_Column_ID=200063; + +UPDATE AD_Column SET AD_Column_UU='62a08e0b-de59-4e0f-8324-ff590b150536' WHERE AD_Column_ID=200064; + +UPDATE AD_Column SET AD_Column_UU='03ef993c-e33c-4f88-b9ba-431fc0c1449c' WHERE AD_Column_ID=200065; + +UPDATE AD_Column SET AD_Column_UU='72698e67-0526-41cd-990a-dcfebf24d73e' WHERE AD_Column_ID=200066; + +UPDATE AD_Column SET AD_Column_UU='a8e3de0a-07e2-493a-a7ac-429a41a47bb3' WHERE AD_Column_ID=200067; + +UPDATE AD_Column SET AD_Column_UU='c1026223-a57e-4e18-9dd4-bcaa5c283649' WHERE AD_Column_ID=200068; + +UPDATE AD_Column SET AD_Column_UU='b94aa816-9576-476e-99b9-258e40883b28' WHERE AD_Column_ID=200069; + +UPDATE AD_Column SET AD_Column_UU='2795cb3f-08f5-416a-a413-cac3cc614b9a' WHERE AD_Column_ID=200070; + +UPDATE AD_Column SET AD_Column_UU='68702b21-9a7f-42d1-8d00-430c3c42a335' WHERE AD_Column_ID=200071; + +UPDATE AD_Column SET AD_Column_UU='9923bd35-b9e1-493e-9b85-7812447c65f3' WHERE AD_Column_ID=200072; + +UPDATE AD_Column SET AD_Column_UU='bb6bf453-b9b7-4145-b9e2-5e0b2c3fb058' WHERE AD_Column_ID=200073; + +UPDATE AD_Column SET AD_Column_UU='21e576f8-bcef-4acf-8668-198189e3d8ad' WHERE AD_Column_ID=200074; + +UPDATE AD_Tab SET AD_Tab_UU='834474e3-50d5-41d4-a707-ca6363f19427' WHERE AD_Tab_ID=200000; + +UPDATE AD_Field SET AD_Field_UU='8b6b26dc-1c4b-4db8-b09e-a756d8128dd6' WHERE AD_Field_ID=200005; + +UPDATE AD_Field SET AD_Field_UU='73f9fbe4-fe30-48b3-b790-6581a4e61370' WHERE AD_Field_ID=200006; + +UPDATE AD_Field SET AD_Field_UU='d7e2508d-3eeb-43b7-bbee-234fed237065' WHERE AD_Field_ID=200007; + +UPDATE AD_Field SET AD_Field_UU='66f09047-e4cb-4b09-bcc0-6cdc109a60d6' WHERE AD_Field_ID=200008; + +UPDATE AD_Field SET AD_Field_UU='65399c71-c4b2-4cab-90e0-7d61204e98da' WHERE AD_Field_ID=200009; + +UPDATE AD_Field SET AD_Field_UU='65779cfa-bc31-413a-8e0c-4ef258a1b0f8' WHERE AD_Field_ID=200010; + +UPDATE AD_Field SET AD_Field_UU='39f40544-5bb5-4bdb-ba4a-85b64905ad51' WHERE AD_Field_ID=200012; + +UPDATE AD_Field SET AD_Field_UU='8bcb338d-e86f-488d-aaf5-98d8e2c9dca2' WHERE AD_Field_ID=200011; + +UPDATE AD_Field SET AD_Field_UU='8bf1fec8-10b3-46ab-93d2-73e688fe5296' WHERE AD_Field_ID=200013; + +UPDATE AD_Field SET AD_Field_UU='a7e2ad58-1b58-486f-8f49-38ca9bb28208' WHERE AD_Field_ID=200014; + +UPDATE AD_Field SET AD_Field_UU='f7b15a16-dc17-486e-b19e-f9045e1be9af' WHERE AD_Field_ID=200015; + +UPDATE AD_Field SET AD_Field_UU='6597ecd8-91a1-4b3a-acaa-4bb2fc3d0122' WHERE AD_Field_ID=200016; + +UPDATE AD_Field SET AD_Field_UU='5223bee9-051a-4811-904d-58ddad14eac2' WHERE AD_Field_ID=200017; + +UPDATE AD_Field SET AD_Field_UU='32104954-503b-455d-bdf6-f0bd8b1168a1' WHERE AD_Field_ID=200018; + +UPDATE AD_Field SET AD_Field_UU='78928c1f-21bd-4fc1-bdc8-4a5145a445e0' WHERE AD_Field_ID=200019; + +UPDATE AD_Field SET AD_Field_UU='86dcee6e-9d39-473b-8580-847c4fc8b37f' WHERE AD_Field_ID=200020; + +UPDATE AD_Field SET AD_Field_UU='b8569191-fc3c-4c49-a95d-d0f36b02ae34' WHERE AD_Field_ID=200021; + +UPDATE AD_Field SET AD_Field_UU='0f1102a0-ef80-4fb5-b68b-34103fdf5f64' WHERE AD_Field_ID=200023; + +UPDATE AD_Field SET AD_Field_UU='3464b90f-85cc-4d1a-bad2-00a16ac0597d' WHERE AD_Field_ID=200022; + +UPDATE AD_Field SET AD_Field_UU='d13f478d-3408-43e5-851b-396c060f5278' WHERE AD_Field_ID=200024; + +UPDATE AD_Field SET AD_Field_UU='31c9b27e-53d7-47d2-95f0-f2fe497ad44c' WHERE AD_Field_ID=200025; + +UPDATE AD_Field SET AD_Field_UU='a9e57492-bda2-463d-8081-d76255673b56' WHERE AD_Field_ID=200026; + +UPDATE AD_Field SET AD_Field_UU='0d987f31-d5df-4efc-8cb6-d70a7dc3d433' WHERE AD_Field_ID=200027; + +UPDATE AD_Field SET AD_Field_UU='faf7306c-9429-4840-a5df-9de9748ec660' WHERE AD_Field_ID=200028; + +UPDATE AD_Field SET AD_Field_UU='cd3d0301-7559-4cb9-8883-aa7f2c9184b9' WHERE AD_Field_ID=200029; + +UPDATE AD_Field SET AD_Field_UU='c1fe07ef-477e-4370-9583-2a24aa086316' WHERE AD_Field_ID=200030; + +UPDATE AD_Field SET AD_Field_UU='3022e456-5a80-448d-81ce-837ccd8a7488' WHERE AD_Field_ID=200031; + +UPDATE AD_Field SET AD_Field_UU='f67d0bc4-3239-49bd-a00e-47125316dc54' WHERE AD_Field_ID=200032; + +UPDATE AD_Field SET AD_Field_UU='99e6a7fa-b939-481d-942c-0ea8fc936630' WHERE AD_Field_ID=200033; + +UPDATE AD_Field SET AD_Field_UU='945e92e7-d23f-407d-88e2-741216b30bb1' WHERE AD_Field_ID=200034; + +UPDATE AD_System + SET LastMigrationScriptApplied='824z_UpdateUU.sql' +WHERE LastMigrationScriptApplied<'824z_UpdateUU.sql' + OR LastMigrationScriptApplied IS NULL +; diff --git a/migration/360lts-release/postgresql/824z_UpdateUU.sql b/migration/360lts-release/postgresql/824z_UpdateUU.sql new file mode 100644 index 0000000000..e70881d434 --- /dev/null +++ b/migration/360lts-release/postgresql/824z_UpdateUU.sql @@ -0,0 +1,205 @@ +-- required to fill UU columns for installations coming from transition version + +UPDATE AD_Table SET AD_Table_UU='8c8d6676-6538-44f1-abf8-e480da7250b2' WHERE AD_Table_ID=200001; + +UPDATE AD_Column SET AD_Column_UU='1bbcd29a-4935-4908-bea6-4f8dc313d501' WHERE AD_Column_ID=200020; + +UPDATE AD_Column SET AD_Column_UU='45063c04-4fb3-46a6-b1e1-828ac5ce614c' WHERE AD_Column_ID=200021; + +UPDATE AD_Column SET AD_Column_UU='e32147f8-ad0d-41a9-afc6-ad70da9ddd5f' WHERE AD_Column_ID=200022; + +UPDATE AD_Column SET AD_Column_UU='6ff59e2a-33cd-4e8a-b9cd-8a377978f53c' WHERE AD_Column_ID=200023; + +UPDATE AD_Column SET AD_Column_UU='2e7271de-7b31-4b10-8ffc-983789141192' WHERE AD_Column_ID=200024; + +UPDATE AD_Column SET AD_Column_UU='4af1df12-baec-453a-bec9-bec84e71617e' WHERE AD_Column_ID=200025; + +UPDATE AD_Column SET AD_Column_UU='1232b0fb-6166-4ecf-a172-02dde4c7256a' WHERE AD_Column_ID=200026; + +UPDATE AD_Column SET AD_Column_UU='b9ea7299-e3d8-4ab1-9ff4-332e8ed562d6' WHERE AD_Column_ID=200027; + +UPDATE AD_Element SET AD_Element_UU='58eb631b-8cb1-4bab-93d0-bf9f51accd2e' WHERE AD_Element_ID=200005; + +UPDATE AD_Column SET AD_Column_UU='30905aed-94c4-4e8c-b2ce-de9aa41b1586' WHERE AD_Column_ID=200028; + +UPDATE AD_Element SET AD_Element_UU='c6a0fa10-0414-4257-9990-5fcb38a91ef3' WHERE AD_Element_ID=200006; + +UPDATE AD_Column SET AD_Column_UU='f2d3a898-4321-4a39-a8f6-f29f9daed67b' WHERE AD_Column_ID=200029; + +UPDATE AD_Element SET AD_Element_UU='069a7d89-cfe4-4f89-9f32-919b7caef225' WHERE AD_Element_ID=200007; + +UPDATE AD_Column SET AD_Column_UU='03a9f86d-8d7f-424b-ac2d-06b0390263e5' WHERE AD_Column_ID=200030; + +UPDATE AD_Column SET AD_Column_UU='453e63fd-79ec-4453-be2a-61a90cd3847d' WHERE AD_Column_ID=200031; + +UPDATE AD_Element SET AD_Element_UU='f0219a4d-ea25-473c-896a-1fe5dc6c25b8' WHERE AD_Element_ID=200008; + +UPDATE AD_Column SET AD_Column_UU='8440b8a0-7a07-48cd-92f2-8a72cd8afd50' WHERE AD_Column_ID=200032; + +UPDATE AD_Element SET AD_Element_UU='f2bfdcd4-9015-4135-b738-189f96469f03' WHERE AD_Element_ID=200009; + +UPDATE AD_Column SET AD_Column_UU='1b12534a-0973-4a1e-97e2-58bcc4478a10' WHERE AD_Column_ID=200033; + +UPDATE AD_Element SET AD_Element_UU='8f1543e0-6597-48bc-b0b0-1817bac20415' WHERE AD_Element_ID=200010; + +UPDATE AD_Column SET AD_Column_UU='58ee58db-f841-4965-8af5-13ff54068f4e' WHERE AD_Column_ID=200034; + +UPDATE AD_Element SET AD_Element_UU='de1b3615-148c-4cb1-9897-7fd0b5188320' WHERE AD_Element_ID=200011; + +UPDATE AD_Column SET AD_Column_UU='9129c55a-0a13-4db7-b64d-bdc9fc740a4b' WHERE AD_Column_ID=200035; + +UPDATE AD_Element SET AD_Element_UU='13f4a559-a32b-4118-a89b-b61d826bec35' WHERE AD_Element_ID=200012; + +UPDATE AD_Column SET AD_Column_UU='56e4fd27-9418-4104-823c-7c7ebd7d0e91' WHERE AD_Column_ID=200036; + +UPDATE AD_Element SET AD_Element_UU='c556911d-90fa-4e52-a569-92588720cc6c' WHERE AD_Element_ID=200013; + +UPDATE AD_Column SET AD_Column_UU='a6ff1e46-b660-4ca5-8b55-f831e2633b94' WHERE AD_Column_ID=200037; + +UPDATE AD_Element SET AD_Element_UU='ddc61868-2b75-49d8-a117-4d7460c09647' WHERE AD_Element_ID=200014; + +UPDATE AD_Column SET AD_Column_UU='a4bf053d-8778-4f9a-a9ed-3063d27e729b' WHERE AD_Column_ID=200038; + +UPDATE AD_Column SET AD_Column_UU='f44e0d81-fb24-414e-8f8b-b818a9fbb408' WHERE AD_Column_ID=200039; + +UPDATE AD_Column SET AD_Column_UU='717ff97a-bdbf-4cd0-9499-33446a8e17fd' WHERE AD_Column_ID=200040; + +UPDATE AD_Table SET AD_Table_UU='0ec6736e-94ff-4ff4-ae56-c3be505e1e00' WHERE AD_Table_ID=200002; + +UPDATE AD_Sequence SET AD_Sequence_UU='9e99f812-6480-4053-94d9-d987b2f28665' WHERE AD_Sequence_ID=200001; + +UPDATE AD_Column SET AD_Column_UU='6997dbc7-f6c2-4575-8fe6-c560c881c1ee' WHERE AD_Column_ID=200041; + +UPDATE AD_Column SET AD_Column_UU='06443f4d-f34c-40ed-91f1-f68f2099d770' WHERE AD_Column_ID=200042; + +UPDATE AD_Column SET AD_Column_UU='fc5b5b47-8f8c-4c72-b2d7-ec0da9186030' WHERE AD_Column_ID=200043; + +UPDATE AD_Column SET AD_Column_UU='7522bd43-da4f-40d7-bdd0-1d9ef2b37d4b' WHERE AD_Column_ID=200044; + +UPDATE AD_Column SET AD_Column_UU='7874a621-6c70-476c-96e8-abba949270e2' WHERE AD_Column_ID=200045; + +UPDATE AD_Column SET AD_Column_UU='9718d2ad-1e01-49b7-b7c7-0ddf78925b67' WHERE AD_Column_ID=200046; + +UPDATE AD_Column SET AD_Column_UU='c29855c1-dcc7-403c-86f6-30efb29e54a5' WHERE AD_Column_ID=200047; + +UPDATE AD_Column SET AD_Column_UU='1e1dd8bc-358c-4b4c-b6b6-b6c496cd7d9e' WHERE AD_Column_ID=200048; + +UPDATE AD_Column SET AD_Column_UU='0a26379d-e54f-434e-a570-38cd58176542' WHERE AD_Column_ID=200049; + +UPDATE AD_Column SET AD_Column_UU='33f411f6-b519-410d-a2c5-cfdad5a0520c' WHERE AD_Column_ID=200050; + +UPDATE AD_Column SET AD_Column_UU='77b74eff-9785-4985-9d6a-0c2e02e4c41a' WHERE AD_Column_ID=200051; + +UPDATE AD_Column SET AD_Column_UU='02aeafef-79ef-43af-b76c-02cb5d92aea7' WHERE AD_Column_ID=200052; + +UPDATE AD_Column SET AD_Column_UU='707ef80f-74d9-42ab-a507-ea0b9b87ef24' WHERE AD_Column_ID=200053; + +UPDATE AD_Column SET AD_Column_UU='3f6af769-b634-43a5-9889-20ff0480f371' WHERE AD_Column_ID=200054; + +UPDATE AD_Column SET AD_Column_UU='c28a3f40-c3a8-446e-83eb-9b461c458236' WHERE AD_Column_ID=200055; + +UPDATE AD_Column SET AD_Column_UU='7c0e70c0-32a6-49c4-bf9c-f1a0746c8b02' WHERE AD_Column_ID=200056; + +UPDATE AD_Column SET AD_Column_UU='f76c1c40-dbe9-42ee-9edd-9430d6b70fae' WHERE AD_Column_ID=200057; + +UPDATE AD_Column SET AD_Column_UU='419e470f-e2ee-4ce8-8460-1500140d71cc' WHERE AD_Column_ID=200058; + +UPDATE AD_Column SET AD_Column_UU='159d2c37-c8ca-46bd-8cdb-e1c3abf3008e' WHERE AD_Column_ID=200059; + +UPDATE AD_Column SET AD_Column_UU='aeaf777e-3671-4498-aaec-4dbc37163906' WHERE AD_Column_ID=200060; + +UPDATE AD_Column SET AD_Column_UU='992335c0-322b-4c02-b749-135e28931bfd' WHERE AD_Column_ID=200061; + +UPDATE AD_Column SET AD_Column_UU='c06c3c93-eaa1-4564-a778-42b10f5539c1' WHERE AD_Column_ID=200062; + +UPDATE AD_Column SET AD_Column_UU='7fbdb857-e16e-4d2d-836b-0251d935723b' WHERE AD_Column_ID=200063; + +UPDATE AD_Column SET AD_Column_UU='62a08e0b-de59-4e0f-8324-ff590b150536' WHERE AD_Column_ID=200064; + +UPDATE AD_Column SET AD_Column_UU='03ef993c-e33c-4f88-b9ba-431fc0c1449c' WHERE AD_Column_ID=200065; + +UPDATE AD_Column SET AD_Column_UU='72698e67-0526-41cd-990a-dcfebf24d73e' WHERE AD_Column_ID=200066; + +UPDATE AD_Column SET AD_Column_UU='a8e3de0a-07e2-493a-a7ac-429a41a47bb3' WHERE AD_Column_ID=200067; + +UPDATE AD_Column SET AD_Column_UU='c1026223-a57e-4e18-9dd4-bcaa5c283649' WHERE AD_Column_ID=200068; + +UPDATE AD_Column SET AD_Column_UU='b94aa816-9576-476e-99b9-258e40883b28' WHERE AD_Column_ID=200069; + +UPDATE AD_Column SET AD_Column_UU='2795cb3f-08f5-416a-a413-cac3cc614b9a' WHERE AD_Column_ID=200070; + +UPDATE AD_Column SET AD_Column_UU='68702b21-9a7f-42d1-8d00-430c3c42a335' WHERE AD_Column_ID=200071; + +UPDATE AD_Column SET AD_Column_UU='9923bd35-b9e1-493e-9b85-7812447c65f3' WHERE AD_Column_ID=200072; + +UPDATE AD_Column SET AD_Column_UU='bb6bf453-b9b7-4145-b9e2-5e0b2c3fb058' WHERE AD_Column_ID=200073; + +UPDATE AD_Column SET AD_Column_UU='21e576f8-bcef-4acf-8668-198189e3d8ad' WHERE AD_Column_ID=200074; + +UPDATE AD_Tab SET AD_Tab_UU='834474e3-50d5-41d4-a707-ca6363f19427' WHERE AD_Tab_ID=200000; + +UPDATE AD_Field SET AD_Field_UU='8b6b26dc-1c4b-4db8-b09e-a756d8128dd6' WHERE AD_Field_ID=200005; + +UPDATE AD_Field SET AD_Field_UU='73f9fbe4-fe30-48b3-b790-6581a4e61370' WHERE AD_Field_ID=200006; + +UPDATE AD_Field SET AD_Field_UU='d7e2508d-3eeb-43b7-bbee-234fed237065' WHERE AD_Field_ID=200007; + +UPDATE AD_Field SET AD_Field_UU='66f09047-e4cb-4b09-bcc0-6cdc109a60d6' WHERE AD_Field_ID=200008; + +UPDATE AD_Field SET AD_Field_UU='65399c71-c4b2-4cab-90e0-7d61204e98da' WHERE AD_Field_ID=200009; + +UPDATE AD_Field SET AD_Field_UU='65779cfa-bc31-413a-8e0c-4ef258a1b0f8' WHERE AD_Field_ID=200010; + +UPDATE AD_Field SET AD_Field_UU='39f40544-5bb5-4bdb-ba4a-85b64905ad51' WHERE AD_Field_ID=200012; + +UPDATE AD_Field SET AD_Field_UU='8bcb338d-e86f-488d-aaf5-98d8e2c9dca2' WHERE AD_Field_ID=200011; + +UPDATE AD_Field SET AD_Field_UU='8bf1fec8-10b3-46ab-93d2-73e688fe5296' WHERE AD_Field_ID=200013; + +UPDATE AD_Field SET AD_Field_UU='a7e2ad58-1b58-486f-8f49-38ca9bb28208' WHERE AD_Field_ID=200014; + +UPDATE AD_Field SET AD_Field_UU='f7b15a16-dc17-486e-b19e-f9045e1be9af' WHERE AD_Field_ID=200015; + +UPDATE AD_Field SET AD_Field_UU='6597ecd8-91a1-4b3a-acaa-4bb2fc3d0122' WHERE AD_Field_ID=200016; + +UPDATE AD_Field SET AD_Field_UU='5223bee9-051a-4811-904d-58ddad14eac2' WHERE AD_Field_ID=200017; + +UPDATE AD_Field SET AD_Field_UU='32104954-503b-455d-bdf6-f0bd8b1168a1' WHERE AD_Field_ID=200018; + +UPDATE AD_Field SET AD_Field_UU='78928c1f-21bd-4fc1-bdc8-4a5145a445e0' WHERE AD_Field_ID=200019; + +UPDATE AD_Field SET AD_Field_UU='86dcee6e-9d39-473b-8580-847c4fc8b37f' WHERE AD_Field_ID=200020; + +UPDATE AD_Field SET AD_Field_UU='b8569191-fc3c-4c49-a95d-d0f36b02ae34' WHERE AD_Field_ID=200021; + +UPDATE AD_Field SET AD_Field_UU='0f1102a0-ef80-4fb5-b68b-34103fdf5f64' WHERE AD_Field_ID=200023; + +UPDATE AD_Field SET AD_Field_UU='3464b90f-85cc-4d1a-bad2-00a16ac0597d' WHERE AD_Field_ID=200022; + +UPDATE AD_Field SET AD_Field_UU='d13f478d-3408-43e5-851b-396c060f5278' WHERE AD_Field_ID=200024; + +UPDATE AD_Field SET AD_Field_UU='31c9b27e-53d7-47d2-95f0-f2fe497ad44c' WHERE AD_Field_ID=200025; + +UPDATE AD_Field SET AD_Field_UU='a9e57492-bda2-463d-8081-d76255673b56' WHERE AD_Field_ID=200026; + +UPDATE AD_Field SET AD_Field_UU='0d987f31-d5df-4efc-8cb6-d70a7dc3d433' WHERE AD_Field_ID=200027; + +UPDATE AD_Field SET AD_Field_UU='faf7306c-9429-4840-a5df-9de9748ec660' WHERE AD_Field_ID=200028; + +UPDATE AD_Field SET AD_Field_UU='cd3d0301-7559-4cb9-8883-aa7f2c9184b9' WHERE AD_Field_ID=200029; + +UPDATE AD_Field SET AD_Field_UU='c1fe07ef-477e-4370-9583-2a24aa086316' WHERE AD_Field_ID=200030; + +UPDATE AD_Field SET AD_Field_UU='3022e456-5a80-448d-81ce-837ccd8a7488' WHERE AD_Field_ID=200031; + +UPDATE AD_Field SET AD_Field_UU='f67d0bc4-3239-49bd-a00e-47125316dc54' WHERE AD_Field_ID=200032; + +UPDATE AD_Field SET AD_Field_UU='99e6a7fa-b939-481d-942c-0ea8fc936630' WHERE AD_Field_ID=200033; + +UPDATE AD_Field SET AD_Field_UU='945e92e7-d23f-407d-88e2-741216b30bb1' WHERE AD_Field_ID=200034; + +UPDATE AD_System + SET LastMigrationScriptApplied='824z_UpdateUU.sql' +WHERE LastMigrationScriptApplied<'824z_UpdateUU.sql' + OR LastMigrationScriptApplied IS NULL +; From 96153b24297fb7de2e27db95edd77cc5c4161ebf Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Tue, 3 Apr 2012 11:28:19 -0500 Subject: [PATCH 13/29] IDEMPIERE-117 Add cost history table and cost movement view - add missing sequence --- migration/360lts-release/oracle/829_IDEMPIERE-117.sql | 10 ++++++++++ .../360lts-release/postgresql/829_IDEMPIERE-117.sql | 10 ++++++++++ 2 files changed, 20 insertions(+) create mode 100644 migration/360lts-release/oracle/829_IDEMPIERE-117.sql create mode 100644 migration/360lts-release/postgresql/829_IDEMPIERE-117.sql diff --git a/migration/360lts-release/oracle/829_IDEMPIERE-117.sql b/migration/360lts-release/oracle/829_IDEMPIERE-117.sql new file mode 100644 index 0000000000..bc2af1c5b4 --- /dev/null +++ b/migration/360lts-release/oracle/829_IDEMPIERE-117.sql @@ -0,0 +1,10 @@ +-- Apr 3, 2012 11:17:51 AM COT +-- IDEMPIERE-117 Add cost history table and cost movement view +INSERT INTO AD_Sequence (IncrementNo,StartNewYear,CurrentNextSys,IsTableID,StartNo,CurrentNext,IsAudited,IsAutoSequence,AD_Sequence_ID,Description,Name,AD_Org_ID,AD_Client_ID,Updated,UpdatedBy,Created,CreatedBy,IsActive) VALUES (1,'N',100,'Y',1000000,1000000,'N','Y',200005,'Table M_CostHistory','M_CostHistory',0,0,TO_DATE('2012-04-03 11:17:50','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2012-04-03 11:17:50','YYYY-MM-DD HH24:MI:SS'),100,'Y') +; + +UPDATE AD_System + SET LastMigrationScriptApplied='829_IDEMPIERE-117.sql' +WHERE LastMigrationScriptApplied<'829_IDEMPIERE-117.sql' + OR LastMigrationScriptApplied IS NULL +; diff --git a/migration/360lts-release/postgresql/829_IDEMPIERE-117.sql b/migration/360lts-release/postgresql/829_IDEMPIERE-117.sql new file mode 100644 index 0000000000..9f9fa4f4de --- /dev/null +++ b/migration/360lts-release/postgresql/829_IDEMPIERE-117.sql @@ -0,0 +1,10 @@ +-- Apr 3, 2012 11:17:51 AM COT +-- IDEMPIERE-117 Add cost history table and cost movement view +INSERT INTO AD_Sequence (IncrementNo,StartNewYear,CurrentNextSys,IsTableID,StartNo,CurrentNext,IsAudited,IsAutoSequence,AD_Sequence_ID,Description,Name,AD_Org_ID,AD_Client_ID,Updated,UpdatedBy,Created,CreatedBy,IsActive) VALUES (1,'N',100,'Y',1000000,1000000,'N','Y',200005,'Table M_CostHistory','M_CostHistory',0,0,TO_TIMESTAMP('2012-04-03 11:17:50','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2012-04-03 11:17:50','YYYY-MM-DD HH24:MI:SS'),100,'Y') +; + +UPDATE AD_System + SET LastMigrationScriptApplied='829_IDEMPIERE-117.sql' +WHERE LastMigrationScriptApplied<'829_IDEMPIERE-117.sql' + OR LastMigrationScriptApplied IS NULL +; From f319ae426699c8613ed3dc2cf991121bbb2e24a2 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Tue, 3 Apr 2012 17:07:34 -0500 Subject: [PATCH 14/29] Avoid message about cost collector not reset --- .../src/org/compiere/process/FactAcctReset.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/org.adempiere.base.process/src/org/compiere/process/FactAcctReset.java b/org.adempiere.base.process/src/org/compiere/process/FactAcctReset.java index 667429a51c..9d6c7a4686 100644 --- a/org.adempiere.base.process/src/org/compiere/process/FactAcctReset.java +++ b/org.adempiere.base.process/src/org/compiere/process/FactAcctReset.java @@ -44,6 +44,7 @@ import org.compiere.util.DB; import org.compiere.util.TimeUtil; import org.eevolution.model.X_DD_Order; import org.eevolution.model.X_HR_Process; +import org.eevolution.model.X_PP_Cost_Collector; import org.eevolution.model.X_PP_Order; /** @@ -243,6 +244,8 @@ public class FactAcctReset extends SvrProcess docBaseType = "= '" + MPeriodControl.DOCBASETYPE_DistributionOrder+ "'"; else if (AD_Table_ID == X_HR_Process.Table_ID) docBaseType = "= '" + MPeriodControl.DOCBASETYPE_Payroll+ "'"; + else if (AD_Table_ID == X_PP_Cost_Collector.Table_ID) + docBaseType = "= '" + MPeriodControl.DOCBASETYPE_ManufacturingCostCollector+ "'"; // if (docBaseType == null) { From 32c0db81362470ec9e1ec27b0cfeeda44adcb1ed Mon Sep 17 00:00:00 2001 From: Heng Sin Low Date: Wed, 4 Apr 2012 18:11:01 +0800 Subject: [PATCH 15/29] IDEMPIERE-215 Costing: Drop M_Product_Costing. --- .../src/org/compiere/process/CostUpdate.java | 50 --- .../process/M_Product_CostingUpdate.java | 293 ------------ .../org/compiere/process/OrgOwnership.java | 6 - .../process/T_InventoryValue_Create.java | 6 +- .../src/org/compiere/acct/Doc_InOut.java | 33 -- .../src/org/compiere/acct/Doc_Invoice.java | 69 --- .../src/org/compiere/acct/Doc_MatchInv.java | 65 --- .../src/org/compiere/acct/Doc_MatchPO.java | 29 -- .../src/org/compiere/acct/Doc_Order.java | 50 +-- .../src/org/compiere/acct/ProductInfo.java | 64 --- .../compiere/model/I_M_Product_Costing.java | 317 ------------- .../src/org/compiere/model/MCost.java | 8 - .../src/org/compiere/model/MProduct.java | 14 +- .../org/compiere/model/MProductCosting.java | 133 ------ .../src/org/compiere/model/ProductCost.java | 143 ------ .../compiere/model/X_M_Product_Costing.java | 421 ------------------ .../src/org/compiere/apps/form/Merge.java | 2 +- 17 files changed, 7 insertions(+), 1696 deletions(-) delete mode 100644 org.adempiere.base.process/src/org/compiere/process/M_Product_CostingUpdate.java delete mode 100644 org.adempiere.base/src/org/compiere/model/I_M_Product_Costing.java delete mode 100644 org.adempiere.base/src/org/compiere/model/MProductCosting.java delete mode 100644 org.adempiere.base/src/org/compiere/model/X_M_Product_Costing.java diff --git a/org.adempiere.base.process/src/org/compiere/process/CostUpdate.java b/org.adempiere.base.process/src/org/compiere/process/CostUpdate.java index 1185d937e2..aecef8575c 100644 --- a/org.adempiere.base.process/src/org/compiere/process/CostUpdate.java +++ b/org.adempiere.base.process/src/org/compiere/process/CostUpdate.java @@ -60,7 +60,6 @@ public class CostUpdate extends SvrProcess private static final String TO_FutureStandardCost = "f"; private static final String TO_LastInvoicePrice = "i"; private static final String TO_LastPOPrice = "p"; - private static final String TO_OldStandardCost = "x"; /** Standard Cost Element */ private MCostElement m_ce = null; @@ -464,10 +463,6 @@ public class CostUpdate extends SvrProcess retValue = xCost.getCurrentCostPrice(); } - // Old Std Costs - else if (to.equals(TO_OldStandardCost)) - retValue = getOldCurrentCostPrice(cost); - // Price List else if (to.equals(TO_PriceListLimit)) retValue = getPrice(cost); @@ -496,51 +491,6 @@ public class CostUpdate extends SvrProcess return ce; } // getCostElement - /** - * Get Old Current Cost Price - * @param cost costs - * @return price if found - */ - private BigDecimal getOldCurrentCostPrice(MCost cost) - { - BigDecimal retValue = null; - String sql = "SELECT CostStandard, CurrentCostPrice " - + "FROM M_Product_Costing " - + "WHERE M_Product_ID=? AND C_AcctSchema_ID=?"; - PreparedStatement pstmt = null; - try - { - pstmt = DB.prepareStatement (sql, null); - pstmt.setInt (1, cost.getM_Product_ID()); - pstmt.setInt (2, cost.getC_AcctSchema_ID()); - ResultSet rs = pstmt.executeQuery (); - if (rs.next ()) - { - retValue = rs.getBigDecimal(1); - if (retValue == null || retValue.signum() == 0) - retValue = rs.getBigDecimal(2); - } - rs.close (); - pstmt.close (); - pstmt = null; - } - catch (Exception e) - { - log.log (Level.SEVERE, sql, e); - } - try - { - if (pstmt != null) - pstmt.close (); - pstmt = null; - } - catch (Exception e) - { - pstmt = null; - } - return retValue; - } // getOldCurrentCostPrice - /** * Get Price from Price List * @param cost cost record diff --git a/org.adempiere.base.process/src/org/compiere/process/M_Product_CostingUpdate.java b/org.adempiere.base.process/src/org/compiere/process/M_Product_CostingUpdate.java deleted file mode 100644 index a70461274f..0000000000 --- a/org.adempiere.base.process/src/org/compiere/process/M_Product_CostingUpdate.java +++ /dev/null @@ -1,293 +0,0 @@ -/****************************************************************************** - * Product: Adempiere ERP & CRM Smart Business Solution * - * Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it * - * under the terms version 2 of the GNU General Public License as published * - * by the Free Software Foundation. This program is distributed in the hope * - * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * - * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * - * See the GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License along * - * with this program; if not, write to the Free Software Foundation, Inc., * - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * - * For the text or an alternative of this public license, you may reach us * - * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * - * or via info@compiere.org or http://www.compiere.org/license.html * - * Portions created by Carlos Ruiz are Copyright (C) 2005 QSS Ltda. - * Contributor(s): Carlos Ruiz (globalqss) - *****************************************************************************/ -package org.compiere.process; - -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.util.logging.Level; - -import org.compiere.util.AdempiereUserError; -import org.compiere.util.CLogger; -import org.compiere.util.DB; -import org.compiere.util.ValueNamePair; - -/** - * Title: Create the (new) costing information - * Description: - * - (optionally) update FutureCostPrice according to Parameter - * - (optionally) set CostStandard to FutureCostPrice - * - set CurrentCostPrice to cost depending on primary AcctSchema - * - * @author Carlos Ruiz (globalqss) - * @version $Id: M_Product_CostingUpdate.java,v 1.0 2005/09/26 22:28:00 globalqss Exp $ - */ -public class M_Product_CostingUpdate extends SvrProcess -{ - - /** The Record */ - private int p_Record_ID = 0; - private int p_AD_Client_ID = -1; - private int p_M_Product_Category_ID = -1; - private String p_SetFutureCostTo; - private int p_M_PriceList_Version_ID = -1; - private String p_SetStandardCost; - private String v_CostingMethod; - - /** - * Prepare - e.g., get Parameters. - */ - protected void prepare() - { - ProcessInfoParameter[] para = getParameter(); - for (int i = 0; i < para.length; i++) - { - String name = para[i].getParameterName(); - if (para[i].getParameter() == null) - ; - else if (name.equals("AD_Client_ID")) - p_AD_Client_ID = para[i].getParameterAsInt(); - else if (name.equals("M_Product_Category_ID")) - p_M_Product_Category_ID = para[i].getParameterAsInt(); - else if (name.equals("SetFutureCostTo")) - p_SetFutureCostTo = (String) para[i].getParameter(); - else if (name.equals("M_PriceList_Version_ID")) - p_M_PriceList_Version_ID = para[i].getParameterAsInt(); - else if (name.equals("SetStandardCost")) - p_SetStandardCost = (String) para[i].getParameter(); - else - log.log(Level.SEVERE, "Unknown Parameter: " + name); - } - p_Record_ID = getRecord_ID(); - } // prepare - - /** - * Process - * @return message - * @throws Exception - */ - protected String doIt() throws Exception - { - StringBuffer sql = null; - int no = 0; - int no1 = 0; - int no2 = 0; - - log.info("Create the (new) costing information"); - - // ========== (1) Set Future Cost To ========== - - if (p_SetFutureCostTo.equals("S")) { - // S - Standard Cost - log.info("Set to Standard Cost"); - sql = new StringBuffer( - "UPDATE M_Product_Costing " + - "SET FutureCostPrice = CostStandard " + - "WHERE AD_Client_ID=" + p_AD_Client_ID + " AND " + - "("+ p_M_Product_Category_ID + " = -1 OR " + - "EXISTS (SELECT * FROM M_Product p " + - "WHERE p.M_Product_Category_ID= " + p_M_Product_Category_ID + " " + - "AND p.M_Product_ID=M_Product_Costing.M_Product_ID))"); - no = DB.executeUpdate(sql.toString(), get_TrxName()); - if (no == -1) raiseError("Set to Standard Cost:ERROR", sql.toString()); - - } else if (p_SetFutureCostTo.equals("DP")) { - // DP - Difference PO - log.info("Set to Difference PO"); - sql = new StringBuffer( - "UPDATE M_Product_Costing " + - "SET FutureCostPrice = CostStandard + (CostStandardPOAmt/CostStandardPOQty) " + - "WHERE CostStandardPOQty <> 0 AND " + - "CostStandardPOAmt <> 0 AND " + - "AD_Client_ID="+p_AD_Client_ID+" AND " + - "("+ p_M_Product_Category_ID + " = -1 OR " + - "EXISTS (SELECT * FROM M_Product p " + - "WHERE p.M_Product_Category_ID="+p_M_Product_Category_ID+" AND " + - "p.M_Product_ID=M_Product_Costing.M_Product_ID))"); - no = DB.executeUpdate(sql.toString(), get_TrxName()); - if (no == -1) raiseError("Set to Difference PO:ERROR", sql.toString()); - - } else if (p_SetFutureCostTo.equals("DI")) { - // DI - Difference Invoice - log.info("Set to Difference Inv"); - sql = new StringBuffer( - "UPDATE M_Product_Costing " + - "SET FutureCostPrice = CostStandard + (CostStandardCumAmt/CostStandardCumQty) " + - "WHERE CostStandardCumQty <> 0 AND " + - "CostStandardCumAmt <> 0 AND " + - "AD_Client_ID="+p_AD_Client_ID+" AND " + - "("+ p_M_Product_Category_ID + " = -1 OR " + - "EXISTS (SELECT * FROM M_Product p " + - "WHERE p.M_Product_Category_ID="+p_M_Product_Category_ID+" AND " + - "p.M_Product_ID=M_Product_Costing.M_Product_ID))"); - no = DB.executeUpdate(sql.toString(), get_TrxName()); - if (no == -1) raiseError("Set to Difference Inv:ERROR", sql.toString()); - - } else if (p_SetFutureCostTo.equals("P")) { - // P - Last PO Price - log.info("Set to PO Price"); - sql = new StringBuffer( - "UPDATE M_Product_Costing " + - "SET FutureCostPrice = PriceLastPO " + - "WHERE PriceLastPO <> 0 AND " + - "AD_Client_ID="+p_AD_Client_ID+" AND " + - "("+ p_M_Product_Category_ID + " = -1 OR " + - "EXISTS (SELECT * FROM M_Product p " + - "WHERE p.M_Product_Category_ID="+p_M_Product_Category_ID+" AND " + - "p.M_Product_ID=M_Product_Costing.M_Product_ID))"); - no = DB.executeUpdate(sql.toString(), get_TrxName()); - if (no == -1) raiseError("Set to PO Price:ERROR", sql.toString()); - - } else if (p_SetFutureCostTo.equals("I")) { - // L - Last Inv Price - log.info("Set to Inv Price"); - sql = new StringBuffer( - "UPDATE M_Product_Costing " + - "SET FutureCostPrice = PriceLastInv " + - "WHERE PriceLastInv <> 0 AND " + - "AD_Client_ID="+p_AD_Client_ID+" AND " + - "("+ p_M_Product_Category_ID + " = -1 OR " + - "EXISTS (SELECT * FROM M_Product p " + - "WHERE p.M_Product_Category_ID="+p_M_Product_Category_ID+" AND " + - "p.M_Product_ID=M_Product_Costing.M_Product_ID))"); - no = DB.executeUpdate(sql.toString(), get_TrxName()); - if (no == -1) raiseError("Set to Inv Price:ERROR", sql.toString()); - - } else if (p_SetFutureCostTo.equals("A")) { - // A - Average Cost - log.info("Set to Average Cost"); - sql = new StringBuffer( - "UPDATE M_Product_Costing " + - "SET FutureCostPrice = CostAverage " + - "WHERE CostAverage <> 0 AND " + - "AD_Client_ID="+p_AD_Client_ID+" AND " + - "("+ p_M_Product_Category_ID + " = -1 OR " + - "EXISTS (SELECT * FROM M_Product p " + - "WHERE p.M_Product_Category_ID="+p_M_Product_Category_ID+" AND " + - "p.M_Product_ID=M_Product_Costing.M_Product_ID))"); - no = DB.executeUpdate(sql.toString(), get_TrxName()); - if (no == -1) raiseError("Set to Average Cost:ERROR", sql.toString()); - - } else if (p_SetFutureCostTo.equals("LL") && p_M_PriceList_Version_ID > 0) { - // A - Average Cost - log.info("Set to PriceList " + p_M_PriceList_Version_ID); - sql = new StringBuffer( - "UPDATE M_Product_Costing " + - "SET FutureCostPrice = " + - "(SELECT pp.PriceLimit " + - "FROM M_ProductPrice pp " + - "WHERE pp.M_PriceList_Version_ID="+p_M_PriceList_Version_ID+" AND " + - "pp.M_Product_ID=M_Product_Costing.M_Product_ID)" + -/** SET FutureCostPrice = C_Currency_Convert ( - -- Amount - (SELECT pp.PriceLimit FROM M_ProductPrice pp - WHERE pp.M_PriceList_Version_ID=11 - AND pp.M_Product_ID=M_Product_Costing.M_Product_ID), - -- Cur From - (SELECT C_Currency_ID FROM M_PriceList pl, M_PriceList_Version pv - WHERE pv.M_PriceList_ID=pl.M_PriceList_ID - AND pv.M_PriceList_Version_ID=11), - -- Cur To - (SELECT a.C_Currency_ID FROM C_AcctSchema a WHERE a.C_AcctSchema_ID=M_Product_Costing.C_AcctSchema_ID)) -**/ - "WHERE AD_Client_ID="+p_AD_Client_ID+ " " + - // we have a price - "AND EXISTS (SELECT * FROM M_ProductPrice pp " + - "WHERE pp.M_PriceList_Version_ID="+p_M_PriceList_Version_ID+" " + - "AND pp.M_Product_ID=M_Product_Costing.M_Product_ID) " + - // and the same currency - "AND EXISTS (SELECT * FROM C_AcctSchema a, M_PriceList pl, M_PriceList_Version pv " + - "WHERE a.C_AcctSchema_ID=M_Product_CostingUpdate.C_AcctSchema_ID " + - "AND pv.M_PriceList_Version_ID="+p_M_PriceList_Version_ID+" " + - "AND pv.M_PriceList_ID=pl.M_PriceList_ID " + - "AND pl.C_Currency_ID=a.C_Currency_ID) " + - "AND ("+p_M_Product_Category_ID+" = -1 OR " + - "EXISTS (SELECT * FROM M_Product p " + - "WHERE p.M_Product_Category_ID="+p_M_Product_Category_ID+" " + - "AND p.M_Product_ID=M_Product_Costing.M_Product_ID))"); - no = DB.executeUpdate(sql.toString(), get_TrxName()); - if (no == -1) raiseError("Set to Average Cost:ERROR", sql.toString()); - - } else { - log.info("SetFutureCostTo=" + p_SetFutureCostTo + " ?"); - - } - log.info(" - Updated: " + no); - - // ========== (2) SetStandardCost ========== - if (p_SetStandardCost.equals("Y")) { - // A - Average Cost - log.info("Set Standard Cost"); - sql = new StringBuffer( - "UPDATE M_Product_Costing " + - "SET CostStandard = FutureCostPrice " + - "WHERE AD_Client_ID="+ p_AD_Client_ID + " AND " + - "(" + p_M_Product_Category_ID + " = -1 OR " + - "EXISTS (SELECT * FROM M_Product p " + - "WHERE p.M_Product_Category_ID="+p_M_Product_Category_ID+ " AND " + - "p.M_Product_ID=M_Product_Costing.M_Product_ID))"); - no1 = DB.executeUpdate(sql.toString(), get_TrxName()); - if (no1 == -1) raiseError("Set Standard Cost", sql.toString()); - - } - - // ========== (3) Update CurrentCostPrice depending on Costing Method ========== - try - { - PreparedStatement pstmt = DB.prepareStatement - ("SELECT a.CostingMethod " + - "FROM C_AcctSchema a, AD_ClientInfo ci " + - "WHERE a.C_AcctSchema_ID=ci.C_AcctSchema1_ID AND " + - "ci.AD_Client_ID="+p_AD_Client_ID, get_TrxName()); - ResultSet rs = pstmt.executeQuery(); - if (rs.next()) - v_CostingMethod = rs.getString(1); - rs.close(); - pstmt.close(); - } - catch (SQLException e) - { - throw new Exception ("select CostingMethod", e); - } - // (A)verage (S)tandard - log.info("Update Current Cost " + v_CostingMethod); - log.info("Set Standard Cost"); - sql = new StringBuffer( - "UPDATE M_Product_Costing " + - "SET CurrentCostPrice = " + - "DECODE ('"+ v_CostingMethod + "', 'A', CostAverage, CostStandard) " + - "WHERE AD_Client_ID="+p_AD_Client_ID); - no2 = DB.executeUpdate(sql.toString(), get_TrxName()); - if (no2 == -1) raiseError("Set Standard Cost", sql.toString()); - log.info(" - Updated: " + no2); - - return "@Updated@: " + no + "/" + no1; - } // doIt - - private void raiseError(String string, String sql) throws Exception { - DB.rollback(false, get_TrxName()); - String msg = string; - ValueNamePair pp = CLogger.retrieveError(); - if (pp != null) - msg = pp.getName() + " - "; - msg += sql; - throw new AdempiereUserError (msg); - } - -} // M_Product_CostingUpdate diff --git a/org.adempiere.base.process/src/org/compiere/process/OrgOwnership.java b/org.adempiere.base.process/src/org/compiere/process/OrgOwnership.java index ecd4f3fecf..1aee96ccaa 100644 --- a/org.adempiere.base.process/src/org/compiere/process/OrgOwnership.java +++ b/org.adempiere.base.process/src/org/compiere/process/OrgOwnership.java @@ -284,12 +284,6 @@ public class OrgOwnership extends SvrProcess if (no != 0) log.fine("generalOwnership - C_BP_Withholding=" + no); - // Costing - sql = "UPDATE M_Product_Costing " + set; - no = DB.executeUpdate(sql, get_TrxName()); - if (no != 0) - log.fine("generalOwnership - M_Product_Costing=" + no); - // Replenish sql = "UPDATE M_Replenish " + set; no = DB.executeUpdate(sql, get_TrxName()); diff --git a/org.adempiere.base.process/src/org/compiere/process/T_InventoryValue_Create.java b/org.adempiere.base.process/src/org/compiere/process/T_InventoryValue_Create.java index 0e314d06df..0b7e2e0a4b 100644 --- a/org.adempiere.base.process/src/org/compiere/process/T_InventoryValue_Create.java +++ b/org.adempiere.base.process/src/org/compiere/process/T_InventoryValue_Create.java @@ -189,9 +189,11 @@ public class T_InventoryValue_Create extends SvrProcess + "AND plv.M_PriceList_ID=pl.M_PriceList_ID), " + "CostStandard = " + "(SELECT currencyConvert(pc.CurrentCostPrice,acs.C_Currency_ID,T_InventoryValue.C_Currency_ID,T_InventoryValue.DateValue, null, T_InventoryValue.AD_Client_ID, T_InventoryValue.AD_Org_ID) " - + "FROM AD_ClientInfo ci, C_AcctSchema acs, M_Product_Costing pc " + + "FROM AD_ClientInfo ci, C_AcctSchema acs, M_Cost pc, M_CostElement ce " + "WHERE T_InventoryValue.AD_Client_ID=ci.AD_Client_ID AND ci.C_AcctSchema1_ID=acs.C_AcctSchema_ID " - + "AND acs.C_AcctSchema_ID=pc.C_AcctSchema_ID " + + "AND acs.C_AcctSchema_ID=pc.C_AcctSchema_ID " + + "AND pc.M_CostElement_ID=ce.M_CostElement_ID " + + "AND ce.CostingMethod='S'" + "AND T_InventoryValue.M_Product_ID=pc.M_Product_ID) " + "WHERE T_InventoryValue.M_Warehouse_ID = " + p_M_Warehouse_ID; cntu = DB.executeUpdate(sqlupd, get_TrxName()); diff --git a/org.adempiere.base/src/org/compiere/acct/Doc_InOut.java b/org.adempiere.base/src/org/compiere/acct/Doc_InOut.java index d873a50dd0..5e869537a7 100644 --- a/org.adempiere.base/src/org/compiere/acct/Doc_InOut.java +++ b/org.adempiere.base/src/org/compiere/acct/Doc_InOut.java @@ -257,7 +257,6 @@ public class Doc_InOut extends Doc } } } // for all lines - updateProductInfo(as.getC_AcctSchema_ID()); // only for SO! /** Commitment release ****/ if (as.isAccrual() && as.isCreateSOCommitment()) @@ -368,7 +367,6 @@ public class Doc_InOut extends Doc } } } // for all lines - updateProductInfo(as.getC_AcctSchema_ID()); // only for SO! } // Sales Return // *** Purchasing - Receipt @@ -614,35 +612,4 @@ public class Doc_InOut extends Doc && m_Reversal_ID !=0 && line.getReversalLine_ID() != 0; } - - /** - * Update Sales Order Costing Product Info (old). - * Purchase side handled in Invoice Matching. - *
- * decrease average cumulatives - * @param C_AcctSchema_ID accounting schema - * @deprecated old costing - */ - private void updateProductInfo (int C_AcctSchema_ID) - { - log.fine("M_InOut_ID=" + get_ID()); - // Old Model - StringBuffer sql = new StringBuffer( - //FYRACLE add pc. everywhere - "UPDATE M_Product_Costing pc " - + "SET (CostAverageCumQty, CostAverageCumAmt)=" - + "(SELECT pc.CostAverageCumQty - SUM(il.MovementQty)," - + " pc.CostAverageCumAmt - SUM(il.MovementQty*pc.CurrentCostPrice) " - + "FROM M_InOutLine il " - + "WHERE pc.M_Product_ID=il.M_Product_ID" - + " AND il.M_InOut_ID=").append(get_ID()).append(") ") - .append("WHERE EXISTS (SELECT * " - + "FROM M_InOutLine il " - + "WHERE pc.M_Product_ID=il.M_Product_ID" - + " AND il.M_InOut_ID=").append(get_ID()).append(")"); - int no = DB.executeUpdate(sql.toString(), getTrxName()); - log.fine("M_Product_Costing - Updated=" + no); - // - } // updateProductInfo - } // Doc_InOut diff --git a/org.adempiere.base/src/org/compiere/acct/Doc_Invoice.java b/org.adempiere.base/src/org/compiere/acct/Doc_Invoice.java index c0b1bd7fdb..6b08293f22 100644 --- a/org.adempiere.base/src/org/compiere/acct/Doc_Invoice.java +++ b/org.adempiere.base/src/org/compiere/acct/Doc_Invoice.java @@ -580,7 +580,6 @@ public class Doc_Invoice extends Doc getC_Currency_ID(), null, serviceAmt); // updateProductPO(as); // Only API - updateProductInfo (as.getC_AcctSchema_ID()); // only API } // APC else if (getDocumentType().equals(DOCTYPE_APCredit)) @@ -918,72 +917,4 @@ public class Doc_Invoice extends Doc log.fine("Updated=" + no); } // updateProductPO - /** - * Update Product Info (old). - * - Costing (PriceLastInv) - * - PO (PriceLastInv) - * @param C_AcctSchema_ID accounting schema - * @deprecated old costing - */ - private void updateProductInfo (int C_AcctSchema_ID) - { - log.fine("C_Invoice_ID=" + get_ID()); - - /** @todo Last.. would need to compare document/last updated date - * would need to maintain LastPriceUpdateDate on _PO and _Costing */ - - // update Product Costing - // requires existence of currency conversion !! - // if there are multiple lines of the same product last price uses first - // -> TotalInvAmt is sometimes NULL !! -> error - // begin globalqss 2005-10-19 - // postgresql doesn't support LIMIT on UPDATE or DELETE statements - /* - StringBuffer sql = new StringBuffer ( - "UPDATE M_Product_Costing pc " - + "SET (PriceLastInv, TotalInvAmt,TotalInvQty) = " - // select - + "(SELECT currencyConvert(il.PriceActual,i.C_Currency_ID,a.C_Currency_ID,i.DateInvoiced,i.C_ConversionType_ID,i.AD_Client_ID,i.AD_Org_ID)," - + " currencyConvert(il.LineNetAmt,i.C_Currency_ID,a.C_Currency_ID,i.DateInvoiced,i.C_ConversionType_ID,i.AD_Client_ID,i.AD_Org_ID),il.QtyInvoiced " - + "FROM C_Invoice i, C_InvoiceLine il, C_AcctSchema a " - + "WHERE i.C_Invoice_ID=il.C_Invoice_ID" - + " AND pc.M_Product_ID=il.M_Product_ID AND pc.C_AcctSchema_ID=a.C_AcctSchema_ID" - + " AND ROWNUM=1" - + " AND pc.C_AcctSchema_ID=").append(C_AcctSchema_ID).append(" AND i.C_Invoice_ID=") - .append(get_ID()).append(") ") - // update - .append("WHERE EXISTS (SELECT * " - + "FROM C_Invoice i, C_InvoiceLine il, C_AcctSchema a " - + "WHERE i.C_Invoice_ID=il.C_Invoice_ID" - + " AND pc.M_Product_ID=il.M_Product_ID AND pc.C_AcctSchema_ID=a.C_AcctSchema_ID" - + " AND pc.C_AcctSchema_ID=").append(C_AcctSchema_ID).append(" AND i.C_Invoice_ID=") - .append(get_ID()).append(")"); - */ - // the next command is equivalent and works in postgresql and oracle - StringBuffer sql = new StringBuffer ( - "UPDATE M_Product_Costing pc " - + "SET (PriceLastInv, TotalInvAmt,TotalInvQty) = " - // select - + "(SELECT currencyConvert(il.PriceActual,i.C_Currency_ID,a.C_Currency_ID,i.DateInvoiced,i.C_ConversionType_ID,i.AD_Client_ID,i.AD_Org_ID)," - + " currencyConvert(il.LineNetAmt,i.C_Currency_ID,a.C_Currency_ID,i.DateInvoiced,i.C_ConversionType_ID,i.AD_Client_ID,i.AD_Org_ID),il.QtyInvoiced " - + "FROM C_Invoice i, C_InvoiceLine il, C_AcctSchema a " - + "WHERE i.C_Invoice_ID=il.C_Invoice_ID" - + " AND il.c_invoiceline_id = (SELECT MIN(C_InvoiceLine_ID) FROM C_InvoiceLine il2" + - " WHERE il2.M_PRODUCT_ID=il.M_PRODUCT_ID AND C_Invoice_ID=") - .append(get_ID()).append(")" - + " AND pc.M_Product_ID=il.M_Product_ID AND pc.C_AcctSchema_ID=a.C_AcctSchema_ID" - + " AND pc.C_AcctSchema_ID=").append(C_AcctSchema_ID).append(" AND i.C_Invoice_ID=") - .append(get_ID()).append(") ") - // update - .append("WHERE EXISTS (SELECT * " - + "FROM C_Invoice i, C_InvoiceLine il, C_AcctSchema a " - + "WHERE i.C_Invoice_ID=il.C_Invoice_ID" - + " AND pc.M_Product_ID=il.M_Product_ID AND pc.C_AcctSchema_ID=a.C_AcctSchema_ID" - + " AND pc.C_AcctSchema_ID=").append(C_AcctSchema_ID).append(" AND i.C_Invoice_ID=") - .append(get_ID()).append(")"); - // end globalqss 2005-10-19 - int no = DB.executeUpdate(sql.toString(), getTrxName()); - log.fine("M_Product_Costing - Updated=" + no); - } // updateProductInfo - } // Doc_Invoice diff --git a/org.adempiere.base/src/org/compiere/acct/Doc_MatchInv.java b/org.adempiere.base/src/org/compiere/acct/Doc_MatchInv.java index 59c24aff92..7c96be0ff6 100644 --- a/org.adempiere.base/src/org/compiere/acct/Doc_MatchInv.java +++ b/org.adempiere.base/src/org/compiere/acct/Doc_MatchInv.java @@ -31,7 +31,6 @@ import org.compiere.model.MInvoice; import org.compiere.model.MInvoiceLine; import org.compiere.model.MMatchInv; import org.compiere.model.ProductCost; -import org.compiere.util.DB; import org.compiere.util.Env; /** @@ -312,10 +311,6 @@ public class Doc_MatchInv extends Doc p_Error = error; return null; } - - // Update Costing - updateProductInfo(as.getC_AcctSchema_ID(), - MAcctSchema.COSTINGMETHOD_StandardCosting.equals(as.getCostingMethod())); // facts.add(fact); @@ -417,64 +412,4 @@ public class Doc_MatchInv extends Doc return ""; } - /** - * Update Product Info (old). - * - Costing (CostStandardCumQty, CostStandardCumAmt, CostAverageCumQty, CostAverageCumAmt) - * @param C_AcctSchema_ID accounting schema - * @param standardCosting true if std costing - * @return true if updated - * @deprecated old costing - */ - private boolean updateProductInfo (int C_AcctSchema_ID, boolean standardCosting) - { - log.fine("M_MatchInv_ID=" + get_ID()); - - // update Product Costing Qty/Amt - // requires existence of currency conversion !! - StringBuffer sql = new StringBuffer ( - "UPDATE M_Product_Costing pc " - + "SET (CostStandardCumQty,CostStandardCumAmt, CostAverageCumQty,CostAverageCumAmt) = " - + "(SELECT pc.CostStandardCumQty + m.Qty," - + "pc.CostStandardCumAmt + currencyConvert(il.PriceActual,i.C_Currency_ID,a.C_Currency_ID,i.DateInvoiced,i.C_ConversionType_ID,i.AD_Client_ID,i.AD_Org_ID)*m.Qty, " - + "pc.CostAverageCumQty + m.Qty," - + "pc.CostAverageCumAmt + currencyConvert(il.PriceActual,i.C_Currency_ID,a.C_Currency_ID,i.DateInvoiced,i.C_ConversionType_ID,i.AD_Client_ID,i.AD_Org_ID)*m.Qty " - + "FROM M_MatchInv m" - + " INNER JOIN C_InvoiceLine il ON (m.C_InvoiceLine_ID=il.C_InvoiceLine_ID)" - + " INNER JOIN C_Invoice i ON (il.C_Invoice_ID=i.C_Invoice_ID)," - + " C_AcctSchema a " - + "WHERE pc.C_AcctSchema_ID=a.C_AcctSchema_ID" - + " AND pc.M_Product_ID=m.M_Product_ID" - + " AND m.M_MatchInv_ID=").append(get_ID()).append(")" - // - + "WHERE pc.C_AcctSchema_ID=").append(C_AcctSchema_ID).append( - " AND EXISTS (SELECT * FROM M_MatchInv m " - + "WHERE pc.M_Product_ID=m.M_Product_ID" - + " AND m.M_MatchInv_ID=").append(get_ID()).append(")"); - int no = DB.executeUpdate(sql.toString(), getTrxName()); - log.fine("M_Product_Costing - Qty/Amt Updated #=" + no); - - // Update Average Cost - sql = new StringBuffer ( - "UPDATE M_Product_Costing " - + "SET CostAverage = CostAverageCumAmt/DECODE(CostAverageCumQty, 0,1, CostAverageCumQty) " - + "WHERE C_AcctSchema_ID=").append(C_AcctSchema_ID) - .append(" AND M_Product_ID=").append(getM_Product_ID()); - no = DB.executeUpdate(sql.toString(), getTrxName()); - log.fine("M_Product_Costing - AvgCost Updated #=" + no); - - - // Update Current Cost - if (!standardCosting) - { - sql = new StringBuffer ( - "UPDATE M_Product_Costing " - + "SET CurrentCostPrice = CostAverage " - + "WHERE C_AcctSchema_ID=").append(C_AcctSchema_ID) - .append(" AND M_Product_ID=").append(getM_Product_ID()); - no = DB.executeUpdate(sql.toString(), getTrxName()); - log.fine("M_Product_Costing - CurrentCost Updated=" + no); - } - return true; - } // updateProductInfo - } // Doc_MatchInv diff --git a/org.adempiere.base/src/org/compiere/acct/Doc_MatchPO.java b/org.adempiere.base/src/org/compiere/acct/Doc_MatchPO.java index c91f9635e2..bdf68c0f24 100644 --- a/org.adempiere.base/src/org/compiere/acct/Doc_MatchPO.java +++ b/org.adempiere.base/src/org/compiere/acct/Doc_MatchPO.java @@ -37,7 +37,6 @@ import org.compiere.model.MProduct; import org.compiere.model.MTax; import org.compiere.model.ProductCost; import org.compiere.model.X_M_InOut; -import org.compiere.util.DB; import org.compiere.util.Env; /** @@ -289,34 +288,6 @@ public class Doc_MatchPO extends Doc return false; } - /** - * Update Product Info (old). - * - Costing (CostStandardPOQty, CostStandardPOAmt) - * @param C_AcctSchema_ID accounting schema - * @deprecated old costing - */ - private void updateProductInfo (int C_AcctSchema_ID) - { - log.fine("M_MatchPO_ID=" + get_ID()); - - // update Product Costing - // requires existence of currency conversion !! - StringBuffer sql = new StringBuffer ( - "UPDATE M_Product_Costing pc " - + "SET (CostStandardPOQty,CostStandardPOAmt) = " - + "(SELECT CostStandardPOQty + m.Qty," - + " CostStandardPOAmt + currencyConvert(ol.PriceActual,ol.C_Currency_ID,a.C_Currency_ID,ol.DateOrdered,null,ol.AD_Client_ID,ol.AD_Org_ID)*m.Qty " - + "FROM M_MatchPO m, C_OrderLine ol, C_AcctSchema a " - + "WHERE m.C_OrderLine_ID=ol.C_OrderLine_ID" - + " AND pc.M_Product_ID=ol.M_Product_ID" - + " AND pc.C_AcctSchema_ID=a.C_AcctSchema_ID" - + " AND m.M_MatchPO_ID=").append(get_ID()).append(") ") - .append("WHERE pc.C_AcctSchema_ID=").append(C_AcctSchema_ID) - .append(" AND pc.M_Product_ID=").append(getM_Product_ID()); - int no = DB.executeUpdate(sql.toString(), getTrxName()); - log.fine("M_Product_Costing - Updated=" + no); - } // updateProductInfo - // Elaine 2008/6/20 private String createMatchPOCostDetail(MAcctSchema as) { diff --git a/org.adempiere.base/src/org/compiere/acct/Doc_Order.java b/org.adempiere.base/src/org/compiere/acct/Doc_Order.java index 7a7d2cf363..a626f5252b 100644 --- a/org.adempiere.base/src/org/compiere/acct/Doc_Order.java +++ b/org.adempiere.base/src/org/compiere/acct/Doc_Order.java @@ -343,7 +343,6 @@ public class Doc_Order extends Doc if (getDocumentType().equals(DOCTYPE_POrder)) { updateProductPO(as); - updateProductInfo(as.getC_AcctSchema_ID()); BigDecimal grossAmt = getAmount(Doc.AMTTYPE_Gross); @@ -773,52 +772,5 @@ public class Doc_Order extends Doc fact.createLine (null, offset, C_Currency_ID, null, total); return fact; - } // getCommitmentSalesRelease - - /************************************************************************** - * Update Product Info (old) - * - Costing (PriceLastPO) - * - PO (PriceLastPO) - * @param C_AcctSchema_ID accounting schema - * @deprecated old costing - */ - private void updateProductInfo (int C_AcctSchema_ID) - { - log.fine("C_Order_ID=" + get_ID()); - - /** @todo Last.. would need to compare document/last updated date - * would need to maintain LastPriceUpdateDate on _PO and _Costing */ - - // update Product Costing - // requires existence of currency conversion !! - // if there are multiple lines of the same product last price uses first - StringBuffer sql = new StringBuffer ( - "UPDATE M_Product_Costing pc " - + "SET PriceLastPO = " - + "(SELECT currencyConvert(ol.PriceActual,ol.C_Currency_ID,a.C_Currency_ID,o.DateOrdered,o.C_ConversionType_ID,o.AD_Client_ID,o.AD_Org_ID) " - + "FROM C_Order o, C_OrderLine ol, C_AcctSchema a " - + "WHERE o.C_Order_ID=ol.C_Order_ID" - + " AND pc.M_Product_ID=ol.M_Product_ID AND pc.C_AcctSchema_ID=a.C_AcctSchema_ID "); - if (DB.isOracle()) //jz - { - sql.append(" AND ROWNUM=1 "); - } - else - sql.append(" AND ol.C_OrderLine_ID = (SELECT MIN(ol1.C_OrderLine_ID) " - + "FROM C_Order o1, C_OrderLine ol1 " - + "WHERE o1.C_Order_ID=ol1.C_Order_ID" - + " AND pc.M_Product_ID=ol1.M_Product_ID ") - .append(" AND o1.C_Order_ID=").append(get_ID()).append(") "); - sql.append(" AND pc.C_AcctSchema_ID=").append(C_AcctSchema_ID).append(" AND o.C_Order_ID=") - .append(get_ID()).append(") ") - .append("WHERE EXISTS (SELECT * " - + "FROM C_Order o, C_OrderLine ol, C_AcctSchema a " - + "WHERE o.C_Order_ID=ol.C_Order_ID" - + " AND pc.M_Product_ID=ol.M_Product_ID AND pc.C_AcctSchema_ID=a.C_AcctSchema_ID" - + " AND pc.C_AcctSchema_ID=").append(C_AcctSchema_ID).append(" AND o.C_Order_ID=") - .append(get_ID()).append(")"); - int no = DB.executeUpdate(sql.toString(), getTrxName()); - log.fine("M_Product_Costing - Updated=" + no); - } // updateProductInfo - + } // getCommitmentSalesRelease } // Doc_Order \ No newline at end of file diff --git a/org.adempiere.base/src/org/compiere/acct/ProductInfo.java b/org.adempiere.base/src/org/compiere/acct/ProductInfo.java index 75ec1da2b2..f2e74d147e 100644 --- a/org.adempiere.base/src/org/compiere/acct/ProductInfo.java +++ b/org.adempiere.base/src/org/compiere/acct/ProductInfo.java @@ -228,70 +228,6 @@ public class ProductInfo return m_qty; } // getQty - - - /** - * Update/Create initial Cost Record. - * Check first for Purchase Price List, - * then Product Purchase Costs - * and then Price List - * @param as accounting schema - * @param create create record - * @return costs - */ - private BigDecimal updateCosts (MAcctSchema as, boolean create) - { - // Create Zero Record - if (create) - { - StringBuffer sql = new StringBuffer ("INSERT INTO M_Product_Costing " - + "(M_Product_ID,C_AcctSchema_ID," - + " AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy," - + " CurrentCostPrice,CostStandard,FutureCostPrice," - + " CostStandardPOQty,CostStandardPOAmt,CostStandardCumQty,CostStandardCumAmt," - + " CostAverage,CostAverageCumQty,CostAverageCumAmt," - + " PriceLastPO,PriceLastInv, TotalInvQty,TotalInvAmt) " - + "VALUES ("); - sql.append(m_M_Product_ID).append(",").append(as.getC_AcctSchema_ID()).append(",") - .append(m_AD_Client_ID).append(",").append(m_AD_Org_ID).append(",") - .append("'Y',SysDate,0,SysDate,0, 0,0,0, 0,0,0,0, 0,0,0, 0,0, 0,0)"); - int no = DB.executeUpdate(sql.toString(), m_trxName); - if (no == 1) - log.fine("CostingCreated"); - } - - // Try to find non ZERO Price - String costSource = "PriceList-PO"; - BigDecimal costs = getPriceList (as, true); - if (costs == null || costs.compareTo(Env.ZERO)==0) - { - costSource = "PO Cost"; - costs = getPOCost(as); - } - if (costs == null || costs.compareTo(Env.ZERO)==0) - { - costSource = "PriceList"; - costs = getPriceList (as, false); - } - - // if not found use $1 (to be able to do material transactions) - if (costs == null || costs.compareTo(Env.ZERO)==0) - { - costSource = "Not Found"; - costs = new BigDecimal("1"); - } - - // update current costs - StringBuffer sql = new StringBuffer ("UPDATE M_Product_Costing "); - sql.append("SET CurrentCostPrice=").append(costs) - .append(" WHERE M_Product_ID=").append(m_M_Product_ID) - .append(" AND C_AcctSchema_ID=").append(as.getC_AcctSchema_ID()); - int no = DB.executeUpdate(sql.toString(), m_trxName); - if (no == 1) - log.fine(costSource + " - " + costs); - return costs; - } // createCosts - /** * Get PO Price from PriceList - and convert it to AcctSchema Currency * @param as accounting schema diff --git a/org.adempiere.base/src/org/compiere/model/I_M_Product_Costing.java b/org.adempiere.base/src/org/compiere/model/I_M_Product_Costing.java deleted file mode 100644 index 890a62d6db..0000000000 --- a/org.adempiere.base/src/org/compiere/model/I_M_Product_Costing.java +++ /dev/null @@ -1,317 +0,0 @@ -/****************************************************************************** - * Product: Adempiere ERP & CRM Smart Business Solution * - * Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved. * - * This program is free software, you can redistribute it and/or modify it * - * under the terms version 2 of the GNU General Public License as published * - * by the Free Software Foundation. This program is distributed in the hope * - * that it will be useful, but WITHOUT ANY WARRANTY, without even the implied * - * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * - * See the GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License along * - * with this program, if not, write to the Free Software Foundation, Inc., * - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * - * For the text or an alternative of this public license, you may reach us * - * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * - * or via info@compiere.org or http://www.compiere.org/license.html * - *****************************************************************************/ -package org.compiere.model; - -import java.math.BigDecimal; -import java.sql.Timestamp; -import org.compiere.util.KeyNamePair; - -/** Generated Interface for M_Product_Costing - * @author Adempiere (generated) - * @version Release 3.6.0LTS - */ -public interface I_M_Product_Costing -{ - - /** TableName=M_Product_Costing */ - public static final String Table_Name = "M_Product_Costing"; - - /** AD_Table_ID=327 */ - public static final int Table_ID = MTable.getTable_ID(Table_Name); - - KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); - - /** AccessLevel = 3 - Client - Org - */ - BigDecimal accessLevel = BigDecimal.valueOf(3); - - /** 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_AcctSchema_ID */ - public static final String COLUMNNAME_C_AcctSchema_ID = "C_AcctSchema_ID"; - - /** Set Accounting Schema. - * Rules for accounting - */ - public void setC_AcctSchema_ID (int C_AcctSchema_ID); - - /** Get Accounting Schema. - * Rules for accounting - */ - public int getC_AcctSchema_ID(); - - public I_C_AcctSchema getC_AcctSchema() throws RuntimeException; - - /** Column name CostAverage */ - public static final String COLUMNNAME_CostAverage = "CostAverage"; - - /** Set Average Cost. - * Weighted average costs - */ - public void setCostAverage (BigDecimal CostAverage); - - /** Get Average Cost. - * Weighted average costs - */ - public BigDecimal getCostAverage(); - - /** Column name CostAverageCumAmt */ - public static final String COLUMNNAME_CostAverageCumAmt = "CostAverageCumAmt"; - - /** Set Average Cost Amount Sum. - * Cumulative average cost amounts (internal) - */ - public void setCostAverageCumAmt (BigDecimal CostAverageCumAmt); - - /** Get Average Cost Amount Sum. - * Cumulative average cost amounts (internal) - */ - public BigDecimal getCostAverageCumAmt(); - - /** Column name CostAverageCumQty */ - public static final String COLUMNNAME_CostAverageCumQty = "CostAverageCumQty"; - - /** Set Average Cost Quantity Sum. - * Cumulative average cost quantities (internal) - */ - public void setCostAverageCumQty (BigDecimal CostAverageCumQty); - - /** Get Average Cost Quantity Sum. - * Cumulative average cost quantities (internal) - */ - public BigDecimal getCostAverageCumQty(); - - /** Column name CostStandard */ - public static final String COLUMNNAME_CostStandard = "CostStandard"; - - /** Set Standard Cost. - * Standard Costs - */ - public void setCostStandard (BigDecimal CostStandard); - - /** Get Standard Cost. - * Standard Costs - */ - public BigDecimal getCostStandard(); - - /** Column name CostStandardCumAmt */ - public static final String COLUMNNAME_CostStandardCumAmt = "CostStandardCumAmt"; - - /** Set Std Cost Amount Sum. - * Standard Cost Invoice Amount Sum (internal) - */ - public void setCostStandardCumAmt (BigDecimal CostStandardCumAmt); - - /** Get Std Cost Amount Sum. - * Standard Cost Invoice Amount Sum (internal) - */ - public BigDecimal getCostStandardCumAmt(); - - /** Column name CostStandardCumQty */ - public static final String COLUMNNAME_CostStandardCumQty = "CostStandardCumQty"; - - /** Set Std Cost Quantity Sum. - * Standard Cost Invoice Quantity Sum (internal) - */ - public void setCostStandardCumQty (BigDecimal CostStandardCumQty); - - /** Get Std Cost Quantity Sum. - * Standard Cost Invoice Quantity Sum (internal) - */ - public BigDecimal getCostStandardCumQty(); - - /** Column name CostStandardPOAmt */ - public static final String COLUMNNAME_CostStandardPOAmt = "CostStandardPOAmt"; - - /** Set Std PO Cost Amount Sum. - * Standard Cost Purchase Order Amount Sum (internal) - */ - public void setCostStandardPOAmt (BigDecimal CostStandardPOAmt); - - /** Get Std PO Cost Amount Sum. - * Standard Cost Purchase Order Amount Sum (internal) - */ - public BigDecimal getCostStandardPOAmt(); - - /** Column name CostStandardPOQty */ - public static final String COLUMNNAME_CostStandardPOQty = "CostStandardPOQty"; - - /** Set Std PO Cost Quantity Sum. - * Standard Cost Purchase Order Quantity Sum (internal) - */ - public void setCostStandardPOQty (BigDecimal CostStandardPOQty); - - /** Get Std PO Cost Quantity Sum. - * Standard Cost Purchase Order Quantity Sum (internal) - */ - public BigDecimal getCostStandardPOQty(); - - /** 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 CurrentCostPrice */ - public static final String COLUMNNAME_CurrentCostPrice = "CurrentCostPrice"; - - /** Set Current Cost Price. - * The currently used cost price - */ - public void setCurrentCostPrice (BigDecimal CurrentCostPrice); - - /** Get Current Cost Price. - * The currently used cost price - */ - public BigDecimal getCurrentCostPrice(); - - /** Column name FutureCostPrice */ - public static final String COLUMNNAME_FutureCostPrice = "FutureCostPrice"; - - /** Set Future Cost Price */ - public void setFutureCostPrice (BigDecimal FutureCostPrice); - - /** Get Future Cost Price */ - public BigDecimal getFutureCostPrice(); - - /** 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 M_Product_ID */ - public static final String COLUMNNAME_M_Product_ID = "M_Product_ID"; - - /** Set Product. - * Product, Service, Item - */ - public void setM_Product_ID (int M_Product_ID); - - /** Get Product. - * Product, Service, Item - */ - public int getM_Product_ID(); - - public I_M_Product getM_Product() throws RuntimeException; - - /** Column name PriceLastInv */ - public static final String COLUMNNAME_PriceLastInv = "PriceLastInv"; - - /** Set Last Invoice Price. - * Price of the last invoice for the product - */ - public void setPriceLastInv (BigDecimal PriceLastInv); - - /** Get Last Invoice Price. - * Price of the last invoice for the product - */ - public BigDecimal getPriceLastInv(); - - /** Column name PriceLastPO */ - public static final String COLUMNNAME_PriceLastPO = "PriceLastPO"; - - /** Set Last PO Price. - * Price of the last purchase order for the product - */ - public void setPriceLastPO (BigDecimal PriceLastPO); - - /** Get Last PO Price. - * Price of the last purchase order for the product - */ - public BigDecimal getPriceLastPO(); - - /** Column name TotalInvAmt */ - public static final String COLUMNNAME_TotalInvAmt = "TotalInvAmt"; - - /** Set Total Invoice Amount. - * Cumulative total lifetime invoice amount - */ - public void setTotalInvAmt (BigDecimal TotalInvAmt); - - /** Get Total Invoice Amount. - * Cumulative total lifetime invoice amount - */ - public BigDecimal getTotalInvAmt(); - - /** Column name TotalInvQty */ - public static final String COLUMNNAME_TotalInvQty = "TotalInvQty"; - - /** Set Total Invoice Quantity. - * Cumulative total lifetime invoice quantity - */ - public void setTotalInvQty (BigDecimal TotalInvQty); - - /** Get Total Invoice Quantity. - * Cumulative total lifetime invoice quantity - */ - public BigDecimal getTotalInvQty(); - - /** 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/MCost.java b/org.adempiere.base/src/org/compiere/model/MCost.java index d4a8f9d238..a68f3443b4 100644 --- a/org.adempiere.base/src/org/compiere/model/MCost.java +++ b/org.adempiere.base/src/org/compiere/model/MCost.java @@ -290,14 +290,6 @@ public class MCost extends X_M_Cost if (retValue == null || retValue.signum() == 0) retValue = getLastPOPrice(product, M_ASI_ID, Org_ID, as.getC_Currency_ID()); } - else if (MCostElement.COSTINGMETHOD_StandardCosting.equals(costingMethod)) - { - // migrate old costs - MProductCosting pc = MProductCosting.get(product.getCtx(), product.getM_Product_ID(), - as.getC_AcctSchema_ID(), product.get_TrxName()); - if (pc != null) - retValue = pc.getCurrentCostPrice(); - } else if (MCostElement.COSTINGMETHOD_UserDefined.equals(costingMethod)) ; else diff --git a/org.adempiere.base/src/org/compiere/model/MProduct.java b/org.adempiere.base/src/org/compiere/model/MProduct.java index 9c2a65ea30..389b7b9058 100644 --- a/org.adempiere.base/src/org/compiere/model/MProduct.java +++ b/org.adempiere.base/src/org/compiere/model/MProduct.java @@ -689,14 +689,6 @@ public class MProduct extends X_M_Product insert_Accounting("M_Product_Acct", "M_Product_Category_Acct", "p.M_Product_Category_ID=" + getM_Product_Category_ID()); insert_Tree(X_AD_Tree.TREETYPE_Product); - // - MAcctSchema[] mass = MAcctSchema.getClientAcctSchema(getCtx(), getAD_Client_ID(), get_TrxName()); - for (int i = 0; i < mass.length; i++) - { - // Old - MProductCosting pcOld = new MProductCosting(this, mass[i].getC_AcctSchema_ID()); - pcOld.saveEx(); - } } // New Costing @@ -740,11 +732,7 @@ public class MProduct extends X_M_Product } } - // delete costing - MProductCosting[] costings = MProductCosting.getOfProduct(getCtx(), get_ID(), get_TrxName()); - for (int i = 0; i < costings.length; i++) - costings[i].delete(true, get_TrxName()); - + // delete costing MCost.delete(this); // [ 1674225 ] Delete Product: Costing deletion error diff --git a/org.adempiere.base/src/org/compiere/model/MProductCosting.java b/org.adempiere.base/src/org/compiere/model/MProductCosting.java deleted file mode 100644 index 1940ea87aa..0000000000 --- a/org.adempiere.base/src/org/compiere/model/MProductCosting.java +++ /dev/null @@ -1,133 +0,0 @@ -/****************************************************************************** - * Product: Adempiere ERP & CRM Smart Business Solution * - * Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it * - * under the terms version 2 of the GNU General Public License as published * - * by the Free Software Foundation. This program is distributed in the hope * - * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * - * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * - * See the GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License along * - * with this program; if not, write to the Free Software Foundation, Inc., * - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * - * For the text or an alternative of this public license, you may reach us * - * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * - * or via info@compiere.org or http://www.compiere.org/license.html * - *****************************************************************************/ -package org.compiere.model; - -import java.sql.ResultSet; -import java.util.List; -import java.util.Properties; - -import org.compiere.util.Env; - -/** - * Product Costing Model (old). - * deprecated old costing - * - * @author Jorg Janke - * @version $Id: MProductCosting.java,v 1.3 2006/07/30 00:51:05 jjanke Exp $ - */ -public class MProductCosting extends X_M_Product_Costing -{ - /** - * - */ - private static final long serialVersionUID = 5563448335633481151L; - - /** - * Get Costing Of Product - * @param ctx context - * @param M_Product_ID product - * @param trxName trx - * @return array of costs - */ - public static MProductCosting[] getOfProduct (Properties ctx, int M_Product_ID, String trxName) - { - final String whereClause = "M_Product_ID=?"; - - List costs =new Query(ctx, I_M_Product_Costing.Table_Name,whereClause, trxName ) - .setParameters(M_Product_ID) - .list(); - return costs.toArray(new MProductCosting[costs.size()]); - } // getOfProduct - - /** - * Get Costing - * @param ctx context - * @param M_Product_ID product - * @param C_AcctSchema_ID as - * @param trxName trx - * @return first product cosnting - */ - public static MProductCosting get (Properties ctx, int M_Product_ID, - int C_AcctSchema_ID, String trxName) - { - final String whereClause = "M_Product_ID=? AND C_AcctSchema_ID=?"; - - return new Query(ctx, I_M_Product_Costing.Table_Name,whereClause, trxName ) - .setParameters(M_Product_ID, C_AcctSchema_ID) - .firstOnly(); - } // get - - /************************************************************************** - * Standard Constructor (odl) - * @param ctx context - * @param ignored (multi key) - * @param trxName transaction - */ - public MProductCosting (Properties ctx, int ignored, String trxName) - { - super (ctx, ignored, trxName); - if (ignored != 0) - throw new IllegalArgumentException("Multi-Key"); - else - { - // setM_Product_ID (0); - // setC_AcctSchema_ID (0); - // - setCostAverage (Env.ZERO); - setCostAverageCumAmt (Env.ZERO); - setCostAverageCumQty (Env.ZERO); - setCostStandard (Env.ZERO); - setCostStandardCumAmt (Env.ZERO); - setCostStandardCumQty (Env.ZERO); - setCostStandardPOAmt (Env.ZERO); - setCostStandardPOQty (Env.ZERO); - setCurrentCostPrice (Env.ZERO); - setFutureCostPrice (Env.ZERO); - setPriceLastInv (Env.ZERO); - setPriceLastPO (Env.ZERO); - setTotalInvAmt (Env.ZERO); - setTotalInvQty (Env.ZERO); - } - } // MProductCosting - - /** - * Parent Constructor (old) - * @param product parent - * @param C_AcctSchema_ID accounting schema - */ - public MProductCosting (MProduct product, int C_AcctSchema_ID) - { - super (product.getCtx(), 0, product.get_TrxName()); - setClientOrg(product); - setM_Product_ID (product.getM_Product_ID()); - setC_AcctSchema_ID (C_AcctSchema_ID); - } // MProductCosting - - - /** - * Load Constructor (old) - * @param ctx context - * @param rs result set - * @param trxName transaction - */ - public MProductCosting (Properties ctx, ResultSet rs, String trxName) - { - super(ctx, rs, trxName); - } // MProductCosting - -} // MProductCosting - diff --git a/org.adempiere.base/src/org/compiere/model/ProductCost.java b/org.adempiere.base/src/org/compiere/model/ProductCost.java index 232595fee5..1c6d6aaa30 100644 --- a/org.adempiere.base/src/org/compiere/model/ProductCost.java +++ b/org.adempiere.base/src/org/compiere/model/ProductCost.java @@ -283,17 +283,6 @@ public class ProductCost log.fine("No Qty"); return null; } - /** Old Costing - MClient client = MClient.get(as.getCtx(), as.getAD_Client_ID()); - if (!client.isUseBetaFunctions()) - { - BigDecimal itemCost = getProductItemCostOld(as, costingMethod); - BigDecimal cost = m_qty.multiply(itemCost); - cost = cost.setScale(as.getCostingPrecision(), BigDecimal.ROUND_HALF_UP); - log.fine("Qty(" + m_qty + ") * Cost(" + itemCost + ") = " + cost); - return cost; - } - **/ // No Product if (m_product == null) @@ -312,138 +301,6 @@ public class ProductCost return cost; } // getProductCosts - - /** - * Get Product Costs per UOM for Accounting Schema in Accounting Schema Currency. - * - if costType defined - cost - * - else CurrentCosts - * @param as accounting schema - * @param costType - if null uses Accounting Schema Costs - see AcctSchema.COSTING_* - * @return product costs - */ - private BigDecimal getProductItemCostOld (MAcctSchema as, String costType) - { - BigDecimal current = null; - BigDecimal cost = null; - String cm = as.getCostingMethod(); - StringBuffer sql = new StringBuffer("SELECT CurrentCostPrice,"); // 1 - // - if ((costType == null && MAcctSchema.COSTINGMETHOD_AveragePO.equals(cm)) - || MAcctSchema.COSTINGMETHOD_AveragePO.equals(costType)) - sql.append("COSTAVERAGE"); // 2 - // else if (AcctSchema.COSTING_FIFO.equals(cm)) - // sql.append("COSTFIFO"); - // else if (AcctSchema.COSTING_LIFO.equals(cm)) - // sql.append("COSTLIFO"); - else if ((costType == null && MAcctSchema.COSTINGMETHOD_LastPOPrice.equals(cm)) - || MAcctSchema.COSTINGMETHOD_LastPOPrice.equals(costType)) - sql.append("PRICELASTPO"); - else // AcctSchema.COSTING_STANDARD - sql.append("COSTSTANDARD"); - sql.append(" FROM M_Product_Costing WHERE M_Product_ID=? AND C_AcctSchema_ID=?"); - - PreparedStatement pstmt = null; - ResultSet rs = null; - try - { - pstmt = DB.prepareStatement(sql.toString(), null); - pstmt.setInt(1, m_M_Product_ID); - pstmt.setInt(2, as.getC_AcctSchema_ID()); - rs = pstmt.executeQuery(); - if (rs.next()) - { - current = rs.getBigDecimal(1); - cost = rs.getBigDecimal(2); - } - } - catch (SQLException e) - { - log.log(Level.SEVERE, sql.toString(), e); - } - finally { - DB.close(rs, pstmt); - rs = null; pstmt = null; - } - - // Return Costs - if (costType != null && cost != null && cost.compareTo(Env.ZERO)!=0) - { - log.fine("Costs=" + cost); - return cost; - } - else if (current != null && current.compareTo(Env.ZERO)!=0) - { - log.fine("Current=" + current); - return current; - } - - // Create/Update Cost Record - boolean create = (cost == null && current == null); - return updateCostsOld (as, create); - } // getProductCostOld - - /** - * Update/Create initial Cost Record. - * Check first for Purchase Price List, - * then Product Purchase Costs - * and then Price List - * @param as accounting schema - * @param create create record - * @return costs - */ - private BigDecimal updateCostsOld (MAcctSchema as, boolean create) - { - // Create Zero Record - if (create) - { - StringBuffer sql = new StringBuffer ("INSERT INTO M_Product_Costing " - + "(M_Product_ID,C_AcctSchema_ID," - + " AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy," - + " CurrentCostPrice,CostStandard,FutureCostPrice," - + " CostStandardPOQty,CostStandardPOAmt,CostStandardCumQty,CostStandardCumAmt," - + " CostAverage,CostAverageCumQty,CostAverageCumAmt," - + " PriceLastPO,PriceLastInv, TotalInvQty,TotalInvAmt) " - + "VALUES ("); - sql.append(m_M_Product_ID).append(",").append(as.getC_AcctSchema_ID()).append(",") - .append(as.getAD_Client_ID()).append(",").append(as.getAD_Org_ID()).append(",") - .append("'Y',SysDate,0,SysDate,0, 0,0,0, 0,0,0,0, 0,0,0, 0,0, 0,0)"); - int no = DB.executeUpdate(sql.toString(), m_trxName); - if (no == 1) - log.fine("CostingCreated"); - } - - // Try to find non ZERO Price - String costSource = "PriceList-PO"; - BigDecimal costs = getPriceList (as, true); - if (costs == null || costs.compareTo(Env.ZERO)==0) - { - costSource = "PO Cost"; - costs = getPOCost(as); - } - if (costs == null || costs.compareTo(Env.ZERO)==0) - { - costSource = "PriceList"; - costs = getPriceList (as, false); - } - - // if not found use $1 (to be able to do material transactions) - if (costs == null || costs.compareTo(Env.ZERO)==0) - { - costSource = "Not Found"; - costs = new BigDecimal("1"); - } - - // update current costs - StringBuffer sql = new StringBuffer ("UPDATE M_Product_Costing "); - sql.append("SET CurrentCostPrice=").append(costs) - .append(" WHERE M_Product_ID=").append(m_M_Product_ID) - .append(" AND C_AcctSchema_ID=").append(as.getC_AcctSchema_ID()); - int no = DB.executeUpdate(sql.toString(), m_trxName); - if (no == 1) - log.fine(costSource + " - " + costs); - return costs; - } // createCosts - /** * Get PO Price from PriceList - and convert it to AcctSchema Currency * @param as accounting schema diff --git a/org.adempiere.base/src/org/compiere/model/X_M_Product_Costing.java b/org.adempiere.base/src/org/compiere/model/X_M_Product_Costing.java deleted file mode 100644 index cb881bfcdb..0000000000 --- a/org.adempiere.base/src/org/compiere/model/X_M_Product_Costing.java +++ /dev/null @@ -1,421 +0,0 @@ -/****************************************************************************** - * Product: Adempiere ERP & CRM Smart Business Solution * - * Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved. * - * This program is free software, you can redistribute it and/or modify it * - * under the terms version 2 of the GNU General Public License as published * - * by the Free Software Foundation. This program is distributed in the hope * - * that it will be useful, but WITHOUT ANY WARRANTY, without even the implied * - * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * - * See the GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License along * - * with this program, if not, write to the Free Software Foundation, Inc., * - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * - * For the text or an alternative of this public license, you may reach us * - * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * - * or via info@compiere.org or http://www.compiere.org/license.html * - *****************************************************************************/ -/** Generated Model - DO NOT CHANGE */ -package org.compiere.model; - -import java.math.BigDecimal; -import java.sql.ResultSet; -import java.util.Properties; -import org.compiere.util.Env; - -/** Generated Model for M_Product_Costing - * @author Adempiere (generated) - * @version Release 3.6.0LTS - $Id$ */ -public class X_M_Product_Costing extends PO implements I_M_Product_Costing, I_Persistent -{ - - /** - * - */ - private static final long serialVersionUID = 20100614L; - - /** Standard Constructor */ - public X_M_Product_Costing (Properties ctx, int M_Product_Costing_ID, String trxName) - { - super (ctx, M_Product_Costing_ID, trxName); - /** if (M_Product_Costing_ID == 0) - { - setC_AcctSchema_ID (0); - setCostAverage (Env.ZERO); - setCostAverageCumAmt (Env.ZERO); - setCostAverageCumQty (Env.ZERO); - setCostStandard (Env.ZERO); - setCostStandardCumAmt (Env.ZERO); - setCostStandardCumQty (Env.ZERO); - setCostStandardPOAmt (Env.ZERO); - setCostStandardPOQty (Env.ZERO); - setCurrentCostPrice (Env.ZERO); - setFutureCostPrice (Env.ZERO); - setM_Product_ID (0); - setPriceLastInv (Env.ZERO); - setPriceLastPO (Env.ZERO); - setTotalInvAmt (Env.ZERO); - setTotalInvQty (Env.ZERO); - } */ - } - - /** Load Constructor */ - public X_M_Product_Costing (Properties ctx, ResultSet rs, String trxName) - { - super (ctx, rs, trxName); - } - - /** AccessLevel - * @return 3 - Client - 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_Product_Costing[") - .append(get_ID()).append("]"); - return sb.toString(); - } - - public I_C_AcctSchema getC_AcctSchema() throws RuntimeException - { - return (I_C_AcctSchema)MTable.get(getCtx(), I_C_AcctSchema.Table_Name) - .getPO(getC_AcctSchema_ID(), get_TrxName()); } - - /** Set Accounting Schema. - @param C_AcctSchema_ID - Rules for accounting - */ - public void setC_AcctSchema_ID (int C_AcctSchema_ID) - { - if (C_AcctSchema_ID < 1) - set_ValueNoCheck (COLUMNNAME_C_AcctSchema_ID, null); - else - set_ValueNoCheck (COLUMNNAME_C_AcctSchema_ID, Integer.valueOf(C_AcctSchema_ID)); - } - - /** Get Accounting Schema. - @return Rules for accounting - */ - public int getC_AcctSchema_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_C_AcctSchema_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Average Cost. - @param CostAverage - Weighted average costs - */ - public void setCostAverage (BigDecimal CostAverage) - { - set_ValueNoCheck (COLUMNNAME_CostAverage, CostAverage); - } - - /** Get Average Cost. - @return Weighted average costs - */ - public BigDecimal getCostAverage () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_CostAverage); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set Average Cost Amount Sum. - @param CostAverageCumAmt - Cumulative average cost amounts (internal) - */ - public void setCostAverageCumAmt (BigDecimal CostAverageCumAmt) - { - set_ValueNoCheck (COLUMNNAME_CostAverageCumAmt, CostAverageCumAmt); - } - - /** Get Average Cost Amount Sum. - @return Cumulative average cost amounts (internal) - */ - public BigDecimal getCostAverageCumAmt () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_CostAverageCumAmt); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set Average Cost Quantity Sum. - @param CostAverageCumQty - Cumulative average cost quantities (internal) - */ - public void setCostAverageCumQty (BigDecimal CostAverageCumQty) - { - set_ValueNoCheck (COLUMNNAME_CostAverageCumQty, CostAverageCumQty); - } - - /** Get Average Cost Quantity Sum. - @return Cumulative average cost quantities (internal) - */ - public BigDecimal getCostAverageCumQty () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_CostAverageCumQty); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set Standard Cost. - @param CostStandard - Standard Costs - */ - public void setCostStandard (BigDecimal CostStandard) - { - set_ValueNoCheck (COLUMNNAME_CostStandard, CostStandard); - } - - /** Get Standard Cost. - @return Standard Costs - */ - public BigDecimal getCostStandard () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_CostStandard); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set Std Cost Amount Sum. - @param CostStandardCumAmt - Standard Cost Invoice Amount Sum (internal) - */ - public void setCostStandardCumAmt (BigDecimal CostStandardCumAmt) - { - set_ValueNoCheck (COLUMNNAME_CostStandardCumAmt, CostStandardCumAmt); - } - - /** Get Std Cost Amount Sum. - @return Standard Cost Invoice Amount Sum (internal) - */ - public BigDecimal getCostStandardCumAmt () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_CostStandardCumAmt); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set Std Cost Quantity Sum. - @param CostStandardCumQty - Standard Cost Invoice Quantity Sum (internal) - */ - public void setCostStandardCumQty (BigDecimal CostStandardCumQty) - { - set_ValueNoCheck (COLUMNNAME_CostStandardCumQty, CostStandardCumQty); - } - - /** Get Std Cost Quantity Sum. - @return Standard Cost Invoice Quantity Sum (internal) - */ - public BigDecimal getCostStandardCumQty () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_CostStandardCumQty); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set Std PO Cost Amount Sum. - @param CostStandardPOAmt - Standard Cost Purchase Order Amount Sum (internal) - */ - public void setCostStandardPOAmt (BigDecimal CostStandardPOAmt) - { - set_ValueNoCheck (COLUMNNAME_CostStandardPOAmt, CostStandardPOAmt); - } - - /** Get Std PO Cost Amount Sum. - @return Standard Cost Purchase Order Amount Sum (internal) - */ - public BigDecimal getCostStandardPOAmt () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_CostStandardPOAmt); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set Std PO Cost Quantity Sum. - @param CostStandardPOQty - Standard Cost Purchase Order Quantity Sum (internal) - */ - public void setCostStandardPOQty (BigDecimal CostStandardPOQty) - { - set_ValueNoCheck (COLUMNNAME_CostStandardPOQty, CostStandardPOQty); - } - - /** Get Std PO Cost Quantity Sum. - @return Standard Cost Purchase Order Quantity Sum (internal) - */ - public BigDecimal getCostStandardPOQty () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_CostStandardPOQty); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set Current Cost Price. - @param CurrentCostPrice - The currently used cost price - */ - public void setCurrentCostPrice (BigDecimal CurrentCostPrice) - { - set_Value (COLUMNNAME_CurrentCostPrice, CurrentCostPrice); - } - - /** Get Current Cost Price. - @return The currently used cost price - */ - public BigDecimal getCurrentCostPrice () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_CurrentCostPrice); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set Future Cost Price. - @param FutureCostPrice Future Cost Price */ - public void setFutureCostPrice (BigDecimal FutureCostPrice) - { - set_Value (COLUMNNAME_FutureCostPrice, FutureCostPrice); - } - - /** Get Future Cost Price. - @return Future Cost Price */ - public BigDecimal getFutureCostPrice () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_FutureCostPrice); - if (bd == null) - return Env.ZERO; - return bd; - } - - public I_M_Product getM_Product() throws RuntimeException - { - return (I_M_Product)MTable.get(getCtx(), I_M_Product.Table_Name) - .getPO(getM_Product_ID(), get_TrxName()); } - - /** Set Product. - @param M_Product_ID - Product, Service, Item - */ - public void setM_Product_ID (int M_Product_ID) - { - if (M_Product_ID < 1) - set_ValueNoCheck (COLUMNNAME_M_Product_ID, null); - else - set_ValueNoCheck (COLUMNNAME_M_Product_ID, Integer.valueOf(M_Product_ID)); - } - - /** Get Product. - @return Product, Service, Item - */ - public int getM_Product_ID () - { - Integer ii = (Integer)get_Value(COLUMNNAME_M_Product_ID); - if (ii == null) - return 0; - return ii.intValue(); - } - - /** Set Last Invoice Price. - @param PriceLastInv - Price of the last invoice for the product - */ - public void setPriceLastInv (BigDecimal PriceLastInv) - { - set_ValueNoCheck (COLUMNNAME_PriceLastInv, PriceLastInv); - } - - /** Get Last Invoice Price. - @return Price of the last invoice for the product - */ - public BigDecimal getPriceLastInv () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_PriceLastInv); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set Last PO Price. - @param PriceLastPO - Price of the last purchase order for the product - */ - public void setPriceLastPO (BigDecimal PriceLastPO) - { - set_ValueNoCheck (COLUMNNAME_PriceLastPO, PriceLastPO); - } - - /** Get Last PO Price. - @return Price of the last purchase order for the product - */ - public BigDecimal getPriceLastPO () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_PriceLastPO); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set Total Invoice Amount. - @param TotalInvAmt - Cumulative total lifetime invoice amount - */ - public void setTotalInvAmt (BigDecimal TotalInvAmt) - { - set_ValueNoCheck (COLUMNNAME_TotalInvAmt, TotalInvAmt); - } - - /** Get Total Invoice Amount. - @return Cumulative total lifetime invoice amount - */ - public BigDecimal getTotalInvAmt () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_TotalInvAmt); - if (bd == null) - return Env.ZERO; - return bd; - } - - /** Set Total Invoice Quantity. - @param TotalInvQty - Cumulative total lifetime invoice quantity - */ - public void setTotalInvQty (BigDecimal TotalInvQty) - { - set_ValueNoCheck (COLUMNNAME_TotalInvQty, TotalInvQty); - } - - /** Get Total Invoice Quantity. - @return Cumulative total lifetime invoice quantity - */ - public BigDecimal getTotalInvQty () - { - BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_TotalInvQty); - if (bd == null) - return Env.ZERO; - return bd; - } -} \ No newline at end of file diff --git a/org.adempiere.ui/src/org/compiere/apps/form/Merge.java b/org.adempiere.ui/src/org/compiere/apps/form/Merge.java index 9baa59df8f..47e1695f00 100644 --- a/org.adempiere.ui/src/org/compiere/apps/form/Merge.java +++ b/org.adempiere.ui/src/org/compiere/apps/form/Merge.java @@ -59,7 +59,7 @@ public class Merge /** Tables to delete (not update) for M_Product */ public static String[] s_delete_Product = new String[] {"M_Product_PO", "M_Replenish", "T_Replenish", - "M_ProductPrice", "M_Product_Costing", + "M_ProductPrice", "M_Cost", // teo_sarca [ 1704554 ] "M_Product_Trl", "M_Product_Acct"}; // M_Storage From 6d7baac1b8e74301c85043671b3098dd2e1cbe6b Mon Sep 17 00:00:00 2001 From: Heng Sin Low Date: Wed, 4 Apr 2012 18:11:40 +0800 Subject: [PATCH 16/29] IDEMPIERE-215 Costing: Drop M_Product_Costing. --- .../oracle/830_IDEMPIERE-215.sql | 82 +++++++++++++++++++ .../postgresql/830_IDEMPIERE-215.sql | 76 +++++++++++++++++ 2 files changed, 158 insertions(+) create mode 100644 migration/360lts-release/oracle/830_IDEMPIERE-215.sql create mode 100644 migration/360lts-release/postgresql/830_IDEMPIERE-215.sql diff --git a/migration/360lts-release/oracle/830_IDEMPIERE-215.sql b/migration/360lts-release/oracle/830_IDEMPIERE-215.sql new file mode 100644 index 0000000000..8478ee423c --- /dev/null +++ b/migration/360lts-release/oracle/830_IDEMPIERE-215.sql @@ -0,0 +1,82 @@ +-- Apr 4, 2012 10:57:20 AM MYT +-- IDEMPIERE-215 Costing: Remove M_Product_Costing +DELETE FROM AD_Tab_Trl WHERE AD_Tab_ID=254 +; + +-- Apr 4, 2012 10:57:20 AM MYT +-- IDEMPIERE-215 Costing: Remove M_Product_Costing +DELETE FROM AD_Tab WHERE AD_Tab_ID=254 +; + +-- Apr 4, 2012 10:58:04 AM MYT +-- IDEMPIERE-215 Costing: Remove M_Product_Costing +DELETE FROM AD_Table_Trl WHERE AD_Table_ID=327 +; + +-- Apr 4, 2012 10:58:04 AM MYT +-- IDEMPIERE-215 Costing: Remove M_Product_Costing +DELETE FROM AD_Table WHERE AD_Table_ID=327 +; + +-- Apr 4, 2012 11:00:31 AM MYT +-- IDEMPIERE-215 Costing: Remove M_Product_Costing +DELETE FROM AD_ReportView WHERE AD_ReportView_ID=125 +; + +-- Apr 4, 2012 11:04:34 AM MYT +-- IDEMPIERE-215 Costing: Remove M_Product_Costing +DELETE FROM AD_Menu_Trl WHERE AD_Menu_ID=314 +; + +-- Apr 4, 2012 11:04:34 AM MYT +-- IDEMPIERE-215 Costing: Remove M_Product_Costing +DELETE FROM AD_Menu WHERE AD_Menu_ID=314 +; + +-- Apr 4, 2012 11:04:34 AM MYT +-- IDEMPIERE-215 Costing: Remove M_Product_Costing +DELETE FROM AD_TreeNodeMM n WHERE Node_ID=314 AND EXISTS (SELECT * FROM AD_Tree t WHERE t.AD_Tree_ID=n.AD_Tree_ID AND t.TreeType='MM') +; + +-- Apr 4, 2012 11:04:48 AM MYT +-- IDEMPIERE-215 Costing: Remove M_Product_Costing +DELETE FROM AD_Process_Trl WHERE AD_Process_ID=183 +; + +-- Apr 4, 2012 11:04:48 AM MYT +-- IDEMPIERE-215 Costing: Remove M_Product_Costing +DELETE FROM AD_Process WHERE AD_Process_ID=183 +; + +-- Apr 4, 2012 11:04:55 AM MYT +-- IDEMPIERE-215 Costing: Remove M_Product_Costing +DELETE FROM AD_ReportView WHERE AD_ReportView_ID=125 +; + +-- Apr 4, 2012 11:05:21 AM MYT +-- IDEMPIERE-215 Costing: Remove M_Product_Costing +DELETE FROM AD_Table_Trl WHERE AD_Table_ID=479 +; + +-- Apr 4, 2012 11:05:22 AM MYT +-- IDEMPIERE-215 Costing: Remove M_Product_Costing +DELETE FROM AD_Table WHERE AD_Table_ID=479 +; + +-- Apr 4, 2012 11:05:22 AM MYT +-- IDEMPIERE-215 Costing: Remove M_Product_Costing +DROP VIEW RV_Product_Costing; + +-- Apr 4, 2012 11:05:22 AM MYT +-- IDEMPIERE-215 Costing: Remove M_Product_Costing +DROP TABLE M_Product_Costing; + +-- Apr 4, 2012 11:05:22 AM MYT +-- IDEMPIERE-215 Costing: Remove M_Product_Costing +UPDATE AD_System + SET LastMigrationScriptApplied='830_IDEMPIERE-215.sql' +WHERE LastMigrationScriptApplied<'830_IDEMPIERE-215.sql' + OR LastMigrationScriptApplied IS NULL +; + + diff --git a/migration/360lts-release/postgresql/830_IDEMPIERE-215.sql b/migration/360lts-release/postgresql/830_IDEMPIERE-215.sql new file mode 100644 index 0000000000..b2482c28be --- /dev/null +++ b/migration/360lts-release/postgresql/830_IDEMPIERE-215.sql @@ -0,0 +1,76 @@ +-- Apr 4, 2012 10:57:20 AM MYT +-- IDEMPIERE-215 Costing: Remove M_Product_Costing +DELETE FROM AD_Tab_Trl WHERE AD_Tab_ID=254 +; + +-- Apr 4, 2012 10:57:20 AM MYT +-- IDEMPIERE-215 Costing: Remove M_Product_Costing +DELETE FROM AD_Tab WHERE AD_Tab_ID=254 +; + +-- Apr 4, 2012 10:58:04 AM MYT +-- IDEMPIERE-215 Costing: Remove M_Product_Costing +DELETE FROM AD_Table_Trl WHERE AD_Table_ID=327 +; + +-- Apr 4, 2012 10:58:04 AM MYT +-- IDEMPIERE-215 Costing: Remove M_Product_Costing +DELETE FROM AD_Table WHERE AD_Table_ID=327 +; + +-- Apr 4, 2012 11:04:34 AM MYT +-- IDEMPIERE-215 Costing: Remove M_Product_Costing +DELETE FROM AD_Menu_Trl WHERE AD_Menu_ID=314 +; + +-- Apr 4, 2012 11:04:34 AM MYT +-- IDEMPIERE-215 Costing: Remove M_Product_Costing +DELETE FROM AD_Menu WHERE AD_Menu_ID=314 +; + +-- Apr 4, 2012 11:04:34 AM MYT +-- IDEMPIERE-215 Costing: Remove M_Product_Costing +DELETE FROM AD_TreeNodeMM WHERE Node_ID=314 AND EXISTS (SELECT * FROM AD_Tree t WHERE t.AD_Tree_ID=AD_TreeNodeMM.AD_Tree_ID AND t.TreeType='MM') +; + +-- Apr 4, 2012 11:04:48 AM MYT +-- IDEMPIERE-215 Costing: Remove M_Product_Costing +DELETE FROM AD_Process_Trl WHERE AD_Process_ID=183 +; + +-- Apr 4, 2012 11:04:48 AM MYT +-- IDEMPIERE-215 Costing: Remove M_Product_Costing +DELETE FROM AD_Process WHERE AD_Process_ID=183 +; + +-- Apr 4, 2012 11:04:55 AM MYT +-- IDEMPIERE-215 Costing: Remove M_Product_Costing +DELETE FROM AD_ReportView WHERE AD_ReportView_ID=125 +; + +-- Apr 4, 2012 11:05:21 AM MYT +-- IDEMPIERE-215 Costing: Remove M_Product_Costing +DELETE FROM AD_Table_Trl WHERE AD_Table_ID=479 +; + +-- Apr 4, 2012 11:05:22 AM MYT +-- IDEMPIERE-215 Costing: Remove M_Product_Costing +DELETE FROM AD_Table WHERE AD_Table_ID=479 +; + +-- Apr 4, 2012 11:05:22 AM MYT +-- IDEMPIERE-215 Costing: Remove M_Product_Costing +DROP VIEW RV_Product_Costing; + +-- Apr 4, 2012 11:05:22 AM MYT +-- IDEMPIERE-215 Costing: Remove M_Product_Costing +DROP TABLE M_Product_Costing; + +-- Apr 4, 2012 11:05:22 AM MYT +-- IDEMPIERE-215 Costing: Remove M_Product_Costing +UPDATE AD_System + SET LastMigrationScriptApplied='830_IDEMPIERE-215.sql' +WHERE LastMigrationScriptApplied<'830_IDEMPIERE-215.sql' + OR LastMigrationScriptApplied IS NULL +; + From 491a3517f84f2e5668c4e934c43cd4771933f582 Mon Sep 17 00:00:00 2001 From: Heng Sin Low Date: Wed, 4 Apr 2012 18:33:37 +0800 Subject: [PATCH 17/29] IDEMPIERE-215 Costing: Drop M_Product_Costing. --- db/ddlutils/model/M_PRODUCT_COSTING.xml | 38 ------------------- .../oracle/views/RV_PRODUCT_COSTING.sql | 29 -------------- .../postgresql/views/RV_PRODUCT_COSTING.sql | 29 -------------- 3 files changed, 96 deletions(-) delete mode 100644 db/ddlutils/model/M_PRODUCT_COSTING.xml delete mode 100644 db/ddlutils/oracle/views/RV_PRODUCT_COSTING.sql delete mode 100644 db/ddlutils/postgresql/views/RV_PRODUCT_COSTING.sql diff --git a/db/ddlutils/model/M_PRODUCT_COSTING.xml b/db/ddlutils/model/M_PRODUCT_COSTING.xml deleted file mode 100644 index cb05be1e62..0000000000 --- a/db/ddlutils/model/M_PRODUCT_COSTING.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
diff --git a/db/ddlutils/oracle/views/RV_PRODUCT_COSTING.sql b/db/ddlutils/oracle/views/RV_PRODUCT_COSTING.sql deleted file mode 100644 index 54d51b1596..0000000000 --- a/db/ddlutils/oracle/views/RV_PRODUCT_COSTING.sql +++ /dev/null @@ -1,29 +0,0 @@ -CREATE OR REPLACE VIEW RV_PRODUCT_COSTING -(M_PRODUCT_ID, C_ACCTSCHEMA_ID, VALUE, NAME, M_PRODUCT_CATEGORY_ID, - AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, CREATEDBY, - UPDATED, UPDATEDBY, CURRENTCOSTPRICE, FUTURECOSTPRICE, COSTSTANDARD, - COSTSTANDARDPOQTY, COSTSTANDARDPOAMT, COSTSTANDARDPODIFF, COSTSTANDARDCUMQTY, COSTSTANDARDCUMAMT, - COSTSTANDARDINVDIFF, COSTAVERAGE, COSTAVERAGECUMQTY, COSTAVERAGECUMAMT, TOTALINVQTY, - TOTALINVAMT, TOTALINVCOST, PRICELASTPO, PRICELASTINV) -AS -SELECT pc.M_Product_ID, pc.C_AcctSchema_ID, p.Value, p.Name, p.M_Product_Category_ID, - pc.AD_Client_ID, pc.AD_Org_ID, pc.IsActive, pc.Created,pc.CreatedBy,pc.Updated,pc.UpdatedBy, - pc.CurrentCostPrice, - -- Standard Costing - pc.FutureCostPrice, pc.CostStandard, - pc.CostStandardPOQty, pc.CostStandardPOAmt, - CASE WHEN pc.CostStandardPOQty=0 THEN 0 ELSE pc.CostStandardPOAmt/pc.CostStandardPOQty END AS CostStandardPODiff, - pc.CostStandardCumQty, pc.CostStandardCumAmt, - CASE WHEN pc.CostStandardCumQty=0 THEN 0 ELSE pc.CostStandardCumAmt/pc.CostStandardCumQty END AS CostStandardInvDiff, - -- Average Costing - pc.CostAverage, - pc.CostAverageCumQty, pc.CostAverageCumAmt, - pc.TotalInvQty, pc.TotalInvAmt, - CASE WHEN pc.TotalInvQty=0 THEN 0 ELSE pc.TotalInvAmt/pc.TotalInvQty END AS TotalInvCost, - -- LastPrice - pc.PriceLastPO, pc.PriceLastInv -FROM M_Product_Costing pc - INNER JOIN M_Product p ON (pc.M_Product_ID=p.M_Product_ID); - - - diff --git a/db/ddlutils/postgresql/views/RV_PRODUCT_COSTING.sql b/db/ddlutils/postgresql/views/RV_PRODUCT_COSTING.sql deleted file mode 100644 index 54d51b1596..0000000000 --- a/db/ddlutils/postgresql/views/RV_PRODUCT_COSTING.sql +++ /dev/null @@ -1,29 +0,0 @@ -CREATE OR REPLACE VIEW RV_PRODUCT_COSTING -(M_PRODUCT_ID, C_ACCTSCHEMA_ID, VALUE, NAME, M_PRODUCT_CATEGORY_ID, - AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, CREATEDBY, - UPDATED, UPDATEDBY, CURRENTCOSTPRICE, FUTURECOSTPRICE, COSTSTANDARD, - COSTSTANDARDPOQTY, COSTSTANDARDPOAMT, COSTSTANDARDPODIFF, COSTSTANDARDCUMQTY, COSTSTANDARDCUMAMT, - COSTSTANDARDINVDIFF, COSTAVERAGE, COSTAVERAGECUMQTY, COSTAVERAGECUMAMT, TOTALINVQTY, - TOTALINVAMT, TOTALINVCOST, PRICELASTPO, PRICELASTINV) -AS -SELECT pc.M_Product_ID, pc.C_AcctSchema_ID, p.Value, p.Name, p.M_Product_Category_ID, - pc.AD_Client_ID, pc.AD_Org_ID, pc.IsActive, pc.Created,pc.CreatedBy,pc.Updated,pc.UpdatedBy, - pc.CurrentCostPrice, - -- Standard Costing - pc.FutureCostPrice, pc.CostStandard, - pc.CostStandardPOQty, pc.CostStandardPOAmt, - CASE WHEN pc.CostStandardPOQty=0 THEN 0 ELSE pc.CostStandardPOAmt/pc.CostStandardPOQty END AS CostStandardPODiff, - pc.CostStandardCumQty, pc.CostStandardCumAmt, - CASE WHEN pc.CostStandardCumQty=0 THEN 0 ELSE pc.CostStandardCumAmt/pc.CostStandardCumQty END AS CostStandardInvDiff, - -- Average Costing - pc.CostAverage, - pc.CostAverageCumQty, pc.CostAverageCumAmt, - pc.TotalInvQty, pc.TotalInvAmt, - CASE WHEN pc.TotalInvQty=0 THEN 0 ELSE pc.TotalInvAmt/pc.TotalInvQty END AS TotalInvCost, - -- LastPrice - pc.PriceLastPO, pc.PriceLastInv -FROM M_Product_Costing pc - INNER JOIN M_Product p ON (pc.M_Product_ID=p.M_Product_ID); - - - From fe30be897578c4f20894f50ce83729107a33f487 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Wed, 4 Apr 2012 09:10:17 -0500 Subject: [PATCH 18/29] IDEMPIERE-177 Complete Window Customization functionality / fix migration scripts --- ...830_IDEMPIERE-177_Window_Customization.sql | 34 ++++++++++++------- ...830_IDEMPIERE-177_Window_Customization.sql | 19 +++++++---- 2 files changed, 33 insertions(+), 20 deletions(-) diff --git a/migration/360lts-release/oracle/830_IDEMPIERE-177_Window_Customization.sql b/migration/360lts-release/oracle/830_IDEMPIERE-177_Window_Customization.sql index ff93cc3158..cadf03289a 100644 --- a/migration/360lts-release/oracle/830_IDEMPIERE-177_Window_Customization.sql +++ b/migration/360lts-release/oracle/830_IDEMPIERE-177_Window_Customization.sql @@ -1,3 +1,6 @@ +SET SQLBLANKLINES ON +SET DEFINE OFF + -- Aug 9, 2010 8:47:17 PM CEST -- Default comment for updating dictionary UPDATE AD_Column SET IsMandatory='N',Updated=TO_DATE('2010-08-09 20:47:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=13424 @@ -80,37 +83,37 @@ ALTER TABLE AD_UserDef_Field MODIFY DefaultValue NVARCHAR2(2000) DEFAULT '' -- Mar 5, 2012 2:16:34 PM CET -- IDEMPIERE-177 Window Customization -UPDATE AD_Column SET Callout='org.compiere.model.CalloutWindowCustomization.window',Updated=TO_TIMESTAMP('2012-03-05 14:16:34','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6395 +UPDATE AD_Column SET Callout='org.compiere.model.CalloutWindowCustomization.window',Updated=TO_DATE('2012-03-05 14:16:34','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6395 ; -- Mar 5, 2012 2:35:54 PM CET -- IDEMPIERE-177 Window Customization -INSERT INTO AD_Val_Rule (AD_Client_ID,AD_Org_ID,AD_Val_Rule_ID,Code,Created,CreatedBy,EntityType,IsActive,Name,Type,Updated,UpdatedBy) VALUES (0,0,200000,'AD_Window.AD_Window_ID IN (SELECT AD_Window_Access.AD_Window_ID FROM AD_Window_Access WHERE AD_Window_Access.AD_Role_ID=@#AD_Role_ID@)',TO_TIMESTAMP('2012-03-05 14:35:52','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','AD_Window of Role','S',TO_TIMESTAMP('2012-03-05 14:35:52','YYYY-MM-DD HH24:MI:SS'),100) +INSERT INTO AD_Val_Rule (AD_Client_ID,AD_Org_ID,AD_Val_Rule_ID,Code,Created,CreatedBy,EntityType,IsActive,Name,Type,Updated,UpdatedBy) VALUES (0,0,200000,'AD_Window.AD_Window_ID IN (SELECT AD_Window_Access.AD_Window_ID FROM AD_Window_Access WHERE AD_Window_Access.AD_Role_ID=@#AD_Role_ID@)',TO_DATE('2012-03-05 14:35:52','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','AD_Window of Role','S',TO_DATE('2012-03-05 14:35:52','YYYY-MM-DD HH24:MI:SS'),100) ; -- Mar 5, 2012 2:36:34 PM CET -- IDEMPIERE-177 Window Customization -UPDATE AD_Column SET AD_Val_Rule_ID=200000,Updated=TO_TIMESTAMP('2012-03-05 14:36:34','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6395 +UPDATE AD_Column SET AD_Val_Rule_ID=200000,Updated=TO_DATE('2012-03-05 14:36:34','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6395 ; -- Mar 5, 2012 2:48:07 PM CET -- IDEMPIERE-177 Window Customization -UPDATE AD_Column SET AD_Val_Rule_ID=163,Updated=TO_TIMESTAMP('2012-03-05 14:48:07','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6380 +UPDATE AD_Column SET AD_Val_Rule_ID=163,Updated=TO_DATE('2012-03-05 14:48:07','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6380 ; -- Mar 5, 2012 3:41:45 PM CET -- IDEMPIERE-177 Window Customization -UPDATE AD_Column SET Callout='org.compiere.model.CalloutWindowCustomization.tab',Updated=TO_TIMESTAMP('2012-03-05 15:41:45','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6380 +UPDATE AD_Column SET Callout='org.compiere.model.CalloutWindowCustomization.tab',Updated=TO_DATE('2012-03-05 15:41:45','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6380 ; -- Mar 5, 2012 3:51:23 PM CET -- IDEMPIERE-177 Window Customization -UPDATE AD_Column SET AD_Val_Rule_ID=52005,Updated=TO_TIMESTAMP('2012-03-05 15:51:23','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6345 +UPDATE AD_Column SET AD_Val_Rule_ID=52005,Updated=TO_DATE('2012-03-05 15:51:23','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6345 ; -- Mar 5, 2012 3:53:30 PM CET -- IDEMPIERE-177 Window Customization -UPDATE AD_Column SET Callout='org.compiere.model.CalloutWindowCustomization.field',Updated=TO_TIMESTAMP('2012-03-05 15:53:30','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6345 +UPDATE AD_Column SET Callout='org.compiere.model.CalloutWindowCustomization.field',Updated=TO_DATE('2012-03-05 15:53:30','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6345 ; -- Mar 7, 2012 11:02:11 AM CET @@ -123,9 +126,9 @@ value := strings or numbers
logic operators := AND or OR with the previous result from left to right
operand := eq{=}, gt{>}, le{<}, not{~^!}
Examples:
-@AD_Table_ID@=14 | @Language@!GERGER
-@PriceLimit@>10 | @PriceList@>@PriceActual@
-@Name@>J
+'||'@AD_Table_ID@=14 | @Language@!GERGER
+'||'@PriceLimit@>10 | @PriceList@>@PriceActual@
+'||'@Name@>J
Strings may be in single quotes (optional)','Y','Y','Y','N','N','N','N','N','N','N','N','N','N','Y','Read Only Logic',0,TO_DATE('2012-03-07 11:02:09','YYYY-MM-DD HH24:MI:SS'),100,0) ; @@ -149,9 +152,9 @@ value := strings or numbers
logic operators := AND or OR with the previous result from left to right
operand := eq{=}, gt{>}, le{<}, not{~^!}
Examples:
-@AD_Table_ID@=14 | @Language@!GERGER
-@PriceLimit@>10 | @PriceList@>@PriceActual@
-@Name@>J
+'||'@AD_Table_ID@=14 | @Language@!GERGER
+'||'@PriceLimit@>10 | @PriceList@>@PriceActual@
+'||'@Name@>J
Strings may be in single quotes (optional)','Y','Y','Y','N','N','N','N','N','Read Only Logic',TO_DATE('2012-03-07 11:02:33','YYYY-MM-DD HH24:MI:SS'),100) ; @@ -185,3 +188,8 @@ UPDATE AD_Column SET IsMandatory='N',Updated=TO_DATE('2012-04-03 15:15:11','YYYY UPDATE AD_Column SET IsMandatory='N',Updated=TO_DATE('2012-04-03 15:16:32','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6346 ; +UPDATE AD_System + SET LastMigrationScriptApplied='830_IDEMPIERE-177_Window_Customization.sql' +WHERE LastMigrationScriptApplied<'830_IDEMPIERE-177_Window_Customization.sql' + OR LastMigrationScriptApplied IS NULL +; diff --git a/migration/360lts-release/postgresql/830_IDEMPIERE-177_Window_Customization.sql b/migration/360lts-release/postgresql/830_IDEMPIERE-177_Window_Customization.sql index 54f17504ba..3f630346e2 100644 --- a/migration/360lts-release/postgresql/830_IDEMPIERE-177_Window_Customization.sql +++ b/migration/360lts-release/postgresql/830_IDEMPIERE-177_Window_Customization.sql @@ -80,37 +80,37 @@ insert into t_alter_column values('ad_userdef_field','DefaultValue','VARCHAR(200 -- Mar 5, 2012 2:16:34 PM CET -- IDEMPIERE-177 Window Customization -UPDATE AD_Column SET Callout='org.compiere.model.CalloutWindowCustomization.window',Updated=TO_DATE('2012-03-05 14:16:34','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6395 +UPDATE AD_Column SET Callout='org.compiere.model.CalloutWindowCustomization.window',Updated=TO_TIMESTAMP('2012-03-05 14:16:34','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6395 ; -- Mar 5, 2012 2:35:54 PM CET -- IDEMPIERE-177 Window Customization -INSERT INTO AD_Val_Rule (AD_Client_ID,AD_Org_ID,AD_Val_Rule_ID,Code,Created,CreatedBy,EntityType,IsActive,Name,Type,Updated,UpdatedBy) VALUES (0,0,200000,'AD_Window.AD_Window_ID IN (SELECT AD_Window_Access.AD_Window_ID FROM AD_Window_Access WHERE AD_Window_Access.AD_Role_ID=@#AD_Role_ID@)',TO_DATE('2012-03-05 14:35:52','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','AD_Window of Role','S',TO_DATE('2012-03-05 14:35:52','YYYY-MM-DD HH24:MI:SS'),100) +INSERT INTO AD_Val_Rule (AD_Client_ID,AD_Org_ID,AD_Val_Rule_ID,Code,Created,CreatedBy,EntityType,IsActive,Name,Type,Updated,UpdatedBy) VALUES (0,0,200000,'AD_Window.AD_Window_ID IN (SELECT AD_Window_Access.AD_Window_ID FROM AD_Window_Access WHERE AD_Window_Access.AD_Role_ID=@#AD_Role_ID@)',TO_TIMESTAMP('2012-03-05 14:35:52','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','AD_Window of Role','S',TO_TIMESTAMP('2012-03-05 14:35:52','YYYY-MM-DD HH24:MI:SS'),100) ; -- Mar 5, 2012 2:36:34 PM CET -- IDEMPIERE-177 Window Customization -UPDATE AD_Column SET AD_Val_Rule_ID=200000,Updated=TO_DATE('2012-03-05 14:36:34','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6395 +UPDATE AD_Column SET AD_Val_Rule_ID=200000,Updated=TO_TIMESTAMP('2012-03-05 14:36:34','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6395 ; -- Mar 5, 2012 2:48:07 PM CET -- IDEMPIERE-177 Window Customization -UPDATE AD_Column SET AD_Val_Rule_ID=163,Updated=TO_DATE('2012-03-05 14:48:07','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6380 +UPDATE AD_Column SET AD_Val_Rule_ID=163,Updated=TO_TIMESTAMP('2012-03-05 14:48:07','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6380 ; -- Mar 5, 2012 3:41:45 PM CET -- IDEMPIERE-177 Window Customization -UPDATE AD_Column SET Callout='org.compiere.model.CalloutWindowCustomization.tab',Updated=TO_DATE('2012-03-05 15:41:45','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6380 +UPDATE AD_Column SET Callout='org.compiere.model.CalloutWindowCustomization.tab',Updated=TO_TIMESTAMP('2012-03-05 15:41:45','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6380 ; -- Mar 5, 2012 3:51:23 PM CET -- IDEMPIERE-177 Window Customization -UPDATE AD_Column SET AD_Val_Rule_ID=52005,Updated=TO_DATE('2012-03-05 15:51:23','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6345 +UPDATE AD_Column SET AD_Val_Rule_ID=52005,Updated=TO_TIMESTAMP('2012-03-05 15:51:23','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6345 ; -- Mar 5, 2012 3:53:30 PM CET -- IDEMPIERE-177 Window Customization -UPDATE AD_Column SET Callout='org.compiere.model.CalloutWindowCustomization.field',Updated=TO_DATE('2012-03-05 15:53:30','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6345 +UPDATE AD_Column SET Callout='org.compiere.model.CalloutWindowCustomization.field',Updated=TO_TIMESTAMP('2012-03-05 15:53:30','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6345 ; -- Mar 7, 2012 11:02:11 AM CET @@ -185,3 +185,8 @@ UPDATE AD_Column SET IsMandatory='N',Updated=TO_TIMESTAMP('2012-04-03 15:15:11', UPDATE AD_Column SET IsMandatory='N',Updated=TO_TIMESTAMP('2012-04-03 15:16:32','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6346 ; +UPDATE AD_System + SET LastMigrationScriptApplied='830_IDEMPIERE-177_Window_Customization.sql' +WHERE LastMigrationScriptApplied<'830_IDEMPIERE-177_Window_Customization.sql' + OR LastMigrationScriptApplied IS NULL +; From dace790402252700131fb1b78494154d1bc7b58c Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Wed, 4 Apr 2012 11:38:40 -0500 Subject: [PATCH 19/29] IDEMPIERE-177 Complete Window Customization functionality - peer review and tests --- ...831_IDEMPIERE-177_Window_Customization.sql | 90 +++++++++++++++++++ ...831_IDEMPIERE-177_Window_Customization.sql | 75 ++++++++++++++++ .../src/org/compiere/model/GridFieldVO.java | 2 +- .../src/org/compiere/model/GridTabVO.java | 4 +- .../src/org/compiere/model/MUserDefWin.java | 2 +- 5 files changed, 169 insertions(+), 4 deletions(-) create mode 100644 migration/360lts-release/oracle/831_IDEMPIERE-177_Window_Customization.sql create mode 100644 migration/360lts-release/postgresql/831_IDEMPIERE-177_Window_Customization.sql diff --git a/migration/360lts-release/oracle/831_IDEMPIERE-177_Window_Customization.sql b/migration/360lts-release/oracle/831_IDEMPIERE-177_Window_Customization.sql new file mode 100644 index 0000000000..0d5d416222 --- /dev/null +++ b/migration/360lts-release/oracle/831_IDEMPIERE-177_Window_Customization.sql @@ -0,0 +1,90 @@ +-- Apr 4, 2012 10:13:06 AM COT +-- IDEMPIERE-177 Complete Window Customization functionality +UPDATE AD_Column SET IsIdentifier='N',Updated=TO_DATE('2012-04-04 10:13:06','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6396 +; + +-- Apr 4, 2012 10:13:09 AM COT +-- IDEMPIERE-177 Complete Window Customization functionality +ALTER TABLE AD_UserDef_Win MODIFY Name NVARCHAR2(60) DEFAULT NULL +; + +-- Apr 4, 2012 10:13:10 AM COT +-- IDEMPIERE-177 Complete Window Customization functionality +ALTER TABLE AD_UserDef_Win MODIFY Name NULL +; + +-- Apr 4, 2012 10:13:27 AM COT +-- IDEMPIERE-177 Complete Window Customization functionality +UPDATE AD_Column SET IsIdentifier='Y', SeqNo=1,Updated=TO_DATE('2012-04-04 10:13:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6395 +; + +-- Apr 4, 2012 10:18:27 AM COT +-- IDEMPIERE-177 Complete Window Customization functionality +UPDATE AD_Column SET IsIdentifier='N',Updated=TO_DATE('2012-04-04 10:18:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6381 +; + +-- Apr 4, 2012 10:18:29 AM COT +-- IDEMPIERE-177 Complete Window Customization functionality +ALTER TABLE AD_UserDef_Tab MODIFY Name NVARCHAR2(60) DEFAULT NULL +; + +-- Apr 4, 2012 10:18:30 AM COT +-- IDEMPIERE-177 Complete Window Customization functionality +ALTER TABLE AD_UserDef_Tab MODIFY Name NULL +; + +-- Apr 4, 2012 10:18:47 AM COT +-- IDEMPIERE-177 Complete Window Customization functionality +UPDATE AD_Column SET IsIdentifier='Y', SeqNo=1,Updated=TO_DATE('2012-04-04 10:18:47','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6380 +; + +-- Apr 4, 2012 10:26:05 AM COT +-- IDEMPIERE-177 Complete Window Customization functionality +UPDATE AD_Column SET AD_Val_Rule_ID=158,Updated=TO_DATE('2012-04-04 10:26:05','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=13425 +; + +-- Apr 4, 2012 10:26:36 AM COT +-- IDEMPIERE-177 Complete Window Customization functionality +ALTER TABLE AD_UserDef_Field MODIFY DisplayLogic NVARCHAR2(2000) DEFAULT NULL +; + +-- Apr 4, 2012 10:26:36 AM COT +-- IDEMPIERE-177 Complete Window Customization functionality +ALTER TABLE AD_UserDef_Field MODIFY DisplayLogic NULL +; + +-- Apr 4, 2012 10:29:08 AM COT +-- IDEMPIERE-177 Complete Window Customization functionality +UPDATE AD_Column SET DefaultValue=NULL,Updated=TO_DATE('2012-04-04 10:29:08','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6351 +; + +-- Apr 4, 2012 10:29:11 AM COT +-- IDEMPIERE-177 Complete Window Customization functionality +ALTER TABLE AD_UserDef_Field MODIFY DisplayLogic NVARCHAR2(2000) DEFAULT NULL +; + +-- Apr 4, 2012 10:44:18 AM COT +-- IDEMPIERE-177 Complete Window Customization functionality +UPDATE AD_Column SET IsIdentifier='N',Updated=TO_DATE('2012-04-04 10:44:18','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6346 +; + +-- Apr 4, 2012 10:44:21 AM COT +-- IDEMPIERE-177 Complete Window Customization functionality +ALTER TABLE AD_UserDef_Field MODIFY Name NVARCHAR2(60) DEFAULT NULL +; + +-- Apr 4, 2012 10:44:21 AM COT +-- IDEMPIERE-177 Complete Window Customization functionality +ALTER TABLE AD_UserDef_Field MODIFY Name NULL +; + +-- Apr 4, 2012 10:44:36 AM COT +-- IDEMPIERE-177 Complete Window Customization functionality +UPDATE AD_Column SET IsIdentifier='Y', SeqNo=1,Updated=TO_DATE('2012-04-04 10:44:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6345 +; + +UPDATE AD_System + SET LastMigrationScriptApplied='831_IDEMPIERE-177_Window_Customization.sql' +WHERE LastMigrationScriptApplied<'831_IDEMPIERE-177_Window_Customization.sql' + OR LastMigrationScriptApplied IS NULL +; diff --git a/migration/360lts-release/postgresql/831_IDEMPIERE-177_Window_Customization.sql b/migration/360lts-release/postgresql/831_IDEMPIERE-177_Window_Customization.sql new file mode 100644 index 0000000000..36c589473a --- /dev/null +++ b/migration/360lts-release/postgresql/831_IDEMPIERE-177_Window_Customization.sql @@ -0,0 +1,75 @@ +-- Apr 4, 2012 10:13:06 AM COT +-- IDEMPIERE-177 Complete Window Customization functionality +UPDATE AD_Column SET IsIdentifier='N',Updated=TO_TIMESTAMP('2012-04-04 10:13:06','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6396 +; + +-- Apr 4, 2012 10:13:09 AM COT +-- IDEMPIERE-177 Complete Window Customization functionality +INSERT INTO t_alter_column values('ad_userdef_win','Name','VARCHAR(60)',null,'NULL') +; + +-- Apr 4, 2012 10:13:10 AM COT +-- IDEMPIERE-177 Complete Window Customization functionality +INSERT INTO t_alter_column values('ad_userdef_win','Name',null,'NULL',null) +; + +-- Apr 4, 2012 10:13:27 AM COT +-- IDEMPIERE-177 Complete Window Customization functionality +UPDATE AD_Column SET IsIdentifier='Y', SeqNo=1,Updated=TO_TIMESTAMP('2012-04-04 10:13:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6395 +; + +-- Apr 4, 2012 10:18:27 AM COT +-- IDEMPIERE-177 Complete Window Customization functionality +UPDATE AD_Column SET IsIdentifier='N',Updated=TO_TIMESTAMP('2012-04-04 10:18:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6381 +; + +-- Apr 4, 2012 10:18:29 AM COT +-- IDEMPIERE-177 Complete Window Customization functionality +INSERT INTO t_alter_column values('ad_userdef_tab','Name','VARCHAR(60)',null,'NULL') +; + +-- Apr 4, 2012 10:18:30 AM COT +-- IDEMPIERE-177 Complete Window Customization functionality +INSERT INTO t_alter_column values('ad_userdef_tab','Name',null,'NULL',null) +; + +-- Apr 4, 2012 10:18:47 AM COT +-- IDEMPIERE-177 Complete Window Customization functionality +UPDATE AD_Column SET IsIdentifier='Y', SeqNo=1,Updated=TO_TIMESTAMP('2012-04-04 10:18:47','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6380 +; + +-- Apr 4, 2012 10:29:08 AM COT +-- IDEMPIERE-177 Complete Window Customization functionality +UPDATE AD_Column SET DefaultValue=NULL,Updated=TO_TIMESTAMP('2012-04-04 10:29:08','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6351 +; + +-- Apr 4, 2012 10:29:11 AM COT +-- IDEMPIERE-177 Complete Window Customization functionality +INSERT INTO t_alter_column values('ad_userdef_field','DisplayLogic','VARCHAR(2000)',null,'NULL') +; + +-- Apr 4, 2012 10:44:18 AM COT +-- IDEMPIERE-177 Complete Window Customization functionality +UPDATE AD_Column SET IsIdentifier='N',Updated=TO_TIMESTAMP('2012-04-04 10:44:18','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6346 +; + +-- Apr 4, 2012 10:44:21 AM COT +-- IDEMPIERE-177 Complete Window Customization functionality +INSERT INTO t_alter_column values('ad_userdef_field','Name','VARCHAR(60)',null,'NULL') +; + +-- Apr 4, 2012 10:44:21 AM COT +-- IDEMPIERE-177 Complete Window Customization functionality +INSERT INTO t_alter_column values('ad_userdef_field','Name',null,'NULL',null) +; + +-- Apr 4, 2012 10:44:36 AM COT +-- IDEMPIERE-177 Complete Window Customization functionality +UPDATE AD_Column SET IsIdentifier='Y', SeqNo=1,Updated=TO_TIMESTAMP('2012-04-04 10:44:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=6345 +; + +UPDATE AD_System + SET LastMigrationScriptApplied='831_IDEMPIERE-177_Window_Customization.sql' +WHERE LastMigrationScriptApplied<'831_IDEMPIERE-177_Window_Customization.sql' + OR LastMigrationScriptApplied IS NULL +; diff --git a/org.adempiere.base/src/org/compiere/model/GridFieldVO.java b/org.adempiere.base/src/org/compiere/model/GridFieldVO.java index 5eb1868686..d322b88c47 100644 --- a/org.adempiere.base/src/org/compiere/model/GridFieldVO.java +++ b/org.adempiere.base/src/org/compiere/model/GridFieldVO.java @@ -221,7 +221,7 @@ public class GridFieldVO implements Serializable vo.IsSameLine = userDef.isSameLine(); vo.IsUpdateable = userDef.isUpdateable(); if (userDef.getDisplayLength() > 0) - vo.DisplayLength = userDef.getDisplayLength(); + vo.DisplayLength = userDef.getDisplayLength(); if (userDef.getDisplayLogic() != null) vo.DisplayLogic = userDef.getDisplayLogic(); if (userDef.getDefaultValue() != null) diff --git a/org.adempiere.base/src/org/compiere/model/GridTabVO.java b/org.adempiere.base/src/org/compiere/model/GridTabVO.java index 0ba49db8f8..3efeee92e9 100644 --- a/org.adempiere.base/src/org/compiere/model/GridTabVO.java +++ b/org.adempiere.base/src/org/compiere/model/GridTabVO.java @@ -104,7 +104,7 @@ public class GridTabVO implements Evaluatee, Serializable // FR IDEMPIERE-177 MUserDefTab userDef = MUserDefTab.get(vo.ctx, vo.AD_Tab_ID, vo.AD_Window_ID); vo.Name = rs.getString("Name"); - if (userDef != null) + if (userDef != null && userDef.getName() != null) vo.Name = userDef.getName(); Env.setContext(vo.ctx, vo.WindowNo, vo.TabNo, GridTab.CTX_Name, vo.Name); @@ -163,7 +163,7 @@ public class GridTabVO implements Evaluatee, Serializable } if (rs.getString("IsReadOnly").equals("Y")) vo.IsReadOnly = true; - if (userDef != null) + if (userDef != null && userDef.get_ValueAsString("ReadOnlyLogic") != null) vo.IsReadOnly = userDef.isReadOnly(); vo.ReadOnlyLogic = rs.getString("ReadOnlyLogic"); if (userDef != null) diff --git a/org.adempiere.base/src/org/compiere/model/MUserDefWin.java b/org.adempiere.base/src/org/compiere/model/MUserDefWin.java index 21d2df1e57..f9d934ed24 100644 --- a/org.adempiere.base/src/org/compiere/model/MUserDefWin.java +++ b/org.adempiere.base/src/org/compiere/model/MUserDefWin.java @@ -180,7 +180,7 @@ public class MUserDefWin extends X_AD_UserDef_Win } } // prefer if related to current login language - if (weight[i] > -1 && candidates[i].getAD_Language().equalsIgnoreCase(Env.getAD_Language(ctx))) { + if (weight[i] > -1 && Env.getAD_Language(ctx).equalsIgnoreCase(candidates[i].getAD_Language())) { weight[i] = weight[i] + 8; } // others are implicit From c66c713158cdcfeaf6f3424be268df8f2c7c6c71 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Wed, 4 Apr 2012 11:48:22 -0500 Subject: [PATCH 20/29] IDEMPIERE-215 - renumber migration script --- .../oracle/{830_IDEMPIERE-215.sql => 832_IDEMPIERE-215.sql} | 4 ++-- .../{830_IDEMPIERE-215.sql => 832_IDEMPIERE-215.sql} | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) rename migration/360lts-release/oracle/{830_IDEMPIERE-215.sql => 832_IDEMPIERE-215.sql} (95%) rename migration/360lts-release/postgresql/{830_IDEMPIERE-215.sql => 832_IDEMPIERE-215.sql} (94%) diff --git a/migration/360lts-release/oracle/830_IDEMPIERE-215.sql b/migration/360lts-release/oracle/832_IDEMPIERE-215.sql similarity index 95% rename from migration/360lts-release/oracle/830_IDEMPIERE-215.sql rename to migration/360lts-release/oracle/832_IDEMPIERE-215.sql index 8478ee423c..e18e4e1db9 100644 --- a/migration/360lts-release/oracle/830_IDEMPIERE-215.sql +++ b/migration/360lts-release/oracle/832_IDEMPIERE-215.sql @@ -74,8 +74,8 @@ DROP TABLE M_Product_Costing; -- Apr 4, 2012 11:05:22 AM MYT -- IDEMPIERE-215 Costing: Remove M_Product_Costing UPDATE AD_System - SET LastMigrationScriptApplied='830_IDEMPIERE-215.sql' -WHERE LastMigrationScriptApplied<'830_IDEMPIERE-215.sql' + SET LastMigrationScriptApplied='832_IDEMPIERE-215.sql' +WHERE LastMigrationScriptApplied<'832_IDEMPIERE-215.sql' OR LastMigrationScriptApplied IS NULL ; diff --git a/migration/360lts-release/postgresql/830_IDEMPIERE-215.sql b/migration/360lts-release/postgresql/832_IDEMPIERE-215.sql similarity index 94% rename from migration/360lts-release/postgresql/830_IDEMPIERE-215.sql rename to migration/360lts-release/postgresql/832_IDEMPIERE-215.sql index b2482c28be..b245418499 100644 --- a/migration/360lts-release/postgresql/830_IDEMPIERE-215.sql +++ b/migration/360lts-release/postgresql/832_IDEMPIERE-215.sql @@ -69,8 +69,8 @@ DROP TABLE M_Product_Costing; -- Apr 4, 2012 11:05:22 AM MYT -- IDEMPIERE-215 Costing: Remove M_Product_Costing UPDATE AD_System - SET LastMigrationScriptApplied='830_IDEMPIERE-215.sql' -WHERE LastMigrationScriptApplied<'830_IDEMPIERE-215.sql' + SET LastMigrationScriptApplied='832_IDEMPIERE-215.sql' +WHERE LastMigrationScriptApplied<'832_IDEMPIERE-215.sql' OR LastMigrationScriptApplied IS NULL ; From 88423a597c475ded4dab6df71ea14cbb52bc12ec Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Wed, 4 Apr 2012 21:39:28 -0500 Subject: [PATCH 21/29] IDEMPIERE-223 Document Processing Is Neglecting Error on Model Validator - fix to Allocation http://jira.idempiere.com/browse/IDEMPIERE-223 --- org.adempiere.ui/src/org/compiere/apps/form/Allocation.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/org.adempiere.ui/src/org/compiere/apps/form/Allocation.java b/org.adempiere.ui/src/org/compiere/apps/form/Allocation.java index 3cff9c7fe7..44ccf6a4d5 100644 --- a/org.adempiere.ui/src/org/compiere/apps/form/Allocation.java +++ b/org.adempiere.ui/src/org/compiere/apps/form/Allocation.java @@ -738,7 +738,8 @@ public class Allocation // Should start WF if (alloc.get_ID() != 0) { - alloc.processIt(DocAction.ACTION_Complete); + if (!alloc.processIt(DocAction.ACTION_Complete)) + throw new AdempiereException("Cannot complete allocation: " + alloc.getProcessMsg()); alloc.saveEx(); } From 0af6267cc7b3acb53ee5f02ae0bec717a25c5bd7 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Wed, 4 Apr 2012 22:42:18 -0500 Subject: [PATCH 22/29] IDEMPIERE-38 Tabs from a same window can't be translated the same way http://jira.idempiere.com/browse/IDEMPIERE-38 --- org.adempiere.ui.swing/src/org/compiere/apps/APanel.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/APanel.java b/org.adempiere.ui.swing/src/org/compiere/apps/APanel.java index 33093ca3d4..fb4199180f 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/APanel.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/APanel.java @@ -857,6 +857,8 @@ public final class APanel extends CPanel } if (gTab.isReadOnly()) tabName.append(""); + // Carlos Ruiz - globalqss - IDEMPIERE-38 Tabs from a same window can't be translated the same way + tabName.append(""); tabName.append (""); // Add Tab - sets ALT- and Shift-ALT- window.addTab (tabName.toString(), gTab, tabElement); From 3852377c43760f9d4572b5d94047d41e1869bf09 Mon Sep 17 00:00:00 2001 From: Nicolas Micoud Date: Thu, 5 Apr 2012 00:40:11 -0500 Subject: [PATCH 23/29] IDEMPIERE-129 Restrictions on Toolbar and Menu http://jira.idempiere.com/browse/IDEMPIERE-129 --- .../oracle/833_IDEMPIERE-129.sql | 1245 +++++++++++++++++ .../postgresql/833_IDEMPIERE-129.sql | 1245 +++++++++++++++++ .../compiere/model/I_AD_ToolBarButton.java | 219 +++ .../model/I_AD_ToolBarButtonRestrict.java | 173 +++ .../model/MToolBarButtonRestrict.java | 104 ++ .../compiere/model/X_AD_ToolBarButton.java | 252 ++++ .../model/X_AD_ToolBarButtonRestrict.java | 209 +++ .../src/org/compiere/apps/APanel.java | 63 + 8 files changed, 3510 insertions(+) create mode 100644 migration/360lts-release/oracle/833_IDEMPIERE-129.sql create mode 100644 migration/360lts-release/postgresql/833_IDEMPIERE-129.sql create mode 100644 org.adempiere.base/src/org/compiere/model/I_AD_ToolBarButton.java create mode 100644 org.adempiere.base/src/org/compiere/model/I_AD_ToolBarButtonRestrict.java create mode 100644 org.adempiere.base/src/org/compiere/model/MToolBarButtonRestrict.java create mode 100644 org.adempiere.base/src/org/compiere/model/X_AD_ToolBarButton.java create mode 100644 org.adempiere.base/src/org/compiere/model/X_AD_ToolBarButtonRestrict.java diff --git a/migration/360lts-release/oracle/833_IDEMPIERE-129.sql b/migration/360lts-release/oracle/833_IDEMPIERE-129.sql new file mode 100644 index 0000000000..161018a849 --- /dev/null +++ b/migration/360lts-release/oracle/833_IDEMPIERE-129.sql @@ -0,0 +1,1245 @@ +-- Mar 28, 2012 10:13:03 AM COT +-- IDEMPIERE-129 Restrictions on Toolbar and Menu +INSERT INTO AD_Table (IsSecurityEnabled,AccessLevel,LoadSeq,AD_Table_ID,IsHighVolume,ImportTable,IsView,IsChangeLog,CopyColumnsFromTable,EntityType,IsCentrallyMaintained,IsDeleteable,ReplicationType,TableName,Name,AD_Client_ID,IsActive,AD_Org_ID,CreatedBy,Updated,UpdatedBy,Created) VALUES ('N','4',0,200003,'N','N','N','Y','N','D','Y','Y','L','AD_ToolBarButtons','ToolBar Buttons',0,'Y',0,100,TO_DATE('2012-03-28 10:13:02','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2012-03-28 10:13:02','YYYY-MM-DD HH24:MI:SS')) +; + +-- Mar 28, 2012 10:13:04 AM COT +INSERT INTO AD_Table_Trl (AD_Language,AD_Table_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Table_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Table t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Table_ID=200003 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) +; + +-- Mar 28, 2012 10:13:18 AM COT +INSERT INTO AD_Column (DefaultValue,AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,Help,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,CreatedBy,Updated,AD_Client_ID,AD_Org_ID,IsActive,Created,UpdatedBy) VALUES ('@#AD_Client_ID@',200083,200003,'D',1,'Y','N','N',0,'A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','N',22,'N',19,'Y','N',102,'N','N','N','AD_Client_ID','Client/Tenant for this installation.','Client',100,TO_DATE('2012-03-28 10:13:18','YYYY-MM-DD HH24:MI:SS'),0,0,'Y',TO_DATE('2012-03-28 10:13:18','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Mar 28, 2012 10:13:18 AM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200083 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 28, 2012 10:13:19 AM COT +INSERT INTO AD_Column (DefaultValue,AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,Help,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,AD_Val_Rule_ID,IsKey,AD_Element_ID,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,CreatedBy,Updated,AD_Client_ID,AD_Org_ID,IsActive,Created,UpdatedBy) VALUES ('@#AD_Org_ID@',200084,200003,'D',1,'Y','N','N',0,'An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','N',22,'N',19,'Y',104,'N',113,'N','N','N','AD_Org_ID','Organizational entity within client','Organization',100,TO_DATE('2012-03-28 10:13:18','YYYY-MM-DD HH24:MI:SS'),0,0,'Y',TO_DATE('2012-03-28 10:13:18','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Mar 28, 2012 10:13:19 AM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200084 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 28, 2012 10:13:19 AM COT +INSERT INTO AD_Column (AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,Help,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,CreatedBy,Updated,AD_Client_ID,AD_Org_ID,IsActive,Created,UpdatedBy) VALUES (200085,200003,'D',1,'Y','N','N',0,'The Created field indicates the date that this record was created.','N',7,'N',16,'Y','N',245,'N','N','N','Created','Date this record was created','Created',100,TO_DATE('2012-03-28 10:13:19','YYYY-MM-DD HH24:MI:SS'),0,0,'Y',TO_DATE('2012-03-28 10:13:19','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Mar 28, 2012 10:13:19 AM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200085 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 28, 2012 10:13:20 AM COT +INSERT INTO AD_Column (AD_Column_ID,AD_Table_ID,EntityType,Version,AD_Reference_Value_ID,IsMandatory,IsTranslated,IsIdentifier,SeqNo,Help,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,CreatedBy,Updated,AD_Client_ID,AD_Org_ID,IsActive,Created,UpdatedBy) VALUES (200086,200003,'D',1,110,'Y','N','N',0,'The Created By field indicates the user who created this record.','N',22,'N',18,'Y','N',246,'N','N','N','CreatedBy','User who created this records','Created By',100,TO_DATE('2012-03-28 10:13:19','YYYY-MM-DD HH24:MI:SS'),0,0,'Y',TO_DATE('2012-03-28 10:13:19','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Mar 28, 2012 10:13:20 AM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200086 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 28, 2012 10:13:20 AM COT +INSERT INTO AD_Column (AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,Help,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,CreatedBy,Updated,AD_Client_ID,AD_Org_ID,IsActive,Created,UpdatedBy) VALUES (200087,200003,'D',1,'N','N','N',0,'A description is limited to 255 characters.','N',255,'Y',10,'Y','N',275,'N','Y','N','Description','Optional short description of the record','Description',100,TO_DATE('2012-03-28 10:13:20','YYYY-MM-DD HH24:MI:SS'),0,0,'Y',TO_DATE('2012-03-28 10:13:20','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Mar 28, 2012 10:13:20 AM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200087 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 28, 2012 10:13:21 AM COT +INSERT INTO AD_Column (AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,Help,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,CreatedBy,Updated,AD_Client_ID,AD_Org_ID,IsActive,Created,UpdatedBy) VALUES (200088,200003,'D',1,'N','N','N',0,'The Help field contains a hint, comment or help about the use of this item.','N',2000,'N',14,'Y','N',326,'N','Y','N','Help','Comment or Hint','Comment/Help',100,TO_DATE('2012-03-28 10:13:20','YYYY-MM-DD HH24:MI:SS'),0,0,'Y',TO_DATE('2012-03-28 10:13:20','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Mar 28, 2012 10:13:21 AM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200088 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 28, 2012 10:13:21 AM COT +INSERT INTO AD_Column (DefaultValue,AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,Help,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,CreatedBy,Updated,AD_Client_ID,AD_Org_ID,IsActive,Created,UpdatedBy) VALUES ('Y',200089,200003,'D',1,'Y','N','N',0,'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.','N',1,'N',20,'Y','N',348,'N','Y','N','IsActive','The record is active in the system','Active',100,TO_DATE('2012-03-28 10:13:21','YYYY-MM-DD HH24:MI:SS'),0,0,'Y',TO_DATE('2012-03-28 10:13:21','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Mar 28, 2012 10:13:21 AM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200089 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 28, 2012 10:13:22 AM COT +INSERT INTO AD_Element (AD_Element_ID,ColumnName,EntityType,Name,PrintName,AD_Client_ID,Created,Updated,IsActive,AD_Org_ID,CreatedBy,UpdatedBy) VALUES (200016,'AD_ToolBarButtons_ID','D','ToolBar Buttons','ToolBar Buttons',0,TO_DATE('2012-03-28 10:13:21','YYYY-MM-DD HH24:MI:SS'),TO_DATE('2012-03-28 10:13:21','YYYY-MM-DD HH24:MI:SS'),'Y',0,100,100) +; + +-- Mar 28, 2012 10:13:22 AM COT +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Help,PO_Description,PO_Help,Name,Description,PrintName,PO_PrintName,PO_Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Help,t.PO_Description,t.PO_Help,t.Name,t.Description,t.PrintName,t.PO_PrintName,t.PO_Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=200016 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID) +; + +-- Mar 28, 2012 10:13:22 AM COT +INSERT INTO AD_Column (AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Name,CreatedBy,Updated,AD_Client_ID,AD_Org_ID,IsActive,Created,UpdatedBy) VALUES (200090,200003,'D',1,'Y','N','N',0,'N',22,'N',13,'Y','Y',200016,'N','N','N','AD_ToolBarButtons_ID','ToolBar Buttons',100,TO_DATE('2012-03-28 10:13:21','YYYY-MM-DD HH24:MI:SS'),0,0,'Y',TO_DATE('2012-03-28 10:13:21','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Mar 28, 2012 10:13:22 AM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200090 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 28, 2012 10:13:23 AM COT +INSERT INTO AD_Column (AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,Help,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,CreatedBy,Updated,AD_Client_ID,AD_Org_ID,IsActive,Created,UpdatedBy) VALUES (200091,200003,'D',1,'Y','N','Y',1,'The name of an entity (record) is used as an default search option in addition to the search key. The name is up to 60 characters in length.','N',60,'Y',10,'Y','N',469,'N','Y','N','Name','Alphanumeric identifier of the entity','Name',100,TO_DATE('2012-03-28 10:13:22','YYYY-MM-DD HH24:MI:SS'),0,0,'Y',TO_DATE('2012-03-28 10:13:22','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Mar 28, 2012 10:13:23 AM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200091 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 28, 2012 10:13:23 AM COT +INSERT INTO AD_Column (AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,Help,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,CreatedBy,Updated,AD_Client_ID,AD_Org_ID,IsActive,Created,UpdatedBy) VALUES (200092,200003,'D',1,'Y','N','N',0,'The Updated field indicates the date that this record was updated.','N',7,'N',16,'Y','N',607,'N','N','N','Updated','Date this record was updated','Updated',100,TO_DATE('2012-03-28 10:13:23','YYYY-MM-DD HH24:MI:SS'),0,0,'Y',TO_DATE('2012-03-28 10:13:23','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Mar 28, 2012 10:13:23 AM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200092 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 28, 2012 10:13:24 AM COT +INSERT INTO AD_Column (AD_Column_ID,AD_Table_ID,EntityType,Version,AD_Reference_Value_ID,IsMandatory,IsTranslated,IsIdentifier,SeqNo,Help,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,CreatedBy,Updated,AD_Client_ID,AD_Org_ID,IsActive,Created,UpdatedBy) VALUES (200093,200003,'D',1,110,'Y','N','N',0,'The Updated By field indicates the user who updated this record.','N',22,'N',18,'Y','N',608,'N','N','N','UpdatedBy','User who updated this records','Updated By',100,TO_DATE('2012-03-28 10:13:23','YYYY-MM-DD HH24:MI:SS'),0,0,'Y',TO_DATE('2012-03-28 10:13:23','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Mar 28, 2012 10:13:24 AM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200093 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 28, 2012 10:13:24 AM COT +INSERT INTO AD_Column (AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,Help,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,CreatedBy,Updated,AD_Client_ID,AD_Org_ID,IsActive,Created,UpdatedBy) VALUES (200094,200003,'D',1,'Y','N','N',0,'A search key allows you a fast method of finding a particular record. +If you leave the search key empty, the system automatically creates a numeric number. The document sequence used for this fallback number is defined in the "Maintain Sequence" window with the name "DocumentNo_", where TableName is the actual name of the table (e.g. C_Order).','N',40,'Y',10,'Y','N',620,'N','Y','N','Value','Search key for the record in the format required - must be unique','Search Key',100,TO_DATE('2012-03-28 10:13:24','YYYY-MM-DD HH24:MI:SS'),0,0,'Y',TO_DATE('2012-03-28 10:13:24','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Mar 28, 2012 10:13:24 AM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200094 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 28, 2012 10:13:39 AM COT +UPDATE AD_Table SET TableName='AD_ToolBarButton', Name='ToolBar Button',Updated=TO_DATE('2012-03-28 10:13:39','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Table_ID=200003 +; + +-- Mar 28, 2012 10:13:39 AM COT +UPDATE AD_Table_Trl SET IsTranslated='N' WHERE AD_Table_ID=200003 +; + +-- Mar 28, 2012 10:13:39 AM COT +INSERT INTO AD_Sequence (IncrementNo,StartNewYear,CurrentNextSys,IsTableID,StartNo,CurrentNext,IsAudited,IsAutoSequence,AD_Sequence_ID,Description,Name,AD_Org_ID,AD_Client_ID,Updated,UpdatedBy,Created,CreatedBy,IsActive) VALUES (1,'N',50000,'Y',1000000,1000000,'N','Y',200003,'Table AD_ToolBarButton','AD_ToolBarButton',0,0,TO_DATE('2012-03-28 10:13:39','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2012-03-28 10:13:39','YYYY-MM-DD HH24:MI:SS'),100,'Y') +; + +-- Mar 28, 2012 10:13:53 AM COT +UPDATE AD_Element SET ColumnName='AD_ToolBarButton_ID', Name='ToolBar Button', PrintName='ToolBar Button',Updated=TO_DATE('2012-03-28 10:13:53','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=200016 +; + +-- Mar 28, 2012 10:13:53 AM COT +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=200016 +; + +-- Mar 28, 2012 10:13:53 AM COT +UPDATE AD_Column SET ColumnName='AD_ToolBarButton_ID', Name='ToolBar Button', Description=NULL, Help=NULL WHERE AD_Element_ID=200016 +; + +-- Mar 28, 2012 10:13:53 AM COT +UPDATE AD_Process_Para SET ColumnName='AD_ToolBarButton_ID', Name='ToolBar Button', Description=NULL, Help=NULL, AD_Element_ID=200016 WHERE UPPER(ColumnName)='AD_TOOLBARBUTTON_ID' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL +; + +-- Mar 28, 2012 10:13:53 AM COT +UPDATE AD_Process_Para SET ColumnName='AD_ToolBarButton_ID', Name='ToolBar Button', Description=NULL, Help=NULL WHERE AD_Element_ID=200016 AND IsCentrallyMaintained='Y' +; + +-- Mar 28, 2012 10:13:53 AM COT +UPDATE AD_Field SET Name='ToolBar Button', Description=NULL, Help=NULL WHERE AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=200016) AND IsCentrallyMaintained='Y' +; + +-- Mar 28, 2012 10:13:53 AM COT +UPDATE AD_PrintFormatItem pi SET PrintName='ToolBar Button', Name='ToolBar Button' WHERE IsCentrallyMaintained='Y' AND EXISTS (SELECT * FROM AD_Column c WHERE c.AD_Column_ID=pi.AD_Column_ID AND c.AD_Element_ID=200016) +; + +-- Mar 28, 2012 10:14:52 AM COT +UPDATE AD_Column SET Help='The Classname identifies the Java classname used by this report or process.', IsSelectionColumn='N', AD_Element_ID=1299, ColumnName='Classname', Description='Java Classname', Name='Classname',Updated=TO_DATE('2012-03-28 10:14:52','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200087 +; + +-- Mar 28, 2012 10:14:52 AM COT +UPDATE AD_Column_Trl SET IsTranslated='N' WHERE AD_Column_ID=200087 +; + +-- Mar 28, 2012 10:14:52 AM COT +UPDATE AD_Field SET Name='Classname', Description='Java Classname', Help='The Classname identifies the Java classname used by this report or process.' WHERE AD_Column_ID=200087 AND IsCentrallyMaintained='Y' +; + +-- Mar 28, 2012 10:15:18 AM COT +INSERT INTO AD_Element (AD_Element_ID,ColumnName,EntityType,Name,PrintName,AD_Client_ID,Created,Updated,IsActive,AD_Org_ID,CreatedBy,UpdatedBy) VALUES (200017,'ComponentName','D','Component Name','Component Name',0,TO_DATE('2012-03-28 10:15:17','YYYY-MM-DD HH24:MI:SS'),TO_DATE('2012-03-28 10:15:17','YYYY-MM-DD HH24:MI:SS'),'Y',0,100,100) +; + +-- Mar 28, 2012 10:15:18 AM COT +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Help,PO_Description,PO_Help,Name,Description,PrintName,PO_PrintName,PO_Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Help,t.PO_Description,t.PO_Help,t.Name,t.Description,t.PrintName,t.PO_PrintName,t.PO_Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=200017 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID) +; + +-- Mar 28, 2012 10:15:40 AM COT +UPDATE AD_Column SET IsMandatory='Y', Help=NULL, FieldLength=255, AD_Reference_ID=10, AD_Element_ID=200017, ColumnName='ComponentName', Description=NULL, Name='Component Name',Updated=TO_DATE('2012-03-28 10:15:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200088 +; + +-- Mar 28, 2012 10:15:40 AM COT +UPDATE AD_Column_Trl SET IsTranslated='N' WHERE AD_Column_ID=200088 +; + +-- Mar 28, 2012 10:15:40 AM COT +UPDATE AD_Field SET Name='Component Name', Description=NULL, Help=NULL WHERE AD_Column_ID=200088 AND IsCentrallyMaintained='Y' +; + +-- Mar 28, 2012 10:15:43 AM COT +UPDATE AD_Column SET IsMandatory='Y',Updated=TO_DATE('2012-03-28 10:15:43','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200087 +; + +-- Mar 28, 2012 10:16:24 AM COT +UPDATE AD_Column SET DefaultValue='N', Help='The migration "resets" the system to the current/original setting. If selected you can save the customization and re-apply it. Please note that you need to check, if your customization has no negative side effect in the new release.', FieldLength=1, IsSelectionColumn='N', AD_Reference_ID=20, AD_Element_ID=2643, ColumnName='IsCustomization', Description='The change is a customization of the data dictionary and can be applied after Migration', Name='Customization',Updated=TO_DATE('2012-03-28 10:16:24','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200094 +; + +-- Mar 28, 2012 10:16:24 AM COT +UPDATE AD_Column_Trl SET IsTranslated='N' WHERE AD_Column_ID=200094 +; + +-- Mar 28, 2012 10:16:24 AM COT +UPDATE AD_Field SET Name='Customization', Description='The change is a customization of the data dictionary and can be applied after Migration', Help='The migration "resets" the system to the current/original setting. If selected you can save the customization and re-apply it. Please note that you need to check, if your customization has no negative side effect in the new release.' WHERE AD_Column_ID=200094 AND IsCentrallyMaintained='Y' +; + +-- Mar 28, 2012 10:17:30 AM COT +INSERT INTO AD_Element (AD_Element_ID,ColumnName,EntityType,Name,Description,PrintName,AD_Client_ID,Created,Updated,IsActive,AD_Org_ID,CreatedBy,UpdatedBy) VALUES (200018,'ActionClassName','D','Action Class Name','The class name that implements the interface for toolbar actions','Action Class Name',0,TO_DATE('2012-03-28 10:17:29','YYYY-MM-DD HH24:MI:SS'),TO_DATE('2012-03-28 10:17:29','YYYY-MM-DD HH24:MI:SS'),'Y',0,100,100) +; + +-- Mar 28, 2012 10:17:30 AM COT +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Help,PO_Description,PO_Help,Name,Description,PrintName,PO_PrintName,PO_Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Help,t.PO_Description,t.PO_Help,t.Name,t.Description,t.PrintName,t.PO_PrintName,t.PO_Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=200018 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID) +; + +-- Mar 28, 2012 10:17:52 AM COT +INSERT INTO AD_Column (AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,IsAllowCopy,CreatedBy,Updated,AD_Client_ID,AD_Org_ID,IsActive,Created,UpdatedBy) VALUES (200095,200003,'D',0,'N','N','N',0,'N',255,'N',10,'N','N',200018,'N','Y','N','Y','N','ActionClassName','The class name that implements the interface for toolbar actions','Action Class Name','Y',100,TO_DATE('2012-03-28 10:17:51','YYYY-MM-DD HH24:MI:SS'),0,0,'Y',TO_DATE('2012-03-28 10:17:51','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Mar 28, 2012 10:17:52 AM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200095 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 28, 2012 10:18:46 AM COT +INSERT INTO AD_Element (AD_Element_ID,ColumnName,Help,EntityType,Name,Description,PrintName,AD_Client_ID,Created,Updated,IsActive,AD_Org_ID,CreatedBy,UpdatedBy) VALUES (200019,'ActionName','Used to get the corresponding message and Icon name prefix','D','Action Name','Action name on the toolbar','Action Name',0,TO_DATE('2012-03-28 10:18:45','YYYY-MM-DD HH24:MI:SS'),TO_DATE('2012-03-28 10:18:45','YYYY-MM-DD HH24:MI:SS'),'Y',0,100,100) +; + +-- Mar 28, 2012 10:18:46 AM COT +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Help,PO_Description,PO_Help,Name,Description,PrintName,PO_PrintName,PO_Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Help,t.PO_Description,t.PO_Help,t.Name,t.Description,t.PrintName,t.PO_PrintName,t.PO_Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=200019 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID) +; + +-- Mar 28, 2012 10:19:02 AM COT +INSERT INTO AD_Column (AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,Help,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,IsAllowCopy,CreatedBy,Updated,AD_Client_ID,AD_Org_ID,IsActive,Created,UpdatedBy) VALUES (200096,200003,'D',0,'N','N','N',0,'Used to get the corresponding message and Icon name prefix','N',60,'N',10,'N','N',200019,'N','Y','N','Y','N','ActionName','Action name on the toolbar','Action Name','Y',100,TO_DATE('2012-03-28 10:19:01','YYYY-MM-DD HH24:MI:SS'),0,0,'Y',TO_DATE('2012-03-28 10:19:01','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Mar 28, 2012 10:19:02 AM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200096 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 28, 2012 10:20:14 AM COT +INSERT INTO AD_Element (AD_Element_ID,ColumnName,EntityType,Name,Description,PrintName,AD_Client_ID,Created,Updated,IsActive,AD_Org_ID,CreatedBy,UpdatedBy) VALUES (200020,'KeyStroke_KeyCode','D','KeyCode','KeyCode for shortcuts','KeyCode',0,TO_DATE('2012-03-28 10:20:13','YYYY-MM-DD HH24:MI:SS'),TO_DATE('2012-03-28 10:20:13','YYYY-MM-DD HH24:MI:SS'),'Y',0,100,100) +; + +-- Mar 28, 2012 10:20:14 AM COT +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Help,PO_Description,PO_Help,Name,Description,PrintName,PO_PrintName,PO_Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Help,t.PO_Description,t.PO_Help,t.Name,t.Description,t.PrintName,t.PO_PrintName,t.PO_Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=200020 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID) +; + +-- Mar 28, 2012 10:20:33 AM COT +INSERT INTO AD_Element (AD_Element_ID,ColumnName,EntityType,Name,Description,PrintName,AD_Client_ID,Created,Updated,IsActive,AD_Org_ID,CreatedBy,UpdatedBy) VALUES (200021,'KeyStroke_Modifiers','D','Keystroke Modifiers','Keystroke Modifiers for shortcuts','Keystroke Modifiers',0,TO_DATE('2012-03-28 10:20:33','YYYY-MM-DD HH24:MI:SS'),TO_DATE('2012-03-28 10:20:33','YYYY-MM-DD HH24:MI:SS'),'Y',0,100,100) +; + +-- Mar 28, 2012 10:20:33 AM COT +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Help,PO_Description,PO_Help,Name,Description,PrintName,PO_PrintName,PO_Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Help,t.PO_Description,t.PO_Help,t.Name,t.Description,t.PrintName,t.PO_PrintName,t.PO_Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=200021 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID) +; + +-- Mar 28, 2012 10:20:51 AM COT +INSERT INTO AD_Column (AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,IsAllowCopy,CreatedBy,Updated,AD_Client_ID,AD_Org_ID,IsActive,Created,UpdatedBy) VALUES (200097,200003,'D',0,'N','N','N',0,'N',10,'N',11,'N','N',200020,'N','Y','N','Y','N','KeyStroke_KeyCode','KeyCode for shortcuts','KeyCode','Y',100,TO_DATE('2012-03-28 10:20:51','YYYY-MM-DD HH24:MI:SS'),0,0,'Y',TO_DATE('2012-03-28 10:20:51','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Mar 28, 2012 10:20:51 AM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200097 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 28, 2012 10:21:05 AM COT +INSERT INTO AD_Column (AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,IsAllowCopy,CreatedBy,Updated,AD_Client_ID,AD_Org_ID,IsActive,Created,UpdatedBy) VALUES (200098,200003,'D',0,'N','N','N',0,'N',10,'N',11,'N','N',200021,'N','Y','N','Y','N','KeyStroke_Modifiers','Keystroke Modifiers for shortcuts','Keystroke Modifiers','Y',100,TO_DATE('2012-03-28 10:21:05','YYYY-MM-DD HH24:MI:SS'),0,0,'Y',TO_DATE('2012-03-28 10:21:05','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Mar 28, 2012 10:21:05 AM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200098 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 28, 2012 10:21:24 AM COT +CREATE TABLE AD_ToolBarButton (ActionClassName NVARCHAR2(255) DEFAULT NULL , ActionName NVARCHAR2(60) DEFAULT NULL , AD_Client_ID NUMBER(10) NOT NULL, AD_Org_ID NUMBER(10) NOT NULL, AD_ToolBarButton_ID NUMBER(10) NOT NULL, Classname NVARCHAR2(255) NOT NULL, ComponentName NVARCHAR2(255) NOT NULL, Created DATE NOT NULL, CreatedBy NUMBER(10) NOT NULL, IsActive CHAR(1) DEFAULT 'Y' CHECK (IsActive IN ('Y','N')) NOT NULL, IsCustomization CHAR(1) DEFAULT 'N' CHECK (IsCustomization IN ('Y','N')) NOT NULL, KeyStroke_KeyCode NUMBER(10) DEFAULT NULL , KeyStroke_Modifiers NUMBER(10) DEFAULT NULL , Name NVARCHAR2(60) NOT NULL, Updated DATE NOT NULL, UpdatedBy NUMBER(10) NOT NULL, CONSTRAINT AD_ToolBarButton_Key PRIMARY KEY (AD_ToolBarButton_ID)) +; + +-- Mar 28, 2012 10:22:18 AM COT +INSERT INTO AD_Window (AD_Window_ID,WindowType,IsSOTrx,IsDefault,IsBetaFunctionality,WinHeight,WinWidth,EntityType,Name,IsActive,Created,UpdatedBy,CreatedBy,Updated,AD_Org_ID,AD_Client_ID,Processing) VALUES (200000,'M','Y','N','N',0,0,'D','ToolBar Button','Y',TO_DATE('2012-03-28 10:22:18','YYYY-MM-DD HH24:MI:SS'),100,100,TO_DATE('2012-03-28 10:22:18','YYYY-MM-DD HH24:MI:SS'),0,0,'N') +; + +-- Mar 28, 2012 10:22:19 AM COT +INSERT INTO AD_Window_Trl (AD_Language,AD_Window_ID, Help,Name,Description, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Window_ID, t.Help,t.Name,t.Description, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Window t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Window_ID=200000 AND NOT EXISTS (SELECT * FROM AD_Window_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Window_ID=t.AD_Window_ID) +; + +-- Mar 28, 2012 10:22:27 AM COT +UPDATE AD_Table SET AD_Window_ID=200000,Updated=TO_DATE('2012-03-28 10:22:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Table_ID=200003 +; + +-- Mar 28, 2012 10:23:18 AM COT +INSERT INTO AD_Tab (IsSingleRow,AD_Window_ID,SeqNo,IsTranslationTab,IsSortTab,AD_Table_ID,AD_Tab_ID,ImportFields,HasTree,IsInfoTab,IsReadOnly,TabLevel,IsInsertRecord,IsAdvancedTab,EntityType,Name,AD_Client_ID,AD_Org_ID,Created,CreatedBy,Updated,IsActive,UpdatedBy,Processing) VALUES ('Y',200000,10,'N','N',200003,200002,'N','N','N','N',0,'Y','N','D','ToolBar Button',0,0,TO_DATE('2012-03-28 10:23:17','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2012-03-28 10:23:17','YYYY-MM-DD HH24:MI:SS'),'Y',100,'N') +; + +-- Mar 28, 2012 10:23:18 AM COT +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) 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 FROM AD_Language l, AD_Tab t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Tab_ID=200002 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) +; + +-- Mar 28, 2012 10:23:21 AM COT +INSERT INTO AD_Field (IsEncrypted,DisplayLength,IsDisplayed,IsSameLine,IsHeading,AD_Column_ID,IsFieldOnly,IsCentrallyMaintained,AD_Tab_ID,AD_Field_ID,IsReadOnly,EntityType,Description,Name,UpdatedBy,AD_Org_ID,IsActive,Created,AD_Client_ID,CreatedBy,Updated) VALUES ('N',255,'Y','N','N',200095,'N','Y',200002,200051,'N','D','The class name that implements the interface for toolbar actions','Action Class Name',100,0,'Y',TO_DATE('2012-03-28 10:23:20','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2012-03-28 10:23:20','YYYY-MM-DD HH24:MI:SS')) +; + +-- Mar 28, 2012 10:23:21 AM COT +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) 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 FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200051 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Mar 28, 2012 10:23:22 AM COT +INSERT INTO AD_Field (IsEncrypted,DisplayLength,IsDisplayed,IsSameLine,IsHeading,AD_Column_ID,IsFieldOnly,IsCentrallyMaintained,AD_Tab_ID,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,UpdatedBy,AD_Org_ID,IsActive,Created,AD_Client_ID,CreatedBy,Updated) VALUES ('N',60,'Y','N','N',200096,'N','Y',200002,200052,'N','Used to get the corresponding message and Icon name prefix','D','Action name on the toolbar','Action Name',100,0,'Y',TO_DATE('2012-03-28 10:23:21','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2012-03-28 10:23:21','YYYY-MM-DD HH24:MI:SS')) +; + +-- Mar 28, 2012 10:23:22 AM COT +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) 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 FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200052 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Mar 28, 2012 10:23:22 AM COT +INSERT INTO AD_Field (IsEncrypted,DisplayLength,IsDisplayed,IsSameLine,IsHeading,AD_Column_ID,IsFieldOnly,IsCentrallyMaintained,AD_Tab_ID,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,UpdatedBy,AD_Org_ID,IsActive,Created,AD_Client_ID,CreatedBy,Updated) VALUES ('N',1,'Y','N','N',200089,'N','Y',200002,200053,'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',100,0,'Y',TO_DATE('2012-03-28 10:23:22','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2012-03-28 10:23:22','YYYY-MM-DD HH24:MI:SS')) +; + +-- Mar 28, 2012 10:23:22 AM COT +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) 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 FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200053 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Mar 28, 2012 10:23:23 AM COT +INSERT INTO AD_Field (IsEncrypted,DisplayLength,IsDisplayed,IsSameLine,IsHeading,AD_Column_ID,IsFieldOnly,IsCentrallyMaintained,AD_Tab_ID,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,UpdatedBy,AD_Org_ID,IsActive,Created,AD_Client_ID,CreatedBy,Updated) VALUES ('N',255,'Y','N','N',200087,'N','Y',200002,200054,'N','The Classname identifies the Java classname used by this report or process.','D','Java Classname','Classname',100,0,'Y',TO_DATE('2012-03-28 10:23:22','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2012-03-28 10:23:22','YYYY-MM-DD HH24:MI:SS')) +; + +-- Mar 28, 2012 10:23:23 AM COT +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) 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 FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200054 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Mar 28, 2012 10:23:23 AM COT +INSERT INTO AD_Field (IsEncrypted,DisplayLength,IsDisplayed,IsSameLine,IsHeading,AD_Column_ID,IsFieldOnly,IsCentrallyMaintained,AD_Tab_ID,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,UpdatedBy,AD_Org_ID,IsActive,Created,AD_Client_ID,CreatedBy,Updated) VALUES ('N',22,'Y','N','N',200083,'N','Y',200002,200055,'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',100,0,'Y',TO_DATE('2012-03-28 10:23:23','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2012-03-28 10:23:23','YYYY-MM-DD HH24:MI:SS')) +; + +-- Mar 28, 2012 10:23:23 AM COT +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) 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 FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200055 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Mar 28, 2012 10:23:23 AM COT +INSERT INTO AD_Field (IsEncrypted,DisplayLength,IsDisplayed,IsSameLine,IsHeading,AD_Column_ID,IsFieldOnly,IsCentrallyMaintained,AD_Tab_ID,AD_Field_ID,IsReadOnly,EntityType,Name,UpdatedBy,AD_Org_ID,IsActive,Created,AD_Client_ID,CreatedBy,Updated) VALUES ('N',255,'Y','N','N',200088,'N','Y',200002,200056,'N','D','Component Name',100,0,'Y',TO_DATE('2012-03-28 10:23:23','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2012-03-28 10:23:23','YYYY-MM-DD HH24:MI:SS')) +; + +-- Mar 28, 2012 10:23:23 AM COT +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) 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 FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200056 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Mar 28, 2012 10:23:24 AM COT +INSERT INTO AD_Field (IsEncrypted,DisplayLength,IsDisplayed,IsSameLine,IsHeading,AD_Column_ID,IsFieldOnly,IsCentrallyMaintained,AD_Tab_ID,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,UpdatedBy,AD_Org_ID,IsActive,Created,AD_Client_ID,CreatedBy,Updated) VALUES ('N',1,'Y','N','N',200094,'N','Y',200002,200057,'N','The migration "resets" the system to the current/original setting. If selected you can save the customization and re-apply it. Please note that you need to check, if your customization has no negative side effect in the new release.','D','The change is a customization of the data dictionary and can be applied after Migration','Customization',100,0,'Y',TO_DATE('2012-03-28 10:23:23','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2012-03-28 10:23:23','YYYY-MM-DD HH24:MI:SS')) +; + +-- Mar 28, 2012 10:23:24 AM COT +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) 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 FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200057 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Mar 28, 2012 10:23:24 AM COT +INSERT INTO AD_Field (IsEncrypted,DisplayLength,IsDisplayed,IsSameLine,IsHeading,AD_Column_ID,IsFieldOnly,IsCentrallyMaintained,AD_Tab_ID,AD_Field_ID,IsReadOnly,EntityType,Description,Name,UpdatedBy,AD_Org_ID,IsActive,Created,AD_Client_ID,CreatedBy,Updated) VALUES ('N',10,'Y','N','N',200097,'N','Y',200002,200058,'N','D','KeyCode for shortcuts','KeyCode',100,0,'Y',TO_DATE('2012-03-28 10:23:24','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2012-03-28 10:23:24','YYYY-MM-DD HH24:MI:SS')) +; + +-- Mar 28, 2012 10:23:24 AM COT +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) 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 FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200058 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Mar 28, 2012 10:23:25 AM COT +INSERT INTO AD_Field (IsEncrypted,DisplayLength,IsDisplayed,IsSameLine,IsHeading,AD_Column_ID,IsFieldOnly,IsCentrallyMaintained,AD_Tab_ID,AD_Field_ID,IsReadOnly,EntityType,Description,Name,UpdatedBy,AD_Org_ID,IsActive,Created,AD_Client_ID,CreatedBy,Updated) VALUES ('N',10,'Y','N','N',200098,'N','Y',200002,200059,'N','D','Keystroke Modifiers for shortcuts','Keystroke Modifiers',100,0,'Y',TO_DATE('2012-03-28 10:23:24','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2012-03-28 10:23:24','YYYY-MM-DD HH24:MI:SS')) +; + +-- Mar 28, 2012 10:23:25 AM COT +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) 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 FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200059 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Mar 28, 2012 10:23:25 AM COT +INSERT INTO AD_Field (IsEncrypted,DisplayLength,IsDisplayed,IsSameLine,IsHeading,AD_Column_ID,IsFieldOnly,IsCentrallyMaintained,AD_Tab_ID,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,UpdatedBy,AD_Org_ID,IsActive,Created,AD_Client_ID,CreatedBy,Updated) VALUES ('N',60,'Y','N','N',200091,'N','Y',200002,200060,'N','The name of an entity (record) is used as an default search option in addition to the search key. The name is up to 60 characters in length.','D','Alphanumeric identifier of the entity','Name',100,0,'Y',TO_DATE('2012-03-28 10:23:25','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2012-03-28 10:23:25','YYYY-MM-DD HH24:MI:SS')) +; + +-- Mar 28, 2012 10:23:25 AM COT +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) 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 FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200060 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Mar 28, 2012 10:23:26 AM COT +INSERT INTO AD_Field (IsEncrypted,DisplayLength,IsDisplayed,IsSameLine,IsHeading,AD_Column_ID,IsFieldOnly,IsCentrallyMaintained,AD_Tab_ID,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,UpdatedBy,AD_Org_ID,IsActive,Created,AD_Client_ID,CreatedBy,Updated) VALUES ('N',22,'Y','N','N',200084,'N','Y',200002,200061,'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',100,0,'Y',TO_DATE('2012-03-28 10:23:25','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2012-03-28 10:23:25','YYYY-MM-DD HH24:MI:SS')) +; + +-- Mar 28, 2012 10:23:26 AM COT +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) 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 FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200061 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Mar 28, 2012 10:23:26 AM COT +INSERT INTO AD_Field (IsEncrypted,DisplayLength,IsDisplayed,IsSameLine,IsHeading,AD_Column_ID,IsFieldOnly,IsCentrallyMaintained,AD_Tab_ID,AD_Field_ID,IsReadOnly,EntityType,Name,UpdatedBy,AD_Org_ID,IsActive,Created,AD_Client_ID,CreatedBy,Updated) VALUES ('N',22,'N','N','N',200090,'N','Y',200002,200062,'N','D','ToolBar Button',100,0,'Y',TO_DATE('2012-03-28 10:23:26','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2012-03-28 10:23:26','YYYY-MM-DD HH24:MI:SS')) +; + +-- Mar 28, 2012 10:23:26 AM COT +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) 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 FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200062 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Mar 28, 2012 10:24:08 AM COT +UPDATE AD_Field SET SeqNo=10,IsDisplayed='Y' WHERE AD_Field_ID=200055 +; + +-- Mar 28, 2012 10:24:08 AM COT +UPDATE AD_Field SET SeqNo=20,IsDisplayed='Y' WHERE AD_Field_ID=200061 +; + +-- Mar 28, 2012 10:24:08 AM COT +UPDATE AD_Field SET SeqNo=30,IsDisplayed='Y' WHERE AD_Field_ID=200060 +; + +-- Mar 28, 2012 10:24:08 AM COT +UPDATE AD_Field SET SeqNo=40,IsDisplayed='Y' WHERE AD_Field_ID=200054 +; + +-- Mar 28, 2012 10:24:08 AM COT +UPDATE AD_Field SET SeqNo=50,IsDisplayed='Y' WHERE AD_Field_ID=200056 +; + +-- Mar 28, 2012 10:24:08 AM COT +UPDATE AD_Field SET SeqNo=60,IsDisplayed='Y' WHERE AD_Field_ID=200057 +; + +-- Mar 28, 2012 10:24:08 AM COT +UPDATE AD_Field SET SeqNo=70,IsDisplayed='Y' WHERE AD_Field_ID=200051 +; + +-- Mar 28, 2012 10:24:08 AM COT +UPDATE AD_Field SET SeqNo=80,IsDisplayed='Y' WHERE AD_Field_ID=200052 +; + +-- Mar 28, 2012 10:24:08 AM COT +UPDATE AD_Field SET SeqNo=90,IsDisplayed='Y' WHERE AD_Field_ID=200058 +; + +-- Mar 28, 2012 10:24:08 AM COT +UPDATE AD_Field SET SeqNo=100,IsDisplayed='Y' WHERE AD_Field_ID=200059 +; + +-- Mar 28, 2012 10:24:08 AM COT +UPDATE AD_Field SET SeqNo=110,IsDisplayed='Y' WHERE AD_Field_ID=200053 +; + +-- Mar 28, 2012 10:24:17 AM COT +UPDATE AD_Field SET IsSameLine='Y',Updated=TO_DATE('2012-03-28 10:24:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200061 +; + +-- Mar 28, 2012 10:25:03 AM COT +UPDATE AD_Field SET DisplayLogic='@IsCustomization@=Y',Updated=TO_DATE('2012-03-28 10:25:03','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200051 +; + +-- Mar 28, 2012 10:25:06 AM COT +UPDATE AD_Field SET DisplayLogic='@IsCustomization@=Y',Updated=TO_DATE('2012-03-28 10:25:06','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200052 +; + +-- Mar 28, 2012 10:25:08 AM COT +UPDATE AD_Field SET DisplayLogic='@IsCustomization@=Y',Updated=TO_DATE('2012-03-28 10:25:08','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200058 +; + +-- Mar 28, 2012 10:25:12 AM COT +UPDATE AD_Field SET IsSameLine='Y', DisplayLogic='@IsCustomization@=Y',Updated=TO_DATE('2012-03-28 10:25:12','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200059 +; + +-- Mar 28, 2012 10:25:49 AM COT +INSERT INTO AD_Menu (AD_Window_ID,AD_Menu_ID,IsSummary,Action,IsSOTrx,IsReadOnly,EntityType,IsCentrallyMaintained,Name,Created,IsActive,UpdatedBy,AD_Client_ID,CreatedBy,Updated,AD_Org_ID) VALUES (200000,200000,'N','W','N','N','D','Y','ToolBar Button',TO_DATE('2012-03-28 10:25:48','YYYY-MM-DD HH24:MI:SS'),'Y',100,0,100,TO_DATE('2012-03-28 10:25:48','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Mar 28, 2012 10:25:49 AM COT +INSERT INTO AD_Menu_Trl (AD_Language,AD_Menu_ID, Name,Description, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Menu_ID, t.Name,t.Description, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Menu t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Menu_ID=200000 AND NOT EXISTS (SELECT * FROM AD_Menu_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Menu_ID=t.AD_Menu_ID) +; + +-- Mar 28, 2012 10:25:49 AM COT +INSERT INTO AD_TreeNodeMM (AD_Client_ID,AD_Org_ID, IsActive,Created,CreatedBy,Updated,UpdatedBy, AD_Tree_ID, Node_ID, Parent_ID, SeqNo) SELECT t.AD_Client_ID, 0, 'Y', SysDate, 100, SysDate, 100,t.AD_Tree_ID, 200000, 0, 999 FROM AD_Tree t WHERE t.AD_Client_ID=0 AND t.IsActive='Y' AND t.IsAllNodes='Y' AND t.TreeType='MM' AND NOT EXISTS (SELECT * FROM AD_TreeNodeMM e WHERE e.AD_Tree_ID=t.AD_Tree_ID AND Node_ID=200000) +; + +-- Mar 28, 2012 10:26:06 AM COT +UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=0, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=53203 +; + +-- Mar 28, 2012 10:26:06 AM COT +UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=1, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=586 +; + +-- Mar 28, 2012 10:26:06 AM COT +UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=2, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=138 +; + +-- Mar 28, 2012 10:26:06 AM COT +UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=3, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=139 +; + +-- Mar 28, 2012 10:26:06 AM COT +UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=4, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=249 +; + +-- Mar 28, 2012 10:26:06 AM COT +UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=5, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=141 +; + +-- Mar 28, 2012 10:26:06 AM COT +UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=6, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=300 +; + +-- Mar 28, 2012 10:26:06 AM COT +UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=7, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=589 +; + +-- Mar 28, 2012 10:26:06 AM COT +UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=8, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=200000 +; + +-- Mar 28, 2012 10:26:06 AM COT +UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=9, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=295 +; + +-- Mar 28, 2012 10:26:06 AM COT +UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=10, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=216 +; + +-- Mar 28, 2012 10:26:06 AM COT +UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=11, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=140 +; + +-- Mar 28, 2012 10:26:06 AM COT +UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=12, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=142 +; + +-- Mar 28, 2012 10:26:06 AM COT +UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=13, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=53012 +; + +-- Mar 28, 2012 10:26:06 AM COT +UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=14, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=143 +; + +-- Mar 28, 2012 10:26:06 AM COT +UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=15, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=201 +; + +-- Mar 28, 2012 10:26:06 AM COT +UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=16, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=176 +; + +-- Mar 28, 2012 10:26:06 AM COT +UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=17, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=53086 +; + +-- Mar 28, 2012 10:26:06 AM COT +UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=18, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=239 +; + +-- Mar 28, 2012 10:26:06 AM COT +UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=19, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=517 +; + +-- Mar 28, 2012 10:26:06 AM COT +UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=20, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=499 +; + +-- Mar 28, 2012 10:26:06 AM COT +UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=21, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=53089 +; + +-- Mar 28, 2012 10:26:06 AM COT +UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=22, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=53090 +; + +-- Mar 28, 2012 10:26:06 AM COT +UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=23, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=50001 +; + +-- Mar 28, 2012 10:49:55 AM COT +UPDATE AD_Column SET IsAllowCopy='N',Updated=TO_DATE('2012-03-28 10:49:55','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200083 +; + +-- Mar 28, 2012 10:50:25 AM COT +UPDATE AD_Column SET IsAllowCopy='N',Updated=TO_DATE('2012-03-28 10:50:25','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200084 +; + +-- Mar 28, 2012 10:50:26 AM COT +UPDATE AD_Column SET IsAllowCopy='N',Updated=TO_DATE('2012-03-28 10:50:26','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200085 +; + +-- Mar 28, 2012 10:50:37 AM COT +UPDATE AD_Column SET IsAllowCopy='N',Updated=TO_DATE('2012-03-28 10:50:37','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200086 +; + +-- Mar 28, 2012 10:50:39 AM COT +UPDATE AD_Column SET IsAllowCopy='N',Updated=TO_DATE('2012-03-28 10:50:39','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200089 +; + +-- Mar 28, 2012 10:50:43 AM COT +UPDATE AD_Column SET IsUpdateable='N', IsAllowCopy='N',Updated=TO_DATE('2012-03-28 10:50:43','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200090 +; + +-- Mar 28, 2012 10:50:44 AM COT +UPDATE AD_Column SET IsAllowCopy='N',Updated=TO_DATE('2012-03-28 10:50:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200092 +; + +-- Mar 28, 2012 10:50:46 AM COT +UPDATE AD_Column SET IsAllowCopy='N',Updated=TO_DATE('2012-03-28 10:50:46','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200093 +; + +-- Mar 28, 2012 10:33:16 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_DATE('2012-03-28 10:33:16','YYYY-MM-DD HH24:MI:SS'),100,'Ignore','Y','Window - Ignore',TO_DATE('2012-03-28 10:33:16','YYYY-MM-DD HH24:MI:SS'),100,200000,'org.compiere.apps.APanel','N',0,0) +; + +-- Mar 28, 2012 11:08:13 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_DATE('2012-03-28 11:08:12','YYYY-MM-DD HH24:MI:SS'),100,'Help','Y','Window - Help',TO_DATE('2012-03-28 11:08:12','YYYY-MM-DD HH24:MI:SS'),100,200001,'org.compiere.apps.APanel','N',0,0) +; + +-- Mar 28, 2012 11:09:27 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_DATE('2012-03-28 11:09:26','YYYY-MM-DD HH24:MI:SS'),100,'New','Y','Window - New',TO_DATE('2012-03-28 11:09:26','YYYY-MM-DD HH24:MI:SS'),100,200002,'org.compiere.apps.APanel','N',0,0) +; + +-- Mar 28, 2012 11:09:36 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_DATE('2012-03-28 11:09:36','YYYY-MM-DD HH24:MI:SS'),100,'Copy','Y','Window - Copy',TO_DATE('2012-03-28 11:09:36','YYYY-MM-DD HH24:MI:SS'),100,200003,'org.compiere.apps.APanel','N',0,0) +; + +-- Mar 28, 2012 11:09:43 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_DATE('2012-03-28 11:09:43','YYYY-MM-DD HH24:MI:SS'),100,'Delete','Y','Window - Delete',TO_DATE('2012-03-28 11:09:43','YYYY-MM-DD HH24:MI:SS'),100,200004,'org.compiere.apps.APanel','N',0,0) +; + +-- Mar 28, 2012 11:09:52 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_DATE('2012-03-28 11:09:52','YYYY-MM-DD HH24:MI:SS'),100,'DeleteSelection','Y','Window - DeleteSelection',TO_DATE('2012-03-28 11:09:52','YYYY-MM-DD HH24:MI:SS'),100,200005,'org.compiere.apps.APanel','N',0,0) +; + +-- Mar 28, 2012 11:10:01 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_DATE('2012-03-28 11:10:01','YYYY-MM-DD HH24:MI:SS'),100,'Save','Y','Window - Save',TO_DATE('2012-03-28 11:10:01','YYYY-MM-DD HH24:MI:SS'),100,200006,'org.compiere.apps.APanel','N',0,0) +; + +-- Mar 28, 2012 11:10:12 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_DATE('2012-03-28 11:10:11','YYYY-MM-DD HH24:MI:SS'),100,'Refresh','Y','Window - Refresh',TO_DATE('2012-03-28 11:10:11','YYYY-MM-DD HH24:MI:SS'),100,200007,'org.compiere.apps.APanel','N',0,0) +; + +-- Mar 28, 2012 11:10:19 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_DATE('2012-03-28 11:10:18','YYYY-MM-DD HH24:MI:SS'),100,'Find','Y','Window - Find',TO_DATE('2012-03-28 11:10:18','YYYY-MM-DD HH24:MI:SS'),100,200008,'org.compiere.apps.APanel','N',0,0) +; + +-- Mar 28, 2012 11:10:25 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_DATE('2012-03-28 11:10:25','YYYY-MM-DD HH24:MI:SS'),100,'Attachment','Y','Window - Attachment',TO_DATE('2012-03-28 11:10:25','YYYY-MM-DD HH24:MI:SS'),100,200009,'org.compiere.apps.APanel','N',0,0) +; + +-- Mar 28, 2012 11:10:31 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_DATE('2012-03-28 11:10:31','YYYY-MM-DD HH24:MI:SS'),100,'Chat','Y','Window - Chat',TO_DATE('2012-03-28 11:10:31','YYYY-MM-DD HH24:MI:SS'),100,200010,'org.compiere.apps.APanel','N',0,0) +; + +-- Mar 28, 2012 11:10:39 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_DATE('2012-03-28 11:10:39','YYYY-MM-DD HH24:MI:SS'),100,'Multi','Y','Window - Multi',TO_DATE('2012-03-28 11:10:39','YYYY-MM-DD HH24:MI:SS'),100,200011,'org.compiere.apps.APanel','N',0,0) +; + +-- Mar 28, 2012 11:10:45 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_DATE('2012-03-28 11:10:44','YYYY-MM-DD HH24:MI:SS'),100,'History','Y','Window - History',TO_DATE('2012-03-28 11:10:44','YYYY-MM-DD HH24:MI:SS'),100,200012,'org.compiere.apps.APanel','N',0,0) +; + +-- Mar 28, 2012 11:10:49 AM COT +UPDATE AD_ToolBarButton SET ComponentName='Home', Name='Window - Home',Updated=TO_DATE('2012-03-28 11:10:49','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_ToolBarButton_ID=200012 +; + +-- Mar 28, 2012 11:10:55 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_DATE('2012-03-28 11:10:55','YYYY-MM-DD HH24:MI:SS'),100,'Parent','Y','Window - Parent',TO_DATE('2012-03-28 11:10:55','YYYY-MM-DD HH24:MI:SS'),100,200013,'org.compiere.apps.APanel','N',0,0) +; + +-- Mar 28, 2012 11:11:02 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_DATE('2012-03-28 11:11:01','YYYY-MM-DD HH24:MI:SS'),100,'Detail','Y','Window - Detail',TO_DATE('2012-03-28 11:11:01','YYYY-MM-DD HH24:MI:SS'),100,200014,'org.compiere.apps.APanel','N',0,0) +; + +-- Mar 28, 2012 11:11:07 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_DATE('2012-03-28 11:11:07','YYYY-MM-DD HH24:MI:SS'),100,'First','Y','Window - First',TO_DATE('2012-03-28 11:11:07','YYYY-MM-DD HH24:MI:SS'),100,200015,'org.compiere.apps.APanel','N',0,0) +; + +-- Mar 28, 2012 11:11:13 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_DATE('2012-03-28 11:11:13','YYYY-MM-DD HH24:MI:SS'),100,'Previous','Y','Window - Previous',TO_DATE('2012-03-28 11:11:13','YYYY-MM-DD HH24:MI:SS'),100,200016,'org.compiere.apps.APanel','N',0,0) +; + +-- Mar 28, 2012 11:11:20 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_DATE('2012-03-28 11:11:19','YYYY-MM-DD HH24:MI:SS'),100,'Next','Y','Window - Next',TO_DATE('2012-03-28 11:11:19','YYYY-MM-DD HH24:MI:SS'),100,200017,'org.compiere.apps.APanel','N',0,0) +; + +-- Mar 28, 2012 11:11:26 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_DATE('2012-03-28 11:11:25','YYYY-MM-DD HH24:MI:SS'),100,'Last','Y','Window - Last',TO_DATE('2012-03-28 11:11:25','YYYY-MM-DD HH24:MI:SS'),100,200018,'org.compiere.apps.APanel','N',0,0) +; + +-- Mar 28, 2012 11:11:31 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_DATE('2012-03-28 11:11:31','YYYY-MM-DD HH24:MI:SS'),100,'Report','Y','Window - Report',TO_DATE('2012-03-28 11:11:31','YYYY-MM-DD HH24:MI:SS'),100,200019,'org.compiere.apps.APanel','N',0,0) +; + +-- Mar 28, 2012 11:11:37 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_DATE('2012-03-28 11:11:36','YYYY-MM-DD HH24:MI:SS'),100,'Archive','Y','Window - Archive',TO_DATE('2012-03-28 11:11:36','YYYY-MM-DD HH24:MI:SS'),100,200020,'org.compiere.apps.APanel','N',0,0) +; + +-- Mar 28, 2012 11:11:43 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_DATE('2012-03-28 11:11:42','YYYY-MM-DD HH24:MI:SS'),100,'PrintPreview','Y','Window - PrintPreview',TO_DATE('2012-03-28 11:11:42','YYYY-MM-DD HH24:MI:SS'),100,200021,'org.compiere.apps.APanel','N',0,0) +; + +-- Mar 28, 2012 11:11:49 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_DATE('2012-03-28 11:11:49','YYYY-MM-DD HH24:MI:SS'),100,'Print','Y','Window - Print',TO_DATE('2012-03-28 11:11:49','YYYY-MM-DD HH24:MI:SS'),100,200022,'org.compiere.apps.APanel','N',0,0) +; + +-- Mar 28, 2012 11:11:56 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_DATE('2012-03-28 11:11:56','YYYY-MM-DD HH24:MI:SS'),100,'ZoomAcross','Y','Window - ZoomAcross',TO_DATE('2012-03-28 11:11:56','YYYY-MM-DD HH24:MI:SS'),100,200023,'org.compiere.apps.APanel','N',0,0) +; + +-- Mar 28, 2012 11:12:02 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_DATE('2012-03-28 11:12:02','YYYY-MM-DD HH24:MI:SS'),100,'WorkFlow','Y','Window - WorkFlow',TO_DATE('2012-03-28 11:12:02','YYYY-MM-DD HH24:MI:SS'),100,200024,'org.compiere.apps.APanel','N',0,0) +; + +-- Mar 28, 2012 11:12:08 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_DATE('2012-03-28 11:12:07','YYYY-MM-DD HH24:MI:SS'),100,'Request','Y','Window - Request',TO_DATE('2012-03-28 11:12:07','YYYY-MM-DD HH24:MI:SS'),100,200025,'org.compiere.apps.APanel','N',0,0) +; + +-- Mar 28, 2012 11:12:14 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_DATE('2012-03-28 11:12:13','YYYY-MM-DD HH24:MI:SS'),100,'InfoProduct','Y','Window - InfoProduct',TO_DATE('2012-03-28 11:12:13','YYYY-MM-DD HH24:MI:SS'),100,200026,'org.compiere.apps.APanel','N',0,0) +; + +-- Mar 28, 2012 11:12:20 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_DATE('2012-03-28 11:12:19','YYYY-MM-DD HH24:MI:SS'),100,'End','Y','Window - End',TO_DATE('2012-03-28 11:12:19','YYYY-MM-DD HH24:MI:SS'),100,200027,'org.compiere.apps.APanel','N',0,0) +; + +-- Mar 28, 2012 11:15:27 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_DATE('2012-03-28 11:15:27','YYYY-MM-DD HH24:MI:SS'),100,'Lock','Y','Window - Lock',TO_DATE('2012-03-28 11:15:27','YYYY-MM-DD HH24:MI:SS'),100,200028,'org.compiere.apps.APanel','N',0,0) +; + +-- Mar 28, 2012 11:16:00 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_DATE('2012-03-28 11:16:00','YYYY-MM-DD HH24:MI:SS'),100,'Ignore','Y','zk Window - Ignore',TO_DATE('2012-03-28 11:16:00','YYYY-MM-DD HH24:MI:SS'),100,200029,'org.adempiere.webui.component.CWindowToolbar','N',0,0) +; + +-- Mar 28, 2012 11:16:41 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_DATE('2012-03-28 11:16:41','YYYY-MM-DD HH24:MI:SS'),100,'Help','Y','zk Window - Help',TO_DATE('2012-03-28 11:16:41','YYYY-MM-DD HH24:MI:SS'),100,200030,'org.adempiere.webui.component.CWindowToolbar','N',0,0) +; + +-- Mar 28, 2012 11:16:50 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_DATE('2012-03-28 11:16:50','YYYY-MM-DD HH24:MI:SS'),100,'New','Y','zk Window - New',TO_DATE('2012-03-28 11:16:50','YYYY-MM-DD HH24:MI:SS'),100,200031,'org.adempiere.webui.component.CWindowToolbar','N',0,0) +; + +-- Mar 28, 2012 11:16:59 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_DATE('2012-03-28 11:16:58','YYYY-MM-DD HH24:MI:SS'),100,'Copy','Y','zk Window - Copy',TO_DATE('2012-03-28 11:16:58','YYYY-MM-DD HH24:MI:SS'),100,200032,'org.adempiere.webui.component.CWindowToolbar','N',0,0) +; + +-- Mar 28, 2012 11:17:09 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_DATE('2012-03-28 11:17:09','YYYY-MM-DD HH24:MI:SS'),100,'Delete','Y','zk Window - Delete',TO_DATE('2012-03-28 11:17:09','YYYY-MM-DD HH24:MI:SS'),100,200033,'org.adempiere.webui.component.CWindowToolbar','N',0,0) +; + +-- Mar 28, 2012 11:17:16 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_DATE('2012-03-28 11:17:15','YYYY-MM-DD HH24:MI:SS'),100,'DeleteSelection','Y','zk Window - DeleteSelection',TO_DATE('2012-03-28 11:17:15','YYYY-MM-DD HH24:MI:SS'),100,200034,'org.adempiere.webui.component.CWindowToolbar','N',0,0) +; + +-- Mar 28, 2012 11:17:22 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_DATE('2012-03-28 11:17:21','YYYY-MM-DD HH24:MI:SS'),100,'Save','Y','zk Window - Save',TO_DATE('2012-03-28 11:17:21','YYYY-MM-DD HH24:MI:SS'),100,200035,'org.adempiere.webui.component.CWindowToolbar','N',0,0) +; + +-- Mar 28, 2012 11:17:30 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_DATE('2012-03-28 11:17:29','YYYY-MM-DD HH24:MI:SS'),100,'SaveCreate','Y','zk Window - SaveCreate',TO_DATE('2012-03-28 11:17:29','YYYY-MM-DD HH24:MI:SS'),100,200036,'org.adempiere.webui.component.CWindowToolbar','N',0,0) +; + +-- Mar 28, 2012 11:17:36 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_DATE('2012-03-28 11:17:35','YYYY-MM-DD HH24:MI:SS'),100,'Refresh','Y','zk Window - Refresh',TO_DATE('2012-03-28 11:17:35','YYYY-MM-DD HH24:MI:SS'),100,200037,'org.adempiere.webui.component.CWindowToolbar','N',0,0) +; + +-- Mar 28, 2012 11:17:42 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_DATE('2012-03-28 11:17:41','YYYY-MM-DD HH24:MI:SS'),100,'Find','Y','zk Window - Find',TO_DATE('2012-03-28 11:17:41','YYYY-MM-DD HH24:MI:SS'),100,200038,'org.adempiere.webui.component.CWindowToolbar','N',0,0) +; + +-- Mar 28, 2012 11:17:49 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_DATE('2012-03-28 11:17:48','YYYY-MM-DD HH24:MI:SS'),100,'Attachment','Y','zk Window - Attachment',TO_DATE('2012-03-28 11:17:48','YYYY-MM-DD HH24:MI:SS'),100,200039,'org.adempiere.webui.component.CWindowToolbar','N',0,0) +; + +-- Mar 28, 2012 11:17:57 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_DATE('2012-03-28 11:17:57','YYYY-MM-DD HH24:MI:SS'),100,'Chat','Y','zk Window - Chat',TO_DATE('2012-03-28 11:17:57','YYYY-MM-DD HH24:MI:SS'),100,200040,'org.adempiere.webui.component.CWindowToolbar','N',0,0) +; + +-- Mar 28, 2012 11:18:06 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_DATE('2012-03-28 11:18:06','YYYY-MM-DD HH24:MI:SS'),100,'Multi','Y','zk Window - Multi',TO_DATE('2012-03-28 11:18:06','YYYY-MM-DD HH24:MI:SS'),100,200041,'org.adempiere.webui.component.CWindowToolbar','N',0,0) +; + +-- Mar 28, 2012 11:18:12 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_DATE('2012-03-28 11:18:12','YYYY-MM-DD HH24:MI:SS'),100,'History','Y','zk Window - History',TO_DATE('2012-03-28 11:18:12','YYYY-MM-DD HH24:MI:SS'),100,200042,'org.adempiere.webui.component.CWindowToolbar','N',0,0) +; + +-- Mar 28, 2012 11:18:40 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_DATE('2012-03-28 11:18:40','YYYY-MM-DD HH24:MI:SS'),100,'Parent','Y','zk Window - Parent',TO_DATE('2012-03-28 11:18:40','YYYY-MM-DD HH24:MI:SS'),100,200043,'org.adempiere.webui.component.CWindowToolbar','N',0,0) +; + +-- Mar 28, 2012 11:18:50 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_DATE('2012-03-28 11:18:49','YYYY-MM-DD HH24:MI:SS'),100,'Detail','Y','zk Window - Detail',TO_DATE('2012-03-28 11:18:49','YYYY-MM-DD HH24:MI:SS'),100,200044,'org.adempiere.webui.component.CWindowToolbar','N',0,0) +; + +-- Mar 28, 2012 11:18:56 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_DATE('2012-03-28 11:18:56','YYYY-MM-DD HH24:MI:SS'),100,'First','Y','zk Window - First',TO_DATE('2012-03-28 11:18:56','YYYY-MM-DD HH24:MI:SS'),100,200045,'org.adempiere.webui.component.CWindowToolbar','N',0,0) +; + +-- Mar 28, 2012 11:19:03 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_DATE('2012-03-28 11:19:02','YYYY-MM-DD HH24:MI:SS'),100,'Previous','Y','zk Window - Previous',TO_DATE('2012-03-28 11:19:02','YYYY-MM-DD HH24:MI:SS'),100,200046,'org.adempiere.webui.component.CWindowToolbar','N',0,0) +; + +-- Mar 28, 2012 11:19:08 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_DATE('2012-03-28 11:19:08','YYYY-MM-DD HH24:MI:SS'),100,'Next','Y','zk Window - Next',TO_DATE('2012-03-28 11:19:08','YYYY-MM-DD HH24:MI:SS'),100,200047,'org.adempiere.webui.component.CWindowToolbar','N',0,0) +; + +-- Mar 28, 2012 11:19:19 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_DATE('2012-03-28 11:19:18','YYYY-MM-DD HH24:MI:SS'),100,'Last','Y','zk Window - Last',TO_DATE('2012-03-28 11:19:18','YYYY-MM-DD HH24:MI:SS'),100,200048,'org.adempiere.webui.component.CWindowToolbar','N',0,0) +; + +-- Mar 28, 2012 11:19:27 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_DATE('2012-03-28 11:19:27','YYYY-MM-DD HH24:MI:SS'),100,'Report','Y','zk Window - Report',TO_DATE('2012-03-28 11:19:27','YYYY-MM-DD HH24:MI:SS'),100,200049,'org.adempiere.webui.component.CWindowToolbar','N',0,0) +; + +-- Mar 28, 2012 11:19:33 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_DATE('2012-03-28 11:19:32','YYYY-MM-DD HH24:MI:SS'),100,'Archive','Y','zk Window - Archive',TO_DATE('2012-03-28 11:19:32','YYYY-MM-DD HH24:MI:SS'),100,200050,'org.adempiere.webui.component.CWindowToolbar','N',0,0) +; + +-- Mar 28, 2012 11:19:39 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_DATE('2012-03-28 11:19:39','YYYY-MM-DD HH24:MI:SS'),100,'Print','Y','zk Window - Print',TO_DATE('2012-03-28 11:19:39','YYYY-MM-DD HH24:MI:SS'),100,200051,'org.adempiere.webui.component.CWindowToolbar','N',0,0) +; + +-- Mar 28, 2012 11:19:46 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_DATE('2012-03-28 11:19:45','YYYY-MM-DD HH24:MI:SS'),100,'Lock','Y','zk Window - Lock',TO_DATE('2012-03-28 11:19:45','YYYY-MM-DD HH24:MI:SS'),100,200052,'org.adempiere.webui.component.CWindowToolbar','N',0,0) +; + +-- Mar 28, 2012 11:19:52 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_DATE('2012-03-28 11:19:51','YYYY-MM-DD HH24:MI:SS'),100,'ZoomAcross','Y','zk Window - ZoomAcross',TO_DATE('2012-03-28 11:19:51','YYYY-MM-DD HH24:MI:SS'),100,200053,'org.adempiere.webui.component.CWindowToolbar','N',0,0) +; + +-- Mar 28, 2012 11:19:58 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_DATE('2012-03-28 11:19:57','YYYY-MM-DD HH24:MI:SS'),100,'WorkFlow','Y','zk Window - WorkFlow',TO_DATE('2012-03-28 11:19:57','YYYY-MM-DD HH24:MI:SS'),100,200054,'org.adempiere.webui.component.CWindowToolbar','N',0,0) +; + +-- Mar 28, 2012 11:20:04 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_DATE('2012-03-28 11:20:04','YYYY-MM-DD HH24:MI:SS'),100,'Request','Y','zk Window - Request',TO_DATE('2012-03-28 11:20:04','YYYY-MM-DD HH24:MI:SS'),100,200055,'org.adempiere.webui.component.CWindowToolbar','N',0,0) +; + +-- Mar 28, 2012 11:20:11 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_DATE('2012-03-28 11:20:10','YYYY-MM-DD HH24:MI:SS'),100,'InfoProduct','Y','zk Window - InfoProduct',TO_DATE('2012-03-28 11:20:10','YYYY-MM-DD HH24:MI:SS'),100,200056,'org.adempiere.webui.component.CWindowToolbar','N',0,0) +; + +-- Mar 28, 2012 11:20:17 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_DATE('2012-03-28 11:20:17','YYYY-MM-DD HH24:MI:SS'),100,'Export','Y','zk Window - Export',TO_DATE('2012-03-28 11:20:17','YYYY-MM-DD HH24:MI:SS'),100,200057,'org.adempiere.webui.component.CWindowToolbar','N',0,0) +; + +-- Mar 28, 2012 11:22:48 AM COT +INSERT INTO AD_Window (AD_Window_ID,WindowType,IsSOTrx,IsDefault,IsBetaFunctionality,WinHeight,WinWidth,EntityType,Name,IsActive,Created,UpdatedBy,CreatedBy,Updated,AD_Org_ID,AD_Client_ID,Processing) VALUES (200001,'M','Y','N','N',0,0,'D','ToolBar Button Restrict','Y',TO_DATE('2012-03-28 11:22:47','YYYY-MM-DD HH24:MI:SS'),100,100,TO_DATE('2012-03-28 11:22:47','YYYY-MM-DD HH24:MI:SS'),0,0,'N') +; + +-- Mar 28, 2012 11:22:48 AM COT +INSERT INTO AD_Window_Trl (AD_Language,AD_Window_ID, Help,Name,Description, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Window_ID, t.Help,t.Name,t.Description, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Window t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Window_ID=200001 AND NOT EXISTS (SELECT * FROM AD_Window_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Window_ID=t.AD_Window_ID) +; + +-- Mar 28, 2012 11:22:59 AM COT +INSERT INTO AD_Table (IsSecurityEnabled,AccessLevel,LoadSeq,AD_Window_ID,AD_Table_ID,IsHighVolume,ImportTable,IsView,IsChangeLog,CopyColumnsFromTable,EntityType,IsCentrallyMaintained,IsDeleteable,ReplicationType,TableName,Name,AD_Client_ID,IsActive,AD_Org_ID,CreatedBy,Updated,UpdatedBy,Created) VALUES ('N','6',0,200001,200004,'N','N','N','Y','N','D','Y','Y','L','AD_ToolBarButtonRestrict','ToolBar Button Restrict',0,'Y',0,100,TO_DATE('2012-03-28 11:22:59','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2012-03-28 11:22:59','YYYY-MM-DD HH24:MI:SS')) +; + +-- Mar 28, 2012 11:22:59 AM COT +INSERT INTO AD_Table_Trl (AD_Language,AD_Table_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Table_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Table t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Table_ID=200004 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) +; + +-- Mar 28, 2012 11:23:00 AM COT +INSERT INTO AD_Sequence (IncrementNo,StartNewYear,CurrentNextSys,IsTableID,StartNo,CurrentNext,IsAudited,IsAutoSequence,AD_Sequence_ID,Description,Name,AD_Org_ID,AD_Client_ID,Updated,UpdatedBy,Created,CreatedBy,IsActive) VALUES (1,'N',50000,'Y',1000000,1000000,'N','Y',200004,'Table AD_ToolBarButtonRestrict','AD_ToolBarButtonRestrict',0,0,TO_DATE('2012-03-28 11:22:59','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2012-03-28 11:22:59','YYYY-MM-DD HH24:MI:SS'),100,'Y') +; + +-- Mar 28, 2012 11:28:13 AM COT +INSERT INTO AD_Column (DefaultValue,AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,Help,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,IsAllowCopy,CreatedBy,Updated,AD_Client_ID,AD_Org_ID,IsActive,Created,UpdatedBy) VALUES ('@#AD_Client_ID@',200100,200004,'D',1,'Y','N','N',0,'A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','N',22,'N',19,'Y','N',102,'N','Y','N','N','N','AD_Client_ID','Client/Tenant for this installation.','Client','N',100,TO_DATE('2012-03-28 11:28:12','YYYY-MM-DD HH24:MI:SS'),0,0,'Y',TO_DATE('2012-03-28 11:28:12','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Mar 28, 2012 11:28:13 AM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200100 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 28, 2012 11:28:13 AM COT +INSERT INTO AD_Column (DefaultValue,AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,Help,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,AD_Val_Rule_ID,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,IsAllowCopy,CreatedBy,Updated,AD_Client_ID,AD_Org_ID,IsActive,Created,UpdatedBy) VALUES ('@#AD_Org_ID@',200101,200004,'D',1,'Y','N','N',0,'An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','N',22,'N',19,'Y',104,'N',113,'N','Y','N','N','N','AD_Org_ID','Organizational entity within client','Organization','N',100,TO_DATE('2012-03-28 11:28:13','YYYY-MM-DD HH24:MI:SS'),0,0,'Y',TO_DATE('2012-03-28 11:28:13','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Mar 28, 2012 11:28:13 AM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200101 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 28, 2012 11:28:14 AM COT +INSERT INTO AD_Column (AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,Help,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,IsAllowCopy,CreatedBy,Updated,AD_Client_ID,AD_Org_ID,IsActive,Created,UpdatedBy) VALUES (200102,200004,'D',1,'Y','N','N',0,'The Created field indicates the date that this record was created.','N',7,'N',16,'Y','N',245,'N','Y','N','N','N','Created','Date this record was created','Created','N',100,TO_DATE('2012-03-28 11:28:13','YYYY-MM-DD HH24:MI:SS'),0,0,'Y',TO_DATE('2012-03-28 11:28:13','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Mar 28, 2012 11:28:14 AM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200102 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 28, 2012 11:28:14 AM COT +INSERT INTO AD_Column (AD_Column_ID,AD_Table_ID,EntityType,Version,AD_Reference_Value_ID,IsMandatory,IsTranslated,IsIdentifier,SeqNo,Help,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,IsAllowCopy,CreatedBy,Updated,AD_Client_ID,AD_Org_ID,IsActive,Created,UpdatedBy) VALUES (200103,200004,'D',1,110,'Y','N','N',0,'The Created By field indicates the user who created this record.','N',22,'N',18,'Y','N',246,'N','Y','N','N','N','CreatedBy','User who created this records','Created By','N',100,TO_DATE('2012-03-28 11:28:14','YYYY-MM-DD HH24:MI:SS'),0,0,'Y',TO_DATE('2012-03-28 11:28:14','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Mar 28, 2012 11:28:14 AM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200103 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 28, 2012 11:28:15 AM COT +INSERT INTO AD_Column (AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,Help,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,IsAllowCopy,CreatedBy,Updated,AD_Client_ID,AD_Org_ID,IsActive,Created,UpdatedBy) VALUES (200104,200004,'D',1,'N','N','N',0,'A description is limited to 255 characters.','N',255,'Y',10,'Y','N',275,'N','Y','N','Y','N','Description','Optional short description of the record','Description','Y',100,TO_DATE('2012-03-28 11:28:14','YYYY-MM-DD HH24:MI:SS'),0,0,'Y',TO_DATE('2012-03-28 11:28:14','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Mar 28, 2012 11:28:15 AM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200104 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 28, 2012 11:28:15 AM COT +INSERT INTO AD_Column (AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,Help,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,IsAllowCopy,CreatedBy,Updated,AD_Client_ID,AD_Org_ID,IsActive,Created,UpdatedBy) VALUES (200105,200004,'D',1,'N','N','N',0,'The Help field contains a hint, comment or help about the use of this item.','N',2000,'N',14,'Y','N',326,'N','Y','N','Y','N','Help','Comment or Hint','Comment/Help','Y',100,TO_DATE('2012-03-28 11:28:15','YYYY-MM-DD HH24:MI:SS'),0,0,'Y',TO_DATE('2012-03-28 11:28:15','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Mar 28, 2012 11:28:15 AM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200105 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 28, 2012 11:28:16 AM COT +INSERT INTO AD_Column (DefaultValue,AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,Help,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,IsAllowCopy,CreatedBy,Updated,AD_Client_ID,AD_Org_ID,IsActive,Created,UpdatedBy) VALUES ('Y',200106,200004,'D',1,'Y','N','N',0,'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.','N',1,'N',20,'Y','N',348,'N','Y','N','Y','N','IsActive','The record is active in the system','Active','N',100,TO_DATE('2012-03-28 11:28:15','YYYY-MM-DD HH24:MI:SS'),0,0,'Y',TO_DATE('2012-03-28 11:28:15','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Mar 28, 2012 11:28:16 AM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200106 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 28, 2012 11:28:16 AM COT +INSERT INTO AD_Element (AD_Element_ID,ColumnName,EntityType,Name,PrintName,AD_Client_ID,Created,Updated,IsActive,AD_Org_ID,CreatedBy,UpdatedBy) VALUES (200022,'AD_ToolBarButtonRestrict_ID','D','ToolBar Button Restrict','ToolBar Button Restrict',0,TO_DATE('2012-03-28 11:28:16','YYYY-MM-DD HH24:MI:SS'),TO_DATE('2012-03-28 11:28:16','YYYY-MM-DD HH24:MI:SS'),'Y',0,100,100) +; + +-- Mar 28, 2012 11:28:16 AM COT +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Help,PO_Description,PO_Help,Name,Description,PrintName,PO_PrintName,PO_Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Help,t.PO_Description,t.PO_Help,t.Name,t.Description,t.PrintName,t.PO_PrintName,t.PO_Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=200022 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID) +; + +-- Mar 28, 2012 11:28:16 AM COT +INSERT INTO AD_Column (AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Name,IsAllowCopy,CreatedBy,Updated,AD_Client_ID,AD_Org_ID,IsActive,Created,UpdatedBy) VALUES (200107,200004,'D',1,'Y','N','N',0,'N',22,'N',13,'Y','Y',200022,'N','Y','N','N','N','AD_ToolBarButtonRestrict_ID','ToolBar Button Restrict','N',100,TO_DATE('2012-03-28 11:28:16','YYYY-MM-DD HH24:MI:SS'),0,0,'Y',TO_DATE('2012-03-28 11:28:16','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Mar 28, 2012 11:28:16 AM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200107 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 28, 2012 11:28:17 AM COT +INSERT INTO AD_Column (AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,Help,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,IsAllowCopy,CreatedBy,Updated,AD_Client_ID,AD_Org_ID,IsActive,Created,UpdatedBy) VALUES (200108,200004,'D',1,'Y','N','Y',1,'The name of an entity (record) is used as an default search option in addition to the search key. The name is up to 60 characters in length.','N',60,'Y',10,'Y','N',469,'N','Y','N','Y','N','Name','Alphanumeric identifier of the entity','Name','Y',100,TO_DATE('2012-03-28 11:28:16','YYYY-MM-DD HH24:MI:SS'),0,0,'Y',TO_DATE('2012-03-28 11:28:16','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Mar 28, 2012 11:28:17 AM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200108 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 28, 2012 11:28:17 AM COT +INSERT INTO AD_Column (AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,Help,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,IsAllowCopy,CreatedBy,Updated,AD_Client_ID,AD_Org_ID,IsActive,Created,UpdatedBy) VALUES (200109,200004,'D',1,'Y','N','N',0,'The Updated field indicates the date that this record was updated.','N',7,'N',16,'Y','N',607,'N','Y','N','N','N','Updated','Date this record was updated','Updated','N',100,TO_DATE('2012-03-28 11:28:17','YYYY-MM-DD HH24:MI:SS'),0,0,'Y',TO_DATE('2012-03-28 11:28:17','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Mar 28, 2012 11:28:17 AM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200109 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 28, 2012 11:28:18 AM COT +INSERT INTO AD_Column (AD_Column_ID,AD_Table_ID,EntityType,Version,AD_Reference_Value_ID,IsMandatory,IsTranslated,IsIdentifier,SeqNo,Help,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,IsAllowCopy,CreatedBy,Updated,AD_Client_ID,AD_Org_ID,IsActive,Created,UpdatedBy) VALUES (200110,200004,'D',1,110,'Y','N','N',0,'The Updated By field indicates the user who updated this record.','N',22,'N',18,'Y','N',608,'N','Y','N','N','N','UpdatedBy','User who updated this records','Updated By','N',100,TO_DATE('2012-03-28 11:28:17','YYYY-MM-DD HH24:MI:SS'),0,0,'Y',TO_DATE('2012-03-28 11:28:17','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Mar 28, 2012 11:28:18 AM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200110 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 28, 2012 11:28:18 AM COT +INSERT INTO AD_Column (AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,Help,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,IsAllowCopy,CreatedBy,Updated,AD_Client_ID,AD_Org_ID,IsActive,Created,UpdatedBy) VALUES (200111,200004,'D',1,'Y','N','N',0,'A search key allows you a fast method of finding a particular record. +If you leave the search key empty, the system automatically creates a numeric number. The document sequence used for this fallback number is defined in the "Maintain Sequence" window with the name "DocumentNo_", where TableName is the actual name of the table (e.g. C_Order).','N',40,'Y',10,'Y','N',620,'N','Y','N','Y','N','Value','Search key for the record in the format required - must be unique','Search Key','Y',100,TO_DATE('2012-03-28 11:28:18','YYYY-MM-DD HH24:MI:SS'),0,0,'Y',TO_DATE('2012-03-28 11:28:18','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Mar 28, 2012 11:28:18 AM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200111 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 28, 2012 11:29:31 AM COT +UPDATE AD_Column SET Help=NULL, IsSelectionColumn='N', AD_Reference_ID=19, AD_Element_ID=200016, ColumnName='AD_ToolBarButton_ID', Description=NULL, Name='ToolBar Button',Updated=TO_DATE('2012-03-28 11:29:31','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200104 +; + +-- Mar 28, 2012 11:29:31 AM COT +UPDATE AD_Column_Trl SET IsTranslated='N' WHERE AD_Column_ID=200104 +; + +-- Mar 28, 2012 11:29:31 AM COT +UPDATE AD_Field SET Name='ToolBar Button', Description=NULL, Help=NULL WHERE AD_Column_ID=200104 AND IsCentrallyMaintained='Y' +; + +-- Mar 28, 2012 11:29:37 AM COT +UPDATE AD_Column SET FieldLength=10,Updated=TO_DATE('2012-03-28 11:29:37','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200104 +; + +-- Mar 28, 2012 11:33:37 AM COT +INSERT INTO AD_Val_Rule (Code,Type,AD_Val_Rule_ID,EntityType,Name,CreatedBy,Updated,UpdatedBy,AD_Client_ID,IsActive,AD_Org_ID,Created) VALUES ('AD_RefList.Value IN (''W'',''R'',''X'')','S',200002,'D','AD_ToolBarButton Action - Window/Report/Form',100,TO_DATE('2012-03-28 11:33:36','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',0,TO_DATE('2012-03-28 11:33:36','YYYY-MM-DD HH24:MI:SS')) +; + +-- Mar 28, 2012 11:33:47 AM COT +UPDATE AD_Column SET AD_Reference_Value_ID=104, IsMandatory='Y', Help='The Action field is a drop down list box which indicates the Action to be performed for this Item.', FieldLength=1, AD_Reference_ID=17, AD_Val_Rule_ID=200002, AD_Element_ID=152, ColumnName='Action', Description='Indicates the Action to be performed', Name='Action',Updated=TO_DATE('2012-03-28 11:33:47','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200105 +; + +-- Mar 28, 2012 11:33:47 AM COT +UPDATE AD_Column_Trl SET IsTranslated='N' WHERE AD_Column_ID=200105 +; + +-- Mar 28, 2012 11:33:47 AM COT +UPDATE AD_Field SET Name='Action', Description='Indicates the Action to be performed', Help='The Action field is a drop down list box which indicates the Action to be performed for this Item.' WHERE AD_Column_ID=200105 AND IsCentrallyMaintained='Y' +; + +-- Mar 28, 2012 11:35:22 AM COT +UPDATE AD_Column SET IsIdentifier='N', Help='The Role determines security and access a user who has this Role will have in the System.', FieldLength=10, IsSelectionColumn='N', AD_Reference_ID=19, AD_Element_ID=123, ColumnName='AD_Role_ID', Description='Responsibility Role', Name='Role',Updated=TO_DATE('2012-03-28 11:35:22','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200108 +; + +-- Mar 28, 2012 11:35:22 AM COT +UPDATE AD_Column_Trl SET IsTranslated='N' WHERE AD_Column_ID=200108 +; + +-- Mar 28, 2012 11:35:22 AM COT +UPDATE AD_Field SET Name='Role', Description='Responsibility Role', Help='The Role determines security and access a user who has this Role will have in the System.' WHERE AD_Column_ID=200108 AND IsCentrallyMaintained='Y' +; + +-- Mar 28, 2012 11:35:54 AM COT +UPDATE AD_Column SET IsMandatory='N', Help='The Window field identifies a unique Window in the system.', FieldLength=10, IsSelectionColumn='N', AD_Reference_ID=19, AD_Element_ID=143, ColumnName='AD_Window_ID', Description='Data entry or display window', Name='Window',Updated=TO_DATE('2012-03-28 11:35:54','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200111 +; + +-- Mar 28, 2012 11:35:54 AM COT +UPDATE AD_Column_Trl SET IsTranslated='N' WHERE AD_Column_ID=200111 +; + +-- Mar 28, 2012 11:35:54 AM COT +UPDATE AD_Field SET Name='Window', Description='Data entry or display window', Help='The Window field identifies a unique Window in the system.' WHERE AD_Column_ID=200111 AND IsCentrallyMaintained='Y' +; + +-- Mar 28, 2012 11:36:24 AM COT +CREATE TABLE AD_ToolBarButtonRestrict (Action CHAR(1) NOT NULL, AD_Client_ID NUMBER(10) NOT NULL, AD_Org_ID NUMBER(10) NOT NULL, AD_Role_ID NUMBER(10) NOT NULL, AD_ToolBarButton_ID NUMBER(10) DEFAULT NULL , AD_ToolBarButtonRestrict_ID NUMBER(10) NOT NULL, AD_Window_ID NUMBER(10) DEFAULT NULL , Created DATE NOT NULL, CreatedBy NUMBER(10) NOT NULL, IsActive CHAR(1) DEFAULT 'Y' CHECK (IsActive IN ('Y','N')) NOT NULL, Updated DATE NOT NULL, UpdatedBy NUMBER(10) NOT NULL, CONSTRAINT AD_ToolBarButtonRestrict_Key PRIMARY KEY (AD_ToolBarButtonRestrict_ID)) +; + +-- Mar 28, 2012 11:37:48 AM COT +INSERT INTO AD_Tab (IsSingleRow,AD_Window_ID,SeqNo,IsTranslationTab,IsSortTab,AD_Table_ID,AD_Tab_ID,ImportFields,HasTree,IsInfoTab,IsReadOnly,TabLevel,IsInsertRecord,IsAdvancedTab,EntityType,Name,AD_Client_ID,AD_Org_ID,Created,CreatedBy,Updated,IsActive,UpdatedBy,Processing) VALUES ('Y',200001,10,'N','N',200004,200003,'N','N','N','N',0,'Y','N','D','ToolBar Button Restrict',0,0,TO_DATE('2012-03-28 11:37:47','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2012-03-28 11:37:47','YYYY-MM-DD HH24:MI:SS'),'Y',100,'N') +; + +-- Mar 28, 2012 11:37:48 AM COT +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) 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 FROM AD_Language l, AD_Tab t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Tab_ID=200003 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) +; + +-- Mar 28, 2012 11:37:52 AM COT +INSERT INTO AD_Field (IsEncrypted,DisplayLength,IsDisplayed,IsSameLine,IsHeading,AD_Column_ID,IsFieldOnly,IsCentrallyMaintained,AD_Tab_ID,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,UpdatedBy,AD_Org_ID,IsActive,Created,AD_Client_ID,CreatedBy,Updated) VALUES ('N',1,'Y','N','N',200105,'N','Y',200003,200063,'N','The Action field is a drop down list box which indicates the Action to be performed for this Item.','D','Indicates the Action to be performed','Action',100,0,'Y',TO_DATE('2012-03-28 11:37:52','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2012-03-28 11:37:52','YYYY-MM-DD HH24:MI:SS')) +; + +-- Mar 28, 2012 11:37:52 AM COT +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) 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 FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200063 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Mar 28, 2012 11:37:53 AM COT +INSERT INTO AD_Field (IsEncrypted,DisplayLength,IsDisplayed,IsSameLine,IsHeading,AD_Column_ID,IsFieldOnly,IsCentrallyMaintained,AD_Tab_ID,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,UpdatedBy,AD_Org_ID,IsActive,Created,AD_Client_ID,CreatedBy,Updated) VALUES ('N',1,'Y','N','N',200106,'N','Y',200003,200064,'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',100,0,'Y',TO_DATE('2012-03-28 11:37:52','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2012-03-28 11:37:52','YYYY-MM-DD HH24:MI:SS')) +; + +-- Mar 28, 2012 11:37:53 AM COT +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) 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 FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200064 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Mar 28, 2012 11:37:53 AM COT +INSERT INTO AD_Field (IsEncrypted,DisplayLength,IsDisplayed,IsSameLine,IsHeading,AD_Column_ID,IsFieldOnly,IsCentrallyMaintained,AD_Tab_ID,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,UpdatedBy,AD_Org_ID,IsActive,Created,AD_Client_ID,CreatedBy,Updated) VALUES ('N',22,'Y','N','N',200100,'N','Y',200003,200065,'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',100,0,'Y',TO_DATE('2012-03-28 11:37:53','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2012-03-28 11:37:53','YYYY-MM-DD HH24:MI:SS')) +; + +-- Mar 28, 2012 11:37:53 AM COT +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) 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 FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200065 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Mar 28, 2012 11:37:54 AM COT +INSERT INTO AD_Field (IsEncrypted,DisplayLength,IsDisplayed,IsSameLine,IsHeading,AD_Column_ID,IsFieldOnly,IsCentrallyMaintained,AD_Tab_ID,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,UpdatedBy,AD_Org_ID,IsActive,Created,AD_Client_ID,CreatedBy,Updated) VALUES ('N',22,'Y','N','N',200101,'N','Y',200003,200066,'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',100,0,'Y',TO_DATE('2012-03-28 11:37:53','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2012-03-28 11:37:53','YYYY-MM-DD HH24:MI:SS')) +; + +-- Mar 28, 2012 11:37:54 AM COT +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) 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 FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200066 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Mar 28, 2012 11:37:54 AM COT +INSERT INTO AD_Field (IsEncrypted,DisplayLength,IsDisplayed,IsSameLine,IsHeading,AD_Column_ID,IsFieldOnly,IsCentrallyMaintained,AD_Tab_ID,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,UpdatedBy,AD_Org_ID,IsActive,Created,AD_Client_ID,CreatedBy,Updated) VALUES ('N',10,'Y','N','N',200108,'N','Y',200003,200067,'N','The Role determines security and access a user who has this Role will have in the System.','D','Responsibility Role','Role',100,0,'Y',TO_DATE('2012-03-28 11:37:54','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2012-03-28 11:37:54','YYYY-MM-DD HH24:MI:SS')) +; + +-- Mar 28, 2012 11:37:54 AM COT +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) 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 FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200067 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Mar 28, 2012 11:37:54 AM COT +INSERT INTO AD_Field (IsEncrypted,DisplayLength,IsDisplayed,IsSameLine,IsHeading,AD_Column_ID,IsFieldOnly,IsCentrallyMaintained,AD_Tab_ID,AD_Field_ID,IsReadOnly,EntityType,Name,UpdatedBy,AD_Org_ID,IsActive,Created,AD_Client_ID,CreatedBy,Updated) VALUES ('N',10,'Y','N','N',200104,'N','Y',200003,200068,'N','D','ToolBar Button',100,0,'Y',TO_DATE('2012-03-28 11:37:54','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2012-03-28 11:37:54','YYYY-MM-DD HH24:MI:SS')) +; + +-- Mar 28, 2012 11:37:54 AM COT +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) 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 FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200068 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Mar 28, 2012 11:37:55 AM COT +INSERT INTO AD_Field (IsEncrypted,DisplayLength,IsDisplayed,IsSameLine,IsHeading,AD_Column_ID,IsFieldOnly,IsCentrallyMaintained,AD_Tab_ID,AD_Field_ID,IsReadOnly,EntityType,Name,UpdatedBy,AD_Org_ID,IsActive,Created,AD_Client_ID,CreatedBy,Updated) VALUES ('N',22,'N','N','N',200107,'N','Y',200003,200069,'N','D','ToolBar Button Restrict',100,0,'Y',TO_DATE('2012-03-28 11:37:54','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2012-03-28 11:37:54','YYYY-MM-DD HH24:MI:SS')) +; + +-- Mar 28, 2012 11:37:55 AM COT +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) 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 FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200069 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Mar 28, 2012 11:37:55 AM COT +INSERT INTO AD_Field (IsEncrypted,DisplayLength,IsDisplayed,IsSameLine,IsHeading,AD_Column_ID,IsFieldOnly,IsCentrallyMaintained,AD_Tab_ID,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,UpdatedBy,AD_Org_ID,IsActive,Created,AD_Client_ID,CreatedBy,Updated) VALUES ('N',10,'Y','N','N',200111,'N','Y',200003,200070,'N','The Window field identifies a unique Window in the system.','D','Data entry or display window','Window',100,0,'Y',TO_DATE('2012-03-28 11:37:55','YYYY-MM-DD HH24:MI:SS'),0,100,TO_DATE('2012-03-28 11:37:55','YYYY-MM-DD HH24:MI:SS')) +; + +-- Mar 28, 2012 11:37:55 AM COT +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) 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 FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200070 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Mar 28, 2012 11:38:22 AM COT +UPDATE AD_Field SET SeqNo=10,IsDisplayed='Y' WHERE AD_Field_ID=200065 +; + +-- Mar 28, 2012 11:38:22 AM COT +UPDATE AD_Field SET SeqNo=20,IsDisplayed='Y' WHERE AD_Field_ID=200066 +; + +-- Mar 28, 2012 11:38:22 AM COT +UPDATE AD_Field SET SeqNo=30,IsDisplayed='Y' WHERE AD_Field_ID=200067 +; + +-- Mar 28, 2012 11:38:22 AM COT +UPDATE AD_Field SET SeqNo=40,IsDisplayed='Y' WHERE AD_Field_ID=200064 +; + +-- Mar 28, 2012 11:38:22 AM COT +UPDATE AD_Field SET SeqNo=50,IsDisplayed='Y' WHERE AD_Field_ID=200063 +; + +-- Mar 28, 2012 11:38:22 AM COT +UPDATE AD_Field SET SeqNo=60,IsDisplayed='Y' WHERE AD_Field_ID=200070 +; + +-- Mar 28, 2012 11:38:22 AM COT +UPDATE AD_Field SET SeqNo=70,IsDisplayed='Y' WHERE AD_Field_ID=200068 +; + +-- Mar 28, 2012 11:38:30 AM COT +UPDATE AD_Field SET IsSameLine='Y',Updated=TO_DATE('2012-03-28 11:38:30','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200066 +; + +-- Mar 28, 2012 11:38:42 AM COT +UPDATE AD_Field SET IsSameLine='Y',Updated=TO_DATE('2012-03-28 11:38:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200064 +; + +-- Mar 28, 2012 11:38:56 AM COT +UPDATE AD_Field SET IsSameLine='Y', DisplayLogic='@Action@=W',Updated=TO_DATE('2012-03-28 11:38:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200070 +; + +-- Mar 28, 2012 11:39:03 AM COT +UPDATE AD_Field SET DisplayLength=40,Updated=TO_DATE('2012-03-28 11:39:03','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200068 +; + +-- Mar 28, 2012 11:39:48 AM COT +INSERT INTO AD_Menu (AD_Window_ID,AD_Menu_ID,IsSummary,Action,IsSOTrx,IsReadOnly,EntityType,IsCentrallyMaintained,Name,Created,IsActive,UpdatedBy,AD_Client_ID,CreatedBy,Updated,AD_Org_ID) VALUES (200001,200001,'N','W','N','N','U','Y','ToolBar Button Restrict',TO_DATE('2012-03-28 11:39:47','YYYY-MM-DD HH24:MI:SS'),'Y',100,0,100,TO_DATE('2012-03-28 11:39:47','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Mar 28, 2012 11:39:48 AM COT +INSERT INTO AD_Menu_Trl (AD_Language,AD_Menu_ID, Name,Description, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Menu_ID, t.Name,t.Description, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Menu t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Menu_ID=200001 AND NOT EXISTS (SELECT * FROM AD_Menu_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Menu_ID=t.AD_Menu_ID) +; + +-- Mar 28, 2012 11:39:48 AM COT +INSERT INTO AD_TreeNodeMM (AD_Client_ID,AD_Org_ID, IsActive,Created,CreatedBy,Updated,UpdatedBy, AD_Tree_ID, Node_ID, Parent_ID, SeqNo) SELECT t.AD_Client_ID, 0, 'Y', SysDate, 100, SysDate, 100,t.AD_Tree_ID, 200001, 0, 999 FROM AD_Tree t WHERE t.AD_Client_ID=0 AND t.IsActive='Y' AND t.IsAllNodes='Y' AND t.TreeType='MM' AND NOT EXISTS (SELECT * FROM AD_TreeNodeMM e WHERE e.AD_Tree_ID=t.AD_Tree_ID AND Node_ID=200001) +; + +-- Mar 28, 2012 11:40:25 AM COT +UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=0, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=147 +; + +-- Mar 28, 2012 11:40:25 AM COT +UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=1, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=53246 +; + +-- Mar 28, 2012 11:40:25 AM COT +UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=2, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=487 +; + +-- Mar 28, 2012 11:40:25 AM COT +UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=3, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=150 +; + +-- Mar 28, 2012 11:40:25 AM COT +UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=4, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=495 +; + +-- Mar 28, 2012 11:40:25 AM COT +UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=5, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=50007 +; + +-- Mar 28, 2012 11:40:25 AM COT +UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=6, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=362 +; + +-- Mar 28, 2012 11:40:25 AM COT +UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=7, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=200001 +; + +-- Mar 28, 2012 11:40:25 AM COT +UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=8, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=475 +; + +-- Mar 28, 2012 11:40:25 AM COT +UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=9, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=366 +; + +-- Mar 28, 2012 11:40:25 AM COT +UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=10, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=483 +; + +-- Mar 28, 2012 11:40:25 AM COT +UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=11, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=368 +; + +-- Mar 28, 2012 11:40:25 AM COT +UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=12, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=508 +; + +-- Mar 28, 2012 11:44:41 AM COT +-- IDEMPIERE-129 Restrictions on Toolbar and Menu +UPDATE AD_Val_Rule SET Code='AD_Ref_List.Value IN (''W'',''R'',''X'')',Updated=TO_DATE('2012-03-28 11:44:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Val_Rule_ID=200002 +; + +-- Mar 29, 2012 11:53:47 AM CEST +UPDATE AD_Column SET IsMandatory='N',Updated=TO_DATE('2012-03-29 11:53:47','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Column_ID=200108 +; + +-- Mar 29, 2012 11:53:52 AM CEST +ALTER TABLE AD_ToolBarButtonRestrict MODIFY AD_Role_ID NUMBER(10) DEFAULT NULL +; + +-- Mar 29, 2012 11:53:54 AM CEST +ALTER TABLE AD_ToolBarButtonRestrict MODIFY AD_Role_ID NULL +; + +-- Mar 29, 2012 1:44:21 PM CEST +UPDATE AD_Column SET AD_Val_Rule_ID=158, IsUpdateable='N',Updated=TO_DATE('2012-03-29 13:44:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Column_ID=200108 +; + +-- Mar 29, 2012 1:44:51 PM CEST +UPDATE AD_Column SET IsMandatory='N', IsUpdateable='N',Updated=TO_DATE('2012-03-29 13:44:51','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Column_ID=200105 +; + +-- Mar 29, 2012 1:44:53 PM CEST +ALTER TABLE AD_ToolBarButtonRestrict MODIFY Action CHAR(1) DEFAULT NULL +; + +-- Mar 29, 2012 1:44:53 PM CEST +ALTER TABLE AD_ToolBarButtonRestrict MODIFY Action NULL +; + +-- Mar 29, 2012 1:45:01 PM CEST +UPDATE AD_Column SET IsUpdateable='N',Updated=TO_DATE('2012-03-29 13:45:01','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Column_ID=200111 +; + +UPDATE AD_System + SET LastMigrationScriptApplied='833_IDEMPIERE-129.sql' +WHERE LastMigrationScriptApplied<'833_IDEMPIERE-129.sql' + OR LastMigrationScriptApplied IS NULL +; diff --git a/migration/360lts-release/postgresql/833_IDEMPIERE-129.sql b/migration/360lts-release/postgresql/833_IDEMPIERE-129.sql new file mode 100644 index 0000000000..582022544b --- /dev/null +++ b/migration/360lts-release/postgresql/833_IDEMPIERE-129.sql @@ -0,0 +1,1245 @@ +-- Mar 28, 2012 10:13:03 AM COT +-- IDEMPIERE-129 Restrictions on Toolbar and Menu +INSERT INTO AD_Table (IsSecurityEnabled,AccessLevel,LoadSeq,AD_Table_ID,IsHighVolume,ImportTable,IsView,IsChangeLog,CopyColumnsFromTable,EntityType,IsCentrallyMaintained,IsDeleteable,ReplicationType,TableName,Name,AD_Client_ID,IsActive,AD_Org_ID,CreatedBy,Updated,UpdatedBy,Created) VALUES ('N','4',0,200003,'N','N','N','Y','N','D','Y','Y','L','AD_ToolBarButtons','ToolBar Buttons',0,'Y',0,100,TO_TIMESTAMP('2012-03-28 10:13:02','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2012-03-28 10:13:02','YYYY-MM-DD HH24:MI:SS')) +; + +-- Mar 28, 2012 10:13:04 AM COT +INSERT INTO AD_Table_Trl (AD_Language,AD_Table_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Table_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Table t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Table_ID=200003 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) +; + +-- Mar 28, 2012 10:13:18 AM COT +INSERT INTO AD_Column (DefaultValue,AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,Help,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,CreatedBy,Updated,AD_Client_ID,AD_Org_ID,IsActive,Created,UpdatedBy) VALUES ('@#AD_Client_ID@',200083,200003,'D',1,'Y','N','N',0,'A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','N',22,'N',19,'Y','N',102,'N','N','N','AD_Client_ID','Client/Tenant for this installation.','Client',100,TO_TIMESTAMP('2012-03-28 10:13:18','YYYY-MM-DD HH24:MI:SS'),0,0,'Y',TO_TIMESTAMP('2012-03-28 10:13:18','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Mar 28, 2012 10:13:18 AM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200083 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 28, 2012 10:13:19 AM COT +INSERT INTO AD_Column (DefaultValue,AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,Help,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,AD_Val_Rule_ID,IsKey,AD_Element_ID,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,CreatedBy,Updated,AD_Client_ID,AD_Org_ID,IsActive,Created,UpdatedBy) VALUES ('@#AD_Org_ID@',200084,200003,'D',1,'Y','N','N',0,'An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','N',22,'N',19,'Y',104,'N',113,'N','N','N','AD_Org_ID','Organizational entity within client','Organization',100,TO_TIMESTAMP('2012-03-28 10:13:18','YYYY-MM-DD HH24:MI:SS'),0,0,'Y',TO_TIMESTAMP('2012-03-28 10:13:18','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Mar 28, 2012 10:13:19 AM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200084 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 28, 2012 10:13:19 AM COT +INSERT INTO AD_Column (AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,Help,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,CreatedBy,Updated,AD_Client_ID,AD_Org_ID,IsActive,Created,UpdatedBy) VALUES (200085,200003,'D',1,'Y','N','N',0,'The Created field indicates the date that this record was created.','N',7,'N',16,'Y','N',245,'N','N','N','Created','Date this record was created','Created',100,TO_TIMESTAMP('2012-03-28 10:13:19','YYYY-MM-DD HH24:MI:SS'),0,0,'Y',TO_TIMESTAMP('2012-03-28 10:13:19','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Mar 28, 2012 10:13:19 AM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200085 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 28, 2012 10:13:20 AM COT +INSERT INTO AD_Column (AD_Column_ID,AD_Table_ID,EntityType,Version,AD_Reference_Value_ID,IsMandatory,IsTranslated,IsIdentifier,SeqNo,Help,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,CreatedBy,Updated,AD_Client_ID,AD_Org_ID,IsActive,Created,UpdatedBy) VALUES (200086,200003,'D',1,110,'Y','N','N',0,'The Created By field indicates the user who created this record.','N',22,'N',18,'Y','N',246,'N','N','N','CreatedBy','User who created this records','Created By',100,TO_TIMESTAMP('2012-03-28 10:13:19','YYYY-MM-DD HH24:MI:SS'),0,0,'Y',TO_TIMESTAMP('2012-03-28 10:13:19','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Mar 28, 2012 10:13:20 AM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200086 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 28, 2012 10:13:20 AM COT +INSERT INTO AD_Column (AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,Help,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,CreatedBy,Updated,AD_Client_ID,AD_Org_ID,IsActive,Created,UpdatedBy) VALUES (200087,200003,'D',1,'N','N','N',0,'A description is limited to 255 characters.','N',255,'Y',10,'Y','N',275,'N','Y','N','Description','Optional short description of the record','Description',100,TO_TIMESTAMP('2012-03-28 10:13:20','YYYY-MM-DD HH24:MI:SS'),0,0,'Y',TO_TIMESTAMP('2012-03-28 10:13:20','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Mar 28, 2012 10:13:20 AM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200087 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 28, 2012 10:13:21 AM COT +INSERT INTO AD_Column (AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,Help,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,CreatedBy,Updated,AD_Client_ID,AD_Org_ID,IsActive,Created,UpdatedBy) VALUES (200088,200003,'D',1,'N','N','N',0,'The Help field contains a hint, comment or help about the use of this item.','N',2000,'N',14,'Y','N',326,'N','Y','N','Help','Comment or Hint','Comment/Help',100,TO_TIMESTAMP('2012-03-28 10:13:20','YYYY-MM-DD HH24:MI:SS'),0,0,'Y',TO_TIMESTAMP('2012-03-28 10:13:20','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Mar 28, 2012 10:13:21 AM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200088 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 28, 2012 10:13:21 AM COT +INSERT INTO AD_Column (DefaultValue,AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,Help,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,CreatedBy,Updated,AD_Client_ID,AD_Org_ID,IsActive,Created,UpdatedBy) VALUES ('Y',200089,200003,'D',1,'Y','N','N',0,'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.','N',1,'N',20,'Y','N',348,'N','Y','N','IsActive','The record is active in the system','Active',100,TO_TIMESTAMP('2012-03-28 10:13:21','YYYY-MM-DD HH24:MI:SS'),0,0,'Y',TO_TIMESTAMP('2012-03-28 10:13:21','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Mar 28, 2012 10:13:21 AM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200089 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 28, 2012 10:13:22 AM COT +INSERT INTO AD_Element (AD_Element_ID,ColumnName,EntityType,Name,PrintName,AD_Client_ID,Created,Updated,IsActive,AD_Org_ID,CreatedBy,UpdatedBy) VALUES (200016,'AD_ToolBarButtons_ID','D','ToolBar Buttons','ToolBar Buttons',0,TO_TIMESTAMP('2012-03-28 10:13:21','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2012-03-28 10:13:21','YYYY-MM-DD HH24:MI:SS'),'Y',0,100,100) +; + +-- Mar 28, 2012 10:13:22 AM COT +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Help,PO_Description,PO_Help,Name,Description,PrintName,PO_PrintName,PO_Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Help,t.PO_Description,t.PO_Help,t.Name,t.Description,t.PrintName,t.PO_PrintName,t.PO_Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=200016 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID) +; + +-- Mar 28, 2012 10:13:22 AM COT +INSERT INTO AD_Column (AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Name,CreatedBy,Updated,AD_Client_ID,AD_Org_ID,IsActive,Created,UpdatedBy) VALUES (200090,200003,'D',1,'Y','N','N',0,'N',22,'N',13,'Y','Y',200016,'N','N','N','AD_ToolBarButtons_ID','ToolBar Buttons',100,TO_TIMESTAMP('2012-03-28 10:13:21','YYYY-MM-DD HH24:MI:SS'),0,0,'Y',TO_TIMESTAMP('2012-03-28 10:13:21','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Mar 28, 2012 10:13:22 AM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200090 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 28, 2012 10:13:23 AM COT +INSERT INTO AD_Column (AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,Help,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,CreatedBy,Updated,AD_Client_ID,AD_Org_ID,IsActive,Created,UpdatedBy) VALUES (200091,200003,'D',1,'Y','N','Y',1,'The name of an entity (record) is used as an default search option in addition to the search key. The name is up to 60 characters in length.','N',60,'Y',10,'Y','N',469,'N','Y','N','Name','Alphanumeric identifier of the entity','Name',100,TO_TIMESTAMP('2012-03-28 10:13:22','YYYY-MM-DD HH24:MI:SS'),0,0,'Y',TO_TIMESTAMP('2012-03-28 10:13:22','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Mar 28, 2012 10:13:23 AM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200091 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 28, 2012 10:13:23 AM COT +INSERT INTO AD_Column (AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,Help,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,CreatedBy,Updated,AD_Client_ID,AD_Org_ID,IsActive,Created,UpdatedBy) VALUES (200092,200003,'D',1,'Y','N','N',0,'The Updated field indicates the date that this record was updated.','N',7,'N',16,'Y','N',607,'N','N','N','Updated','Date this record was updated','Updated',100,TO_TIMESTAMP('2012-03-28 10:13:23','YYYY-MM-DD HH24:MI:SS'),0,0,'Y',TO_TIMESTAMP('2012-03-28 10:13:23','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Mar 28, 2012 10:13:23 AM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200092 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 28, 2012 10:13:24 AM COT +INSERT INTO AD_Column (AD_Column_ID,AD_Table_ID,EntityType,Version,AD_Reference_Value_ID,IsMandatory,IsTranslated,IsIdentifier,SeqNo,Help,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,CreatedBy,Updated,AD_Client_ID,AD_Org_ID,IsActive,Created,UpdatedBy) VALUES (200093,200003,'D',1,110,'Y','N','N',0,'The Updated By field indicates the user who updated this record.','N',22,'N',18,'Y','N',608,'N','N','N','UpdatedBy','User who updated this records','Updated By',100,TO_TIMESTAMP('2012-03-28 10:13:23','YYYY-MM-DD HH24:MI:SS'),0,0,'Y',TO_TIMESTAMP('2012-03-28 10:13:23','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Mar 28, 2012 10:13:24 AM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200093 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 28, 2012 10:13:24 AM COT +INSERT INTO AD_Column (AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,Help,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,CreatedBy,Updated,AD_Client_ID,AD_Org_ID,IsActive,Created,UpdatedBy) VALUES (200094,200003,'D',1,'Y','N','N',0,'A search key allows you a fast method of finding a particular record. +If you leave the search key empty, the system automatically creates a numeric number. The document sequence used for this fallback number is defined in the "Maintain Sequence" window with the name "DocumentNo_", where TableName is the actual name of the table (e.g. C_Order).','N',40,'Y',10,'Y','N',620,'N','Y','N','Value','Search key for the record in the format required - must be unique','Search Key',100,TO_TIMESTAMP('2012-03-28 10:13:24','YYYY-MM-DD HH24:MI:SS'),0,0,'Y',TO_TIMESTAMP('2012-03-28 10:13:24','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Mar 28, 2012 10:13:24 AM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200094 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 28, 2012 10:13:39 AM COT +UPDATE AD_Table SET TableName='AD_ToolBarButton', Name='ToolBar Button',Updated=TO_TIMESTAMP('2012-03-28 10:13:39','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Table_ID=200003 +; + +-- Mar 28, 2012 10:13:39 AM COT +UPDATE AD_Table_Trl SET IsTranslated='N' WHERE AD_Table_ID=200003 +; + +-- Mar 28, 2012 10:13:39 AM COT +INSERT INTO AD_Sequence (IncrementNo,StartNewYear,CurrentNextSys,IsTableID,StartNo,CurrentNext,IsAudited,IsAutoSequence,AD_Sequence_ID,Description,Name,AD_Org_ID,AD_Client_ID,Updated,UpdatedBy,Created,CreatedBy,IsActive) VALUES (1,'N',50000,'Y',1000000,1000000,'N','Y',200003,'Table AD_ToolBarButton','AD_ToolBarButton',0,0,TO_TIMESTAMP('2012-03-28 10:13:39','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2012-03-28 10:13:39','YYYY-MM-DD HH24:MI:SS'),100,'Y') +; + +-- Mar 28, 2012 10:13:53 AM COT +UPDATE AD_Element SET ColumnName='AD_ToolBarButton_ID', Name='ToolBar Button', PrintName='ToolBar Button',Updated=TO_TIMESTAMP('2012-03-28 10:13:53','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=200016 +; + +-- Mar 28, 2012 10:13:53 AM COT +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=200016 +; + +-- Mar 28, 2012 10:13:53 AM COT +UPDATE AD_Column SET ColumnName='AD_ToolBarButton_ID', Name='ToolBar Button', Description=NULL, Help=NULL WHERE AD_Element_ID=200016 +; + +-- Mar 28, 2012 10:13:53 AM COT +UPDATE AD_Process_Para SET ColumnName='AD_ToolBarButton_ID', Name='ToolBar Button', Description=NULL, Help=NULL, AD_Element_ID=200016 WHERE UPPER(ColumnName)='AD_TOOLBARBUTTON_ID' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL +; + +-- Mar 28, 2012 10:13:53 AM COT +UPDATE AD_Process_Para SET ColumnName='AD_ToolBarButton_ID', Name='ToolBar Button', Description=NULL, Help=NULL WHERE AD_Element_ID=200016 AND IsCentrallyMaintained='Y' +; + +-- Mar 28, 2012 10:13:53 AM COT +UPDATE AD_Field SET Name='ToolBar Button', Description=NULL, Help=NULL WHERE AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=200016) AND IsCentrallyMaintained='Y' +; + +-- Mar 28, 2012 10:13:53 AM COT +UPDATE AD_PrintFormatItem SET PrintName='ToolBar Button', Name='ToolBar Button' WHERE IsCentrallyMaintained='Y' AND EXISTS (SELECT * FROM AD_Column c WHERE c.AD_Column_ID=AD_PrintFormatItem.AD_Column_ID AND c.AD_Element_ID=200016) +; + +-- Mar 28, 2012 10:14:52 AM COT +UPDATE AD_Column SET Help='The Classname identifies the Java classname used by this report or process.', IsSelectionColumn='N', AD_Element_ID=1299, ColumnName='Classname', Description='Java Classname', Name='Classname',Updated=TO_TIMESTAMP('2012-03-28 10:14:52','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200087 +; + +-- Mar 28, 2012 10:14:52 AM COT +UPDATE AD_Column_Trl SET IsTranslated='N' WHERE AD_Column_ID=200087 +; + +-- Mar 28, 2012 10:14:52 AM COT +UPDATE AD_Field SET Name='Classname', Description='Java Classname', Help='The Classname identifies the Java classname used by this report or process.' WHERE AD_Column_ID=200087 AND IsCentrallyMaintained='Y' +; + +-- Mar 28, 2012 10:15:18 AM COT +INSERT INTO AD_Element (AD_Element_ID,ColumnName,EntityType,Name,PrintName,AD_Client_ID,Created,Updated,IsActive,AD_Org_ID,CreatedBy,UpdatedBy) VALUES (200017,'ComponentName','D','Component Name','Component Name',0,TO_TIMESTAMP('2012-03-28 10:15:17','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2012-03-28 10:15:17','YYYY-MM-DD HH24:MI:SS'),'Y',0,100,100) +; + +-- Mar 28, 2012 10:15:18 AM COT +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Help,PO_Description,PO_Help,Name,Description,PrintName,PO_PrintName,PO_Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Help,t.PO_Description,t.PO_Help,t.Name,t.Description,t.PrintName,t.PO_PrintName,t.PO_Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=200017 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID) +; + +-- Mar 28, 2012 10:15:40 AM COT +UPDATE AD_Column SET IsMandatory='Y', Help=NULL, FieldLength=255, AD_Reference_ID=10, AD_Element_ID=200017, ColumnName='ComponentName', Description=NULL, Name='Component Name',Updated=TO_TIMESTAMP('2012-03-28 10:15:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200088 +; + +-- Mar 28, 2012 10:15:40 AM COT +UPDATE AD_Column_Trl SET IsTranslated='N' WHERE AD_Column_ID=200088 +; + +-- Mar 28, 2012 10:15:40 AM COT +UPDATE AD_Field SET Name='Component Name', Description=NULL, Help=NULL WHERE AD_Column_ID=200088 AND IsCentrallyMaintained='Y' +; + +-- Mar 28, 2012 10:15:43 AM COT +UPDATE AD_Column SET IsMandatory='Y',Updated=TO_TIMESTAMP('2012-03-28 10:15:43','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200087 +; + +-- Mar 28, 2012 10:16:24 AM COT +UPDATE AD_Column SET DefaultValue='N', Help='The migration "resets" the system to the current/original setting. If selected you can save the customization and re-apply it. Please note that you need to check, if your customization has no negative side effect in the new release.', FieldLength=1, IsSelectionColumn='N', AD_Reference_ID=20, AD_Element_ID=2643, ColumnName='IsCustomization', Description='The change is a customization of the data dictionary and can be applied after Migration', Name='Customization',Updated=TO_TIMESTAMP('2012-03-28 10:16:24','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200094 +; + +-- Mar 28, 2012 10:16:24 AM COT +UPDATE AD_Column_Trl SET IsTranslated='N' WHERE AD_Column_ID=200094 +; + +-- Mar 28, 2012 10:16:24 AM COT +UPDATE AD_Field SET Name='Customization', Description='The change is a customization of the data dictionary and can be applied after Migration', Help='The migration "resets" the system to the current/original setting. If selected you can save the customization and re-apply it. Please note that you need to check, if your customization has no negative side effect in the new release.' WHERE AD_Column_ID=200094 AND IsCentrallyMaintained='Y' +; + +-- Mar 28, 2012 10:17:30 AM COT +INSERT INTO AD_Element (AD_Element_ID,ColumnName,EntityType,Name,Description,PrintName,AD_Client_ID,Created,Updated,IsActive,AD_Org_ID,CreatedBy,UpdatedBy) VALUES (200018,'ActionClassName','D','Action Class Name','The class name that implements the interface for toolbar actions','Action Class Name',0,TO_TIMESTAMP('2012-03-28 10:17:29','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2012-03-28 10:17:29','YYYY-MM-DD HH24:MI:SS'),'Y',0,100,100) +; + +-- Mar 28, 2012 10:17:30 AM COT +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Help,PO_Description,PO_Help,Name,Description,PrintName,PO_PrintName,PO_Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Help,t.PO_Description,t.PO_Help,t.Name,t.Description,t.PrintName,t.PO_PrintName,t.PO_Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=200018 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID) +; + +-- Mar 28, 2012 10:17:52 AM COT +INSERT INTO AD_Column (AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,IsAllowCopy,CreatedBy,Updated,AD_Client_ID,AD_Org_ID,IsActive,Created,UpdatedBy) VALUES (200095,200003,'D',0,'N','N','N',0,'N',255,'N',10,'N','N',200018,'N','Y','N','Y','N','ActionClassName','The class name that implements the interface for toolbar actions','Action Class Name','Y',100,TO_TIMESTAMP('2012-03-28 10:17:51','YYYY-MM-DD HH24:MI:SS'),0,0,'Y',TO_TIMESTAMP('2012-03-28 10:17:51','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Mar 28, 2012 10:17:52 AM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200095 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 28, 2012 10:18:46 AM COT +INSERT INTO AD_Element (AD_Element_ID,ColumnName,Help,EntityType,Name,Description,PrintName,AD_Client_ID,Created,Updated,IsActive,AD_Org_ID,CreatedBy,UpdatedBy) VALUES (200019,'ActionName','Used to get the corresponding message and Icon name prefix','D','Action Name','Action name on the toolbar','Action Name',0,TO_TIMESTAMP('2012-03-28 10:18:45','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2012-03-28 10:18:45','YYYY-MM-DD HH24:MI:SS'),'Y',0,100,100) +; + +-- Mar 28, 2012 10:18:46 AM COT +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Help,PO_Description,PO_Help,Name,Description,PrintName,PO_PrintName,PO_Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Help,t.PO_Description,t.PO_Help,t.Name,t.Description,t.PrintName,t.PO_PrintName,t.PO_Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=200019 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID) +; + +-- Mar 28, 2012 10:19:02 AM COT +INSERT INTO AD_Column (AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,Help,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,IsAllowCopy,CreatedBy,Updated,AD_Client_ID,AD_Org_ID,IsActive,Created,UpdatedBy) VALUES (200096,200003,'D',0,'N','N','N',0,'Used to get the corresponding message and Icon name prefix','N',60,'N',10,'N','N',200019,'N','Y','N','Y','N','ActionName','Action name on the toolbar','Action Name','Y',100,TO_TIMESTAMP('2012-03-28 10:19:01','YYYY-MM-DD HH24:MI:SS'),0,0,'Y',TO_TIMESTAMP('2012-03-28 10:19:01','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Mar 28, 2012 10:19:02 AM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200096 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 28, 2012 10:20:14 AM COT +INSERT INTO AD_Element (AD_Element_ID,ColumnName,EntityType,Name,Description,PrintName,AD_Client_ID,Created,Updated,IsActive,AD_Org_ID,CreatedBy,UpdatedBy) VALUES (200020,'KeyStroke_KeyCode','D','KeyCode','KeyCode for shortcuts','KeyCode',0,TO_TIMESTAMP('2012-03-28 10:20:13','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2012-03-28 10:20:13','YYYY-MM-DD HH24:MI:SS'),'Y',0,100,100) +; + +-- Mar 28, 2012 10:20:14 AM COT +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Help,PO_Description,PO_Help,Name,Description,PrintName,PO_PrintName,PO_Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Help,t.PO_Description,t.PO_Help,t.Name,t.Description,t.PrintName,t.PO_PrintName,t.PO_Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=200020 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID) +; + +-- Mar 28, 2012 10:20:33 AM COT +INSERT INTO AD_Element (AD_Element_ID,ColumnName,EntityType,Name,Description,PrintName,AD_Client_ID,Created,Updated,IsActive,AD_Org_ID,CreatedBy,UpdatedBy) VALUES (200021,'KeyStroke_Modifiers','D','Keystroke Modifiers','Keystroke Modifiers for shortcuts','Keystroke Modifiers',0,TO_TIMESTAMP('2012-03-28 10:20:33','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2012-03-28 10:20:33','YYYY-MM-DD HH24:MI:SS'),'Y',0,100,100) +; + +-- Mar 28, 2012 10:20:33 AM COT +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Help,PO_Description,PO_Help,Name,Description,PrintName,PO_PrintName,PO_Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Help,t.PO_Description,t.PO_Help,t.Name,t.Description,t.PrintName,t.PO_PrintName,t.PO_Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=200021 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID) +; + +-- Mar 28, 2012 10:20:51 AM COT +INSERT INTO AD_Column (AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,IsAllowCopy,CreatedBy,Updated,AD_Client_ID,AD_Org_ID,IsActive,Created,UpdatedBy) VALUES (200097,200003,'D',0,'N','N','N',0,'N',10,'N',11,'N','N',200020,'N','Y','N','Y','N','KeyStroke_KeyCode','KeyCode for shortcuts','KeyCode','Y',100,TO_TIMESTAMP('2012-03-28 10:20:51','YYYY-MM-DD HH24:MI:SS'),0,0,'Y',TO_TIMESTAMP('2012-03-28 10:20:51','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Mar 28, 2012 10:20:51 AM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200097 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 28, 2012 10:21:05 AM COT +INSERT INTO AD_Column (AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,IsAllowCopy,CreatedBy,Updated,AD_Client_ID,AD_Org_ID,IsActive,Created,UpdatedBy) VALUES (200098,200003,'D',0,'N','N','N',0,'N',10,'N',11,'N','N',200021,'N','Y','N','Y','N','KeyStroke_Modifiers','Keystroke Modifiers for shortcuts','Keystroke Modifiers','Y',100,TO_TIMESTAMP('2012-03-28 10:21:05','YYYY-MM-DD HH24:MI:SS'),0,0,'Y',TO_TIMESTAMP('2012-03-28 10:21:05','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Mar 28, 2012 10:21:05 AM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200098 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 28, 2012 10:21:24 AM COT +CREATE TABLE AD_ToolBarButton (ActionClassName VARCHAR(255) DEFAULT NULL , ActionName VARCHAR(60) DEFAULT NULL , AD_Client_ID NUMERIC(10) NOT NULL, AD_Org_ID NUMERIC(10) NOT NULL, AD_ToolBarButton_ID NUMERIC(10) NOT NULL, Classname VARCHAR(255) NOT NULL, ComponentName VARCHAR(255) NOT NULL, Created TIMESTAMP NOT NULL, CreatedBy NUMERIC(10) NOT NULL, IsActive CHAR(1) DEFAULT 'Y' CHECK (IsActive IN ('Y','N')) NOT NULL, IsCustomization CHAR(1) DEFAULT 'N' CHECK (IsCustomization IN ('Y','N')) NOT NULL, KeyStroke_KeyCode NUMERIC(10) DEFAULT NULL , KeyStroke_Modifiers NUMERIC(10) DEFAULT NULL , Name VARCHAR(60) NOT NULL, Updated TIMESTAMP NOT NULL, UpdatedBy NUMERIC(10) NOT NULL, CONSTRAINT AD_ToolBarButton_Key PRIMARY KEY (AD_ToolBarButton_ID)) +; + +-- Mar 28, 2012 10:22:18 AM COT +INSERT INTO AD_Window (AD_Window_ID,WindowType,IsSOTrx,IsDefault,IsBetaFunctionality,WinHeight,WinWidth,EntityType,Name,IsActive,Created,UpdatedBy,CreatedBy,Updated,AD_Org_ID,AD_Client_ID,Processing) VALUES (200000,'M','Y','N','N',0,0,'D','ToolBar Button','Y',TO_TIMESTAMP('2012-03-28 10:22:18','YYYY-MM-DD HH24:MI:SS'),100,100,TO_TIMESTAMP('2012-03-28 10:22:18','YYYY-MM-DD HH24:MI:SS'),0,0,'N') +; + +-- Mar 28, 2012 10:22:19 AM COT +INSERT INTO AD_Window_Trl (AD_Language,AD_Window_ID, Help,Name,Description, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Window_ID, t.Help,t.Name,t.Description, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Window t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Window_ID=200000 AND NOT EXISTS (SELECT * FROM AD_Window_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Window_ID=t.AD_Window_ID) +; + +-- Mar 28, 2012 10:22:27 AM COT +UPDATE AD_Table SET AD_Window_ID=200000,Updated=TO_TIMESTAMP('2012-03-28 10:22:27','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Table_ID=200003 +; + +-- Mar 28, 2012 10:23:18 AM COT +INSERT INTO AD_Tab (IsSingleRow,AD_Window_ID,SeqNo,IsTranslationTab,IsSortTab,AD_Table_ID,AD_Tab_ID,ImportFields,HasTree,IsInfoTab,IsReadOnly,TabLevel,IsInsertRecord,IsAdvancedTab,EntityType,Name,AD_Client_ID,AD_Org_ID,Created,CreatedBy,Updated,IsActive,UpdatedBy,Processing) VALUES ('Y',200000,10,'N','N',200003,200002,'N','N','N','N',0,'Y','N','D','ToolBar Button',0,0,TO_TIMESTAMP('2012-03-28 10:23:17','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2012-03-28 10:23:17','YYYY-MM-DD HH24:MI:SS'),'Y',100,'N') +; + +-- Mar 28, 2012 10:23:18 AM COT +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) 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 FROM AD_Language l, AD_Tab t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Tab_ID=200002 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) +; + +-- Mar 28, 2012 10:23:21 AM COT +INSERT INTO AD_Field (IsEncrypted,DisplayLength,IsDisplayed,IsSameLine,IsHeading,AD_Column_ID,IsFieldOnly,IsCentrallyMaintained,AD_Tab_ID,AD_Field_ID,IsReadOnly,EntityType,Description,Name,UpdatedBy,AD_Org_ID,IsActive,Created,AD_Client_ID,CreatedBy,Updated) VALUES ('N',255,'Y','N','N',200095,'N','Y',200002,200051,'N','D','The class name that implements the interface for toolbar actions','Action Class Name',100,0,'Y',TO_TIMESTAMP('2012-03-28 10:23:20','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2012-03-28 10:23:20','YYYY-MM-DD HH24:MI:SS')) +; + +-- Mar 28, 2012 10:23:21 AM COT +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) 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 FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200051 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Mar 28, 2012 10:23:22 AM COT +INSERT INTO AD_Field (IsEncrypted,DisplayLength,IsDisplayed,IsSameLine,IsHeading,AD_Column_ID,IsFieldOnly,IsCentrallyMaintained,AD_Tab_ID,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,UpdatedBy,AD_Org_ID,IsActive,Created,AD_Client_ID,CreatedBy,Updated) VALUES ('N',60,'Y','N','N',200096,'N','Y',200002,200052,'N','Used to get the corresponding message and Icon name prefix','D','Action name on the toolbar','Action Name',100,0,'Y',TO_TIMESTAMP('2012-03-28 10:23:21','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2012-03-28 10:23:21','YYYY-MM-DD HH24:MI:SS')) +; + +-- Mar 28, 2012 10:23:22 AM COT +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) 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 FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200052 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Mar 28, 2012 10:23:22 AM COT +INSERT INTO AD_Field (IsEncrypted,DisplayLength,IsDisplayed,IsSameLine,IsHeading,AD_Column_ID,IsFieldOnly,IsCentrallyMaintained,AD_Tab_ID,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,UpdatedBy,AD_Org_ID,IsActive,Created,AD_Client_ID,CreatedBy,Updated) VALUES ('N',1,'Y','N','N',200089,'N','Y',200002,200053,'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',100,0,'Y',TO_TIMESTAMP('2012-03-28 10:23:22','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2012-03-28 10:23:22','YYYY-MM-DD HH24:MI:SS')) +; + +-- Mar 28, 2012 10:23:22 AM COT +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) 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 FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200053 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Mar 28, 2012 10:23:23 AM COT +INSERT INTO AD_Field (IsEncrypted,DisplayLength,IsDisplayed,IsSameLine,IsHeading,AD_Column_ID,IsFieldOnly,IsCentrallyMaintained,AD_Tab_ID,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,UpdatedBy,AD_Org_ID,IsActive,Created,AD_Client_ID,CreatedBy,Updated) VALUES ('N',255,'Y','N','N',200087,'N','Y',200002,200054,'N','The Classname identifies the Java classname used by this report or process.','D','Java Classname','Classname',100,0,'Y',TO_TIMESTAMP('2012-03-28 10:23:22','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2012-03-28 10:23:22','YYYY-MM-DD HH24:MI:SS')) +; + +-- Mar 28, 2012 10:23:23 AM COT +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) 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 FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200054 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Mar 28, 2012 10:23:23 AM COT +INSERT INTO AD_Field (IsEncrypted,DisplayLength,IsDisplayed,IsSameLine,IsHeading,AD_Column_ID,IsFieldOnly,IsCentrallyMaintained,AD_Tab_ID,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,UpdatedBy,AD_Org_ID,IsActive,Created,AD_Client_ID,CreatedBy,Updated) VALUES ('N',22,'Y','N','N',200083,'N','Y',200002,200055,'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',100,0,'Y',TO_TIMESTAMP('2012-03-28 10:23:23','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2012-03-28 10:23:23','YYYY-MM-DD HH24:MI:SS')) +; + +-- Mar 28, 2012 10:23:23 AM COT +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) 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 FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200055 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Mar 28, 2012 10:23:23 AM COT +INSERT INTO AD_Field (IsEncrypted,DisplayLength,IsDisplayed,IsSameLine,IsHeading,AD_Column_ID,IsFieldOnly,IsCentrallyMaintained,AD_Tab_ID,AD_Field_ID,IsReadOnly,EntityType,Name,UpdatedBy,AD_Org_ID,IsActive,Created,AD_Client_ID,CreatedBy,Updated) VALUES ('N',255,'Y','N','N',200088,'N','Y',200002,200056,'N','D','Component Name',100,0,'Y',TO_TIMESTAMP('2012-03-28 10:23:23','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2012-03-28 10:23:23','YYYY-MM-DD HH24:MI:SS')) +; + +-- Mar 28, 2012 10:23:23 AM COT +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) 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 FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200056 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Mar 28, 2012 10:23:24 AM COT +INSERT INTO AD_Field (IsEncrypted,DisplayLength,IsDisplayed,IsSameLine,IsHeading,AD_Column_ID,IsFieldOnly,IsCentrallyMaintained,AD_Tab_ID,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,UpdatedBy,AD_Org_ID,IsActive,Created,AD_Client_ID,CreatedBy,Updated) VALUES ('N',1,'Y','N','N',200094,'N','Y',200002,200057,'N','The migration "resets" the system to the current/original setting. If selected you can save the customization and re-apply it. Please note that you need to check, if your customization has no negative side effect in the new release.','D','The change is a customization of the data dictionary and can be applied after Migration','Customization',100,0,'Y',TO_TIMESTAMP('2012-03-28 10:23:23','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2012-03-28 10:23:23','YYYY-MM-DD HH24:MI:SS')) +; + +-- Mar 28, 2012 10:23:24 AM COT +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) 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 FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200057 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Mar 28, 2012 10:23:24 AM COT +INSERT INTO AD_Field (IsEncrypted,DisplayLength,IsDisplayed,IsSameLine,IsHeading,AD_Column_ID,IsFieldOnly,IsCentrallyMaintained,AD_Tab_ID,AD_Field_ID,IsReadOnly,EntityType,Description,Name,UpdatedBy,AD_Org_ID,IsActive,Created,AD_Client_ID,CreatedBy,Updated) VALUES ('N',10,'Y','N','N',200097,'N','Y',200002,200058,'N','D','KeyCode for shortcuts','KeyCode',100,0,'Y',TO_TIMESTAMP('2012-03-28 10:23:24','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2012-03-28 10:23:24','YYYY-MM-DD HH24:MI:SS')) +; + +-- Mar 28, 2012 10:23:24 AM COT +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) 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 FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200058 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Mar 28, 2012 10:23:25 AM COT +INSERT INTO AD_Field (IsEncrypted,DisplayLength,IsDisplayed,IsSameLine,IsHeading,AD_Column_ID,IsFieldOnly,IsCentrallyMaintained,AD_Tab_ID,AD_Field_ID,IsReadOnly,EntityType,Description,Name,UpdatedBy,AD_Org_ID,IsActive,Created,AD_Client_ID,CreatedBy,Updated) VALUES ('N',10,'Y','N','N',200098,'N','Y',200002,200059,'N','D','Keystroke Modifiers for shortcuts','Keystroke Modifiers',100,0,'Y',TO_TIMESTAMP('2012-03-28 10:23:24','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2012-03-28 10:23:24','YYYY-MM-DD HH24:MI:SS')) +; + +-- Mar 28, 2012 10:23:25 AM COT +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) 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 FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200059 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Mar 28, 2012 10:23:25 AM COT +INSERT INTO AD_Field (IsEncrypted,DisplayLength,IsDisplayed,IsSameLine,IsHeading,AD_Column_ID,IsFieldOnly,IsCentrallyMaintained,AD_Tab_ID,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,UpdatedBy,AD_Org_ID,IsActive,Created,AD_Client_ID,CreatedBy,Updated) VALUES ('N',60,'Y','N','N',200091,'N','Y',200002,200060,'N','The name of an entity (record) is used as an default search option in addition to the search key. The name is up to 60 characters in length.','D','Alphanumeric identifier of the entity','Name',100,0,'Y',TO_TIMESTAMP('2012-03-28 10:23:25','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2012-03-28 10:23:25','YYYY-MM-DD HH24:MI:SS')) +; + +-- Mar 28, 2012 10:23:25 AM COT +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) 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 FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200060 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Mar 28, 2012 10:23:26 AM COT +INSERT INTO AD_Field (IsEncrypted,DisplayLength,IsDisplayed,IsSameLine,IsHeading,AD_Column_ID,IsFieldOnly,IsCentrallyMaintained,AD_Tab_ID,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,UpdatedBy,AD_Org_ID,IsActive,Created,AD_Client_ID,CreatedBy,Updated) VALUES ('N',22,'Y','N','N',200084,'N','Y',200002,200061,'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',100,0,'Y',TO_TIMESTAMP('2012-03-28 10:23:25','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2012-03-28 10:23:25','YYYY-MM-DD HH24:MI:SS')) +; + +-- Mar 28, 2012 10:23:26 AM COT +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) 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 FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200061 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Mar 28, 2012 10:23:26 AM COT +INSERT INTO AD_Field (IsEncrypted,DisplayLength,IsDisplayed,IsSameLine,IsHeading,AD_Column_ID,IsFieldOnly,IsCentrallyMaintained,AD_Tab_ID,AD_Field_ID,IsReadOnly,EntityType,Name,UpdatedBy,AD_Org_ID,IsActive,Created,AD_Client_ID,CreatedBy,Updated) VALUES ('N',22,'N','N','N',200090,'N','Y',200002,200062,'N','D','ToolBar Button',100,0,'Y',TO_TIMESTAMP('2012-03-28 10:23:26','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2012-03-28 10:23:26','YYYY-MM-DD HH24:MI:SS')) +; + +-- Mar 28, 2012 10:23:26 AM COT +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) 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 FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200062 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Mar 28, 2012 10:24:08 AM COT +UPDATE AD_Field SET SeqNo=10,IsDisplayed='Y' WHERE AD_Field_ID=200055 +; + +-- Mar 28, 2012 10:24:08 AM COT +UPDATE AD_Field SET SeqNo=20,IsDisplayed='Y' WHERE AD_Field_ID=200061 +; + +-- Mar 28, 2012 10:24:08 AM COT +UPDATE AD_Field SET SeqNo=30,IsDisplayed='Y' WHERE AD_Field_ID=200060 +; + +-- Mar 28, 2012 10:24:08 AM COT +UPDATE AD_Field SET SeqNo=40,IsDisplayed='Y' WHERE AD_Field_ID=200054 +; + +-- Mar 28, 2012 10:24:08 AM COT +UPDATE AD_Field SET SeqNo=50,IsDisplayed='Y' WHERE AD_Field_ID=200056 +; + +-- Mar 28, 2012 10:24:08 AM COT +UPDATE AD_Field SET SeqNo=60,IsDisplayed='Y' WHERE AD_Field_ID=200057 +; + +-- Mar 28, 2012 10:24:08 AM COT +UPDATE AD_Field SET SeqNo=70,IsDisplayed='Y' WHERE AD_Field_ID=200051 +; + +-- Mar 28, 2012 10:24:08 AM COT +UPDATE AD_Field SET SeqNo=80,IsDisplayed='Y' WHERE AD_Field_ID=200052 +; + +-- Mar 28, 2012 10:24:08 AM COT +UPDATE AD_Field SET SeqNo=90,IsDisplayed='Y' WHERE AD_Field_ID=200058 +; + +-- Mar 28, 2012 10:24:08 AM COT +UPDATE AD_Field SET SeqNo=100,IsDisplayed='Y' WHERE AD_Field_ID=200059 +; + +-- Mar 28, 2012 10:24:08 AM COT +UPDATE AD_Field SET SeqNo=110,IsDisplayed='Y' WHERE AD_Field_ID=200053 +; + +-- Mar 28, 2012 10:24:17 AM COT +UPDATE AD_Field SET IsSameLine='Y',Updated=TO_TIMESTAMP('2012-03-28 10:24:17','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200061 +; + +-- Mar 28, 2012 10:25:03 AM COT +UPDATE AD_Field SET DisplayLogic='@IsCustomization@=Y',Updated=TO_TIMESTAMP('2012-03-28 10:25:03','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200051 +; + +-- Mar 28, 2012 10:25:06 AM COT +UPDATE AD_Field SET DisplayLogic='@IsCustomization@=Y',Updated=TO_TIMESTAMP('2012-03-28 10:25:06','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200052 +; + +-- Mar 28, 2012 10:25:08 AM COT +UPDATE AD_Field SET DisplayLogic='@IsCustomization@=Y',Updated=TO_TIMESTAMP('2012-03-28 10:25:08','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200058 +; + +-- Mar 28, 2012 10:25:12 AM COT +UPDATE AD_Field SET IsSameLine='Y', DisplayLogic='@IsCustomization@=Y',Updated=TO_TIMESTAMP('2012-03-28 10:25:12','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200059 +; + +-- Mar 28, 2012 10:25:49 AM COT +INSERT INTO AD_Menu (AD_Window_ID,AD_Menu_ID,IsSummary,"action",IsSOTrx,IsReadOnly,EntityType,IsCentrallyMaintained,Name,Created,IsActive,UpdatedBy,AD_Client_ID,CreatedBy,Updated,AD_Org_ID) VALUES (200000,200000,'N','W','N','N','D','Y','ToolBar Button',TO_TIMESTAMP('2012-03-28 10:25:48','YYYY-MM-DD HH24:MI:SS'),'Y',100,0,100,TO_TIMESTAMP('2012-03-28 10:25:48','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Mar 28, 2012 10:25:49 AM COT +INSERT INTO AD_Menu_Trl (AD_Language,AD_Menu_ID, Name,Description, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Menu_ID, t.Name,t.Description, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Menu t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Menu_ID=200000 AND NOT EXISTS (SELECT * FROM AD_Menu_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Menu_ID=t.AD_Menu_ID) +; + +-- Mar 28, 2012 10:25:49 AM COT +INSERT INTO AD_TreeNodeMM (AD_Client_ID,AD_Org_ID, IsActive,Created,CreatedBy,Updated,UpdatedBy, AD_Tree_ID, Node_ID, Parent_ID, SeqNo) SELECT t.AD_Client_ID, 0, 'Y', CURRENT_TIMESTAMP, 100, CURRENT_TIMESTAMP, 100,t.AD_Tree_ID, 200000, 0, 999 FROM AD_Tree t WHERE t.AD_Client_ID=0 AND t.IsActive='Y' AND t.IsAllNodes='Y' AND t.TreeType='MM' AND NOT EXISTS (SELECT * FROM AD_TreeNodeMM e WHERE e.AD_Tree_ID=t.AD_Tree_ID AND Node_ID=200000) +; + +-- Mar 28, 2012 10:26:06 AM COT +UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=0, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=53203 +; + +-- Mar 28, 2012 10:26:06 AM COT +UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=1, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=586 +; + +-- Mar 28, 2012 10:26:06 AM COT +UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=2, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=138 +; + +-- Mar 28, 2012 10:26:06 AM COT +UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=3, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=139 +; + +-- Mar 28, 2012 10:26:06 AM COT +UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=4, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=249 +; + +-- Mar 28, 2012 10:26:06 AM COT +UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=5, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=141 +; + +-- Mar 28, 2012 10:26:06 AM COT +UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=6, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=300 +; + +-- Mar 28, 2012 10:26:06 AM COT +UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=7, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=589 +; + +-- Mar 28, 2012 10:26:06 AM COT +UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=8, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=200000 +; + +-- Mar 28, 2012 10:26:06 AM COT +UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=9, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=295 +; + +-- Mar 28, 2012 10:26:06 AM COT +UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=10, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=216 +; + +-- Mar 28, 2012 10:26:06 AM COT +UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=11, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=140 +; + +-- Mar 28, 2012 10:26:06 AM COT +UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=12, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=142 +; + +-- Mar 28, 2012 10:26:06 AM COT +UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=13, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=53012 +; + +-- Mar 28, 2012 10:26:06 AM COT +UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=14, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=143 +; + +-- Mar 28, 2012 10:26:06 AM COT +UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=15, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=201 +; + +-- Mar 28, 2012 10:26:06 AM COT +UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=16, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=176 +; + +-- Mar 28, 2012 10:26:06 AM COT +UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=17, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=53086 +; + +-- Mar 28, 2012 10:26:06 AM COT +UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=18, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=239 +; + +-- Mar 28, 2012 10:26:06 AM COT +UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=19, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=517 +; + +-- Mar 28, 2012 10:26:06 AM COT +UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=20, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=499 +; + +-- Mar 28, 2012 10:26:06 AM COT +UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=21, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=53089 +; + +-- Mar 28, 2012 10:26:06 AM COT +UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=22, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=53090 +; + +-- Mar 28, 2012 10:26:06 AM COT +UPDATE AD_TreeNodeMM SET Parent_ID=153, SeqNo=23, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=50001 +; + +-- Mar 28, 2012 10:49:55 AM COT +UPDATE AD_Column SET IsAllowCopy='N',Updated=TO_TIMESTAMP('2012-03-28 10:49:55','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200083 +; + +-- Mar 28, 2012 10:50:25 AM COT +UPDATE AD_Column SET IsAllowCopy='N',Updated=TO_TIMESTAMP('2012-03-28 10:50:25','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200084 +; + +-- Mar 28, 2012 10:50:26 AM COT +UPDATE AD_Column SET IsAllowCopy='N',Updated=TO_TIMESTAMP('2012-03-28 10:50:26','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200085 +; + +-- Mar 28, 2012 10:50:37 AM COT +UPDATE AD_Column SET IsAllowCopy='N',Updated=TO_TIMESTAMP('2012-03-28 10:50:37','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200086 +; + +-- Mar 28, 2012 10:50:39 AM COT +UPDATE AD_Column SET IsAllowCopy='N',Updated=TO_TIMESTAMP('2012-03-28 10:50:39','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200089 +; + +-- Mar 28, 2012 10:50:43 AM COT +UPDATE AD_Column SET IsUpdateable='N', IsAllowCopy='N',Updated=TO_TIMESTAMP('2012-03-28 10:50:43','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200090 +; + +-- Mar 28, 2012 10:50:44 AM COT +UPDATE AD_Column SET IsAllowCopy='N',Updated=TO_TIMESTAMP('2012-03-28 10:50:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200092 +; + +-- Mar 28, 2012 10:50:46 AM COT +UPDATE AD_Column SET IsAllowCopy='N',Updated=TO_TIMESTAMP('2012-03-28 10:50:46','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200093 +; + +-- Mar 28, 2012 10:33:16 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_TIMESTAMP('2012-03-28 10:33:16','YYYY-MM-DD HH24:MI:SS'),100,'Ignore','Y','Window - Ignore',TO_TIMESTAMP('2012-03-28 10:33:16','YYYY-MM-DD HH24:MI:SS'),100,200000,'org.compiere.apps.APanel','N',0,0) +; + +-- Mar 28, 2012 11:08:13 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_TIMESTAMP('2012-03-28 11:08:12','YYYY-MM-DD HH24:MI:SS'),100,'Help','Y','Window - Help',TO_TIMESTAMP('2012-03-28 11:08:12','YYYY-MM-DD HH24:MI:SS'),100,200001,'org.compiere.apps.APanel','N',0,0) +; + +-- Mar 28, 2012 11:09:27 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_TIMESTAMP('2012-03-28 11:09:26','YYYY-MM-DD HH24:MI:SS'),100,'New','Y','Window - New',TO_TIMESTAMP('2012-03-28 11:09:26','YYYY-MM-DD HH24:MI:SS'),100,200002,'org.compiere.apps.APanel','N',0,0) +; + +-- Mar 28, 2012 11:09:36 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_TIMESTAMP('2012-03-28 11:09:36','YYYY-MM-DD HH24:MI:SS'),100,'Copy','Y','Window - Copy',TO_TIMESTAMP('2012-03-28 11:09:36','YYYY-MM-DD HH24:MI:SS'),100,200003,'org.compiere.apps.APanel','N',0,0) +; + +-- Mar 28, 2012 11:09:43 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_TIMESTAMP('2012-03-28 11:09:43','YYYY-MM-DD HH24:MI:SS'),100,'Delete','Y','Window - Delete',TO_TIMESTAMP('2012-03-28 11:09:43','YYYY-MM-DD HH24:MI:SS'),100,200004,'org.compiere.apps.APanel','N',0,0) +; + +-- Mar 28, 2012 11:09:52 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_TIMESTAMP('2012-03-28 11:09:52','YYYY-MM-DD HH24:MI:SS'),100,'DeleteSelection','Y','Window - DeleteSelection',TO_TIMESTAMP('2012-03-28 11:09:52','YYYY-MM-DD HH24:MI:SS'),100,200005,'org.compiere.apps.APanel','N',0,0) +; + +-- Mar 28, 2012 11:10:01 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_TIMESTAMP('2012-03-28 11:10:01','YYYY-MM-DD HH24:MI:SS'),100,'Save','Y','Window - Save',TO_TIMESTAMP('2012-03-28 11:10:01','YYYY-MM-DD HH24:MI:SS'),100,200006,'org.compiere.apps.APanel','N',0,0) +; + +-- Mar 28, 2012 11:10:12 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_TIMESTAMP('2012-03-28 11:10:11','YYYY-MM-DD HH24:MI:SS'),100,'Refresh','Y','Window - Refresh',TO_TIMESTAMP('2012-03-28 11:10:11','YYYY-MM-DD HH24:MI:SS'),100,200007,'org.compiere.apps.APanel','N',0,0) +; + +-- Mar 28, 2012 11:10:19 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_TIMESTAMP('2012-03-28 11:10:18','YYYY-MM-DD HH24:MI:SS'),100,'Find','Y','Window - Find',TO_TIMESTAMP('2012-03-28 11:10:18','YYYY-MM-DD HH24:MI:SS'),100,200008,'org.compiere.apps.APanel','N',0,0) +; + +-- Mar 28, 2012 11:10:25 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_TIMESTAMP('2012-03-28 11:10:25','YYYY-MM-DD HH24:MI:SS'),100,'Attachment','Y','Window - Attachment',TO_TIMESTAMP('2012-03-28 11:10:25','YYYY-MM-DD HH24:MI:SS'),100,200009,'org.compiere.apps.APanel','N',0,0) +; + +-- Mar 28, 2012 11:10:31 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_TIMESTAMP('2012-03-28 11:10:31','YYYY-MM-DD HH24:MI:SS'),100,'Chat','Y','Window - Chat',TO_TIMESTAMP('2012-03-28 11:10:31','YYYY-MM-DD HH24:MI:SS'),100,200010,'org.compiere.apps.APanel','N',0,0) +; + +-- Mar 28, 2012 11:10:39 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_TIMESTAMP('2012-03-28 11:10:39','YYYY-MM-DD HH24:MI:SS'),100,'Multi','Y','Window - Multi',TO_TIMESTAMP('2012-03-28 11:10:39','YYYY-MM-DD HH24:MI:SS'),100,200011,'org.compiere.apps.APanel','N',0,0) +; + +-- Mar 28, 2012 11:10:45 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_TIMESTAMP('2012-03-28 11:10:44','YYYY-MM-DD HH24:MI:SS'),100,'History','Y','Window - History',TO_TIMESTAMP('2012-03-28 11:10:44','YYYY-MM-DD HH24:MI:SS'),100,200012,'org.compiere.apps.APanel','N',0,0) +; + +-- Mar 28, 2012 11:10:49 AM COT +UPDATE AD_ToolBarButton SET ComponentName='Home', Name='Window - Home',Updated=TO_TIMESTAMP('2012-03-28 11:10:49','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_ToolBarButton_ID=200012 +; + +-- Mar 28, 2012 11:10:55 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_TIMESTAMP('2012-03-28 11:10:55','YYYY-MM-DD HH24:MI:SS'),100,'Parent','Y','Window - Parent',TO_TIMESTAMP('2012-03-28 11:10:55','YYYY-MM-DD HH24:MI:SS'),100,200013,'org.compiere.apps.APanel','N',0,0) +; + +-- Mar 28, 2012 11:11:02 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_TIMESTAMP('2012-03-28 11:11:01','YYYY-MM-DD HH24:MI:SS'),100,'Detail','Y','Window - Detail',TO_TIMESTAMP('2012-03-28 11:11:01','YYYY-MM-DD HH24:MI:SS'),100,200014,'org.compiere.apps.APanel','N',0,0) +; + +-- Mar 28, 2012 11:11:07 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_TIMESTAMP('2012-03-28 11:11:07','YYYY-MM-DD HH24:MI:SS'),100,'First','Y','Window - First',TO_TIMESTAMP('2012-03-28 11:11:07','YYYY-MM-DD HH24:MI:SS'),100,200015,'org.compiere.apps.APanel','N',0,0) +; + +-- Mar 28, 2012 11:11:13 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_TIMESTAMP('2012-03-28 11:11:13','YYYY-MM-DD HH24:MI:SS'),100,'Previous','Y','Window - Previous',TO_TIMESTAMP('2012-03-28 11:11:13','YYYY-MM-DD HH24:MI:SS'),100,200016,'org.compiere.apps.APanel','N',0,0) +; + +-- Mar 28, 2012 11:11:20 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_TIMESTAMP('2012-03-28 11:11:19','YYYY-MM-DD HH24:MI:SS'),100,'Next','Y','Window - Next',TO_TIMESTAMP('2012-03-28 11:11:19','YYYY-MM-DD HH24:MI:SS'),100,200017,'org.compiere.apps.APanel','N',0,0) +; + +-- Mar 28, 2012 11:11:26 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_TIMESTAMP('2012-03-28 11:11:25','YYYY-MM-DD HH24:MI:SS'),100,'Last','Y','Window - Last',TO_TIMESTAMP('2012-03-28 11:11:25','YYYY-MM-DD HH24:MI:SS'),100,200018,'org.compiere.apps.APanel','N',0,0) +; + +-- Mar 28, 2012 11:11:31 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_TIMESTAMP('2012-03-28 11:11:31','YYYY-MM-DD HH24:MI:SS'),100,'Report','Y','Window - Report',TO_TIMESTAMP('2012-03-28 11:11:31','YYYY-MM-DD HH24:MI:SS'),100,200019,'org.compiere.apps.APanel','N',0,0) +; + +-- Mar 28, 2012 11:11:37 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_TIMESTAMP('2012-03-28 11:11:36','YYYY-MM-DD HH24:MI:SS'),100,'Archive','Y','Window - Archive',TO_TIMESTAMP('2012-03-28 11:11:36','YYYY-MM-DD HH24:MI:SS'),100,200020,'org.compiere.apps.APanel','N',0,0) +; + +-- Mar 28, 2012 11:11:43 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_TIMESTAMP('2012-03-28 11:11:42','YYYY-MM-DD HH24:MI:SS'),100,'PrintPreview','Y','Window - PrintPreview',TO_TIMESTAMP('2012-03-28 11:11:42','YYYY-MM-DD HH24:MI:SS'),100,200021,'org.compiere.apps.APanel','N',0,0) +; + +-- Mar 28, 2012 11:11:49 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_TIMESTAMP('2012-03-28 11:11:49','YYYY-MM-DD HH24:MI:SS'),100,'Print','Y','Window - Print',TO_TIMESTAMP('2012-03-28 11:11:49','YYYY-MM-DD HH24:MI:SS'),100,200022,'org.compiere.apps.APanel','N',0,0) +; + +-- Mar 28, 2012 11:11:56 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_TIMESTAMP('2012-03-28 11:11:56','YYYY-MM-DD HH24:MI:SS'),100,'ZoomAcross','Y','Window - ZoomAcross',TO_TIMESTAMP('2012-03-28 11:11:56','YYYY-MM-DD HH24:MI:SS'),100,200023,'org.compiere.apps.APanel','N',0,0) +; + +-- Mar 28, 2012 11:12:02 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_TIMESTAMP('2012-03-28 11:12:02','YYYY-MM-DD HH24:MI:SS'),100,'WorkFlow','Y','Window - WorkFlow',TO_TIMESTAMP('2012-03-28 11:12:02','YYYY-MM-DD HH24:MI:SS'),100,200024,'org.compiere.apps.APanel','N',0,0) +; + +-- Mar 28, 2012 11:12:08 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_TIMESTAMP('2012-03-28 11:12:07','YYYY-MM-DD HH24:MI:SS'),100,'Request','Y','Window - Request',TO_TIMESTAMP('2012-03-28 11:12:07','YYYY-MM-DD HH24:MI:SS'),100,200025,'org.compiere.apps.APanel','N',0,0) +; + +-- Mar 28, 2012 11:12:14 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_TIMESTAMP('2012-03-28 11:12:13','YYYY-MM-DD HH24:MI:SS'),100,'InfoProduct','Y','Window - InfoProduct',TO_TIMESTAMP('2012-03-28 11:12:13','YYYY-MM-DD HH24:MI:SS'),100,200026,'org.compiere.apps.APanel','N',0,0) +; + +-- Mar 28, 2012 11:12:20 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_TIMESTAMP('2012-03-28 11:12:19','YYYY-MM-DD HH24:MI:SS'),100,'End','Y','Window - End',TO_TIMESTAMP('2012-03-28 11:12:19','YYYY-MM-DD HH24:MI:SS'),100,200027,'org.compiere.apps.APanel','N',0,0) +; + +-- Mar 28, 2012 11:15:27 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_TIMESTAMP('2012-03-28 11:15:27','YYYY-MM-DD HH24:MI:SS'),100,'Lock','Y','Window - Lock',TO_TIMESTAMP('2012-03-28 11:15:27','YYYY-MM-DD HH24:MI:SS'),100,200028,'org.compiere.apps.APanel','N',0,0) +; + +-- Mar 28, 2012 11:16:00 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_TIMESTAMP('2012-03-28 11:16:00','YYYY-MM-DD HH24:MI:SS'),100,'Ignore','Y','zk Window - Ignore',TO_TIMESTAMP('2012-03-28 11:16:00','YYYY-MM-DD HH24:MI:SS'),100,200029,'org.adempiere.webui.component.CWindowToolbar','N',0,0) +; + +-- Mar 28, 2012 11:16:41 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_TIMESTAMP('2012-03-28 11:16:41','YYYY-MM-DD HH24:MI:SS'),100,'Help','Y','zk Window - Help',TO_TIMESTAMP('2012-03-28 11:16:41','YYYY-MM-DD HH24:MI:SS'),100,200030,'org.adempiere.webui.component.CWindowToolbar','N',0,0) +; + +-- Mar 28, 2012 11:16:50 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_TIMESTAMP('2012-03-28 11:16:50','YYYY-MM-DD HH24:MI:SS'),100,'New','Y','zk Window - New',TO_TIMESTAMP('2012-03-28 11:16:50','YYYY-MM-DD HH24:MI:SS'),100,200031,'org.adempiere.webui.component.CWindowToolbar','N',0,0) +; + +-- Mar 28, 2012 11:16:59 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_TIMESTAMP('2012-03-28 11:16:58','YYYY-MM-DD HH24:MI:SS'),100,'Copy','Y','zk Window - Copy',TO_TIMESTAMP('2012-03-28 11:16:58','YYYY-MM-DD HH24:MI:SS'),100,200032,'org.adempiere.webui.component.CWindowToolbar','N',0,0) +; + +-- Mar 28, 2012 11:17:09 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_TIMESTAMP('2012-03-28 11:17:09','YYYY-MM-DD HH24:MI:SS'),100,'Delete','Y','zk Window - Delete',TO_TIMESTAMP('2012-03-28 11:17:09','YYYY-MM-DD HH24:MI:SS'),100,200033,'org.adempiere.webui.component.CWindowToolbar','N',0,0) +; + +-- Mar 28, 2012 11:17:16 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_TIMESTAMP('2012-03-28 11:17:15','YYYY-MM-DD HH24:MI:SS'),100,'DeleteSelection','Y','zk Window - DeleteSelection',TO_TIMESTAMP('2012-03-28 11:17:15','YYYY-MM-DD HH24:MI:SS'),100,200034,'org.adempiere.webui.component.CWindowToolbar','N',0,0) +; + +-- Mar 28, 2012 11:17:22 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_TIMESTAMP('2012-03-28 11:17:21','YYYY-MM-DD HH24:MI:SS'),100,'Save','Y','zk Window - Save',TO_TIMESTAMP('2012-03-28 11:17:21','YYYY-MM-DD HH24:MI:SS'),100,200035,'org.adempiere.webui.component.CWindowToolbar','N',0,0) +; + +-- Mar 28, 2012 11:17:30 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_TIMESTAMP('2012-03-28 11:17:29','YYYY-MM-DD HH24:MI:SS'),100,'SaveCreate','Y','zk Window - SaveCreate',TO_TIMESTAMP('2012-03-28 11:17:29','YYYY-MM-DD HH24:MI:SS'),100,200036,'org.adempiere.webui.component.CWindowToolbar','N',0,0) +; + +-- Mar 28, 2012 11:17:36 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_TIMESTAMP('2012-03-28 11:17:35','YYYY-MM-DD HH24:MI:SS'),100,'Refresh','Y','zk Window - Refresh',TO_TIMESTAMP('2012-03-28 11:17:35','YYYY-MM-DD HH24:MI:SS'),100,200037,'org.adempiere.webui.component.CWindowToolbar','N',0,0) +; + +-- Mar 28, 2012 11:17:42 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_TIMESTAMP('2012-03-28 11:17:41','YYYY-MM-DD HH24:MI:SS'),100,'Find','Y','zk Window - Find',TO_TIMESTAMP('2012-03-28 11:17:41','YYYY-MM-DD HH24:MI:SS'),100,200038,'org.adempiere.webui.component.CWindowToolbar','N',0,0) +; + +-- Mar 28, 2012 11:17:49 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_TIMESTAMP('2012-03-28 11:17:48','YYYY-MM-DD HH24:MI:SS'),100,'Attachment','Y','zk Window - Attachment',TO_TIMESTAMP('2012-03-28 11:17:48','YYYY-MM-DD HH24:MI:SS'),100,200039,'org.adempiere.webui.component.CWindowToolbar','N',0,0) +; + +-- Mar 28, 2012 11:17:57 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_TIMESTAMP('2012-03-28 11:17:57','YYYY-MM-DD HH24:MI:SS'),100,'Chat','Y','zk Window - Chat',TO_TIMESTAMP('2012-03-28 11:17:57','YYYY-MM-DD HH24:MI:SS'),100,200040,'org.adempiere.webui.component.CWindowToolbar','N',0,0) +; + +-- Mar 28, 2012 11:18:06 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_TIMESTAMP('2012-03-28 11:18:06','YYYY-MM-DD HH24:MI:SS'),100,'Multi','Y','zk Window - Multi',TO_TIMESTAMP('2012-03-28 11:18:06','YYYY-MM-DD HH24:MI:SS'),100,200041,'org.adempiere.webui.component.CWindowToolbar','N',0,0) +; + +-- Mar 28, 2012 11:18:12 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_TIMESTAMP('2012-03-28 11:18:12','YYYY-MM-DD HH24:MI:SS'),100,'History','Y','zk Window - History',TO_TIMESTAMP('2012-03-28 11:18:12','YYYY-MM-DD HH24:MI:SS'),100,200042,'org.adempiere.webui.component.CWindowToolbar','N',0,0) +; + +-- Mar 28, 2012 11:18:40 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_TIMESTAMP('2012-03-28 11:18:40','YYYY-MM-DD HH24:MI:SS'),100,'Parent','Y','zk Window - Parent',TO_TIMESTAMP('2012-03-28 11:18:40','YYYY-MM-DD HH24:MI:SS'),100,200043,'org.adempiere.webui.component.CWindowToolbar','N',0,0) +; + +-- Mar 28, 2012 11:18:50 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_TIMESTAMP('2012-03-28 11:18:49','YYYY-MM-DD HH24:MI:SS'),100,'Detail','Y','zk Window - Detail',TO_TIMESTAMP('2012-03-28 11:18:49','YYYY-MM-DD HH24:MI:SS'),100,200044,'org.adempiere.webui.component.CWindowToolbar','N',0,0) +; + +-- Mar 28, 2012 11:18:56 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_TIMESTAMP('2012-03-28 11:18:56','YYYY-MM-DD HH24:MI:SS'),100,'First','Y','zk Window - First',TO_TIMESTAMP('2012-03-28 11:18:56','YYYY-MM-DD HH24:MI:SS'),100,200045,'org.adempiere.webui.component.CWindowToolbar','N',0,0) +; + +-- Mar 28, 2012 11:19:03 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_TIMESTAMP('2012-03-28 11:19:02','YYYY-MM-DD HH24:MI:SS'),100,'Previous','Y','zk Window - Previous',TO_TIMESTAMP('2012-03-28 11:19:02','YYYY-MM-DD HH24:MI:SS'),100,200046,'org.adempiere.webui.component.CWindowToolbar','N',0,0) +; + +-- Mar 28, 2012 11:19:08 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_TIMESTAMP('2012-03-28 11:19:08','YYYY-MM-DD HH24:MI:SS'),100,'Next','Y','zk Window - Next',TO_TIMESTAMP('2012-03-28 11:19:08','YYYY-MM-DD HH24:MI:SS'),100,200047,'org.adempiere.webui.component.CWindowToolbar','N',0,0) +; + +-- Mar 28, 2012 11:19:19 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_TIMESTAMP('2012-03-28 11:19:18','YYYY-MM-DD HH24:MI:SS'),100,'Last','Y','zk Window - Last',TO_TIMESTAMP('2012-03-28 11:19:18','YYYY-MM-DD HH24:MI:SS'),100,200048,'org.adempiere.webui.component.CWindowToolbar','N',0,0) +; + +-- Mar 28, 2012 11:19:27 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_TIMESTAMP('2012-03-28 11:19:27','YYYY-MM-DD HH24:MI:SS'),100,'Report','Y','zk Window - Report',TO_TIMESTAMP('2012-03-28 11:19:27','YYYY-MM-DD HH24:MI:SS'),100,200049,'org.adempiere.webui.component.CWindowToolbar','N',0,0) +; + +-- Mar 28, 2012 11:19:33 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_TIMESTAMP('2012-03-28 11:19:32','YYYY-MM-DD HH24:MI:SS'),100,'Archive','Y','zk Window - Archive',TO_TIMESTAMP('2012-03-28 11:19:32','YYYY-MM-DD HH24:MI:SS'),100,200050,'org.adempiere.webui.component.CWindowToolbar','N',0,0) +; + +-- Mar 28, 2012 11:19:39 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_TIMESTAMP('2012-03-28 11:19:39','YYYY-MM-DD HH24:MI:SS'),100,'Print','Y','zk Window - Print',TO_TIMESTAMP('2012-03-28 11:19:39','YYYY-MM-DD HH24:MI:SS'),100,200051,'org.adempiere.webui.component.CWindowToolbar','N',0,0) +; + +-- Mar 28, 2012 11:19:46 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_TIMESTAMP('2012-03-28 11:19:45','YYYY-MM-DD HH24:MI:SS'),100,'Lock','Y','zk Window - Lock',TO_TIMESTAMP('2012-03-28 11:19:45','YYYY-MM-DD HH24:MI:SS'),100,200052,'org.adempiere.webui.component.CWindowToolbar','N',0,0) +; + +-- Mar 28, 2012 11:19:52 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_TIMESTAMP('2012-03-28 11:19:51','YYYY-MM-DD HH24:MI:SS'),100,'ZoomAcross','Y','zk Window - ZoomAcross',TO_TIMESTAMP('2012-03-28 11:19:51','YYYY-MM-DD HH24:MI:SS'),100,200053,'org.adempiere.webui.component.CWindowToolbar','N',0,0) +; + +-- Mar 28, 2012 11:19:58 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_TIMESTAMP('2012-03-28 11:19:57','YYYY-MM-DD HH24:MI:SS'),100,'WorkFlow','Y','zk Window - WorkFlow',TO_TIMESTAMP('2012-03-28 11:19:57','YYYY-MM-DD HH24:MI:SS'),100,200054,'org.adempiere.webui.component.CWindowToolbar','N',0,0) +; + +-- Mar 28, 2012 11:20:04 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_TIMESTAMP('2012-03-28 11:20:04','YYYY-MM-DD HH24:MI:SS'),100,'Request','Y','zk Window - Request',TO_TIMESTAMP('2012-03-28 11:20:04','YYYY-MM-DD HH24:MI:SS'),100,200055,'org.adempiere.webui.component.CWindowToolbar','N',0,0) +; + +-- Mar 28, 2012 11:20:11 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_TIMESTAMP('2012-03-28 11:20:10','YYYY-MM-DD HH24:MI:SS'),100,'InfoProduct','Y','zk Window - InfoProduct',TO_TIMESTAMP('2012-03-28 11:20:10','YYYY-MM-DD HH24:MI:SS'),100,200056,'org.adempiere.webui.component.CWindowToolbar','N',0,0) +; + +-- Mar 28, 2012 11:20:17 AM COT +INSERT INTO AD_ToolBarButton (AD_Client_ID,AD_Org_ID,Created,CreatedBy,ComponentName,IsActive,Name,Updated,UpdatedBy,AD_ToolBarButton_ID,Classname,IsCustomization,KeyStroke_KeyCode,KeyStroke_Modifiers) VALUES (0,0,TO_TIMESTAMP('2012-03-28 11:20:17','YYYY-MM-DD HH24:MI:SS'),100,'Export','Y','zk Window - Export',TO_TIMESTAMP('2012-03-28 11:20:17','YYYY-MM-DD HH24:MI:SS'),100,200057,'org.adempiere.webui.component.CWindowToolbar','N',0,0) +; + +-- Mar 28, 2012 11:22:48 AM COT +INSERT INTO AD_Window (AD_Window_ID,WindowType,IsSOTrx,IsDefault,IsBetaFunctionality,WinHeight,WinWidth,EntityType,Name,IsActive,Created,UpdatedBy,CreatedBy,Updated,AD_Org_ID,AD_Client_ID,Processing) VALUES (200001,'M','Y','N','N',0,0,'D','ToolBar Button Restrict','Y',TO_TIMESTAMP('2012-03-28 11:22:47','YYYY-MM-DD HH24:MI:SS'),100,100,TO_TIMESTAMP('2012-03-28 11:22:47','YYYY-MM-DD HH24:MI:SS'),0,0,'N') +; + +-- Mar 28, 2012 11:22:48 AM COT +INSERT INTO AD_Window_Trl (AD_Language,AD_Window_ID, Help,Name,Description, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Window_ID, t.Help,t.Name,t.Description, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Window t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Window_ID=200001 AND NOT EXISTS (SELECT * FROM AD_Window_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Window_ID=t.AD_Window_ID) +; + +-- Mar 28, 2012 11:22:59 AM COT +INSERT INTO AD_Table (IsSecurityEnabled,AccessLevel,LoadSeq,AD_Window_ID,AD_Table_ID,IsHighVolume,ImportTable,IsView,IsChangeLog,CopyColumnsFromTable,EntityType,IsCentrallyMaintained,IsDeleteable,ReplicationType,TableName,Name,AD_Client_ID,IsActive,AD_Org_ID,CreatedBy,Updated,UpdatedBy,Created) VALUES ('N','6',0,200001,200004,'N','N','N','Y','N','D','Y','Y','L','AD_ToolBarButtonRestrict','ToolBar Button Restrict',0,'Y',0,100,TO_TIMESTAMP('2012-03-28 11:22:59','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2012-03-28 11:22:59','YYYY-MM-DD HH24:MI:SS')) +; + +-- Mar 28, 2012 11:22:59 AM COT +INSERT INTO AD_Table_Trl (AD_Language,AD_Table_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Table_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Table t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Table_ID=200004 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) +; + +-- Mar 28, 2012 11:23:00 AM COT +INSERT INTO AD_Sequence (IncrementNo,StartNewYear,CurrentNextSys,IsTableID,StartNo,CurrentNext,IsAudited,IsAutoSequence,AD_Sequence_ID,Description,Name,AD_Org_ID,AD_Client_ID,Updated,UpdatedBy,Created,CreatedBy,IsActive) VALUES (1,'N',50000,'Y',1000000,1000000,'N','Y',200004,'Table AD_ToolBarButtonRestrict','AD_ToolBarButtonRestrict',0,0,TO_TIMESTAMP('2012-03-28 11:22:59','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2012-03-28 11:22:59','YYYY-MM-DD HH24:MI:SS'),100,'Y') +; + +-- Mar 28, 2012 11:28:13 AM COT +INSERT INTO AD_Column (DefaultValue,AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,Help,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,IsAllowCopy,CreatedBy,Updated,AD_Client_ID,AD_Org_ID,IsActive,Created,UpdatedBy) VALUES ('@#AD_Client_ID@',200100,200004,'D',1,'Y','N','N',0,'A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.','N',22,'N',19,'Y','N',102,'N','Y','N','N','N','AD_Client_ID','Client/Tenant for this installation.','Client','N',100,TO_TIMESTAMP('2012-03-28 11:28:12','YYYY-MM-DD HH24:MI:SS'),0,0,'Y',TO_TIMESTAMP('2012-03-28 11:28:12','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Mar 28, 2012 11:28:13 AM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200100 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 28, 2012 11:28:13 AM COT +INSERT INTO AD_Column (DefaultValue,AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,Help,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,AD_Val_Rule_ID,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,IsAllowCopy,CreatedBy,Updated,AD_Client_ID,AD_Org_ID,IsActive,Created,UpdatedBy) VALUES ('@#AD_Org_ID@',200101,200004,'D',1,'Y','N','N',0,'An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.','N',22,'N',19,'Y',104,'N',113,'N','Y','N','N','N','AD_Org_ID','Organizational entity within client','Organization','N',100,TO_TIMESTAMP('2012-03-28 11:28:13','YYYY-MM-DD HH24:MI:SS'),0,0,'Y',TO_TIMESTAMP('2012-03-28 11:28:13','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Mar 28, 2012 11:28:13 AM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200101 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 28, 2012 11:28:14 AM COT +INSERT INTO AD_Column (AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,Help,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,IsAllowCopy,CreatedBy,Updated,AD_Client_ID,AD_Org_ID,IsActive,Created,UpdatedBy) VALUES (200102,200004,'D',1,'Y','N','N',0,'The Created field indicates the date that this record was created.','N',7,'N',16,'Y','N',245,'N','Y','N','N','N','Created','Date this record was created','Created','N',100,TO_TIMESTAMP('2012-03-28 11:28:13','YYYY-MM-DD HH24:MI:SS'),0,0,'Y',TO_TIMESTAMP('2012-03-28 11:28:13','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Mar 28, 2012 11:28:14 AM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200102 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 28, 2012 11:28:14 AM COT +INSERT INTO AD_Column (AD_Column_ID,AD_Table_ID,EntityType,Version,AD_Reference_Value_ID,IsMandatory,IsTranslated,IsIdentifier,SeqNo,Help,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,IsAllowCopy,CreatedBy,Updated,AD_Client_ID,AD_Org_ID,IsActive,Created,UpdatedBy) VALUES (200103,200004,'D',1,110,'Y','N','N',0,'The Created By field indicates the user who created this record.','N',22,'N',18,'Y','N',246,'N','Y','N','N','N','CreatedBy','User who created this records','Created By','N',100,TO_TIMESTAMP('2012-03-28 11:28:14','YYYY-MM-DD HH24:MI:SS'),0,0,'Y',TO_TIMESTAMP('2012-03-28 11:28:14','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Mar 28, 2012 11:28:14 AM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200103 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 28, 2012 11:28:15 AM COT +INSERT INTO AD_Column (AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,Help,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,IsAllowCopy,CreatedBy,Updated,AD_Client_ID,AD_Org_ID,IsActive,Created,UpdatedBy) VALUES (200104,200004,'D',1,'N','N','N',0,'A description is limited to 255 characters.','N',255,'Y',10,'Y','N',275,'N','Y','N','Y','N','Description','Optional short description of the record','Description','Y',100,TO_TIMESTAMP('2012-03-28 11:28:14','YYYY-MM-DD HH24:MI:SS'),0,0,'Y',TO_TIMESTAMP('2012-03-28 11:28:14','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Mar 28, 2012 11:28:15 AM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200104 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 28, 2012 11:28:15 AM COT +INSERT INTO AD_Column (AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,Help,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,IsAllowCopy,CreatedBy,Updated,AD_Client_ID,AD_Org_ID,IsActive,Created,UpdatedBy) VALUES (200105,200004,'D',1,'N','N','N',0,'The Help field contains a hint, comment or help about the use of this item.','N',2000,'N',14,'Y','N',326,'N','Y','N','Y','N','Help','Comment or Hint','Comment/Help','Y',100,TO_TIMESTAMP('2012-03-28 11:28:15','YYYY-MM-DD HH24:MI:SS'),0,0,'Y',TO_TIMESTAMP('2012-03-28 11:28:15','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Mar 28, 2012 11:28:15 AM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200105 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 28, 2012 11:28:16 AM COT +INSERT INTO AD_Column (DefaultValue,AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,Help,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,IsAllowCopy,CreatedBy,Updated,AD_Client_ID,AD_Org_ID,IsActive,Created,UpdatedBy) VALUES ('Y',200106,200004,'D',1,'Y','N','N',0,'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.','N',1,'N',20,'Y','N',348,'N','Y','N','Y','N','IsActive','The record is active in the system','Active','N',100,TO_TIMESTAMP('2012-03-28 11:28:15','YYYY-MM-DD HH24:MI:SS'),0,0,'Y',TO_TIMESTAMP('2012-03-28 11:28:15','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Mar 28, 2012 11:28:16 AM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200106 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 28, 2012 11:28:16 AM COT +INSERT INTO AD_Element (AD_Element_ID,ColumnName,EntityType,Name,PrintName,AD_Client_ID,Created,Updated,IsActive,AD_Org_ID,CreatedBy,UpdatedBy) VALUES (200022,'AD_ToolBarButtonRestrict_ID','D','ToolBar Button Restrict','ToolBar Button Restrict',0,TO_TIMESTAMP('2012-03-28 11:28:16','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2012-03-28 11:28:16','YYYY-MM-DD HH24:MI:SS'),'Y',0,100,100) +; + +-- Mar 28, 2012 11:28:16 AM COT +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Help,PO_Description,PO_Help,Name,Description,PrintName,PO_PrintName,PO_Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Help,t.PO_Description,t.PO_Help,t.Name,t.Description,t.PrintName,t.PO_PrintName,t.PO_Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=200022 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID) +; + +-- Mar 28, 2012 11:28:16 AM COT +INSERT INTO AD_Column (AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Name,IsAllowCopy,CreatedBy,Updated,AD_Client_ID,AD_Org_ID,IsActive,Created,UpdatedBy) VALUES (200107,200004,'D',1,'Y','N','N',0,'N',22,'N',13,'Y','Y',200022,'N','Y','N','N','N','AD_ToolBarButtonRestrict_ID','ToolBar Button Restrict','N',100,TO_TIMESTAMP('2012-03-28 11:28:16','YYYY-MM-DD HH24:MI:SS'),0,0,'Y',TO_TIMESTAMP('2012-03-28 11:28:16','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Mar 28, 2012 11:28:16 AM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200107 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 28, 2012 11:28:17 AM COT +INSERT INTO AD_Column (AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,Help,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,IsAllowCopy,CreatedBy,Updated,AD_Client_ID,AD_Org_ID,IsActive,Created,UpdatedBy) VALUES (200108,200004,'D',1,'Y','N','Y',1,'The name of an entity (record) is used as an default search option in addition to the search key. The name is up to 60 characters in length.','N',60,'Y',10,'Y','N',469,'N','Y','N','Y','N','Name','Alphanumeric identifier of the entity','Name','Y',100,TO_TIMESTAMP('2012-03-28 11:28:16','YYYY-MM-DD HH24:MI:SS'),0,0,'Y',TO_TIMESTAMP('2012-03-28 11:28:16','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Mar 28, 2012 11:28:17 AM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200108 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 28, 2012 11:28:17 AM COT +INSERT INTO AD_Column (AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,Help,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,IsAllowCopy,CreatedBy,Updated,AD_Client_ID,AD_Org_ID,IsActive,Created,UpdatedBy) VALUES (200109,200004,'D',1,'Y','N','N',0,'The Updated field indicates the date that this record was updated.','N',7,'N',16,'Y','N',607,'N','Y','N','N','N','Updated','Date this record was updated','Updated','N',100,TO_TIMESTAMP('2012-03-28 11:28:17','YYYY-MM-DD HH24:MI:SS'),0,0,'Y',TO_TIMESTAMP('2012-03-28 11:28:17','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Mar 28, 2012 11:28:17 AM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200109 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 28, 2012 11:28:18 AM COT +INSERT INTO AD_Column (AD_Column_ID,AD_Table_ID,EntityType,Version,AD_Reference_Value_ID,IsMandatory,IsTranslated,IsIdentifier,SeqNo,Help,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,IsAllowCopy,CreatedBy,Updated,AD_Client_ID,AD_Org_ID,IsActive,Created,UpdatedBy) VALUES (200110,200004,'D',1,110,'Y','N','N',0,'The Updated By field indicates the user who updated this record.','N',22,'N',18,'Y','N',608,'N','Y','N','N','N','UpdatedBy','User who updated this records','Updated By','N',100,TO_TIMESTAMP('2012-03-28 11:28:17','YYYY-MM-DD HH24:MI:SS'),0,0,'Y',TO_TIMESTAMP('2012-03-28 11:28:17','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Mar 28, 2012 11:28:18 AM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200110 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 28, 2012 11:28:18 AM COT +INSERT INTO AD_Column (AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,SeqNo,Help,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,IsAllowCopy,CreatedBy,Updated,AD_Client_ID,AD_Org_ID,IsActive,Created,UpdatedBy) VALUES (200111,200004,'D',1,'Y','N','N',0,'A search key allows you a fast method of finding a particular record. +If you leave the search key empty, the system automatically creates a numeric number. The document sequence used for this fallback number is defined in the "Maintain Sequence" window with the name "DocumentNo_", where TableName is the actual name of the table (e.g. C_Order).','N',40,'Y',10,'Y','N',620,'N','Y','N','Y','N','Value','Search key for the record in the format required - must be unique','Search Key','Y',100,TO_TIMESTAMP('2012-03-28 11:28:18','YYYY-MM-DD HH24:MI:SS'),0,0,'Y',TO_TIMESTAMP('2012-03-28 11:28:18','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Mar 28, 2012 11:28:18 AM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200111 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 28, 2012 11:29:31 AM COT +UPDATE AD_Column SET Help=NULL, IsSelectionColumn='N', AD_Reference_ID=19, AD_Element_ID=200016, ColumnName='AD_ToolBarButton_ID', Description=NULL, Name='ToolBar Button',Updated=TO_TIMESTAMP('2012-03-28 11:29:31','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200104 +; + +-- Mar 28, 2012 11:29:31 AM COT +UPDATE AD_Column_Trl SET IsTranslated='N' WHERE AD_Column_ID=200104 +; + +-- Mar 28, 2012 11:29:31 AM COT +UPDATE AD_Field SET Name='ToolBar Button', Description=NULL, Help=NULL WHERE AD_Column_ID=200104 AND IsCentrallyMaintained='Y' +; + +-- Mar 28, 2012 11:29:37 AM COT +UPDATE AD_Column SET FieldLength=10,Updated=TO_TIMESTAMP('2012-03-28 11:29:37','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200104 +; + +-- Mar 28, 2012 11:33:37 AM COT +INSERT INTO AD_Val_Rule (Code,Type,AD_Val_Rule_ID,EntityType,Name,CreatedBy,Updated,UpdatedBy,AD_Client_ID,IsActive,AD_Org_ID,Created) VALUES ('AD_RefList.Value IN (''W'',''R'',''X'')','S',200002,'D','AD_ToolBarButton Action - Window/Report/Form',100,TO_TIMESTAMP('2012-03-28 11:33:36','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',0,TO_TIMESTAMP('2012-03-28 11:33:36','YYYY-MM-DD HH24:MI:SS')) +; + +-- Mar 28, 2012 11:33:47 AM COT +UPDATE AD_Column SET AD_Reference_Value_ID=104, IsMandatory='Y', Help='The Action field is a drop down list box which indicates the Action to be performed for this Item.', FieldLength=1, AD_Reference_ID=17, AD_Val_Rule_ID=200002, AD_Element_ID=152, ColumnName='Action', Description='Indicates the Action to be performed', Name='Action',Updated=TO_TIMESTAMP('2012-03-28 11:33:47','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200105 +; + +-- Mar 28, 2012 11:33:47 AM COT +UPDATE AD_Column_Trl SET IsTranslated='N' WHERE AD_Column_ID=200105 +; + +-- Mar 28, 2012 11:33:47 AM COT +UPDATE AD_Field SET Name='Action', Description='Indicates the Action to be performed', Help='The Action field is a drop down list box which indicates the Action to be performed for this Item.' WHERE AD_Column_ID=200105 AND IsCentrallyMaintained='Y' +; + +-- Mar 28, 2012 11:35:22 AM COT +UPDATE AD_Column SET IsIdentifier='N', Help='The Role determines security and access a user who has this Role will have in the System.', FieldLength=10, IsSelectionColumn='N', AD_Reference_ID=19, AD_Element_ID=123, ColumnName='AD_Role_ID', Description='Responsibility Role', Name='Role',Updated=TO_TIMESTAMP('2012-03-28 11:35:22','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200108 +; + +-- Mar 28, 2012 11:35:22 AM COT +UPDATE AD_Column_Trl SET IsTranslated='N' WHERE AD_Column_ID=200108 +; + +-- Mar 28, 2012 11:35:22 AM COT +UPDATE AD_Field SET Name='Role', Description='Responsibility Role', Help='The Role determines security and access a user who has this Role will have in the System.' WHERE AD_Column_ID=200108 AND IsCentrallyMaintained='Y' +; + +-- Mar 28, 2012 11:35:54 AM COT +UPDATE AD_Column SET IsMandatory='N', Help='The Window field identifies a unique Window in the system.', FieldLength=10, IsSelectionColumn='N', AD_Reference_ID=19, AD_Element_ID=143, ColumnName='AD_Window_ID', Description='Data entry or display window', Name='Window',Updated=TO_TIMESTAMP('2012-03-28 11:35:54','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200111 +; + +-- Mar 28, 2012 11:35:54 AM COT +UPDATE AD_Column_Trl SET IsTranslated='N' WHERE AD_Column_ID=200111 +; + +-- Mar 28, 2012 11:35:54 AM COT +UPDATE AD_Field SET Name='Window', Description='Data entry or display window', Help='The Window field identifies a unique Window in the system.' WHERE AD_Column_ID=200111 AND IsCentrallyMaintained='Y' +; + +-- Mar 28, 2012 11:36:24 AM COT +CREATE TABLE AD_ToolBarButtonRestrict ("action" CHAR(1) NOT NULL, AD_Client_ID NUMERIC(10) NOT NULL, AD_Org_ID NUMERIC(10) NOT NULL, AD_Role_ID NUMERIC(10) NOT NULL, AD_ToolBarButton_ID NUMERIC(10) DEFAULT NULL , AD_ToolBarButtonRestrict_ID NUMERIC(10) NOT NULL, AD_Window_ID NUMERIC(10) DEFAULT NULL , Created TIMESTAMP NOT NULL, CreatedBy NUMERIC(10) NOT NULL, IsActive CHAR(1) DEFAULT 'Y' CHECK (IsActive IN ('Y','N')) NOT NULL, Updated TIMESTAMP NOT NULL, UpdatedBy NUMERIC(10) NOT NULL, CONSTRAINT AD_ToolBarButtonRestrict_Key PRIMARY KEY (AD_ToolBarButtonRestrict_ID)) +; + +-- Mar 28, 2012 11:37:48 AM COT +INSERT INTO AD_Tab (IsSingleRow,AD_Window_ID,SeqNo,IsTranslationTab,IsSortTab,AD_Table_ID,AD_Tab_ID,ImportFields,HasTree,IsInfoTab,IsReadOnly,TabLevel,IsInsertRecord,IsAdvancedTab,EntityType,Name,AD_Client_ID,AD_Org_ID,Created,CreatedBy,Updated,IsActive,UpdatedBy,Processing) VALUES ('Y',200001,10,'N','N',200004,200003,'N','N','N','N',0,'Y','N','D','ToolBar Button Restrict',0,0,TO_TIMESTAMP('2012-03-28 11:37:47','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2012-03-28 11:37:47','YYYY-MM-DD HH24:MI:SS'),'Y',100,'N') +; + +-- Mar 28, 2012 11:37:48 AM COT +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) 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 FROM AD_Language l, AD_Tab t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Tab_ID=200003 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) +; + +-- Mar 28, 2012 11:37:52 AM COT +INSERT INTO AD_Field (IsEncrypted,DisplayLength,IsDisplayed,IsSameLine,IsHeading,AD_Column_ID,IsFieldOnly,IsCentrallyMaintained,AD_Tab_ID,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,UpdatedBy,AD_Org_ID,IsActive,Created,AD_Client_ID,CreatedBy,Updated) VALUES ('N',1,'Y','N','N',200105,'N','Y',200003,200063,'N','The Action field is a drop down list box which indicates the Action to be performed for this Item.','D','Indicates the Action to be performed','Action',100,0,'Y',TO_TIMESTAMP('2012-03-28 11:37:52','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2012-03-28 11:37:52','YYYY-MM-DD HH24:MI:SS')) +; + +-- Mar 28, 2012 11:37:52 AM COT +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) 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 FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200063 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Mar 28, 2012 11:37:53 AM COT +INSERT INTO AD_Field (IsEncrypted,DisplayLength,IsDisplayed,IsSameLine,IsHeading,AD_Column_ID,IsFieldOnly,IsCentrallyMaintained,AD_Tab_ID,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,UpdatedBy,AD_Org_ID,IsActive,Created,AD_Client_ID,CreatedBy,Updated) VALUES ('N',1,'Y','N','N',200106,'N','Y',200003,200064,'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',100,0,'Y',TO_TIMESTAMP('2012-03-28 11:37:52','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2012-03-28 11:37:52','YYYY-MM-DD HH24:MI:SS')) +; + +-- Mar 28, 2012 11:37:53 AM COT +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) 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 FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200064 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Mar 28, 2012 11:37:53 AM COT +INSERT INTO AD_Field (IsEncrypted,DisplayLength,IsDisplayed,IsSameLine,IsHeading,AD_Column_ID,IsFieldOnly,IsCentrallyMaintained,AD_Tab_ID,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,UpdatedBy,AD_Org_ID,IsActive,Created,AD_Client_ID,CreatedBy,Updated) VALUES ('N',22,'Y','N','N',200100,'N','Y',200003,200065,'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',100,0,'Y',TO_TIMESTAMP('2012-03-28 11:37:53','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2012-03-28 11:37:53','YYYY-MM-DD HH24:MI:SS')) +; + +-- Mar 28, 2012 11:37:53 AM COT +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) 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 FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200065 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Mar 28, 2012 11:37:54 AM COT +INSERT INTO AD_Field (IsEncrypted,DisplayLength,IsDisplayed,IsSameLine,IsHeading,AD_Column_ID,IsFieldOnly,IsCentrallyMaintained,AD_Tab_ID,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,UpdatedBy,AD_Org_ID,IsActive,Created,AD_Client_ID,CreatedBy,Updated) VALUES ('N',22,'Y','N','N',200101,'N','Y',200003,200066,'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',100,0,'Y',TO_TIMESTAMP('2012-03-28 11:37:53','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2012-03-28 11:37:53','YYYY-MM-DD HH24:MI:SS')) +; + +-- Mar 28, 2012 11:37:54 AM COT +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) 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 FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200066 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Mar 28, 2012 11:37:54 AM COT +INSERT INTO AD_Field (IsEncrypted,DisplayLength,IsDisplayed,IsSameLine,IsHeading,AD_Column_ID,IsFieldOnly,IsCentrallyMaintained,AD_Tab_ID,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,UpdatedBy,AD_Org_ID,IsActive,Created,AD_Client_ID,CreatedBy,Updated) VALUES ('N',10,'Y','N','N',200108,'N','Y',200003,200067,'N','The Role determines security and access a user who has this Role will have in the System.','D','Responsibility Role','Role',100,0,'Y',TO_TIMESTAMP('2012-03-28 11:37:54','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2012-03-28 11:37:54','YYYY-MM-DD HH24:MI:SS')) +; + +-- Mar 28, 2012 11:37:54 AM COT +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) 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 FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200067 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Mar 28, 2012 11:37:54 AM COT +INSERT INTO AD_Field (IsEncrypted,DisplayLength,IsDisplayed,IsSameLine,IsHeading,AD_Column_ID,IsFieldOnly,IsCentrallyMaintained,AD_Tab_ID,AD_Field_ID,IsReadOnly,EntityType,Name,UpdatedBy,AD_Org_ID,IsActive,Created,AD_Client_ID,CreatedBy,Updated) VALUES ('N',10,'Y','N','N',200104,'N','Y',200003,200068,'N','D','ToolBar Button',100,0,'Y',TO_TIMESTAMP('2012-03-28 11:37:54','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2012-03-28 11:37:54','YYYY-MM-DD HH24:MI:SS')) +; + +-- Mar 28, 2012 11:37:54 AM COT +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) 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 FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200068 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Mar 28, 2012 11:37:55 AM COT +INSERT INTO AD_Field (IsEncrypted,DisplayLength,IsDisplayed,IsSameLine,IsHeading,AD_Column_ID,IsFieldOnly,IsCentrallyMaintained,AD_Tab_ID,AD_Field_ID,IsReadOnly,EntityType,Name,UpdatedBy,AD_Org_ID,IsActive,Created,AD_Client_ID,CreatedBy,Updated) VALUES ('N',22,'N','N','N',200107,'N','Y',200003,200069,'N','D','ToolBar Button Restrict',100,0,'Y',TO_TIMESTAMP('2012-03-28 11:37:54','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2012-03-28 11:37:54','YYYY-MM-DD HH24:MI:SS')) +; + +-- Mar 28, 2012 11:37:55 AM COT +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) 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 FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200069 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Mar 28, 2012 11:37:55 AM COT +INSERT INTO AD_Field (IsEncrypted,DisplayLength,IsDisplayed,IsSameLine,IsHeading,AD_Column_ID,IsFieldOnly,IsCentrallyMaintained,AD_Tab_ID,AD_Field_ID,IsReadOnly,Help,EntityType,Description,Name,UpdatedBy,AD_Org_ID,IsActive,Created,AD_Client_ID,CreatedBy,Updated) VALUES ('N',10,'Y','N','N',200111,'N','Y',200003,200070,'N','The Window field identifies a unique Window in the system.','D','Data entry or display window','Window',100,0,'Y',TO_TIMESTAMP('2012-03-28 11:37:55','YYYY-MM-DD HH24:MI:SS'),0,100,TO_TIMESTAMP('2012-03-28 11:37:55','YYYY-MM-DD HH24:MI:SS')) +; + +-- Mar 28, 2012 11:37:55 AM COT +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) 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 FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200070 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID) +; + +-- Mar 28, 2012 11:38:22 AM COT +UPDATE AD_Field SET SeqNo=10,IsDisplayed='Y' WHERE AD_Field_ID=200065 +; + +-- Mar 28, 2012 11:38:22 AM COT +UPDATE AD_Field SET SeqNo=20,IsDisplayed='Y' WHERE AD_Field_ID=200066 +; + +-- Mar 28, 2012 11:38:22 AM COT +UPDATE AD_Field SET SeqNo=30,IsDisplayed='Y' WHERE AD_Field_ID=200067 +; + +-- Mar 28, 2012 11:38:22 AM COT +UPDATE AD_Field SET SeqNo=40,IsDisplayed='Y' WHERE AD_Field_ID=200064 +; + +-- Mar 28, 2012 11:38:22 AM COT +UPDATE AD_Field SET SeqNo=50,IsDisplayed='Y' WHERE AD_Field_ID=200063 +; + +-- Mar 28, 2012 11:38:22 AM COT +UPDATE AD_Field SET SeqNo=60,IsDisplayed='Y' WHERE AD_Field_ID=200070 +; + +-- Mar 28, 2012 11:38:22 AM COT +UPDATE AD_Field SET SeqNo=70,IsDisplayed='Y' WHERE AD_Field_ID=200068 +; + +-- Mar 28, 2012 11:38:30 AM COT +UPDATE AD_Field SET IsSameLine='Y',Updated=TO_TIMESTAMP('2012-03-28 11:38:30','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200066 +; + +-- Mar 28, 2012 11:38:42 AM COT +UPDATE AD_Field SET IsSameLine='Y',Updated=TO_TIMESTAMP('2012-03-28 11:38:42','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200064 +; + +-- Mar 28, 2012 11:38:56 AM COT +UPDATE AD_Field SET IsSameLine='Y', DisplayLogic='@Action@=W',Updated=TO_TIMESTAMP('2012-03-28 11:38:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200070 +; + +-- Mar 28, 2012 11:39:03 AM COT +UPDATE AD_Field SET DisplayLength=40,Updated=TO_TIMESTAMP('2012-03-28 11:39:03','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=200068 +; + +-- Mar 28, 2012 11:39:48 AM COT +INSERT INTO AD_Menu (AD_Window_ID,AD_Menu_ID,IsSummary,"action",IsSOTrx,IsReadOnly,EntityType,IsCentrallyMaintained,Name,Created,IsActive,UpdatedBy,AD_Client_ID,CreatedBy,Updated,AD_Org_ID) VALUES (200001,200001,'N','W','N','N','U','Y','ToolBar Button Restrict',TO_TIMESTAMP('2012-03-28 11:39:47','YYYY-MM-DD HH24:MI:SS'),'Y',100,0,100,TO_TIMESTAMP('2012-03-28 11:39:47','YYYY-MM-DD HH24:MI:SS'),0) +; + +-- Mar 28, 2012 11:39:48 AM COT +INSERT INTO AD_Menu_Trl (AD_Language,AD_Menu_ID, Name,Description, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Menu_ID, t.Name,t.Description, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Menu t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Menu_ID=200001 AND NOT EXISTS (SELECT * FROM AD_Menu_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Menu_ID=t.AD_Menu_ID) +; + +-- Mar 28, 2012 11:39:48 AM COT +INSERT INTO AD_TreeNodeMM (AD_Client_ID,AD_Org_ID, IsActive,Created,CreatedBy,Updated,UpdatedBy, AD_Tree_ID, Node_ID, Parent_ID, SeqNo) SELECT t.AD_Client_ID, 0, 'Y', CURRENT_TIMESTAMP, 100, CURRENT_TIMESTAMP, 100,t.AD_Tree_ID, 200001, 0, 999 FROM AD_Tree t WHERE t.AD_Client_ID=0 AND t.IsActive='Y' AND t.IsAllNodes='Y' AND t.TreeType='MM' AND NOT EXISTS (SELECT * FROM AD_TreeNodeMM e WHERE e.AD_Tree_ID=t.AD_Tree_ID AND Node_ID=200001) +; + +-- Mar 28, 2012 11:40:25 AM COT +UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=0, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=147 +; + +-- Mar 28, 2012 11:40:25 AM COT +UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=1, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=53246 +; + +-- Mar 28, 2012 11:40:25 AM COT +UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=2, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=487 +; + +-- Mar 28, 2012 11:40:25 AM COT +UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=3, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=150 +; + +-- Mar 28, 2012 11:40:25 AM COT +UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=4, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=495 +; + +-- Mar 28, 2012 11:40:25 AM COT +UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=5, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=50007 +; + +-- Mar 28, 2012 11:40:25 AM COT +UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=6, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=362 +; + +-- Mar 28, 2012 11:40:25 AM COT +UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=7, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=200001 +; + +-- Mar 28, 2012 11:40:25 AM COT +UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=8, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=475 +; + +-- Mar 28, 2012 11:40:25 AM COT +UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=9, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=366 +; + +-- Mar 28, 2012 11:40:25 AM COT +UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=10, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=483 +; + +-- Mar 28, 2012 11:40:25 AM COT +UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=11, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=368 +; + +-- Mar 28, 2012 11:40:25 AM COT +UPDATE AD_TreeNodeMM SET Parent_ID=367, SeqNo=12, Updated=CURRENT_TIMESTAMP WHERE AD_Tree_ID=10 AND Node_ID=508 +; + +-- Mar 28, 2012 11:44:41 AM COT +-- IDEMPIERE-129 Restrictions on Toolbar and Menu +UPDATE AD_Val_Rule SET Code='AD_Ref_List.Value IN (''W'',''R'',''X'')',Updated=TO_TIMESTAMP('2012-03-28 11:44:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Val_Rule_ID=200002 +; + +-- Mar 29, 2012 11:53:47 AM CEST +UPDATE AD_Column SET IsMandatory='N',Updated=TO_TIMESTAMP('2012-03-29 11:53:47','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Column_ID=200108 +; + +-- Mar 29, 2012 11:53:52 AM CEST +INSERT INTO t_alter_column values('ad_toolbarbuttonrestrict','AD_Role_ID','NUMERIC(10)',null,'NULL') +; + +-- Mar 29, 2012 11:53:54 AM CEST +INSERT INTO t_alter_column values('ad_toolbarbuttonrestrict','AD_Role_ID',null,'NULL',null) +; + +-- Mar 29, 2012 1:44:21 PM CEST +UPDATE AD_Column SET AD_Val_Rule_ID=158, IsUpdateable='N',Updated=TO_TIMESTAMP('2012-03-29 13:44:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Column_ID=200108 +; + +-- Mar 29, 2012 1:44:51 PM CEST +UPDATE AD_Column SET IsMandatory='N', IsUpdateable='N',Updated=TO_TIMESTAMP('2012-03-29 13:44:51','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Column_ID=200105 +; + +-- Mar 29, 2012 1:44:53 PM CEST +INSERT INTO t_alter_column values('ad_toolbarbuttonrestrict','"action"','CHAR(1)',null,'NULL') +; + +-- Mar 29, 2012 1:44:53 PM CEST +INSERT INTO t_alter_column values('ad_toolbarbuttonrestrict','"action"',null,'NULL',null) +; + +-- Mar 29, 2012 1:45:01 PM CEST +UPDATE AD_Column SET IsUpdateable='N',Updated=TO_TIMESTAMP('2012-03-29 13:45:01','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Column_ID=200111 +; + +UPDATE AD_System + SET LastMigrationScriptApplied='833_IDEMPIERE-129.sql' +WHERE LastMigrationScriptApplied<'833_IDEMPIERE-129.sql' + OR LastMigrationScriptApplied IS NULL +; diff --git a/org.adempiere.base/src/org/compiere/model/I_AD_ToolBarButton.java b/org.adempiere.base/src/org/compiere/model/I_AD_ToolBarButton.java new file mode 100644 index 0000000000..7498fa92d4 --- /dev/null +++ b/org.adempiere.base/src/org/compiere/model/I_AD_ToolBarButton.java @@ -0,0 +1,219 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved. * + * This program is free software, you can redistribute it and/or modify it * + * under the terms version 2 of the GNU General Public License as published * + * by the Free Software Foundation. This program is distributed in the hope * + * that it will be useful, but WITHOUT ANY WARRANTY, without even the implied * + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * + * See the GNU General Public License for more details. * + * You should have received a copy of the GNU General Public License along * + * with this program, if not, write to the Free Software Foundation, Inc., * + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * + * For the text or an alternative of this public license, you may reach us * + * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * + * or via info@compiere.org or http://www.compiere.org/license.html * + *****************************************************************************/ +package org.compiere.model; + +import java.math.BigDecimal; +import java.sql.Timestamp; +import org.compiere.model.*; +import org.compiere.util.KeyNamePair; + +/** Generated Interface for AD_ToolBarButton + * @author Adempiere (generated) + * @version 360LTS.015 + */ +public interface I_AD_ToolBarButton +{ + + /** TableName=AD_ToolBarButton */ + public static final String Table_Name = "AD_ToolBarButton"; + + /** AD_Table_ID=200003 */ + public static final int Table_ID = MTable.getTable_ID(Table_Name); + + KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); + + /** AccessLevel = 4 - System + */ + BigDecimal accessLevel = BigDecimal.valueOf(4); + + /** Load Meta Data */ + + /** Column name ActionClassName */ + public static final String COLUMNNAME_ActionClassName = "ActionClassName"; + + /** Set Action Class Name. + * The class name that implements the interface for toolbar actions + */ + public void setActionClassName (String ActionClassName); + + /** Get Action Class Name. + * The class name that implements the interface for toolbar actions + */ + public String getActionClassName(); + + /** Column name ActionName */ + public static final String COLUMNNAME_ActionName = "ActionName"; + + /** Set Action Name. + * Action name on the toolbar + */ + public void setActionName (String ActionName); + + /** Get Action Name. + * Action name on the toolbar + */ + public String getActionName(); + + /** Column name AD_Client_ID */ + public static final String COLUMNNAME_AD_Client_ID = "AD_Client_ID"; + + /** Get Client. + * Client/Tenant for this installation. + */ + public int getAD_Client_ID(); + + /** Column name AD_Org_ID */ + public static final String COLUMNNAME_AD_Org_ID = "AD_Org_ID"; + + /** Set Organization. + * Organizational entity within client + */ + public void setAD_Org_ID (int AD_Org_ID); + + /** Get Organization. + * Organizational entity within client + */ + public int getAD_Org_ID(); + + /** Column name AD_ToolBarButton_ID */ + public static final String COLUMNNAME_AD_ToolBarButton_ID = "AD_ToolBarButton_ID"; + + /** Set ToolBar Button */ + public void setAD_ToolBarButton_ID (int AD_ToolBarButton_ID); + + /** Get ToolBar Button */ + public int getAD_ToolBarButton_ID(); + + /** Column name Classname */ + public static final String COLUMNNAME_Classname = "Classname"; + + /** Set Classname. + * Java Classname + */ + public void setClassname (String Classname); + + /** Get Classname. + * Java Classname + */ + public String getClassname(); + + /** Column name ComponentName */ + public static final String COLUMNNAME_ComponentName = "ComponentName"; + + /** Set Component Name */ + public void setComponentName (String ComponentName); + + /** Get Component Name */ + public String getComponentName(); + + /** 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 IsCustomization */ + public static final String COLUMNNAME_IsCustomization = "IsCustomization"; + + /** Set Customization. + * The change is a customization of the data dictionary and can be applied after Migration + */ + public void setIsCustomization (boolean IsCustomization); + + /** Get Customization. + * The change is a customization of the data dictionary and can be applied after Migration + */ + public boolean isCustomization(); + + /** Column name KeyStroke_KeyCode */ + public static final String COLUMNNAME_KeyStroke_KeyCode = "KeyStroke_KeyCode"; + + /** Set KeyCode. + * KeyCode for shortcuts + */ + public void setKeyStroke_KeyCode (int KeyStroke_KeyCode); + + /** Get KeyCode. + * KeyCode for shortcuts + */ + public int getKeyStroke_KeyCode(); + + /** Column name KeyStroke_Modifiers */ + public static final String COLUMNNAME_KeyStroke_Modifiers = "KeyStroke_Modifiers"; + + /** Set Keystroke Modifiers. + * Keystroke Modifiers for shortcuts + */ + public void setKeyStroke_Modifiers (int KeyStroke_Modifiers); + + /** Get Keystroke Modifiers. + * Keystroke Modifiers for shortcuts + */ + public int getKeyStroke_Modifiers(); + + /** Column name Name */ + public static final String COLUMNNAME_Name = "Name"; + + /** Set Name. + * Alphanumeric identifier of the entity + */ + public void setName (String Name); + + /** Get Name. + * Alphanumeric identifier of the entity + */ + public String getName(); + + /** 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/I_AD_ToolBarButtonRestrict.java b/org.adempiere.base/src/org/compiere/model/I_AD_ToolBarButtonRestrict.java new file mode 100644 index 0000000000..87f87363a1 --- /dev/null +++ b/org.adempiere.base/src/org/compiere/model/I_AD_ToolBarButtonRestrict.java @@ -0,0 +1,173 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved. * + * This program is free software, you can redistribute it and/or modify it * + * under the terms version 2 of the GNU General Public License as published * + * by the Free Software Foundation. This program is distributed in the hope * + * that it will be useful, but WITHOUT ANY WARRANTY, without even the implied * + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * + * See the GNU General Public License for more details. * + * You should have received a copy of the GNU General Public License along * + * with this program, if not, write to the Free Software Foundation, Inc., * + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * + * For the text or an alternative of this public license, you may reach us * + * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * + * or via info@compiere.org or http://www.compiere.org/license.html * + *****************************************************************************/ +package org.compiere.model; + +import java.math.BigDecimal; +import java.sql.Timestamp; +import org.compiere.model.*; +import org.compiere.util.KeyNamePair; + +/** Generated Interface for AD_ToolBarButtonRestrict + * @author Adempiere (generated) + * @version 360LTS.015 + */ +public interface I_AD_ToolBarButtonRestrict +{ + + /** TableName=AD_ToolBarButtonRestrict */ + public static final String Table_Name = "AD_ToolBarButtonRestrict"; + + /** AD_Table_ID=200004 */ + public static final int Table_ID = MTable.getTable_ID(Table_Name); + + KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); + + /** AccessLevel = 6 - System - Client + */ + BigDecimal accessLevel = BigDecimal.valueOf(6); + + /** Load Meta Data */ + + /** Column name Action */ + public static final String COLUMNNAME_Action = "Action"; + + /** Set Action. + * Indicates the Action to be performed + */ + public void setAction (String Action); + + /** Get Action. + * Indicates the Action to be performed + */ + public String getAction(); + + /** Column name AD_Client_ID */ + public static final String COLUMNNAME_AD_Client_ID = "AD_Client_ID"; + + /** Get Client. + * Client/Tenant for this installation. + */ + public int getAD_Client_ID(); + + /** Column name AD_Org_ID */ + public static final String COLUMNNAME_AD_Org_ID = "AD_Org_ID"; + + /** Set Organization. + * Organizational entity within client + */ + public void setAD_Org_ID (int AD_Org_ID); + + /** Get Organization. + * Organizational entity within client + */ + public int getAD_Org_ID(); + + /** Column name AD_Role_ID */ + public static final String COLUMNNAME_AD_Role_ID = "AD_Role_ID"; + + /** Set Role. + * Responsibility Role + */ + public void setAD_Role_ID (int AD_Role_ID); + + /** Get Role. + * Responsibility Role + */ + public int getAD_Role_ID(); + + public I_AD_Role getAD_Role() throws RuntimeException; + + /** Column name AD_ToolBarButton_ID */ + public static final String COLUMNNAME_AD_ToolBarButton_ID = "AD_ToolBarButton_ID"; + + /** Set ToolBar Button */ + public void setAD_ToolBarButton_ID (int AD_ToolBarButton_ID); + + /** Get ToolBar Button */ + public int getAD_ToolBarButton_ID(); + + public I_AD_ToolBarButton getAD_ToolBarButton() throws RuntimeException; + + /** Column name AD_ToolBarButtonRestrict_ID */ + public static final String COLUMNNAME_AD_ToolBarButtonRestrict_ID = "AD_ToolBarButtonRestrict_ID"; + + /** Set ToolBar Button Restrict */ + public void setAD_ToolBarButtonRestrict_ID (int AD_ToolBarButtonRestrict_ID); + + /** Get ToolBar Button Restrict */ + public int getAD_ToolBarButtonRestrict_ID(); + + /** Column name AD_Window_ID */ + public static final String COLUMNNAME_AD_Window_ID = "AD_Window_ID"; + + /** Set Window. + * Data entry or display window + */ + public void setAD_Window_ID (int AD_Window_ID); + + /** Get Window. + * Data entry or display window + */ + public int getAD_Window_ID(); + + public I_AD_Window getAD_Window() 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 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/MToolBarButtonRestrict.java b/org.adempiere.base/src/org/compiere/model/MToolBarButtonRestrict.java new file mode 100644 index 0000000000..299e7b1f4b --- /dev/null +++ b/org.adempiere.base/src/org/compiere/model/MToolBarButtonRestrict.java @@ -0,0 +1,104 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. * + * This program is free software; you can redistribute it and/or modify it * + * under the terms version 2 of the GNU General Public License as published * + * by the Free Software Foundation. This program is distributed in the hope * + * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * + * See the GNU General Public License for more details. * + * You should have received a copy of the GNU General Public License along * + * with this program; if not, write to the Free Software Foundation, Inc., * + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * + * For the text or an alternative of this public license, you may reach us * + * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * + * or via info@compiere.org or http://www.compiere.org/license.html * + *****************************************************************************/ +package org.compiere.model; + +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.Properties; +import java.util.logging.Level; + +import org.compiere.util.CLogger; +import org.compiere.util.DB; +import org.compiere.util.Env; + + +/** + * ToolBar & Button Restriction + * @author Nicolas Micoud + */ +public class MToolBarButtonRestrict extends X_AD_ToolBarButtonRestrict +{ + private static final long serialVersionUID = -422120961441035731L; + private static CLogger s_log = CLogger.getCLogger(MToolBarButtonRestrict.class); + + /** + * Standard Constructor + * @param ctx context + * @param AD_Note_ID id + * @param trxName transaction + */ + public MToolBarButtonRestrict (Properties ctx, int AD_ToolBarButtonRestrict_ID, String trxName) + { + super (ctx, AD_ToolBarButtonRestrict_ID, trxName); + } // MToolBarButtonRestrict + + /** + * Load Constructor + * @param ctx context + * @param rs result set + * @param trxName transaction + */ + public MToolBarButtonRestrict(Properties ctx, ResultSet rs, String trxName) + { + super(ctx, rs, trxName); + } // MToolBarButtonRestrict + + /** Renvoie une liste des restrictions à appliquer en fonction du rôle, de la fenêtre, du formulaire, ... **/ + public static ArrayList getOf (Properties ctx, int AD_Role_ID, String Action, int Action_ID, String trxName) + { + // Action : R-Report, W-Window, X-form + ArrayList list = new ArrayList(); + + String sql = "SELECT AD_ToolBarButton_ID FROM AD_ToolBarButtonRestrict WHERE IsActive = 'Y'" + + " AND AD_Client_ID IN (0, " + Env.getAD_Client_ID(ctx) + ")" + + " AND (AD_Role_ID IS NULL OR AD_Role_ID = " + AD_Role_ID + ")" + + " AND (Action IS NULL " + + " OR Action='" + Action + "' AND (AD_Window_ID IS NULL OR AD_Window_ID = " + Action_ID + "))"; + s_log.warning("sql="+sql); + + PreparedStatement pstmt = DB.prepareStatement(sql, trxName); + ResultSet rs; + try { + rs = pstmt.executeQuery(); + + while (rs.next()) + { + if (!list.contains(rs.getInt(1))) + list.add (rs.getInt(1)); + } + } catch (SQLException e) { + s_log.log(Level.SEVERE, sql, e); + } + + return list; + } // getOf + + /** + * String Representation + * @return info + */ + public String toString() + { + StringBuffer sb = new StringBuffer ("MToolBarButtonRestrict[") + .append(get_ID()).append(",AD_ToolBarButtonRestrict_ID=").append(getAD_ToolBarButtonRestrict_ID()) + .append("]"); + return sb.toString(); + } // toString + +} // MToolBarButtonRestrict diff --git a/org.adempiere.base/src/org/compiere/model/X_AD_ToolBarButton.java b/org.adempiere.base/src/org/compiere/model/X_AD_ToolBarButton.java new file mode 100644 index 0000000000..8ad6f601b1 --- /dev/null +++ b/org.adempiere.base/src/org/compiere/model/X_AD_ToolBarButton.java @@ -0,0 +1,252 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved. * + * This program is free software, you can redistribute it and/or modify it * + * under the terms version 2 of the GNU General Public License as published * + * by the Free Software Foundation. This program is distributed in the hope * + * that it will be useful, but WITHOUT ANY WARRANTY, without even the implied * + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * + * See the GNU General Public License for more details. * + * You should have received a copy of the GNU General Public License along * + * with this program, if not, write to the Free Software Foundation, Inc., * + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * + * For the text or an alternative of this public license, you may reach us * + * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * + * or via info@compiere.org or http://www.compiere.org/license.html * + *****************************************************************************/ +/** Generated Model - DO NOT CHANGE */ +package org.compiere.model; + +import java.sql.ResultSet; +import java.util.Properties; +import org.compiere.model.*; +import org.compiere.util.KeyNamePair; + +/** Generated Model for AD_ToolBarButton + * @author Adempiere (generated) + * @version 360LTS.015 - $Id$ */ +public class X_AD_ToolBarButton extends PO implements I_AD_ToolBarButton, I_Persistent +{ + + /** + * + */ + private static final long serialVersionUID = 20120329L; + + /** Standard Constructor */ + public X_AD_ToolBarButton (Properties ctx, int AD_ToolBarButton_ID, String trxName) + { + super (ctx, AD_ToolBarButton_ID, trxName); + /** if (AD_ToolBarButton_ID == 0) + { + setAD_ToolBarButton_ID (0); + setClassname (null); + setComponentName (null); + setIsCustomization (false); +// N + setName (null); + } */ + } + + /** Load Constructor */ + public X_AD_ToolBarButton (Properties ctx, ResultSet rs, String trxName) + { + super (ctx, rs, trxName); + } + + /** AccessLevel + * @return 4 - System + */ + 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_AD_ToolBarButton[") + .append(get_ID()).append("]"); + return sb.toString(); + } + + /** Set Action Class Name. + @param ActionClassName + The class name that implements the interface for toolbar actions + */ + public void setActionClassName (String ActionClassName) + { + set_Value (COLUMNNAME_ActionClassName, ActionClassName); + } + + /** Get Action Class Name. + @return The class name that implements the interface for toolbar actions + */ + public String getActionClassName () + { + return (String)get_Value(COLUMNNAME_ActionClassName); + } + + /** Set Action Name. + @param ActionName + Action name on the toolbar + */ + public void setActionName (String ActionName) + { + set_Value (COLUMNNAME_ActionName, ActionName); + } + + /** Get Action Name. + @return Action name on the toolbar + */ + public String getActionName () + { + return (String)get_Value(COLUMNNAME_ActionName); + } + + /** Set ToolBar Button. + @param AD_ToolBarButton_ID ToolBar Button */ + public void setAD_ToolBarButton_ID (int AD_ToolBarButton_ID) + { + if (AD_ToolBarButton_ID < 1) + set_ValueNoCheck (COLUMNNAME_AD_ToolBarButton_ID, null); + else + set_ValueNoCheck (COLUMNNAME_AD_ToolBarButton_ID, Integer.valueOf(AD_ToolBarButton_ID)); + } + + /** Get ToolBar Button. + @return ToolBar Button */ + public int getAD_ToolBarButton_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_AD_ToolBarButton_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Classname. + @param Classname + Java Classname + */ + public void setClassname (String Classname) + { + set_Value (COLUMNNAME_Classname, Classname); + } + + /** Get Classname. + @return Java Classname + */ + public String getClassname () + { + return (String)get_Value(COLUMNNAME_Classname); + } + + /** Set Component Name. + @param ComponentName Component Name */ + public void setComponentName (String ComponentName) + { + set_Value (COLUMNNAME_ComponentName, ComponentName); + } + + /** Get Component Name. + @return Component Name */ + public String getComponentName () + { + return (String)get_Value(COLUMNNAME_ComponentName); + } + + /** Set Customization. + @param IsCustomization + The change is a customization of the data dictionary and can be applied after Migration + */ + public void setIsCustomization (boolean IsCustomization) + { + set_Value (COLUMNNAME_IsCustomization, Boolean.valueOf(IsCustomization)); + } + + /** Get Customization. + @return The change is a customization of the data dictionary and can be applied after Migration + */ + public boolean isCustomization () + { + Object oo = get_Value(COLUMNNAME_IsCustomization); + if (oo != null) + { + if (oo instanceof Boolean) + return ((Boolean)oo).booleanValue(); + return "Y".equals(oo); + } + return false; + } + + /** Set KeyCode. + @param KeyStroke_KeyCode + KeyCode for shortcuts + */ + public void setKeyStroke_KeyCode (int KeyStroke_KeyCode) + { + set_Value (COLUMNNAME_KeyStroke_KeyCode, Integer.valueOf(KeyStroke_KeyCode)); + } + + /** Get KeyCode. + @return KeyCode for shortcuts + */ + public int getKeyStroke_KeyCode () + { + Integer ii = (Integer)get_Value(COLUMNNAME_KeyStroke_KeyCode); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Keystroke Modifiers. + @param KeyStroke_Modifiers + Keystroke Modifiers for shortcuts + */ + public void setKeyStroke_Modifiers (int KeyStroke_Modifiers) + { + set_Value (COLUMNNAME_KeyStroke_Modifiers, Integer.valueOf(KeyStroke_Modifiers)); + } + + /** Get Keystroke Modifiers. + @return Keystroke Modifiers for shortcuts + */ + public int getKeyStroke_Modifiers () + { + Integer ii = (Integer)get_Value(COLUMNNAME_KeyStroke_Modifiers); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set Name. + @param Name + Alphanumeric identifier of the entity + */ + public void setName (String Name) + { + set_Value (COLUMNNAME_Name, Name); + } + + /** Get Name. + @return Alphanumeric identifier of the entity + */ + public String getName () + { + return (String)get_Value(COLUMNNAME_Name); + } + + /** Get Record ID/ColumnName + @return ID/ColumnName pair + */ + public KeyNamePair getKeyNamePair() + { + return new KeyNamePair(get_ID(), getName()); + } +} \ No newline at end of file diff --git a/org.adempiere.base/src/org/compiere/model/X_AD_ToolBarButtonRestrict.java b/org.adempiere.base/src/org/compiere/model/X_AD_ToolBarButtonRestrict.java new file mode 100644 index 0000000000..36729c7111 --- /dev/null +++ b/org.adempiere.base/src/org/compiere/model/X_AD_ToolBarButtonRestrict.java @@ -0,0 +1,209 @@ +/****************************************************************************** + * Product: Adempiere ERP & CRM Smart Business Solution * + * Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved. * + * This program is free software, you can redistribute it and/or modify it * + * under the terms version 2 of the GNU General Public License as published * + * by the Free Software Foundation. This program is distributed in the hope * + * that it will be useful, but WITHOUT ANY WARRANTY, without even the implied * + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * + * See the GNU General Public License for more details. * + * You should have received a copy of the GNU General Public License along * + * with this program, if not, write to the Free Software Foundation, Inc., * + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * + * For the text or an alternative of this public license, you may reach us * + * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * + * or via info@compiere.org or http://www.compiere.org/license.html * + *****************************************************************************/ +/** Generated Model - DO NOT CHANGE */ +package org.compiere.model; + +import java.sql.ResultSet; +import java.util.Properties; +import org.compiere.model.*; + +/** Generated Model for AD_ToolBarButtonRestrict + * @author Adempiere (generated) + * @version 360LTS.015 - $Id$ */ +public class X_AD_ToolBarButtonRestrict extends PO implements I_AD_ToolBarButtonRestrict, I_Persistent +{ + + /** + * + */ + private static final long serialVersionUID = 20120329L; + + /** Standard Constructor */ + public X_AD_ToolBarButtonRestrict (Properties ctx, int AD_ToolBarButtonRestrict_ID, String trxName) + { + super (ctx, AD_ToolBarButtonRestrict_ID, trxName); + /** if (AD_ToolBarButtonRestrict_ID == 0) + { + setAction (null); + setAD_Role_ID (0); + setAD_ToolBarButtonRestrict_ID (0); + } */ + } + + /** Load Constructor */ + public X_AD_ToolBarButtonRestrict (Properties ctx, ResultSet rs, String trxName) + { + super (ctx, rs, trxName); + } + + /** AccessLevel + * @return 6 - System - Client + */ + protected int get_AccessLevel() + { + return accessLevel.intValue(); + } + + /** Load Meta Data */ + protected POInfo initPO (Properties ctx) + { + POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName()); + return poi; + } + + public String toString() + { + StringBuffer sb = new StringBuffer ("X_AD_ToolBarButtonRestrict[") + .append(get_ID()).append("]"); + return sb.toString(); + } + + /** Action AD_Reference_ID=104 */ + public static final int ACTION_AD_Reference_ID=104; + /** Window = W */ + public static final String ACTION_Window = "W"; + /** Task = T */ + public static final String ACTION_Task = "T"; + /** WorkFlow = F */ + public static final String ACTION_WorkFlow = "F"; + /** Process = P */ + public static final String ACTION_Process = "P"; + /** Report = R */ + public static final String ACTION_Report = "R"; + /** Form = X */ + public static final String ACTION_Form = "X"; + /** Workbench = B */ + public static final String ACTION_Workbench = "B"; + /** Set Action. + @param Action + Indicates the Action to be performed + */ + public void setAction (String Action) + { + + set_Value (COLUMNNAME_Action, Action); + } + + /** Get Action. + @return Indicates the Action to be performed + */ + public String getAction () + { + return (String)get_Value(COLUMNNAME_Action); + } + + public I_AD_Role getAD_Role() throws RuntimeException + { + return (I_AD_Role)MTable.get(getCtx(), I_AD_Role.Table_Name) + .getPO(getAD_Role_ID(), get_TrxName()); } + + /** Set Role. + @param AD_Role_ID + Responsibility Role + */ + public void setAD_Role_ID (int AD_Role_ID) + { + if (AD_Role_ID < 0) + set_Value (COLUMNNAME_AD_Role_ID, null); + else + set_Value (COLUMNNAME_AD_Role_ID, Integer.valueOf(AD_Role_ID)); + } + + /** Get Role. + @return Responsibility Role + */ + public int getAD_Role_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_AD_Role_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public I_AD_ToolBarButton getAD_ToolBarButton() throws RuntimeException + { + return (I_AD_ToolBarButton)MTable.get(getCtx(), I_AD_ToolBarButton.Table_Name) + .getPO(getAD_ToolBarButton_ID(), get_TrxName()); } + + /** Set ToolBar Button. + @param AD_ToolBarButton_ID ToolBar Button */ + public void setAD_ToolBarButton_ID (int AD_ToolBarButton_ID) + { + if (AD_ToolBarButton_ID < 1) + set_Value (COLUMNNAME_AD_ToolBarButton_ID, null); + else + set_Value (COLUMNNAME_AD_ToolBarButton_ID, Integer.valueOf(AD_ToolBarButton_ID)); + } + + /** Get ToolBar Button. + @return ToolBar Button */ + public int getAD_ToolBarButton_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_AD_ToolBarButton_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + /** Set ToolBar Button Restrict. + @param AD_ToolBarButtonRestrict_ID ToolBar Button Restrict */ + public void setAD_ToolBarButtonRestrict_ID (int AD_ToolBarButtonRestrict_ID) + { + if (AD_ToolBarButtonRestrict_ID < 1) + set_ValueNoCheck (COLUMNNAME_AD_ToolBarButtonRestrict_ID, null); + else + set_ValueNoCheck (COLUMNNAME_AD_ToolBarButtonRestrict_ID, Integer.valueOf(AD_ToolBarButtonRestrict_ID)); + } + + /** Get ToolBar Button Restrict. + @return ToolBar Button Restrict */ + public int getAD_ToolBarButtonRestrict_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_AD_ToolBarButtonRestrict_ID); + if (ii == null) + return 0; + return ii.intValue(); + } + + public I_AD_Window getAD_Window() throws RuntimeException + { + return (I_AD_Window)MTable.get(getCtx(), I_AD_Window.Table_Name) + .getPO(getAD_Window_ID(), get_TrxName()); } + + /** Set Window. + @param AD_Window_ID + Data entry or display window + */ + public void setAD_Window_ID (int AD_Window_ID) + { + if (AD_Window_ID < 1) + set_Value (COLUMNNAME_AD_Window_ID, null); + else + set_Value (COLUMNNAME_AD_Window_ID, Integer.valueOf(AD_Window_ID)); + } + + /** Get Window. + @return Data entry or display window + */ + public int getAD_Window_ID () + { + Integer ii = (Integer)get_Value(COLUMNNAME_AD_Window_ID); + if (ii == null) + return 0; + return ii.intValue(); + } +} \ No newline at end of file diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/APanel.java b/org.adempiere.ui.swing/src/org/compiere/apps/APanel.java index fb4199180f..d3c5f2abe5 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/APanel.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/APanel.java @@ -87,8 +87,10 @@ import org.compiere.model.MLookupFactory; import org.compiere.model.MProcess; import org.compiere.model.MQuery; import org.compiere.model.MRole; +import org.compiere.model.MToolBarButtonRestrict; import org.compiere.model.MUser; import org.compiere.model.MWindow; +import org.compiere.model.X_AD_ToolBarButton; import org.compiere.plaf.CompiereColor; import org.compiere.print.AReport; import org.compiere.process.DocAction; @@ -149,6 +151,7 @@ public final class APanel extends CPanel private static final long serialVersionUID = 6066778919781303581L; private boolean isNested = false; + private boolean ToolBarMenuRestictionLoaded = false; /** * Constructs a new instance. @@ -1569,6 +1572,13 @@ public final class APanel extends CPanel // m_curWinTab.requestFocusInWindow(); setBusy(false, true); + + if (!ToolBarMenuRestictionLoaded) + { + updateToolBarAndMenuWithRestriction(); + ToolBarMenuRestictionLoaded = true; + } + log.config( "fini"); } // stateChanged @@ -2905,4 +2915,57 @@ public final class APanel extends CPanel if (frame instanceof AWindow) ((AWindow)frame).setBusyMessage(message); } + + private void updateToolBarAndMenuWithRestriction() + { + ArrayList restrictionList = new ArrayList(); + int ToolBarButton_ID = 0; + + restrictionList = MToolBarButtonRestrict.getOf(m_ctx, MRole.getDefault().getAD_Role_ID(), "W", m_window.getAD_Window_ID(), null); + log.warning("restrictionList="+restrictionList.toString()); + + for (int i = 0; i < restrictionList.size(); i++) + { + ToolBarButton_ID= restrictionList.get(i); + + X_AD_ToolBarButton tbt = new X_AD_ToolBarButton(Env.getCtx(), ToolBarButton_ID, null); + String restrictName = tbt.getComponentName(); + log.config("tbt="+tbt.getAD_ToolBarButton_ID() + " / " + restrictName); + boolean found=false; + + // remove from ToolBar + for (int t = 0; t < toolBar.getComponentCount() && !found; t++) + { + if (toolBar.getComponent(t).getName()==null) // separator + continue; + + if (toolBar.getComponent(t).getName().equals(restrictName)) + { + toolBar.remove(t); + found=true; + } + } + + // Remove from Menu + found=false; + for (int m1 = 0; m1 < menuBar.getComponentCount() && !found; m1++) + { + JMenu menu = menuBar.getMenu(m1); // File, Edit, View... + + for (int m2 = 0; m2 < menu.getItemCount() && !found; m2++) // New, Copy, Save... + { + if (menu.getItem(m2)==null) // separator + continue; + + if (menu.getItem(m2).getActionCommand().equals(restrictName)) + { + menu.remove(m2); + found=true; + } + } // menuItems + } // Menu (File, Edit, View, ...) + } // All restrictions + + } // updateToolBarAndMenuWithRestriction + } // APanel From a515c81c2db91920d1fc694aee53f5410cbcc9f5 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Wed, 4 Apr 2012 23:39:52 -0500 Subject: [PATCH 24/29] IDEMPIERE-129 Restrictions on Toolbar and Menu - peer review and apply best practices http://jira.idempiere.com/browse/IDEMPIERE-129 --- .../model/MToolBarButtonRestrict.java | 44 +++++++------------ .../src/org/compiere/apps/APanel.java | 15 +++---- 2 files changed, 22 insertions(+), 37 deletions(-) diff --git a/org.adempiere.base/src/org/compiere/model/MToolBarButtonRestrict.java b/org.adempiere.base/src/org/compiere/model/MToolBarButtonRestrict.java index 299e7b1f4b..d61ba84cbb 100644 --- a/org.adempiere.base/src/org/compiere/model/MToolBarButtonRestrict.java +++ b/org.adempiere.base/src/org/compiere/model/MToolBarButtonRestrict.java @@ -16,12 +16,8 @@ *****************************************************************************/ package org.compiere.model; -import java.sql.PreparedStatement; import java.sql.ResultSet; -import java.sql.SQLException; -import java.util.ArrayList; import java.util.Properties; -import java.util.logging.Level; import org.compiere.util.CLogger; import org.compiere.util.DB; @@ -34,7 +30,11 @@ import org.compiere.util.Env; */ public class MToolBarButtonRestrict extends X_AD_ToolBarButtonRestrict { - private static final long serialVersionUID = -422120961441035731L; + /** + * + */ + private static final long serialVersionUID = 751989571891306735L; + private static CLogger s_log = CLogger.getCLogger(MToolBarButtonRestrict.class); /** @@ -59,34 +59,20 @@ public class MToolBarButtonRestrict extends X_AD_ToolBarButtonRestrict super(ctx, rs, trxName); } // MToolBarButtonRestrict - /** Renvoie une liste des restrictions à appliquer en fonction du rôle, de la fenêtre, du formulaire, ... **/ - public static ArrayList getOf (Properties ctx, int AD_Role_ID, String Action, int Action_ID, String trxName) + /** Returns a list of restrictions to be applied according to the role, the window of the form ... **/ + public static int[] getOf (Properties ctx, int AD_Role_ID, String Action, int Action_ID, String className, String trxName) { // Action : R-Report, W-Window, X-form - ArrayList list = new ArrayList(); - String sql = "SELECT AD_ToolBarButton_ID FROM AD_ToolBarButtonRestrict WHERE IsActive = 'Y'" - + " AND AD_Client_ID IN (0, " + Env.getAD_Client_ID(ctx) + ")" - + " AND (AD_Role_ID IS NULL OR AD_Role_ID = " + AD_Role_ID + ")" - + " AND (Action IS NULL " - + " OR Action='" + Action + "' AND (AD_Window_ID IS NULL OR AD_Window_ID = " + Action_ID + "))"; - s_log.warning("sql="+sql); + + " AND AD_Client_ID IN (0, ?)" + + " AND (AD_Role_ID IS NULL OR AD_Role_ID = ?)" + + " AND (Action IS NULL OR Action=? AND (AD_Window_ID IS NULL OR (Action='W' AND AD_Window_ID=?)))" + + " AND AD_ToolBarButton_ID IN (SELECT AD_ToolBarButton_ID FROM AD_ToolBarButton WHERE IsActive='Y' AND Classname=?)"; + s_log.info("sql="+sql); + + int[] ids = DB.getIDsEx(trxName, sql, Env.getAD_Client_ID(ctx), AD_Role_ID, Action, Action_ID, className); - PreparedStatement pstmt = DB.prepareStatement(sql, trxName); - ResultSet rs; - try { - rs = pstmt.executeQuery(); - - while (rs.next()) - { - if (!list.contains(rs.getInt(1))) - list.add (rs.getInt(1)); - } - } catch (SQLException e) { - s_log.log(Level.SEVERE, sql, e); - } - - return list; + return ids; } // getOf /** diff --git a/org.adempiere.ui.swing/src/org/compiere/apps/APanel.java b/org.adempiere.ui.swing/src/org/compiere/apps/APanel.java index d3c5f2abe5..2dec7cb525 100644 --- a/org.adempiere.ui.swing/src/org/compiere/apps/APanel.java +++ b/org.adempiere.ui.swing/src/org/compiere/apps/APanel.java @@ -146,9 +146,9 @@ public final class APanel extends CPanel implements DataStatusListener, ChangeListener, ActionListener, IProcessMonitor { /** - * + * */ - private static final long serialVersionUID = 6066778919781303581L; + private static final long serialVersionUID = -253840959387736456L; private boolean isNested = false; private boolean ToolBarMenuRestictionLoaded = false; @@ -2918,17 +2918,16 @@ public final class APanel extends CPanel private void updateToolBarAndMenuWithRestriction() { - ArrayList restrictionList = new ArrayList(); int ToolBarButton_ID = 0; - restrictionList = MToolBarButtonRestrict.getOf(m_ctx, MRole.getDefault().getAD_Role_ID(), "W", m_window.getAD_Window_ID(), null); - log.warning("restrictionList="+restrictionList.toString()); + int[] restrictionList = MToolBarButtonRestrict.getOf(m_ctx, MRole.getDefault().getAD_Role_ID(), "W", m_window.getAD_Window_ID(), this.getClass().getName(), null); + log.info("restrictionList="+restrictionList.toString()); - for (int i = 0; i < restrictionList.size(); i++) + for (int i = 0; i < restrictionList.length; i++) { - ToolBarButton_ID= restrictionList.get(i); + ToolBarButton_ID= restrictionList[i]; - X_AD_ToolBarButton tbt = new X_AD_ToolBarButton(Env.getCtx(), ToolBarButton_ID, null); + X_AD_ToolBarButton tbt = new X_AD_ToolBarButton(m_ctx, ToolBarButton_ID, null); String restrictName = tbt.getComponentName(); log.config("tbt="+tbt.getAD_ToolBarButton_ID() + " / " + restrictName); boolean found=false; From 69875e908381ed375c9e9cc1dbeb03d6d7b32bc9 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Thu, 5 Apr 2012 00:45:17 -0500 Subject: [PATCH 25/29] IDEMPIERE-129 Restrictions on Toolbar and Menu - Implement for zk http://jira.idempiere.com/browse/IDEMPIERE-129 --- .../oracle/833_IDEMPIERE-129.sql | 35 +++++++++++++++ .../postgresql/833_IDEMPIERE-129.sql | 35 +++++++++++++++ .../webui/component/CWindowToolbar.java | 44 ++++++++++++++++++- .../webui/panel/AbstractADWindowPanel.java | 2 + 4 files changed, 114 insertions(+), 2 deletions(-) diff --git a/migration/360lts-release/oracle/833_IDEMPIERE-129.sql b/migration/360lts-release/oracle/833_IDEMPIERE-129.sql index 161018a849..5e81f036b3 100644 --- a/migration/360lts-release/oracle/833_IDEMPIERE-129.sql +++ b/migration/360lts-release/oracle/833_IDEMPIERE-129.sql @@ -1238,6 +1238,41 @@ ALTER TABLE AD_ToolBarButtonRestrict MODIFY Action NULL UPDATE AD_Column SET IsUpdateable='N',Updated=TO_DATE('2012-03-29 13:45:01','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Column_ID=200111 ; +-- 05-abr-2012 0:19:55 COT +-- IDEMPIERE-129 Restrictions on Toolbar and Menu +UPDATE AD_ToolBarButton SET ComponentName='Toggle',Updated=TO_DATE('2012-04-05 00:19:55','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_ToolBarButton_ID=200041 +; + +-- 05-abr-2012 0:20:01 COT +-- IDEMPIERE-129 Restrictions on Toolbar and Menu +UPDATE AD_ToolBarButton SET ComponentName='HistoryRecords',Updated=TO_DATE('2012-04-05 00:20:01','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_ToolBarButton_ID=200042 +; + +-- 05-abr-2012 0:20:10 COT +-- IDEMPIERE-129 Restrictions on Toolbar and Menu +UPDATE AD_ToolBarButton SET ComponentName='ParentRecord',Updated=TO_DATE('2012-04-05 00:20:10','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_ToolBarButton_ID=200043 +; + +-- 05-abr-2012 0:20:12 COT +-- IDEMPIERE-129 Restrictions on Toolbar and Menu +UPDATE AD_ToolBarButton SET ComponentName='DetailRecord',Updated=TO_DATE('2012-04-05 00:20:12','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_ToolBarButton_ID=200044 +; + +-- 05-abr-2012 0:20:32 COT +-- IDEMPIERE-129 Restrictions on Toolbar and Menu +UPDATE AD_ToolBarButton SET ComponentName='ActiveWorkflows',Updated=TO_DATE('2012-04-05 00:20:32','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_ToolBarButton_ID=200054 +; + +-- 05-abr-2012 0:20:35 COT +-- IDEMPIERE-129 Restrictions on Toolbar and Menu +UPDATE AD_ToolBarButton SET ComponentName='Requests',Updated=TO_DATE('2012-04-05 00:20:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_ToolBarButton_ID=200055 +; + +-- 05-abr-2012 0:20:39 COT +-- IDEMPIERE-129 Restrictions on Toolbar and Menu +UPDATE AD_ToolBarButton SET ComponentName='ProductInfo',Updated=TO_DATE('2012-04-05 00:20:39','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_ToolBarButton_ID=200056 +; + UPDATE AD_System SET LastMigrationScriptApplied='833_IDEMPIERE-129.sql' WHERE LastMigrationScriptApplied<'833_IDEMPIERE-129.sql' diff --git a/migration/360lts-release/postgresql/833_IDEMPIERE-129.sql b/migration/360lts-release/postgresql/833_IDEMPIERE-129.sql index 582022544b..fe6e22dda0 100644 --- a/migration/360lts-release/postgresql/833_IDEMPIERE-129.sql +++ b/migration/360lts-release/postgresql/833_IDEMPIERE-129.sql @@ -1238,6 +1238,41 @@ INSERT INTO t_alter_column values('ad_toolbarbuttonrestrict','"action"',null,'NU UPDATE AD_Column SET IsUpdateable='N',Updated=TO_TIMESTAMP('2012-03-29 13:45:01','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Column_ID=200111 ; +-- 05-abr-2012 0:19:55 COT +-- IDEMPIERE-129 Restrictions on Toolbar and Menu +UPDATE AD_ToolBarButton SET ComponentName='Toggle',Updated=TO_TIMESTAMP('2012-04-05 00:19:55','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_ToolBarButton_ID=200041 +; + +-- 05-abr-2012 0:20:01 COT +-- IDEMPIERE-129 Restrictions on Toolbar and Menu +UPDATE AD_ToolBarButton SET ComponentName='HistoryRecords',Updated=TO_TIMESTAMP('2012-04-05 00:20:01','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_ToolBarButton_ID=200042 +; + +-- 05-abr-2012 0:20:10 COT +-- IDEMPIERE-129 Restrictions on Toolbar and Menu +UPDATE AD_ToolBarButton SET ComponentName='ParentRecord',Updated=TO_TIMESTAMP('2012-04-05 00:20:10','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_ToolBarButton_ID=200043 +; + +-- 05-abr-2012 0:20:12 COT +-- IDEMPIERE-129 Restrictions on Toolbar and Menu +UPDATE AD_ToolBarButton SET ComponentName='DetailRecord',Updated=TO_TIMESTAMP('2012-04-05 00:20:12','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_ToolBarButton_ID=200044 +; + +-- 05-abr-2012 0:20:32 COT +-- IDEMPIERE-129 Restrictions on Toolbar and Menu +UPDATE AD_ToolBarButton SET ComponentName='ActiveWorkflows',Updated=TO_TIMESTAMP('2012-04-05 00:20:32','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_ToolBarButton_ID=200054 +; + +-- 05-abr-2012 0:20:35 COT +-- IDEMPIERE-129 Restrictions on Toolbar and Menu +UPDATE AD_ToolBarButton SET ComponentName='Requests',Updated=TO_TIMESTAMP('2012-04-05 00:20:35','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_ToolBarButton_ID=200055 +; + +-- 05-abr-2012 0:20:39 COT +-- IDEMPIERE-129 Restrictions on Toolbar and Menu +UPDATE AD_ToolBarButton SET ComponentName='ProductInfo',Updated=TO_TIMESTAMP('2012-04-05 00:20:39','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_ToolBarButton_ID=200056 +; + UPDATE AD_System SET LastMigrationScriptApplied='833_IDEMPIERE-129.sql' WHERE LastMigrationScriptApplied<'833_IDEMPIERE-129.sql' diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/CWindowToolbar.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/CWindowToolbar.java index d8c3fc280f..47d731f16d 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/CWindowToolbar.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/CWindowToolbar.java @@ -23,6 +23,7 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; import java.util.Map; +import java.util.Properties; import java.util.logging.Level; import org.adempiere.webui.AdempiereIdGenerator; @@ -30,6 +31,8 @@ import org.adempiere.webui.LayoutUtils; import org.adempiere.webui.event.ToolbarListener; import org.adempiere.webui.session.SessionManager; import org.compiere.model.MRole; +import org.compiere.model.MToolBarButtonRestrict; +import org.compiere.model.X_AD_ToolBarButton; import org.compiere.util.CLogger; import org.compiere.util.Env; import org.compiere.util.Msg; @@ -51,10 +54,12 @@ import org.zkoss.zul.Space; */ public class CWindowToolbar extends FToolbar implements EventListener { + private static final String BTNPREFIX = "Btn"; + /** * */ - private static final long serialVersionUID = -762537218475834634L; + private static final long serialVersionUID = 5233006056333191551L; private static final String TOOLBAR_BUTTON_STYLE = "background-color: transparent; display:inline-block; margin-left: 1px; margin-right: 1px; width: 26px; height: 24px;"; @@ -209,7 +214,7 @@ public class CWindowToolbar extends FToolbar implements EventListener private ToolBarButton createButton(String name, String image, String tooltip) { ToolBarButton btn = new ToolBarButton(""); - btn.setName("Btn"+name); + btn.setName(BTNPREFIX+name); if (windowNo > 0) btn.setAttribute(AdempiereIdGenerator.ZK_COMPONENT_PREFIX_ATTRIBUTE, "unq" + btn.getName() + "_" + windowNo + (embedded ? "E" : "")); else @@ -633,4 +638,39 @@ public class CWindowToolbar extends FToolbar implements EventListener if (btnExport != null) btnExport.setDisabled(!b); } + + private boolean ToolBarMenuRestictionLoaded = false; + public void updateToolBarAndMenuWithRestriction(int AD_Window_ID) { + if (ToolBarMenuRestictionLoaded) + return; + Properties m_ctx = Env.getCtx(); + + int ToolBarButton_ID = 0; + + int[] restrictionList = MToolBarButtonRestrict.getOf(m_ctx, MRole.getDefault().getAD_Role_ID(), "W", AD_Window_ID, this.getClass().getName(), null); + log.info("restrictionList="+restrictionList.toString()); + + for (int i = 0; i < restrictionList.length; i++) + { + ToolBarButton_ID= restrictionList[i]; + + X_AD_ToolBarButton tbt = new X_AD_ToolBarButton(m_ctx, ToolBarButton_ID, null); + String restrictName = BTNPREFIX + tbt.getComponentName(); + log.config("tbt="+tbt.getAD_ToolBarButton_ID() + " / " + restrictName); + + for (Component p = this.getFirstChild(); p != null; p = p.getNextSibling()) { + if (p instanceof ToolBarButton) { + System.out.println(((ToolBarButton)p).getName()); + if ( restrictName.equals(((ToolBarButton)p).getName()) ) { + this.removeChild(p); + break; + } + } + } + + } // All restrictions + + ToolBarMenuRestictionLoaded = true; + } + } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/AbstractADWindowPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/AbstractADWindowPanel.java index a753bcc478..e806e8b14a 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/AbstractADWindowPanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/AbstractADWindowPanel.java @@ -1332,6 +1332,8 @@ public abstract class AbstractADWindowPanel extends AbstractUIPart implements To toolbar.enablePrint(curTab.isPrinted()); toolbar.enableReport(true); toolbar.enableExport(!curTab.isSortTab()); + + toolbar.updateToolBarAndMenuWithRestriction(gridWindow.getAD_Window_ID()); } /** From 7b08667d3f9fdd485153a83e9d43cdc1b577577e Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Thu, 5 Apr 2012 13:28:43 -0500 Subject: [PATCH 26/29] IDEMPIERE-129 Restrictions on Toolbar and Menu - Cleanup debug lines http://jira.idempiere.com/browse/IDEMPIERE-129 --- .../src/org/adempiere/webui/component/CWindowToolbar.java | 1 - 1 file changed, 1 deletion(-) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/CWindowToolbar.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/CWindowToolbar.java index 47d731f16d..44ca17d570 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/CWindowToolbar.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/CWindowToolbar.java @@ -660,7 +660,6 @@ public class CWindowToolbar extends FToolbar implements EventListener for (Component p = this.getFirstChild(); p != null; p = p.getNextSibling()) { if (p instanceof ToolBarButton) { - System.out.println(((ToolBarButton)p).getName()); if ( restrictName.equals(((ToolBarButton)p).getName()) ) { this.removeChild(p); break; From 1ed38faaf8392f603488274ea2d89e2d776dccfb Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Thu, 5 Apr 2012 13:37:42 -0500 Subject: [PATCH 27/29] IDEMPIERE-68 Current record could disappear after executing a button - Fix security issue reported by jdcs --- org.adempiere.base/src/org/compiere/model/GridTable.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/org.adempiere.base/src/org/compiere/model/GridTable.java b/org.adempiere.base/src/org/compiere/model/GridTable.java index 9fd586597a..874d145aba 100644 --- a/org.adempiere.base/src/org/compiere/model/GridTable.java +++ b/org.adempiere.base/src/org/compiere/model/GridTable.java @@ -351,7 +351,7 @@ public class GridTable extends AbstractTableModel // WHERE if (m_whereClause.length() > 0) { - where.append(" WHERE "); + where.append(" WHERE ("); if (m_whereClause.indexOf('@') == -1) where.append(m_whereClause); else // replace variables @@ -367,6 +367,7 @@ public class GridTable extends AbstractTableModel where.append(" 1 = 2 "); } } + where.append(")"); } if (m_onlyCurrentRows && m_TabNo == 0) { @@ -2847,7 +2848,7 @@ public class GridTable extends AbstractTableModel String whereClause = m_whereClause; if (m_whereClause != null && m_whereClause.trim().length() > 0) { - m_whereClause = "(" + m_whereClause + ") OR (" + retainedWhere + ") "; + m_whereClause = "((" + m_whereClause + ") OR (" + retainedWhere + ")) "; } open(m_maxRows); m_whereClause = whereClause; From b3b69eca5d40954116b41bdc34be409bf00e133f Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Thu, 5 Apr 2012 23:13:20 -0500 Subject: [PATCH 28/29] IDEMPIERE-227 Avg Inv Costing: Material receipt must post with purchase order price http://jira.idempiere.com/browse/IDEMPIERE-227 --- org.adempiere.base/src/org/compiere/acct/Doc_InOut.java | 1 + 1 file changed, 1 insertion(+) diff --git a/org.adempiere.base/src/org/compiere/acct/Doc_InOut.java b/org.adempiere.base/src/org/compiere/acct/Doc_InOut.java index 5e869537a7..45bb31d62c 100644 --- a/org.adempiere.base/src/org/compiere/acct/Doc_InOut.java +++ b/org.adempiere.base/src/org/compiere/acct/Doc_InOut.java @@ -385,6 +385,7 @@ public class Doc_InOut extends Doc //get costing method for product String costingMethod = product.getCostingMethod(as); if (MAcctSchema.COSTINGMETHOD_AveragePO.equals(costingMethod) || + MAcctSchema.COSTINGMETHOD_AverageInvoice.equals(costingMethod) || MAcctSchema.COSTINGMETHOD_LastPOPrice.equals(costingMethod) ) { int C_OrderLine_ID = line.getC_OrderLine_ID(); From 008acb6848d854fc6ed73e29acaf2fd439677eca Mon Sep 17 00:00:00 2001 From: Thomas Bayen Date: Fri, 6 Apr 2012 16:46:59 +0200 Subject: [PATCH 29/29] IDEMPIERE-113 Volume and Weights are not imported in Product importer --- .../oracle/834_IDEMPIERE-113.sql | 8 +++++ .../postgresql/834_IDEMPIERE-113.sql | 8 +++++ .../src/org/compiere/model/I_I_Product.java | 10 +++--- .../src/org/compiere/model/MProduct.java | 2 ++ .../src/org/compiere/model/X_I_Product.java | 32 +++++++++---------- 5 files changed, 39 insertions(+), 21 deletions(-) create mode 100644 migration/360lts-release/oracle/834_IDEMPIERE-113.sql create mode 100644 migration/360lts-release/postgresql/834_IDEMPIERE-113.sql diff --git a/migration/360lts-release/oracle/834_IDEMPIERE-113.sql b/migration/360lts-release/oracle/834_IDEMPIERE-113.sql new file mode 100644 index 0000000000..752dae1e49 --- /dev/null +++ b/migration/360lts-release/oracle/834_IDEMPIERE-113.sql @@ -0,0 +1,8 @@ +-- Apr 6, 2012 4:08:25 PM CEST +-- IDEMPIERE-113 Volume and Weight are not imported in Product importer +UPDATE AD_Column SET AD_Reference_ID=12,Updated=TO_DATE('2012-04-06 16:08:25','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=7839 +; + +-- Apr 6, 2012 4:10:02 PM CEST +UPDATE AD_Column SET AD_Reference_ID=12,Updated=TO_DATE('2012-04-06 16:10:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=7832 +; diff --git a/migration/360lts-release/postgresql/834_IDEMPIERE-113.sql b/migration/360lts-release/postgresql/834_IDEMPIERE-113.sql new file mode 100644 index 0000000000..ec918426be --- /dev/null +++ b/migration/360lts-release/postgresql/834_IDEMPIERE-113.sql @@ -0,0 +1,8 @@ +-- Apr 6, 2012 4:08:25 PM CEST +-- IDEMPIERE-113 Volume and Weight are not imported in Product importer +UPDATE AD_Column SET AD_Reference_ID=12,Updated=TO_TIMESTAMP('2012-04-06 16:08:25','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=7839 +; + +-- Apr 6, 2012 4:10:02 PM CEST +UPDATE AD_Column SET AD_Reference_ID=12,Updated=TO_TIMESTAMP('2012-04-06 16:10:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=7832 +; diff --git a/org.adempiere.base/src/org/compiere/model/I_I_Product.java b/org.adempiere.base/src/org/compiere/model/I_I_Product.java index 2cad165a70..68c98e4816 100644 --- a/org.adempiere.base/src/org/compiere/model/I_I_Product.java +++ b/org.adempiere.base/src/org/compiere/model/I_I_Product.java @@ -22,7 +22,7 @@ import org.compiere.util.KeyNamePair; /** Generated Interface for I_Product * @author Adempiere (generated) - * @version Release 3.6.0LTS + * @version 360LTS.015 */ public interface I_I_Product { @@ -674,12 +674,12 @@ public interface I_I_Product /** Set Volume. * Volume of a product */ - public void setVolume (int Volume); + public void setVolume (BigDecimal Volume); /** Get Volume. * Volume of a product */ - public int getVolume(); + public BigDecimal getVolume(); /** Column name Weight */ public static final String COLUMNNAME_Weight = "Weight"; @@ -687,12 +687,12 @@ public interface I_I_Product /** Set Weight. * Weight of a product */ - public void setWeight (int Weight); + public void setWeight (BigDecimal Weight); /** Get Weight. * Weight of a product */ - public int getWeight(); + public BigDecimal getWeight(); /** Column name X12DE355 */ public static final String COLUMNNAME_X12DE355 = "X12DE355"; diff --git a/org.adempiere.base/src/org/compiere/model/MProduct.java b/org.adempiere.base/src/org/compiere/model/MProduct.java index 389b7b9058..cc96ddb424 100644 --- a/org.adempiere.base/src/org/compiere/model/MProduct.java +++ b/org.adempiere.base/src/org/compiere/model/MProduct.java @@ -263,6 +263,8 @@ public class MProduct extends X_M_Product setProductType(impP.getProductType()); setImageURL(impP.getImageURL()); setDescriptionURL(impP.getDescriptionURL()); + setVolume(impP.getVolume()); + setWeight(impP.getWeight()); } // MProduct /** Additional Downloads */ diff --git a/org.adempiere.base/src/org/compiere/model/X_I_Product.java b/org.adempiere.base/src/org/compiere/model/X_I_Product.java index dffc3c3653..52c69b8b6f 100644 --- a/org.adempiere.base/src/org/compiere/model/X_I_Product.java +++ b/org.adempiere.base/src/org/compiere/model/X_I_Product.java @@ -26,14 +26,14 @@ import org.compiere.util.KeyNamePair; /** Generated Model for I_Product * @author Adempiere (generated) - * @version Release 3.6.0LTS - $Id$ */ + * @version 360LTS.015 - $Id$ */ public class X_I_Product extends PO implements I_I_Product, I_Persistent { /** * */ - private static final long serialVersionUID = 20100614L; + private static final long serialVersionUID = 20120406L; /** Standard Constructor */ public X_I_Product (Properties ctx, int I_Product_ID, String trxName) @@ -952,40 +952,40 @@ public class X_I_Product extends PO implements I_I_Product, I_Persistent @param Volume Volume of a product */ - public void setVolume (int Volume) + public void setVolume (BigDecimal Volume) { - set_Value (COLUMNNAME_Volume, Integer.valueOf(Volume)); + set_Value (COLUMNNAME_Volume, Volume); } /** Get Volume. @return Volume of a product */ - public int getVolume () + public BigDecimal getVolume () { - Integer ii = (Integer)get_Value(COLUMNNAME_Volume); - if (ii == null) - return 0; - return ii.intValue(); + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Volume); + if (bd == null) + return Env.ZERO; + return bd; } /** Set Weight. @param Weight Weight of a product */ - public void setWeight (int Weight) + public void setWeight (BigDecimal Weight) { - set_Value (COLUMNNAME_Weight, Integer.valueOf(Weight)); + set_Value (COLUMNNAME_Weight, Weight); } /** Get Weight. @return Weight of a product */ - public int getWeight () + public BigDecimal getWeight () { - Integer ii = (Integer)get_Value(COLUMNNAME_Weight); - if (ii == null) - return 0; - return ii.intValue(); + BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Weight); + if (bd == null) + return Env.ZERO; + return bd; } /** Set UOM Code.