R30505-14 ReceivingOrderLine - Convert Price Per Unit
Code | 30505-14 |
Entity | Logistics.Procurement.ReceivingOrderLines Entity |
Name | ConvertPricePerUnit |
Attribute | PricePerUnit |
Layer | Front-End |
Events | AttributeChanged(QuantityUnit) |
Priority | Normal |
Modify | YES |
Applicable Legislations | ALL // no condition needed |
Action | if (ReceivingOrder.AdjustedDocument == null)
IF(PurchaseProductPrice==null)) if (OldQuantityUnit is not NULL and NewQuantityUnit!=null and Product !is not =!=NULLl) { var ratio = Product.GetRatio(oldUnit, QuantityUnit); PricePerUnit = (ratio.Divisor * PricePerUnit / ratio.Multiplier).Round(); } |
Description | When Quantity Unit is changed, Price Per Unit should be recalculated using the ratio between the old and the new Quantity Unit. |
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.