From 2dee1ea71d1badd45d73aedfa833ee80993bcf79 Mon Sep 17 00:00:00 2001 From: Inferencebot Date: Mon, 19 Oct 2026 12:05:51 -0600 Subject: [PATCH] =?UTF-8?q?fmtMoney:=20snap=20|n|=20<=20half=20a=20cent=20?= =?UTF-8?q?to=20exact=200=20=E2=80=94=20kills=20$-0.00=20from=20float-resi?= =?UTF-8?q?due=20spend?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/main.py b/app/main.py index fa22f89..4e31b95 100644 --- a/app/main.py +++ b/app/main.py @@ -599,7 +599,7 @@ function flash(msg, ok) { setTimeout(() => { f.className = 'flash'; }, 6000); } -function fmtMoney(n) { return '$' + (Number(n) || 0).toFixed(2); } +function fmtMoney(n) { const v = Math.abs(Number(n)) < 0.005 ? 0 : (Number(n) || 0); return '$' + v.toFixed(2); } async function load() { try {