question

subodhrai avatar image
subodhrai asked David Marginian Deactivated commented

Tax not applied to the inventory item when apply tax after create tax from our custom app, So how we can achieve this?

1- This is how tax created:-

val taxRate = TaxRate()
taxRate.isDefault = false
taxRate.name = ml + "ml"
taxRate.rate = 0
taxRate.taxAmount = taxAmount

val isCreated = inventoryConnector().createTaxRate2(taxRate)
taxId = isCreated.id


2- This is how tax applying.

val listTaxRates = ArrayList<String>()
inventoryConnector().taxRates.forEach { i ->
    if (taxId == i.id) {
        listTaxRates.add(i.id)
        return@forEach
    }
}
inventoryConnector().assignTaxRatesToItem(
    itemId,
    listTaxRates
)


:- So I want to add tax to the specific inventory item, Suppose we have 5 inventory items so I want to add custom tax(What tax we want to add) to specific inventory item.

:-So at this time tax is created but not applied to the item.

Clover Android SDKInventoryTaxes
8 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.

Are you getting an error? Is itemId a Clover inventory item uuid?

0 Likes 0 ·
subodhrai avatar image subodhrai David Marginian ♦♦ ·

No, not getting any error, and when I applied tax to the inventory item then Tax & Fees automatically save to the Default Tax & Fees, even though before apply tax I saved to the Custom Tax & Fees/No Taxes & Fees in Inventory app.

0 Likes 0 ·

You will need to provide the exact arguments that are being passed to assignTaxRatesToItem (the ids you are passing, etc.).

I applied tax to the inventory item then Tax & Fees automatically save to the Default Tax & Fees, even though before apply tax I saved to the Custom Tax & Fees/No Taxes & Fees in Inventory app.

I don't know what this means.

Did you ever resolve the original question you asked on this very same topic?

https://community.clover.com/questions/27934/comcloversdkv1clientexception-status-code-400-inva.html


0 Likes 0 ·
Show more comments

0 Answers

·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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