Changed profit to take into account the overhead along with the total labor cost
when profit is a % * Fixed Models * Fixed JS Calculator * Cleaned up specs to access attributes directly #1349
This commit is contained in:
1 parent
5431df3d8d
commit
b776098c7d
7 files changed
+37
-14
No files matched your search
@@ -35,7 +35,9 @@ class HourlyDeliverable < Deliverable
|
||||
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))
|
||||
labor = (read_attribute(:cost_per_hour) * read_attribute(:total_hours))
|
||||
|
||||
return (read_attribute(:profit_percent).to_f / 100.0) * (labor + self.overhead)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in new issue
Block a user