Calc cleanup

This commit is contained in:
Eric Davis
2008-06-03 17:19:30 -07:00
parent 5180b5b218
commit 490bf73efe
8 changed files with 45 additions and 1 deletions
+8
View File
@@ -9,4 +9,12 @@ class FixedDeliverable < Deliverable
def spent
(self.progress.to_f / 100 ) * self.budget
end
def profit
if read_attribute(:profit_percent).nil?
return super
else
return (read_attribute(:profit_percent).to_f / 100.0) * read_attribute(:fixed_cost)
end
end
end