diff options
Diffstat (limited to 'maconomy_hours.py')
-rw-r--r-- | maconomy_hours.py | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/maconomy_hours.py b/maconomy_hours.py index b41cd06..e11eed9 100644 --- a/maconomy_hours.py +++ b/maconomy_hours.py @@ -75,13 +75,11 @@ def ceo(timesheets, config, mailer): def summary(timesheets): - for timesheet in timesheets: - if timesheet.is_missing(): - print u"[Not created] {}".format(timesheet.employee) - elif not timesheet.is_submitted(): - print u"[Unsubmitted] {}".format(timesheet.employee) - elif not timesheet.is_approved(): - print u"[Not approved] {}".format(timesheet.employee) + affected = [t for t in timesheets if utils.need_manager_mail(t)] + for timesheet in affected: + print timesheet.status_summary() + print "Number of overdue timesheets: {}".format(len(affected)) + if __name__ == '__main__': args = cli.parse() |