<% if form.object.new_record? %> N/A <% else -%>
Status <%= form.object.status %>
Subtotal $<%= "%.2f" % form.object.line_items.inject(0) { |subtotal, li| subtotal + li.total } %>
Shipping $<%= "%.2f" % form.object.shipments.inject(0) { |shipping, shipment| shipping + shipment.total } %>
Tax $<%= "%.2f" % form.object.tax_charge %>
Order Total $<%= "%.2f" % form.object.total %>
Total Due $<%= "%.2f" % form.object.total_due %>
Created At <%= form.object.created_at.strftime("%m-%d-%Y") %>
Actions
  • <%= link_to "Send Email Confirmation", piggybak.email_order_url(form.object.id) %>
  • <%= link_to "View as Text", piggybak.download_order_url(form.object.id) %>
  • <%= link_to "Cancel Order", piggybak.cancel_order_url(form.object.id) %> (marks payments as refunded, marks order as cancelled)
<% end -%>