       else
         $("##{itemFieldId}").val(checkedItemId)
 
-
     createLinesWithSelectedItems: (modal, displayedItemIds, event) ->
       itemsCheckboxes = $(modal).find('.item-checkbox:checked')
 

          action = $form.attr('action')
          datas['reception'] = action.substr(action.lastIndexOf('/') + 1)


      $.ajax
        url: url
        data: datas

    event.stopPropagation()
    E.reconciliation.displayReconciliationModal(event, {})

  $(document).on 'click', '#showItemReconciliationModal', (event) ->
    event.stopPropagation()
    itemFieldId = $(event.target).closest('.form-field').find('.purchase-item-attribute').attr('id')
    E.reconciliation.displayReconciliationModal(event, { reconciliate_item: true, item_field_id: itemFieldId })

  $(document).ready ->
    if $('#purchase_process_reconciliation').length > 0
