Package org.mifosplatform.accounting.rule.exception

Examples of org.mifosplatform.accounting.rule.exception.AccountingRuleNotFoundException


            final String sql = "select " + resultSetExtractor.schema() + " and rule.id = ?";

            final Map<Long, AccountingRuleData> extractedData = this.jdbcTemplate.query(sql, resultSetExtractor,
                    new Object[] { accountingRuleId });
            final AccountingRuleData accountingRuleData = extractedData.get(accountingRuleId);
            if (accountingRuleData == null) { throw new AccountingRuleNotFoundException(accountingRuleId); }
            return accountingRuleData;
        } catch (final EmptyResultDataAccessException e) {
            throw new AccountingRuleNotFoundException(accountingRuleId);
        }
    }
View Full Code Here


        this.repository = repository;
    }

    public AccountingRule findOneWithNotFoundDetection(final Long id) {
        final AccountingRule accountingRule = this.repository.findOne(id);
        if (accountingRule == null) { throw new AccountingRuleNotFoundException(id); }
        return accountingRule;
    }
View Full Code Here

            final String referenceNumber = command.stringValueOfParameterNamed(JournalEntryJsonInputParams.REFERENCE_NUMBER.getValue());

            if (accountRuleId != null) {

                final AccountingRule accountingRule = this.accountingRuleRepository.findOne(accountRuleId);
                if (accountingRule == null) { throw new AccountingRuleNotFoundException(accountRuleId); }

                if (accountingRule.getAccountToCredit() == null) {
                    if (journalEntryCommand.getCredits() == null) { throw new JournalEntryInvalidException(
                            GL_JOURNAL_ENTRY_INVALID_REASON.NO_DEBITS_OR_CREDITS, null, null, null); }
                    if (journalEntryCommand.getDebits() != null) {
View Full Code Here

TOP

Related Classes of org.mifosplatform.accounting.rule.exception.AccountingRuleNotFoundException

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.