Skip to content
This repository has been archived by the owner on Oct 27, 2024. It is now read-only.

Time machine

Compare
Choose a tag to compare
@spaze spaze released this 13 Jul 00:03

Adds a new parameter (optional) to VatCalculator::calculate(), VatCalculator::calculateNet(), VatCalculator::getTaxRateForLocation(), VatRates::getTaxRateForLocation() which allows you to specify an optional date to use the VAT rate for when calculating the price.

Sounds complicated but this allows to issue invoices when a country has changed its VAT rate and you want to issue an invoice for the period when the previous rate was still used. For example Germany has lowered VAT rates temporarily beginning July 1st (#3), and this allows you to issue invoices for June in July with the previous, and correct, rates.