Calc cleanup

This commit is contained in:
Eric Davis committed 2008-06-03 17:19:30 -07:00
1 parent 5180b5b218
commit 490bf73efe
8 files changed
+45 -1

No files matched your search

+8
View File
@@ -22,5 +22,13 @@ class HourlyDeliverable < Deliverable
return self.issues.collect(&:time_entries).flatten.collect(&:hours).sum
end
def profit
if read_attribute(:profit_percent).nil?
return super
else
return (read_attribute(:profit_percent).to_f / 100.0) * (read_attribute(:cost_per_hour) * read_attribute(:total_hours))
end
end
end