drhenner/ror_ecommerce

View on GitHub
app/views/admin/inventory/adjustments/show.html.erb

Summary

Maintainability
Test Coverage
<h3>Inventory Adjustment for <%= @product.name %></h3>

<div class="admin_adjustments">
  <table class='hover'>
    <thead>
      <tr>
        <th>SKU</th>
        <th>count on hand</th>
        <th>pending to customer</th>
        <th>count pending from supplier</th>
        <th></th>
      </tr>
    </thead>
    <% @product.variants.each do |variant| %>
      <tr>
        <td><%= variant.sku %></td>
        <td><%= variant.inventory.count_on_hand %></td>
        <td><%= variant.inventory.count_pending_to_customer %></td>
        <td><%= variant.inventory.count_pending_from_supplier %></td>
        <td><%= link_to "Change", edit_admin_inventory_adjustment_path(variant) %></td>
      </tr>
    <% end %>
  </table>
</div>

<p>
  <%= link_to "View Other Product", admin_inventory_adjustments_path, class: 'button secondary' %>
  <%= link_to "Back to Product", admin_merchandise_product_path(@product), class: 'button secondary' %>
</p>