<% if @line_item.try(:errors).present? %> <%= render 'shared/error_messages', :target => @line_item %> <% end %> <%= 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_adjustments do %> <% @order.adjustments.each do |adjustment| %> <% 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 %>
<%= adjustment.label %> <%= number_to_currency adjustment.amount %>
<%= t('order_total') %>: <%= number_to_currency @order.total %>
<%= hook :admin_order_form_buttons do %>

<%= button @order.complete? ? t('update') : t('continue') %> <%= t("or") %> <%= link_to t("actions.cancel"), admin_orders_url %>

<% end %> <% end %> <%= javascript_include_tag 'admin/orders/edit_form.js' %>