fixed faulty input name

use common clean_currency method

git-svn-id: https://dev.finn.de/svn/cockpit/trunk@203 7926756e-e54e-46e6-9721-ed318f58905e
pull/6827/head
hjust 15 years ago
parent 3c4d5f971b
commit 320dfbecdf
  1. 2
      app/controllers/costlog_controller.rb
  2. 2
      app/views/costlog/edit.rhtml

@ -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

@ -25,7 +25,7 @@
<%= number_to_currency(@cost_entry.calculated_costs) %>
</span>
<%= 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 %>

Loading…
Cancel
Save