Format currencies

Build and share your cool customized reports built w/ one sql, Chart.js and Lua

Moderator: Renato

Post Reply
kmhil
New MMEX User
Posts: 2
Joined: Fri May 20, 2016 5:14 pm
Are you a spam bot?: No

Format currencies

Post by kmhil »

Hi guys!

I've modified one of the reports I found on GitHub (CreditReport to be exact) for my needs, but I need some help with formating the results.

At first the results where with all decimals and no prefixes but I kinda hardcode it to show them, but don´t know how to formats decimals and commas.

I got this

S/. -3165.88217599999

And I need something like these

S/. -3,165.88 or S/. -3 165.88

Thanks in advance to anyone who can guide me.

Klausen
Attachments
Scotiabank Visa.grm
(1.68 KiB) Downloaded 517 times
Nikolay
MMEX Developer
Posts: 1535
Joined: Sat Dec 06, 2008 2:27 pm
Are you a spam bot?: No
Location: Sankt-Petersburg, Russia

Re: Format currencies

Post by Nikolay »

Nikolay
MMEX Developer
Posts: 1535
Joined: Sat Dec 06, 2008 2:27 pm
Are you a spam bot?: No
Location: Sankt-Petersburg, Russia

Re: Format currencies

Post by Nikolay »

Use JS for formating. In the sample  file the code from line 
<!-- Format numbers -->
kmhil
New MMEX User
Posts: 2
Joined: Fri May 20, 2016 5:14 pm
Are you a spam bot?: No

Re: Format currencies

Post by kmhil »

Not really good with JavaScript but I found a way to format it from SQL.

Thank you very much!
Post Reply