2014-01-17 13:14:49 +01:00
|
|
|
%table.table.table-hover.list
|
|
|
|
%thead.list-heading
|
2009-01-29 01:57:51 +01:00
|
|
|
%tr
|
2013-12-12 00:13:19 +01:00
|
|
|
%th{:style => "width:40%"}= heading_helper Article, :name
|
2014-01-21 11:55:26 +01:00
|
|
|
%th= heading_helper Article, :unit
|
|
|
|
%th.center
|
2013-09-16 23:52:58 +02:00
|
|
|
%acronym{:title => t('shared.articles.ordered_desc')}= t 'shared.articles.ordered'
|
2014-01-21 11:55:26 +01:00
|
|
|
%th.center{colspan: 2}
|
2013-09-16 23:52:58 +02:00
|
|
|
%acronym{:title => t('shared.articles.received_desc')}= t 'shared.articles.received'
|
2014-01-21 11:55:26 +01:00
|
|
|
%th{colspan: 2}= heading_helper Article, :fc_price, short: true
|
2013-02-08 19:16:06 +01:00
|
|
|
%th= t '.price'
|
2014-01-21 11:55:26 +01:00
|
|
|
%th= #heading_helper Article, :unit_quantity, short: true
|
2009-01-29 01:57:51 +01:00
|
|
|
|
2013-09-17 00:25:38 +02:00
|
|
|
- for group_order in order.group_orders.ordered
|
2014-01-17 13:14:49 +01:00
|
|
|
%tbody
|
2014-01-21 11:55:26 +01:00
|
|
|
%tr.list-heading
|
|
|
|
%th{:colspan => "9"}
|
2014-01-17 13:14:49 +01:00
|
|
|
%h4.name= group_order.ordergroup.name
|
2009-01-29 01:57:51 +01:00
|
|
|
- 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]}
|
2014-01-17 13:14:49 +01:00
|
|
|
%td.name{:style => "width:40%"}=h goa.order_article.article.name
|
2014-01-21 11:55:26 +01:00
|
|
|
%td= goa.order_article.article.unit
|
|
|
|
%td.center= "#{goa.quantity} + #{goa.tolerance}"
|
|
|
|
%td.center
|
2013-09-16 23:52:58 +02:00
|
|
|
%b= goa.result
|
2014-01-21 11:55:26 +01:00
|
|
|
%td.symbol ×
|
2009-01-29 01:57:51 +01:00
|
|
|
%td= number_to_currency(fc_price)
|
2014-01-21 11:55:26 +01:00
|
|
|
%td.symbol =
|
2009-01-29 01:57:51 +01:00
|
|
|
%td= number_to_currency(subTotal)
|
2014-01-21 11:55:26 +01:00
|
|
|
%td= pkg_helper goa.order_article.price
|
2014-01-17 13:14:49 +01:00
|
|
|
%tr{:class => cycle('even', 'odd', :name => 'articles')}
|
2014-01-21 11:55:26 +01:00
|
|
|
%th{:colspan => "7"}= t '.price_sum'
|
2014-01-17 13:14:49 +01:00
|
|
|
%th= number_to_currency(total)
|
2014-01-21 11:55:26 +01:00
|
|
|
%th
|
2014-01-17 13:14:49 +01:00
|
|
|
%tr
|
2014-01-21 11:55:26 +01:00
|
|
|
%th(colspan="9")
|
2014-01-17 13:14:49 +01:00
|
|
|
- reset_cycle("articles")
|