Fix project hours output

This commit is contained in:
AndrewButer 2011-03-18 23:58:29 -04:00
parent 5bd9ce55d9
commit 6dea3bf1e8

View File

@ -111,7 +111,7 @@ class Window:
for i in range(8):
e = projTblCell(" ", pnum)
self.projects_table.attach(e, i + 1, i + 2, row, row + 1)
self.project_hour_labels[pnum][i] = l
self.project_hour_labels[pnum][i] = e.get_child()
row += 1
# Totals row
@ -197,6 +197,8 @@ class Window:
for day in range(7):
dt = str(self.monday + timedelta(day))
day_hours = self.ds.getProjectDailyHours(dt)
print day
print day_hours
for p in day_hours:
if p in self.project_hour_labels:
hrs = self.hoursFromSeconds(day_hours[p])
@ -204,6 +206,7 @@ class Window:
totals[p] = 0
totals[p] += float(hrs)
self.project_hour_labels[p][day].set_text(hrs)
print totals
for p in totals:
if p in self.project_hour_labels:
self.project_hour_labels[p][7].set_text(str(totals[p]))