license plate of Liechtenstein as country code...
auerswald opened this issue · 3 comments
auerswald commented
FL
is the license plate of Liechtenstein, but not the country code... 🤓
if (in_array($this->getCountry(), ['CH', 'LI'])) {
// ...
}
auerswald commented
same error in:
markus-ksg commented
Please reopen.
The country code of Liechtenstein is indeed 'LI', but the code actually only produced the correct result before the fix (by accident, because 'FL' is no valid country).
https://www.paymentstandards.ch/dam/downloads/ig-qr-bill-en.pdf says: "For invoicing to countries outside Switzerland, including Lichtenstein[sic!], the country code should be printed on the payment section."
I.e. the correct fix would have been to replace the whole
in_array($this->getCountry(), ['CH', 'FL'])
with
`$this->getCountry() === 'CH'
The CombinedAddressTest
and StructuredAddressTest
should also be fixed to expect \nLI-9490 Vaduz
.