colombian peso to usd returns 0

27 views
Skip to first unread message

Anu D

unread,
Nov 21, 2018, 2:18:27 PM11/21/18
to geoPlugin
Hello geoPlugin, I am trying to do a conversion for Colombian peso to USD and is returning 0 in geoplugin Currency Converter instead of 0.00031.
Can you please take a look. 

Regards,
Anu

geoPlugin Support

unread,
Nov 21, 2018, 2:28:36 PM11/21/18
to geop...@googlegroups.com
Hi Anu,
Ideed, this is an issue - we round down the conversion to 2 decimal
places so that people can directly output the amount in their scripts
without rounding themselves (esp web apps).

What you raise is a very valid point and one we need to address. If we
simply output the raw conversion (that can have 12 decimal places), that
could mess up a lot of apps and websites relying on rounded figures.
Then again, in these types of currency cases, accuracy is important. So
how to please both camps? (open for suggestions!)

I'll raise this as a priority point to discuss in the next internal
meeting, but off the top of my head, there are two viable possibilites:
1. If converted amount is 0.00 (given that amount is not 0), keep goign
in decimal points until 2 clear figures non-zero emerge, eg 0.00012
2. Provide another variable in the output, say to_amount_raw (with all
the decimal places shown

or both 1+2.
We can't simply output raw converted amount because like I said, this
would make many people unhappy. Option 2 would neither solve our
Javascript API output that provides a function to display as a real
currency value on a web page (so for that, option #2 would server no
purpose)

You see the dilemma? Of course, we created this by rounding to 2 decimal
places, but once done, we have to be very careful on how to proceed
because this type of case is quite specific and a minority case. Not
that it doesn't warrant attention!

How are you calling the webservice for currency conversion, so I can
better see how this affects your case? That will at least help, although
our solution in the end will not be case-specific, but adress the
problem for most people hitting this case.


Kind regards,
Andy
> --
> You received this message because you are subscribed to the Google
> Groups "geoPlugin" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to geoplugin+...@googlegroups.com.
> To post to this group, send email to geop...@googlegroups.com.
> Visit this group at https://groups.google.com/group/geoplugin.
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages