Payouts

Long field values such as ids, txids, bitcoin addresses are truncated in this view.

The Updated timestamp describes either

  1. When payout last updated by an import from market (payout address or payout schedule was updated by the user).
  2. When payout was paid.
  3. When payout confirmed attribute was set true.
<%# When market updated with txid, the payouts updated_at does not change because its market_updated field is set by update_all(). %>

Empty txid means payout has not yet been paid.

Conf column means it has had at least one confirmation.

Schedule and Payout address will be colorized when not yet paid. This helps the admin when manually reviewing payouts. Schedule field will be green if schedule evaluates to ready right now. Payout address shows in orange when a new address is being used for the first time by that user.

<% @payouts.each do |payout| %> <% # A lot of conditions because the data is only available for users paid in the past at least once. if !payout.paid && @past_paid_addresses.has_key?(payout.username) && @past_paid_addresses[payout.username].include?(payout.payout_btc_address) == false address_class = "orange_text" else address_class = "" end %> <% schedule_class = "" if payout.payout_type == 'vendor' && !payout.paid && payout.payout_schedule Time.zone = payout.user_timezone weekday = Time.zone.now.wday if payout.payout_schedule.include?(weekday) schedule_class = "green_text" end end %> <% end %>
Created at Order id Order created at Displayname Order price Payout amount Payout address Schedule Updated txid & fee Market updated Conf
<%=payout.created_at.in_time_zone(admin_user.timezone).to_s(:FHMnozone) %> <%=payout.order_id[/\w+/] %> <%=payout.order_created.in_time_zone(admin_user.timezone).strftime('%F') %> <%=payout.displayname%> <% if payout.payout_type == 'buyer' %> (refund) <%end%> <% if payout.hold %> (on hold) <%end%> <%=payout.order_btc_price%> <%=payout.payout_btc_amount%> <%=payout.payout_btc_address[0..10]%> <% if payout.payout_type == 'buyer' %> n/a <%else%> <%= payout.payout_schedule.to_s.gsub(/\s/, '') %> <%= payout.user_timezone %> <%end%> <%=payout.updated_at.in_time_zone(admin_user.timezone).strftime('%F') %> <% if payout.txid %> <%=payout.txid[0..10]%> <% end %> <% if payout.fee %> (<%= (payout.fee.to_f / payout.vsize).round(1) %>) <% end %> <% if payout.market_updated %> <%=image_tag('checkmark.svg')%> <%end%> <% if payout.confirmed %> <%=image_tag('checkmark.svg')%> <%end%> <%=link_to 'Details', admin_payout_path(payout), class: "btn btn-sm btn-primary" %>
<%= paginate @payouts %>