From 7be4867604c68f21962f5f4701e8dedad26f4736 Mon Sep 17 00:00:00 2001 From: Marty Bostick Date: Sat, 11 Jul 2026 10:35:37 +0000 Subject: [PATCH] fix: use real calendar math for estimateMonths and estimateYear1Cum MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - estimateMonths: cycles × daysPer / 30.4 instead of simplified .months - estimateYear1Cum: track days_left (365) instead of aggregated months - removes dead variable cycInMonth - Gift L3 year 1 commissions: ~,085 → ~,113 (honest calendar-based) - Time to 3×L7 for Gift L3: 12.5mo → 15.0mo (realistic) --- index.html | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/index.html b/index.html index 0262407..43909dc 100644 --- a/index.html +++ b/index.html @@ -725,27 +725,25 @@ function getPhaseSequence(effectiveStart) { } function estimateMonths(phases) { - let total = 0; + let totalDays = 0; for (const k of phases) { if (k === '3xL7') break; - total += HYBRIDS[k].months; + totalDays += HYBRIDS[k].cycles * HYBRIDS[k].daysPer; } - return Math.round(total * 10) / 10; + return Math.round(totalDays / 30.4 * 10) / 10; } function estimateYear1Cum(phases, commPct, giftLevel) { let cum = 0; - let months = 0; + let daysLeft = 365; for (const k of phases) { if (k === '3xL7') break; const p = HYBRIDS[k]; const yourCut = p.payout * (commPct / 100); - const cycInMonth = p.months / (p.daysPer / 30.4); - const cyclesInYear1 = Math.min(p.cycles, Math.max(0, (12 - months) / (p.months / p.cycles))); - const actual = Math.floor(cyclesInYear1); - for (let i = 0; i < actual; i++) cum += yourCut; - months += p.months; - if (months >= 12) break; + const cyclesFit = Math.min(p.cycles, Math.floor(daysLeft / p.daysPer)); + cum += cyclesFit * yourCut; + daysLeft -= cyclesFit * p.daysPer; + if (daysLeft <= 0) break; } return Math.round(cum); }