ol.breadcrumb li = link_to "Relatórios", intermodulos_movimentacoes_do_estoque_path(@estoques.first.tipo_de_material), class: 'link_breadcrumb' li.active | #{@estoques.first.titulo_do_tipo_de_material} .widget h3.show-header style="font-weight: bold" | #{@estoques.first.titulo_do_tipo_de_material} h5.show-header span style="font-weight: bold" Elemento de Despesa: | #{@estoques.first.try(:sub_elemento_de_despesa).try(:elemento_de_despesa).try(:codigo_e_descricao)} hr .widget-body .row .col-sm-6 p span style="font-weight: bold" Unidade Orçamentária: | #{@estoques.first.try(:unidade_orcamentaria).try(:codigo_e_nome)} .col-sm-6 p span style="font-weight: bold" Almoxarifado: | #{@estoques.first.try(:almoxarifado).try(:codigo_e_nome)} .row .col-sm-6 p span style="font-weight: bold" Data Inicial: | #{params[:data_inicial]} .col-sm-6 p span style="font-weight: bold" Data Final: | #{params[:data_final]} .widget .widget-body .table-responsive table.table.table-hover thead tr th.text-center width="40%" Sub elemento de Despesa th.text-center width="20%" Entrada th.text-center width="20%" Saida th.text-center width="20%" Saldo tbody - @estoques.each do |estoque| tr td.text-center = estoque.try(:sub_elemento_de_despesa).try(:codigo_e_descricao) td.text-center.text-success style="font-weight: 600" = estoque.entradas_dos_estoques_com_mesmo_sub_elemento_entre_datas(params[:data_inicial], params[:data_final]).try(:contabil) td.text-center.text-danger style="font-weight: 600" = estoque.saidas_dos_estoques_com_mesmo_sub_elemento_entre_datas(params[:data_inicial], params[:data_final]).try(:contabil) td.text-center.text-warning style="font-weight: 600" = estoque.total_dos_estoques_com_mesmo_sub_elemento(params[:data_inicial], params[:data_final]).try(:contabil)