zxcqwe/templates/index.html

37 lines
1.2 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{% extends "base.html" %}
{% block content %}
<h2>Список лекарств</h2>
<a href="/add_medicine" class="btn btn-primary mb-3">Добавить лекарство</a>
<table class="table table-striped">
<thead>
<tr>
<th>Название</th>
<th>Категория</th>
<th>Производитель</th>
<th>Цена</th>
<th>Срок годности</th>
<th>В наличии</th>
<th>Тест заказа (10 шт)</th>
</tr>
</thead>
<tbody>
{% for m in medicines %}
<tr>
<td>{{ m.name }}</td>
<td>{{ m.category_name }}</td>
<td>{{ m.manufacturer_name }}</td>
<td>{{ m.price }} ₽</td>
<td>{{ m.expiration_date }}</td>
<td>{{ m.stock_quantity }}</td>
<td>
{% set total = calculate(m.id, 10) %}
<strong>{{ total }} ₽</strong>
<small>(с учетом скидок)</small>
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endblock %}