subodhrai avatar image
subodhrai asked subodhrai commented

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 = ml + "ml"
taxRate.rate = taxRatePercent.toLong().times(100000)
10 |2000

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

Richelle Herrli avatar image Richelle Herrli ♦♦ commented ·

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 ♦♦ commented ·

Thanks for reply. I have fixed it.

0 Likes 0 ·

0 Answers

Welcome to the
Clover Developer Community