# Handling multiple-currencies - advice/comments please

**URL:** <https://www.ruby-forum.com/t/handling-multiple-currencies-advice-comments-please/69330>\
**Category:** Rails\
**Created:** [September 20, 2006, 12:08pm UTC](https://www.ruby-forum.com/t/handling-multiple-currencies-advice-comments-please/69330 "2006-09-20T12:08:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![turnkeytraders](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/ba8739/32.png) [@turnkeytraders](https://www.ruby-forum.com/u/turnkeytraders)\
**Post date:** [September 20, 2006, 12:08pm UTC](https://www.ruby-forum.com/t/handling-multiple-currencies-advice-comments-please/69330/1 "2006-09-20T12:08:22Z")

</div>

Hi all,

I want to create a site which can handle prices in multiple currencies.  
At the moment this is restricted to US Dollars, Euro and Pounds  
Sterling.  
I’m in the UK, so all products would be stored in Pounds Sterling. At  
this point in time there is no need for internationalisation or  
localisation. We’re just interested in letting the user work in their  
native currency.

I’ve seen the dollars and cents plugin, and also the use of aggregation  
to  
create a composite Money class which goes a long way to achieving what I  
might need… Has anyone been here before and got any advice or  
pointers  
for me? - I’m particularly interested in being able to maintain the  
ability to do math operations in the database (for reporting etc.) and  
also handling currency symbols appearing before or after the amount, as  
is  
the case in some currencies.

My current train of thought is to store prices as INTs (in pence  
Sterling)  
and have a table of currencies containing something like this:  
id, name, symbol, symbol\_before (Y or N, N assumes symbol comes after  
value) and sterling\_exchange\_rate.

We would default to pounds sterling and store the currency object in the  
session. A Money class would handle the aggregation and conversion  
issues  
by referencing the currency object in the session.

Does this sound like a sensible plan?

Many thanks in advance,

Matt.
