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/23 18:38:07 UTC

[GitHub] [fineract] logoutdhaval opened a new pull request, #2379: FINERACT-1645:Invalid Balance after Interest posting with withdrawal fee

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

   ## Description
    [FINERACT-1645](https://issues.apache.org/jira/browse/FINERACT-1645).
   
   
   ## 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 merged pull request #2379: FINERACT-1645:Invalid Balance after Interest posting with withdrawal fee

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


-- 
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 #2379: FINERACT-1645:Invalid Balance after Interest posting with withdrawal fee

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


##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsAccountInterestPostingServiceImpl.java:
##########
@@ -449,7 +449,9 @@ protected void recalculateDailyBalances(final Money openingAccountBalance, final
                 }
 
                 runningBalance = runningBalance.plus(transactionAmount);
-                transaction.updateRunningBalance(runningBalance);
+                if (!transaction.getRunningBalance(transactionAmount.getCurrency()).isEqualTo(transactionAmount)) {

Review Comment:
   how can we compare transaction amount with running balance? what is the logic here?
   



##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/data/SavingsAccountTransactionData.java:
##########
@@ -155,7 +155,7 @@ public boolean isDebit() {
     }
 
     public boolean isWithdrawalFeeAndNotReversed() {
-        return this.transactionType.isWithdrawalFee() && isNotReversed();
+        return this.transactionType.isFeeDeduction() && isNotReversed();

Review Comment:
   is reversal case already handled?



-- 
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] logoutdhaval commented on a diff in pull request #2379: FINERACT-1645:Invalid Balance after Interest posting with withdrawal fee

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


##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/data/SavingsAccountTransactionData.java:
##########
@@ -155,7 +155,7 @@ public boolean isDebit() {
     }
 
     public boolean isWithdrawalFeeAndNotReversed() {
-        return this.transactionType.isWithdrawalFee() && isNotReversed();
+        return this.transactionType.isFeeDeduction() && isNotReversed();

Review Comment:
   yes, that was handled in SavingsAccountTransactionSummaryWrapper.java



-- 
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] logoutdhaval commented on a diff in pull request #2379: FINERACT-1645:Invalid Balance after Interest posting with withdrawal fee

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


##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsAccountInterestPostingServiceImpl.java:
##########
@@ -449,7 +449,9 @@ protected void recalculateDailyBalances(final Money openingAccountBalance, final
                 }
 
                 runningBalance = runningBalance.plus(transactionAmount);
-                transaction.updateRunningBalance(runningBalance);
+                if (!transaction.getRunningBalance(transactionAmount.getCurrency()).isEqualTo(transactionAmount)) {

Review Comment:
   Sorry, forgot to remove this thing.



-- 
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] logoutdhaval closed pull request #2379: FINERACT-1645:Invalid Balance after Interest posting with withdrawal fee

Posted by GitBox <gi...@apache.org>.
logoutdhaval closed pull request #2379: FINERACT-1645:Invalid Balance after Interest posting with withdrawal fee
URL: https://github.com/apache/fineract/pull/2379


-- 
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