Merge pull request #1341 from chandrikamohith/1877

MIFOSX-1877 NumberFormatException issue fixed for working days
This commit is contained in:
Vishwas Babu A J
2015-04-07 16:10:48 -07:00
@@ -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;
}