Tax details are generated for regions in Spain with tax exemptions.
lfalck opened this issue ยท 2 comments
lfalck commented
Hi, great project! ๐
I think i found an issue. For regions in Spain with tax exemption, rate and total are correctly calculated, but the tax details still contain the country tax:
SalesTax.getAmountWithSalesTax("ES", "GC", 1000.00)
.then((amountWithTax) => {
console.log(amountWithTax);
});
{
type: 'vat',
rate: 0,
price: 1000,
total: 1000,
area: 'worldwide',
exchange: 'consumer',
charge: {
direct: true,
reverse: false
},
details: [{
type: 'vat',
rate: 0.21,
amount: 210
}
]
}
valeriansaliou commented
Hello there!
Given that the area returned is worldwide
, you may not have set your legal tax origin (ie. your company location), thus VATMOSS is not being applied in calculations.
lfalck commented
Ah sorry, I should have done that in the example. Results are the same though:
SalesTax.setTaxOriginCountry("FR");
SalesTax.getAmountWithSalesTax("ES", "GC", 1000.00)
.then((amountWithTax) => {
console.log(amountWithTax);
});
{
type: 'vat',
rate: 0,
price: 1000,
total: 1000,
area: 'regional',
exchange: 'consumer',
charge: {
direct: true,
reverse: false
},
details: [{
type: 'vat',
rate: 0.21,
amount: 210
}
]
}