adamsaghy commented on code in PR #3406:
URL: https://github.com/apache/fineract/pull/3406#discussion_r1307253476
##########
fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanRepaymentScheduleProcessingWrapper.java:
##########
@@ -42,37 +42,44 @@ public void reprocess(final MonetaryCurrency currency,
final LocalDate disbursem
LocalDate startDate = disbursementDate;
for (final LoanRepaymentScheduleInstallment period : repaymentPeriods)
{
- final Money feeChargesDueForRepaymentPeriod =
cumulativeFeeChargesDueWithin(startDate, period.getDueDate(), loanCharges,
- currency, period, totalPrincipal, totalInterest,
!period.isRecalculatedInterestComponent());
- final Money feeChargesWaivedForRepaymentPeriod =
cumulativeFeeChargesWaivedWithin(startDate, period.getDueDate(), loanCharges,
- currency, !period.isRecalculatedInterestComponent(),
period.isFirstPeriod());
- final Money feeChargesWrittenOffForRepaymentPeriod =
cumulativeFeeChargesWrittenOffWithin(startDate, period.getDueDate(),
- loanCharges, currency,
!period.isRecalculatedInterestComponent(), period.isFirstPeriod());
-
- final Money penaltyChargesDueForRepaymentPeriod =
cumulativePenaltyChargesDueWithin(startDate, period.getDueDate(), loanCharges,
- currency, period, totalPrincipal, totalInterest,
!period.isRecalculatedInterestComponent());
- final Money penaltyChargesWaivedForRepaymentPeriod =
cumulativePenaltyChargesWaivedWithin(startDate, period.getDueDate(),
- loanCharges, currency,
!period.isRecalculatedInterestComponent(), period.isFirstPeriod());
- final Money penaltyChargesWrittenOffForRepaymentPeriod =
cumulativePenaltyChargesWrittenOffWithin(startDate,
- period.getDueDate(), loanCharges, currency,
!period.isRecalculatedInterestComponent(), period.isFirstPeriod());
-
- period.updateChargePortion(feeChargesDueForRepaymentPeriod,
feeChargesWaivedForRepaymentPeriod,
- feeChargesWrittenOffForRepaymentPeriod,
penaltyChargesDueForRepaymentPeriod, penaltyChargesWaivedForRepaymentPeriod,
- penaltyChargesWrittenOffForRepaymentPeriod);
-
- startDate = period.getDueDate();
+ if (!period.isDownPayment()) {
+
+ boolean isFirstPeriod = repaymentPeriods.stream()
Review Comment:
Please use a more describing name for this
It is not the first (repayment) period, rather the first (normal / non-down
repayment period).
--
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]