<% if form.object.new_record? %> N/A <% else -%> <% if form.object.status != "cancelled" -%> <% else -%> <% end -%>
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 %>
Total $<%= "%.2f" % form.object.total %>
Payments $<%= "%.2f" % form.object.payments.inject(0) { |total, payment| total + payment.total } %>
Adjustments $<%= "%.2f" % form.object.adjustments.inject(0) { |total, adj| total + adj.total.to_f } %>
Balance Due $<%= "%.2f" % form.object.total_due %>
Created at <%= form.object.created_at.strftime("%m-%d-%Y") %>
Actions
  • <%= link_to "Send or Resend Email Confirmation", piggybak.email_order_url(form.object.id) %>
  • <%= link_to "View as Text", piggybak.download_order_url(form.object.id) %>
  • <% if form.object.total_due == 0.00 -%>
  • <%= link_to "Cancel Order", piggybak.cancel_order_url(form.object.id) %> (This does not mark the payment gateway payments. This marks payments tied to ths order in this database as refunded, and marks the order as cancelled.)
  • <% end -%>
Actions
  • <%= link_to "Restore Cancel Order", piggybak.restore_order_url(form.object.id) %> (This marks order as un-cancelled.)
<% end -%>