2012-10-15 21:19:17 +02:00
|
|
|
%table.table.table-hover
|
|
|
|
%thead
|
2009-01-29 01:57:51 +01:00
|
|
|
%tr
|
2013-02-08 19:16:06 +01:00
|
|
|
%th{:style => "width:40%"}= t '.name'
|
2009-01-29 01:57:51 +01:00
|
|
|
%th
|
2013-09-16 23:52:58 +02:00
|
|
|
%acronym{:title => t('shared.articles.ordered_desc')}= t 'shared.articles.ordered'
|
|
|
|
%th
|
|
|
|
%acronym{:title => t('shared.articles.received_desc')}= t 'shared.articles.received'
|
2009-01-29 01:57:51 +01:00
|
|
|
%th
|
2013-02-08 19:16:06 +01:00
|
|
|
%acronym{:title => t('.fc_price_desc')}= t '.fc_price'
|
2009-01-29 01:57:51 +01:00
|
|
|
%th
|
2013-02-08 19:16:06 +01:00
|
|
|
%acronym{:title => t('.unit_quantity_desc')}= t '.unit_quantity'
|
|
|
|
%th= t '.unit'
|
|
|
|
%th= t '.price'
|
2009-01-29 01:57:51 +01:00
|
|
|
|
2013-09-17 00:25:38 +02:00
|
|
|
- for group_order in order.group_orders.ordered
|
2009-01-29 01:57:51 +01:00
|
|
|
%thead
|
|
|
|
%tr
|
2013-09-16 23:52:58 +02:00
|
|
|
%th{:colspan => "7"}
|
2012-10-15 21:19:17 +02:00
|
|
|
%h4= group_order.ordergroup.name
|
2009-01-29 01:57:51 +01:00
|
|
|
%tbody
|
|
|
|
- total = 0
|
2009-02-03 21:14:48 +01:00
|
|
|
- for goa in group_order.group_order_articles.ordered.all(:include => :order_article)
|
2009-01-29 01:57:51 +01:00
|
|
|
- fc_price = goa.order_article.price.fc_price
|
2009-02-04 16:41:01 +01:00
|
|
|
- subTotal = fc_price * goa.result
|
2009-01-29 01:57:51 +01:00
|
|
|
- total += subTotal
|
2013-09-16 23:52:58 +02:00
|
|
|
%tr{:class => [cycle('even', 'odd', :name => 'articles'), if goa.result == 0 then 'unavailable' end]}
|
2009-01-29 01:57:51 +01:00
|
|
|
%td{:style => "width:40%"}=h goa.order_article.article.name
|
2013-09-16 23:52:58 +02:00
|
|
|
%td= "#{goa.quantity} + #{goa.tolerance}"
|
|
|
|
%td
|
|
|
|
%b= goa.result
|
2009-01-29 01:57:51 +01:00
|
|
|
%td= number_to_currency(fc_price)
|
|
|
|
%td= goa.order_article.price.unit_quantity
|
|
|
|
%td= goa.order_article.article.unit
|
|
|
|
%td= number_to_currency(subTotal)
|
|
|
|
|
|
|
|
%tr{:class => cycle('even', 'odd', :name => 'articles')}
|
2013-09-16 23:52:58 +02:00
|
|
|
%th{:colspan => "6"} Summe
|
2009-01-29 01:57:51 +01:00
|
|
|
%th= number_to_currency(total)
|
2012-10-15 21:19:17 +02:00
|
|
|
%tr
|
2013-09-16 23:52:58 +02:00
|
|
|
%th(colspan="7")
|
2013-02-08 19:16:06 +01:00
|
|
|
- reset_cycle("articles")
|