Closed officialmmt closed 4 years ago
Hi, I'm afraid I don't understand. Can you share your code that triggers the error, and the error message 9r stack trace you see? Thanks.
Aha, TR is already in VatRules although it shouldn't be. I misunderstood your bug in upstream, and it's not clear from this bug either.
However, I still don't understand what's the problem where you see HTTP 500.
I just trying to get rate with
$vatRate = new VatCalculator(); $rates = $vatRate->getTaxRateForLocation($code);
it gives 18% vat for turkey and failed with UK
Thanks but please show me the exact code and the error message you see with UK.
The UK rate is tested so that's why I'm interested: https://github.com/spaze/vat-calculator/blob/b51a719545997086c4eb004f261ae75708d2dc70/tests/VatCalculatorTest.php#L266-L272
The VatCalculator
constructor requires VatRates
object: https://github.com/spaze/vat-calculator/blob/b51a719545997086c4eb004f261ae75708d2dc70/src/VatCalculator.php#L34
But as it gives you some result for Turkey, it's probably a typo here.
The Turkey's 18% is wrong unless you add the rules manually by calling addRatesForCountry
, see #8.
Just released a new version 3.4.0 that removes TR from the default VAT config.
I'll close this one, please open a new issue with the code and error message you see when calculating GB rate, see my comment above. Thanks.
Hi, I just trying your package. I got the same problem with "mpociot/vat-calculator" and more. When I try to query the country with divisions sample "United Kingdom", it gives 500 error. But the same query work well with "mpociot/vat-calculator".