IDEMPIERE-4591 Load Bank Statement is not working in multi-tenant environments (#450)

IDEMPIERE-4268
This commit is contained in:
Carlos Ruiz 2020-12-09 19:00:41 +01:00 committed by GitHub
parent 46bc0e022f
commit 34fec8c156
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 4 deletions

View File

@ -178,12 +178,18 @@ import org.compiere.util.Util;
} }
// Initialize lookup lists // Initialize lookup lists
MTable table = MTable.get(Env.getCtx(), X_C_BankAccount.Table_ID); MTable table = MTable.get(Env.getCtx(), X_C_BankAccount.Table_ID);
Query query = table.createQuery("IsActive='Y'", null); Query query = table.createQuery(null, get_TrxName());
bankAccountList = query.list(); bankAccountList = query
.setOnlyActiveRecords(true)
.setClient_ID()
.list();
table = MTable.get(Env.getCtx(), X_C_Currency.Table_ID); table = MTable.get(Env.getCtx(), X_C_Currency.Table_ID);
query = table.createQuery("IsActive='Y'", null); query = table.createQuery("AD_Client_ID IN (0, ?)", get_TrxName());
List<X_C_Currency> currencyList = query.list(); List<X_C_Currency> currencyList = query
.setOnlyActiveRecords(true)
.setParameters(getAD_Client_ID())
.list();
currencyMap = new HashMap<String,Integer>() ; currencyMap = new HashMap<String,Integer>() ;
for (X_C_Currency currency : currencyList) { for (X_C_Currency currency : currencyList) {