R30316-12 InvoiceOrderLine - Recalculate Unit Price
Code | 30316-12 |
Entity | Crm.Invoicing.InvoiceOrderLines Entity |
Name | RecalculateUnitPrice |
Attribute | UnitPrice |
Layer | Front-End |
Events | AttributeChanged(QuantityUnit) |
Priority | Normal |
Modify | YES |
Applicable Legislations | ALL // no condition needed |
Action | If( Product !=null and QuantityUnit != null and UnitPrice!= null)
GetRatio (previousQuantityUnit, newQuantityUnit) UnitPrice = (UnitPrice*ratio.Divisor)/ratio.Multiplier |
Description | When the Quantity Unit of the line has changed, the Unit Price should be recalculated according to the Convertion ratio between the previous Quantity unit and the new one, unless Quantity unit has been empty before. |
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.