From 5018eb208353fb95fedc97bda105130fffa23581 Mon Sep 17 00:00:00 2001 From: fish Date: Tue, 28 Jul 2026 09:45:55 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=B2=E5=B9=B3=E4=BB=93=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E5=88=87=E6=8D=A2=E5=93=81=E7=A7=8D=E6=97=B6=E5=BA=95=E9=83=A8?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E8=B7=9F=E9=9A=8F=E5=BD=93=E5=89=8D=E5=93=81?= =?UTF-8?q?=E7=A7=8D=E6=B1=87=E6=80=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.7 --- ft-app/app/templates/trades.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ft-app/app/templates/trades.html b/ft-app/app/templates/trades.html index 2cf73e0..94ddb55 100644 --- a/ft-app/app/templates/trades.html +++ b/ft-app/app/templates/trades.html @@ -240,8 +240,9 @@ {% endif %} {% endfor %} +{% set summary_trades = closed_trades if closed_tab == '全部' else grouped_closed.get(closed_tab, []) %} {% set ns = namespace(total_pnl=0, total_open_fee=0, total_close_fee=0) %} -{% for t in closed_trades %} +{% for t in summary_trades %} {% set ns.total_pnl = ns.total_pnl + (t.pnl or 0) %} {% set ns.total_open_fee = ns.total_open_fee + (t.open_fee or 0) %} {% set ns.total_close_fee = ns.total_close_fee + (t.close_fee or 0) %}