switch to structured address throughout (for QR-bill 2.3)

This commit is contained in:
Michael Stapelberg
2025-10-25 10:46:35 +02:00
parent c9cd171d6f
commit 4b488515eb
2 changed files with 15 additions and 11 deletions

View File

@@ -59,12 +59,12 @@ func qrchFromRequest(r *http.Request) *qrbill.QRCH {
Ccy: "CHF",
},
UltmtDbtr: qrbill.Address{
AdrTp: qrbill.AddressType(ifEmpty(r.Form, "udaddrtype", string(qrbill.AddressTypeCombined))),
AdrTp: qrbill.AddressType(ifEmpty(r.Form, "udaddrtype", string(qrbill.AddressTypeStructured))),
Name: ifEmpty(r.Form, "udname", "Michael Stapelberg"),
StrtNmOrAdrLine1: ifEmpty(r.Form, "udaddr1", "Stauffacherstr 42"),
BldgNbOrAdrLine2: ifEmpty(r.Form, "udaddr2", "8004 Zürich"),
PstCd: ifEmpty(r.Form, "udpost", ""),
TwnNm: ifEmpty(r.Form, "udcity", ""),
StrtNmOrAdrLine1: ifEmpty(r.Form, "udaddr1", "Stauffacherstr"),
BldgNbOrAdrLine2: ifEmpty(r.Form, "udaddr2", "42"),
PstCd: ifEmpty(r.Form, "udpost", "8004"),
TwnNm: ifEmpty(r.Form, "udcity", "Zürich"),
Ctry: ifEmpty(r.Form, "udcountry", "CH"),
},
RmtInf: qrbill.QRCHRmtInf{