Projects/AdvPaymentMngt/Technical Documentation LinkCreditPayment
Purpose of the project
The purpose of this project is to develop a new enhancement to the Advanced Payables and Receivables module.
Currently when a credit payment is used in one or more payments, there is no direct link between them. This project will create the infrastructure for associating these payments, allowing the user to track the places where the credit payment has been used.
This project is associated with the feature request #18343
For developing this feature request, it will be necessary to modify Core and the Advanced Payables and Receivables module.
Changes in Core
A new table, called FIN_PAYMENT_CREDIT, will be created. This table is in charge of saving the relationship between the credit payments and the payment that consumes them.
|Column Name||Data Type||Nullable|
|FIN_PAYMENT_CREDIT_ID (Primary key)||VARCHAR2(32 BYTE)||No|
This table will be associated with a new tab called Used Credit displayed in the Payment In and Payment Out windows. In case of payment that has used credit, this tab will display the credit payments consumed. Several credit payments can be consumed for a single payment, that's why we use a table instead of a field inside the Payment In/Out windows.
In case the user would want to know in which payments a concrete credit payment has been used, he can use the Linked Items feature inside the Payment In/Out window of the credit payment.
Changes in Advanced Payables and Receivables module
When processing a payment, the new Used Credit tab will be populate in case one or more credit payment has been used in the processed payment.
In case of reactivating or voiding a payment that has used credit payments, the previous relationships to the credit payments will be cleaned.
The Java class in charge of the Processing Payments logic is the org.openbravo.advpaymentmngt.process.FIN_PaymentProcess:
- The private method FIN_PaymentProcess.updateUsedCredit() will be updated to populate the FIN_PAYMENT_CREDIT table.
- The execute() method will also be modified to delete the previous relationships to the credit payments in case of reactivating or voiding flows.