[#4183] Implemented Contract#profit_budget and Deliverable#profit_budget.

This commit is contained in:
Eric Davis committed 2010-07-13 10:28:45 -07:00
1 parent f89e0bf14a
commit 4d475042f0
6 files changed
+85 -1

No files matched your search

+7
View File
@@ -15,6 +15,13 @@ class FixedDeliverable < Deliverable
read_attribute(:total) || 0.0
end
# The amount of profit that is budgeted for this deliverable.
# Profit = Total - ( Labor + Overhead + Fixed + Markup )
def profit_budget
budgets = labor_budget_total + overhead_budget_total
(total || 0.0) - budgets
end
# Hardcoded value used as a wrapper for the old Budget plugin API.
#
# The Overhead plugin uses this in it's calcuations.