From 99f97f488c360b4e80261f8cddb6d1bcdd5837ac Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Tue, 24 Nov 2009 04:07:28 +0000 Subject: [PATCH] Fix a NPE problem found with [2877111] - See identifiers columns when delete records https://sourceforge.net/tracker/?func=detail&atid=879335&aid=2877111&group_id=176962 latest changes broke the Aging report - fixing the casting of ID type --- base/src/org/compiere/model/MLookupFactory.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/base/src/org/compiere/model/MLookupFactory.java b/base/src/org/compiere/model/MLookupFactory.java index 4706ef3a35..13fed325b9 100644 --- a/base/src/org/compiere/model/MLookupFactory.java +++ b/base/src/org/compiere/model/MLookupFactory.java @@ -863,6 +863,11 @@ public class MLookupFactory String embeddedSQL = getLookup_TableEmbed (language, ldc.ColumnName, TableName, ldc.AD_Reference_ID); embedSQL.append("NVL((").append(embeddedSQL).append("),'')"); } + // ID + else if (DisplayType.isID(ldc.DisplayType)) + { + embedSQL.append("NVL(" + DB.TO_CHAR(TableName + "." + ldc.ColumnName, ldc.DisplayType, language.getAD_Language()) + ",'')"); + } // String else embedSQL.append("NVL(").append(TableName).append(".").append(ldc.ColumnName).append(",'')");