<commit_before><% if @account.present? %>
  <dl class="dl-horizontal">
    <dt>Id:</dt>
    <dd><%= @account.account_id %>&nbsp;</dd>
    <dt>Name:</dt>
    <dd><%= @account.name %>&nbsp;</dd>
    <dt>Email:</dt>
    <dd><%= @account.email %>&nbsp;</dd>
    <dt>Bill cycle day:</dt>
    <% if @account.bill_cycle_day %>
      <dd><%= @account.bill_cycle_day.day_of_month_local %> (user timezone) / <%= @account.bill_cycle_day.day_of_month_utc %> (UTC)</dd>
    <% else %>
      <dd><%=t :unknown_bcd %></dd>
    <% end %>
    <dt>Currency:</dt>
    <dd><%= @account.currency %>&nbsp;</dd>
    <dt>Timezone:</dt>
    <dd><%= @account.timezone %>&nbsp;</dd>
    <dt>Address 1:</dt>
    <dd><%= @account.address1 %>&nbsp;</dd>
    <dt>Address 2:</dt>
    <dd><%= @account.address2 %>&nbsp;</dd>
    <dt>Company:</dt>
    <dd><%= @account.company %>&nbsp;</dd>
    <dt>State:</dt>
    <dd><%= @account.state %>&nbsp;</dd>
    <dt>Country:</dt>
    <dd><%= @account.country %>&nbsp;</dd>
    <dt>Phone:</dt>
    <dd><%= @account.phone %>&nbsp;</dd>
    <dt>External key:</dt>
    <dd><%= @account.external_key %>&nbsp;</dd>
    <dt>Account balance:</dt>
    <% if @account.balance.nil? %>
        <dd>unknown &nbsp;</dd>
    <% elsif @account.balance <= 0  %>
        <dd><span class="label label-success" ><%= @account.balance %></span> &nbsp;</dd>
    <% else %>
        <dd><span class="label label-important" ><%= @account.balance %></span>&nbsp;</dd>
    <% end %>
    <dt>Notified for inv?</dt>
    <dd><%= @account.is_notified_for_invoices %>&nbsp;<%= link_to "Toggle", kaui_engine.toggle_email_notifications_account_path(@account.account_id, :is_notified => !@account.is_notified_for_invoices), :method => :post, :class => 'btn btn-mini' %></dd>

    <%= render :partial => "kaui/tags/tags_table",
               :locals => { :tags => @tags, :tags_url_or_path => kaui_engine.edit_account_tags_path(:params => { :account_id => @account.account_id }) } %>
    <%= render :partial => "kaui/account_emails/account_emails_table",
               :locals => { :account_emails => @account_emails, :account_id => @account.account_id } %>
  </dl>
  <h2><%= link_to "Billing timeline", kaui_engine.account_timeline_path(@account.account_id) %></h2>
  <% if @payment_methods.present? %>
    <%= render :partial => "kaui/payment_methods/payment_methods_table", :locals => { :account_id => @account.account_id, :payment_methods => @payment_methods } %>
  <% end %>
  <%= link_to "Add payment method", kaui_engine.add_payment_method_account_path(@account.account_id), :class => "btn btn-mini" %>
  <% @bundles.each do |bundle| %>
    <% subs = @subscriptions_by_bundle_id[bundle.bundle_id] %>
    <% if subs.present? %>
      <h2>Bundle <%= link_to Kaui.bundle_key_display_string.call(bundle.external_key), Kaui.bundle_home_path.call(bundle.bundle_id) if bundle.external_key.present? %>&nbsp;</h2>
      <%= render :partial => "kaui/subscriptions/subscriptions_table", :locals => { :subscriptions => subs } %>
    <% end %>
  <% end %>
<% else %>
  <p>Account not found</p>
