Исправлено форматирование остатков: показ дробных значений
Изменён floatformat с :0 на :-3 для корректного отображения дробных остатков товаров (до 3 знаков после запятой). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -286,8 +286,8 @@
|
||||
<div class="mt-1">
|
||||
<small class="stock-info {% if item.total_free > 0 %}text-success{% else %}text-danger{% endif %}">
|
||||
<i class="bi bi-box-seam"></i>
|
||||
<strong>{{ item.total_free|floatformat:0 }}</strong> свободно
|
||||
<span class="text-muted">/ {{ item.total_available|floatformat:0 }} всего</span>
|
||||
<strong>{{ item.total_free|floatformat:"-3" }}</strong> свободно
|
||||
<span class="text-muted">/ {{ item.total_available|floatformat:"-3" }} всего</span>
|
||||
</small>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
@@ -193,8 +193,8 @@
|
||||
</td>
|
||||
<td>
|
||||
{% if item.item_type == 'product' %}
|
||||
<strong class="{% if item.total_free > 0 %}text-success{% else %}text-danger{% endif %}">{{ item.total_free|floatformat:0 }}</strong>{% if item.total_reserved > 0 %}<small class="text-muted"> / {{ item.total_available|floatformat:0 }}</small>
|
||||
<small class="text-warning d-block">{{ item.total_reserved|floatformat:0 }} в резерве</small>
|
||||
<strong class="{% if item.total_free > 0 %}text-success{% else %}text-danger{% endif %}">{{ item.total_free|floatformat:-2 }}</strong>{% if item.total_reserved > 0 %}<small class="text-muted"> / {{ item.total_available|floatformat:-2 }}</small>
|
||||
<small class="text-warning d-block">{{ item.total_reserved|floatformat:-2 }} в резерве</small>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<span class="text-muted">-</span>
|
||||
|
||||
Reference in New Issue
Block a user