adamsaghy commented on code in PR #5380:
URL: https://github.com/apache/fineract/pull/5380#discussion_r2930327390
##########
fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/EMICalculator.java:
##########
@@ -26,111 +26,59 @@
import java.util.Optional;
import org.apache.fineract.organisation.monetary.domain.MonetaryCurrency;
import org.apache.fineract.organisation.monetary.domain.Money;
-import
org.apache.fineract.portfolio.loanaccount.domain.LoanRepaymentScheduleInstallment;
-import org.apache.fineract.portfolio.loanaccount.domain.LoanTransaction;
-import
org.apache.fineract.portfolio.loanaccount.domain.reaging.LoanReAgeParameter;
import
org.apache.fineract.portfolio.loanaccount.loanschedule.domain.LoanApplicationTerms;
import
org.apache.fineract.portfolio.loanaccount.loanschedule.domain.LoanScheduleModelRepaymentPeriod;
import
org.apache.fineract.portfolio.loanproduct.calc.data.EqualAmortizationValues;
+import
org.apache.fineract.portfolio.loanproduct.calc.data.LoanReAgeParameterData;
import org.apache.fineract.portfolio.loanproduct.calc.data.OutstandingDetails;
import org.apache.fineract.portfolio.loanproduct.calc.data.PeriodDueDetails;
+import
org.apache.fineract.portfolio.loanproduct.calc.data.ProcessedTransactionData;
import
org.apache.fineract.portfolio.loanproduct.calc.data.ProgressiveLoanInterestScheduleModel;
import org.apache.fineract.portfolio.loanproduct.calc.data.RepaymentPeriod;
+import
org.apache.fineract.portfolio.loanproduct.calc.data.RepaymentScheduleInstallmentData;
import
org.apache.fineract.portfolio.loanproduct.domain.ILoanConfigurationDetails;
public interface EMICalculator {
- /**
- * This method creates an Interest model with repayment periods from the
schedule periods which generated by
- * schedule generator.
- */
@NotNull
ProgressiveLoanInterestScheduleModel
generatePeriodInterestScheduleModel(@NotNull
List<LoanScheduleModelRepaymentPeriod> periods,
@NotNull ILoanConfigurationDetails loanProductRelatedDetail,
Integer installmentAmountInMultiplesOf, MathContext mc);
- /**
- * This method creates an Interest model with repayment periods from the
installments which retrieved from the
- * database.
- */
@NotNull
ProgressiveLoanInterestScheduleModel
generateInstallmentInterestScheduleModel(
- @NotNull List<LoanRepaymentScheduleInstallment> installments,
@NotNull ILoanConfigurationDetails loanProductRelatedDetail,
+ @NotNull List<RepaymentScheduleInstallmentData> installments,
@NotNull ILoanConfigurationDetails loanProductRelatedDetail,
Integer installmentAmountInMultiplesOf, MathContext mc);
- /**
- * Find repayment period based on Due Date.
- */
Optional<RepaymentPeriod>
findRepaymentPeriod(ProgressiveLoanInterestScheduleModel scheduleModel,
LocalDate fromDate,
LocalDate dueDate);
- /**
- * Applies the disbursement on the interest model. This method
recalculates the EMI amounts from the action date.
- */
void addDisbursement(ProgressiveLoanInterestScheduleModel scheduleModel,
LocalDate disbursementDueDate, Money disbursedAmount);
- /**
- * Applies the capitalized income transaction on the interest model. This
method recalculates the EMI amounts from
- * the action date.
- */
void addCapitalizedIncome(ProgressiveLoanInterestScheduleModel
scheduleModel, LocalDate transactionDueDate, Money transactionAmount);
- /**
- * Applies the interest rate change on the interest model. This method
recalculates the EMI amounts from the action
- * date.
- */
void changeInterestRate(ProgressiveLoanInterestScheduleModel
scheduleModel, LocalDate newInterestSubmittedOnDate,
BigDecimal newInterestRate);
void addRepaymentPeriods(ProgressiveLoanInterestScheduleModel
scheduleModel, LocalDate submittedOnDate,
- int numberOfRepaymentPeriodsToAdd, List<LoanTransaction>
alreadyProcessedTransactions);
+ int numberOfRepaymentPeriodsToAdd, List<ProcessedTransactionData>
alreadyProcessedTransactions);
- /**
- * This method applies outstanding balance correction on the interest
model. Negative amount decreases the
- * outstanding balance while positive amounts are increasing that.
Typically used for late repayment or to count
- * repayments.
- */
void addBalanceCorrection(ProgressiveLoanInterestScheduleModel
scheduleModel, LocalDate balanceCorrectionDate,
Money balanceCorrectionAmount);
- /**
- * This method used for pay interest portion during the repayment
transaction.
- */
void payInterest(ProgressiveLoanInterestScheduleModel scheduleModel,
LocalDate repaymentPeriodFromDate,
LocalDate repaymentPeriodDueDate, LocalDate transactionDate, Money
interestAmount);
- /**
Review Comment:
why do you remove the javadoc?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]