<commit_before><h3><%= Spree.t(:order_summary) %></h3>

<table data-hook="order_summary">
  <tbody>
    <tr data-hook="item_total">
      <td><strong><%= Spree.t(:item_total) %>:</strong></td>
      <td><strong><%= order.display_item_total.to_html %></strong></td>
    </tr>

    <% if order.line_item_adjustments.exists? %>
      <tbody data-hook="order_details_promotion_adjustments">
        <% order.line_item_adjustments.promotion.eligible.group_by(&:label).each do |label, adjustments| %>
          <tr class="total">
            <td><%= label %></td>
            <td><%= Spree::Money.new(adjustments.sum(&:amount)).to_html %></td>
          </tr>
        <% end %>
      </tbody>
    <% end %>

    <% order.all_adjustments.tax.eligible.group_by(&:label).each do |label, adjustments| %>
      <tbody data-hook="order_details_tax_adjustments">
        <% order.all_adjustments.tax.eligible.group_by(&:label).each do |label, adjustments| %>
          <tr class="total">
            <td><%= label %></td>
            <td><%= Spree::Money.new(adjustments.sum(&:amount)).to_html %></td>
          </tr>
        <% end %>
      </tbody>
    <% end %><commit_msg>Remove double looping over tax adjustments in checkout/summary<commit_after><h3><%= Spree.t(:order_summary) %></h3>

<table data-hook="order_summary">
  <tbody>
    <tr data-hook="item_total">
      <td><strong><%= Spree.t(:item_total) %>:</strong></td>
      <td><strong><%= order.display_item_total.to_html %></strong></td>
    </tr>

    <% if order.line_item_adjustments.exists? %>
      <tbody data-hook="order_details_promotion_adjustments">
        <% order.line_item_adjustments.promotion.eligible.group_by(&:label).each do |label, adjustments| %>
          <tr class="total">
            <td><%= label %></td>
            <td><%= Spree::Money.new(adjustments.sum(&:amount)).to_html %></td>
          </tr>
        <% end %>
      </tbody>
    <% end %>

    <tbody data-hook="order_details_tax_adjustments">
      <% order.all_adjustments.tax.eligible.group_by(&:label).each do |label, adjustments| %>
        <tr class="total">
          <td><%= label %></td>
          <td><%= Spree::Money.new(adjustments.sum(&:amount)).to_html %></td>
        </tr>
      <% end %>
    </tbody>
{'fraction_non_alphanumeric': 0.20284065690190856, 'fraction_numerical': 0.001775410563692854, 'mean_word_length': 2.92, 'pattern_counts': {'":': 0, '<': 91, '<?xml version=': 0, '>': 91, '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': '3308818', 'n_tokens_mistral': 806, 'n_tokens_neox': 742, 'n_words': 116}