private void verifyAccount()

in service/src/main/java/org/apache/fineract/cn/payroll/service/rest/PayrollDistributionRestController.java [153:161]


  private void verifyAccount(final String accountIdentifier) {
    final Account account = this.accountingAdaptor.findAccount(accountIdentifier).orElseThrow(
        () -> ServiceException.conflict("Account {0} not found.")
    );

    if (!account.getState().equals(Account.State.OPEN.name())) {
      throw ServiceException.conflict("Account {0} must be open.", accountIdentifier);
    }
  }