swico / www.swiss-qr-invoice.org

Website for Swiss QR Invoice organization.
https://www.swiss-qr-invoice.org
11 stars 1 forks source link

Rounded to 5 cents in tag /32/ #23

Open europa3000 opened 3 years ago

europa3000 commented 3 years ago

Let's say, we have an amount of 4135.70 CHF, the excl. tax (7.70) would be 3840.02. Now we round this amount to 3840.00 for tag /32/. Can the split be rounded form with the flaw that the validation may output tag /32/ as not valid?

epsitec commented 3 years ago

The intent of tag /32/ was to reflect the real net value, without rounding.

In your example, you would have to specify either /32/7.7 or /32/7.7:3840.02 so that the calculation matches the price to be paid (1.077 × 3840.02 = 4135.70).

If you round the amount before taxes to 3840.00 or keep the exact amount, the VAT will be 295.68 anyways, as the difference is really tiny, and the recipient's software will have to conclude that the total VAT inclusive includes some rounding (0.02). But its VAT will basically be correct nevertheless.

Therefore, in my opinion, rounding should not be a concern.

epsitec commented 3 years ago

See https://github.com/swico/www.swiss-qr-invoice.org/issues/26