From 4d197790fc89ec6d253f707c5131407995222417 Mon Sep 17 00:00:00 2001 From: Andrey Smakotin Date: Sat, 29 Nov 2025 22:23:42 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A3=D0=BF=D1=80=D0=BE=D1=89=D0=B5=D0=BD?= =?UTF-8?q?=D0=B0=20=D1=84=D0=BE=D1=80=D0=BC=D0=B0=20=D0=BE=D0=BF=D0=BB?= =?UTF-8?q?=D0=B0=D1=82=D1=8B=20=D0=B7=D0=B0=D0=BA=D0=B0=D0=B7=D0=B0:=20?= =?UTF-8?q?=D0=B5=D0=B4=D0=B8=D0=BD=D0=B0=D1=8F=20=D1=84=D0=BE=D1=80=D0=BC?= =?UTF-8?q?=D0=B0=20=D0=BF=D0=BB=D0=B0=D1=82=D0=B5=D0=B6=D0=B0/=D0=B2?= =?UTF-8?q?=D0=BE=D0=B7=D0=B2=D1=80=D0=B0=D1=82=D0=B0=20=D1=81=20=D0=BF?= =?UTF-8?q?=D0=B5=D1=80=D0=B5=D0=BA=D0=BB=D1=8E=D1=87=D0=B0=D1=82=D0=B5?= =?UTF-8?q?=D0=BB=D0=B5=D0=BC=20=D1=80=D0=B5=D0=B6=D0=B8=D0=BC=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../orders/templates/orders/order_form.html | 411 ++++++++++-------- 1 file changed, 233 insertions(+), 178 deletions(-) diff --git a/myproject/orders/templates/orders/order_form.html b/myproject/orders/templates/orders/order_form.html index 8a9dfbd..8fb01c3 100644 --- a/myproject/orders/templates/orders/order_form.html +++ b/myproject/orders/templates/orders/order_form.html @@ -595,21 +595,24 @@
-
Оплата
- {% if order.pk and order.amount_paid > 0 %} - Доступно для возврата: {{ order.amount_paid|floatformat:2 }} руб. + {% if order.pk %} + {% if order.amount_due <= 0 %} + Оплачено + {% elif order.amount_paid > 0 %} + Частично оплачено + {% else %} + Не оплачено + {% endif %} {% endif %}
-
- +
{% if order.pk %} - {% if order.amount_paid > order.total_amount %}
@@ -618,61 +621,127 @@ Оплачено {{ order.amount_paid|floatformat:2 }} руб., сумма заказа {{ order.total_amount|floatformat:2 }} руб.
Переплата: {{ order.overpayment|floatformat:2 }} руб.
- Создайте возврат в кошелёк клиента во вкладке «Создать возврат» ниже. + Создайте возврат средств ниже.
{% endif %} - -
-
-
+ + +
+
+
- Сумма заказа -
{{ order.total_amount|floatformat:2 }} руб.
+ Сумма заказа +

{{ order.total_amount|floatformat:2 }} руб.

-
-
+
+
- Оплачено -
{{ order.amount_paid|floatformat:2 }} руб.
+ Остаток к оплате +

{{ order.amount_due|floatformat:2 }} руб.

+
+
+
+
+
+
+ Уже оплачено +

{{ order.amount_paid|floatformat:2 }} руб.

-
-
-
-
- Остаток -
{{ order.amount_due|floatformat:2 }} руб.
-
+ + +
+ {% csrf_token %} + + +
+ +
+ +
- {% if order.customer %} -
-
-
- Кошелёк -
{{ order.customer.wallet_balance|floatformat:2 }} руб.
-
+ + +
+ +
+ {% load orders_tags %} + {% get_payment_methods as payment_methods %} + {% for pm in payment_methods %} + + {% endfor %}
+ +
- {% endif %} -
- {% endif %} + + +
+ +
+ + руб. +
+ +
+ + + + + +
+ + +
+ + + - {% if order.pk and order.transactions.exists %} -
+ {% if order.transactions.exists %} +
История транзакций
- + @@ -712,131 +781,19 @@
ДатаСпособ оплатыСпособ Сумма Кем
- {% elif order.pk %} -
+ {% else %} +
Транзакции по заказу отсутствуют
{% endif %} - -
-
- - - {% if order.pk %} -
-
- -
-
-
- -
-
- {% csrf_token %} -
-
- - -
-
- -
- 0 %}value="{{ order.amount_due|unlocalize }}"{% endif %} required> - руб. -
- -
-
- -
- {{ order.amount_due|floatformat:2 }} руб. -
-
-
- - -
-
- -
-
-
-
- - -
-
- {% csrf_token %} -
- - Возврат средств клиенту
- Можно вернуть любую сумму до {{ order.amount_paid|floatformat:2 }} руб. Выберите способ возврата (обычно соответствует способу оплаты). Зачисление в кошелёк клиента произойдёт только при выборе метода «кошелёк клиента». -
-
-
- - -
-
- -
- - руб. -
- Макс: {{ order.amount_paid|floatformat:2 }} -
-
- - -
-
- - -
-
- -
-
-
-
+ {% else %} + +
+ Сохраните заказ, чтобы добавить платежи и возвраты.
+ {% endif %}
- {% endif %}
@@ -909,32 +866,130 @@ document.addEventListener('DOMContentLoaded', function() {