bot_refactor merge pull request #6
@@ -71,57 +71,54 @@
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-bordered table-sm align-middle">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><input type="checkbox" id="select-all" /></th>
|
||||
<th>Создан</th>
|
||||
<th>Закрыт</th>
|
||||
<th>Счёт</th>
|
||||
<th>Клиент</th>
|
||||
<th>Номер клиента</th>
|
||||
<th>Сумма счета</th>
|
||||
<th>Бонус</th>
|
||||
<th>ФД</th>
|
||||
<th>Депозит</th>
|
||||
<th>Примечание</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for invoice in form.fields.invoices.queryset %}
|
||||
<tr>
|
||||
<td><input type="checkbox" name="invoices[]" value="{{ invoice.id }}"></td>
|
||||
<td>{{ invoice.created_at|date:"d.m.Y H:i" }}</td>
|
||||
<td>{% if invoice.closed_at %}{{ invoice.closed_at|date:"d.m.Y H:i" }}{% else %}—{% endif %}</td>
|
||||
<td>{{ invoice.ext_id|default:"—" }}</td>
|
||||
<td>{{ invoice.ext_id|default:"—" }}</td>
|
||||
<td>
|
||||
{% if invoice.client %}
|
||||
{{ invoice.client.name|default:"—" }}
|
||||
{% else %}
|
||||
Не указан
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{% if invoice.client %}
|
||||
{{ invoice.client.club_card_number|default:"—" }}
|
||||
{% else %}
|
||||
—
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{{ invoice.sum|default:"—" }}</td>
|
||||
<td>{{ invoice.bonus|default:"—" }}</td>
|
||||
<td>{{ invoice.start_bonus|default:"—" }}</td>
|
||||
<td>{{ invoice.deposit_sum|default:"—" }}</td>
|
||||
<td>{{ invoice.notes|default:"—" }}</td>
|
||||
</tr>
|
||||
{% empty %}
|
||||
<tr>
|
||||
<td colspan="11" class="text-center">Нет доступных счетов</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
<table class="table table-striped table-bordered table-sm align-middle">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><input type="checkbox" id="select-all" /></th>
|
||||
<th>Создан</th>
|
||||
<th>Закрыт</th>
|
||||
<th>Счет</th>
|
||||
<th>Клиент</th>
|
||||
<th>Номер клиента</th>
|
||||
<th>Сумма счета</th>
|
||||
<th>Бонус</th>
|
||||
<th>ФД</th>
|
||||
<th>Депозит</th>
|
||||
<th>Примечание</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for invoice in invoices %}
|
||||
<tr>
|
||||
<td><input type="checkbox" name="invoices[]" value="{{ invoice.id }}"></td>
|
||||
<td>{{ invoice.created_at|date:"Y-m-d H:i:s" }}</td>
|
||||
<td>{% if invoice.closed_at %}{{ invoice.closed_at|date:"Y-m-d H:i:s" }}{% else %}—{% endif %}</td>
|
||||
<td>{{ invoice.ext_id }}</td>
|
||||
<td>
|
||||
{% if invoice.client %}
|
||||
{{ invoice.client.name|default:"—" }}
|
||||
{% else %}
|
||||
Не указан
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{% if invoice.client %}
|
||||
{{ invoice.client.club_card_number|default:"—" }}
|
||||
{% else %}
|
||||
—
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{{ invoice.sum|floatformat:2 }}</td>
|
||||
<td>{{ invoice.bonus|floatformat:2|default:"—" }}</td>
|
||||
<td>{{ invoice.start_bonus|floatformat:2|default:"—" }}</td>
|
||||
<td>{{ invoice.deposit_sum|floatformat:2|default:"—" }}</td>
|
||||
<td>{{ invoice.notes|default:"—" }}</td>
|
||||
</tr>
|
||||
{% empty %}
|
||||
<tr><td colspan="11" class="text-center">Нет доступных счетов</td></tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">Добавить выбранные счета</button>
|
||||
</form>
|
||||
|
||||
Reference in New Issue
Block a user