<commit_before>
<%= simple_form_for(invoicing_request,  url: setup_project_invoices_path(invoicing_request.project), method: :post) do |f| %>

  <% if f.object.errors.any? %>
    <div class="alert alert-danger">
      <% f.object.errors.full_messages.each do |message| %>
        <%= message%> <br>
      <% end %>
    </div>
  <% end %>

  <%= f.input :entity, as: :hidden%>
  <div class="form-group">
    <label class="control-label string">Organisation unit</label>
    <%= text_field_tag "formula_mappings_external_reference_id",
    invoicing_request.entity ,
    data: { autocomplete: organisation_units_setup_project_autocomplete_index_path(invoicing_request.project) ,
      id_element: "#invoicing_request_entity" },
      class: "form-control autocomplete-data-element",
        placeholder: "Type some letters to start searching organisation unit...",
        delay: 700 %>
  </div>
  <%= f.input :year %>
  <%= f.input :quarter %>



  <div class="row">
    <div class="col-xs-4">
      <%= f.input :engine_version, collection: @current_project.engine_version_enum %>
    </div>
  </div>

  <h5>Advanced</h5>
  <div>
    <div class="form-check row">
      <div class="col-sm-2">
        <label class="form-check-label col-form-label">
          Mock Values
        </label>
      </div>

      <div class="col-sm-10">
        <%= f.input_field :mock_values, as: :boolean, class: "form-check-input" %>
      </div>
    </div>

    <div class="form-check row">
      <div class="col-sm-2">
        <label class="form-check-label col-form-label">
          With details
        </label>
      </div>
      <div class="col-sm-10">
        <%= f.input_field :with_details, as: :boolean, class: "form-check-input" %>
        <small class="form-text text-muted">
          (DHIS2 input/output values, equations)
        </small>
      </div>
    </div>

    <div class="form-group row">
      <label class="string col-sm-2 col-form-label">Selected org units</label>
      <div class="col-sm-10">
        <%= text_field_tag "selected_org_units", params[:selected_org_units], class: "form-control" %>
        <small class="form-text text-muted">
          A comma separated listed of org unit ids, these will be the only ones shown in the result. If left blank, all org units will be available.
        </small>
      </div>
    </div>
  </div>



  <%= f.submit 'Push to dhis2',
  name: 'push_to_dhis2',
  data: { confirm: "Are you sure this might override existing data ?"},
  class: "btn btn-danger pull-right"
  %>

  <%= f.submit 'Simulate with draft', name: "simulate_draft", class: "btn btn-primary"  %>
  <%= f.submit 'Simulate with published', name: "simulate_published", class: "btn btn-primary" %>

<%end%><commit_msg>adds link to hesabu simulations<commit_after>
<%= simple_form_for(invoicing_request,  url: setup_project_invoices_path(invoicing_request.project), method: :post) do |f| %>

  <% if f.object.errors.any? %>
    <div class="alert alert-danger">
      <% f.object.errors.full_messages.each do |message| %>
        <%= message%> <br>
      <% end %>
    </div>
  <% end %>

  <%= f.input :entity, as: :hidden%>
  <div class="form-group">
    <label class="control-label string">Organisation unit</label>
    <%= text_field_tag "formula_mappings_external_reference_id",
    invoicing_request.entity ,
    data: { autocomplete: organisation_units_setup_project_autocomplete_index_path(invoicing_request.project) ,
      id_element: "#invoicing_request_entity" },
      class: "form-control autocomplete-data-element",
        placeholder: "Type some letters to start searching organisation unit...",
        delay: 700 %>
  </div>
  <%= f.input :year %>
  <%= f.input :quarter %>



  <div class="row">
    <div class="col-xs-4">
      <%= f.input :engine_version, collection: @current_project.engine_version_enum %>
    </div>
  </div>

  <h5>Advanced</h5>
  <div>
    <div class="form-check row">
      <div class="col-sm-2">
        <label class="form-check-label col-form-label">
          Mock Values
        </label>
      </div>

      <div class="col-sm-10">
        <%= f.input_field :mock_values, as: :boolean, class: "form-check-input" %>
      </div>
    </div>

    <div class="form-check row">
      <div class="col-sm-2">
        <label class="form-check-label col-form-label">
          With details
        </label>
      </div>
      <div class="col-sm-10">
        <%= f.input_field :with_details, as: :boolean, class: "form-check-input" %>
        <small class="form-text text-muted">
          (DHIS2 input/output values, equations)
        </small>
      </div>
    </div>

    <div class="form-group row">
      <label class="string col-sm-2 col-form-label">Selected org units</label>
      <div class="col-sm-10">
        <%= text_field_tag "selected_org_units", params[:selected_org_units], class: "form-control" %>
        <small class="form-text text-muted">
          A comma separated listed of org unit ids, these will be the only ones shown in the result. If left blank, all org units will be available.
        </small>
      </div>
    </div>
  </div>



  <%= f.submit 'Push to dhis2',
  name: 'push_to_dhis2',
  data: { confirm: "Are you sure this might override existing data ?"},
  class: "btn btn-danger pull-right"
  %>

  <%= f.submit 'Simulate with draft', name: "simulate_draft", class: "btn btn-primary"  %>
  <%= f.submit 'Simulate with published', name: "simulate_published", class: "btn btn-primary" %>
  <%= link_to "Hesabu simulations", invoicing_request.project.dhis2_url + "/api/apps/Hesabu/index.html#/simulations" %>

<%end%>
{'fraction_non_alphanumeric': 0.1585148161370939, 'fraction_numerical': 0.006604784005712246, 'mean_word_length': 2.9485553206483437, 'pattern_counts': {'":': 0, '<': 122, '<?xml version=': 0, '>': 122, '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': '5310779', 'n_tokens_mistral': 1968, 'n_tokens_neox': 1840, 'n_words': 430}