IDEMPIERE-5744 MDashboardPreference.getForSessionQuery: add client filter and remove order by ad_client_id (#1866)

This commit is contained in:
hengsin 2023-05-31 06:36:42 +08:00 committed by GitHub
parent cab41a623b
commit 7336dc967d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 4 deletions

View File

@ -100,12 +100,13 @@ public class MDashboardPreference extends X_PA_DashboardPreference
if(lineNo >= 0)
parameters.add(lineNo);
String orderByClause = (lineNo < 0) ? COLUMNNAME_ColumnNo+","+COLUMNNAME_AD_Client_ID+","+COLUMNNAME_Line
: COLUMNNAME_Line+","+COLUMNNAME_ColumnNo+","+COLUMNNAME_AD_Client_ID;
String orderByClause = (lineNo < 0) ? COLUMNNAME_ColumnNo+","+COLUMNNAME_Line
: COLUMNNAME_Line+","+COLUMNNAME_ColumnNo;
return new Query(ctx, Table_Name, whereClause.toString(), null)
.setParameters(parameters)
.setOnlyActiveRecords(false)
.setClient_ID()
.setApplyAccessFilter(true, false)
.setOrderBy(orderByClause);
}
@ -138,13 +139,14 @@ public class MDashboardPreference extends X_PA_DashboardPreference
String orderByClause = "";
if(isCol)
orderByClause = COLUMNNAME_ColumnNo+","+COLUMNNAME_AD_Client_ID+","+ COLUMNNAME_Line;
orderByClause = COLUMNNAME_ColumnNo+","+COLUMNNAME_Line;
else
orderByClause = COLUMNNAME_Line+","+COLUMNNAME_AD_Client_ID+","+ COLUMNNAME_ColumnNo;
orderByClause = COLUMNNAME_Line+","+COLUMNNAME_ColumnNo;
return new Query(ctx, Table_Name, whereClause.toString(), null)
.setParameters(parameters)
.setOnlyActiveRecords(false)
.setClient_ID()
.setApplyAccessFilter(true, false)
.setOrderBy(orderByClause);
}