Skip to content

Latest commit

 

History

History
66 lines (64 loc) · 7.09 KB

R30753.md

File metadata and controls

66 lines (64 loc) · 7.09 KB

erp.type: business-rule erp.entity: Finance.Payments.PaymentTransactions

R30753 PaymentTransaction - Check For Over Returned Amount

+---------------------+------------------------------------------------------------------------------------------------+ | Code | R30753 | +---------------------+------------------------------------------------------------------------------------------------+ | Entity | @Finance.Payments.PaymentTransactions | +---------------------+------------------------------------------------------------------------------------------------+ | Name | CheckForOverReturnedAmount | +---------------------+------------------------------------------------------------------------------------------------+ | Attribute | - | +---------------------+------------------------------------------------------------------------------------------------+ | Layer | Back-End | +---------------------+------------------------------------------------------------------------------------------------+ | Events | Releasing + | +---------------------+------------------------------------------------------------------------------------------------+ | Priority | Normal | +---------------------+------------------------------------------------------------------------------------------------+ | Modify | NO | +---------------------+------------------------------------------------------------------------------------------------+ | **Applicable | ALL // no condition | | Legislations** | needed | +---------------------+------------------------------------------------------------------------------------------------+ | Action | IF OriginalPaymentTransaction is not NULL THEN  validate that 'OriginalPaymentTransaction' | | | is not over-returned. | | |

| | | A 'OriginalPaymentTransaction' is over-returned when: | | |

| | | - 'SUM(ABS(PaymentTransacti | | | on.TotalAmount[PaymentTransaction.OriginalPaymentTransaction=OriginalPaymentTransaction]))' | | | > ABS(OriginalPaymentTransaction.TotalAmount)'; | | |

| | |

| | |

| | | NOTE: | | | 'SUM(ABS(PaymentTransactio | | | n.TotalAmount[PaymentTransaction.OriginalPaymentTransaction=OriginalPaymentTransaction]))'  | | | is the sum of the TotalAmount in all non-voided Payment Transaction on document state Released | | | + that refer the particular OriginalPaymentTransaction and the TotalAmount of the current | | | Payment Transaction. | +---------------------+------------------------------------------------------------------------------------------------+ | Description | When we are making а return Payment Transaction we have to ensure that the total returned | | | amount of all return Payment Transactions is less or equal to the original Payment | | | Transaction's amount. | | |

| | | In other words, the current rule reassures that we are not over-returning the original Payment | | | Transaction. | +---------------------+------------------------------------------------------------------------------------------------+ | Message | The field 'Original Payment Transaction' in document '{DocumentText}' refers to a Payment | | | Transaction whose Total Amount is over-returned. | | |

| | | Please, check the Total Amount of the current document and all Payment Transactions which | | | return amount for the Original Payment Transaction | +---------------------+------------------------------------------------------------------------------------------------+ | 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.