Implement #5 Disable usage of Cost Detail for Standard Costing - thanks to Armen and Adaxa

http://hg.idempiere.com/idempiere/issue/5
https://sourceforge.net/projects/adempiere/forums/forum/611161/topic/2658714
This commit is contained in:
Carlos Ruiz 2011-05-04 22:06:38 -05:00
parent 8d447eebe1
commit 787f6095a5
1 changed files with 1 additions and 1 deletions

View File

@ -728,7 +728,7 @@ public class DocLine
*/
public BigDecimal getProductCosts (MAcctSchema as, int AD_Org_ID, boolean zeroCostsOK, String whereClause)
{
if (whereClause != null)
if (whereClause != null && !as.getCostingMethod().equals(MAcctSchema.COSTINGMETHOD_StandardCosting))
{
MCostDetail cd = MCostDetail.get (Env.getCtx(), whereClause,
get_ID(), getM_AttributeSetInstance_ID(), as.getC_AcctSchema_ID(), p_po.get_TrxName());