diff --git a/org.adempiere.base/src/org/compiere/model/MLookupFactory.java b/org.adempiere.base/src/org/compiere/model/MLookupFactory.java index cdfa1caeb3..5a4dffe8c2 100644 --- a/org.adempiere.base/src/org/compiere/model/MLookupFactory.java +++ b/org.adempiere.base/src/org/compiere/model/MLookupFactory.java @@ -718,6 +718,17 @@ public class MLookupFactory { displayColumn.append(DB.TO_CHAR(columnSQL, ldc.DisplayType, language.getAD_Language())); } + // Table + else if ((ldc.DisplayType == DisplayType.Table || ldc.DisplayType == DisplayType.Search) && ldc.AD_Reference_ID != 0) + { + String embeddedSQL; + if (ldc.IsVirtual) + embeddedSQL = getLookup_TableEmbed (language, ldc.ColumnSQL, TableName, ldc.AD_Reference_ID); + else + embeddedSQL = getLookup_TableEmbed (language, ldc.ColumnName, TableName, ldc.AD_Reference_ID); + if (embeddedSQL != null) + displayColumn.append("(").append(embeddedSQL).append(")"); + } // TableDir else if ((ldc.DisplayType == DisplayType.TableDir || ldc.DisplayType == DisplayType.Search) && ldc.ColumnName.endsWith("_ID")) @@ -730,17 +741,6 @@ public class MLookupFactory if (embeddedSQL != null) displayColumn.append("(").append(embeddedSQL).append(")"); } - // Table - else if (ldc.DisplayType == DisplayType.Table && ldc.AD_Reference_ID != 0) - { - String embeddedSQL; - if (ldc.IsVirtual) - embeddedSQL = getLookup_TableEmbed (language, ldc.ColumnSQL, TableName, ldc.AD_Reference_ID); - else - embeddedSQL = getLookup_TableEmbed (language, ldc.ColumnName, TableName, ldc.AD_Reference_ID); - if (embeddedSQL != null) - displayColumn.append("(").append(embeddedSQL).append(")"); - } // number else if (DisplayType.isNumeric(ldc.DisplayType)) {