From bcdf9df1360bb926d480279985c51fff43b8ca3c Mon Sep 17 00:00:00 2001 From: rrpawar96 Date: Sun, 19 Sep 2021 12:54:02 +0530 Subject: [PATCH] mutiple-withdraw-charges-fineract-1386 --- .../savings/domain/SavingsAccount.java | 17 ----------------- .../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 86359dd31..7446c6c76 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 33203a4c3..f25315c1e 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");