- 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) == 'restos_a_pagar_por_classificacao_economica' table thead tr th width="52%" Código e Específicação 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) == 'restos_a_pagar_por_funcao_e_subfuncao' table style="width: 100%" thead tr th width="44%" Código e Específicação th width="12%" Valor Liquidado th width="12%" Valor Pago - if @relatorio_da_contabilidade.try(:relatorio) == 'saldo_de_restos_a_pagar' - if @relatorio_da_contabilidade.fonte_de_recurso.present? b style="font-size: 12px" Fonte de Recurso #{::Base::FonteDeRecursos.find(@relatorio_da_contabilidade.fonte_de_recurso)&.codigo_completo_e_descricao} table style="width: 100%; border:none; top: -5px;" thead style=" font-size: 11px;" tr th style="border:none; border-bottom: 1px solid #000; border-top: 1px solid #000; " width="8%" Dotação th style="border:none; border-bottom: 1px solid #000; border-top: 1px solid #000; " width="8%" Empenho th style="border:none; border-bottom: 1px solid #000; border-top: 1px solid #000; " width="#{@tamanho_coluna}%" Credor - if @exibir_nao_processado th style="border:none; border-bottom: 1px solid #000; border-top: 1px solid #000; " width="10%" Não Processado - if @inicial == false th style="border:none; border-bottom: 1px solid #000; border-top: 1px solid #000; " width="10%" Não Processado Liquidado - if @exibir_processado th style="border:none; border-bottom: 1px solid #000; border-top: 1px solid #000; " width="10%" Processado - if @exibir_nao_processado && @exibir_processado th style="border:none; border-bottom: 1px solid #000; border-top: 1px solid #000; " width="10%" Total - if @relatorio_da_contabilidade.try(:relatorio) == 'relatorio_receita_e_despesa_por_fonte' table.sem-borda style="width: 100%;" thead.linha-superior-e-inferior style="font-size: 12px;" tr.linha-superior-e-inferior style="font-size: 10px;" th.linha-superior-e-inferior width="40%" align="left" Fonte de Recurso th.linha-superior-e-inferior width="12%" Receita Realizada th.linha-superior-e-inferior width="12%" LOA + Créditos th.linha-superior-e-inferior width="12%" Despesa Empenhada th.linha-superior-e-inferior width="12%" Despesa Liquidada th.linha-superior-e-inferior width="12%" Despesa Paga - if @relatorio_da_contabilidade.try(:relatorio) == 'despesa_por_fonte_funcao_subfuncao_e_classificacao_economica' table style="width: 100%; border:none;" thead tr th style="font-size: 11px; border: none; border-top: 1px solid black; border-bottom: 1px solid black; width: 40%;" Classificação Econômica th style="font-size: 11px; border: none; border-top: 1px solid black; border-bottom: 1px solid black; width: 20%;" Dotação Orçamentária Inicial th style="font-size: 11px; border: none; border-top: 1px solid black; border-bottom: 1px solid black; width: 10%;" LOA + Créditos(a) th style="font-size: 11px; border: none; border-top: 1px solid black; border-bottom: 1px solid black; width: 10%;" Valor Empenhado th style="font-size: 11px; border: none; border-top: 1px solid black; border-bottom: 1px solid black; width: 10%;" Valor Liquidado th style="font-size: 11px; border: none; border-top: 1px solid black; border-bottom: 1px solid black; width: 10%;" Valor Pago - 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) == 'pagamentos_simplificado' table style="width: 100%; border-left: 0px !important; border-right: 0px !important;" thead.linha-superior-e-inferior tr.linha-superior-e-inferior th.centralizar style="font-size: 12px; width: 08%;" Data th.centralizar style="font-size: 12px; width: 07%;" Pagamento th.centralizar style="font-size: 12px; width: 22%;" Fornecedor th.centralizar style="font-size: 12px; width: 14%;" NF th.centralizar style="font-size: 12px; width: 09%;" Empenho th.centralizar style="font-size: 12px; width: 09%;" UG th.centralizar style="font-size: 12px; width: 14%;" Movimento th.centralizar style="font-size: 12px; width: 14%;" Valor - if @fornecedor.present? table style="border: none; width: 100%;" h4 = @credor.try(:nome_e_cpf_ou_cnpj) hr - if @relatorio_da_contabilidade.try(:relatorio) == 'pagamentos_detalhado' table style="width: 100%" thead tr th style="font-size: 13px;" width="11%" Data do PGTO th style="font-size: 13px;" width="16%" Pagamento th style="font-size: 13px;" width="20%" Nota Fiscal th style="font-size: 13px;" width="12%" Empenho th style="font-size: 13px;" width="20%" Movimento th style="font-size: 13px;" width="23%" Valor - if @relatorio_da_contabilidade.try(:relatorio) == 'check_para_pagamento' table.sem-borda style="width: 100%;" thead.sem-borda style="border:none; font-size: 10px;" tr.sem-borda th.centralizar style="border:none" width="10%" Data da Liquidação th.centralizar style="border:none" width="10%" Prazo Conforme Cronologia th.centralizar style="border:none" width="45%" Fornecedor th.centralizar style="border:none" width="10%" Número da NF th.centralizar style="border:none" width="15%" Valor th.centralizar style="border:none" width="10%" Check - 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 @relatorio_da_contabilidade.try(:relatorio) == "bens_moveis_incorporados" table thead tr style="font-size: 11px;font-weight: bold;" td align="center" style="border:none;" width="10%" = "Empenho" td style="border:none;" width="10%" = "Data LIQ" td style="border:none;" width="10%" = "Liquidacao" td style="border:none;" width="40%" = "Descrição" td style="border:none;" width="10%" = "Quantidade" td style="border:none;" width="10%" align="right" = "Valor Liquidado" td style="border:none;" width="10%" align="right" = "Total Liquidado" - if @relatorio_da_contabilidade.try(:relatorio) == 'movimento_extra_orcamentario' table style="width: 100%" thead tr th width="10%" style="font-size: 13px;" align="left" Dia th width="15%" style="font-size: 13px;" align="left" Talão/Despesa th width="30%" style="font-size: 13px;" align="center" Histórico th width="15%" style="font-size: 13px;" Créditos th width="15%" style="font-size: 13px;" Debitos th width="15%" style="font-size: 13px;" 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="11%" 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) == 'relatorio_saldo_dotacoes' table style="width: 100%" thead tr th align="left" style="font-size: 13px; border: none;" Dotação th align="center" style="font-size: 13px; border: none;" width="16%" Saldo da Dotação th align="center" style="font-size: 13px; border: none;" width="16%" Bloqueios th align="center" style="font-size: 13px; border: none;" width="16%" Dotação Disponível - if @relatorio_da_contabilidade.try(:relatorio) == 'bloqueio_de_dotacoes' table style="width: 100%" thead tr th align="left" style="font-size: 13px; border: none;" Dotação th align="center" style="font-size: 13px; border: none;" width="16%" Valor Bloqueado th align="center" style="font-size: 13px; border: none;" width="16%" Dotação Disponível - if @relatorio_da_contabilidade.try(:relatorio) == "pagamentos_por_classificacao" && @pagamentos.present? table style="width: 100%;" thead tr th width="20%" style="border:none" Dotação th width="10%" style="border:none" Data do Pagamento th width="10%" style="border:none" Liquidação th width="20%" style="border:none" Credor th width="15%" style="border:none" Pagamento th width="10%" style="border:none" NF th width="15%" style="border:none" Valor - if @relatorio_da_contabilidade.try(:relatorio) == 'liquidado_a_pagar_por_classificacao' table style="border: none; width: 100%;" - if @status.present? h3 style="display: inline; margin-down: 4%;" = "#{'Status: ' + Contabilidade::Liquidacao.status_i18n[@status]}" thead tr th align="left" style="font-size: 13px; border-right: none;" width="10%" Dotação th align="center" style="font-size: 13px; border-right: none;" width="12%" Liquidação th align="center" style="font-size: 13px; border-right: none;" width="20%" Credor th align="center" style="font-size: 13px; border-right: none;" width="16%" NF th align="center" style="font-size: 13px; border-right: none;" width="16%" Movimento th align="center" style="font-size: 13px; border-right: none;" width="16%" Valor - if @status.blank? th style="font-size: 13px; border-right: none;" width="8%" Status - if @relatorio_da_contabilidade.try(:relatorio) == 'arrecadacao_de_receita_por_fonte_e_classificacao_economica' table.sem-borda style="width: 100%; border-bottom: none" thead tr.linha-superior-e-inferior th.alinhar_a_esquerda style="border:none; width: 45%" Fonte/Classificação th.centralizar style="border:none; width: 15%" Previsão Loa th.centralizar style="border:none; width: 15%" Previsão Atualizada th.centralizar style="border:none; width: 15%" Valor Arrecadado th.centralizar style="border:none; width: 15%" Diferença th.centralizar style="border:none; width: 15%" % de Arrecadação - if @relatorio_da_contabilidade.try(:relatorio) == 'liquidacoes_detalhado' table style="width: 100%" thead tr th style="font-size: 13px;" width="11%" Data da Liquidação th style="font-size: 13px;" width="16%" Liquidação th style="font-size: 13px;" width="10%" Nota Fiscal - if @credor.present? th style="font-size: 13px;" width="42%" - else th style="font-size: 13px;" width="42%" Credor th style="font-size: 13px;" width="23%" Valor - if @relatorio_da_contabilidade.try(:relatorio) == 'movimentacao_orcamentaria' table style="border: none; width: 100%" thead tr th align="left" style="font-size: 11px; border-right: none; border-top: none" width="30%" Dotação th align="center" style="font-size: 11px; border-right: none; border-top: none" width="10%" Despesa Fixada th align="center" style="font-size: 11px; border-right: none; border-top: none" width="10%" Acréscimos th align="center" style="font-size: 11px; border-right: none; border-top: none" width="10%" Reduções th align="center" style="font-size: 11px; border-right: none; border-top: none" width="10%" Bloqueios th align="center" style="font-size: 11px; border-right: none; border-top: none" width="10%" Empenhado th align="center" style="font-size: 11px; border-right: none; border-top: none" width="10%" Liquidado th align="center" style="font-size: 11px; border-right: none; border-top: none" width="10%" Pago - if @relatorio_da_loa.try(:relatorio) == 'quadro_detalhamento_despesa' - if @relatorio_da_loa.unidade_orcamentaria.present? && @relatorio_da_loa.unidade_orcamentaria != "consolidado" - @unid = Loa::UnidadeOrcamentaria.find_by(id: @relatorio_da_loa.unidade_orcamentaria) h4 = "Órgão: #{@unid&.orgao&.nome}" h4 = "Unidade Orçamentária: #{@unid&.nome}" table style="width: 100%; font-size: 11pt; border: none; " thead style="border: none; font-size: 10pt;" tr style="border-bottom:1px solid black; border-top:1px solid black; border-left:none; border-right:none; padding-bottom: 20px" th.alinhar_a_esquerda style="border-left: none; border-right: none; border-bottom: none" width="10%" b Funcional Programática th.alinhar_a_esquerda style="border-left: none; border-right: none; border-bottom: none" width="20%" b Ação th.centralizar style="border-left: none; border-right: none; border-bottom: none" width="40%" b Elemento de Despesa th.centralizar style="border-left: none; border-right: none; border-bottom: none" width="5%" b IU th.centralizar style="border-left: none; border-right: none; border-bottom: none" width="15%" b Fonte de Recurso th.centralizar style="border-left: none; border-right: none; border-bottom: none" width="10%" b Valor - if @relatorio_da_loa.try(:relatorio) == 'relatorio_detalhamento_despesa_por_grupo' - if @relatorio_da_loa.unidade_orcamentaria.present? && @relatorio_da_loa.unidade_orcamentaria != "consolidado" - @unid = Loa::UnidadeOrcamentaria.find_by(id: @relatorio_da_loa.unidade_orcamentaria) h4 = "Órgão: #{@unid&.orgao&.nome}" h4 = "Unidade Orçamentária: #{@unid&.nome}" table style="width: 100%; font-size: 11pt; border: none; " thead style="border: none; font-size: 10pt;" tr style="border-bottom:1px solid black; border-top:1px solid black; border-left:none; border-right:none; padding-bottom: 20px" th.alinhar_a_esquerda style="border-left: none; border-right: none; border-bottom: none" width="15%" b Funcional Programática th.alinhar_a_esquerda style="border-left: none; border-right: none; border-bottom: none" width="15%" b Ação th.centralizar style="border-left: none; border-right: none; border-bottom: none" width="30%" b Grupo/Modalidade th.centralizar style="border-left: none; border-right: none; border-bottom: none" width="15%" b IU th.alinhar_a_esquerda style="border-left: none; border-right: none; border-bottom: none" width="20%" b Fonte de Recurso th.centralizar style="border-left: none; border-right: none; border-bottom: none" width="5%" b Valor - if @relatorio_da_contabilidade.try(:relatorio) == 'empenhado_a_pagar' - if @fornecedor.present? table style="width: 100%;" thead h4 = @fornecedor.try(:nome_e_cpf_ou_cnpj) tr th width="15%" style="border:none" Dotação th width="20%" style="border:none" Empenho th width="20%" style="border:none" Fornecedor th width="15%" style="border:none" Valor do Empenho* th width="15%" style="border:none" Saldo a Liquidar th width="15%" style="border:none" Saldo Liquidado a Pagar - else table style="width: 100%;" thead tr th width="15%" style="border:none" Dotação th width="20%" style="border:none" Empenho th width="20%" style="border:none" Fornecedor th width="15%" style="border:none" Valor do Empenho* th width="15%" style="border:none" Saldo a Liquidar th width="15%" style="border:none" Saldo Liquidado a Pagar - if @relatorio_da_loa.try(:relatorio) == 'demonstrativo_de_destinacao_da_receita' || @relatorio_da_loa.try(:relatorio) == 'demonstrativo_de_destinacao_da_despesa' p.alinhar_a_direita style="font-size: 9pt" = "Exercício #{contexto_atual.exercicio}" p.alinhar_a_direita style="font-size: 9pt" = "Valores em R$1,00" table style="width: 100%; font-size: 11pt; border: none; " thead style="border: none; font-size: 10pt;" tr style="border-bottom:1px solid black; border-top:1px solid black; border-left:none; border-right:none; padding-bottom: 20px" th.alinhar_a_esquerda style="border-left: none; border-right: none; border-bottom: none" width="35%" b Fonte de Recurso th.alinhar_a_direita style="border-left: none; border-right: none; border-bottom: none" width="20%" b Fiscal th.alinhar_a_direita style="border-left: none; border-right: none; border-bottom: none" width="20%" b Seguridade Social th.alinhar_a_direita style="border-left: none; border-right: none; border-bottom: none" width="25%" - if @relatorio_da_loa&.relatorio == 'despesa_dos_orcamentos_fiscal_e_seguridade_por_programa_e_unidade' p.alinhar_a_direita style="font-size: 9pt" = "Exercício #{contexto_atual.exercicio}" p.alinhar_a_direita style="font-size: 9pt" = "Valores em R$1,00" table style="width: 100%; font-size: 11pt; border: none; " thead style="border: none; font-size: 10pt;" th.alinhar_a_esquerda style="border-left: none; border-right: none; border-bottom: none" width="30%" b Fonte de Recurso th.alinhar_a_direita style="border-left: none; border-right: none; border-bottom: none" width="25%" b Fiscal th.alinhar_a_direita style="border-left: none; border-right: none; border-bottom: none" width="25%" b Seguridade Social th.alinhar_a_direita style="border-left: none; border-right: none; border-bottom: none" width="20%" b Total - if @relatorio_da_loa.try(:relatorio) == 'proposta_de_lei_orcamentaria' table style="width: 100%; font-size: 11pt; border: none; " thead style="border: none; font-size: 10pt;" tr style="border-bottom:1px solid black; border-top:1px solid black; border-left:none; border-right:none; padding-bottom: 20px" th style="border-left: none; border-right: none; border-bottom: none" width="60%" b Dotação th style="border-left: none; border-right: none; border-bottom: none" width="20%" b Empenho th style="border-left: none; border-right: none; border-bottom: none" width="20%" b Valor PLOA - if @relatorio_da_contabilidade&.relatorio == 'liquidado_a_pagar' h3 = "#{'Status: ' + Contabilidade::Liquidacao.status_i18n[@status] if @status.present?}" .br table style="border: none; width: 100%;" thead tr th style="border-right: none; font-size: 11pt" width="8%" Data th style="border-right: none; font-size: 11pt" width="11%" Liquidação th style="border-right: none; font-size: 11pt" width="30%" Fornecedor th.centralizar style="border-right: none; font-size: 11pt" width="10%" NF th style="border-right: none; font-size: 11pt" width="15%" Movimento th style="border-right: none; font-size: 11pt" width="10%" Valor - if @status.blank? th style="border-right: none; font-size: 11pt" width="8%" Status -else th style="border-right: none; font-size: 11pt" width="1%" - if @relatorio_da_contabilidade.try(:relatorio) == 'pagamento_do_iss' table style="width: 100%; border-right: none; border-left: none;" thead tr th.centralizar style="font-size: 11px; border:none" width="28%" Fornecedor th.centralizar style="font-size: 11px; border:none" width="8%" UG th.centralizar style="font-size: 11px; border:none" width="8%" Tipo th.centralizar style="font-size: 11px; border:none" width="8%" NF th.centralizar style="font-size: 11px; border:none" width="8%" Valor NF th.centralizar style="font-size: 11px; border:none" width="8%" Valoc BC th.centralizar style="font-size: 11px; border:none" width="8%" Alíquota th.centralizar style="font-size: 11px; border:none" width="8%" Valor Arrecadado com Desconto th.centralizar style="font-size: 11px; border:none" width="8%" Valor Sem Desconto th.centralizar style="font-size: 11px; border:none" width="8%" Diferença - if params[:relatorio] == 'livro_diario' table style="border-right: none; border-left: none; border-top: none;" thead tr th.centralizar style="font-size: 11px; border:none;" width="10%" Data th.centralizar style="font-size: 11px; border:none;" width="15%" Débito th.centralizar style="font-size: 11px; border:none;" width="5%" Subconta th.centralizar style="font-size: 11px; border:none;" width="15%" Crédito th.centralizar style="font-size: 11px; border:none;" width="5%" Subconta th.centralizar style="font-size: 11px; border:none;" width="15%" Centro de Custos th.centralizar style="font-size: 11px; border:none;" width="20%" Histórico th.alinhar_a_direita style="font-size: 11px; border:none;" width="15%" Valor - if @relatorio_da_contabilidade.try(:relatorio) == 'cancelamento_de_rp' table style="width: 100%; border-right: none; border-left: none;" thead tr th.alinhar_a_esquerda style="font-size: 11px; border:none" width="10%" Exercício th.centralizar style="font-size: 11px; border:none" width="5%" Empenho th.centralizar style="font-size: 11px; border:none" width="30%" Classificação Anterior th.centralizar style="font-size: 11px; border:none" width="30%" Credor th.centralizar style="font-size: 11px; border:none" width="10%" Valor th.centralizar style="font-size: 11px; border:none" width="10%" Saldo Processado th.centralizar style="font-size: 11px; border:none" width="15%" Saldo não Processado - if @relatorio_da_contabilidade&.relatorio == 'restos_a_pagar_processados_inscritos_e_nao_processados_inscritos' - if @relatorio_da_contabilidade.unidade_gestora != "consolidado" && !@relatorio_da_contabilidade.unidade_gestora.blank? h4 #{@unidade_gestora.nome} table style="width: 100%; border-right: none; border-left: none;" thead tr style="border: none;" th style="border: none;" width="15%" DOTAÇÃO th style="border: none;" wdith="15%" EMPENHO th style="border: none;" width="15%" VALOR DO EMPENHO th style="border: none;" width="40%" CREDOR th.alinhar_a_direita style="border: none;" width="15%" VALOR A PAGAR (R$) - if @relatorio_da_contabilidade.try(:relatorio) == 'relatorio_intra_analitico' table thead tr th style="border: none;" width="15%" Data th style="border: none;" width="15%" Talão/Pagamento th style="border: none;" width="40%" Código da Receita/Despesa th style="border: none;" width="15%" Unidade Orçamentária th.alinhar_a_direita style="border: none;" width="15%" Valor