<% end %><commit_msg>Return absolute balance only and let the coloring do its trick<commit_after><% if @account.present? %>
  <dl class="dl-horizontal">
    <dt>Id:</dt>
    <dd><%= @account.account_id %>&nbsp;</dd>
    <dt>Name:</dt>
    <dd><%= @account.name %>&nbsp;</dd>
    <dt>Email:</dt>
    <dd><%= @account.email %>&nbsp;</dd>
    <dt>Bill cycle day:</dt>
    <% if @account.bill_cycle_day %>
      <dd><%= @account.bill_cycle_day.day_of_month_local %> (user timezone) / <%= @account.bill_cycle_day.day_of_month_utc %> (UTC)</dd>
    <% else %>
      <dd><%=t :unknown_bcd %></dd>
    <% end %>
    <dt>Currency:</dt>
    <dd><%= @account.currency %>&nbsp;</dd>
    <dt>Timezone:</dt>
    <dd><%= @account.timezone %>&nbsp;</dd>
    <dt>Address 1:</dt>
    <dd><%= @account.address1 %>&nbsp;</dd>
    <dt>Address 2:</dt>
    <dd><%= @account.address2 %>&nbsp;</dd>
    <dt>Company:</dt>
    <dd><%= @account.company %>&nbsp;</dd>
    <dt>State:</dt>
    <dd><%= @account.state %>&nbsp;</dd>
    <dt>Country:</dt>
    <dd><%= @account.country %>&nbsp;</dd>
    <dt>Phone:</dt>
    <dd><%= @account.phone %>&nbsp;</dd>
    <dt>External key:</dt>
    <dd><%= @account.external_key %>&nbsp;</dd>
    <dt>Account balance:</dt>
    <% if @account.balance.nil? %>
        <dd>unknown &nbsp;</dd>
    <% elsif @account.balance <= 0  %>
        <dd><span class="label label-success" ><%= @account.balance.abs %></span> &nbsp;</dd>
    <% else %>
        <dd><span class="label label-important" ><%= @account.balance.abs %></span>&nbsp;</dd>
    <% end %>
    <dt>Notified for inv?</dt>
    <dd><%= @account.is_notified_for_invoices %>&nbsp;<%= link_to "Toggle", kaui_engine.toggle_email_notifications_account_path(@account.account_id, :is_notified => !@account.is_notified_for_invoices), :method => :post, :class => 'btn btn-mini' %></dd>

    <%= render :partial => "kaui/tags/tags_table",
               :locals => { :tags => @tags, :tags_url_or_path => kaui_engine.edit_account_tags_path(:params => { :account_id => @account.account_id }) } %>
    <%= render :partial => "kaui/account_emails/account_emails_table",
               :locals => { :account_emails => @account_emails, :account_id => @account.account_id } %>
  </dl>
  <h2><%= link_to "Billing timeline", kaui_engine.account_timeline_path(@account.account_id) %></h2>
  <% if @payment_methods.present? %>
    <%= render :partial => "kaui/payment_methods/payment_methods_table", :locals => { :account_id => @account.account_id, :payment_methods => @payment_methods } %>
  <% end %>
  <%= link_to "Add payment method", kaui_engine.add_payment_method_account_path(@account.account_id), :class => "btn btn-mini" %>
  <% @bundles.each do |bundle| %>
    <% subs = @subscriptions_by_bundle_id[bundle.bundle_id] %>
    <% if subs.present? %>
      <h2>Bundle <%= link_to Kaui.bundle_key_display_string.call(bundle.external_key), Kaui.bundle_home_path.call(bundle.bundle_id) if bundle.external_key.present? %>&nbsp;</h2>
      <%= render :partial => "kaui/subscriptions/subscriptions_table", :locals => { :subscriptions => subs } %>
    <% end %>
  <% end %>
<% else %>
  <p>Account not found</p>
<% end %>
{'fraction_non_alphanumeric': 0.22079382934276073, 'fraction_numerical': 0.0028924955809095294, 'mean_word_length': 3.9201581027667984, 'pattern_counts': {'":': 0, '<': 247, '<?xml version=': 0, '>': 287, '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': '5379274', 'n_tokens_mistral': 2403, 'n_tokens_neox': 2250, 'n_words': 374}