From 767a2e4cfc1ea5d81a09fc8838f103fba09438ff Mon Sep 17 00:00:00 2001 From: Johannes Date: Fri, 20 Mar 2026 02:48:30 +0100 Subject: [PATCH] show selling costs transparently in tooltip and label on result card --- calc.js | 2 ++ index.html | 1 + ui.js | 1 + 3 files changed, 4 insertions(+) diff --git a/calc.js b/calc.js index 73c5758..c4b6ad1 100644 --- a/calc.js +++ b/calc.js @@ -68,6 +68,7 @@ function run_simulation(p) { cum_rent_arr.push(0); detail_arr.push({ house_value: Math.round(home_value), + selling_costs: Math.round(selling_costs_0), mortgage_balance: Math.round(balance), buyer_portfolio: Math.round(buyer_portfolio), yr_interest: 0, @@ -143,6 +144,7 @@ function run_simulation(p) { cum_rent_arr.push(Math.round(cum_rent_cost)); detail_arr.push({ house_value: Math.round(home_value), + selling_costs: Math.round(selling_costs), mortgage_balance: Math.round(balance), buyer_portfolio: Math.round(buyer_portfolio), yr_interest: Math.round(yr_interest), diff --git a/index.html b/index.html index 07be005..dd25a72 100644 --- a/index.html +++ b/index.html @@ -232,6 +232,7 @@
Nettovermögen Kauf
Gesamtausgaben: —
+
inkl. Verkaufskosten
Nettovermögen Miete
diff --git a/ui.js b/ui.js index caae02a..40562b7 100644 --- a/ui.js +++ b/ui.js @@ -193,6 +193,7 @@ const build_table = (result) => { td_buy_nw.classList.add('has-tip'); td_buy_nw.addEventListener('mouseenter', (e) => show_tooltip(e, [ tip_row('Immobilienwert', d.house_value, '#f59e0b'), + tip_row('Verkaufskosten', -d.selling_costs, '#ef4444'), tip_row('ETF-Portfolio', d.buyer_portfolio, '#f59e0b'), tip_row('Restschuld', -d.mortgage_balance, '#ef4444'), ].join('
')));