Closed bpolaszek closed 7 years ago
This looks great @bpolaszek, testing this in a few hours. :smiley:
Just amended my commit: sorting periods by date is no longer responsibility of the client, this is now done by the Rates
class.
Thanks @dannyvankooten !
Great work @bpolaszek, thanks a lot!
Hi,
For reasons, I had to find which was the VAT rate for a country on a specific date. jsonvat.com provides this information, but this is currently squeezed by the vat.php library, which only fetches the currently applicable rate.
This PR changes the way rates are fetched (which may introduce a BC break for advanced users, but nothing really new otherwise), so if merged, this may need a bound to a new minor version.
The case of a "future" VAT rate (a future applicable rate already defined) is also handled (cf tests).