sdf54 swift_int

This commit is contained in:
ialbert 2024-05-29 12:34:46 +03:00
parent e0eebea890
commit 16c0693b88

View file

@ -119,7 +119,8 @@ public class Sdf54Creator {
log.warn("Bank account not found for DebitLeg_accountId={}", paymentInstruction.getDebitLeg_accountId());
}
sDf54.setDoc_Num(String.valueOf(nextDocNum()));
BankAccount prcBankAcc = bankAccountImdg.getFirstObjectBySQL("companyId = %d".formatted(Sender.Prc.getId()));
BankAccount prcBankAcc = bankAccountImdg.getFirstObjectBySQL("companyId = %d and currency = '%s'"
.formatted(Sender.Prc.getId(), paymentInstruction.getCreditLeg_currencyCode()));
if (prcBankAcc != null) {
sDf54.setSwift_int(prcBankAcc.getSwiftCode());
}