<h3>Billing Status</h3>
<table id='finance-status'>


  <% if can?(:manage, :charging) -%>
   <tr>
      <td><%= credit_card_stored_status(account)%> </td>
    </tr>

    <%
     action = account.paying_monthly? ? 'Disable' : 'Enable'
     status = account.paying_monthly? ? 'enabled' : 'disabled'
    %>
    <tr>
      <td>
        <%= boolean_status_img(account.paying_monthly?) %>
        Monthly charging is <%= status %>.
      </td>
      <td>
        <%= form_tag toggle_monthly_charging_admin_buyers_account_path(account), :method => :put do -%>
          <%= submit_tag action,
                         :id => "#{action.downcase}-monthly-charging",
                         :title => "#{action} charging",
                         data: {confirm: "Are you sure you want to #{action.downcase} charging for #{@account.name}"} %>
        <% end -%>
      </td>
    </tr>
  <% end %>

  <tr>
    <%
     action = account.billing_monthly? ? 'Disable' : 'Enable'
     status = account.billing_monthly? ? 'enabled' : 'disabled'
    %>
    <td>
      <%= boolean_status_img(account.billing_monthly?) %>
      Monthly billing is <%= status %>.
    </td>
    <td>
      <%= form_tag toggle_monthly_billing_admin_buyers_account_path(account), :method => :put do -%>
        <%= submit_tag action,
                       id: "#{action.downcase}-monthly-billing",
                       title: "#{action} billing",
                       data: {confirm: "Are you sure you want to #{action.downcase} billing for #{@account.name}"} %>
       <% end -%>
    </td>
  </tr>

</table>
