Sha256: 80e7f117cf7a6d4c0cbe5762054c0fec532ac140f8fbc8e3a75a590b3af1c066

Contents?: true

Size: 1.83 KB

Versions: 22

Compression:

Stored size: 1.83 KB

Contents

<% if form.object.new_record? %>
N/A
<% else -%>
<table cellpadding="5" cellspacing="0">
	<tr>
		<td width="150">Subtotal</td>
		<td>$<%= "%.2f" % form.object.line_items.inject(0) { |subtotal, li| subtotal + li.total } %></td>
	</tr>
	<tr>
		<td>Shipping</td>
		<td>$<%= "%.2f" % form.object.shipments.inject(0) { |shipping, shipment| shipping + shipment.total } %></td>
	</tr>
	<tr>
		<td>Tax</td>
		<td>$<%= "%.2f" % form.object.tax_charge %></td>
	</tr>
	<tr>
		<td>Total</td>
		<td>$<%= "%.2f" % form.object.total %></td>
	</tr>
	<tr>
		<td>Payments</td>
		<td>$<%= "%.2f" % form.object.payments.inject(0) { |total, payment| total + payment.total } %></td>
	</tr>
	<tr>
		<td>Adjustments</td>
		<td>$<%= "%.2f" % form.object.adjustments.inject(0) { |total, adj| total + adj.total.to_f } %></td>
	</tr>
	<tr>
		<td>Balance Due</td>
		<td>$<%= "%.2f" % form.object.total_due %></td>
	</tr>
	<tr>
		<td>Created at</td>
		<td><%= form.object.created_at.strftime("%m-%d-%Y") %></td>
	</tr>
	<% if form.object.status != "cancelled" -%>
	<tr>
		<td valign="top">Actions</td>
		<td>
			<ul>
				<li><%= link_to "Send or Resend Email Confirmation", piggybak.email_order_url(form.object.id) %></li>
				<li><%= link_to "View as Text", piggybak.download_order_url(form.object.id) %></li>
				<% if form.object.total_due == 0.00 -%>
				<li><%= 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.)</li>
				<% end -%>
			</ul>
		</td>
	</tr>
	<% else -%>
	<tr>
		<td valign="top">Actions</td>
		<td>
			<ul>
				<li>
					<%= link_to "Restore Cancel Order", piggybak.restore_order_url(form.object.id) %>
					(This marks order as un-cancelled.)
				</li>
			</ul>
		</td>
	</tr>
	<% end -%>
</table>
<% end -%>

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
piggybak-0.5.5 app/views/rails_admin/main/_order_details.html.erb
piggybak-0.5.4 app/views/rails_admin/main/_order_details.html.erb
piggybak-0.5.3 app/views/rails_admin/main/_order_details.html.erb
piggybak-0.5.2 app/views/rails_admin/main/_order_details.html.erb
piggybak-0.5.1 app/views/rails_admin/main/_order_details.html.erb
piggybak-0.5.0 app/views/rails_admin/main/_order_details.html.erb
piggybak-0.4.39 app/views/rails_admin/main/_order_details.html.erb
piggybak-0.4.38 app/views/rails_admin/main/_order_details.html.erb
piggybak-0.4.37 app/views/rails_admin/main/_order_details.html.erb
piggybak-0.4.36 app/views/rails_admin/main/_order_details.html.erb
piggybak-0.4.35 app/views/rails_admin/main/_order_details.html.erb
piggybak-0.4.34 app/views/rails_admin/main/_order_details.html.erb
piggybak-0.4.33 app/views/rails_admin/main/_order_details.html.erb
piggybak-0.4.32 app/views/rails_admin/main/_order_details.html.erb
piggybak-0.4.31 app/views/rails_admin/main/_order_details.html.erb
piggybak-0.4.30 app/views/rails_admin/main/_order_details.html.erb
piggybak-0.4.29 app/views/rails_admin/main/_order_details.html.erb
piggybak-0.4.28 app/views/rails_admin/main/_order_details.html.erb
piggybak-0.4.27 app/views/rails_admin/main/_order_details.html.erb
piggybak-0.4.26 app/views/rails_admin/main/_order_details.html.erb