href / duties

Swiss Online Import Costs Calculator
MIT License
4 stars 1 forks source link

Fix computing threshold for when VAT starts applying #4

Closed matalek closed 1 year ago

matalek commented 1 year ago

As discussed in https://github.com/href/duties/issues/3, we follow the logic described in https://www.post.ch/en/business-solutions/exports-imports-and-customs-clearance/imports/faqs-about-imports-customs-and-vat, i.e. compute the limit for value of goods and compare the value of goods with this limit. Because this approach is not fully compatible with checking whether computed VAT is less than 5 CHF (corner cases are close around the threshold value), we also change the UI to not display confusing messages (e.g. for 64.90 CHF VAT on value of goods would be 5.00 CHF, which is not below 5.00 CHF limit).

href commented 1 year ago

I agree with your changes and reasoning, thank you! I will adjust the wording a little as follows, but otherwise this is great!

Your total value of goods (price + shipping) 0.0 does not exceed 65.0 limit.

I think this should say:

Your total value of goods (price + shippping) is 0.0, which does not exceed the 65.0 limit.

The checks above can be ignored by the way, I fixed them, but that doesn't seem to show up here.