diff contrib/zeiterfassung @ 59:58bfac26a9ff

add displaying of total time in all projects
author Björn Ricks <bjoern.ricks@intevation.de>
date Tue, 03 May 2011 14:37:23 +0200
parents 9826dcbf119f
children 9df5d62e6f7e
line wrap: on
line diff
--- a/contrib/zeiterfassung	Tue May 03 14:31:11 2011 +0200
+++ b/contrib/zeiterfassung	Tue May 03 14:37:23 2011 +0200
@@ -211,6 +211,7 @@
                     cur.execute(ALL_PROJECT_IDS);
                     project_ids = cur.fetchall()
 
+                total = 0
                 for project_id, project, proj_desc in project_ids:
                     print "# project: %s (%s)" % (project, proj_desc)
                     if not week is None:
@@ -241,7 +242,9 @@
                             user,
                             workpackage,
                             c)
+                    total += total_proj
                     print "# total: %sh\n\n" % human_time(total_proj)
+                print "# total all projects: %sh\n\n" % human_time(total)
         finally:
             tolerantClose(cur)
             tolerantClose(con)
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)