[#4184] Converted Labor Budget for HourlyDeliverables.

This commit is contained in:
Eric Davis
2010-07-14 10:30:40 -07:00
parent 70d57ee359
commit e6ab8ac3ab
2 changed files with 33 additions and 0 deletions
@@ -41,6 +41,12 @@ module RedmineContracts
@total = deliverable.total = old_deliverable['fixed_cost']
when 'HourlyDeliverable'
@total = old_deliverable['total_hours'].to_f * old_deliverable['cost_per_hour'].to_f
if old_deliverable['total_hours'].present? || old_deliverable['cost_per_hour'].present?
deliverable.labor_budgets << LaborBudget.new(:deliverable => deliverable,
:budget => @total,
:hours => old_deliverable['total_hours'])
end
else
@total = 0
end