aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--budget/models.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/budget/models.py b/budget/models.py
index 852b3e1..b17fc55 100644
--- a/budget/models.py
+++ b/budget/models.py
@@ -61,9 +61,9 @@ class Project(db.Model):
credits, debts, transactions = [],[],[]
# Create lists of credits and debts
for person in self.members:
- if balance[person.id] > 0:
+ if round(balance[person.id], 2) > 0:
credits.append({"person": person, "balance": balance[person.id]})
- elif balance[person.id] < 0:
+ elif round(balance[person.id], 2) < 0:
debts.append({"person": person, "balance": -balance[person.id]})
# Try and find exact matches
for credit in credits: