<commit_before><%= form_for(@pool, namespace: namespace_id, :html=> {:id => namespace_id}) do |f| %>
  <% if @pool.errors.any? %>
    <div id="error_explanation_<%=namespace_id%>">
      <h2><%= pluralize(@pool.errors.count, "error") %> prohibited this pool from being saved:</h2>
      <ul>
      <% @pool.errors.full_messages.each do |message| %>
        <li><%= message %></li>
      <% end %>
      </ul>
    </div>
  <% end %>
  <div class="form-group row">
    <div class="col-sm-2">
      <%= f.label :date_of, "Fecha", class: "control-label" %><br>
    </div>
    <div class="col-sm-4">
      <%= f.date_field :date_of, class: "form-control" %>
    </div>  
  </div>
  <div class="form-group row">
    <div class="col-sm-2">
      <%= f.label :category_type, 'Categoría', class: "control-label" %><br>
    </div>
    <div class="col-sm-4"> 
      <%= f.select(:category_type, options_for_select( categories.collect { |category| [eval(category).new.table_name_to_show, category] }, @pool.category_type ), { prompt: '--Seleccionar--'}, { class: "form-control c-select chosen-select chosen-select" } ) %>
    </div>
    <% categories.each do |category| %>
      <div id= <%= category+namespace_id %> class="<%= 'hidden' if @pool.category_type != category %>">
        <div class="col-sm-4">
          <%= f.collection_select( :category_id, eval(category).all, :id, :record_name_to_show, { prompt: '-Seleccionar-'}, { class: "form-control c-select chosen-select chosen-select" }) %>
        </div>
        <div class="col-sm-2">
          <%= render 'layouts/modal_button', :btn_name => 'Añadir', :namespace_id=> "new_"+category.downcase %>
        </div>
      </div>
    <% end %>
  </div>
  <div class="form-group row">
    <div class="col-sm-2">
      <%= f.label( :razon_social_id, RazonSocial.new.table_name_to_show, class: "control-label") %>
    </div>
    <div class="col-sm-8">
      <%= f.collection_select( :razon_social_id, RazonSocial.all, :id, :record_name_to_show, { prompt: '-Seleccionar-'}, { class: "form-control c-select chosen-select chosen-select" }) %>
    </div>
    <div class="col-sm-2">
        <button type="button" class="btn btn-primary">Añadir</button>
    </div>
  </div>
  <div class="form-group row">
    <div class="col-sm-2">
      <%= f.label :monto, class: "control-label" %><br>
    </div>
    <div class="col-sm-10">
      <%= f.text_field :monto, class: "form-control", :required => true %>
    </div>  
  </div>
  <div class="form-group row">
    <div class="col-sm-2">
      <%= f.label :comprobante_type, "Tipo de comprobante", class: "control-label" %><br>
    </div>
    <div class="col-sm-10">
      <%= f.collection_radio_buttons(:comprobante_type, Pool.comprobante_types, :first, :first) do |b|
        content_tag(:div, class: "form-check") do
          b.label(class: "form-check-label") {
            b.radio_button(class: "form-check-input") + b.text
          }
        end
      end %>
    </div>
  </div>
  <div class="form-group row">
    <div class="col-sm-2">
      <%= f.label :n_comprobante, "Nº de comprobante", class: "control-label" %><br>
    </div>
    <div class="col-sm-10">
      <%= f.text_field :n_comprobante, class: "form-control" %>
    </div>
  </div>
  <div class="form-group row">
    <div class="col-sm-2">
      <%= f.label :description, "Descripción", class: "control-label" %><br>
    </div>
    <div class="col-sm-10">
      <%= f.text_area :description, class: "form-control" %>
    </div>
  </div>
<% end %>

