[#4183] Implemented Contract#estimated_hour_budget

This commit is contained in:
Eric Davis committed 2010-07-07 15:25:21 -07:00
1 parent e48045ab77
commit 26aac777e4
3 files changed
+23 -1

No files matched your search

+6
View File
@@ -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