IDEMPIERE-658 Count of records wrong on zoom across on System

This commit is contained in:
Diego Ruiz 2013-03-27 17:45:44 -05:00
parent 648b2f1f2b
commit 700f625011
1 changed files with 2 additions and 0 deletions

View File

@ -119,6 +119,8 @@ public class GenericZoomProvider implements IZoomProvider {
query.setZoomColumnName(po.get_KeyColumns()[0]);
query.setZoomValue(po.get_ID());
query.addRestriction("AD_Client_ID", MQuery.EQUAL, Env.getAD_Client_ID(Env.getCtx()));
String sql = "SELECT COUNT(*) FROM " + targetTableName + " WHERE "
+ Env.parseVariable(query.getWhereClause(false), po, null, false);
int count = DB.getSQLValue(null, sql);