You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fineract.apache.org by GitBox <gi...@apache.org> on 2022/06/09 12:16:00 UTC

[GitHub] [fineract] logoutdhaval opened a new pull request, #2353: FINERACT-1634: Invalid balance after withdrawal correction

logoutdhaval opened a new pull request, #2353:
URL: https://github.com/apache/fineract/pull/2353

   ## Description
   
   [FINERACT-1634](https://issues.apache.org/jira/browse/FINERACT-1634).
   
   
   ## Checklist
   
   Please make sure these boxes are checked before submitting your pull request - thanks!
   
   - [X] Write the commit message as per https://github.com/apache/fineract/#pull-requests
   
   - [X] Acknowledge that we will not review PRs that are not passing the build _("green")_ - it is your responsibility to get a proposed PR to pass the build, not primarily the project's maintainers.
   
   - [X] Create/update unit or integration tests for verifying the changes made.
   
   - [X] Follow coding conventions at https://cwiki.apache.org/confluence/display/FINERACT/Coding+Conventions.
   
   - [ ] Add required Swagger annotation and update API documentation at fineract-provider/src/main/resources/static/legacy-docs/apiLive.htm with details of any API changes
   
   - [X] Submission is not a "code dump".  (Large changes can be made "in repository" via a branch.  Ask on the developer mailing list for guidance, if required.)
   
   FYI our guidelines for code reviews are at https://cwiki.apache.org/confluence/display/FINERACT/Code+Review+Guide.
   


-- 
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: commits-unsubscribe@fineract.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [fineract] fynmanoj commented on a diff in pull request #2353: FINERACT-1634: Invalid balance after withdrawal correction

Posted by GitBox <gi...@apache.org>.
fynmanoj commented on code in PR #2353:
URL: https://github.com/apache/fineract/pull/2353#discussion_r893661257


##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccount.java:
##########
@@ -980,7 +980,7 @@ protected void recalculateDailyBalances(final Money openingAccountBalance, final
             } else {
                 Money overdraftAmount = Money.zero(this.currency);
                 Money transactionAmount = Money.zero(this.currency);
-                if (transaction.isCredit() || transaction.isAmountRelease()) {
+                if ((transaction.isCredit() || transaction.isAmountRelease()) && !transaction.isReversalTransaction()) {

Review Comment:
   add this condition to the if condition above, no need to add it here  `if (transaction.isReversed() || transaction.isReversalTransaction()) {
                   transaction.zeroBalanceFields(); 
   }`



-- 
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: commits-unsubscribe@fineract.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [fineract] fynmanoj merged pull request #2353: FINERACT-1634: Invalid balance after withdrawal correction

Posted by GitBox <gi...@apache.org>.
fynmanoj merged PR #2353:
URL: https://github.com/apache/fineract/pull/2353


-- 
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: commits-unsubscribe@fineract.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [fineract] fynmanoj commented on a diff in pull request #2353: FINERACT-1634: Invalid balance after withdrawal correction

Posted by GitBox <gi...@apache.org>.
fynmanoj commented on code in PR #2353:
URL: https://github.com/apache/fineract/pull/2353#discussion_r893686157


##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccount.java:
##########
@@ -975,12 +975,12 @@ protected void recalculateDailyBalances(final Money openingAccountBalance, final
 
         boolean isTransactionsModified = false;
         for (final SavingsAccountTransaction transaction : accountTransactionsSorted) {
-            if (transaction.isReversed()) {
+            if (transaction.isReversed() && transaction.isReversalTransaction()) {

Review Comment:
   This should be OR  not AND



-- 
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: commits-unsubscribe@fineract.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org