Sha256: 69dce0d40d944eef989ebe2343f7d2bc0b224391bb9a4e04ef589283e15c1255

Contents?: true

Size: 1.34 KB

Versions: 1

Compression:

Stored size: 1.34 KB

Contents

<div>

  <%= render 'menu' %>

  <div class="ui segment bottom attached">
    <%= render 'search_form' %>
  </div>

  <div class="ui segment top attached">
    <p>
      <span>State:</span>
      <%= link_to 'All', filter_params(except: [:payment_status]), class: active_params(payment_status: '', active_class: 'ui basic blue button', item_class: 'ui basic white button') %>
    </p>
  </div>

  <table class="ui bottom attached table">
    <thead>
    <tr>
      <th>ID</th>
      <th>名称</th>
      <th>Credit Terms(Period)</th>
      <th>负责人</th>
      <th>逾期数量</th>
      <th>应收数量</th>
      <th>逾期日期</th>
      <th>逾期金额</th>
      <th></th>
    </tr>
    </thead>

    <tbody>
    <% @buyers.each do |buyer| %>
      <tr>
        <td><%= buyer.id %></td>
        <td><%= buyer.name %></td>
        <td><%= buyer.payment_strategy&.name %></td>
        <td><%# buyer.charger&.name %></td>
        <td class="error"><%= Order.to_pay.default_where(buyer_id: buyer.id, 'overdue_date-lte': @overdue_date).count %></td>
        <td><%= Order.to_pay.where(buyer_id: buyer.id).count %></td>
        <td><%= buyer.last_overdue_date %></td>
        <td><%# buyer.sum_amount %></td>
        <td><%= link_to 'View', orders_admin_buyer_path(buyer.id) %></td>
      </tr>
    <% end %>
    </tbody>
  </table>

  <%= paginate @buyers %>
</div>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rails_trade-0.0.1 app/views/rails_trade_admin/buyers/overdue.html.erb