MIFOSX-1877 NumberFormatException issue fixed for working days

This commit is contained in:
Chandrika
2015-04-07 17:53:11 -04:00
parent 48bf33c930
commit 2b17dba8cd
@@ -1272,7 +1272,7 @@ public abstract class AbstractLoanScheduleGenerator implements LoanScheduleGener
}
protected double calculateInterestForDays(int daysInPeriodApplicableForInterest, BigDecimal interest, int days) {
if (interest.doubleValue() == 0) { return 0; }
if (interest.doubleValue() == 0 || days == 0) { return 0; }
return ((interest.doubleValue()) / daysInPeriodApplicableForInterest) * days;
}