Code below can be used for unit conversion with rounding.
public SalesQty dtConvert(Qty _salesQty,ItemId _itemId,SalesUnit _inventUnit,SalesUnit _salesUnit )
{
SalesQty salesQty;
salesQty = UnitOfMeasureConverter::convert(_salesQty,
UnitOfMeasure::unitOfMeasureIdBySymbol(_inventUnit),
UnitOfMeasure::unitOfMeasureIdBySymbol(_salesUnit),
NoYes::Yes,
InventTable::itemProduct(_itemId),
NoYes::Yes);
return salesQty;
}
No comments:
Post a Comment