public void createAccount()

in service/src/main/java/org/apache/fineract/cn/deposit/service/internal/service/helper/AccountingService.java [53:76]


  public void createAccount(final String equityLedger,
                            final String productName,
                            final String customer,
                            final String accountNumber,
                            final String alternativeAccountNumber,
                            final Double balance) {
    try {
      final Ledger ledger = this.ledgerManager.findLedger(equityLedger);
      this.logger.info("Account Found Successfully !!!!!!!!!!!!!!");
      final Account account = new Account();
      account.setIdentifier(accountNumber);
      account.setType(ledger.getType());
      account.setLedger(equityLedger);
      account.setName(productName);
      account.setHolders(new HashSet<>(Lists.newArrayList(customer)));
      account.setBalance(balance != null ? balance : 0.00D);
      account.setAlternativeAccountNumber(alternativeAccountNumber);

      this.ledgerManager.createAccount(account);
      this.logger.info("Account Created Successfully !!!!!!!!!!!!!!");
    } catch (final LedgerNotFoundException lnfex) {
      throw ServiceException.notFound("Ledger {0} not found.", equityLedger);
    }
  }