question

subodhrai avatar image
subodhrai asked ·

How do I set tax rate in percentage with decimal value such as (18.05%)?

So taxRatePercent is a Double data type and taxRate accepting only Long data type,

so how we can resolve this?

val taxRate = TaxRate()
taxRate.isDefault = false
taxRate.name = ml + "ml"
taxRate.rate = taxRatePercent.toLong().times(100000)
InventoryTaxes
2 comments
10 |2000 characters needed characters left characters exceeded

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

May I have more context for this question? Where are you finding taxRatePercent (what Clover object or interface are you using) and what are you trying to do?

0 Likes 0 ·
subodhrai avatar image subodhrai Richelle Herrli ♦♦ ·

Thanks for reply. I have fixed it.

0 Likes 0 ·

0 Answers

Welcome to the
Clover Developer Community