From 2b98599bcfd6591e4c8b64fba5341c8e53540fc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gon=C3=A7alo=20Rodrigues?= Date: Sat, 13 Jun 2026 12:50:31 +0100 Subject: [PATCH] fix(finance): portfolio template float64 comparison error ge/lt in Go templates cannot mix float64 and untyped int literals. TotalPCLPct is float64, so replaced `ge $d.TotalPCLPct 0` with `eq (pctSign $d.TotalPCLPct) "+"` which uses the existing pctSign helper that already handles the sign check correctly. Co-Authored-By: Claude Sonnet 4.6 --- apps/finance/services/api/main/templates/portfolio.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/finance/services/api/main/templates/portfolio.html b/apps/finance/services/api/main/templates/portfolio.html index c538ba2..7deba1b 100644 --- a/apps/finance/services/api/main/templates/portfolio.html +++ b/apps/finance/services/api/main/templates/portfolio.html @@ -19,7 +19,7 @@

Unrealized P&L

€0.00
-

+

{{pctSign $d.TotalPCLPct}}{{printf "%.2f" $d.TotalPCLPct}}%

@@ -66,6 +66,7 @@ {{if ge .UnrealizedPCLCents 0}}+{{else}}−{{end}}€{{cents (centsAbs .UnrealizedPCLCents)}} + {{end}}