BF[ 2945507 ] - Material Cost Element

http://sourceforge.net/tracker/?func=detail&aid=2945507&group_id=176962&atid=879332
-- refactoring code for using ADempiere Best Practices
Please review
This commit is contained in:
redchris 2010-03-30 11:51:44 +00:00
parent bd479d0470
commit 43b2f11e9b
1 changed files with 2 additions and 2 deletions

View File

@ -92,9 +92,9 @@ public class MCostElement extends X_M_CostElement
*/
public static MCostElement getMaterialCostElement(Properties ctx, String CostingMethod)
{
final String whereClause = "CostingMethod=? AND CostElementType=? ";
final String whereClause = COLUMNNAME_CostingMethod + " = ? AND " + COLUMNNAME_CostElementType + " = ? ";
List<MCostElement> list = new Query(ctx, I_M_CostElement.Table_Name, whereClause, null)
.setParameters(CostingMethod,"M")
.setParameters(CostingMethod,COSTELEMENTTYPE_Material)
.setClient_ID()
.setOrderBy(I_M_CostElement.COLUMNNAME_AD_Org_ID)
.list();