IDEMPIERE-2597 WhereClause of report view can cause issues / thanks to Armen Rizal for reporting issue with previous commit

This commit is contained in:
Carlos Ruiz 2015-04-27 09:04:19 -05:00
parent a0aef406d8
commit 632b19b75c
1 changed files with 2 additions and 1 deletions

View File

@ -170,8 +170,9 @@ public class DataEngine
tableName = rs.getString(2); // TableName
reportName = rs.getString(3);
// Add WhereClause restriction from AD_ReportView - teo_sarca BF [ 1761891 ]
String whereClause = "(" + rs.getString(4) + ")";
String whereClause = rs.getString(4);
if (!Util.isEmpty(whereClause)) {
whereClause = "(" + whereClause + ")"; // IDEMPIERE-2597
if (whereClause.indexOf("@") == -1) {
queryCopy.addRestriction(whereClause);
} else { // replace context variables