- configuracao = Configuracao.last - unidade_orcamentaria = Loa::UnidadeOrcamentaria.find(@unidade_orcamentaria) rescue nil - if unidade_orcamentaria.present? && (unidade_orcamentaria != 'CONSOLIDADO' && unidade_orcamentaria != 'Todas as Unidades') && unidade_orcamentaria.orgao.tipo_de_unidade_administrativa.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 - if @relatorio_da_contabilidade.try(:relatorio) == 'despesa_por_classificacao_economica' table thead tr th width="52%" Código e Específicação th width="12%" LOA + Créditos(a) th width="12%" Valor Empenhado th width="12%" Valor Liquidado th width="12%" Valor Pago - if @relatorio_da_contabilidade.try(:relatorio) == 'despesa_por_funcao_e_subfuncao' table style="width: 100%" thead tr th width="44%" Código e Específicação th width="20%" Dotação Orçamentária Atualizada th width="12%" Valor Empenhado th width="12%" Valor Liquidado th width="12%" Valor Pago - if @relatorio_da_contabilidade.try(:relatorio) == 'despesa_por_fonte_funcao_subfuncao_e_classificacao_economica' table style="width: 100%" thead tr th width="40%" Código th width="20%" Dotação Orçamentária Inicial th width="10%" LOA + Créditos(a) th width="10%" Valor Empenhado th width="10%" Valor Liquidado th width="10%" Valor Pago / Relatórios Financeiros - if @relatorio_da_contabilidade.try(:relatorio) == 'empenhado_a_pagar' table style="width: 100%" thead tr th width="60%" Dotação/Valor do Empenho th width="20%" Credor th width="20%" Valor a Pagar (R$) - if @relatorio_da_contabilidade.try(:relatorio) == 'pagamento' table style="width: 100%" thead tr th style="font-size: 13px;" width="60%" Dotação th style="font-size: 13px;" width="10%" Numero do Pagamento th style="font-size: 13px;" width="15%" Empenho th style="font-size: 13px;" width="15%" Sub-Empenho th style="font-size: 13px;" width="10%" Valor - if @relatorio_da_contabilidade.try(:relatorio) == 'balancete_de_contas' table style="width: 100%" thead tr th style="font-size: 13px;" width="70%" Descrição th style="font-size: 13px;" width="15%" Entradas th style="font-size: 13px;" width="15%" Saídas - if @relatorio_da_contabilidade.try(:relatorio) == 'diario_de_contas' table style="width: 100%" thead tr th style="font-size: 13px;" width="7%" Dia th style="font-size: 13px;" width="25%" Histórico th style="font-size: 13px;" width="10%" Doc. Ex th style="font-size: 13px;" width="15%" Débitos th style="font-size: 13px;" width="15%" Créditos th style="font-size: 13px;" width="15%" Saldo - if @origem == 'balancete' table style="width: 100%; margin-bottom: 0px;" thead style="width: 100%; margin-bottom: 0px;" tr style="width: 100%; margin-bottom: 0px;" th rowspan="2" width="7.5%" Conta th rowspan="2" Título th rowspan="2" width="100" Saldo Inicial th colspan="2" width="100" Débitos th colspan="2" width="100" Créditos th rowspan="2" width="100" Saldo Final tr style="width: 100%; margin-bottom: 0px;" th width="100" No período th width="100" Até o período th width="100" No período th width="100" Até o período - if @relatorio_da_contabilidade.try(:relatorio) == 'despesa_por_subelemento' table style="width: 100%" thead tr th style="font-size: 13px;" width="15%" Código th style="font-size: 13px;" width="25%" Especificação th style="font-size: 13px;" width="20%" Valor Empenhado (R$) th style="font-size: 13px;" width="20%" Valor Liquidado (R$) th style="font-size: 13px;" width="20%" Valor Pago (R$)