MIFOSX-1421 : corrected remove installment charge and add a new installment charge issues

This commit is contained in:
Pramod Nuthakki
2014-08-08 10:35:42 +05:30
parent 0ef30f4124
commit 103a4a0ee1
4 changed files with 3 additions and 2 deletions
Executable
BIN
View File
Binary file not shown.
@@ -214,7 +214,7 @@ public class SchedulerJobsTestResults {
Assert.assertNotNull(specifiedDueDateChargeId);
this.loanTransactionHelper.addChargesForLoan(loanID,
LoanTransactionHelper.getSpecifiedDueDateChargesForLoanAsJSON(specifiedDueDateChargeId.toString()));
LoanTransactionHelper.getSpecifiedDueDateChargesForLoanAsJSON(specifiedDueDateChargeId.toString(), "12 March 2013", "100"));
ArrayList<HashMap> chargesPendingState = this.loanTransactionHelper.getLoanCharges(loanID);
Assert.assertEquals(1, chargesPendingState.size());
@@ -622,7 +622,7 @@ public class Loan extends AbstractPersistable<Long> {
final LocalDate lastRepaymentPeriodDueDate) {
if (loanCharge.isSpecifiedDueDate()
&& !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,
getDisbursementDate(), getLastRepaymentPeriodDueDate(), loanCharge.name());
}
@@ -824,6 +824,7 @@ public class LoanCharge extends AbstractPersistable<Long> {
this.active = active;
if (!active) {
this.overdueInstallmentCharge = null;
this.clearLoanInstallmentCharges();
}
}