FINERACT-181

This commit is contained in:
Nazeer Hussain Shaik
2016-06-21 13:15:08 +05:30
parent a89a43a3f7
commit b7ba924174
@@ -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");
}