.widget header h5 ' Lista de span.fw-semi-bold Retorno Bancários .widget-body - if @retornos_bancarios.empty? h6 Nenhum registro encontrado. - else .table-responsive table.table.table-hover thead tr th Data th.text-center Tipo th.text-center Remessa th.text-center Contrato th.text-center Qtd. th.text-center Status th width="80" tbody - @retornos_bancarios.each do |retorno_bancario| tr td = retorno_bancario.try(:created_at).to_date td.text-center = retorno_bancario.tipo.try(:upcase) td.text-center = retorno_bancario.numero_da_remessa td.text-center = retorno_bancario.numero_do_contrato td.text-center = retorno_bancario.itens_do_retorno_bancario.size td.text-center - if retorno_bancario.processado? - if retorno_bancario.itens_do_retorno_bancario.size == retorno_bancario.itens_do_retorno_bancario.where('codigo_de_retorno = 1').size span.label.label-success ==< "PROCESSADO" - elsif retorno_bancario.itens_do_retorno_bancario.where('codigo_de_retorno = 1').any? span.label.label-warning ==< "PROCESSADO PARCIALMENTE" - else span.label.label-danger ==< "NÃO PROCESSADO" td = link_to retorno_bancario, class: "btn btn-default btn-sm mb-xs", title: "Ver Detalhes" do i.icone-detalhar = will_paginate @retornos_bancarios, previous_label: "<", next_label: ">"