adamsaghy commented on code in PR #4116:
URL: https://github.com/apache/fineract/pull/4116#discussion_r1821586318
##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/ProgressiveLoanInterestRefundServiceImpl.java:
##########
@@ -54,53 +54,48 @@ public boolean canHandle(Loan loan) {
return loan != null && loan.isInterestBearing() &&
processor.accept(loan.getTransactionProcessingStrategyCode());
}
- private static boolean omitDisbursements(LoanTransaction lt, final
AtomicReference<BigDecimal> refundFinal) {
+ private static void simulateRepaymentForDisbursements(LoanTransaction lt,
final AtomicReference<BigDecimal> refundFinal,
+ List<LoanTransaction> collect) {
+ collect.add(lt);
if (lt.getTypeOf().isDisbursement() &&
refundFinal.get().compareTo(BigDecimal.ZERO) > 0) {
if (lt.getAmount().compareTo(refundFinal.get()) <= 0) {
+ collect.add(
+ new LoanTransaction(lt.getLoan(),
lt.getLoan().getOffice(), REPAYMENT.getValue(), lt.getDateOf(), lt.getAmount(),
Review Comment:
Can you please tell me about this? I thought we were just amending the
disbursement and calculate interest based on the remaining amount.
--
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]