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.
 
 
 
 

37 lines
1.5 KiB

{% extends "base.html" %}
{% load pytils_numeral %}
{% block title %}Мои счета{% endblock %}
{% block content %}
<h1>Мои заказы</h1>
<div class="btn yellow-btn docs-btn"><a href="{% url 'customer_order_license' %}">Купить лицензию</a></div>
<div class="btn yellow-btn docs-btn"><a href="{% url 'customer_paid_list' %}">Оплаченные лицензии</a></div>
<table id="history" class="list">
<tr>
<th>Номер</th>
<th>Дата счёта</th>
<th>Срок лицензии</th>
<th>Сумма</th>
<th>Вид платежа</th>
<th>Статус</th>
<th>Действия</th>
<th>Отменить заявку</th>
</tr>
{% for license in licenses %}
<tr class='license_{{ license.id }}'>
<td>{% if license.pay_sum > 0 %}{{ license.id }}{% else %}--{% endif %}</td>
<td>{{ license.order_date }}</td>
<td>{{ license.get_term }}</td>
<td>{% if license.pay_sum > 0 %}{{ license.pay_sum|get_plural:"рубль,рубля,рублей" }}{% else %}Бесплатно{% endif %}</td>
<td>{{ license.get_payform_display }}</td>
<td>{{ license.get_status_display }}</td>
<td>{{ license.get_action_link|safe }}</td>
<td>{% if license.status == 0 %}<a href='#' class='delete_license' data-id='{{ license.pk }}'>Удалить</a>{% endif %}</td>
</tr>
{% endfor %}
</table>
{% endblock %}
{% block js %}
<script src="{{ STATIC_URL }}js/license.js"></script>
{% endblock %}