Source

django-pim / pcbank / templates / pcbank / payee_detail.html

{% extends "pcbank/base.html" %}

{% block body %}
<table class="table table-condensed">
<tr><td><b>Title:</b></td><td>{{object.title}}</td></tr>
<tr><td><b>Account:</b></td><td>{{object.account}}</td></tr>
<tr><td><b>Split by:</b></td><td>{{object.split_by}}</td></tr>
<tr><td><b>Due Date:</b></td><td>{{object.due_date}}</td></tr>
<tr><td><b>Active:</b></td><td>{{object.active}}</td></tr>
<tr><td><b>Added on:</b></td><td>{{object.added_on}}</td></tr>
{% if object.url %}
<tr><td><b>Account website:</b></td><td><a href="{{object.url}}" class="btn btn-success">Access account</a></td></tr>
{% endif %}
</table>
<a href="{{object.get_edit_url}}" class="btn">Edit Payee</a><br/>
<form action="{{object.add_bill}}" method="post">{% csrf_token %}
{{form}}
<input type="submit" value="Add Bill" class="btn btn-primary" />
</form>
{% if object.bill_set.count > 0 %}
<table class="table table-striped table-condensed table-bordered">
<thead>
<tr><th>Added on</th><th>Amount</th><th>Paid</th></tr>
</thead><tbody>
{% for bill in object.bill_set.all %}
<tr><td><a href="{{bill.get_absolute_url}}">{{bill.added_on}}</a></td><td>${{bill.amount|floatformat:2}}</td><td>{{bill.paid}}</td></tr>
{% endfor %}
</tbody></table>
{% endif %}
{% if object.transactions.all %}
<table class="table table-striped table-condensed table-bordered">
<thead>
<tr><th>Date</th><th>From</th><th>Amount</th></tr>
</thead><tbody>
{% for transaction in object.transactions.all %}
<tr><td>{{transaction.date}}</td><td><a href="{{transaction.from_obj.get_absolute_url}}">{{transaction.from_obj}}</a></td><td>${{transaction.amount|floatformat:2}}</td></tr>
{% endfor %}
</tbody></table>
{% endif %}
{% endblock %}