       if $nonCompliantItems.length
         $('.compliance-title').removeClass('hidden')
 
-
     displayReconciliateState: (event) ->
       $('#purchase_invoice_accepted_state').val('reconcile')
       $('#purchase_invoice_reconciliate_state').val('reconcile')

    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


      $('.reconcile-state').removeClass('hidden')

    displayAcceptedState: (event) ->
      $('#purchase_invoice_accepted_state').val('accepted')
      $('#purchase_invoice_reconciliate_state').val('to_reconcile')
