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

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

{{$d.T.Get "reports.chart_title"}}

{{$d.T.Get "reports.table_title"}}

{{range $cat, $_ := $d.CategoryNames}} {{$color := index $d.CategoryColors $cat}} {{end}} {{range $row := $d.MonthlyData}} {{$total := sub 0 0}} {{range $_, $v := $row.Totals}}{{$total = add $total $v}}{{end}} {{range $cat, $_ := $d.CategoryNames}} {{$v := index $row.Totals $cat}} {{end}} {{end}}
{{$d.T.Get "reports.col_month"}} {{if $color}}{{end}}{{$cat}} {{$d.T.Get "reports.col_total"}}
{{$row.Month}} {{if $v}}€{{cents $v}}{{else}}{{end}} €{{cents $total}}
{{end}}