2011-03-10 03:37:21 +01:00
|
|
|
{% extends "layout.html" %}
|
2011-07-31 23:55:18 +02:00
|
|
|
|
|
|
|
{% block top_menu %}
|
|
|
|
<a href="{{ url_for('list_bills', project_id=project.id) }}">Back to the list</a>
|
|
|
|
{% endblock %}
|
|
|
|
|
2011-03-10 03:37:21 +01:00
|
|
|
{% block content %}
|
|
|
|
<h2>Computations</h2>
|
|
|
|
|
|
|
|
<div class="container span-16">
|
|
|
|
<ol>
|
|
|
|
<li>For each person, get the list of bills he have to pay</li>
|
|
|
|
<li>Increase the amount this person have to pay</li>
|
|
|
|
<li>At the same time, increase what the payer of the bill have to receive</li>
|
|
|
|
<li>At the end, for each person, substract what he have to pay to what he have to receive</li>
|
|
|
|
</ol>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="container span-6 last">
|
2011-07-31 23:55:18 +02:00
|
|
|
<a class="awesome large green button" onclick = "if (! confirm('Are you sure ?')) return false;" href="">Mark this as payed / processed</a>
|
2011-03-10 03:37:21 +01:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<table>
|
|
|
|
<thead><tr><th>Name</th><th>Balance</th></tr></thead>
|
|
|
|
<tbody>
|
2011-07-31 23:55:18 +02:00
|
|
|
{% for person, balance in balances.items() %}
|
|
|
|
<tr><td>{{ person.name }}</td><td>{{ balance }}</td></tr>
|
2011-03-10 03:37:21 +01:00
|
|
|
{% endfor %}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
{% endblock %}
|