diff options
| author | Frédéric Sureau <fred@milka.(none)> | 2011-08-09 18:05:55 +0200 |
|---|---|---|
| committer | Frédéric Sureau <fred@milka.(none)> | 2011-08-09 18:05:55 +0200 |
| commit | 3c5ac5b78286a1670043aba06f2b7164f44d36c2 (patch) | |
| tree | e42cb2cbef386727cfb9562d8269ea587339fc66 /budget/web.py | |
| parent | efb9d8942cf9d0c4e965f351518c7c28101aa9fa (diff) | |
| download | ihatemoney-mirror-3c5ac5b78286a1670043aba06f2b7164f44d36c2.zip ihatemoney-mirror-3c5ac5b78286a1670043aba06f2b7164f44d36c2.tar.gz ihatemoney-mirror-3c5ac5b78286a1670043aba06f2b7164f44d36c2.tar.bz2 | |
The bills list now only displays the specific bills of the project.
Diffstat (limited to 'budget/web.py')
| -rw-r--r-- | budget/web.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/budget/web.py b/budget/web.py index c2909bc..a838b09 100644 --- a/budget/web.py +++ b/budget/web.py @@ -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), |
