<commit_before>- main_toolbar do |t|
  = t.export :purchases_invoice
  = t.edit resource if resource.updateable?
  - if current_user.can?(:write, :incoming_deliveries) && resource.can_generate_parcel?
    = t.new(resource, params: { controller: :parcels, purchase_id: resource.id, nature: :incoming }, label: :generate_parcel.tl)
  = t.destroy

= main_state_bar(resource)
<commit_msg>In purchases/id, added a button to create a new purchase<commit_after>- main_toolbar do |t|
  = t.export :purchases_invoice
  = t.edit resource if resource.updateable?
  - if current_user.can?(:write, :incoming_deliveries) && resource.can_generate_parcel?
    = t.new(resource, params: { controller: :parcels, purchase_id: resource.id, nature: :incoming }, label: :generate_parcel.tl)
  = t.destroy 
  = t.new variants: PurchaseNature.reorder(:name).to_a.map{ |n| [n.name, {nature_id: n.id}, {by_default: n.by_default}] }, params: { redirect: nil }

= main_state_bar(resource)

{'fraction_non_alphanumeric': 0.1383975026014568, 'fraction_numerical': 0.0, 'mean_word_length': 5.2064516129032254, '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': '4320974', 'n_tokens_mistral': 344, 'n_tokens_neox': 334, 'n_words': 73}