R31300 LogisticsDocumentLine - Set Quantity From Quantity Base

Code R31300
Entity LogisticsDocumentLine
Name SetQuantityFromQuantityBase
Attribute Quantity
Layer Front-End
Events AttributeChanged(QuantityBase)
Priority Normal
Modify YES
Applicable Legislations ALL // no condition needed
Action if (Product != null && QuantityUnit != null && QuantityBase != null && QuantityBase != Quantity.ConvertTo(Product.BaseUnit, Product)) { if (!Product.AllowVariableMeasurementRatios) Quantity = QuantityBase.ConvertTo(QuantityUnit, Product); else if (Product.BaseUnit == QuantityUnit) Quantity = QuantityBase; }
Description Recalculates Quantity when Quantity Base is changed. For products which use Variable Measurement Ratios, the recalculation is performed only if the Quantity Unit in the line is the Base Мeasurement Unit of the product.
Message -
Version Introduced: 2020.1
Revocable YES

* For more information about the Business Rules Documentation Template and a short explanation of each column, see topic System Business Rules.