MAccountLookup: FR 2214883 - minor improvement

This commit is contained in:
teo_sarca 2008-11-13 13:11:42 +00:00
parent f62c418c53
commit 72a4260f73
1 changed files with 4 additions and 6 deletions

View File

@ -36,6 +36,8 @@ import org.compiere.util.NamePair;
*/
public final class MAccountLookup extends Lookup implements Serializable
{
private static final long serialVersionUID = 1L;
/**
* Constructor
* @param ctx context
@ -175,15 +177,11 @@ public final class MAccountLookup extends Lookup implements Serializable
ArrayList<Object> params = new ArrayList<Object>();
String whereClause = "AD_Client_ID=?";
params.add(Env.getAD_Client_ID(m_ctx));
if (onlyActive)
{
whereClause+=" AND IsActive=?";
params.add("Y");
}
List<MAccount> accounts = new Query(Env.getCtx(),MAccount.Table_Name,whereClause,null)
.setParameters(params)
.setOrderBy("Combination")
.setOrderBy(MAccount.COLUMNNAME_Combination)
.setOnlyActiveRecords(onlyActive)
.list();
for(MAccount account :accounts)