[#4420] Changed the approach for Retainer calculations by using an optional parameter.
This commit is contained in:
1 parent
c8b86db4c4
commit
82dec74eb7
6 files changed
+127
-70
No files matched your search
@@ -11,7 +11,7 @@ class FixedDeliverable < Deliverable
|
||||
'F'
|
||||
end
|
||||
|
||||
def total
|
||||
def total(date=nil)
|
||||
read_attribute(:total) || 0.0
|
||||
end
|
||||
|
||||
@@ -22,9 +22,9 @@ class FixedDeliverable < Deliverable
|
||||
|
||||
# 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
|
||||
def profit_budget(date=nil)
|
||||
budgets = labor_budget_total(date) + overhead_budget_total(date)
|
||||
(total(date) || 0.0) - budgets
|
||||
end
|
||||
|
||||
# The amount of money remaining after expenses have been taken out
|
||||
|
||||
Reference in new issue
Block a user