Search in sources :

Example 1 with GenericFinancialIdentification1

use of com.axelor.apps.bankpayment.xsd.sepa.pain_001_001_03.GenericFinancialIdentification1 in project axelor-open-suite by axelor.

the class BankOrderFile00100103Service method fillBic.

/**
 * Method to fill the BIC information. If the BIC is not provided or in Iban only mode, we put
 * NOTPROVIDED value. In this case, the bank ignore the BIC and use the Iban only.
 *
 * @param finInstnId The financial instituation identification tag of the generated file.
 * @param bank The bank from which the BIC is get.
 */
protected void fillBic(FinancialInstitutionIdentification7 finInstnId, Bank bank) {
    if (bankOrderFileFormat.getIbanOnly() || bank == null || Strings.isNullOrEmpty(bank.getCode())) {
        GenericFinancialIdentification1 genFinId = new GenericFinancialIdentification1();
        genFinId.setId(BIC_NOT_PROVIDED);
        finInstnId.setOthr(genFinId);
    } else {
        finInstnId.setBIC(bank.getCode());
    }
}
Also used : GenericFinancialIdentification1(com.axelor.apps.bankpayment.xsd.sepa.pain_001_001_03.GenericFinancialIdentification1)

Example 2 with GenericFinancialIdentification1

use of com.axelor.apps.bankpayment.xsd.sepa.pain_001_001_03.GenericFinancialIdentification1 in project axelor-open-suite by axelor.

the class BankOrderFile00800102Service method fillBic.

/**
 * Method to fill the BIC information. If the BIC is not provided or in Iban only mode, we put
 * NOTPROVIDED value. In this case, the bank ignore the BIC and use the Iban only.
 *
 * @param finInstnId The financial instituation identification tag of the generated file.
 * @param bank The bank from which the BIC is get.
 */
protected void fillBic(FinancialInstitutionIdentification7 finInstnId, Bank bank) {
    if (bankOrderFileFormat.getIbanOnly() || bank == null || Strings.isNullOrEmpty(bank.getCode())) {
        GenericFinancialIdentification1 genFinId = new GenericFinancialIdentification1();
        genFinId.setId(BIC_NOT_PROVIDED);
        finInstnId.setOthr(genFinId);
    } else {
        finInstnId.setBIC(bank.getCode());
    }
}
Also used : GenericFinancialIdentification1(com.axelor.apps.bankpayment.xsd.sepa.pain_008_001_02.GenericFinancialIdentification1)

Aggregations

GenericFinancialIdentification1 (com.axelor.apps.bankpayment.xsd.sepa.pain_001_001_03.GenericFinancialIdentification1)1 GenericFinancialIdentification1 (com.axelor.apps.bankpayment.xsd.sepa.pain_008_001_02.GenericFinancialIdentification1)1