German VAT changes due to COVID-19
igeligel opened this issue · 15 comments
Because of COVID-19 Germany's VAT will change from 1st of July (I guess +02:00 timezone) to the end of the year (2020):
- from 19% to 16%
- reduced rate from 7% to 5%
Source: dpa - "Germany to spend 130 billion euros on virus stimulus package"
Do not know if there is any way this can be supported.
Thanks, we may update it right now then. Can you please PR? We do not support reduced VAT rates through the library, so please only adjust the main VAT rate.
The problem is that it just gets live around the 1st of July. The current tax rate is still 19%. Any way to supply the sale date of something to the library?
For now, it's not possible to override it. Best thing to do is to submit the PR by the end of June / 1st of July, I'll immediately merge it and release an update.
Okay, here's my idea on how to cope w/ such changes. As the library is quite recent (I think I released it in 2017), there were not many VAT changes worldwide since then.
I'll implement a smooth VAT update scheduling system that's time-dependant, working as such: in the main VAT JSON object, VAT changes can be scheduled (depends on Date.now(), based on a “history” object where future VAT rate is updated in the main object, and previous VAT rate is added to a “history” object). This lets the library pick the correct VAT rate, without requiring an NPM update at the exact time of the VAT rate change. The library would still need to be updated in advance as to schedule the VAT change.
Sounds better this way? I'll try working on it this evening. Once done, you'll be able to swap Germany's main VAT rate to the new one, and move the current (old) VAT rate in an "history" object that would hold a "not_valid_after_date" variable with the threshold date set to 1st of July, midnight.
So this will generate 2 releases?
One end of june and one end of december?
No; it'll automatically use the correct / updated VAT rate whenever this comes into law.
ahh cool... so at runtime 👍
Implemented! Adding more unit tests, and releasing on NPM.
Some more details on how it works: https://github.com/valeriansaliou/node-sales-tax#what-happens-if-a-country-or-state-schedules-a-tax-rate-change
Can multiple timeframes be defined?
for example de german vat will switch back after 6 month.
Yes, but for now it stops iterating on the first 'before' match w/o comparing the lowest match in date. Keeping this simple for now.
Fair enough, implement this now.
Ok added. See 3713fba
I still need to change the VAT rate selection algorithm as it does not pick up the lowest 'before' date match.
2.1.0
released on NPM, with support for multiple sales tax updates.
AWESOME!!!