decimal metric (franch)

Questionsdecimal metric (franch)
Cristian Engelmann asked 4 years ago

the decimal in my country is ',' and your country is '.'
and the thoudsands is '.' and your country is ','.

how can I to convert?
I use:
$col = array();
$col["title"] = "<center>Valor<br>Costo</center>";
$col["name"] = "valorcosto";
$col["width"] = "10";
$col["align"] = "right"; // this column is not editable
$col["editable"] = true;
$col["formatter"] = "currency";
$col["formatoptions"] = array("prefix" => "$","suffix" => '',"thousandsSeparator" => ".","decimalSeparator" => ",","decimalPlaces" => '2');
$col["search"] = false; // this column is not searchable
$cols[] = $col;

but the information is Ex. $241,5 and the show me $24.1.5

Thank you

2 Answers
Abu Ghufran answered 4 years ago

Your formatoptions looks fine except:

"decimalPlaces" => '2')

should be:

"decimalPlaces" => 2)

(without quotes)

Cristian Engelmann answered 4 years ago

Thank you again

Your Answer

15 + 17 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.

How useful was this discussion?

Click on a star to rate it!

Average rating / 5. Vote count:

We are sorry that this post was not useful for you!

Let us improve this post!