Show also articles to get because of tolerance.

* Closes #54
This commit is contained in:
sandoz 2009-11-15 12:43:13 +01:00
parent 74ed02e11e
commit d31b40bd66

View file

@ -74,7 +74,10 @@
%th %th
%abbr{:title => "Menge + Toleranz"} Bestellt %abbr{:title => "Menge + Toleranz"} Bestellt
%th %th
%abbr{:title => "Unter Berücksichtigung der anderen Gruppen"} Bekommen %abbr{:title => "Unter Berücksichtigung der derzeitigen Bestellungen aller Gruppen"}
- if @order.open?
Zu
Erhalten
%th Gesamtpreis %th Gesamtpreis
%tbody %tbody
- total = 0 #set counter for order-sum - total = 0 #set counter for order-sum
@ -101,7 +104,7 @@
- total += sub_total - total += sub_total
- # give the article different colors, dependent on order-result - # give the article different colors, dependent on order-result
- class_name = "ignored" - class_name = "ignored"
- if (quantity > 0) - if (quantity + tolerance > 0)
- class_name = result > 0 ? 'success' : 'failed' - class_name = result > 0 ? 'success' : 'failed'
%tr{:class => cycle('even', 'odd', :name => 'articles') + " " + class_name} %tr{:class => cycle('even', 'odd', :name => 'articles') + " " + class_name}
%td{:style => "width:40%"} %td{:style => "width:40%"}