Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Fixed currencies

#45

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.

Reported by Virgil Dupras · July 29th, 2009 @ 04:21 PM

State: fixed
Milestone: v1.5.7
Assigned to: Virgil Dupras Virgil Dupras

Activity

  1. Virgil Dupras
    Virgil Dupras
    • Assigned user set to Virgil Dupras
    • Milestone set to v1.5.7

    July 29th, 2009 @ 05:36 PM

  2. Virgil Dupras
    Virgil Dupras
    • 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.

    July 30th, 2009 @ 03:19 PM

  3. Virgil Dupras
    Virgil Dupras
    • State changed from new to port

    (from [31]) [#45 Fixed currencies 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.

    July 30th, 2009 @ 04:30 PM

  4. Virgil Dupras
    Virgil Dupras
    • State changed from port to fixed

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

    July 30th, 2009 @ 04:55 PM

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.