<commit_before>= field_set :general_informations do
  = f.input :contract_id, as: :hidden
  .delivery-item
    = f.referenced_association :recipient, required: true, input_html: {data: {product_of_delivery_item: {url: backend_entity_path("RECORD_ID", format: :json)}}}
    = f.input :sale_id, as: :hidden
    = f.referenced_association :address, source: :mails, input_html: {data: {"when-item": "address_id", "when-set-value": "RECORD_VALUE"}}, new: { canal: :mail }
  = f.referenced_association :responsible, source: :employees, new: { employed: 1 }
  = f.input :with_delivery
  = f.input :delivery_mode, as: :radio_buttons
  #delivery-mode-transporter
    = f.referenced_association :transporter, source: :necessary_transporters, new: {transporter: 1}
  -#= f.referenced_association :sale
  = f.input :planned_at, required: false
  = f.input :given_at, required: false
  = f.input :remain_owner
  = f.custom_fields
  = f.attachments
  -# = f.object.errors.inspect

- if f.object.allow_items_update?
  = field_set f.object.class.human_attribute_name(:items) do
    %table.list
      %thead
        %tr
          %th.act
          %th.product-column= ParcelItem.human_attribute_name(:product)
          %th.quantity-column= ParcelItem.human_attribute_name(:population)
          %th.delivery-mode-column= ParcelItem.human_attribute_name(:analysis)<commit_msg>Fix shipment address when it's not entity default address<commit_after>= field_set :general_informations do
  = f.input :contract_id, as: :hidden
  .delivery-item
    = f.referenced_association :recipient, required: true, input_html: {data: {product_of_delivery_item: {url: backend_entity_path("RECORD_ID", format: :json)}}}
    = f.input :sale_id, as: :hidden
    -# Autoset default address from entity on change only if new_record
    - if f.object.new_record?
      = f.referenced_association :address, source: :mails, input_html: {data: {"when-item": "address_id", "when-set-value": "RECORD_VALUE"}}, new: { canal: :mail }
    - else
      = f.referenced_association :address, source: :mails, new: { canal: :mail }
  = f.referenced_association :responsible, source: :employees, new: { employed: 1 }
  = f.input :with_delivery
  = f.input :delivery_mode, as: :radio_buttons
  #delivery-mode-transporter
    = f.referenced_association :transporter, source: :necessary_transporters, new: {transporter: 1}
  -#= f.referenced_association :sale
  = f.input :planned_at, required: false
  = f.input :given_at, required: false
  = f.input :remain_owner
  = f.custom_fields
  = f.attachments
  -# = f.object.errors.inspect

- if f.object.allow_items_update?
  = field_set f.object.class.human_attribute_name(:items) do
    %table.list
      %thead
        %tr
          %th.act
          %th.product-column= ParcelItem.human_attribute_name(:product)
          %th.quantity-column= ParcelItem.human_attribute_name(:population)
          %th.delivery-mode-column= ParcelItem.human_attribute_name(:analysis)
{'fraction_non_alphanumeric': 0.12778904665314403, 'fraction_numerical': 0.001352265043948614, 'mean_word_length': 4.164048865619546, 'pattern_counts': {'":': 4, '<': 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': '2390741', 'n_tokens_mistral': 1029, 'n_tokens_neox': 994, 'n_words': 203}