summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorÖzgür Kesim <oec@kesim.org>2024-11-28 18:50:56 +0100
committerÖzgür Kesim <oec@kesim.org>2024-11-28 18:50:56 +0100
commit888ebed344d3c2fdb8140a3eeaf20f5139375932 (patch)
treeb50b853158c2c469c7f80b8fd3809de45a1e562e /templates
parent255c624b733e44e39392dd565da55d6f2350076f (diff)
added global totals
Diffstat (limited to 'templates')
-rw-r--r--templates/report.t15
-rw-r--r--templates/wp-total.t20
2 files changed, 20 insertions, 15 deletions
diff --git a/templates/report.t b/templates/report.t
index a9b6a59..f2cc359 100644
--- a/templates/report.t
+++ b/templates/report.t
@@ -8,15 +8,20 @@ Beneficiary: {{.Beneficiary}}
# Planing
-{{ range $l := .ParallelWPTotals }}
-{{. -}}
+Budgeted : {{ $totals.Budgeted }}
+ Planned : {{ $totals.Planned }}{{with $totals.Unaccounted}}
+ ! Open !: {{ . }}{{end}}
+ Done : {{ $totals.Done }}{{ with $totals.Open }}
+ ! TODO !: {{ . }}{{end}}
+
+{{ range .ParallelWPTotals }}{{.}}
{{ end }}
{{range $wp, $t := $totals.WP }}
Total for {{ $wp }}:
- - Budgeted: {{ printf "%8s" $t.Budgeted.AsDay }}
- - Planned: {{ printf "%8s" $t.Planned.AsDay }}{{with $t.Unaccounted }} !Unaccounted: {{printf "%8s" .AsDay}}{{end}}
- - Actual: {{ printf "%8s" $t.Done.AsDay }}{{with $t.Open }} !TODO: {{printf "%8s" .AsDay }}{{end}}
+ - Budgeted: {{ printf "%8s" $t.Budgeted.AsDay }}
+ - Planned: {{ printf "%8s" $t.Planned.AsDay }}{{with $t.Unaccounted }} !Unaccounted: {{printf "%8s" .AsDay}}{{end}}
+ - Actual: {{ printf "%8s" $t.Done.AsDay }}{{with $t.Open }} !TODO: {{printf "%8s" .AsDay }}{{end}}
- Per Task:
{{- range $n, $t := $t.Tasks }}
- {{ $n }}:{{ $tt := $p.TotalWPTask $wp $n }}
diff --git a/templates/wp-total.t b/templates/wp-total.t
index 90adf9b..a4cf2f8 100644
--- a/templates/wp-total.t
+++ b/templates/wp-total.t
@@ -1,17 +1,17 @@
Total for {{ .WP }}:
------------------
-Budgeted: {{ printf "%8s" .Budgeted.AsDay }}
- Planned: {{ printf "%8s" .Planned.AsDay }}{{with .Unaccounted }}
-! Open !: {{ printf "%8s" .AsDay}}{{end}}
- Actual: {{ printf "%8s" .Done.AsDay }}{{with .Open }}
-! TODO !: {{ printf "%8s" .AsDay }}{{end}}
+Budgeted : {{ printf "%8s" .Budgeted.AsDay }}
+ Planned : {{ printf "%8s" .Planned.AsDay }}{{with .Unaccounted }}
+ ! Open !: {{ printf "%8s" .AsDay}}{{end}}
+ Done : {{ printf "%8s" .Done.AsDay }}{{with .Open }}
+ ! TODO !: {{ printf "%8s" .AsDay }}{{end}}
Per Task:
{{ range $n, $t := .Tasks }}
»{{ $n }}«:
-Budgeted: {{ printf "%8s" $t.Budgeted.AsDay }}
- Planned: {{ printf "%8s" $t.Planned.AsDay }}{{with $t.Unaccounted }}
-! Open !: {{ printf "%8s" .AsDay}}{{end}}
- Actual: {{ printf "%8s" $t.Done.AsDay }}{{with $t.Open }}
-! TODO !: {{ printf "%8s" .AsDay}}{{end}}
+Budgeted : {{ printf "%8s" $t.Budgeted.AsDay }}
+ Planned : {{ printf "%8s" $t.Planned.AsDay }}{{with $t.Unaccounted }}
+ ! Open !: {{ printf "%8s" .AsDay}}{{end}}
+ Done : {{ printf "%8s" $t.Done.AsDay }}{{with $t.Open }}
+ ! TODO !: {{ printf "%8s" .AsDay}}{{end}}
{{ end }} \ No newline at end of file