<%= render :partial => 'order_head' %> <% form_tag(:action => 'saveOrder', :id => @order) do %>

Artikel

<%- total = 0 i = 0 @articles_grouped_by_category.each do |category, order_articles| -%> <%- order_articles.each do |order_article| if Foodsoft.config[:tolerance_is_costly] article_total = @price[i] * (@tolerance[i] + @quantity[i]) else article_total = @price[i] * @quantity[i] end total += article_total -%> <%- i = i + 1 end end -%>
Name Gebinde Preis Best Menge Toleranz Summe
<%=h category %>
<%= order_article.article.name %> <%=h order_article.article.origin %> <%= @order.stockit? ? order_article.article.quantity_available : @unit[i] %> * <%=h order_article.article.unit %> <%= number_to_currency(@price[i]) %> <%= order_article.units_to_order %> " value="<%= @quantity[i] %>" size="2" /> <%= @used_quantity[i] %> + <%= @quantity[i] - @used_quantity[i] %> (<%= @quantity[i] + @others_quantity[i] %>) <%= button_to_function('+', "increaseQuantity(#{i})") %> <%= button_to_function('-', "decreaseQuantity(#{i})") %> " value="<%= @tolerance[i] %>" size="2" /> <% if (@unit[i] > 1) -%> <%= @used_tolerance[i] %> + <%= @tolerance[i] - @used_tolerance[i] %> (<%= @tolerance[i] + @others_tolerance[i] %>) <%= button_to_function('+', "increaseTolerance(#{i})") %> <%= button_to_function('-', "decreaseTolerance(#{i})") %> <% end -%> <%= number_to_currency(article_total, :unit => "") %>
<% end %>