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 2021/11/13 06:55:46 UTC

[GitHub] [fineract] rrpawar96 commented on a change in pull request #1969: FINERACT-1390:Withdrawal Charges as per PaymentType

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



##########
File path: fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccount.java
##########
@@ -1076,16 +1076,19 @@ private void payWithdrawalFee(final BigDecimal transactionAmount, final LocalDat
         for (SavingsAccountCharge charge : this.charges()) {
 
             if (charge.isWithdrawalFee() && charge.isActive()) {
-                if (charge.getFreeWithdrawalCount() == null) {
-                    charge.setFreeWithdrawalCount(0);
-                }
 
-                if (charge.isEnableFreeWithdrawal()) {
-                    resetFreeChargeDaysCount(charge, transactionAmount, transactionDate, user);
+                if (paymentDetail.getPaymentType().getPaymentName().equals(charge.getCharge().getPaymentType().getPaymentName())) {

Review comment:
       The logic of this PR is to allow withdrawal transactions by checking whether the payment type assigned to the charge is equal to the payment Type of the withdrawal transaction.




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