.widget header h5 ' Lista de span.fw-semi-bold Ocorrências .widget-body - if ocorrencias_do_empenho.empty? h6 Nenhum registro encontrado. - else - ocorrencias_do_empenho.includes(:pessoa_conta_bancaria_antiga, :pessoa_conta_bancaria_nova).order("created_at DESC").group_by{ |ocorrencia_do_empenho| ocorrencia_do_empenho.pessoa_conta_bancaria_antiga_id.present? }.each do |ocorrencia_de_troca_de_conta, ocorrencias| table.table.table-hover.table-responsive style="font-size: 14px;" thead tr th Data th.text-center width="15%" Ocorrência th.center width="15%" Motivo th width="30%" Observação - if ocorrencia_de_troca_de_conta th width="25%" Conta Antiga th width="25%" Conta Nova - else th width="25%" th width="25%" tbody - ocorrencias.each do |ocorrencia_do_empenho| tr td = ocorrencia_do_empenho.created_at.to_s[0..9] td.text-center width="15%" = Contabilidade::OcorrenciaDoEmpenho.localizar(:ocorrencia, ocorrencia_do_empenho.ocorrencia) -if Contabilidade::OcorrenciaDoEmpenho.localizar(:motivo, ocorrencia_do_empenho.motivo) td.center width="15%" = Contabilidade::OcorrenciaDoEmpenho.localizar(:motivo, ocorrencia_do_empenho.motivo) -else td.center width="15%" = "-" td width="30%" = ocorrencia_do_empenho.observacao - if ocorrencia_de_troca_de_conta - if ocorrencia_do_empenho.pessoa_conta_bancaria_antiga.present? td width="25%" = ocorrencia_do_empenho.pessoa_conta_bancaria_antiga.descricao - if ocorrencia_do_empenho.pessoa_conta_bancaria_nova.present? td width="25%" = ocorrencia_do_empenho.pessoa_conta_bancaria_nova.descricao - else th width="25%" th width="25%"