question

dhanaraj avatar image
dhanaraj asked dhanaraj commented

while adding the tax to single line item it's not updated in clover inventory

if ( new_item.getTaxRates() != null) {
                
List<String> newTaxRates=new ArrayList<>();
if ( new_item.getTaxRates() != null) {
for (int i=0; i< new_item.getTaxRates().size();i++) {
newTaxRates.add(new_item.getTaxRates().get(i).getId());

}
}
inventoryConnector.assignTaxRatesToItem(added_item.getId(), newTaxRates);
Inventory
4 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.

dhanaraj avatar image dhanaraj commented ·

above the code tax value not inserted in clover inventory

0 Likes 0 ·
dhanaraj avatar image dhanaraj commented ·

it was working fine previously but its not working now

0 Likes 0 ·
chanel avatar image chanel commented ·

Are you trying to add a taxRate to a `lineItem` or an inventory `item`?

What are you expecting your code to do? What do you see instead?

0 Likes 0 ·
dhanaraj avatar image dhanaraj chanel commented ·

Am trying to add a new item in clover inventory and also update the existing tax in clover inventory

0 Likes 0 ·
zgreathouse avatar image
zgreathouse Deactivated answered dhanaraj commented
In order to update an inventory item's taxAmount you must update the item itself. I am assuming you understand the distinction between an inventory item and a line item with regards to our platform's architecture. If my assumption is incorrect please let me know and I would be happy to break it down for you.
1 comment
10 |2000

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

dhanaraj avatar image dhanaraj commented ·

That's what i did against single line item but it's replicate in clover inventory

0 Likes 0 ·
dhanaraj avatar image
dhanaraj answered
10 |2000

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

Welcome to the
Clover Developer Community