In which stage of manufacturing process and what condition a scrap account will be posted?
I scan the code of of Doc_PPCostCollector.java
if(m_cc.getScrappedQty().signum() != 0)
MAccount debit = m_line.getAccount(ProductCost.ACCTTYPE_P_Scrap, as);
MCost c = MCost.get(product, 0, as, cd.getAD_Org_ID(), cd.getM_CostElement_ID());
BigDecimal cost = cd.getPrice().multiply(m_cc.getScrappedQty()).add(c.getCurrentCostPriceLL());
if (cost.scale() > as.getStdPrecision())
cost = cost.setScale(as.getStdPrecision(), RoundingMode.HALF_UP);
createLines(element, as, fact, product, debit, credit, cost, m_cc.getScrappedQty());
cd.getPrice() is always return null because it is virtual column.
any one can help ?
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.