From d28a845664d9b47589a10467a2f06a54391351d3 Mon Sep 17 00:00:00 2001 From: Andrey Smakotin Date: Sat, 3 Jan 2026 00:16:55 +0300 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=BE=20=D1=84=D0=BE=D1=80=D0=BC=D0=B0=D1=82=D0=B8?= =?UTF-8?q?=D1=80=D0=BE=D0=B2=D0=B0=D0=BD=D0=B8=D0=B5=20=D0=BE=D1=81=D1=82?= =?UTF-8?q?=D0=B0=D1=82=D0=BA=D0=BE=D0=B2:=20=D0=BF=D0=BE=D0=BA=D0=B0?= =?UTF-8?q?=D0=B7=20=D0=B4=D1=80=D0=BE=D0=B1=D0=BD=D1=8B=D1=85=20=D0=B7?= =?UTF-8?q?=D0=BD=D0=B0=D1=87=D0=B5=D0=BD=D0=B8=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Изменён floatformat с :0 на :-3 для корректного отображения дробных остатков товаров (до 3 знаков после запятой). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- myproject/products/templates/products/catalog.html | 6 +++--- myproject/products/templates/products/products_list.html | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/myproject/products/templates/products/catalog.html b/myproject/products/templates/products/catalog.html index 3caee28..55a06d3 100644 --- a/myproject/products/templates/products/catalog.html +++ b/myproject/products/templates/products/catalog.html @@ -285,9 +285,9 @@ {# Информация об остатках для товаров #}
- - {{ item.total_free|floatformat:0 }} свободно - / {{ item.total_available|floatformat:0 }} всего + + {{ item.total_free|floatformat:"-3" }} свободно + / {{ item.total_available|floatformat:"-3" }} всего
{% endif %} diff --git a/myproject/products/templates/products/products_list.html b/myproject/products/templates/products/products_list.html index 1fb59f5..5d7d34f 100644 --- a/myproject/products/templates/products/products_list.html +++ b/myproject/products/templates/products/products_list.html @@ -193,8 +193,8 @@ {% if item.item_type == 'product' %} - {{ item.total_free|floatformat:0 }}{% if item.total_reserved > 0 %} / {{ item.total_available|floatformat:0 }} - {{ item.total_reserved|floatformat:0 }} в резерве + {{ item.total_free|floatformat:-2 }}{% if item.total_reserved > 0 %} / {{ item.total_available|floatformat:-2 }} + {{ item.total_reserved|floatformat:-2 }} в резерве {% endif %} {% else %} -