sdf54 C_acc_deb/Doc_Date/Value_date fix

This commit is contained in:
ialbert 2024-05-13 16:22:07 +03:00
parent 23604146f8
commit 07e78d6a50

View file

@ -1,6 +1,7 @@
package ru.spcex.clearing.service;
import java.time.Instant;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.util.Map;
import org.slf4j.Logger;
@ -118,13 +119,14 @@ public class Sdf54Creator {
if (prcBankAcc != null) {
sDf54.setSwift_int(prcBankAcc.getSwiftCode());
}
sDf54.setDoc_Date(null);
sDf54.setValue_date(null);
String today = payDateFormatter.format(LocalDate.now());
sDf54.setDoc_Date(today);
sDf54.setValue_date(today);
sDf54.setAcc_kr_1(paymentInstruction.getDebitLeg_account());
{
Account prcCorrAcc = accountImdg.getFirstObjectBySQL("companyId=%d and accountType = '%s' and status = '%s'"
.formatted(Sender.Prc.getId(), AccountType.Corr.getKey(), Status.Active.getKey()));
.formatted(Sender.Prc.getId(), AccountType.Bank.getKey(), Status.Active.getKey()));
if (prcCorrAcc == null) {
log.warn("Account for PRC CORR not found");
} else {