<%= render 'layouts/modal', :form_to_render => 'odts/form', :@odt => Odt.new, :modal_title => 'Añadir ODT', :namespace_id=> "new_odt" %>
<%= render 'layouts/modal', :form_to_render => 'inversions/form', :@inversion => Inversion.new, :modal_title => 'Añadir Inversion', :namespace_id=> "new_inversion" %>
<%= render 'layouts/modal', :form_to_render => 'ggs/form', :@gg => Gg.new, :modal_title => 'Añadir Gastos Generales', :namespace_id=> "new_gg" %>
<%= render 'layouts/modal', :form_to_render => 'retenciones/form', :@retencione => Retencione.new, :modal_title => 'Añadir Retención', :namespace_id=> "new_retencione" %>
<%= render 'layouts/modal', :form_to_render => 'employees/form', :@employee => Employee.new, :modal_title => 'Añadir Empleado', :namespace_id=> "new_employee" %><commit_msg>Can now add Razon_social from Pool's form.<commit_after><%= form_for(@pool, namespace: namespace_id, :html=> {:id => namespace_id}) do |f| %>
  <% if @pool.errors.any? %>
    <div id="error_explanation_<%=namespace_id%>">
      <h2><%= pluralize(@pool.errors.count, "error") %> prohibited this pool from being saved:</h2>
      <ul>
      <% @pool.errors.full_messages.each do |message| %>
        <li><%= message %></li>
      <% end %>
      </ul>
    </div>
  <% end %>
  <div class="form-group row">
    <div class="col-sm-2">
      <%= f.label :date_of, "Fecha", class: "control-label" %><br>
    </div>
    <div class="col-sm-4">
      <%= f.date_field :date_of, class: "form-control" %>
    </div>  
  </div>
  <div class="form-group row">
    <div class="col-sm-2">
      <%= f.label :category_type, 'Categoría', class: "control-label" %><br>
    </div>
    <div class="col-sm-4"> 
      <%= f.select(:category_type, options_for_select( categories.collect { |category| [eval(category).new.table_name_to_show, category] }, @pool.category_type ), { prompt: '--Seleccionar--'}, { class: "form-control c-select chosen-select chosen-select" } ) %>
    </div>
    <% categories.each do |category| %>
      <div id= <%= category+namespace_id %> class="<%= 'hidden' if @pool.category_type != category %>">
        <div class="col-sm-4">
          <%= f.collection_select( :category_id, eval(category).all, :id, :record_name_to_show, { prompt: '-Seleccionar-'}, { class: "form-control c-select chosen-select chosen-select" }) %>
        </div>
        <div class="col-sm-2">
          <%= render 'layouts/modal_button', :btn_name => 'Añadir', :namespace_id=> "new_"+category.downcase %>
        </div>
      </div>
    <% end %>
  </div>
  <div class="form-group row">
    <div class="col-sm-2">
      <%= f.label( :razon_social_id, RazonSocial.new.table_name_to_show, class: "control-label") %>
    </div>
    <div class="col-sm-8">
      <%= f.collection_select( :razon_social_id, RazonSocial.all, :id, :record_name_to_show, { prompt: '-Seleccionar-'}, { class: "form-control c-select chosen-select chosen-select" }) %>
    </div>
    <div class="col-sm-2">
      <%= render 'layouts/modal_button', :btn_name => 'Añadir', :namespace_id => 'new_razon_social' %>
    </div>
  </div>
  <div class="form-group row">
    <div class="col-sm-2">
      <%= f.label :monto, class: "control-label" %><br>
    </div>
    <div class="col-sm-10">
      <%= f.text_field :monto, class: "form-control", :required => true %>
    </div>  
  </div>
  <div class="form-group row">
    <div class="col-sm-2">
      <%= f.label :comprobante_type, "Tipo de comprobante", class: "control-label" %><br>
    </div>
    <div class="col-sm-10">
      <%= f.collection_radio_buttons(:comprobante_type, Pool.comprobante_types, :first, :first) do |b|
        content_tag(:div, class: "form-check") do
          b.label(class: "form-check-label") {
            b.radio_button(class: "form-check-input") + b.text
          }
        end
      end %>
    </div>
  </div>
  <div class="form-group row">
    <div class="col-sm-2">
      <%= f.label :n_comprobante, "Nº de comprobante", class: "control-label" %><br>
    </div>
    <div class="col-sm-10">
      <%= f.text_field :n_comprobante, class: "form-control" %>
    </div>
  </div>
  <div class="form-group row">
    <div class="col-sm-2">
      <%= f.label :description, "Descripción", class: "control-label" %><br>
    </div>
    <div class="col-sm-10">
      <%= f.text_area :description, class: "form-control" %>
    </div>
  </div>
<% end %>

<%= render 'layouts/modal', :form_to_render => 'odts/form', :@odt => Odt.new, :modal_title => 'Añadir ODT', :namespace_id => "new_odt" %>
<%= render 'layouts/modal', :form_to_render => 'inversions/form', :@inversion => Inversion.new, :modal_title => 'Añadir Inversion', :namespace_id => "new_inversion" %>
<%= render 'layouts/modal', :form_to_render => 'ggs/form', :@gg => Gg.new, :modal_title => 'Añadir Gastos Generales', :namespace_id => "new_gg" %>
<%= render 'layouts/modal', :form_to_render => 'retenciones/form', :@retencione => Retencione.new, :modal_title => 'Añadir Retención', :namespace_id => "new_retencione" %>
<%= render 'layouts/modal', :form_to_render => 'employees/form', :@employee => Employee.new, :modal_title => 'Añadir Empleado', :namespace_id => "new_employee" %>
<%= render 'layouts/modal', :form_to_render => 'razon_socials/form', :@razon_social => RazonSocial.new, :modal_title => 'Añadir Razón social', :namespace_id => 'new_razon_social' %>
{'fraction_non_alphanumeric': 0.20824368701166346, 'fraction_numerical': 0.005208923111765372, 'mean_word_length': 3.4182091045522762, 'pattern_counts': {'":': 0, '<': 203, '<?xml version=': 0, '>': 259, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7644310', 'n_tokens_mistral': 3404, 'n_tokens_neox': 3245, 'n_words': 638}