add udaddrtype so that you can create donation codes

This commit is contained in:
Michael Stapelberg
2020-07-10 21:37:57 +02:00
parent d606b9f795
commit c896ea1025
2 changed files with 20 additions and 13 deletions

View File

@@ -60,7 +60,7 @@ func qrchFromRequest(r *http.Request) *qrbill.QRCH {
Ccy: "CHF",
},
UltmtDbtr: qrbill.Address{
AdrTp: qrbill.AddressTypeCombined,
AdrTp: qrbill.AddressType(ifEmpty(r.Form, "udaddrtype", qrbill.AddressTypeCombined)),
Name: ifEmpty(r.Form, "udname", "Michael Stapelberg"),
StrtNmOrAdrLine1: ifEmpty(r.Form, "udaddr1", "Stauffacherstr 42"),
BldgNbOrAdrLine2: ifEmpty(r.Form, "udaddr2", "8004 Zürich"),