FINERACT-1981: fix post maturity charge removed by cob on progressive loan
This commit is contained in:
committed by
Arnold Gálovics
parent
84f01e0687
commit
56350673ad
+3
-1
@@ -29,6 +29,7 @@ import org.apache.fineract.portfolio.loanaccount.domain.Loan;
|
||||
import org.apache.fineract.portfolio.loanaccount.domain.LoanCharge;
|
||||
import org.apache.fineract.portfolio.loanaccount.loanschedule.data.LoanScheduleDTO;
|
||||
import org.apache.fineract.portfolio.loanaccount.loanschedule.domain.LoanScheduleModel;
|
||||
import org.apache.fineract.portfolio.loanaccount.loanschedule.domain.LoanScheduleType;
|
||||
|
||||
@RequiredArgsConstructor
|
||||
public class LoanScheduleService {
|
||||
@@ -98,7 +99,8 @@ public class LoanScheduleService {
|
||||
for (final LoanCharge loanCharge : charges) {
|
||||
if (!loanCharge.isDueAtDisbursement()) {
|
||||
loan.updateOverdueScheduleInstallment(loanCharge);
|
||||
if (loanCharge.getDueLocalDate() == null || !DateUtils.isBefore(lastRepaymentDate, loanCharge.getDueLocalDate())) {
|
||||
if (loanCharge.getDueLocalDate() == null || (!DateUtils.isBefore(lastRepaymentDate, loanCharge.getDueLocalDate())
|
||||
|| loan.getLoanProductRelatedDetail().getLoanScheduleType().equals(LoanScheduleType.PROGRESSIVE))) {
|
||||
if ((loanCharge.isInstalmentFee() || !loanCharge.isWaived()) && (loanCharge.getDueLocalDate() == null
|
||||
|| !DateUtils.isAfter(lastTransactionDate, loanCharge.getDueLocalDate()))) {
|
||||
loanChargeService.recalculateLoanCharge(loan, loanCharge, generatorDTO.getPenaltyWaitPeriod());
|
||||
|
||||
Reference in New Issue
Block a user