[#4183] Implemented Contract#estimated_hour_budget
This commit is contained in:
1 parent
e48045ab77
commit
26aac777e4
3 files changed
+23
-1
No files matched your search
@@ -42,6 +42,12 @@ class Deliverable < ActiveRecord::Base
|
||||
overhead_budgets.sum(:budget)
|
||||
end
|
||||
|
||||
# Total number of hours estimated in the Deliverable's budgets
|
||||
def estimated_hour_budget_total
|
||||
(labor_budgets.sum(:hours) || 0.0) +
|
||||
(overhead_budgets.sum(:hours) || 0.0)
|
||||
end
|
||||
|
||||
if Rails.env.test?
|
||||
generator_for :title, :method => :next_title
|
||||
|
||||
|
||||
Reference in new issue
Block a user