{{define "content"}} {{$d := .}}

{{$d.T.Get "goals.title"}}

{{$d.T.Get "goals.tab_committed"}} {{$d.T.Get "goals.tab_planner"}}
{{if eq $d.Tab "goals"}} {{/* ─── GOALS TAB ─────────────────────────────────────────────────────── */}}
{{if $d.AvgMonthlySavings}}

{{$d.T.Get "goals.summary_cards.avg_monthly_savings"}}

€0

{{$d.T.Get "goals.summary_cards.last_3_months"}}

{{end}}

{{$d.T.Get "goals.summary_cards.income"}}

€0

{{$d.T.Get "goals.summary_cards.this_month"}}

{{$d.T.Get "goals.summary_cards.goal_funded"}}

€0

{{$d.T.Get "goals.summary_cards.tagged_transactions"}}

{{$d.T.Get "goals.summary_cards.free_cash"}}

€0

{{$d.T.Get "goals.summary_cards.after_goals"}}

{{if $d.Goals}}
{{range $d.Goals}}
{{if eq .Type "once"}}🎯{{else if eq .Type "deposit"}}🏠{{else if eq .Type "emergency"}}🛡️{{else}}📈{{end}}
{{.Name}}
{{if eq .Type "once"}}{{$d.T.Get "goals.goal_card.type_once"}}{{else if eq .Type "deposit"}}{{$d.T.Get "goals.goal_card.type_deposit"}}{{else if eq .Type "emergency"}}{{$d.T.Get "goals.goal_card.type_emergency"}}{{else}}{{$d.T.Get "goals.goal_card.type_recurring"}}{{end}}
€{{cents .SavedCents}} {{$d.T.Get "goals.goal_card.saved_of"}} €{{cents .TargetCents}} {{.ProgressPct}}%
{{$d.T.Get "goals.goal_card.need_per_month"}}?
Monthly amount neededHow much to set aside each month to hit your target by the deadline.(Target − Saved) ÷ Months remaining
€0
{{$d.T.Get "goals.goal_card.months_left"}}
{{.MonthsLeft}}
{{$d.T.Get "goals.goal_card.at_current_rate"}}?
At current rateHow many months it would actually take based on your average monthly savings. Green = on time, red = late.
{{if gt .MonthsAtCurrentRate 0}}
{{.MonthsAtCurrentRate}}mo
{{else}}
{{end}}
{{$d.T.Get "goals.goal_card.disposable_after"}}?
Free cash after this goalYour estimated monthly free cash if you commit to this goal. Red means you'd need to cut spending elsewhere.Income − Living − All committed goals − This goal
€0
{{if .Feasible}} ✓ On track — your current savings rate covers €{{cents .MonthlyCents}}/month with {{.MonthsLeft}} months to go. {{else}} ⚠ At your current rate (€{{cents $d.AvgMonthlySavings}}/mo) you'd reach this in {{.MonthsAtCurrentRate}} months — {{sub .MonthsAtCurrentRate .MonthsLeft}} months late. {{end}} {{if and (not .Feasible) (gt .MonthsAtCurrentRate 0)}}
{{end}}
{{if .Committed}} {{else}} {{end}}
{{$d.T.Get "goals.goal_card.btn_fund"}}
{{$d.T.Get "goals.goal_card.funding_history"}} €{{cents .SavedCents}} {{$d.T.Get "goals.goal_card.saved_of"}} €{{cents .TargetCents}}
{{if .FundingTxns}}
{{range .FundingTxns}}
{{.Date.Format "02 Jan"}} {{.Description}} €{{cents (abs .AmountCents)}}
{{end}}
{{else}}

{{$d.T.Get "goals.goal_card.no_funding_yet"}}

{{end}}
{{end}}
{{else}}
🎯

{{$d.T.Get "goals.empty.title"}}

{{$d.T.Get "goals.empty.desc"}}

1
Open the Goal Planner

Simulate how much you need to save monthly and by when. Try different deadlines to find a realistic target.

