diff --git a/app/controllers/costlog_controller.rb b/app/controllers/costlog_controller.rb index 26bb4d4578..2f8b07d86c 100644 --- a/app/controllers/costlog_controller.rb +++ b/app/controllers/costlog_controller.rb @@ -93,7 +93,7 @@ class CostlogController < ApplicationController end if params[:cost_entry].is_a?(Hash) - params[:cost_entry][:overridden_costs] = clean_currency(params[:cost_entry][:overridden_costs]) + params[:cost_entry][:overridden_costs] = CostRate.clean_currency(params[:cost_entry][:overridden_costs]) end @cost_entry.attributes = params[:cost_entry] @cost_entry.cost_type ||= CostType.default diff --git a/app/views/costlog/edit.rhtml b/app/views/costlog/edit.rhtml index 6b21ff09fb..e7b8149d09 100644 --- a/app/views/costlog/edit.rhtml +++ b/app/views/costlog/edit.rhtml @@ -25,7 +25,7 @@ <%= number_to_currency(@cost_entry.calculated_costs) %> <%= update_page_tag do |page| - page << "makeEditable('cost_entry_costs', 'cost_entry[costs]');" + page << "makeEditable('cost_entry_costs', 'cost_entry[overridden_costs]');" page << "edit($('cost_entry_costs'), 'cost_entry[overridden_costs]', '#{number_to_currency(@cost_entry.overridden_costs)}');" if @cost_entry.overridden_costs end %> <% else %>