diff --git a/migration/iD11/oracle/202405071219_IDEMPIERE-6137.sql b/migration/iD11/oracle/202405071219_IDEMPIERE-6137.sql new file mode 100644 index 0000000000..8344ff4658 --- /dev/null +++ b/migration/iD11/oracle/202405071219_IDEMPIERE-6137.sql @@ -0,0 +1,10 @@ +-- IDEMPIERE-6137 Payment Rule does not appear in reports from Sales Order +SELECT register_migration_script('202405071219_IDEMPIERE-6137.sql') FROM dual; + +SET SQLBLANKLINES ON +SET DEFINE OFF + +-- May 7, 2024, 12:19:00 PM CEST +UPDATE AD_Column SET AD_Reference_Value_ID=195,Updated=TO_TIMESTAMP('2024-05-07 12:19:00','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=200012 AND COALESCE(AD_Reference_Value_ID,0)!=195 +; + diff --git a/migration/iD11/postgresql/202405071219_IDEMPIERE-6137.sql b/migration/iD11/postgresql/202405071219_IDEMPIERE-6137.sql new file mode 100644 index 0000000000..8ea63cd938 --- /dev/null +++ b/migration/iD11/postgresql/202405071219_IDEMPIERE-6137.sql @@ -0,0 +1,7 @@ +-- IDEMPIERE-6137 Payment Rule does not appear in reports from Sales Order +SELECT register_migration_script('202405071219_IDEMPIERE-6137.sql') FROM dual; + +-- May 7, 2024, 12:19:00 PM CEST +UPDATE AD_Column SET AD_Reference_Value_ID=195,Updated=TO_TIMESTAMP('2024-05-07 12:19:00','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Reference_ID=200012 AND COALESCE(AD_Reference_Value_ID,0)!=195 +; + diff --git a/org.adempiere.base/src/org/compiere/model/MColumn.java b/org.adempiere.base/src/org/compiere/model/MColumn.java index 0c3234581c..98241913cb 100644 --- a/org.adempiere.base/src/org/compiere/model/MColumn.java +++ b/org.adempiere.base/src/org/compiere/model/MColumn.java @@ -609,6 +609,9 @@ public class MColumn extends X_AD_Column implements ImmutablePOSupport } } + if (getAD_Reference_ID() == DisplayType.Payment) + setAD_Reference_Value_ID(SystemIDs.REFERENCE_PAYMENTRULE); + return true; } // beforeSave diff --git a/org.adempiere.base/src/org/compiere/print/DataEngine.java b/org.adempiere.base/src/org/compiere/print/DataEngine.java index 040319ab15..416ea7c7d4 100644 --- a/org.adempiere.base/src/org/compiere/print/DataEngine.java +++ b/org.adempiere.base/src/org/compiere/print/DataEngine.java @@ -16,8 +16,6 @@ *****************************************************************************/ package org.compiere.print; -import static org.compiere.model.SystemIDs.REFERENCE_PAYMENTRULE; - import java.io.Serializable; import java.math.BigDecimal; import java.sql.Clob; @@ -515,8 +513,6 @@ public class DataEngine else if (DisplayType.isList(AD_Reference_ID) || (AD_Reference_ID == DisplayType.Button && AD_Reference_Value_ID != 0)) { - if (AD_Reference_ID == DisplayType.Payment) - AD_Reference_Value_ID = REFERENCE_PAYMENTRULE; if (ColumnSQL.length() > 0) { lookupSQL = ColumnSQL; diff --git a/org.adempiere.base/src/org/compiere/util/DisplayType.java b/org.adempiere.base/src/org/compiere/util/DisplayType.java index db4121f6c3..2a02579987 100644 --- a/org.adempiere.base/src/org/compiere/util/DisplayType.java +++ b/org.adempiere.base/src/org/compiere/util/DisplayType.java @@ -542,7 +542,7 @@ public final class DisplayType */ public static boolean isLookup(int displayType) { - if (displayType == List + if (displayType == List || displayType == Payment || displayType == Table || displayType == TableUU || displayType == TableDir || displayType == TableDirUU || displayType == Search || displayType == SearchUU