rrpawar96 commented on a change in pull request #1940:
URL: https://github.com/apache/fineract/pull/1940#discussion_r743399090



##########
File path: 
fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccount.java
##########
@@ -1066,15 +1070,98 @@ public BigDecimal calculateWithdrawalFee(final 
BigDecimal transactionAmount) {
         return result;
     }
 
-    private void payWithdrawalFee(final BigDecimal transactionAmount, final 
LocalDate transactionDate, final AppUser user) {
+    private void payWithdrawalFee(final BigDecimal transactionAmount, final 
LocalDate transactionDate, final AppUser user,
+            final PaymentDetail paymentDetail) {
+
         for (SavingsAccountCharge charge : this.charges()) {
+
             if (charge.isWithdrawalFee() && charge.isActive()) {
-                charge.updateWithdralFeeAmount(transactionAmount);
-                this.payCharge(charge, 
charge.getAmountOutstanding(this.getCurrency()), transactionDate, user);
+                if (charge.getFreeWithdrawalCount() == null) {
+                    charge.setFreeWithdrawalCount(0);
+                }
+
+                if (charge.isEnableFreeWithdrawal()) {
+                    resetFreeChargeDaysCount(charge, transactionAmount, 
transactionDate, user);

Review comment:
       @ptuomola, Yes, Thanks for pointing this out, I am testing it again with 
different conditions, resolving at soonest, sorry for getting back late.




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