Beispiel #1
0
 def date(self, date):
     c.title = "Log Time for %s" % date
     c.entry_title = "Timesheets for %s" % date
     c.date = datetime.datetime.strptime(date, "%Y-%m-%d").date()
     c.timesheets = Timesheet.for_date(c.date)
     c.total_time = sum(t.duration for t in c.timesheets)
     c.total_fee = sum(t.fee for t in c.timesheets)
     c.project_list = Project.objects()
     return render('/timesheet/timeform.html')
Beispiel #2
0
 def date(self, date):
     c.title = "Log Time for %s" % date
     c.entry_title = "Timesheets for %s" % date
     c.date = datetime.datetime.strptime(date, "%Y-%m-%d").date()
     c.timesheets = Timesheet.for_date(c.date)
     c.total_time = sum(t.duration for t in c.timesheets)
     c.total_fee = sum(t.fee for t in c.timesheets)
     c.project_list = Project.objects()
     return render('/timesheet/timeform.html')
Beispiel #3
0
 def index(self):
     today = datetime.date.today()
     c.title = "Log Time"
     c.entry_title = "Uninvoiced Entries"
     # FIXME: Surely mongoengine knows how to get References by not set?
     c.timesheets = Timesheet.objects(__raw__={'invoice': None}).order_by(
             "-date")
     c.total_time = sum(Decimal(t.duration) for t in c.timesheets)
     c.total_fee = sum(t.fee for t in c.timesheets)
     c.project_list = Project.objects()
     c.date = datetime.date.today()
     c.delete_column = True
     return render('/timesheet/timeform.html')
Beispiel #4
0
 def index(self):
     today = datetime.date.today()
     c.title = "Log Time"
     c.entry_title = "Uninvoiced Entries"
     # FIXME: Surely mongoengine knows how to get References by not set?
     c.timesheets = Timesheet.objects(__raw__={
         'invoice': None
     }).order_by("-date")
     c.total_time = sum(Decimal(t.duration) for t in c.timesheets)
     c.total_fee = sum(t.fee for t in c.timesheets)
     c.project_list = Project.objects()
     c.date = datetime.date.today()
     c.delete_column = True
     return render('/timesheet/timeform.html')
Beispiel #5
0
 def list(self):
     c.projects = Project.objects()
     return render('/project/project_list.html')
Beispiel #6
0
 def list(self):
     c.projects = Project.objects()
     return render("/project/project_list.html")