From 622c544182f103c055179d760158e053f92fca3b Mon Sep 17 00:00:00 2001 From: Andrey Smakotin Date: Wed, 21 Jan 2026 19:54:35 +0300 Subject: [PATCH] =?UTF-8?q?feat(inventory):=20=D0=B4=D0=BE=D0=B1=D0=B0?= =?UTF-8?q?=D0=B2=D0=B8=D1=82=D1=8C=20=D1=81=D1=82=D0=BE=D0=BB=D0=B1=D0=B5?= =?UTF-8?q?=D1=86=20=D1=82=D0=B5=D0=BA=D1=83=D1=89=D0=B5=D0=B9=20=D1=86?= =?UTF-8?q?=D0=B5=D0=BD=D1=8B=20=D0=BF=D1=80=D0=BE=D0=B4=D0=B0=D0=B6=D0=B8?= =?UTF-8?q?=20=D0=B8=20inline-=D1=80=D0=B5=D0=B4=D0=B0=D0=BA=D1=82=D0=B8?= =?UTF-8?q?=D1=80=D0=BE=D0=B2=D0=B0=D0=BD=D0=B8=D0=B5=20=D0=BA=D0=BE=D0=BB?= =?UTF-8?q?=D0=B8=D1=87=D0=B5=D1=81=D1=82=D0=B2=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Добавлен столбец "Текущая цена продажи" в таблицу позиций документа поступления - Цена продажи отображается с учётом скидок и возможностью inline-редактирования для владельца и менеджера - Реализовано inline-редактирование количества при клике на значение - Добавлены стили для интерактивных элементов Co-Authored-By: Claude Opus 4.5 --- .../incoming_document_detail.html | 241 +++++++++++++++++- 1 file changed, 231 insertions(+), 10 deletions(-) diff --git a/myproject/inventory/templates/inventory/incoming_document/incoming_document_detail.html b/myproject/inventory/templates/inventory/incoming_document/incoming_document_detail.html index 84c9d18..11e8d13 100644 --- a/myproject/inventory/templates/inventory/incoming_document/incoming_document_detail.html +++ b/myproject/inventory/templates/inventory/incoming_document/incoming_document_detail.html @@ -188,6 +188,7 @@ Закупочная цена Сумма Примечания + Текущая цена продажи {% if document.can_edit %} {% endif %} @@ -200,18 +201,26 @@ {{ item.product.name }} - {{ item.quantity|smart_quantity }} {% if document.can_edit %} - + + {{ item.quantity|smart_quantity }} + + + {% else %} + {{ item.quantity|smart_quantity }} {% endif %} {{ item.cost_price|floatformat:2 }} {% if document.can_edit %} - {% endif %} @@ -221,11 +230,45 @@ {% if item.notes %}{{ item.notes|truncatechars:50 }}{% else %}-{% endif %} {% if document.can_edit %} - {% endif %} + + {% if item.product.sale_price %} +
{{ item.product.price|floatformat:2 }} руб.
+ {% if user.is_superuser or user.tenant_role.role.code == 'owner' or user.tenant_role.role.code == 'manager' %} + + {{ item.product.sale_price|floatformat:2 }} руб. + + {% else %} + + {{ item.product.sale_price|floatformat:2 }} руб. + + {% endif %} + {% else %} + {% if user.is_superuser or user.tenant_role.role.code == 'owner' or user.tenant_role.role.code == 'manager' %} + + {{ item.product.price|floatformat:2 }} руб. + + {% else %} + + {{ item.product.price|floatformat:2 }} руб. + + {% endif %} + {% endif %} + {% if document.can_edit %}
@@ -256,7 +299,7 @@ {% empty %} - + Позиций пока нет @@ -268,7 +311,7 @@ Итого: {{ document.total_quantity|smart_quantity }} - {{ document.total_cost|floatformat:2 }} + {{ document.total_cost|floatformat:2 }} @@ -283,6 +326,7 @@ + + + {% endblock %}