MIFOSX-1421 : corrected remove installment charge and add a new installment charge issues
This commit is contained in:
+1
-1
@@ -214,7 +214,7 @@ public class SchedulerJobsTestResults {
|
|||||||
Assert.assertNotNull(specifiedDueDateChargeId);
|
Assert.assertNotNull(specifiedDueDateChargeId);
|
||||||
|
|
||||||
this.loanTransactionHelper.addChargesForLoan(loanID,
|
this.loanTransactionHelper.addChargesForLoan(loanID,
|
||||||
LoanTransactionHelper.getSpecifiedDueDateChargesForLoanAsJSON(specifiedDueDateChargeId.toString()));
|
LoanTransactionHelper.getSpecifiedDueDateChargesForLoanAsJSON(specifiedDueDateChargeId.toString(), "12 March 2013", "100"));
|
||||||
ArrayList<HashMap> chargesPendingState = this.loanTransactionHelper.getLoanCharges(loanID);
|
ArrayList<HashMap> chargesPendingState = this.loanTransactionHelper.getLoanCharges(loanID);
|
||||||
Assert.assertEquals(1, chargesPendingState.size());
|
Assert.assertEquals(1, chargesPendingState.size());
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -622,7 +622,7 @@ public class Loan extends AbstractPersistable<Long> {
|
|||||||
final LocalDate lastRepaymentPeriodDueDate) {
|
final LocalDate lastRepaymentPeriodDueDate) {
|
||||||
if (loanCharge.isSpecifiedDueDate()
|
if (loanCharge.isSpecifiedDueDate()
|
||||||
&& !loanCharge.isDueForCollectionFromAndUpToAndIncluding(disbursementDate, lastRepaymentPeriodDueDate)) {
|
&& !loanCharge.isDueForCollectionFromAndUpToAndIncluding(disbursementDate, lastRepaymentPeriodDueDate)) {
|
||||||
final String defaultUserMessage = "This charge which is due at disbursement cannot be added as the loan is already disbursed.";
|
final String defaultUserMessage = "This charge with specified due date cannot be added as the it is not in schedule range.";
|
||||||
throw new LoanChargeCannotBeAddedException("loanCharge", "specified.due.date.outside.range", defaultUserMessage,
|
throw new LoanChargeCannotBeAddedException("loanCharge", "specified.due.date.outside.range", defaultUserMessage,
|
||||||
getDisbursementDate(), getLastRepaymentPeriodDueDate(), loanCharge.name());
|
getDisbursementDate(), getLastRepaymentPeriodDueDate(), loanCharge.name());
|
||||||
}
|
}
|
||||||
|
|||||||
+1
@@ -824,6 +824,7 @@ public class LoanCharge extends AbstractPersistable<Long> {
|
|||||||
this.active = active;
|
this.active = active;
|
||||||
if (!active) {
|
if (!active) {
|
||||||
this.overdueInstallmentCharge = null;
|
this.overdueInstallmentCharge = null;
|
||||||
|
this.clearLoanInstallmentCharges();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user