cost collector - scrap

  • 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

    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.

    Zuhair Hammadi

  • Zuhair Hammadi

    Zuhair Hammadi - 2012-10-02

    any one can help ?


Log in to post a comment.