schoero / swissqrbill

Swiss QR Bill generation in Node.js and browsers
MIT License
156 stars 29 forks source link

Decimal operator for Germany, France and Swiss market #370

Closed ashish20790 closed 2 years ago

ashish20790 commented 2 years ago

In Germany, France and Swiss market we use "," as a decimal seperator. So when we update the language code to either DE, FR or IT then the decimal separator in amount values should be replaced with "," but it still shows decimal seperator as ".". And since Amount is expecting numeric values so we can't pass "," as a decimal seperator.

schoero commented 2 years ago

Unfortunately the specifications (page 17 section 3.5.3) and the style guide (page 9 Amount section) do not allow a "," as a decimal separator.

In addition to that, if the data type would be changed to string, we would have to additionally check if the string only contains numbers or a "," and then parse it to be able to encode it in the QR-Code, which would make it unnecessary complex.

schoero commented 2 years ago

Closing as this would violate the specifications.

ashish20790 commented 2 years ago

Hello @schoero ,

Thanks for your update, i forgot to reply you in time.