foodsoft/app/views/shared/_articles_by_articles.html.haml

28 lines
1.1 KiB
Text
Raw Normal View History

%table.table.table-hover
%thead
%tr
2013-02-08 19:16:06 +01:00
%th{:style => 'width:70%'}= t '.ordergroup'
%th
%acronym{:title => t('shared.articles.ordered_desc')}= t 'shared.articles.ordered'
%th
%acronym{:title => t('shared.articles.received_desc')}= t 'shared.articles.received'
2013-02-08 19:16:06 +01:00
%th= t '.price'
- for order_article in order.order_articles.ordered.all(:include => [:article, :article_price])
%thead
%tr
2009-02-03 21:14:48 +01:00
%th{:colspan => "4"}
= order_article.article.name
2009-02-03 21:14:48 +01:00
= "(#{order_article.article.unit} | #{order_article.price.unit_quantity} | #{number_to_currency(order_article.price.gross_price)})"
%tbody
- for goa in order_article.group_order_articles.ordered
%tr{:class => [cycle('even', 'odd', :name => 'groups'), if goa.result == 0 then 'unavailable' end]}
%td{:style => "width:70%"}=h goa.group_order.ordergroup.name
%td= "#{goa.quantity} + #{goa.tolerance}"
2009-02-03 21:14:48 +01:00
%td
%b= goa.result
%td= number_to_currency(order_article.price.fc_price * goa.result)
%tr
%td(colspan="4" )
2013-02-08 19:16:06 +01:00
- reset_cycle('groups')