ialbert 2024-01-11 14:29:59 +03:00
parent a7c791e61a
commit 7e40208ce7

View file

@ -125,12 +125,13 @@ public class PaymentInstructionOutboundService {
log.debug("all checks passed, accCred.id={}, accDeb.id={}, addressee.id={}, sender.id={}, amount: {}",
accCred.getId(), accDeb.getId(), addressee.getId(), sender.getId(), amount);
String purpose = tcr != null ? "Вывод средств по ТКР " + tcr.getCode() + " ." : "Вывод средств.";
String purpose = tcr != null ? "Возврат средств, свободных от обязательств с ТКР " + tcr.getCode() + " ." : "Вывод средств.";
if (payload.getPaymentPurpose() != null) {
purpose += " " + payload.getPaymentPurpose();
if (!(purpose.endsWith(".") || purpose.endsWith("!") || purpose.endsWith("?") || purpose.endsWith(";"))) {
purpose += ".";
String reqPmtPrpse = payload.getPaymentPurpose();
if (!(reqPmtPrpse.endsWith(".") || reqPmtPrpse.endsWith("!") || reqPmtPrpse.endsWith("?") || reqPmtPrpse.endsWith(";"))) {
reqPmtPrpse += ".";
}
purpose = reqPmtPrpse + " " + purpose;
}
PaymentInstruction pmt = PaymentInstructionBuilderV2.builder(imdgProvider)
.registry(new Registry())