FINERACT-1954: Waive null pointer and due date fix
- [x] Fix Waive due date handle - [x] Fix null pointer exception - [x] Integration test
This commit is contained in:
+6
-1
@@ -1081,7 +1081,12 @@ public class Loan extends AbstractAuditableWithUTCDateTimeCustom {
|
||||
transactionDate = loanCharge.getDueLocalDate();
|
||||
}
|
||||
} else if (loanCharge.isInstalmentFee()) {
|
||||
transactionDate = loanCharge.getInstallmentLoanCharge(loanInstallmentNumber).getRepaymentInstallment().getDueDate();
|
||||
LocalDate repaymentDueDate = loanCharge.getInstallmentLoanCharge(loanInstallmentNumber).getRepaymentInstallment().getDueDate();
|
||||
if (repaymentDueDate.isAfter(DateUtils.getBusinessLocalDate())) {
|
||||
transactionDate = DateUtils.getBusinessLocalDate();
|
||||
} else {
|
||||
transactionDate = repaymentDueDate;
|
||||
}
|
||||
}
|
||||
|
||||
scheduleGeneratorDTO.setRecalculateFrom(transactionDate);
|
||||
|
||||
+2
-1
@@ -25,6 +25,7 @@ import jakarta.persistence.ManyToOne;
|
||||
import jakarta.persistence.Table;
|
||||
import java.math.BigDecimal;
|
||||
import org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom;
|
||||
import org.apache.fineract.interoperation.util.MathUtil;
|
||||
import org.apache.fineract.organisation.monetary.domain.MonetaryCurrency;
|
||||
import org.apache.fineract.organisation.monetary.domain.Money;
|
||||
import org.apache.fineract.portfolio.loanaccount.data.LoanInstallmentChargeData;
|
||||
@@ -168,7 +169,7 @@ public class LoanInstallmentCharge extends AbstractPersistableCustom implements
|
||||
}
|
||||
|
||||
public boolean isPending() {
|
||||
return !(isPaid() || isWaived());
|
||||
return !MathUtil.isZero(this.amountOutstanding);
|
||||
}
|
||||
|
||||
public boolean isChargeAmountpaid(MonetaryCurrency currency) {
|
||||
|
||||
Reference in New Issue
Block a user