From d537d166e20a500fdff39420c90824ded354821e Mon Sep 17 00:00:00 2001 From: Marty Bostick Date: Wed, 29 Jul 2026 22:30:39 +0000 Subject: [PATCH] =?UTF-8?q?Fix=20profit=20timeline=20showing=20all=20zeros?= =?UTF-8?q?=20for=20referrals=20=E2=80=94=20show=20actual=20profit/commiss?= =?UTF-8?q?ion=20instead=20of=20multiplying=20by=20numPeople=3D0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/index.html b/index.html index 43a179d..249255f 100644 --- a/index.html +++ b/index.html @@ -1787,6 +1787,16 @@ ${numPeople > 0 ? ` if (chart3) { chart3.destroy(); chart3 = null; } const datasets = [ + { + label: 'Their Profit', + data: chartValues, + borderColor: '#00d2ff', + backgroundColor: 'rgba(0,210,255,0.1)', + fill: true, + tension: 0.3, + pointRadius: 3, + pointHoverRadius: 5, + }, referralDataset, ].filter(Boolean); @@ -1815,12 +1825,13 @@ ${numPeople > 0 ? ` let tRows = ''; let runningCum = 0; for (const m of monthly) { - runningCum += m.comm * numPeople; + const actualPeople = Math.max(numPeople, 1); + runningCum += m.comm * actualPeople; tRows += ` Month ${m.m} ${m.phase} - $${(m.prof * numPeople).toLocaleString()} - $${(m.comm * numPeople).toLocaleString()} + $${m.prof.toLocaleString()} + $${(m.comm * actualPeople).toLocaleString()} $${runningCum.toLocaleString()} `; }