Hi
I am using below piece of code to calculate on hand for an item. Generally it works fine, however for the items that are used in the WHS processes the value returned is wrong. Basically inventOnHand.availPhysical() method fails, i have added the code form std Ax , for the "AvailPhysical method looks like it not returning correct values. Does anyone encountered it before?
public InventQtyAvailPhysical A_onHand()
{
InventDim inventDim;
InventOnHand inventOnhand;
InventDimParm InventDimParm;
;
InventDimParm.initFromInventDim(inventDim);
inventOnhand = inventOnhand::newParameters(this.ItemId, inventDim, InventDimParm);
return inventOnhand.availPhysical();
}
STD AX code:
/// <summary>
/// Gets the the quantity available for physical reservation.
/// </summary>
/// <returns>
/// The quantity in the inventory unit.
/// </returns>
public InventQtyAvailPhysical availPhysical()
{
// Don't do math for this quantity, instead use the value in InventSum
// because it's the correct number for WHS Items
if (itemUsesWHS)
{
this.setInventSum();
this.setAvailability();
return inventSum.AvailPhysical;
}
else
{
return (this.physicalInvent() - this.reservPhysical());
}
}
Thanks
P
*This post is locked for comments
I have the same question (0)