Fixed setting all account information on KontoverbindungInternation for SEPA money transfer

This commit is contained in:
dankito 2020-05-14 01:39:44 +02:00
parent 593ad2be8e
commit 8bc3f0fe8e
2 changed files with 4 additions and 3 deletions

View File

@ -22,7 +22,7 @@ open class SepaBankTransferBase(
1,
sepaDescriptorUrn,
if (sepaDescriptorUrn.contains("pain.001.003.03", true)) "pain.001.003.03.xml" else "pain.001.001.03.xml",
account.iban ?: "", // TODO: what to do if iban is not set?
account,
debitorBic,
mapOf(
SepaMessageCreator.NumberOfTransactionsKey to "1", // TODO: may someday support more then one transaction per file

View File

@ -7,6 +7,7 @@ import net.dankito.fints.messages.datenelementgruppen.implementierte.Segmentkopf
import net.dankito.fints.messages.datenelementgruppen.implementierte.account.KontoverbindungInternational
import net.dankito.fints.messages.segmente.Segment
import net.dankito.fints.messages.segmente.id.ISegmentId
import net.dankito.fints.model.AccountData
open class SepaSegment(
@ -15,14 +16,14 @@ open class SepaSegment(
segmentVersion: Int,
sepaDescriptorUrn: String,
sepaFileName: String,
iban: String,
account: AccountData,
bic: String,
replacementStrings: Map<String, String>,
messageCreator: ISepaMessageCreator = SepaMessageCreator()
)
: Segment(listOf(
Segmentkopf(segmentId, segmentVersion, segmentNumber),
KontoverbindungInternational(iban, bic, null),
KontoverbindungInternational(account, bic),
object : AlphanumerischesDatenelement(sepaDescriptorUrn, Existenzstatus.Mandatory, 256) { },
SepaMessage(sepaFileName, replacementStrings, messageCreator)
))