Sha256: 652b5d56ee3d5167edd37f030bb3a63396cbdbc8be950124e97cddd3c3326b3c

Contents?: true

Size: 970 Bytes

Versions: 28

Compression:

Stored size: 970 Bytes

Contents

<% if current_user.admin_of?(current_account) -%>
  <% content_for :header do -%>
    <h2>Billing Information</h2>
  <% end -%>

  <%= render :partial => 'accounts/tab_bar' %>

  <div class="current_credit_card">
    <p>We're currently charging the credit card ending in <%= current_account.credit_card.last_4 %>. <%= link_to "Change", edit_account_billing_path(current_account) %></p>
  </div>
  <div class="billing_history">
    <h3>Your Invoices</h3>
    <% if current_account.subscription.transactions.any? -%>
      <table>
        <tr>
          <th>Date</th>
          <th>Amount</th>
        </tr>
        <% current_account.subscription.transactions.each do |transaction| -%>
          <tr>
            <td><%= transaction.created_at.to_s(:short_date) %></td> <td><%= number_to_currency transaction.amount %></td>
          </tr>
        <% end -%>
      </table>
    <% else -%>
      <p>There have been no invoices yet.</p>
    <% end -%>
  </div>
<% end -%>

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
saucy-0.2.28.1 app/views/billings/show.html.erb
saucy-0.2.45 app/views/billings/show.html.erb
saucy-0.2.44 app/views/billings/show.html.erb
saucy-0.2.43 app/views/billings/show.html.erb
saucy-0.2.42 app/views/billings/show.html.erb
saucy-0.2.41 app/views/billings/show.html.erb
saucy-0.2.40 app/views/billings/show.html.erb
saucy-0.2.39 app/views/billings/show.html.erb
saucy-0.2.38 app/views/billings/show.html.erb
saucy-0.2.36 app/views/billings/show.html.erb
saucy-0.2.35 app/views/billings/show.html.erb
saucy-0.2.34 app/views/billings/show.html.erb
saucy-0.2.33 app/views/billings/show.html.erb
saucy-0.2.32 app/views/billings/show.html.erb
saucy-0.2.31 app/views/billings/show.html.erb
saucy-0.2.30 app/views/billings/show.html.erb
saucy-0.2.29 app/views/billings/show.html.erb
saucy-0.2.28 app/views/billings/show.html.erb
saucy-0.2.27 app/views/billings/show.html.erb
saucy-0.2.26 app/views/billings/show.html.erb