R30755-12 PaymentOrder - Convert Invoice Amount

Code 30755-12
Entity Finance.Payments.PaymentOrders Entity
Name ConvertInvoiceAmount
Attribute InvoiceAmount
Layer Front-End
Events AttributeChanged(InvoiceAmountCurrency)
Priority Normal
Modify YES
Applicable Legislations ALL // no condition needed
Action if( oldInvoiceAmountCurrency != newInvoiceAmountCurrency)

InvoiceAmount = new Amount(InvoiceAmount.Value, oldInvoiceAmountCurrency ).ConvertTo(newInvoiceAmountCurrency, PaymentOrder.CurrencyDirectory);
Description When Invoice Amount Currency is changed, if the previous currency is different from the new currency,Invoice Amount should be converted from the old currency to the new currency.
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.