1- I want to set default tax rate false from our app. As below code mentioned which I have implemented to achieve this.
val item = Item() item.id = inventoryItem.id item.defaultTaxRates=false } inventoryConnector().updateItem(item)
1- I want to set default tax rate false from our app. As below code mentioned which I have implemented to achieve this.
val item = Item() item.id = inventoryItem.id item.defaultTaxRates=false } inventoryConnector().updateItem(item)
You are setting defaultTaxRates to false on item but updating item2 maybe that is the problem? If not, then please try to do a bit of investigation on your end. If you retrieve the item is defaultTaxRates set properly? Etc.
Thanks for your reply,
I have updated please re-check.
Thanks for updating your code. You don't have a valid Item there, which I am guessing is the issue. Why don't you retrieve the item, and then update it? This may not be the best example but take a look at - https://github.com/clover/clover-android-sdk/blob/master/clover-android-sdk-examples/src/main/java/com/clover/android/sdk/examples/InventoryTestActivity.java. Note how the Item() calls are wrapped in a try/catch and I am guessing you will see that you are getting an exception. You may also want to consider using the version of the updateItem call that takes a callback.
1 Person is following this question.