R30768-6 PaymentSlip - Convert Amounts
Code | 30768-6 |
Entity | Finance.Payments.PaymentSlips Entity |
Name | ConvertAmounts |
Attribute | PaymentSlipAmount.TotalAmount, PaymentSlipLine.Amount |
Layer | Front-End |
Events | AttributeChanged(DocumentCurrency) |
Priority | Normal |
Modify | YES |
Applicable Legislations | ALL//no condition needed |
Action | IF (Document.CurrencyDirectory != null AND oldCurrency
!= newCurrency)
foreach PaymentSlipAmount { PaymentSlipAmount.TotalAmount = PaymentSlipAmount.TotalAmount.ConvertTo(newCurrency, CurrencyDirectory); foreach (PaymentSlipLine) PaymentSlipLine.Amount = PaymentSlipLine.Amount.ConvertTo(newCurrency, CurrencyDirectory); } throws if there is no conversion ratio |
Description | When Document Currency in the Payment Slip is changed, Amount in the Payment Slip's lines and Total Amount in the Payment Slip's Amounts should be converted to the new Currency. |
Message | |
Version | Introduced: 2020.1
Updated: - |
Revocable | YES |
* For more information about the Business Rules Documentation Template and a short explanation of each column, see topic System Business Rules.