adamsaghy commented on code in PR #5102:
URL: https://github.com/apache/fineract/pull/5102#discussion_r2490168941
##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/ProgressiveLoanInterestRefundServiceImpl.java:
##########
@@ -62,8 +62,16 @@ public class ProgressiveLoanInterestRefundServiceImpl
implements InterestRefundS
private static void simulateRepaymentForDisbursements(LoanTransaction lt,
final AtomicReference<BigDecimal> refundFinal,
List<LoanTransaction> collect) {
- collect.add(new LoanTransaction(lt.getLoan(),
lt.getLoan().getOffice(), lt.getTypeOf(), lt.getDateOf(), lt.getAmount(),
- BigDecimal.ZERO, BigDecimal.ZERO, BigDecimal.ZERO,
BigDecimal.ZERO, BigDecimal.ZERO, false, null, null));
+ LoanTransaction copy = new LoanTransaction(lt.getLoan(),
lt.getLoan().getOffice(), lt.getTypeOf(), lt.getDateOf(), lt.getAmount(),
+ BigDecimal.ZERO, BigDecimal.ZERO, BigDecimal.ZERO,
BigDecimal.ZERO, BigDecimal.ZERO, false, null, null);
+ if (LoanTransactionType.CHARGE_PAYMENT.equals(copy.getTypeOf())
+ ||
LoanTransactionType.REPAYMENT_AT_DISBURSEMENT.equals(copy.getTypeOf())) {
+ copy.getLoanChargesPaid().addAll(copy.getLoanChargesPaid());
+ }
+ if (LoanTransactionType.REAGE.equals(copy.getTypeOf())) {
+
copy.setLoanReAgeParameter(lt.getLoanReAgeParameter().getCopy(copy));
+ }
+ collect.add(copy);
Review Comment:
why do we need this?
--
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]