You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

50 lines
1.8 KiB

{% extends 'clientsideapp/ext.html' %}
{% block client_main %}
<div class="page-header">
<h3>Ваши долги</h3>
</div>
<table class="table table-striped table-bordered">
<thead>
<tr>
<th class="col-xs-1">Состояние</th>
<th>Сумма</th>
<th>Описание</th>
<th>Дата создания</th>
<th>Дата платежа</th>
<th class="col-xs-1">Оплатить</th>
</tr>
</thead>
<tbody>
{% for debt in debts %}
<tr>
<td class="text-center"><span class="glyphicon glyphicon-{{ debt.status|yesno:'ok,time' }}"></span></td>
<td>{{ debt.amount }} руб.</td>
<td>{{ debt.comment }}</td>
<td>{{ debt.date_create|date:'d b H:i' }}</td>
<td>
{% if debt.date_pay %}
{{ debt.date_pay|date:'d b H:i' }}
{% else %}
{% if debt.status %}
Создан оплаченным
{% else %}
Ещё не оплачен
{% endif %}
{% endif %}
</td>
<td class="text-center">
<a href="{% url 'client_debt_buy' debt.id %}" class="btn btn-sm btn-success" title="Оплатить">
<span class="glyphicon glyphicon-usd"></span>
</a>
</td>
</tr>
{% empty %}
<tr>
<td colspan="6">У вас нет долгов <span class="glyphicon glyphicon-ok"></span></td>
</tr>
{% endfor %}
</tbody>
</table>
{% endblock %}