[#4551] Change the Budget conversion to convert materials as FixedBudget items
This commit is contained in:
@@ -140,15 +140,15 @@ module RedmineContracts
|
||||
total ||= 0
|
||||
|
||||
if old_deliverable['materials'].present? && old_deliverable['materials'] > 0.0
|
||||
deliverable.overhead_budgets << OverheadBudget.new(:deliverable => deliverable,
|
||||
:budget => old_deliverable['materials'],
|
||||
:hours => 0)
|
||||
deliverable.fixed_budgets << FixedBudget.new(:deliverable => deliverable,
|
||||
:budget => old_deliverable['materials'],
|
||||
:markup => 0)
|
||||
|
||||
elsif old_deliverable['materials_percent'].present? && old_deliverable['materials_percent'] > 0.0
|
||||
materials = total * (old_deliverable['materials_percent'].to_f / 100)
|
||||
deliverable.overhead_budgets << OverheadBudget.new(:deliverable => deliverable,
|
||||
:budget => materials,
|
||||
:hours => 0)
|
||||
deliverable.fixed_budgets << FixedBudget.new(:deliverable => deliverable,
|
||||
:budget => materials,
|
||||
:markup => 0)
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user