     $(this).parent().find("select[id$='working_unit']").val(unit)
 
   # manages selects to show only indicators in relation with the given variant
-  $(document).on 'change', "input:hidden[data-parameter-name='variant_id']", ->
+  $(document).on 'selector:change', "input:hidden[data-parameter-name='variant_id']", ->
     variant_id = $(this).attr('value')
     console.log(variant_id)
     indicator_select = $(this).parent().find("input[name='budget_indicator']")

  # updates working indicator measure values
  $(document).on 'change', "select[id^='production_working_']", ->
    updateIndicatorsValues()
  $(document).on 'change', "input:hidden[data-parameter-name='storage_id']", ->
    updateIndicatorValue($(this))

  # manages working indicator and working unit

(($) ->
  'use strict'
  # usefull functions
  updateItems = () ->
    $(".budget_nested_fields").filter(':visible').each ->
      default_value = $(this).find("input.homogeneous").filter(':visible').first().val()
