diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADSortTab.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADSortTab.java index 5275d03f83..b027e97609 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADSortTab.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADSortTab.java @@ -421,6 +421,7 @@ public class ADSortTab extends Panel implements IADTabpanel if (m_IdentifierTranslated) sql.append(" AND t.").append(m_KeyColumnName).append("=tt.").append(m_KeyColumnName) .append(" AND tt.AD_Language=?"); + sql.append(" AND t.AD_Client_ID IN (0,?)"); // Order sql.append(" ORDER BY "); if (m_ColumnYesNoName != null) @@ -441,11 +442,14 @@ public class ADSortTab extends Panel implements IADTabpanel ResultSet rs = null; try { + int idx = 1; pstmt = DB.prepareStatement(sql.toString(), null); - pstmt.setInt(1, ID); + pstmt.setInt(idx++, ID); if (m_IdentifierTranslated) - pstmt.setString(2, Env.getAD_Language(Env.getCtx())); + pstmt.setString(idx++, Env.getAD_Language(Env.getCtx())); + + pstmt.setInt(idx++, Env.getAD_Client_ID(Env.getCtx())); rs = pstmt.executeQuery(); while (rs.next())