.widget header h5 ' Lista de span.fw-semi-bold Itens Recebidos .widget-body - if itens_do_recebimento_de_materiais.empty? h6 Nenhum registro encontrado. - else - itens = itens_do_recebimento_de_materiais.map{ |i| i.unidade_de_medida_de_conversao } - sub_elementos = itens_do_recebimento_de_materiais.map{|i| i.recebimento_de_material.sub_elemento_de_despesa.codigo_formatado_e_descricao}.uniq - sub_elementos.each do |sub_elemento| p = sub_elemento .table-responsive table.table.table-hover.table-striped.table-bordered thead tr th width="45%" Item th.text-center width="10%" Marca th.text-center width="10%" Vl. Unitário - if itens.any? th.text-center width="08%" UNID. DE MEDIDA th.text-center width="08%" Vl. Unitário th.text-center Qtde th.text-center width="10%" Vl. Total tbody - itens_do_recebimento_de_materiais.each do |item_do_recebimento_de_material| tr td = item_do_recebimento_de_material.descricao_codigo_na_prefeitura_e_unidade_destacada td.text-center = item_do_recebimento_de_material.try(:marca) td.text-center = item_do_recebimento_de_material.valor_unitario.to_f.real_contabil - if itens.any? td.text-center = item_do_recebimento_de_material.try(:unidade_de_medida_de_conversao).try(:descricao) td.text-center = item_do_recebimento_de_material.try(:valor_unitario_de_conversao).to_f.real_contabil if item_do_recebimento_de_material.try(:valor_unitario_de_conversao) != nil td.text-center = item_do_recebimento_de_material.quantidade.to_f.valor_contabil(minimum_precision: 4) td.text-center = item_do_recebimento_de_material.total.to_f.real_contabil