Search in sources :

Example 1 with GenericIdentification3

use of com.axelor.apps.bankpayment.xsd.sepa.pain_008_001_01.GenericIdentification3 in project axelor-open-suite by axelor.

the class BankOrderFile00100102Service 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(FinancialInstitutionIdentification5Choice finInstnId, Bank bank) {
    if (bankOrderFileFormat.getIbanOnly() || bank == null || Strings.isNullOrEmpty(bank.getCode())) {
        GenericIdentification3 genId = new GenericIdentification3();
        genId.setId(BIC_NOT_PROVIDED);
        finInstnId.setPrtryId(genId);
    } else {
        finInstnId.setBIC(bank.getCode());
    }
}
Also used : GenericIdentification3(com.axelor.apps.bankpayment.xsd.sepa.pain_001_001_02.GenericIdentification3)

Example 2 with GenericIdentification3

use of com.axelor.apps.bankpayment.xsd.sepa.pain_008_001_01.GenericIdentification3 in project axelor-open-suite by axelor.

the class BankOrderFile00800101Service 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(FinancialInstitutionIdentification5Choice finInstnId, Bank bank) {
    if (bankOrderFileFormat.getIbanOnly() || bank == null || Strings.isNullOrEmpty(bank.getCode())) {
        GenericIdentification3 genId = new GenericIdentification3();
        genId.setId(BIC_NOT_PROVIDED);
        finInstnId.setPrtryId(genId);
    } else {
        finInstnId.setBIC(bank.getCode());
    }
}
Also used : GenericIdentification3(com.axelor.apps.bankpayment.xsd.sepa.pain_008_001_01.GenericIdentification3)

Aggregations

GenericIdentification3 (com.axelor.apps.bankpayment.xsd.sepa.pain_001_001_02.GenericIdentification3)1 GenericIdentification3 (com.axelor.apps.bankpayment.xsd.sepa.pain_008_001_01.GenericIdentification3)1