From 5c61789b71a1f5c2523b957b89dd2273ad8a2070 Mon Sep 17 00:00:00 2001 From: Andrey Smakotin Date: Mon, 1 Dec 2025 10:05:32 +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=D0=BE=D1=82=D0=BE=D0=B1=D1=80=D0=B0=D0=B6?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5=20=D1=81=D0=B5=D0=B1=D0=B5=D1=81=D1=82?= =?UTF-8?q?=D0=BE=D0=B8=D0=BC=D0=BE=D1=81=D1=82=D0=B8=20=D0=B2=20=D1=82?= =?UTF-8?q?=D0=B0=D0=B1=D0=BB=D0=B8=D1=86=D0=B5=20SaleBatchAllocation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Проблема: - В шаблоне использовалось несуществующее поле cost_per_unit - Фактическое поле в модели называется cost_price Исправление: - Заменено alloc.cost_per_unit на alloc.cost_price - Теперь себестоимость за единицу отображается корректно --- myproject/inventory/templates/inventory/debug_page.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/myproject/inventory/templates/inventory/debug_page.html b/myproject/inventory/templates/inventory/debug_page.html index cdc9823..011d8d2 100644 --- a/myproject/inventory/templates/inventory/debug_page.html +++ b/myproject/inventory/templates/inventory/debug_page.html @@ -395,7 +395,7 @@ {{ alloc.sale.product.name }} {{ alloc.batch.id }} {{ alloc.quantity }} - {{ alloc.cost_per_unit|floatformat:2 }} + {{ alloc.cost_price|floatformat:2 }} {% empty %} Нет списаний