R31422-2 Payment Transaction - Convert Amounts
Code | 31422-2 |
Entity | Finance.Payments.PaymentTransactions Entity |
Name | ConvertAmounts |
Attribute | PaymentTransaction.TotalAmount,
PaymentTransactionLine.Amount |
Layer | Front-End |
Events | AttributeChanged(TotalAmountCurrency) |
Priority | Normal |
Modify | YES |
Applicable Legislations | ALL // no condition needed |
Action | if( oldTotalAmountCurrency != newTotalAmountCurrency AND CurrencyDirectory != null)
TotalAmount = TotalAmount.ConvertTo(TotalAmountCurrency, CurrencyDirectory); foreach (Lines) { Line.Amount = Line.Amount.ConvertTo(TotalAmountCurrency, CurrencyDirectory); } |
Description | When Total Amount Currency is changed, if the previous currency is different from the new currency, Total Amount should be converted from the old currency to the new currency and Amount in all lines should be converted too. |
Message | |
Version | Introduced: 21 Updated: v.24 SP7- Calculation according to the real current value of Amount (which may be changed by other rules). |
Revocable | YES |