#45 ✓fixed
Virgil Dupras

Fixed currencies

Reported by Virgil Dupras | July 29th, 2009 @ 04:21 PM | in v1.5.7 (closed)

Some currencies, like XPF, are fixed to other currencies. Fetching rates for them is useless. Moreover, in the case of XPF, someone made a mistake in the decimal places and the CAD <--> XPF rates is 100 times lower than it should be. Having a fixed currency type would help being shielded from that kind of glitch.

Comments and changes to this ticket

  • Virgil Dupras

    Virgil Dupras July 29th, 2009 @ 05:36 PM

    • Assigned user set to “Virgil Dupras”
    • Milestone set to v1.5.7
  • Virgil Dupras

    Virgil Dupras July 30th, 2009 @ 03:19 PM

    • Tag changed from task to bug

    Hum, ok, I'm stupid. This is a huge BUG! in convert_amount, if the conversion takes place between amounts with a different exponent, the result will be 10 or 100 times bigger or smaller than what it should be.

  • Virgil Dupras

    Virgil Dupras July 30th, 2009 @ 04:30 PM

    • State changed from “new” to “port”

    (from [31]) [#45 state:port] Fixed convert_amount() so it takes currency.exponent into account. It was done by removing the optimization that was in place in convert_amount that bypassed the internal value conversion system. Also, the Amount class now stores its float value so that it doesn't have to constantly do the maths every time amount.value is called.

  • Virgil Dupras

    Virgil Dupras July 30th, 2009 @ 04:55 PM

    • State changed from “port” to “fixed”

    (from [32]) [#45 state:fixed] Ported [31] to the v1.5 branch.

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Shared Ticket Bins

People watching this ticket


Referenced by