salesLine.SalesDeliverNow = UnitOfMeasureConverter::convert( salesLine.InventDeliverNow, UnitOfMeasure::unitOfMeasureIdBySymbol(salesLine.inventTable().inventUnitId()), UnitOfMeasure::unitOfMeasureIdBySymbol(salesLine.SalesUnit), NoYes::Yes, InventTable::itemProduct(salesLine.ItemId));
salesLine.SalesDeliverNow = EcoResProductUnitConverter::convertGivenUnitSymbolsForReleasedProduct( salesLine.ItemId, salesLine.InventDimId, salesLine.InventDeliverNow, salesLine.inventTable().inventUnitId(), salesLine.SalesUnit, NoYes::Yes);
public Qty unitConvertValue( ItemId _itemId, InventDimId _inventDimId, ModuleInventPurchSales _module, UnitOfMeasureSymbol _unitFrom, Qty _value = 1) { UnitOfMeasureSymbol unitTo = InventTableModule::find(_itemId, _module).UnitId; if (_unitFrom != unitTo) { UnitOfMeasureSymbol unitInvent = InventTableModule::find(_itemId, ModuleInventPurchSales::Invent).UnitId; EcoResProductUnitConverter productUnitConverter = EcoResProductUnitConverter::newGivenUnitSymbolsForReleasedProduct( _itemId, _inventDimId, _unitFrom, unitInvent, NoYes::Yes); InventQty inventQty = productUnitConverter.convertValue(_value); productUnitConverter.parmFromUnitOfMeasureSymbol(unitInvent); productUnitConverter.parmToUnitOfMeasureSymbol(unitTo); return productUnitConverter.convertValue(inventQty); } return _value; }
DaxOnline.org is free platform that allows you to quickly store and reuse snippets, notes, articles related to Dynamics AX.
Authors are allowed to set their own AdSense units.
Join us.