<commit_before>- item ||= f.object
%tr.nested-fields
  %td
    = f.referenced_association(:variant, wrapper: :nested, source: {scope: :saleables}, input_html: {data: {variant_of_deal_item: {url: detail_backend_product_nature_variant_url("RECORD_ID", sale_nature_id: f.object.sale.nature_id)}}})
    = f.input :all_taxes_included, as: :hidden, input_html: {class: "all-taxes-included"}
  %td= f.input(:unit_pretax_amount, wrapper: :nested, input_html: {class: "unit-pretax-amount item-pta"})
  %td.decimal= f.select(:tax_id, Tax.order(:name).collect{|t| [t.name, t.id, {'data-rate' => ((100 + t.amount)/100)}]}, {}, 'data-value' => 'rate', class: "tax")
  %td= f.input(:unit_amount, wrapper: :nested, input_html: {class: "unit-amount item-wta"})
  %td.decimal= f.input(:quantity, wrapper: :nested, input_html: {size: 7, class: "item-pta item-wta"})
  %td.decimal.pta{data: {use: ".item-pta", use_closest: ".nested-fields", calculate: "mul", calculate_round: "#{Nomen::Currencies[f.object.sale_currency].precision}"}}= item.pretax_amount
  %td.decimal.wta{data: {use: ".item-wta", use_closest: ".nested-fields", calculate: "mul", calculate_round: "#{Nomen::Currencies[f.object.sale_currency].precision}"}}= item.amount
  %td.currency= f.object.sale_currency
  %td.action= link_to_remove_association(content_tag(:i) + h(:destroy.ta), f, 'data-no-turbolink' => true, class: 'remove-item')
<commit_msg>Add annotation field on sale_item. see https://forge.ekylibre.com/issues/3<commit_after>- item ||= f.object
%tr.nested-fields
  %td
    = f.referenced_association(:variant, wrapper: :nested, source: {scope: :saleables}, input_html: {data: {variant_of_deal_item: {url: detail_backend_product_nature_variant_url("RECORD_ID", sale_nature_id: f.object.sale.nature_id)}}})
    = f.input :all_taxes_included, as: :hidden, input_html: {class: "all-taxes-included"}
    = f.input(:annotation, wrapper: :nested, input_html: {class: "annotation"})
  %td= f.input(:unit_pretax_amount, wrapper: :nested, input_html: {class: "unit-pretax-amount item-pta"})
  %td.decimal= f.select(:tax_id, Tax.order(:amount).collect{|t| [t.name, t.id, {'data-rate' => ((100 + t.amount)/100)}]}, {}, 'data-value' => 'rate', class: "tax")
  %td= f.input(:unit_amount, wrapper: :nested, input_html: {class: "unit-amount item-wta"})
  %td.decimal= f.input(:quantity, wrapper: :nested, input_html: {size: 7, class: "item-pta item-wta"})
  %td.decimal.pta{data: {use: ".item-pta", use_closest: ".nested-fields", calculate: "mul", calculate_round: "#{Nomen::Currencies[f.object.sale_currency].precision}"}}= item.pretax_amount
  %td.decimal.wta{data: {use: ".item-wta", use_closest: ".nested-fields", calculate: "mul", calculate_round: "#{Nomen::Currencies[f.object.sale_currency].precision}"}}= item.amount
  %td.currency= f.object.sale_currency
  %td.action= link_to_remove_association(content_tag(:i) + h(:destroy.ta), f, 'data-no-turbolink' => true, class: 'remove-item')
{'fraction_non_alphanumeric': 0.19856948228882834, 'fraction_numerical': 0.005108991825613079, 'mean_word_length': 6.324189526184538, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 1, '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': '3945860', 'n_tokens_mistral': 1135, 'n_tokens_neox': 1067, 'n_words': 198}