You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fineract.apache.org by pt...@apache.org on 2021/10/09 00:02:40 UTC

[fineract] branch develop updated: mutiple-withdraw-charges-fineract-1386

This is an automated email from the ASF dual-hosted git repository.

ptuomola pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract.git


The following commit(s) were added to refs/heads/develop by this push:
     new bcdf9df  mutiple-withdraw-charges-fineract-1386
bcdf9df is described below

commit bcdf9df1360bb926d480279985c51fff43b8ca3c
Author: rrpawar96 <rr...@gmail.com>
AuthorDate: Sun Sep 19 12:54:02 2021 +0530

    mutiple-withdraw-charges-fineract-1386
---
 .../portfolio/savings/domain/SavingsAccount.java        | 17 -----------------
 .../savings/domain/SavingsAccountChargeAssembler.java   |  7 -------
 2 files changed, 24 deletions(-)

diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccount.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccount.java
index 86359dd..7446c6c 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccount.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccount.java
@@ -2583,14 +2583,6 @@ public class SavingsAccount extends AbstractPersistableCustom {
             throw new PlatformApiDataValidationException(dataValidationErrors);
         }
 
-        // Only one withdrawal fee is supported per account
-        if (savingsAccountCharge.isWithdrawalFee()) {
-            if (this.isWithDrawalFeeExists()) {
-                baseDataValidator.reset().failWithCodeNoParameterAddedToErrorCode("multiple.withdrawal.fee.per.account.not.supported");
-                throw new PlatformApiDataValidationException(dataValidationErrors);
-            }
-        }
-
         // Only one annual fee is supported per account
         if (savingsAccountCharge.isAnnualFee()) {
             if (this.isAnnualFeeExists()) {
@@ -2619,15 +2611,6 @@ public class SavingsAccount extends AbstractPersistableCustom {
 
     }
 
-    private boolean isWithDrawalFeeExists() {
-        for (SavingsAccountCharge charge : this.charges()) {
-            if (charge.isWithdrawalFee()) {
-                return true;
-            }
-        }
-        return false;
-    }
-
     private boolean isAnnualFeeExists() {
         for (SavingsAccountCharge charge : this.charges()) {
             if (charge.isAnnualFee()) {
diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccountChargeAssembler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccountChargeAssembler.java
index 33203a4..f25315c 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccountChargeAssembler.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccountChargeAssembler.java
@@ -176,13 +176,6 @@ public class SavingsAccountChargeAssembler {
                         .failWithCodeNoParameterAddedToErrorCode("currency.and.charge.currency.not.same");
             }
 
-            if (charge.isWithdrawalFee()) {
-                if (isOneWithdrawalPresent) {
-                    baseDataValidator.reset().failWithCodeNoParameterAddedToErrorCode("multiple.withdrawal.fee.per.account.not.supported");
-                }
-                isOneWithdrawalPresent = true;
-            }
-
             if (charge.isAnnualFee()) {
                 if (isOneAnnualPresent) {
                     baseDataValidator.reset().failWithCodeNoParameterAddedToErrorCode("multiple.annual.fee.per.account.not.supported");