{{define "content"}} {{$d := .}}
Orgs / {{$d.Org.Name}} / {{$d.FiscalYear.Label}} / Report

{{$d.FiscalYear.Label}} Year-End Report

Analysis
{{range $d.FiscalYears}} {{.Label}} {{end}}

Executive Summary

PLANNED INCOME
{{cents $d.TotalPlannedIncome}}
ACTUAL INCOME
{{cents $d.TotalActualIncome}}
PLANNED EXPENSE
{{cents $d.TotalPlannedExpense}}
ACTUAL EXPENSE
{{cents $d.TotalActualExpense}}
Planned net: {{cents (sub $d.TotalPlannedIncome $d.TotalPlannedExpense)}}
Actual net: {{cents (sub $d.TotalActualIncome $d.TotalActualExpense)}}
Events: {{len $d.EventReports}}
Period: {{dateShort $d.FiscalYear.StartDate}} — {{dateShort $d.FiscalYear.EndDate}}
{{range $d.EventReports}} {{$ev := .Event}}

{{$ev.Name}}

{{dateShort $ev.DateStart}} — {{dateShort $ev.DateEnd}}
{{if .Teams}}
{{range .Teams}}{{.Name}}{{end}}
{{end}}
PLAN INC
{{cents .PlannedIncome}}
ACT INC
{{cents .ActualIncome}}
PLAN EXP
{{cents .PlannedExpense}}
ACT EXP
{{cents .ActualExpense}}
{{if $ev.Description}}

{{$ev.Description}}

{{end}} {{if .BudgetLines}}
BUDGET LINES ({{len .BudgetLines}}) {{range .BudgetLines}} {{end}}
Category Description Type Planned
{{.Category}} {{.Description}} {{.Type}} {{cents .PlannedCents}}
{{end}} {{if .Comments}}
TEAM FEEDBACK
{{range .Comments}}
{{.UserEmail}} {{dateShort .CreatedAt}}

{{.Body}}

{{end}}
{{else if eq (print $d.FiscalYear.Status) "closed"}}

No team feedback submitted for this event.

{{end}}
{{else}}
📊

No events in this fiscal year

Events and their outcomes will appear here once created.

{{end}} {{if eq (print $d.FiscalYear.Status) "active"}}

⚠ This fiscal year is still active. The report will be final once the year is closed. Team feedback can be added after closing.

{{end}} {{end}}