- 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%; 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 @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) == '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) == 'movimento_extra_orcamentario' table style="width: 100%" thead tr th width="10%" style="font-size: 13px;" align="left" Dia th width="45%" style="font-size: 13px;" align="left" Histórico th width="15%" style="font-size: 13px;" Débitos th width="15%" style="font-size: 13px;" Créditos 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="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) == '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) == 'movimento_diario_extraorcamentario' table style="width: 100%" thead tr th width="10%" style="font-size: 13px;" align="left" Dia th width="45%" style="font-size: 13px;" align="left" Histórico th width="15%" style="font-size: 13px;" Débitos th width="15%" style="font-size: 13px;" Créditos th width="15%" style="font-size: 13px;" Saldo - 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: 55%" 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 - 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