MAccountLookup: FR 2214883 - minor improvement
This commit is contained in:
parent
f62c418c53
commit
72a4260f73
|
|
@ -36,6 +36,8 @@ import org.compiere.util.NamePair;
|
||||||
*/
|
*/
|
||||||
public final class MAccountLookup extends Lookup implements Serializable
|
public final class MAccountLookup extends Lookup implements Serializable
|
||||||
{
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
* @param ctx context
|
* @param ctx context
|
||||||
|
|
@ -175,15 +177,11 @@ public final class MAccountLookup extends Lookup implements Serializable
|
||||||
ArrayList<Object> params = new ArrayList<Object>();
|
ArrayList<Object> params = new ArrayList<Object>();
|
||||||
String whereClause = "AD_Client_ID=?";
|
String whereClause = "AD_Client_ID=?";
|
||||||
params.add(Env.getAD_Client_ID(m_ctx));
|
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)
|
List<MAccount> accounts = new Query(Env.getCtx(),MAccount.Table_Name,whereClause,null)
|
||||||
.setParameters(params)
|
.setParameters(params)
|
||||||
.setOrderBy("Combination")
|
.setOrderBy(MAccount.COLUMNNAME_Combination)
|
||||||
|
.setOnlyActiveRecords(onlyActive)
|
||||||
.list();
|
.list();
|
||||||
|
|
||||||
for(MAccount account :accounts)
|
for(MAccount account :accounts)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue