cleanup orders and add search

Conflicts:
	app/assets/stylesheets/bootstrap_and_overrides.css.less
	app/views/orders/_articles.html.haml
	app/views/orders/show.html.haml
This commit is contained in:
wvengen 2014-01-17 13:14:49 +01:00
parent bab28d2770
commit 42d622d1b2
11 changed files with 130 additions and 70 deletions

View file

@ -1,5 +1,5 @@
%table.table.table-hover
%thead
%table.table.table-hover.list
%thead.list-heading
%tr
%th{:style => 'width:70%'}= t '.ordergroup'
%th
@ -9,12 +9,11 @@
%th= t '.price'
- for order_article in order.order_articles.ordered.all(:include => [:article, :article_price])
%thead
%tbody
%tr
%th{:colspan => "4"}
%th.name{:colspan => "4"}
= order_article.article.name
= "(#{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

View file

@ -1,5 +1,5 @@
%table.table.table-hover
%thead
%table.table.table-hover.list
%thead.list-heading
%tr
%th{:style => "width:40%"}= heading_helper Article, :name
%th
@ -14,18 +14,17 @@
%th= t '.price'
- for group_order in order.group_orders.ordered
%thead
%tbody
%tr
%th{:colspan => "7"}
%h4= group_order.ordergroup.name
%tbody
%h4.name= group_order.ordergroup.name
- total = 0
- for goa in group_order.group_order_articles.ordered.all(:include => :order_article)
- fc_price = goa.order_article.price.fc_price
- subTotal = fc_price * goa.result
- total += subTotal
%tr{:class => [cycle('even', 'odd', :name => 'articles'), if goa.result == 0 then 'unavailable' end]}
%td{:style => "width:40%"}=h goa.order_article.article.name
%td.name{:style => "width:40%"}=h goa.order_article.article.name
%td= "#{goa.quantity} + #{goa.tolerance}"
%td
%b= goa.result
@ -33,10 +32,9 @@
%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')}
%th{:colspan => "6"} Summe
%th= number_to_currency(total)
%tr
%th(colspan="7")
- reset_cycle("articles")
%tr{:class => cycle('even', 'odd', :name => 'articles')}
%th{:colspan => "6"} Summe
%th= number_to_currency(total)
%tr
%th(colspan="7")
- reset_cycle("articles")