mirror of
https://github.com/YunoHost-Apps/ihatemoney_ynh.git
synced 2024-09-03 19:26:15 +02:00
The bills list now only displays the specific bills of the project.
This commit is contained in:
parent
efb9d8942c
commit
3c5ac5b782
1 changed files with 5 additions and 2 deletions
|
@ -106,8 +106,11 @@ def invite(project):
|
|||
@app.route("/<string:project_id>/")
|
||||
@requires_auth
|
||||
def list_bills(project):
|
||||
# FIXME filter to only get the bills for this particular project
|
||||
bills = Bill.query.order_by(Bill.id.asc())
|
||||
bills = Bill.query.join(Person, Project)\
|
||||
.filter(Bill.payer_id == Person.id)\
|
||||
.filter(Person.project_id == Project.id)\
|
||||
.filter(Project.id == project.id)\
|
||||
.order_by(Bill.date.desc())
|
||||
return render_template("list_bills.html",
|
||||
bills=bills, project=project,
|
||||
member_form=MemberForm(project),
|
||||
|
|
Loading…
Reference in a new issue