[weboob] [PATCH 2/2] CrAgr: Fixed the cents calculation.

xavier at tuxfamily.org xavier at tuxfamily.org
Sat Feb 26 17:26:05 CET 2011


From: Xavier G <xavier at tuxfamily.org>


Signed-off-by: Xavier G <xavier at tuxfamily.org>
---
 weboob/backends/cragr/browser.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/weboob/backends/cragr/browser.py b/weboob/backends/cragr/browser.py
index bb31fc5..0e8fcdf 100644
--- a/weboob/backends/cragr/browser.py
+++ b/weboob/backends/cragr/browser.py
@@ -134,7 +134,7 @@ class Cragr(BaseBrowser):
 
         # separate euros from cents
         amount_euros = int(amount)
-        amount_cents = int((amount - amount_euros) * 100)
+        amount_cents = int((amount * 100) - (amount_euros * 100))
 
         # let's circumvent https://github.com/jjlee/mechanize/issues/closed#issue/17
         # using http://wwwsearch.sourceforge.net/mechanize/faq.html#usage
-- 
1.7.2.3




More information about the weboob mailing list