R30383-18 Invoice - Convert Line Prices

Code 30383-18
Entity Crm.Invoicing.Invoices Entity
Name ConvertLinePrices
Attribute Line.UnitPrice
Layer Front-End
Events AttributeChanged(DocumentCurrency)
Priority Normal
Modify YES
Applicable Legislations ALL // no condition needed
Action foreach (Invoice.Lines): if (line.UnitPrice.Value != 0) line.UnitPrice = line.UnitPrice.ConvertTo(Invoice.DocumentCurrency, Invoice.CurrencyDirectory);



Description When the Document Currency is changed, if the previous currency is different from the new currency, Unit Price should be converted the old currency to the new currency, if the Unit price is not 0.
Message
Version Introduced: 2020
Revocable YES

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