-if item_ativo - if @pedido.contem_itens_por_preco_e_desconto_ao_mesmo_tempo? legend strong Itens por Desconto .table-responsive table.table.table-hover.font-small thead tr th Item th width="150px" Valor Previsto th width="150px" Valor Previsto Geral (Consolidado) - if item_ativo th width="145px" Maior Desconto th width="145px" Desconto Médio th - if @pedido.coleta_de_preco? && esta_autorizado?(:anular_item) th width="90px" Anular tbody - @pedido.itens_do_pedido.por_desconto.where(valido:true).order(:id).each do |item_do_pedido| tr td = item_do_pedido.item.try(:codigo_descricao_unidade_codigo_da_prefeitura) td = item_do_pedido.valor_previsto_por_unidade_orcamentaria(@pedido.unidade_orcamentaria_id).to_f.valor_financeiro td.bold = item_do_pedido.valor_total_previsto_por_desconto.to_f.valor_financeiro - if item_ativo td align="left" = "#{item_do_pedido.maior_preco.to_f.valor_contabil}%" td align="left" = "#{item_do_pedido.preco_medio.to_f.valor_contabil}%" td - if item_do_pedido.valido && @pedido.coleta_de_preco? && item_do_pedido.itens_do_pedido_por_pessoa.empty? td - if esta_autorizado?(:anular_item) = link_to motivo_anular_item_licitacao_pedido_path(@pedido.id, item_do_pedido), class: "btn btn-danger btn-sm icone-anular" do span Anular - if item_ativo tr td colspan="2" b TOTAL td align="left" b = @pedido.valor_previsto_dos_itens_por_desconto.to_f.real_contabil td colspan="4" -if item_ativo == false && @pedido.itens_do_pedido.por_desconto.where(valido: false).count != 0 - if @pedido.contem_itens_por_preco_e_desconto_ao_mesmo_tempo? legend strong Itens por Desconto .table-responsive table.table.table-hover.font-small thead tr th Item th width="150px" Valor Previsto th width="150px" Valor Previsto Geral (Consolidado) - if item_ativo th width="145px" Maior Desconto th width="145px" Desconto Médio th - if @pedido.coleta_de_preco? && esta_autorizado?(:anular_item) th width="90px" Anular tbody - @pedido.itens_do_pedido.por_desconto.where(valido:false).order(:id).each do |item_do_pedido| tr td = item_do_pedido.item.try(:codigo_descricao_unidade_codigo_da_prefeitura) td = item_do_pedido.valor_previsto_por_unidade_orcamentaria(@pedido.unidade_orcamentaria_id).to_f.valor_financeiro td.bold = item_do_pedido.valor_total_previsto_por_desconto.to_f.valor_financeiro - if item_ativo td align="left" = "#{item_do_pedido.maior_preco.to_f.valor_contabil}%" td align="left" = "#{item_do_pedido.preco_medio.to_f.valor_contabil}%" td - unless item_do_pedido.valido? td align="left" = "Item Anulado".html_safe