question

Alan avatar image
Alan asked sam Deactivated commented

tax_rate_items association API on an item with defaultTaxRates set to true

I'm associating tax rates to items via the tax_rate_items API.
If I associate a non-default tax rate to an item that has defaultTaxRates=True, the tax_rate_items api responds with success, but the dashboard and performing a GET on the item shows that the default tax rate is still the only tax rate applied. However, if I send a POST to the item with:
{defaultTaxRates=false}
the item suddenly has the tax rate I originally sent in the association API (without having to send it again).

There's a couple of strange things going on, I think the main problem is that the association api isn't automatically setting the defaultTaxRates=false flag.

TaxesAuth
2 comments
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Alan avatar image Alan commented ·

I'm working around it by creating items with defaultTaxRates set to false, then associating the taxRates I want. I've noticed, when I do this via the API, the little grey box that shows which taxRates are applied to the item aren't appearing until I open the dropdown or save the item via the dashboard.

0 Likes 0 ·
sam avatar image sam Alan commented ·

Thanks for sharing this with us Alan. We are aware of defaultTaxRates preventing changes to the taxRates and requires manually setting it to false, but we will discuss whether this is the best behavior. As for the dropdown not updating correctly, we will get on a fix for that.

1 Like 1 ·

0 Answers

Welcome to the
Clover Developer Community