From 7433b59a8f61e10d62fdb8ecf55abea2b61d6232 Mon Sep 17 00:00:00 2001 From: Marty Bostick Date: Thu, 30 Jul 2026 21:50:36 +0000 Subject: [PATCH] Fix: referral column visibility now respects checkbox, not just numPeople - The second toggle block (lines 1718-1725) was overriding the checkbox state - When numPeople > 0, it was showing sponsor columns regardless of checkbox - Now uses so both conditions must be met - Referral columns stay hidden by default even when simulating a referral plan --- index.html | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/index.html b/index.html index 8b4409e..18c8092 100644 --- a/index.html +++ b/index.html @@ -1715,13 +1715,14 @@ ${numPeople > 0 ? ` `; document.getElementById('summaryCards').innerHTML = summaryHtml; - // Toggle referral columns when no people in downline + // Toggle referral columns when no people in downline, but respect checkbox + const shouldShow = (numPeople > 0) && showRef; for (const id of ['headerYourCut','headerCumulative','headerTimelineComm','headerTimelineCum']) { const el = document.getElementById(id); - if (el) el.style.display = numPeople > 0 ? '' : 'none'; + if (el) el.style.display = shouldShow ? '' : 'none'; } for (const el of document.querySelectorAll('.referral-col')) { - el.style.display = numPeople > 0 ? '' : 'none'; + el.style.display = shouldShow ? '' : 'none'; } let cumRunning = 0;