Adding dollar signs or % to amounts
* Added number_or_percent helper to return the correct string * Deliverable.labor_budget will now return 0.0 if it's nil #1274
This commit is contained in:
1 parent
d3cbbbb07f
commit
9989b6971b
4 files changed
+13
-7
No files matched your search
@@ -22,7 +22,7 @@ class FixedDeliverable < Deliverable
|
||||
|
||||
# Budget for the labor, excluding overhead, profit, and materials
|
||||
def labor_budget
|
||||
return read_attribute(:fixed_cost)
|
||||
return read_attribute(:fixed_cost) || 0.0
|
||||
end
|
||||
|
||||
end
|
||||
@@ -41,7 +41,7 @@ class HourlyDeliverable < Deliverable
|
||||
|
||||
# Budget for the labor, excluding overhead, profit, and materials
|
||||
def labor_budget
|
||||
return read_attribute(:cost_per_hour).to_f * read_attribute(:total_hours).to_f
|
||||
return (read_attribute(:cost_per_hour).to_f * read_attribute(:total_hours).to_f) || 0.0
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Reference in new issue
Block a user