[#4420] Allow an optional date param. Used by redmine_contracts.

This commit is contained in:
Eric Davis
2010-09-09 13:50:08 -07:00
parent edb58be9a2
commit 2e090df4e3
3 changed files with 3 additions and 3 deletions

View File

@@ -9,7 +9,7 @@ module OverheadDeliverablePatch
module InstanceMethods
# Cost of time logged to overhead activities
def overhead_spent
def overhead_spent(date=nil)
time_logs = issues.collect(&:time_entries).flatten
return time_logs.collect {|time_entry|

View File

@@ -10,7 +10,7 @@ module OverheadFixedDeliverablePatch
module InstanceMethods
# Amount of "billable" money spent on issues. Similar to +spent+
# but only billable time.
def labor_budget_spent
def labor_budget_spent(date=nil)
return 0.0 if self.fixed_cost.nil?
return self.fixed_cost unless self.issues.size > 0

View File

@@ -10,7 +10,7 @@ module OverheadHourlyDeliverablePatch
module InstanceMethods
# Amount of "billable" money spent on issues. Similar to +spent+
# but only billable time.
def labor_budget_spent
def labor_budget_spent(date=nil)
return 0.0 unless self.issues.size > 0
total = 0.0