Confusing logic applied in Libero Distribution Generate Movement process

26 views
Skip to first unread message

shiju01

unread,
May 17, 2018, 6:45:47 AM5/17/18
to iDempiere
Dear All,

Followng is the extract of code  from GenerateMovement.java class from Libero Distribution (MFG) 

                    BigDecimal onHand = Env.ZERO;

                    //BigDecimal toDeliver = line.getQtyOrdered()

                    BigDecimal toDeliver = line.getConfirmedQty(); //.subtract(line.getQtyDelivered());

                    MProduct product = line.getProduct();

                    //    Nothing to Deliver
                    if (product != null && toDeliver.signum() == 0)
                        continue;



Here ConfirmedQty is set to quantity pending to be delivered!    ConfirmedQty usually should be used denote/represent quantity already delivered and confirmed by the receiver?


I feel code should be

        getQtyOrdered().subtract(line.getQtyDelivered().add(line.qtyintransit())) 


That is      Qty Ordered     less       (  Qty already Delivered      plus    Qty  in Transit  )



Cannot understand why Confirmed Qty is used instead ????



shiju01

unread,
May 17, 2018, 6:50:05 AM5/17/18
to iDempiere

Why not getQtyToDeliver()  from MDDOrder ?


    /**
     * Quantity To Deliver
     * @return Quantity To Deliver
     */
    public BigDecimal getQtyToDeliver()
    {
        return getQtyOrdered().subtract(getQtyInTransit()).subtract(getQtyDelivered());
Reply all
Reply to author
Forward
0 new messages