ProdTimeUnitOfMeasure::convertToTimeUnit Method
Converts a value from a particular unit of measure to a selected time unit by using the module parameters configuration.
Syntax
client server public static real convertToTimeUnit(
RefRecId _fromUnitOfMeasure,
real _value,
ProdTimeUnitType _toTimeUnitType,
[ItemId _itemId])
Run On
Called
Parameters
- _fromUnitOfMeasure
Type: RefRecId Extended Data Type
The source unit of measure.
- _value
Type: real
The value to convert.
- _toTimeUnitType
Type: ProdTimeUnitType Enumeration
The desired output time unit type.
- _itemId
Type: ItemId Extended Data Type
An item used for product-specific conversion, optional.
Return Value
Type: real
A converted value if a conversion exists; otherwise, 0.
Exceptions
Exception | Condition |
---|---|
Error | A required unit of measure is not set up. |