[#4552] Add the Total hours to the Deliverable details

This commit is contained in:
Eric Davis
2010-09-29 11:29:04 -07:00
parent f37306aace
commit 632cff8f7f
5 changed files with 133 additions and 7 deletions
+17
View File
@@ -159,6 +159,23 @@ class RetainerDeliverable < HourlyDeliverable
end
end
def hours_spent_total(date=nil)
case scope_date_status(date)
when :in
return 0 if issues.empty?
TimeEntry.sum(:hours, :conditions => {
:issue_id => issues.collect(&:id),
:tyear => date.year,
:tmonth => date.month
})
when :out
0
else
super
end
end
def fixed_budget_total(date=nil)
case scope_date_status(date)
when :in