[#4552] Add the Labor hours spent to the Deliverable details

This commit is contained in:
Eric Davis committed 2010-09-29 10:44:54 -07:00
1 parent 7a5599b4f9
commit 38f2bcb17f
5 files changed
+116 -2

No files matched your search

+13
View File
@@ -133,6 +133,19 @@ class RetainerDeliverable < HourlyDeliverable
end
end
def labor_hours_spent_total(date=nil)
case scope_date_status(date)
when :in
time_entries = issues.collect {|issue| issue.time_entries.all(:conditions => {:tyear => date.year, :tmonth => date.month}) }.flatten
billable_hours_on_time_entries(time_entries)
when :out
0
else
super
end
end
def fixed_budget_total(date=nil)
case scope_date_status(date)
when :in