Closed mazocode closed 5 years ago
Hi @coboluxx ,
page 25, description of the field QRCH+CdtrInf++IBAN
, from the official specs reads like:
Fixed length: 21 alphanumeric characters, only IBANs with CH or LI country code permitted
That's why this check was implemented.
Okay, thanks! Probably I haven't understood the meaning of this code yet. I read on again ;-)
From my understanding (and as German I'm also not 100% firm with the Swiss law) the code has to be printed on every invoice a Swiss company prints. I assume that each Swiss company has to have an Swiss or Liechtenstein bank account and thus only CH or LI codes have to be printed on to the invoices.
That's why I thought (as German ;) it probably has a wide adoption within Switzerland and would be useful for paying invoices received from other countries too. But it looks like this is useful within Switzerland only.
Type of issue
[ ] Bug
[X] Question (e.g. about handling/usage)
[ ] Request for new feature/improvement
Expected Behavior
Valid IBAN accepted
Current Behavior
if (!iban.StartsWith("CH") && !iban.StartsWith("LI")) throw new SwissQrCodeIbanException("The IBAN must start with \"CH\" or \"LI\".");
Possible Solution (optional)
Is this part of the specs? If no, why is this code in here?
Steps to Reproduce (for bugs)
Your Environment