- configuracao = Configuracao.last - if @unidade_orcamentaria.present? && @unidade_orcamentaria.try(:orgao).try(:tipo_de_unidade_administrativa).try(:legislativo?) - titulo_principal = @unidade_orcamentaria.orgao.try(:nome).try(:upcase) - else - titulo_principal = configuracao.try(:nome_da_prefeitura).try(:upcase) .cabecalho .logo - if @unidade_orcamentaria.try(:logo_file_name).present? - logo = @unidade_orcamentaria.logo - else - logo = configuracao.brasao.url = wicked_pdf_image_tag logo, height: "90px", width: "110px", style: "margin-right: 20px;" - if configuracao.customizacao.exibir_prefeitura_municipal? h2 = titulo_principal h3 = "#{titulo1.try(:upcase) if local_variables.include?(:titulo1)}" h4 = "#{titulo2.try(:upcase) if local_variables.include?(:titulo2)}" h4 = "#{titulo3.try(:upcase) if local_variables.include?(:titulo3)}" h4 = "#{titulo4.try(:upcase) if local_variables.include?(:titulo4)}" - else h3 = "#{titulo1.try(:upcase) if local_variables.include?(:titulo1)}" h4 = "#{titulo2.try(:upcase) if local_variables.include?(:titulo2)}" h4 = "#{titulo3.try(:upcase) if local_variables.include?(:titulo3)}" h4 = "#{titulo4.try(:upcase) if local_variables.include?(:titulo4)}" br br br br / - hash_textos = {"titulo1" => titulo1, "titulo2" => titulo2}.select{|elemento, valor| !valor.blank? } / - if configuracao.customizacao.exibir_prefeitura_municipal? / h2 = titulo_principal / h2 style="color: white;" = " - " / - hash_textos.each do |texto| / h3 = texto[1].try(:upcase) / - (1..(2 - hash_textos.size)).map do |texto| br br br - if @lista_empenhos.present? br p style="color: #FFF" table style="width: 100%; border: 2px solid black" thead style="width: 100%;" tr style="font-size: 11px;" th style="width: 7%; border:none" b NÚMERO th style="width: 7%; border:none" b DATA th style="width: 7%; border:none" b MODALIDADE th style="width: 7%; border:none" b PROJ/ATIV th style="width: 10%; border:none" b ELEM.DESPESA th style="width: 7%; border:none" b SUB.ELEM th style="width: 14%; border:none" b FORNECEDOR th style="width: 13%; border:none" b UO th style="width: 10%; border:none" b FONTE - if @tipo == 'saldo' td style="width: 8%; border:none" b SALDO - else td style="width: 8%; border:none" b VALOR - if @lista_pagamentos.present? br p style="color: #FFF" table style="width: 100%; border: 1px solid black" thead style="width: 100%;" tr style="font-size: 11px;" th style="width: 8%; border:none" b NÚMERO th style="width: 7%; border:none" b DATA th style="width: 5%; border:none" b Nº EMPENHO th style="width: 8%; border:none" b ELEM.DESPESA th style="width: 8%; border:none" b SUB.ELEM th style="width: 24%; border:none" b FORNECEDOR th style="width: 10%; border:none" b NOTA FISCAL th style="width: 20%; border:none" b UO td style="width: 10%; border:none" b VALOR (R$) - if @lista_liquidacoes.present? br p style="color: #FFF" table style="width: 100%; border: 1px solid black" thead style="width: 100%;" tr style="font-size: 11px;" th style="width: 10%; border:none" b NÚMERO th style="width: 10%; border:none" b DATA th style="width: 8%; border:none" b ELEM.DESPESA th style="width: 8%; border:none" b SUB.ELEM th style="width: 24%; border:none" b FORNECEDOR th style="width: 10%; border:none" b NOTA FISCAL th style="width: 20%; border:none" b UO td style="width: 10%; border:none" b VALOR (R$) - if @lista_transferencias.present? br p style="color: #FFF" table style="width: 100%; border: 1px solid black" thead style="width: 100%;" tr style="font-size: 11px;" th style="width: 10%; border:none" b NÚMERO th style="width: 10%; border:none" b DATA th style="width: 15%; border:none" b CONTA ORIGEM th style="width: 10%; border:none" b UO th style="width: 15%; border:none" b CONTA DESTINO th style="width: 10%; border:none" b UO th style="width: 10%; border:none" b VALOR (R$) - if @cancelamentos_de_restos_a_pagar.present? p style="color: #FFF" table style="width: 100%; border: 1px solid black" thead style="width: 100%;" tr style="font-size: 11px;" th style="width: 10%; border:none" b DATA th style="width: 10%; border:none" b UNI. ORÇCAMENTÁRIA th style="width: 8%; border:none" b TIPO th style="width: 8%; border:none" b DECRETO th style="width: 24%; border:none" b MOTIVO th style="width: 10%; border:none" b VALOR TOTAL - if @empenhos.present? p style="color: #FFF" table style="width: 100%; border: 1px solid black" thead style="width: 100%;" tr style="font-size: 11px;" th style="width: 10%; border:none" b DOTAÇÃO th style="width: 10%; border:none" b EMPENHO - if @fornecedor.blank? th style="width: 10%; border:none" b FORNECEDOR th style="width: 10%; border:none" b VALOR EMPENHO th style="width: 10%; border:none" b ANULAÇÃO th style="width: 10%; border:none" b VALOR ANULADO th style="width: 10%; border:none" b VALOR REAL EMPENHADO - if @lista_de_anulacoes.present? p style="color: #FFF" table style="width: 100%; border: 1px solid black" thead style="width: 100%;" tr style="font-size: 11px;" th style="width: 15%; border:none" b DATA th style="width: 15%; border:none" b Nº DO TALÃO - if params[:tipo_de_anulacao] == "orcamentario" th style="width: 25%; border:none" b NATUREZA th style="width: 30%; border:none" b especificação - else th style="width: 55%; border:none" b CONTA th style="width: 15%; border:none" b VALOR - if @lista_de_taloes.present? p style="#FFF" table style="width: 100%; border: 1px solid black" thead style="width: 100%;" tr style="font-size: 11px;" th style="width: 10%; border:none" b DATA th style="width: 10%; border:none" b Nº DO TALÃO th style="width: 10%; border:none" b UO th style="width: 35%; border:none" b RECEITA th style="width: 10%; border:none" b VALOR - if @despesas_extra_orcamentarias.present? p style="color: #FFF" table style="width: 100%; border: 1px solid black" thead style="width: 100%;" tr style="font-size: 11px;" th.centralizar style="width: 5%; border:none" b DATA th.centralizar style="width: 5%; border:none" b Nº DO PAGAMENTO th.centralizar style="width: 35%; border:none" b UNID. ORÇCAMENTÁRIA th.centralizar style="width: 10%; border:none" b CÓD. DESPESA th.centralizar style="width: 30%; border:none" b FORNECEDOR th.alinhar_a_direita style="width: 10%; border:none" b VALOR TOTAL