ialbert 2026-04-29 18:40:50 +03:00
parent 2a8fbad2dc
commit 33298fb391

View file

@ -124,10 +124,12 @@ public class Sdf54Creator {
sDf54.setKpp_deb(kppDeb); sDf54.setKpp_deb(kppDeb);
} }
if (pmt.getDebitLeg_accountId() != null) {
Account accDebAcc = accountImdg.getSingleObjectByID(pmt.getDebitLeg_accountId()); Account accDebAcc = accountImdg.getSingleObjectByID(pmt.getDebitLeg_accountId());
if (accDebAcc == null || !AccountStatus.ACTIVE.equalsByKey(accDebAcc.getStatus())) { if (accDebAcc == null || !AccountStatus.ACTIVE.equalsByKey(accDebAcc.getStatus())) {
log.warn("paymentInstruction[{}].DebitLeg_accountId={} account not exist or not active.", pmt.getId(), pmt.getDebitLeg_accountId()); log.warn("paymentInstruction[{}].DebitLeg_accountId={} account not exist or not active.", pmt.getId(), pmt.getDebitLeg_accountId());
} }
}
BankAccount bnkAcc = bankAccountImdg.getFirstObjectBySQL("accountId = %d".formatted(pmt.getDebitLeg_accountId())); BankAccount bnkAcc = bankAccountImdg.getFirstObjectBySQL("accountId = %d".formatted(pmt.getDebitLeg_accountId()));
if (bnkAcc != null) { if (bnkAcc != null) {
sDf54.setInn_cred(bnkAcc.getTaxpayerIdentificationNumber()); sDf54.setInn_cred(bnkAcc.getTaxpayerIdentificationNumber());