fineract-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nazeer1100...@apache.org
Subject [1/2] incubator-fineract git commit: FINERACT-418 penalties should be applied until the day before running job
Date Wed, 22 Mar 2017 06:28:46 GMT
Repository: incubator-fineract
Updated Branches:
  refs/heads/develop 1873db645 -> 14a1216d0


FINERACT-418 penalties should be applied until the day before running job


Project: http://git-wip-us.apache.org/repos/asf/incubator-fineract/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-fineract/commit/a7b27d6d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-fineract/tree/a7b27d6d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-fineract/diff/a7b27d6d

Branch: refs/heads/develop
Commit: a7b27d6d363198c6017408a768d90015b047ef0c
Parents: 8cc560c
Author: Lionel Raymundi - Poincenot <lionel@poincenot.com>
Authored: Sun Mar 19 23:11:29 2017 -0300
Committer: Lionel Raymundi - Poincenot <lionel@poincenot.com>
Committed: Sun Mar 19 23:11:29 2017 -0300

----------------------------------------------------------------------
 .../service/LoanWritePlatformServiceJpaRepositoryImpl.java     | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/a7b27d6d/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanWritePlatformServiceJpaRepositoryImpl.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanWritePlatformServiceJpaRepositoryImpl.java
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanWritePlatformServiceJpaRepositoryImpl.java
index 4f02d2e..abb6353 100755
--- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanWritePlatformServiceJpaRepositoryImpl.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanWritePlatformServiceJpaRepositoryImpl.java
@@ -2395,15 +2395,15 @@ public class LoanWritePlatformServiceJpaRepositoryImpl implements
LoanWritePlatf
         final Long penaltyPostingWaitPeriodValue = this.configurationDomainService.retrieveGraceOnPenaltyPostingPeriod();
         final LocalDate dueDate = command.localDateValueOfParameterNamed("dueDate");
         Long diff = penaltyWaitPeriodValue + 1 - penaltyPostingWaitPeriodValue;
-        if (diff < 0) {
-            diff = 0L;
+        if (diff < 1) {
+            diff = 1L;
         }
         LocalDate startDate = dueDate.plusDays(penaltyWaitPeriodValue.intValue() + 1);
         Integer frequencyNunber = 1;
         if (feeFrequency == null) {
             scheduleDates.put(frequencyNunber++, startDate.minusDays(diff.intValue()));
         } else {
-            while (DateUtils.getLocalDateOfTenant().isAfter(startDate)) {
+            while (!startDate.isAfter(DateUtils.getLocalDateOfTenant())) {
                 scheduleDates.put(frequencyNunber++, startDate.minusDays(diff.intValue()));
                 LocalDate scheduleDate = scheduledDateGenerator.getRepaymentPeriodDate(PeriodFrequencyType.fromInt(feeFrequency),
                         chargeDefinition.feeInterval(), startDate, null, null);


Mime
View raw message