% form_for(@order, :url => admin_order_url(@order), :html => { :method => :put}) do |f| %>
<%= f.hidden_field :number %>
<% hook :admin_order_form_line_items_headers do %>
<%= t('item_description') %> |
<%= t('price') %> |
<%= t('qty') %> |
<%= t('total') %> |
<% end %>
<% hook :admin_order_form_line_items_header_actions %> |
<% f.fields_for :line_items do |li_form| %>
<%= render :partial => "admin/orders/line_item", :locals => { :f => li_form } %>
<% end %>
<% hook :admin_order_form_subtotal do %>
<%= t('subtotal') %>: |
<%= number_to_currency @order.item_total -%> |
|
<% end %>
<% hook :admin_order_form_charges do %>
<% @order.charges.each do |charge| %>
<%= charge.description %> |
<%= number_to_currency charge.amount -%> |
|
<% end %>
<% end %>
<% hook :admin_order_form_credits do %>
<% @order.credits.each do |credit| %>
<%= credit.description %> |
<%= number_to_currency credit.amount -%> |
|
<% end %>
<% end %>
<% hook :admin_order_form_total do %>
<%= t('order_total') %>: |
<%= number_to_currency @order.total -%> |
|
<% end %>
<% hook :admin_order_form_buttons do %>
<%= button @order.in_progress? ? t('continue') : t('update') %>
<%= t("or") %> <%= link_to t("actions.cancel"), admin_orders_url %>
<% end %>
<% end %>
<%= javascript_include_tag 'admin/orders/edit_form.js' %>