Calc cleanup
This commit is contained in:
1 parent
5180b5b218
commit
490bf73efe
8 files changed
+45
-1
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user