Package org.mifosplatform.portfolio.savings.exception

Examples of org.mifosplatform.portfolio.savings.exception.InsufficientAccountBalanceException


            final BigDecimal withdrawalFee = null;
            // deal with potential minRequiredBalance and
            // enforceMinRequiredBalance
            if (!isWithdrawBalance && this.minRequiredBalance != null && this.enforceMinRequiredBalance && transaction.isWithdrawal()) {
                if (runningBalance.minus(this.minRequiredBalance).isLessThanZero()) { throw new InsufficientAccountBalanceException(
                        "transactionAmount", getAccountBalance(), withdrawalFee, transactionAmount); }
            }

            if (runningBalance.isLessThanZero()) {
                Money limit = runningBalance.zero();
                if (this.allowOverdraft) {
                    if (this.overdraftLimit != null) {
                        limit = limit.plus(this.overdraftLimit);
                    }
                }
                if (limit.plus(runningBalance).isLessThanZero()) { throw new InsufficientAccountBalanceException("transactionAmount",
                        getAccountBalance(), withdrawalFee, transactionAmount); }
            }
        }
    }
View Full Code Here

TOP

Related Classes of org.mifosplatform.portfolio.savings.exception.InsufficientAccountBalanceException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.