IDEMPIERE-6137 Payment Rule does not appear in reports from Sales Order (#2351)

- safer approach
This commit is contained in:
Carlos Ruiz 2024-05-07 15:26:40 +02:00
parent 6cb5788651
commit a86a73c391
5 changed files with 21 additions and 5 deletions

View File

@ -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
;

View File

@ -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
;

View File

@ -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; return true;
} // beforeSave } // beforeSave

View File

@ -16,8 +16,6 @@
*****************************************************************************/ *****************************************************************************/
package org.compiere.print; package org.compiere.print;
import static org.compiere.model.SystemIDs.REFERENCE_PAYMENTRULE;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.sql.Clob; import java.sql.Clob;
@ -515,8 +513,6 @@ public class DataEngine
else if (DisplayType.isList(AD_Reference_ID) else if (DisplayType.isList(AD_Reference_ID)
|| (AD_Reference_ID == DisplayType.Button && AD_Reference_Value_ID != 0)) || (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) if (ColumnSQL.length() > 0)
{ {
lookupSQL = ColumnSQL; lookupSQL = ColumnSQL;

View File

@ -542,7 +542,7 @@ public final class DisplayType
*/ */
public static boolean isLookup(int displayType) public static boolean isLookup(int displayType)
{ {
if (displayType == List if (displayType == List || displayType == Payment
|| displayType == Table || displayType == TableUU || displayType == Table || displayType == TableUU
|| displayType == TableDir || displayType == TableDirUU || displayType == TableDir || displayType == TableDirUU
|| displayType == Search || displayType == SearchUU || displayType == Search || displayType == SearchUU