show selling costs transparently in tooltip and label on result card
This commit is contained in:
2
calc.js
2
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),
|
||||
|
||||
@@ -232,6 +232,7 @@
|
||||
<div class="result-label">Nettovermögen Kauf</div>
|
||||
<div class="result-value" id="res_buyer_nw">—</div>
|
||||
<div class="result-sub" id="res_buy_cost">Gesamtausgaben: —</div>
|
||||
<div class="result-sub" style="color:var(--text-hint)">inkl. Verkaufskosten</div>
|
||||
</div>
|
||||
<div class="result-card rent-card">
|
||||
<div class="result-label">Nettovermögen Miete</div>
|
||||
|
||||
1
ui.js
1
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('<br>')));
|
||||
|
||||
Reference in New Issue
Block a user