What: Allow to post repayments to a given Credit Arrangement consolidate schedule via API and UI
Why: Credit Arrangements are used by different organizations to consolidate several loans under one simplified schedule to the end-user, where all installments are due on the same date of the month. The organizations send to the customer a single invoice with the amount due and respective due date for the credit arrangement.
Currently in order to post the repayment for the whole credit arrangement, the client has to:
Retrieve Line of Credit for each client to get Loan Accounts IDs
Iterate over each Loan account ID to retrieve repayment schedule
Perform calculation/aggregation of repayments grouping by repayment date
POST a repayment on each loan account, starting by the oldest installment, respecting the repayment allocation order from the product, until such installment changes to paid, then they move to the next installment and so on.
As this procedure requires multiple calls to Mambu API it consumes a lot of time, where it's frequently used to display upcoming repayment schedule (aggregated by repayment date) or upcoming amount due.