Merge pull request #4 from mvkashyap/final_fix

fix double counting
This commit is contained in:
Ging (Yichuan) Luo 2022-12-11 18:28:48 -05:00 committed by GitHub
commit 8b966c806f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 3 deletions

View file

@ -158,7 +158,6 @@ class Project(db.Model):
""" """
monthly = defaultdict(lambda: defaultdict(float)) monthly = defaultdict(lambda: defaultdict(float))
for bill in self.get_bills_unordered().all(): for bill in self.get_bills_unordered().all():
monthly[bill.date.year][bill.date.month] += bill.converted_amount
if (bill.is_reimbursement == False): if (bill.is_reimbursement == False):
# if (not bill.what.startswith("R-")): # if (not bill.what.startswith("R-")):
monthly[bill.date.year][bill.date.month] += bill.converted_amount monthly[bill.date.year][bill.date.month] += bill.converted_amount

View file

@ -175,8 +175,8 @@
<label class="col-3" for="payed_for">{{ _("For whom?") }}</label> <label class="col-3" for="payed_for">{{ _("For whom?") }}</label>
<div id="payed_for" class="controls col-9"> <div id="payed_for" class="controls col-9">
<p> <p>
<a class="badge badge-secondary" href="#" classid="selectall" onclick="selectCheckboxes(true)">{{ _("Everyone!!!!!!!") }}</a> <a class="badge badge-secondary" href="#" classid="selectall" onclick="selectCheckboxes(true)">{{ _("Everyone") }}</a>
<a class="badge badge-secondary" href="#" id="selectnone" onclick="selectCheckboxes(false)">{{_("No one!!!")}}</a> <a class="badge badge-secondary" href="#" id="selectnone" onclick="selectCheckboxes(false)">{{_("No one")}}</a>
</p> </p>
<div class="d-flex flex-column flex-wrap overflow-auto" style="max-height: 20em;"> <div class="d-flex flex-column flex-wrap overflow-auto" style="max-height: 20em;">
{% for key, value, checked in form.payed_for.iter_choices() | sort(attribute='1') %} {% for key, value, checked in form.payed_for.iter_choices() | sort(attribute='1') %}