tr.nested-fields
- if f.object.lote_bancario.pagamento? && (f.object.persisted? || @lote_bancario.new_record?)
- if f.object.conta_bancaria_por_pagamento.present?
= f.hidden_field :conta_bancaria_por_pagamento_id
td = f.object.conta_bancaria_por_pagamento.try(:pagamento).try(:data)
td = link_to f.object.conta_bancaria_por_pagamento.try(:pagamento).try(:numero), f.object.conta_bancaria_por_pagamento.try(:pagamento), target: "_blank"
td = f.object.tipo
td
| #{f.object.conta_bancaria_por_pagamento.try(:pagamento).try(:credor).try(:texto_cpf_ou_cnpj)} #{f.object.conta_bancaria_por_pagamento.try(:pagamento).try(:credor).try(:nome).to_s}
- if f.object.errors.size > 0
br
span class="error_explanation" #{f.object.errors.full_messages.join(", ")}
td = f.object.conta_bancaria_por_pagamento.try(:valor_pago).to_f.real_contabil
td = "".html_safe if f.object.persisted?
td
= link_to_remove_association " Remover", f, class: "btn btn-sm btn-danger icone-anular"
- elsif f.object.pagamento_da_retencao.present?
= f.hidden_field :pagamento_da_retencao_id
td = f.object.pagamento_da_retencao.try(:pagamento).try(:data)
td = link_to f.object.pagamento_da_retencao.try(:retencao).try(:pagamento).try(:numero), f.object.pagamento_da_retencao.try(:pagamento), target: "_blank"
td = f.object.tipo
td
| #{f.object.try(:pagamento_da_retencao).try(:conta_destino).try(:unidade_orcamentaria_principal).try(:orgao).try(:cnpj_com_pontos)} - #{f.object.try(:pagamento_da_retencao).try(:conta_destino).try(:unidade_orcamentaria_principal).try(:nome).to_s}
- if f.object.errors.size > 0
br
span class="error_explanation" #{f.object.errors.full_messages.join(", ")}
td = f.object.pagamento_da_retencao.try(:retencao).try(:valor_calculado).to_f.real_contabil
td = "".html_safe if f.object.persisted?
td
= link_to_remove_association " Remover", f, class: "btn btn-sm btn-danger icone-anular"
- elsif f.object.lote_bancario.transferencia?
= f.hidden_field :transferencia_financeira_id
td = f.object.transferencia_financeira.data.try(:to_date)
td = link_to f.object.transferencia_financeira.try(:numero_da_transferencia), f.object.transferencia_financeira, target: "_blank"
td
= f.object.transferencia_financeira.conta_bancaria_destino.unidade_orcamentaria.try(:codigo_completo_e_nome)
- if f.object.errors.size > 0
br
span class="error_explanation" #{f.object.errors.full_messages.join(", ")}
td = f.object.transferencia_financeira.valor.to_f.real_contabil
td = "".html_safe if f.object.persisted?
td
= link_to_remove_association " Remover", f, class: "btn btn-sm btn-danger icone-anular"
- elsif f.object.lote_bancario.despesa_extra?
= f.hidden_field :despesa_extra_orcamentaria_id
td = f.object.despesa_extra_orcamentaria.data_de_emissao.try(:to_date)
td = link_to f.object.despesa_extra_orcamentaria.try(:numero_de_caixa), f.object.despesa_extra_orcamentaria, target: "_blank"
td
= f.object.despesa_extra_orcamentaria.conta_bancaria_por_unidade_orcamentaria.unidade_orcamentaria.try(:codigo_completo_e_nome)
- if f.object.errors.size > 0
br
span class="error_explanation" #{f.object.errors.full_messages.join(", ")}
td = f.object.despesa_extra_orcamentaria.valor_da_despesa.to_f.real_contabil
td = "".html_safe if f.object.persisted?
td
= link_to_remove_association " Remover", f, class: "btn btn-sm btn-danger icone-anular"