2
Commit to the goal

Mark a goal as committed so it appears in your waterfall and "what now?" prompts on the dashboard.

3
Fund it every month

Add expense transactions tagged to this goal, or link a spending category in Settings to auto-tag them.

{{$d.T.Get "goals.empty.btn_open_planner"}}
{{end}} {{else}} {{/* ─── PLANNER TAB ─────────────────────────────────────────────────────── */}} {{$r := $d.PlanResult}} {{$pr := $d.PurchaseResult}}

{{$d.T.Get "goals.planner.what_kind"}}

🛒
{{$d.T.Get "goals.planner.purchase_title"}}
{{$d.T.Get "goals.planner.purchase_desc"}}
🔄
{{$d.T.Get "goals.planner.transition_title"}}
{{$d.T.Get "goals.planner.transition_desc"}}
{{if eq $d.PlannerType "purchase"}}

{{$d.T.Get "goals.planner.purchase.form_title"}}

{{if $d.HasPurchaseResult}}

{{$d.T.Get "goals.planner.purchase_result.card_at_rate"}}

{{if gt $pr.MonthsNeeded 0}}
{{$pr.YearsNeeded}}y {{$pr.RemMonths}}m

{{$d.T.Get "goals.planner.purchase_result.reach_label"}} {{dateShort $pr.ReachDate}}

{{else}}

{{$d.T.Get "goals.planner.purchase_result.enter_monthly"}}

{{end}}

{{$d.T.Get "goals.planner.purchase_result.card_monthly_needed"}}

{{if $pr.HasDeadline}}
€{{cents $pr.MonthlyNeededForDeadline}}

{{$d.T.Get "goals.planner.purchase_result.to_hit_deadline"}} {{dateShort $pr.DeadlineDate}}

{{else}}

{{$d.T.Get "goals.planner.purchase_result.set_target_date"}}

{{end}}

{{$d.T.Get "goals.planner.purchase_result.card_target"}}

€{{cents $pr.TargetCents}}

{{$d.T.Get "goals.planner.purchase_result.your_goal_amount"}}

{{if $pr.HasDeadline}}
{{if $pr.Feasible}} ✓ On track — €{{cents $pr.MonthlySavingsCents}}/mo covers the required €{{cents $pr.MonthlyNeededForDeadline}}/mo. {{else}} ⚠ You need €{{cents $pr.MonthlyNeededForDeadline}}/mo to hit the deadline but you're saving €{{cents $pr.MonthlySavingsCents}}/mo. At your current rate you'll get there in {{$pr.MonthsNeeded}} months ({{dateShort $pr.ReachDate}}). {{end}}
{{end}}

{{$d.T.Get "goals.planner.purchase_result.save_as_goal_title"}}

{{$d.T.Get "goals.planner.purchase_result.save_as_goal_desc"}}

{{end}} {{else if eq $d.PlannerType "transition"}}

{{$d.T.Get "goals.planner.transition.form_title"}}

{{if $d.HasPlanResult}} {{if $r.Warning}}
⚠️ {{$r.Warning}}
{{end}}

{{$d.T.Get "goals.planner.transition_result.card_total_timeline"}}

{{$r.TotalYears}}y {{$r.TotalRemMonths}}m

{{$d.T.Get "goals.planner.transition_result.until_paid_off"}}

{{$d.T.Get "goals.planner.transition_result.card_final_monthly"}}

€{{cents $r.Phase4MonthlyCents}}

{{$d.T.Get "goals.planner.transition_result.after_selling"}}

{{$d.T.Get "goals.planner.transition_result.card_total_interest"}}

€{{cents $r.TotalInterestCents}}

{{$d.T.Get "goals.planner.transition_result.across_both_loans"}}

{{$d.T.Get "goals.planner.transition_result.card_free_by"}}

{{dateShort $r.FinalDate}}

{{$d.T.Get "goals.planner.transition_result.fully_paid_off"}}

{{$d.T.Get "goals.planner.transition_result.roadmap_title"}}

