<%=error_messages_for :line_item %> <% 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 %> <% end %> <% 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 %> <% end %> <% hook :admin_order_form_charges do %> <% @order.charges.each do |charge| %> <% end %> <% end %> <% hook :admin_order_form_credits do %> <% @order.credits.each do |credit| %> <% end %> <% end %> <% hook :admin_order_form_total do %> <% end %>
<%= t('item_description') %> <%= t('price') %> <%= t('qty') %> <%= t('total') %><% hook :admin_order_form_line_items_header_actions %>
<%= t('subtotal') %>: <%= number_to_currency @order.item_total -%>
<%= charge.description %> <%= number_to_currency charge.amount -%>
<%= credit.description %> <%= number_to_currency credit.amount -%>
<%= t('order_total') %>: <%= number_to_currency @order.total -%>
<% 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' %>