% 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 %>
<%= 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_adjustments do %>
<% @order.adjustments.each do |adjustment| %>
<%= adjustment.label %> |
<%= number_to_currency adjustment.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.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' %>