IDEMPIERE-3214: Context not parsed in MMeasureCalc.

This commit is contained in:
Deepak Pansheriya 2016-10-10 16:37:05 +05:30
parent 2957f04f9f
commit b331ea70bc
1 changed files with 4 additions and 0 deletions

View File

@ -126,6 +126,8 @@ public class MMeasureCalc extends X_PA_MeasureCalc
.append(DB.TO_DATE(reportDate)).append(",'").append(trunc).append("')");
} // date
String sql = addRestrictions(sb.toString(), restrictions, role);
if (sql.indexOf("@") >= 0)
sql = Env.parseContext(getCtx(), 0, sql.toString(), false, false);
log.fine(sql);
return sql;
@ -191,6 +193,8 @@ public class MMeasureCalc extends X_PA_MeasureCalc
if (groupBy != null)
sql += " GROUP BY " + groupBy
+ " ORDER BY " + groupBy; // teo_sarca, [ 1665129 ] Bar Graph is not ordered
if (sql.indexOf("@") >= 0)
sql = Env.parseContext(getCtx(), 0, sql, false, false);
//
log.fine(sql);
return sql;