You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fineract.apache.org by na...@apache.org on 2016/06/06 07:51:15 UTC

[1/2] incubator-fineract git commit: 162_checking null values before computing the interest not posted

Repository: incubator-fineract
Updated Branches:
  refs/heads/develop 6f25da56e -> 979b57c38


162_checking null values before computing the interest not posted


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

Branch: refs/heads/develop
Commit: 59cfe08980de575f5a7c4b996d811afec5edf599
Parents: f96d96a
Author: AvinashKumarG <av...@confluxtechnologies.com>
Authored: Mon Aug 1 11:10:31 2016 +0530
Committer: AvinashKumarG <av...@confluxtechnologies.com>
Committed: Thu Jun 2 15:34:17 2016 +0530

----------------------------------------------------------------------
 .../service/SavingsAccountReadPlatformServiceImpl.java | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/59cfe089/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsAccountReadPlatformServiceImpl.java
----------------------------------------------------------------------
diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsAccountReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsAccountReadPlatformServiceImpl.java
index 5cc784d..c4e3bce 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsAccountReadPlatformServiceImpl.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsAccountReadPlatformServiceImpl.java
@@ -36,6 +36,7 @@ import org.apache.fineract.infrastructure.core.service.RoutingDataSource;
 import org.apache.fineract.infrastructure.core.service.SearchParameters;
 import org.apache.fineract.infrastructure.security.service.PlatformSecurityContext;
 import org.apache.fineract.organisation.monetary.data.CurrencyData;
+import org.apache.fineract.organisation.monetary.domain.Money;
 import org.apache.fineract.organisation.staff.data.StaffData;
 import org.apache.fineract.organisation.staff.service.StaffReadPlatformService;
 import org.apache.fineract.portfolio.account.data.AccountTransferData;
@@ -487,11 +488,11 @@ public class SavingsAccountReadPlatformServiceImpl implements SavingsAccountRead
             final BigDecimal totalAnnualFees = JdbcSupport.getBigDecimalDefaultToNullIfZero(rs, "totalAnnualFees");
 
             final BigDecimal totalInterestEarned = JdbcSupport.getBigDecimalDefaultToNullIfZero(rs, "totalInterestEarned");
-            final BigDecimal totalInterestPosted = JdbcSupport.getBigDecimalDefaultToNullIfZero(rs, "totalInterestPosted");
+            final BigDecimal totalInterestPosted = JdbcSupport.getBigDecimalDefaultToZeroIfNull(rs, "totalInterestPosted");
             final BigDecimal accountBalance = JdbcSupport.getBigDecimalDefaultToZeroIfNull(rs, "accountBalance");
             final BigDecimal totalFeeCharge = JdbcSupport.getBigDecimalDefaultToNullIfZero(rs, "totalFeeCharge");
             final BigDecimal totalPenaltyCharge = JdbcSupport.getBigDecimalDefaultToNullIfZero(rs, "totalPenaltyCharge");
-            final BigDecimal totalOverdraftInterestDerived = JdbcSupport.getBigDecimalDefaultToNullIfZero(rs,
+            final BigDecimal totalOverdraftInterestDerived = JdbcSupport.getBigDecimalDefaultToZeroIfNull(rs,
                     "totalOverdraftInterestDerived");
             final BigDecimal totalWithholdTax = JdbcSupport.getBigDecimalDefaultToNullIfZero(rs, "totalWithholdTax");
 
@@ -500,12 +501,12 @@ public class SavingsAccountReadPlatformServiceImpl implements SavingsAccountRead
             final BigDecimal onHoldFunds = rs.getBigDecimal("onHoldFunds");
             
             BigDecimal interestNotPosted = BigDecimal.ZERO;
-            if (totalInterestEarned != null) {
-                 interestNotPosted = totalInterestEarned.subtract(totalInterestPosted).add(totalOverdraftInterestDerived);
+            LocalDate lastInterestCalculationDate = null;
+            if(totalInterestEarned != null){
+            	interestNotPosted = totalInterestEarned.subtract(totalInterestPosted).add(totalOverdraftInterestDerived);
+            	lastInterestCalculationDate = JdbcSupport.getLocalDate(rs, "lastInterestCalculationDate");
             }
             
-            LocalDate lastInterestCalculationDate = JdbcSupport.getLocalDate(rs, "lastInterestCalculationDate");
-
             final SavingsAccountSummaryData summary = new SavingsAccountSummaryData(currency, totalDeposits, totalWithdrawals,
                     totalWithdrawalFees, totalAnnualFees, totalInterestEarned, totalInterestPosted, accountBalance, totalFeeCharge,
                     totalPenaltyCharge, totalOverdraftInterestDerived, totalWithholdTax, interestNotPosted, lastInterestCalculationDate);


[2/2] incubator-fineract git commit: Merge branch 'pull127' into develop

Posted by na...@apache.org.
Merge branch 'pull127' into develop


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

Branch: refs/heads/develop
Commit: 979b57c38cd7e1f13f70dcf7ac45ea3e822bec8f
Parents: 6f25da5 59cfe08
Author: Nazeer Hussain Shaik <na...@confluxtechnologies.com>
Authored: Mon Jun 6 12:48:12 2016 +0530
Committer: Nazeer Hussain Shaik <na...@confluxtechnologies.com>
Committed: Mon Jun 6 12:48:12 2016 +0530

----------------------------------------------------------------------
 .../service/SavingsAccountReadPlatformServiceImpl.java | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)
----------------------------------------------------------------------