engine: GIS 65+ floor, clawback only with OAS, couple mixed-row footnote, FIRE retire age 40

This commit is contained in:
krisf committed 2026-10-09 15:52:53 -04:00
1 parent de451f0525
commit a210e7edfc
10 files changed
+348 -24

No files matched your search

+7 -3
View File
@@ -208,7 +208,7 @@
},
{
key: 'retire', titleK: 'q.retire.title', hintK: 'q.retire.hint', type: 'slider',
min: 55, max: 72, step: 1, fmt: function (v) { return t('q.retire.years', { v: v }); },
min: 40, max: 72, step: 1, fmt: function (v) { return t('q.retire.years', { v: v }); }, /* FIRE: floor 40 (fillDefaults clamps below current age) */
get: function () { return state.a.retireAge; }, set: function (v) { state.a.retireAge = +v; }
},
{
@@ -804,15 +804,19 @@
renderPsCard(p);
var tbl = '<tr><th>' + t('t.age') + '</th><th>' + t('t.rrsp') + '</th><th>' + t('t.tfsa') + '</th><th>' + t('t.nonreg') + '</th><th>' + t('t.total') + '</th><th>' + t('t.wdr') + '</th><th>' + t('t.cpp') + '</th><th>' + t('t.oas') + '</th><th>' + t('t.gis') + '</th><th>' + t('t.tax') + '</th><th>' + t('t.unfunded') + '</th></tr>';
var n = 0;
var n = 0, mixedAny = false;
proj.years.forEach(function (r) {
if (r.phase !== 'draw' && r.age % 5 !== 0) return; n++;
if (r.mixed) mixedAny = true; /* 2026-10 math fix: one partner retired, one still accumulating */
tbl += '<tr class="' + (r.unfunded > 1 ? 'dep' : '') + '"><td>' + r.age + '</td><td>' + k(r.rrspBal) + '</td><td>' + k(r.tfsaBal) +
'</td><td>' + k(r.nonregBal) + '</td><td><b>' + k(r.totalBal) + '</b></td><td>' + k(r.rrifWithdrawal + r.nonregW + r.tfsaW) +
'</td><td>' + k(r.nonregBal) + '</td><td><b>' + k(r.totalBal) + (r.mixed ? ' †' : '') + '</b></td><td>' + k(r.rrifWithdrawal + r.nonregW + r.tfsaW) +
'</td><td>' + k(r.cpp) + '</td><td>' + k(r.oasGross - r.oasClawback) + '</td><td>' + k(r.gis) + '</td><td>' + k(r.tax + r.oasClawback) +
'</td><td>' + (r.unfunded > 1 ? k(r.unfunded) : '—') + '</td></tr>';
});
$('#yr-table').innerHTML = tbl; $('#yr-summary').innerHTML = t('r.yearlySummary', { n: n });
/* Legend for † mixed-phase rows (couples: growing Total + Withdraw > 0 rows explained). */
var mn = $('#yr-mixed-note');
if (mn) { mn.textContent = mixedAny ? t('t.mixedNote') : ''; mn.hidden = !mixedAny; }
var m2 = fmtMoney2;
$('#stamp').textContent = t('r.stamp', {