<commit_before>= f.object.errors.full_messages if f.object.errors.present? && Rails.env.development?
= content_for(:heading_toolbar) do
  %h2.reconciliation-title.no-reconciliate-title= :to_reconciliate.tl
  %h2.reconciliation-title.reconcile-title.hidden= :reconcile.tl
  %h2.reconciliation-title.accepted-title.hidden= :accepted.tl

= field_set do
  = f.referenced_association :supplier, source: :suppliers, new: { supplier: 1 }
  = f.input :reference_number
  = f.association :nature, as: :hidden
  = f.input :invoiced_at, as: :date
  = f.input :payment_delay
  = f.input :tax_payability, as: :radio_buttons
  = f.input :description
  = f.custom_fields

  = field :element_status.tl, nil do
    %span.purchase-process-reconciliation.reconciliation-state.no-reconciliate-state= :to_reconciliate.tl
    %span.purchase-process-reconciliation.reconciliation-state.reconcile-state.hidden= :reconcile.tl
    %span.purchase-process-reconciliation.reconciliation-state.accepted-state.hidden= :accepted.tl
    = check_box_tag('purchase_invoice[reconciliation_state]', 'to_reconcile', true, id: 'purchase_invoice_reconciliate_state', class: 'hidden')
    = check_box_tag('purchase_invoice[reconciliation_state]', 'accepted', (f.object.reconciliation_state == 'accepted' ? true : false), id: 'purchase_invoice_accepted_state')
    = label_tag :accepted_for_paiment.tl

  .invoice-totals
    .invoice-total-row.total-except-tax
      %span.total-label= :total_amount_without_taxes.tl
      %span.total-value= f.object.decorate.total_amount_excluding_taxes
      %span.total-currency= Nomen::Currency[f.object.currency].symbol
    .invoice-total-row.vat-total
      %span.total-label= :vat.tl
      %span.total-value= f.object.decorate.total_vat_amount
      %span.total-currency= Nomen::Currency[f.object.currency].symbol
    .invoice-total-row.invoice-total
      %span.total-label= :total_amount_with_taxes.tl
      %span.total-value= f.object.decorate.total_amount_including_taxes
      %span.total-currency= Nomen::Currency[f.object.currency].symbol

  .control-group.button-modal-reconciliation
    .controls
      = button_tag :reconciliate_with_receptions.tl, id: 'showReconciliationModal', class: 'btn btn-default', type: :button<commit_msg>Round to 2 decimals total vat purchase invoice<commit_after>= f.object.errors.full_messages if f.object.errors.present? && Rails.env.development?
= content_for(:heading_toolbar) do
  %h2.reconciliation-title.no-reconciliate-title= :to_reconciliate.tl
  %h2.reconciliation-title.reconcile-title.hidden= :reconcile.tl
  %h2.reconciliation-title.accepted-title.hidden= :accepted.tl

= field_set do
  = f.referenced_association :supplier, source: :suppliers, new: { supplier: 1 }
  = f.input :reference_number
  = f.association :nature, as: :hidden
  = f.input :invoiced_at, as: :date
  = f.input :payment_delay
  = f.input :tax_payability, as: :radio_buttons
  = f.input :description
  = f.custom_fields

  = field :element_status.tl, nil do
    %span.purchase-process-reconciliation.reconciliation-state.no-reconciliate-state= :to_reconciliate.tl
    %span.purchase-process-reconciliation.reconciliation-state.reconcile-state.hidden= :reconcile.tl
    %span.purchase-process-reconciliation.reconciliation-state.accepted-state.hidden= :accepted.tl
    = check_box_tag('purchase_invoice[reconciliation_state]', 'to_reconcile', true, id: 'purchase_invoice_reconciliate_state', class: 'hidden')
    = check_box_tag('purchase_invoice[reconciliation_state]', 'accepted', (f.object.reconciliation_state == 'accepted' ? true : false), id: 'purchase_invoice_accepted_state')
    = label_tag :accepted_for_paiment.tl

  .invoice-totals
    .invoice-total-row.total-except-tax
      %span.total-label= :total_amount_without_taxes.tl
      %span.total-value= f.object.decorate.total_amount_excluding_taxes
      %span.total-currency= Nomen::Currency[f.object.currency].symbol
    .invoice-total-row.vat-total
      %span.total-label= :vat.tl
      %span.total-value= f.object.decorate.total_vat_amount.round(2)
      %span.total-currency= Nomen::Currency[f.object.currency].symbol
    .invoice-total-row.invoice-total
      %span.total-label= :total_amount_with_taxes.tl
      %span.total-value= f.object.decorate.total_amount_including_taxes
      %span.total-currency= Nomen::Currency[f.object.currency].symbol

  .control-group.button-modal-reconciliation
    .controls
      = button_tag :reconciliate_with_receptions.tl, id: 'showReconciliationModal', class: 'btn btn-default', type: :button
{'fraction_non_alphanumeric': 0.127156125608138, 'fraction_numerical': 0.0022114108801415304, 'mean_word_length': 4.836129032258064, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2362644', 'n_tokens_mistral': 1606, 'n_tokens_neox': 1586, 'n_words': 208}