From 0a9d7335def51f618f7f6ace75c330fa3ba78529 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Thu, 18 Apr 2019 14:36:30 +0200 Subject: [PATCH] IDEMPIERE-3874 Process Recalculate Cube not loading GL journal facts due to c_calendar_id --- .../i6.2/oracle/201904181424_IDEMPIERE-3874.sql | 15 +++++++++++++++ .../postgresql/201904181424_IDEMPIERE-3874.sql | 12 ++++++++++++ .../src/org/compiere/model/CalloutGLJournal.java | 5 ++--- .../src/org/compiere/model/MJournalBatch.java | 2 +- .../src/org/compiere/util/CLogger.java | 2 +- 5 files changed, 31 insertions(+), 5 deletions(-) create mode 100644 migration/i6.2/oracle/201904181424_IDEMPIERE-3874.sql create mode 100644 migration/i6.2/postgresql/201904181424_IDEMPIERE-3874.sql diff --git a/migration/i6.2/oracle/201904181424_IDEMPIERE-3874.sql b/migration/i6.2/oracle/201904181424_IDEMPIERE-3874.sql new file mode 100644 index 0000000000..476ef752dc --- /dev/null +++ b/migration/i6.2/oracle/201904181424_IDEMPIERE-3874.sql @@ -0,0 +1,15 @@ +SET SQLBLANKLINES ON +SET DEFINE OFF + +-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator +-- Apr 18, 2019, 2:24:04 PM CEST +UPDATE AD_Column SET Callout='org.compiere.model.CalloutGLJournal.period',Updated=TO_DATE('2019-04-18 14:24:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=1619 +; + +-- Apr 18, 2019, 2:24:15 PM CEST +UPDATE AD_Column SET Callout='org.compiere.model.CalloutGLJournal.period',Updated=TO_DATE('2019-04-18 14:24:15','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=1643 +; + +SELECT register_migration_script('201904181424_IDEMPIERE-3874.sql') FROM dual +; + diff --git a/migration/i6.2/postgresql/201904181424_IDEMPIERE-3874.sql b/migration/i6.2/postgresql/201904181424_IDEMPIERE-3874.sql new file mode 100644 index 0000000000..82eaab388c --- /dev/null +++ b/migration/i6.2/postgresql/201904181424_IDEMPIERE-3874.sql @@ -0,0 +1,12 @@ +-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator +-- Apr 18, 2019, 2:24:04 PM CEST +UPDATE AD_Column SET Callout='org.compiere.model.CalloutGLJournal.period',Updated=TO_TIMESTAMP('2019-04-18 14:24:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=1619 +; + +-- Apr 18, 2019, 2:24:15 PM CEST +UPDATE AD_Column SET Callout='org.compiere.model.CalloutGLJournal.period',Updated=TO_TIMESTAMP('2019-04-18 14:24:15','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=1643 +; + +SELECT register_migration_script('201904181424_IDEMPIERE-3874.sql') FROM dual +; + diff --git a/org.adempiere.base.callout/src/org/compiere/model/CalloutGLJournal.java b/org.adempiere.base.callout/src/org/compiere/model/CalloutGLJournal.java index 0efcc48ff9..9017856dd5 100644 --- a/org.adempiere.base.callout/src/org/compiere/model/CalloutGLJournal.java +++ b/org.adempiere.base.callout/src/org/compiere/model/CalloutGLJournal.java @@ -53,7 +53,6 @@ public class CalloutGLJournal extends CalloutEngine if (value == null) return ""; - int AD_Client_ID = Env.getContextAsInt(ctx, WindowNo, "AD_Client_ID"); Timestamp DateAcct = null; if (colName.equals("DateAcct")) DateAcct = (Timestamp)value; @@ -69,8 +68,8 @@ public class CalloutGLJournal extends CalloutEngine mTab.setValue("DateAcct", value); } - // When DateAcct is changed, set C_Period_ID - else if (colName.equals("DateAcct")) + // When DateAcct/Org is changed, set C_Period_ID + else if (colName.equals("DateAcct") || colName.equals("AD_Org_ID")) { String sql = "SELECT C_Period_ID " + "FROM C_Period " diff --git a/org.adempiere.base/src/org/compiere/model/MJournalBatch.java b/org.adempiere.base/src/org/compiere/model/MJournalBatch.java index adfb5c6ecd..89f852f1d4 100644 --- a/org.adempiere.base/src/org/compiere/model/MJournalBatch.java +++ b/org.adempiere.base/src/org/compiere/model/MJournalBatch.java @@ -54,7 +54,7 @@ public class MJournalBatch extends X_GL_JournalBatch implements DocAction /** * */ - private static final long serialVersionUID = 3424249393848608297L; + private static final long serialVersionUID = 5920767495976301905L; /** * Create new Journal Batch by copying diff --git a/org.adempiere.base/src/org/compiere/util/CLogger.java b/org.adempiere.base/src/org/compiere/util/CLogger.java index 56d7bc2d2e..333eb77fc4 100644 --- a/org.adempiere.base/src/org/compiere/util/CLogger.java +++ b/org.adempiere.base/src/org/compiere/util/CLogger.java @@ -32,7 +32,7 @@ public class CLogger extends Logger implements Serializable /** * */ - private static final long serialVersionUID = 6492376264463028357L; + private static final long serialVersionUID = -4015949992093043663L; private static final String LAST_INFO = "org.compiere.util.CLogger.lastInfo"; private static final String LAST_WARNING = "org.compiere.util.CLogger.lastWarning"; private static final String LAST_ERROR = "org.compiere.util.CLogger.lastError";