diff --git a/myproject/discounts/templates/discounts/discount_form.html b/myproject/discounts/templates/discounts/discount_form.html index 1e9bedd..2b3319b 100644 --- a/myproject/discounts/templates/discounts/discount_form.html +++ b/myproject/discounts/templates/discounts/discount_form.html @@ -1,4 +1,5 @@ {% extends "system_settings/base_settings.html" %} +{% load inventory_filters %} {% block title %}{% if is_edit %}Редактирование скидки{% else %}Создание скидки{% endif %}{% endblock %} @@ -33,13 +34,13 @@
Выше = применяется раньше
@@ -47,7 +48,7 @@
- +
@@ -58,15 +59,15 @@
@@ -74,11 +75,11 @@
@@ -87,7 +88,7 @@
+ {% if form.is_auto.value %}checked{% endif %}> @@ -97,7 +98,7 @@
+ {% if form.is_active.value %}checked{% endif %}> @@ -110,15 +111,15 @@ @@ -131,14 +132,14 @@
Для скидок на заказ
Оставьте пустым для безлимитного использования
@@ -148,12 +149,12 @@
+ value="{{ form.start_date.value|date:'Y-m-d\TH:i'|default_if_none:'' }}">
+ value="{{ form.end_date.value|date:'Y-m-d\TH:i'|default_if_none:'' }}">
@@ -211,4 +212,46 @@
+ + {% endblock %} diff --git a/myproject/orders/templates/orders/order_detail.html b/myproject/orders/templates/orders/order_detail.html index d55ad7f..bd9e827 100644 --- a/myproject/orders/templates/orders/order_detail.html +++ b/myproject/orders/templates/orders/order_detail.html @@ -1,4 +1,5 @@ {% extends 'base.html' %} +{% load inventory_filters %} {% block title %}Заказ {{ order.order_number }}{% endblock %} @@ -337,7 +338,7 @@
{% csrf_token %} - + @@ -351,7 +352,7 @@ type="number" step="0.01" min="0" - max="{% if order.customer.wallet_balance < order.amount_due %}{{ order.customer.wallet_balance|floatformat:2 }}{% else %}{{ order.amount_due|floatformat:2 }}{% endif %}" + max="{% if order.customer.wallet_balance < order.amount_due %}{{ order.customer.wallet_balance|format_decimal:2 }}{% else %}{{ order.amount_due|format_decimal:2 }}{% endif %}" name="wallet_amount" class="form-control" placeholder="Сумма"