mirror of
https://github.com/spiral-project/ihatemoney.git
synced 2025-05-05 12:41:49 +02:00
fixed calculation issue (archived bills are no longer calculated)
This commit is contained in:
parent
28f99c9506
commit
b9d705da79
1 changed files with 7 additions and 6 deletions
|
@ -114,6 +114,7 @@ class Project(db.Model):
|
||||||
balances, should_pay, should_receive = (defaultdict(int) for time in (1, 2, 3))
|
balances, should_pay, should_receive = (defaultdict(int) for time in (1, 2, 3))
|
||||||
|
|
||||||
for bill in self.get_bills_unordered().all():
|
for bill in self.get_bills_unordered().all():
|
||||||
|
if not bill.archive:
|
||||||
should_receive[bill.payer.id] += bill.converted_amount
|
should_receive[bill.payer.id] += bill.converted_amount
|
||||||
total_weight = sum(ower.weight for ower in bill.owers)
|
total_weight = sum(ower.weight for ower in bill.owers)
|
||||||
for ower in bill.owers:
|
for ower in bill.owers:
|
||||||
|
|
Loading…
Reference in a new issue