adamsaghy commented on code in PR #5403:
URL: https://github.com/apache/fineract/pull/5403#discussion_r2755583127


##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/serialization/ShareAccountDataSerializer.java:
##########
@@ -708,7 +708,7 @@ public Map<String, Object> 
validateAndApplyAddtionalShares(JsonCommand jsonComma
         boolean isTransactionBeforeExistingTransactions = false;
         Set<ShareAccountTransaction> transactions = 
account.getShareAccountTransactions();
         for (ShareAccountTransaction transaction : transactions) {
-            if (!transaction.isChargeTransaction()) {
+            if (!transaction.isChargeTransaction() && transaction.isActive() 
&& !transaction.isPurchaseRejectedTransaction()) {

Review Comment:
   Please filter the `account.getShareAccountTransactions()` result first and 
then iterate over them.



##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/serialization/ShareAccountDataSerializer.java:
##########
@@ -1020,7 +1020,7 @@ public Map<String, Object> validateAndClose(JsonCommand 
jsonCommand, ShareAccoun
         boolean isTransactionBeforeExistingTransactions = false;
         Set<ShareAccountTransaction> transactions = 
account.getShareAccountTransactions();
         for (ShareAccountTransaction transaction : transactions) {
-            if (!transaction.isChargeTransaction()) {
+            if (!transaction.isChargeTransaction() && transaction.isActive() 
&& !transaction.isPurchaseRejectedTransaction()) {

Review Comment:
   Same as above



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to