1
{{$d.T.Get "goals.planner.transition_result.phase1_title"}}
{{if gt $r.Phase1Months 0}}
{{$r.Phase1Months}}mo
until {{dateShort $r.Phase1EndDate}}
{{$d.T.Get "goals.planner.transition_result.phase1_target"}} €{{cents $r.DownPaymentCents}}
{{$d.T.Get "goals.planner.transition_result.phase1_already_have"}} €{{cents $r.AlreadyHaveCents}}
{{$d.T.Get "goals.planner.transition_result.phase1_still_need"}} €{{cents $r.StillNeededCents}}
{{$d.T.Get "goals.planner.transition_result.phase1_saving"}} €{{cents $r.Form.MonthlySavingsCents}}/mo
{{else}}
{{$d.T.Get "goals.planner.transition_result.phase1_ready"}}
{{$d.T.Get "goals.planner.transition_result.phase1_equity_covers"}}
{{$d.T.Get "goals.planner.transition_result.phase1_down_payment"}} €{{cents $r.DownPaymentCents}}
{{$d.T.Get "goals.planner.transition_result.phase1_your_equity"}} €{{cents $r.AlreadyHaveCents}}
{{end}}
2
{{$d.T.Get "goals.planner.transition_result.phase2_title"}}
{{$r.Phase2Months}}mo
until {{dateShort $r.Phase2EndDate}}
{{$d.T.Get "goals.planner.transition_result.phase2_new_loan"}} €{{cents $r.ConstructionLoanCents}}
{{if $r.CurrentLoan}}
{{$d.T.Get "goals.planner.transition_result.phase2_existing_loan"}} €{{cents $r.CurrentMonthlyCents}}/mo
{{end}}
{{$d.T.Get "goals.planner.transition_result.phase2_new_emi"}} €{{cents $r.ConstructionMonthly}}/mo
{{$d.T.Get "goals.planner.transition_result.phase2_total_burden"}} €{{cents $r.Phase2MonthlyCents}}/mo
3
{{$d.T.Get "goals.planner.transition_result.phase3_title"}}
{{$d.T.Get "goals.planner.transition_result.phase3_one_time"}}
{{$d.T.Get "goals.planner.transition_result.phase3_after_acquisition"}}
{{$d.T.Get "goals.planner.transition_result.phase3_sale_price"}} €{{cents $r.SalePriceCents}}
{{$d.T.Get "goals.planner.transition_result.phase3_pay_off"}} -€{{cents $r.MortgagePayoffCents}}
{{$d.T.Get "goals.planner.transition_result.phase3_net_proceeds"}} €{{cents $r.NetProceedsCents}}
{{$d.T.Get "goals.planner.transition_result.phase3_applied"}}
4
{{$d.T.Get "goals.planner.transition_result.phase4_title"}}
{{if gt $r.Phase4Months 0}}
{{$r.Phase4Months}}mo
paid off {{dateShort $r.Phase4EndDate}}
{{$d.T.Get "goals.planner.transition_result.phase4_remaining_loan"}} €{{cents $r.RemainingBalanceCents}}
{{$d.T.Get "goals.planner.transition_result.phase4_monthly"}} €{{cents $r.Phase4MonthlyCents}}/mo
{{else}}
{{$d.T.Get "goals.planner.transition_result.phase4_fully_paid"}}
{{$d.T.Get "goals.planner.transition_result.phase4_sale_cleared"}}
{{$d.T.Get "goals.planner.transition_result.phase4_no_remaining"}}
{{end}}

{{$d.T.Get "goals.planner.transition_result.chart_title"}}

{{$d.T.Get "goals.planner.transition_result.chart_subtitle"}}

{{$d.T.Get "goals.planner.transition_result.save_as_goal_title"}}

{{$d.T.Get "goals.planner.transition_result.save_as_goal_desc"}}

{{end}}{{/* end HasPlanResult */}} {{end}}{{/* end planner_type transition */}} {{end}}{{/* end tab */}} {{end}}