1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/ihatemoney_ynh.git synced 2024-09-03 19:26:15 +02:00

Merge pull request #126 from aavenel/fix-settle-rounding

Bugfix rounding settle algorithm
This commit is contained in:
Alexis Metaireau 2015-07-28 16:05:19 +02:00
commit 0e21449191

View file

@ -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"]})