<%- # License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later -%> <%= content_for :stylesheets do %> <%= stylesheet_link_tag 'nonprofits/payouts/index/page' %> <% end %> <% content_for(:footer_hidden) {'hidden'} %> <%= content_for :javascripts do %> <%= IncludeAsset.js '/client/js/nonprofits/payouts/index/page.js' %> <% end %> <%= render 'nonprofits/transaction_title', active: :payouts, icon_class: 'icon-bank-1', page_name: 'Payouts' %>
Pending balance: <%= print_currency @pending_total, @nonprofit.currency_symbol %> Available balance: <%= print_currency @available_total, @nonprofit.currency_symbol %> <% if @can_make_payouts %> Next automatic payout: <%= 1.month.from_now.strftime('%_m/1/%Y') %> <% end %> <%= render 'payout_button' %>
<% if @can_make_payouts && current_role?(:nonprofit_admin) %>

Your connected bank account is <%= @nonprofit.bank_account && @nonprofit.bank_account.name %>. Change Bank Account

<% elsif current_role?(:nonprofit_admin) %> <%= render 'todos' %> <% end %> <% if @payouts.empty? %>

No payouts have been made yet.

<% else %>
<% @payouts.each do |payout| %> <% end %>
Date Net Amount Bank account Status
<%= simple_date(payout.created_at) %> <%= print_currency(payout.net_amount, payout.nonprofit.currency_symbol) %> <%= payout.bank_name %> <% if payout.status == 'paid' || payout.status == 'succeeded' %> Succeeded <% elsif payout.status == 'pending' %> Pending <% elsif payout.status == 'failed' %> Failed
<% unless payout.failure_message.blank? %> Message received:
<%= payout.failure_message %>
<% end %> <% end %>
Payout report (CSV)
<% end %>
<%= render 'nonprofits/bank_accounts/modal' %> <%= render 'nonprofits/payouts/modal' %>