Repository: incubator-fineract
Updated Branches:
  refs/heads/develop a89a43a3f -> b7ba92417


FINERACT-181


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

Branch: refs/heads/develop
Commit: b7ba92417464d4579f3cdbf2b9d91a814ef7ff38
Parents: a89a43a
Author: Nazeer Hussain Shaik <[email protected]>
Authored: Tue Jun 21 13:15:08 2016 +0530
Committer: Nazeer Hussain Shaik <[email protected]>
Committed: Tue Jun 21 13:15:08 2016 +0530

----------------------------------------------------------------------
 .../shareaccounts/serialization/ShareAccountDataSerializer.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-fineract/blob/b7ba9241/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/serialization/ShareAccountDataSerializer.java
----------------------------------------------------------------------
diff --git 
a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/serialization/ShareAccountDataSerializer.java
 
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/serialization/ShareAccountDataSerializer.java
index 78b9b35..11daee9 100644
--- 
a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/serialization/ShareAccountDataSerializer.java
+++ 
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/serialization/ShareAccountDataSerializer.java
@@ -647,7 +647,7 @@ public class ShareAccountDataSerializer {
         ShareProduct shareProduct = account.getShareProduct();
         if (sharesRequested != null) {
             Long totalSharesAfterapproval = account.getTotalApprovedShares() + 
sharesRequested;
-            if(totalSharesAfterapproval > 
shareProduct.getMaximumClientShares()) {
+            if(shareProduct.getMaximumClientShares() != null && 
totalSharesAfterapproval > shareProduct.getMaximumClientShares()) {
                 
baseDataValidator.reset().parameter(ShareAccountApiConstants.requestedshares_paramname).value(sharesRequested)
                 
.failWithCode("exceeding.maximum.limit.defined.in.the.shareproduct", "Existing 
and requested shares count is more than product definition");
             }

Reply via email to