From 2a65baa8fcaba73133d2c1d1b0efd91e68553060 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Thu, 12 Mar 2009 17:13:09 +0000 Subject: [PATCH] Implement [ adempiere-Feature Requests-2685367 ] GL Distribution delete line instead reverse https://sourceforge.net/tracker/?func=detail&atid=879335&aid=2685367&group_id=176962 --- base/src/org/compiere/acct/Fact.java | 17 +- .../org/compiere/model/I_GL_Distribution.java | 76 ++++++++- .../org/compiere/model/X_GL_Distribution.java | 36 +++- ...R2685367_GLDistribution_CreateReversal.sql | 161 ++++++++++++++++++ ...R2685367_GLDistribution_CreateReversal.sql | 161 ++++++++++++++++++ 5 files changed, 436 insertions(+), 15 deletions(-) create mode 100644 migration/353a-trunk/oracle/433_FR2685367_GLDistribution_CreateReversal.sql create mode 100644 migration/353a-trunk/postgresql/433_FR2685367_GLDistribution_CreateReversal.sql diff --git a/base/src/org/compiere/acct/Fact.java b/base/src/org/compiere/acct/Fact.java index 916e2c557e..ba204f3f8d 100644 --- a/base/src/org/compiere/acct/Fact.java +++ b/base/src/org/compiere/acct/Fact.java @@ -699,10 +699,19 @@ public final class Fact if (distributions.length > 1) log.warning("More then one Distributiion for " + dLine.getAccount()); MDistribution distribution = distributions[0]; - // Add Reversal - FactLine reversal = dLine.reverse(distribution.getName()); - log.info("Reversal=" + reversal); - newLines.add(reversal); // saved in postCommit + + // FR 2685367 - GL Distribution delete line instead reverse + if (distribution.isCreateReversal()) { + // Add Reversal + FactLine reversal = dLine.reverse(distribution.getName()); + log.info("Reversal=" + reversal); + newLines.add(reversal); // saved in postCommit + } else { + // delete the line being distributed + m_lines.remove(i); // or it could be m_lines.remove(dLine); + i--; + } + // Prepare distribution.distribute(dLine.getAccount(), dLine.getSourceBalance(), dLine.getC_Currency_ID()); MDistributionLine[] lines = distribution.getLines(false); diff --git a/base/src/org/compiere/model/I_GL_Distribution.java b/base/src/org/compiere/model/I_GL_Distribution.java index d859410a9a..81e80b565a 100644 --- a/base/src/org/compiere/model/I_GL_Distribution.java +++ b/base/src/org/compiere/model/I_GL_Distribution.java @@ -1,17 +1,14 @@ /****************************************************************************** * 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 * + * 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 * + * 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., * + * 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 * @@ -20,6 +17,7 @@ package org.compiere.model; import java.math.BigDecimal; +import java.sql.Timestamp; import org.compiere.util.KeyNamePair; /** Generated Interface for GL_Distribution @@ -56,6 +54,14 @@ public interface I_GL_Distribution */ public int getAccount_ID(); + /** 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"; @@ -367,6 +373,22 @@ public interface I_GL_Distribution public I_C_Project getC_Project() 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 C_SalesRegion_ID */ public static final String COLUMNNAME_C_SalesRegion_ID = "C_SalesRegion_ID"; @@ -421,6 +443,32 @@ public interface I_GL_Distribution */ public String getHelp(); + /** 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 IsCreateReversal */ + public static final String COLUMNNAME_IsCreateReversal = "IsCreateReversal"; + + /** Set Create Reversal. + * Indicates that reversal movement will be created, if disabled the original movement will be deleted. + */ + public void setIsCreateReversal (boolean IsCreateReversal); + + /** Get Create Reversal. + * Indicates that reversal movement will be created, if disabled the original movement will be deleted. + */ + public boolean isCreateReversal(); + /** Column name IsValid */ public static final String COLUMNNAME_IsValid = "IsValid"; @@ -510,6 +558,22 @@ public interface I_GL_Distribution /** Get Process Now */ public boolean isProcessing(); + /** Column name Updated */ + public static final String COLUMNNAME_Updated = "Updated"; + + /** Get Updated. + * Date this record was updated + */ + public Timestamp getUpdated(); + + /** Column name UpdatedBy */ + public static final String COLUMNNAME_UpdatedBy = "UpdatedBy"; + + /** Get Updated By. + * User who updated this records + */ + public int getUpdatedBy(); + /** Column name User1_ID */ public static final String COLUMNNAME_User1_ID = "User1_ID"; diff --git a/base/src/org/compiere/model/X_GL_Distribution.java b/base/src/org/compiere/model/X_GL_Distribution.java index 86799b80de..a29dd25d3e 100644 --- a/base/src/org/compiere/model/X_GL_Distribution.java +++ b/base/src/org/compiere/model/X_GL_Distribution.java @@ -1,14 +1,14 @@ /****************************************************************************** * 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 * + * 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 * + * 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., * + * 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 * @@ -34,7 +34,7 @@ public class X_GL_Distribution extends PO implements I_GL_Distribution, I_Persis /** * */ - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 20081221L; /** Standard Constructor */ public X_GL_Distribution (Properties ctx, int GL_Distribution_ID, String trxName) @@ -70,6 +70,8 @@ public class X_GL_Distribution extends PO implements I_GL_Distribution, I_Persis // Y setC_AcctSchema_ID (0); setGL_Distribution_ID (0); + setIsCreateReversal (true); +// Y setIsValid (false); // N setName (null); @@ -837,6 +839,30 @@ public class X_GL_Distribution extends PO implements I_GL_Distribution, I_Persis return (String)get_Value(COLUMNNAME_Help); } + /** Set Create Reversal. + @param IsCreateReversal + Indicates that reversal movement will be created, if disabled the original movement will be deleted. + */ + public void setIsCreateReversal (boolean IsCreateReversal) + { + set_Value (COLUMNNAME_IsCreateReversal, Boolean.valueOf(IsCreateReversal)); + } + + /** Get Create Reversal. + @return Indicates that reversal movement will be created, if disabled the original movement will be deleted. + */ + public boolean isCreateReversal () + { + Object oo = get_Value(COLUMNNAME_IsCreateReversal); + if (oo != null) + { + if (oo instanceof Boolean) + return ((Boolean)oo).booleanValue(); + return "Y".equals(oo); + } + return false; + } + /** Set Valid. @param IsValid Element is valid @@ -991,7 +1017,7 @@ public class X_GL_Distribution extends PO implements I_GL_Distribution, I_Persis public void setPostingType (String PostingType) { - if (PostingType == null || PostingType.equals("A") || PostingType.equals("B") || PostingType.equals("E") || PostingType.equals("S") || PostingType.equals("R")); else throw new IllegalArgumentException ("PostingType Invalid value - " + PostingType + " - Reference_ID=125 - A - B - E - S - R"); set_Value (COLUMNNAME_PostingType, PostingType); + set_Value (COLUMNNAME_PostingType, PostingType); } /** Get PostingType. diff --git a/migration/353a-trunk/oracle/433_FR2685367_GLDistribution_CreateReversal.sql b/migration/353a-trunk/oracle/433_FR2685367_GLDistribution_CreateReversal.sql new file mode 100644 index 0000000000..cd9606f4e8 --- /dev/null +++ b/migration/353a-trunk/oracle/433_FR2685367_GLDistribution_CreateReversal.sql @@ -0,0 +1,161 @@ +-- 12-mar-2009 11:18:22 COT +-- FR [2685367] GL Distribution delete line instead reverse +INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,Description,EntityType,IsActive,Name,PO_Name,PrintName,Updated,UpdatedBy) VALUES (0,53795,0,'IsCreateReversal',TO_DATE('2009-03-12 11:18:21','YYYY-MM-DD HH24:MI:SS'),100,'Indicates that reversal movement will be created, if disabled the original movement will be deleted.','D','Y','Create Reversal',NULL,'Create Reversal',TO_DATE('2009-03-12 11:18:21','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- 12-mar-2009 11:18:22 COT +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=53795 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID) +; + +-- 12-mar-2009 11:18:58 COT +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,IsActive,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56912,53795,0,20,708,'IsCreateReversal',TO_DATE('2009-03-12 11:18:58','YYYY-MM-DD HH24:MI:SS'),100,'Y','Indicates that reversal movement will be created, if disabled the original movement will be deleted.','D',1,'Y','Y','N','N','N','N','N','Y','N','N','N','N','Y','Create Reversal',0,TO_DATE('2009-03-12 11:18:58','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- 12-mar-2009 11:18:58 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=56912 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +-- 12-mar-2009 11:19:06 COT +ALTER TABLE GL_Distribution ADD IsCreateReversal CHAR(1) DEFAULT 'Y' CHECK (IsCreateReversal IN ('Y','N')) NOT NULL +; + +-- 12-mar-2009 11:20:46 COT +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,56912,56748,0,646,TO_DATE('2009-03-12 11:20:45','YYYY-MM-DD HH24:MI:SS'),100,'Indicates that reversal movement will be created, if disabled the original movement will be deleted.',1,'D','Y','Y','Y','N','N','N','N','N','Create Reversal',390,0,TO_DATE('2009-03-12 11:20:45','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- 12-mar-2009 11:20:46 COT +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56748 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +-- 12-mar-2009 11:21:13 COT +UPDATE AD_Field SET SeqNo=80,IsDisplayed='Y' WHERE AD_Field_ID=56748 +; + +-- 12-mar-2009 11:21:13 COT +UPDATE AD_Field SET SeqNo=90,IsDisplayed='Y' WHERE AD_Field_ID=10875 +; + +-- 12-mar-2009 11:21:13 COT +UPDATE AD_Field SET SeqNo=100,IsDisplayed='Y' WHERE AD_Field_ID=10862 +; + +-- 12-mar-2009 11:21:13 COT +UPDATE AD_Field SET SeqNo=110,IsDisplayed='Y' WHERE AD_Field_ID=10866 +; + +-- 12-mar-2009 11:21:13 COT +UPDATE AD_Field SET SeqNo=120,IsDisplayed='Y' WHERE AD_Field_ID=10149 +; + +-- 12-mar-2009 11:21:13 COT +UPDATE AD_Field SET SeqNo=130,IsDisplayed='Y' WHERE AD_Field_ID=10860 +; + +-- 12-mar-2009 11:21:13 COT +UPDATE AD_Field SET SeqNo=140,IsDisplayed='Y' WHERE AD_Field_ID=10145 +; + +-- 12-mar-2009 11:21:13 COT +UPDATE AD_Field SET SeqNo=150,IsDisplayed='Y' WHERE AD_Field_ID=10868 +; + +-- 12-mar-2009 11:21:13 COT +UPDATE AD_Field SET SeqNo=160,IsDisplayed='Y' WHERE AD_Field_ID=10141 +; + +-- 12-mar-2009 11:21:13 COT +UPDATE AD_Field SET SeqNo=170,IsDisplayed='Y' WHERE AD_Field_ID=10869 +; + +-- 12-mar-2009 11:21:13 COT +UPDATE AD_Field SET SeqNo=180,IsDisplayed='Y' WHERE AD_Field_ID=10142 +; + +-- 12-mar-2009 11:21:13 COT +UPDATE AD_Field SET SeqNo=190,IsDisplayed='Y' WHERE AD_Field_ID=10864 +; + +-- 12-mar-2009 11:21:13 COT +UPDATE AD_Field SET SeqNo=200,IsDisplayed='Y' WHERE AD_Field_ID=10133 +; + +-- 12-mar-2009 11:21:13 COT +UPDATE AD_Field SET SeqNo=210,IsDisplayed='Y' WHERE AD_Field_ID=10873 +; + +-- 12-mar-2009 11:21:13 COT +UPDATE AD_Field SET SeqNo=220,IsDisplayed='Y' WHERE AD_Field_ID=10150 +; + +-- 12-mar-2009 11:21:13 COT +UPDATE AD_Field SET SeqNo=230,IsDisplayed='Y' WHERE AD_Field_ID=10865 +; + +-- 12-mar-2009 11:21:13 COT +UPDATE AD_Field SET SeqNo=240,IsDisplayed='Y' WHERE AD_Field_ID=10143 +; + +-- 12-mar-2009 11:21:13 COT +UPDATE AD_Field SET SeqNo=250,IsDisplayed='Y' WHERE AD_Field_ID=10871 +; + +-- 12-mar-2009 11:21:13 COT +UPDATE AD_Field SET SeqNo=260,IsDisplayed='Y' WHERE AD_Field_ID=10154 +; + +-- 12-mar-2009 11:21:13 COT +UPDATE AD_Field SET SeqNo=270,IsDisplayed='Y' WHERE AD_Field_ID=10872 +; + +-- 12-mar-2009 11:21:13 COT +UPDATE AD_Field SET SeqNo=280,IsDisplayed='Y' WHERE AD_Field_ID=10138 +; + +-- 12-mar-2009 11:21:13 COT +UPDATE AD_Field SET SeqNo=290,IsDisplayed='Y' WHERE AD_Field_ID=10867 +; + +-- 12-mar-2009 11:21:13 COT +UPDATE AD_Field SET SeqNo=300,IsDisplayed='Y' WHERE AD_Field_ID=10156 +; + +-- 12-mar-2009 11:21:13 COT +UPDATE AD_Field SET SeqNo=310,IsDisplayed='Y' WHERE AD_Field_ID=10861 +; + +-- 12-mar-2009 11:21:13 COT +UPDATE AD_Field SET SeqNo=320,IsDisplayed='Y' WHERE AD_Field_ID=10148 +; + +-- 12-mar-2009 11:21:13 COT +UPDATE AD_Field SET SeqNo=330,IsDisplayed='Y' WHERE AD_Field_ID=10874 +; + +-- 12-mar-2009 11:21:13 COT +UPDATE AD_Field SET SeqNo=340,IsDisplayed='Y' WHERE AD_Field_ID=10137 +; + +-- 12-mar-2009 11:21:13 COT +UPDATE AD_Field SET SeqNo=350,IsDisplayed='Y' WHERE AD_Field_ID=10863 +; + +-- 12-mar-2009 11:21:13 COT +UPDATE AD_Field SET SeqNo=360,IsDisplayed='Y' WHERE AD_Field_ID=10155 +; + +-- 12-mar-2009 11:21:13 COT +UPDATE AD_Field SET SeqNo=370,IsDisplayed='Y' WHERE AD_Field_ID=10870 +; + +-- 12-mar-2009 11:21:13 COT +UPDATE AD_Field SET SeqNo=380,IsDisplayed='Y' WHERE AD_Field_ID=10134 +; + +-- 12-mar-2009 11:21:13 COT +UPDATE AD_Field SET SeqNo=390,IsDisplayed='Y' WHERE AD_Field_ID=10140 +; + +-- 12-mar-2009 11:21:34 COT +UPDATE AD_Field SET IsSameLine='Y',Updated=TO_DATE('2009-03-12 11:21:34','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56748 +; + diff --git a/migration/353a-trunk/postgresql/433_FR2685367_GLDistribution_CreateReversal.sql b/migration/353a-trunk/postgresql/433_FR2685367_GLDistribution_CreateReversal.sql new file mode 100644 index 0000000000..836e00767d --- /dev/null +++ b/migration/353a-trunk/postgresql/433_FR2685367_GLDistribution_CreateReversal.sql @@ -0,0 +1,161 @@ +-- 12-mar-2009 11:18:22 COT +-- FR [2685367] GL Distribution delete line instead reverse +INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,ColumnName,Created,CreatedBy,Description,EntityType,IsActive,Name,PO_Name,PrintName,Updated,UpdatedBy) VALUES (0,53795,0,'IsCreateReversal',TO_TIMESTAMP('2009-03-12 11:18:21','YYYY-MM-DD HH24:MI:SS'),100,'Indicates that reversal movement will be created, if disabled the original movement will be deleted.','D','Y','Create Reversal',NULL,'Create Reversal',TO_TIMESTAMP('2009-03-12 11:18:21','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- 12-mar-2009 11:18:22 COT +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=53795 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID) +; + +-- 12-mar-2009 11:18:58 COT +INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,IsActive,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56912,53795,0,20,708,'IsCreateReversal',TO_TIMESTAMP('2009-03-12 11:18:58','YYYY-MM-DD HH24:MI:SS'),100,'Y','Indicates that reversal movement will be created, if disabled the original movement will be deleted.','D',1,'Y','Y','N','N','N','N','N','Y','N','N','N','N','Y','Create Reversal',0,TO_TIMESTAMP('2009-03-12 11:18:58','YYYY-MM-DD HH24:MI:SS'),100,0) +; + +-- 12-mar-2009 11:18:58 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=56912 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +-- 12-mar-2009 11:19:06 COT +ALTER TABLE GL_Distribution ADD COLUMN IsCreateReversal CHAR(1) DEFAULT 'Y' CHECK (IsCreateReversal IN ('Y','N')) NOT NULL +; + +-- 12-mar-2009 11:20:46 COT +INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,56912,56748,0,646,TO_TIMESTAMP('2009-03-12 11:20:45','YYYY-MM-DD HH24:MI:SS'),100,'Indicates that reversal movement will be created, if disabled the original movement will be deleted.',1,'D','Y','Y','Y','N','N','N','N','N','Create Reversal',390,0,TO_TIMESTAMP('2009-03-12 11:20:45','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- 12-mar-2009 11:20:46 COT +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56748 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +-- 12-mar-2009 11:21:13 COT +UPDATE AD_Field SET SeqNo=80,IsDisplayed='Y' WHERE AD_Field_ID=56748 +; + +-- 12-mar-2009 11:21:13 COT +UPDATE AD_Field SET SeqNo=90,IsDisplayed='Y' WHERE AD_Field_ID=10875 +; + +-- 12-mar-2009 11:21:13 COT +UPDATE AD_Field SET SeqNo=100,IsDisplayed='Y' WHERE AD_Field_ID=10862 +; + +-- 12-mar-2009 11:21:13 COT +UPDATE AD_Field SET SeqNo=110,IsDisplayed='Y' WHERE AD_Field_ID=10866 +; + +-- 12-mar-2009 11:21:13 COT +UPDATE AD_Field SET SeqNo=120,IsDisplayed='Y' WHERE AD_Field_ID=10149 +; + +-- 12-mar-2009 11:21:13 COT +UPDATE AD_Field SET SeqNo=130,IsDisplayed='Y' WHERE AD_Field_ID=10860 +; + +-- 12-mar-2009 11:21:13 COT +UPDATE AD_Field SET SeqNo=140,IsDisplayed='Y' WHERE AD_Field_ID=10145 +; + +-- 12-mar-2009 11:21:13 COT +UPDATE AD_Field SET SeqNo=150,IsDisplayed='Y' WHERE AD_Field_ID=10868 +; + +-- 12-mar-2009 11:21:13 COT +UPDATE AD_Field SET SeqNo=160,IsDisplayed='Y' WHERE AD_Field_ID=10141 +; + +-- 12-mar-2009 11:21:13 COT +UPDATE AD_Field SET SeqNo=170,IsDisplayed='Y' WHERE AD_Field_ID=10869 +; + +-- 12-mar-2009 11:21:13 COT +UPDATE AD_Field SET SeqNo=180,IsDisplayed='Y' WHERE AD_Field_ID=10142 +; + +-- 12-mar-2009 11:21:13 COT +UPDATE AD_Field SET SeqNo=190,IsDisplayed='Y' WHERE AD_Field_ID=10864 +; + +-- 12-mar-2009 11:21:13 COT +UPDATE AD_Field SET SeqNo=200,IsDisplayed='Y' WHERE AD_Field_ID=10133 +; + +-- 12-mar-2009 11:21:13 COT +UPDATE AD_Field SET SeqNo=210,IsDisplayed='Y' WHERE AD_Field_ID=10873 +; + +-- 12-mar-2009 11:21:13 COT +UPDATE AD_Field SET SeqNo=220,IsDisplayed='Y' WHERE AD_Field_ID=10150 +; + +-- 12-mar-2009 11:21:13 COT +UPDATE AD_Field SET SeqNo=230,IsDisplayed='Y' WHERE AD_Field_ID=10865 +; + +-- 12-mar-2009 11:21:13 COT +UPDATE AD_Field SET SeqNo=240,IsDisplayed='Y' WHERE AD_Field_ID=10143 +; + +-- 12-mar-2009 11:21:13 COT +UPDATE AD_Field SET SeqNo=250,IsDisplayed='Y' WHERE AD_Field_ID=10871 +; + +-- 12-mar-2009 11:21:13 COT +UPDATE AD_Field SET SeqNo=260,IsDisplayed='Y' WHERE AD_Field_ID=10154 +; + +-- 12-mar-2009 11:21:13 COT +UPDATE AD_Field SET SeqNo=270,IsDisplayed='Y' WHERE AD_Field_ID=10872 +; + +-- 12-mar-2009 11:21:13 COT +UPDATE AD_Field SET SeqNo=280,IsDisplayed='Y' WHERE AD_Field_ID=10138 +; + +-- 12-mar-2009 11:21:13 COT +UPDATE AD_Field SET SeqNo=290,IsDisplayed='Y' WHERE AD_Field_ID=10867 +; + +-- 12-mar-2009 11:21:13 COT +UPDATE AD_Field SET SeqNo=300,IsDisplayed='Y' WHERE AD_Field_ID=10156 +; + +-- 12-mar-2009 11:21:13 COT +UPDATE AD_Field SET SeqNo=310,IsDisplayed='Y' WHERE AD_Field_ID=10861 +; + +-- 12-mar-2009 11:21:13 COT +UPDATE AD_Field SET SeqNo=320,IsDisplayed='Y' WHERE AD_Field_ID=10148 +; + +-- 12-mar-2009 11:21:13 COT +UPDATE AD_Field SET SeqNo=330,IsDisplayed='Y' WHERE AD_Field_ID=10874 +; + +-- 12-mar-2009 11:21:13 COT +UPDATE AD_Field SET SeqNo=340,IsDisplayed='Y' WHERE AD_Field_ID=10137 +; + +-- 12-mar-2009 11:21:13 COT +UPDATE AD_Field SET SeqNo=350,IsDisplayed='Y' WHERE AD_Field_ID=10863 +; + +-- 12-mar-2009 11:21:13 COT +UPDATE AD_Field SET SeqNo=360,IsDisplayed='Y' WHERE AD_Field_ID=10155 +; + +-- 12-mar-2009 11:21:13 COT +UPDATE AD_Field SET SeqNo=370,IsDisplayed='Y' WHERE AD_Field_ID=10870 +; + +-- 12-mar-2009 11:21:13 COT +UPDATE AD_Field SET SeqNo=380,IsDisplayed='Y' WHERE AD_Field_ID=10134 +; + +-- 12-mar-2009 11:21:13 COT +UPDATE AD_Field SET SeqNo=390,IsDisplayed='Y' WHERE AD_Field_ID=10140 +; + +-- 12-mar-2009 11:21:34 COT +UPDATE AD_Field SET IsSameLine='Y',Updated=TO_TIMESTAMP('2009-03-12 11:21:34','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56748 +; +