[#4184] Convert overhead percents.

This commit is contained in:
Eric Davis committed 2010-07-14 10:19:04 -07:00
1 parent 7865ee69ea
commit f0eb4812b5
2 files changed
+34 -1

No files matched your search

@@ -45,6 +45,23 @@ module RedmineContracts
case old_deliverable['type']
when 'FixedDeliverable'
deliverable.total = old_deliverable['fixed_cost']
if old_deliverable['overhead_percent'].present?
budget = old_deliverable['fixed_cost'] * (old_deliverable['overhead_percent'].to_f / 100)
deliverable.overhead_budgets << OverheadBudget.new(:deliverable => deliverable,
:budget => budget,
:hours => 0)
end
when 'HourlyDeliverable'
if old_deliverable['overhead_percent'].present?
budget = old_deliverable['total_hours'].to_f * old_deliverable['cost_per_hour'].to_f *
(old_deliverable['overhead_percent'].to_f / 100)
deliverable.overhead_budgets << OverheadBudget.new(:deliverable => deliverable,
:budget => budget,
:hours => 0)
end
else
# no-op
end