<% if @account.present? %>
Id:
<%= @account.account_id %> 
Name:
<%= @account.name %> 
Email:
<%= @account.email %> 
Bill cycle day:
<% if @account.bill_cycle_day %>
<%= @account.bill_cycle_day.day_of_month_local %> (user timezone) / <%= @account.bill_cycle_day.day_of_month_utc %> (UTC)
<% else %>
<%=t :unknown_bcd %>
<% end %>
Currency:
<%= @account.currency %> 
Timezone:
<%= @account.timezone %> 
Address 1:
<%= @account.address1 %> 
Address 2:
<%= @account.address2 %> 
Company:
<%= @account.company %> 
State:
<%= @account.state %> 
Country:
<%= @account.country %> 
Phone:
<%= @account.phone %> 
External key:
<%= @account.external_key %> 
Account balance:
<% if @account.balance.nil? %>
unknown  
<% elsif @account.balance <= 0 %>
<%= @account.balance %>  
<% else %>
<%= @account.balance %> 
<% end %>
Notified for inv?
<%= @account.is_notified_for_invoices %> <%= 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' %>
<%= 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 } %>

<%= link_to "Billing timeline", kaui_engine.account_timeline_path(@account.account_id) %>

<% 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? %>

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? %> 

<%= render :partial => "kaui/subscriptions/subscriptions_table", :locals => { :subscriptions => subs } %> <% end %> <% end %> <% else %>

Account not found

<% end %>