IDEMPIERE-5764 [ZOOM] - Window configured in reference does not work (#1906)

This commit is contained in:
hengsin 2023-06-23 18:20:25 +08:00 committed by GitHub
parent 7adbc91505
commit 112eadc8fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 7 deletions

View File

@ -477,17 +477,16 @@ public final class AEnv
zoomQuery.setZoomValue(value);
zoomQuery.addRestriction(column, MQuery.EQUAL, value);
zoomQuery.setRecordCount(1); // guess
if (zoomQuery.getZoomTableName() != null) {
int tableId = -1;
tableId = MTable.getTable_ID(zoomQuery.getZoomTableName());
if (value instanceof Integer && ((Integer) value).intValue() >= 0 && zoomQuery != null && zoomQuery.getZoomTableName() != null) {
int windowId = lookup.getZoom(zoomQuery);
if (windowId > 0) {
zoom(windowId, zoomQuery, lookup.getWindowNo());
} else {
int tableId = MTable.getTable_ID(zoomQuery.getZoomTableName());
if (value instanceof Integer && ((Integer) value).intValue() >= 0) {
zoom(tableId, ((Integer) value).intValue(), zoomQuery, lookup.getWindowNo());
} else {
zoomUU(tableId, value.toString(), zoomQuery, lookup.getWindowNo());
}
} else {
int windowId = lookup.getZoom(zoomQuery);
zoom(windowId, zoomQuery, lookup.getWindowNo());
}
}