From 338b2df0c90a0eaba6846d2bca7aa1123fa0a08d Mon Sep 17 00:00:00 2001 From: Egor fureunoir Gorbunov Date: Sun, 16 Nov 2025 15:07:45 +0300 Subject: [PATCH] Features: 1) Refactored template logic to separate gross/returns context and total calculation for clarity; Fixes: 1) Fixed duplicate `{% with %}` block causing syntax error; Extra: 1) Improved template structure for maintainability; 2) Added missing closing `{% endwith %}`. --- engine/core/templates/admin/index.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/engine/core/templates/admin/index.html b/engine/core/templates/admin/index.html index 71416016..7f213e36 100644 --- a/engine/core/templates/admin/index.html +++ b/engine/core/templates/admin/index.html @@ -38,7 +38,8 @@
- {% with gross=revenue_gross_30|default:0 returns=returns_30|default:0 total=gross|add:returns %} + {% with gross=revenue_gross_30|default:0 returns=returns_30|default:0 %} + {% with total=gross|add:returns %}

{% trans "Sales vs Returns (30d)" %}

@@ -74,6 +75,7 @@ {% endif %}
{% endwith %} + {% endwith %}

{% trans "Quick Links" %}