[#4420] Allow an optional date param. Used by redmine_contracts.
This commit is contained in:
@@ -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|
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user