public void testBankDetails(Invoice invoice) throws AxelorException {
    BankDetails bankDetails = partnerService.getDefaultBankDetails(invoice.getPartner());

    if (bankDetails == null) {
      throw new AxelorException(
          String.format(
              I18n.get(IExceptionMessage.PAYMENT_SCHEDULE_2),
              GeneralServiceImpl.EXCEPTION,
              invoice.getPartner().getName()),
          IException.CONFIGURATION_ERROR);
    } else {
      cfonbExportService.testBankDetailsField(bankDetails);
    }
  }
  public boolean isDebitBlocking(Invoice invoice) {

    return blockingService.isDebitBlockingBlocking(invoice.getPartner(), invoice.getCompany());
  }