claudep / swiss-qr-bill

A Python library to generate Swiss QR-bill payment slips
MIT License
97 stars 39 forks source link

newline #48

Closed AntonMezger closed 3 years ago

AntonMezger commented 3 years ago

Hi,

super project, we will integrate in our access database in order to generate qrr bills.

One problem arises from the fact that our receipt name is very long (an association) and we would like to know how we could split the name in two lines. I attach our example

bill

best regards and stay healthy

AntonMezger commented 3 years ago

perhaps a possibility to solve this problem, is to add a line3 so that we could have the following

i.e. instead of 👍 creditor={'name': 'SGED Schweiz. Ges. für Endokrinologie u.', 'line1': 'Diabetologie', 'line2': 'Rütistrasse 3A, CH-5400 Baden', 'country': 'CH',}

creditor={'name': 'SGED Schweiz. Ges. für Endokrinologie u.', 'line1': 'Diabetologie', 'line2': 'Rütistrasse 3A', 'line3'= CH-5400 Baden', 'country': 'CH',}

and then why not: line4, line5?

thank you for bothering

best regards

Anton

claudep commented 3 years ago

Are you able to test the current master branch? Otherwise, I plan to release a new version rather soon.

AntonMezger commented 3 years ago

I tested it and it works fine. You did a great job, thank you

However addresses can be quite complicated and long. (ex. 'street': 'Solinas Department of Molecular and Clinical Medicine Wallenberglab Su Sahlgrenska')

would it be possible that one could split this with a newline, so that we also get multiple line?

best regards

claudep commented 3 years ago

It should also work with long addresses, did you try it?

AntonMezger commented 3 years ago

yes, but we hit a limit of 70 characters and an address should be cut at specific points. by the way, it should be possible to obtain an address for foreign countries. i.e when we send a bill to sweden, the country code would be SE, but now the code limits to Switzerland and Liechtenstein.

debtor={'name': 'Monsieur Ph.D. xyz', 'street': 'Solinas Department of Molecular and Clinical Medicine Wallenberglab Su Sahlgrenska', 'house_num': '61', 'pcode': 'S-41345', 'city': 'Göteborg/Sweden', 'country': 'CH',}