cancel
Showing results for 
Search instead for 
Did you mean: 

two decimal point

Former Member
0 Kudos

Hi all,

I have the below code and it will count the tax amount.

I will like to change to 2 decimal point. What should I add in the code?

Local StringVar taxBasis;

Local StringVar Currency := {MM020_CURRENCY_CODES.MM020_SYMBOL};

Local StringVar TaxRate;

if {ER207_INVOICE_DTL_TAXES.ER207_UNIT_CHRG_FC} > 0 then

If {ER207_INVOICE_DTL_TAXES.ER207_TAX_BASIS} = "A" Then

    TaxRate := totext(({ER207_INVOICE_DTL_TAXES.ER207_UNIT_CHRG_FC} * 100), 4) & "%"

  Else

    TaxRate := Currency & totext({ER207_INVOICE_DTL_TAXES.ER207_UNIT_CHRG_FC}, 4);

  if DistinctCount({ER207_INVOICE_DTL_TAXES.ER207_SEQ_NBR}, {@Resource Group}) > 1 then

  "Multi"

  else

    TaxRate;

Thanks!

Accepted Solutions (1)

Accepted Solutions (1)

abhilash_kumar
Active Contributor
0 Kudos

Hi Mavis,

The if-else should be:

  TaxRate := totext(({ER207_INVOICE_DTL_TAXES.ER207_UNIT_CHRG_FC} * 100), 2) & "%"

  Else

    TaxRate := Currency & totext({ER207_INVOICE_DTL_TAXES.ER207_UNIT_CHRG_FC}, 2);

-Abhilash

Former Member
0 Kudos

Hi Abhilash,

Thanks. It works!

Answers (0)