Skip to content

Linebreak after EPD in SwissQRCode #399

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
RamonaFrickCH opened this issue May 9, 2022 Discussed in #398 · 3 comments · Fixed by #411
Closed

Linebreak after EPD in SwissQRCode #399

RamonaFrickCH opened this issue May 9, 2022 Discussed in #398 · 3 comments · Fixed by #411

Comments

@RamonaFrickCH
Copy link
Contributor

Discussed in #398

Originally posted by RamonaFrickCH May 9, 2022
In Version 1.3.7
Wrote follow:
[Bugfix] Fixed missing linebreak when "Bill information" in SwissQRCode is empty

But on my QRCode information. I have always a linebreak. I use de Version 1.4.1 and I updated to 1.4.3 and in both version have a linebreak.
Why? What I doing wrong? I have unstructureMessage with "Steuern 2021" and BillInformation is Null. After EPD should not be a line break.

RISC-5037

YYQRCODE RPX BOTTOM_ca6754be9f374c8697543f7ad32dd1e7

@feis1
Copy link

feis1 commented May 17, 2022

I just came across the same issue.
The fix #216 was correct back then. But in the meantime the definition of this field StrdBkgInf changed from optional to additional. That means it must only be delivered if the element is not
empty.
This can be looked up in the following documents:
Current standard: https://www.paymentstandards.ch/dam/downloads/ig-qr-bill-en.pdf
Changes from version 2.1 to 2.2: https://www.paymentstandards.ch/dam/downloads/documentation-of-changes-2.2-en.pdf

@codebude: There is a new bug, because a line break is currently always inserted after BillInformation. But this is only allowed if the field actually contains data. Please fix this, thank you.

@RamonaFrickCH
Copy link
Contributor Author

In de Class PayloadGenerator.cs
Line 1142 Please fix the Bug #399

// #399 - If BillInformation is empty, insert no linebreak
SwissQrCodePayload += (!string.IsNullOrEmpty(additionalInformation.BillInformation) ? additionalInformation.BillInformation + br : string.Empty); //StrdBkgInf

RamonaFrickCH added a commit to RamonaFrickCH/QRCoder that referenced this issue Jul 25, 2022
Bug codebude#399 If BillInformation is empty, insert no linebreak
@RamonaFrickCH RamonaFrickCH mentioned this issue Jul 25, 2022
1 task
@codebude
Copy link
Owner

Hi @RamonaFrickCH , hi @feis1 thanks for your valuable input and sorry for my really slow response time. I merged the bugfix and will release it soon with QRCoder 1.5.0.

I've seen that meanwhile the Swiss Payment Standard version 2.3 was released. Are you aware of any other breaking changes in 2.3 that might require bugfixes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants