<commit_before>      <!-- 通信欄-->
      <%= render(:partial => "shared/information") %>
      <table class="book_header">
        <tr>
          <th class="date">日付</th>
          <th class="number"> </th>
          <th>摘要</th>
          <th class="account"> </th>
          <th class="jump"></th>
          <th class="amount">入金</th>
          <th class="amount">出金</th>
          <th class="amount">残高</th>
          <th class="action">変更</th>
          <th class="action">削除</th>
          <th class="scroll_space"></th>
        </tr>
      </table>
      <div class="scroll_box" <%= "style='height:#{h @deals_scroll_height};'" if @deals_scroll_height && @deals_scroll_height != ''%>>
      <div class="scroll_inner_box">
      <table class="book">
        <% for deal in @deals %>
          <% first = true %>

          <% for account_entry in deal.readonly_entries %>
            <tr <%= "class='updated_line'" if (@updated_deal && deal.id == @updated_deal.id)%><%= 'class="unconfirmed"' if !deal.confirmed? %>>
              <td class="date">
                <% if first %>
                  <a name="<%=deal.id%>"><%= format_date(deal.date) %></a>
                <% end %>
              </td>
              <td class="number">
                <%= deal.daily_seq if first %>
              </td>
              <% if first %>
                <td class="summary" rowspan="<%=deal.entries.size%>">
                  <% if !deal.confirmed? %>
                    <%= link_to_remote('確認' , {:update => 'book', :url => { :action => 'confirm', :id => deal }}, :class => 'small_button', :alt => '確認状態にします。' ) %>
                  <% end %>
                  <%= deal.balance ? "残高確認" : h(deal.summary) %>
                </td>
              <% end %>
              <% if account_entry.linked_account_entry || account_entry.kind_of?(Deal::General) && (account_entry.settlement || account_entry.result_settlement) %>
                <td class="account">
                  <%= h account_entry.account.name %>
                </td>
                <td class="jump">
                  <% if account_entry.linked_ex_entry_id %>
                    <span <%="class='unconfirmed'" unless account_entry.linked_ex_entry_confirmed? %>><%= h account_entry.account.linked_account.user.login_id %></span>
                  <% end %>
                  <% if account_entry.settlement %>
                    <%= link_to '精算', settlement_path(:id => account_entry.settlement_id) %>
                  <% end %>
                  <% if account_entry.result_settlement %>
                    <%= link_to '精算', settlement_path(:id => account_entry.result_settlement_id) %>
                  <% end %>
                </td>
              <% else %>
                <td colspan="2">
                  <%= h account_entry.account.name %>
                </td>
              <% end %>
              <td class="amount"><%= number_with_delimiter(account_entry.amount) if account_entry.amount  > 0 && !account_entry.initial_balance? %></td>
              <td class="amount"><%= number_with_delimiter(account_entry.amount.abs) if account_entry.amount < 0 && !account_entry.initial_balance? %></td>
              <td class="amount"><%= number_with_delimiter(account_entry.balance)%> </td>
              <% if first %>
                <td rowspan="<%=deal.entries.size%>" class="action"><%= link_to_remote('変更' , :update => 'deal_editor', :url => {:action => 'edit', :id => deal.id}, :method => :get, :complete => "location.hash = '#{deal.id}';location.hash = 'top';" ) %></td>
                <td rowspan="<%=deal.entries.size%>" class="action">
                  <% unless deal.settlement_attached? %>
                    <%= link_to '削除' ,{:action => 'delete_deal', :id => deal}, :confirm => "#{format_deal(deal)}を削除します。よろしいですか？" %>
                  <% end %>
                </td>
              <% end %>
            </tr>
            <% first = false %>
          <% end %>
        <% end %>
      </table>
      </div>
      </div><commit_msg>modified to improve speed<commit_after>      <!-- 通信欄-->
      <%= render(:partial => "shared/information") %>
      <table class="book_header">
        <tr>
          <th class="date">日付</th>
          <th class="number"> </th>
          <th>摘要</th>
          <th class="account"> </th>
          <th class="jump"></th>
          <th class="amount">入金</th>
          <th class="amount">出金</th>
          <th class="amount">残高</th>
          <th class="action">変更</th>
          <th class="action">削除</th>
          <th class="scroll_space"></th>
        </tr>
      </table>
      <div class="scroll_box" <%= "style='height:#{h @deals_scroll_height};'" if @deals_scroll_height && @deals_scroll_height != ''%>>
      <div class="scroll_inner_box">
      <table class="book">
        <% for deal in @deals %>
          <% first = true %>

          <% for account_entry in deal.readonly_entries %>
            <tr <%= "class='updated_line'" if (@updated_deal && deal.id == @updated_deal.id)%><%= 'class="unconfirmed"' if !deal.confirmed? %>>
              <td class="date">
                <% if first %>
                  <a name="<%=deal.id%>"><%= format_date(deal.date) %></a>
                <% end %>
              </td>
              <td class="number">
                <%= deal.daily_seq if first %>
              </td>
              <% if first %>
                <td class="summary" rowspan="<%=deal.entries.size%>">
                  <% if !deal.confirmed? %>
                    <%= link_to_remote('確認' , {:update => 'book', :url => { :action => 'confirm', :id => deal }}, :class => 'small_button', :alt => '確認状態にします。' ) %>
                  <% end %>
                  <%= deal.balance ? "残高確認" : h(deal.summary) %>
                </td>
              <% end %>
              <% if account_entry.linked_ex_entry_id || account_entry.kind_of?(Deal::General) && (account_entry.settlement_id || account_entry.result_settlement_id) %>
                <td class="account">
                  <%= h account_entry.account.name %>
                </td>
                <td class="jump">
                  <% if account_entry.linked_ex_entry_id %>
                    <span <%="class='unconfirmed'" unless account_entry.linked_ex_entry_confirmed? %>><%= h account_entry.account.linked_account.user.login_id %></span>
                  <% end %>
                  <% if account_entry.settlement_id %>
                    <%= link_to '精算', settlement_path(:id => account_entry.settlement_id) %>
                  <% end %>
                  <% if account_entry.result_settlement_id %>
                    <%= link_to '精算', settlement_path(:id => account_entry.result_settlement_id) %>
                  <% end %>
                </td>
              <% else %>
                <td colspan="2">
                  <%= h account_entry.account.name %>
                </td>
              <% end %>
              <td class="amount"><%= number_with_delimiter(account_entry.amount) if account_entry.amount  > 0 && !account_entry.initial_balance? %></td>
              <td class="amount"><%= number_with_delimiter(account_entry.amount.abs) if account_entry.amount < 0 && !account_entry.initial_balance? %></td>
              <td class="amount"><%= number_with_delimiter(account_entry.balance)%> </td>
              <% if first %>
                <td rowspan="<%=deal.entries.size%>" class="action"><%= link_to_remote('変更' , :update => 'deal_editor', :url => {:action => 'edit', :id => deal.id}, :method => :get, :complete => "location.hash = '#{deal.id}';location.hash = 'top';" ) %></td>
                <td rowspan="<%=deal.entries.size%>" class="action">
                  <% unless deal.settlement_attached? %>
                    <%= link_to '削除' ,{:action => 'delete_deal', :id => deal}, :confirm => "#{format_deal(deal)}を削除します。よろしいですか？" %>
                  <% end %>
                </td>
              <% end %>
            </tr>
            <% first = false %>
          <% end %>
        <% end %>
      </table>
      </div>
      </div>
{'fraction_non_alphanumeric': 0.1825180034765334, 'fraction_numerical': 0.0007449714427613609, 'mean_word_length': 1.7775862068965518, 'pattern_counts': {'":': 0, '<': 223, '<?xml version=': 0, '>': 259, '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': '4602344', 'n_tokens_mistral': 2675, 'n_tokens_neox': 2382, 'n_words': 424}