1
0
Fork 0
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:
Frédéric Sureau 2011-08-09 18:05:55 +02:00
parent efb9d8942c
commit 3c5ac5b782

View file

@ -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),