cost collector - scrap

2012-10-01
2013-03-07
  • Zuhair Hammadi

    Zuhair Hammadi - 2012-10-01

    Hi all,

    In which stage of manufacturing process and what condition  a scrap account will be posted?

    I scan the code of of Doc_PPCostCollector.java

    in function Fact createMaterialReceipt(MAcctSchema as)

    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.

    Regards,
    Zuhair Hammadi

     
  • Zuhair Hammadi

    Zuhair Hammadi - 2012-10-02

    any one can help ?

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks