aboutsummaryrefslogtreecommitdiff
path: root/budget
diff options
context:
space:
mode:
authorAlexis Metaireau <alexis@notmyidea.org>2015-07-28 16:05:19 +0200
committerAlexis Metaireau <alexis@notmyidea.org>2015-07-28 16:05:19 +0200
commit0e21449191ee54d72392c11e257e8bb1f7a8f625 (patch)
tree4b825a98693c634bd6dcd282658c79ecd0812d3e /budget
parent84aafc850e8262c7f8499d2919825a21c8278dde (diff)
parentb9458db08ec12ce3645fe21fde71e82bf8fde3d6 (diff)
downloadihatemoney-mirror-0e21449191ee54d72392c11e257e8bb1f7a8f625.zip
ihatemoney-mirror-0e21449191ee54d72392c11e257e8bb1f7a8f625.tar.gz
ihatemoney-mirror-0e21449191ee54d72392c11e257e8bb1f7a8f625.tar.bz2
Merge pull request #126 from aavenel/fix-settle-rounding
Bugfix rounding settle algorithm
Diffstat (limited to 'budget')
-rw-r--r--budget/models.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/budget/models.py b/budget/models.py
index 27bd80b..727200f 100644
--- a/budget/models.py
+++ b/budget/models.py
@@ -62,7 +62,7 @@ class Project(db.Model):
debts.append({"person": person, "balance": -balance[person.id]})
# Try and find exact matches
for credit in credits:
- match = self.exactmatch(credit["balance"], debts)
+ match = self.exactmatch(round(credit["balance"], 2), debts)
if match:
for m in match:
transactions.append({"ower": m["person"], "receiver": credit["person"], "amount": m["balance"]})