public void processDepositAccountOpening()

in service/src/main/java/org/apache/fineract/cn/teller/service/internal/processor/DepositTransactionHandler.java [222:236]


  public void processDepositAccountOpening(final String tellerCode, final TellerTransaction tellerTransaction,
                                            final boolean chargesIncluded) {
    final ProductInstance productInstances =
        this.depositAccountManagementService.findProductInstance(tellerTransaction.getCustomerAccountIdentifier());

    final ProductDefinition productDefinition =
        this.depositAccountManagementService.findProductDefinition(productInstances.getProductIdentifier());

    this.processCashDeposit(tellerCode, tellerTransaction, chargesIncluded);

    if ((tellerTransaction.getAmount().doubleValue() + productInstances.getBalance()) >= productDefinition.getMinimumBalance()) {
      this.depositAccountManagementService.activateProductInstance(tellerTransaction.getCustomerAccountIdentifier());
      this.accountingService.openAccount(tellerTransaction.getCustomerAccountIdentifier());
    }
  }