Amount format issue for round sums


When the amount is a round sum, e.g. 200, then formatting on the payment part and in the swiss payments code lacks the required decimal places according to the specification, section 2.5.4:

The amount must always be printed with two decimal places

Code references:

  • ch.codeblock.qrinvoice.util.DecimalFormatFactory#createQrCodeAmountFormat

  • ch.codeblock.qrinvoice.util.DecimalFormatFactory#createPrintAmountFormat

Fix must be implemented and a new SPC test data created that contains such a round sum. Furthermore one test must validate on all test data files that written SPC amount format contains the decimal places.

Example payment part attached. ".00" text is what is missing currently in that case.


Your pinned fields
Click on the next to a field label to start pinning.


Laurent Grangier


Claude Gex