MIFOSX-827 used money in loan charge
This commit is contained in:
committed by
Vishwas Babu A J
parent
9f9746d404
commit
645f2c24aa
+5
-2
@@ -431,7 +431,7 @@ public class Loan extends AbstractPersistable<Long> {
|
|||||||
|
|
||||||
validateChargeHasValidSpecifiedDateIfApplicable(loanCharge, getDisbursementDate(), getLastRepaymentPeriodDueDate());
|
validateChargeHasValidSpecifiedDateIfApplicable(loanCharge, getDisbursementDate(), getLastRepaymentPeriodDueDate());
|
||||||
|
|
||||||
this.summary = updateSummaryWithTotalFeeChargesDueAtDisbursement(deriveSumTotalOfChargesDueAtDisbursement());
|
|
||||||
|
|
||||||
loanCharge.update(this);
|
loanCharge.update(this);
|
||||||
|
|
||||||
@@ -455,7 +455,7 @@ public class Loan extends AbstractPersistable<Long> {
|
|||||||
// NOTE: must add new loan charge to set of loan charges before
|
// NOTE: must add new loan charge to set of loan charges before
|
||||||
// reporcessing the repayment schedule.
|
// reporcessing the repayment schedule.
|
||||||
this.charges.add(loanCharge);
|
this.charges.add(loanCharge);
|
||||||
|
this.summary = updateSummaryWithTotalFeeChargesDueAtDisbursement(deriveSumTotalOfChargesDueAtDisbursement());
|
||||||
final LoanRepaymentScheduleTransactionProcessor loanRepaymentScheduleTransactionProcessor = this.transactionProcessorFactory
|
final LoanRepaymentScheduleTransactionProcessor loanRepaymentScheduleTransactionProcessor = this.transactionProcessorFactory
|
||||||
.determineProcessor(this.transactionProcessingStrategy);
|
.determineProcessor(this.transactionProcessingStrategy);
|
||||||
|
|
||||||
@@ -1244,6 +1244,7 @@ public class Loan extends AbstractPersistable<Long> {
|
|||||||
|
|
||||||
updateLoanSchedule(loanSchedule);
|
updateLoanSchedule(loanSchedule);
|
||||||
|
|
||||||
|
|
||||||
LoanStatus from = null;
|
LoanStatus from = null;
|
||||||
if (this.loanStatus != null) {
|
if (this.loanStatus != null) {
|
||||||
from = LoanStatus.fromInt(this.loanStatus);
|
from = LoanStatus.fromInt(this.loanStatus);
|
||||||
@@ -1307,6 +1308,8 @@ public class Loan extends AbstractPersistable<Long> {
|
|||||||
totalChargeAmt);
|
totalChargeAmt);
|
||||||
validateChargeHasValidSpecifiedDateIfApplicable(loanCharge, getDisbursementDate(), getLastRepaymentPeriodDueDate());
|
validateChargeHasValidSpecifiedDateIfApplicable(loanCharge, getDisbursementDate(), getLastRepaymentPeriodDueDate());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
updateSummaryWithTotalFeeChargesDueAtDisbursement(deriveSumTotalOfChargesDueAtDisbursement());
|
||||||
|
|
||||||
// validate if disbursement date is a holiday or a non-working day
|
// validate if disbursement date is a holiday or a non-working day
|
||||||
validateDisbursementDateIsOnNonWorkingDay(workingDays, allowTransactionsOnNonWorkingDay);
|
validateDisbursementDateIsOnNonWorkingDay(workingDays, allowTransactionsOnNonWorkingDay);
|
||||||
|
|||||||
+4
@@ -553,6 +553,10 @@ public class LoanCharge extends AbstractPersistable<Long> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
minMaxCap = percentageOf;
|
minMaxCap = percentageOf;
|
||||||
|
// this will round the amount value
|
||||||
|
if(this.loan != null && minMaxCap !=null){
|
||||||
|
minMaxCap = Money.of(this.loan.getCurrency(), minMaxCap).getAmount();
|
||||||
|
}
|
||||||
return minMaxCap;
|
return minMaxCap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user