Adam Saghy created FINERACT-2348:
------------------------------------

             Summary: Calculate and store Capitalized income / Buydown fee 
amortization allocation schedule
                 Key: FINERACT-2348
                 URL: https://issues.apache.org/jira/browse/FINERACT-2348
             Project: Apache Fineract
          Issue Type: New Feature
    Affects Versions: 1.12.1
            Reporter: Adam Saghy
             Fix For: 1.13.0


We should introduce a new mapping table for Capitalized Income / Buydown fee 
amortization:

The mapping table should store which base loan transaction (Capitalized income 
or buy down fee) amortization occurs, on which date and what was the calculated 
amount:
 * type: Enum (Capitalized Income / Buydown fee)

 * loan_id: FK to Loan

 * base_loan_transaction_id: FK to original Capitalized Income / Buy down fee 
txn

 * date: DATE, → which day it represent

 * amortization_loan_transaction_id: FK to loan transaction (amortization / 
amortization adjustment)

 * type: ENUM → AM (amortization) / AM_ADJ (amortization adjustment)

 * amount: BigDecimal

 * audit fields (created by / created date)

This mapping will match with the created amortization / amortization adjustment 
transactions for Capitalized Income / Buydown fee, but since the amortization 
transactions are only store aggregated amounts, we need this mapping table to 
be able to store the “actual” amount separately for each base transactions.

 

Introduce new APIs:
 * /v1/loans/\{loandId}/capitalized-incomes/\{loanTransactionId}

 * 
/v1/loans/external-id/\{loandExternalId}/capitalized-incomes/\{loanTransactionId}

 * 
/v1/loans/\{loandId}/capitalized-incomes/external-id/\{loanTransactionExternalId}

 * 
/v1/loans/external-id/\{loandExternalId}/capitalized-incomes/external-id/\{loanTransactionExternalId}

 
 * /v1/loans/\{loandId}/buydown-fees/\{loanTransactionId}

 * /v1/loans/external-id/\{loandExternalId}/buydown-fees/\{loanTransactionId}

 * /v1/loans/\{loandId}/buydown-fees/external-id/\{loanTransactionExternalId}

 * 
/v1/loans/external-id/\{loandExternalId}/buydown-fees/external-id/\{loanTransactionExternalId}

 

These APIs list the amortization allocation schedule base details (most of them 
can be fetched from m_loan_capitalized_income_balance / 
m_loan_buy_down_fee_balance:
 * Loan id

 * Loan external id

 * Base loan transaction (Capitalized Income / Buydown fee txn which is 
amortized)

 * Base loan transaction date

 * Base loan transaction amount

 * Unrecognized amount

 * Charged-off amount

 * Adjustment amount

and mapping as table:
 * Amortization loan transaction id

 * Amortization loan transaction external id

 * Date

 * Type (Amortization / Amortization adjustment)

 * Amount

 
*Acceptance criteria*
 * Introduce this new mapping table which will store, useful, additional 
details and balances for capitalized income / buydown fee amortization

 * The rows of mapping will contains separately the balances and mappings to 
the created amortization / amortization adjustment transaction and the amount 
that was calculated for the base transaction for the particular day.

 * When Capitalized income / buy down fee amortization / or amortization 
adjustment transaction is calculated and created we should also create this 
mappings

 * This mappings *should NOT be linked* to the Loan transaction, we dont want 
to fetch via the loan transactions!

 * New APIs introduced and can be used to fetch the allocation details



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to