erp.type | erp.entity |
---|---|
front-end-business-rule |
Finance.Payments.PaymentOrders |
+----------------------+-----------------------------------------------------------------------------------------------+
| Code | 30755-12 |
+----------------------+-----------------------------------------------------------------------------------------------+
| Entity | @Finance.Payments.PaymentOrders |
+----------------------+-----------------------------------------------------------------------------------------------+
| Name | ConvertInvoiceAmount |
+----------------------+-----------------------------------------------------------------------------------------------+
| Attribute | InvoiceAmount |
+----------------------+-----------------------------------------------------------------------------------------------+
| Layer | Front-End |
+----------------------+-----------------------------------------------------------------------------------------------+
| Events | AttributeChanged(InvoiceAmountCurrency) |
+----------------------+-----------------------------------------------------------------------------------------------+
| Priority | Normal |
+----------------------+-----------------------------------------------------------------------------------------------+
| Modify | YES |
+----------------------+-----------------------------------------------------------------------------------------------+
| **Applicable | ALL // no condition needed |
| Legislations** | |
+----------------------+-----------------------------------------------------------------------------------------------+
| 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.