Tuesday, July 8, 2014

OnHand Qty from item ID in Table AX 2012

// To get On Hand Qty from item ID in Table


display InventQty qty()    //Real

{
    return InventSum::hhtAvailPhysical(this.ItemId) +
        ( select sum(Ordered) from inventSum where inventSum.ItemId == this.ItemId).ordered +
            ( select sum(Arrived) from inventSum where inventSum.ItemId == this.ItemId).Arrived -
                ( select sum(ReservOrdered) from inventSum where inventSum.ItemId == this.ItemId).ReservOrdered -
                    ( select sum(OnOrder) from inventSum where inventSum.ItemId == this.ItemId).Onorder ;
}

No comments:

Post a Comment

Copy Markup charges while posting purchase invoice using X++

 Copy Markup charges while posting purchase invoice using X++ Class: Important: Code logic is just for Reference.  New class => Duplicate...