Order refactoring part two: Balancing workflow was adapted to the new order schema. Article modification is still missing.
This commit is contained in:
parent
9eb2125f15
commit
190a777278
53 changed files with 568 additions and 603 deletions
23
app/views/shared/_articles_by_articles.html.haml
Normal file
23
app/views/shared/_articles_by_articles.html.haml
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
.legend
|
||||
%table.legend{:style => "margin-bottom:1em"}
|
||||
%tr
|
||||
%th{:colspan => '3'} Legende
|
||||
%tr
|
||||
%th{:style => 'width:70%'} Bestellgruppe
|
||||
%th Menge
|
||||
%th Gesamtpreis
|
||||
|
||||
- for order_article in order.order_articles.all(:include => [:article, :article_price])
|
||||
%table{:style => "margin-bottom:1em"}
|
||||
%thead
|
||||
%tr
|
||||
%th{:colspan => "3"}
|
||||
= order_article.article.name
|
||||
= "(#{order_article.article.unit} | #{order_article.price.unit_quantity} | #{number_to_currency(order_article.price.fc_price)})"
|
||||
%tbody
|
||||
- for goa in order_article.group_order_articles
|
||||
%tr{:class => cycle('even', 'odd', :name => 'groups')}
|
||||
%td{:style => "width:70%"}=h goa.group_order.ordergroup.name
|
||||
%td= "#{goa.quantity} (#{goa.tolerance})"
|
||||
%td= number_to_currency(order_article.price.fc_price * goa.quantity)
|
||||
- reset_cycle('groups')
|
||||
36
app/views/shared/_articles_by_groups.html.haml
Normal file
36
app/views/shared/_articles_by_groups.html.haml
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
.legend
|
||||
%table.legend{:style => "margin-bottom:1em"}
|
||||
%tr
|
||||
%th{:style => "width:40%"} Name
|
||||
%th
|
||||
%acronym{:title => "zugeteilte Einheiten (davon aus Toleranzmenge)"} Menge
|
||||
%th
|
||||
%acronym{:title => "Preis incl. MwSt, Pfand und Foodcoop-Aufschlag"} FC-Preis
|
||||
%th
|
||||
%acronym{:title => "Gebindegröße"} GebGr
|
||||
%th Einheit
|
||||
%th Gesamtpreis
|
||||
|
||||
- for group_order in order.group_orders.all
|
||||
%table{:style => "margin-bottom:1em"}
|
||||
%thead
|
||||
%tr
|
||||
%th{:colspan => "6"}=h group_order.ordergroup.name
|
||||
%tbody
|
||||
- total = 0
|
||||
- for goa in group_order.group_order_articles.all(:include => :order_article)
|
||||
- fc_price = goa.order_article.price.fc_price
|
||||
- subTotal = fc_price * goa.quantity
|
||||
- total += subTotal
|
||||
%tr{:class => cycle('even', 'odd', :name => 'articles')}
|
||||
%td{:style => "width:40%"}=h goa.order_article.article.name
|
||||
%td= "#{goa.quantity} (#{goa.tolerance})"
|
||||
%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')}
|
||||
%th{:colspan => "5"} Summe
|
||||
%th= number_to_currency(total)
|
||||
- reset_cycle("articles")
|
||||
|
|
@ -1,13 +1,9 @@
|
|||
- unless comments.empty?
|
||||
- comments.each do |comment|
|
||||
.comment[comment]
|
||||
%h3
|
||||
= "#{comment.user.find_ordergroup.name} :" if comment.user.find_ordergroup
|
||||
= simple_format(comment.text)
|
||||
.timestamp
|
||||
Erstellt am
|
||||
= format_time(comment.created_at)
|
||||
von
|
||||
=h comment.user.nick
|
||||
%b=h "#{comment.user.ordergroup_name}"
|
||||
= "(#{comment.user.nick} am #{format_time(comment.created_at)}):"
|
||||
= simple_format(comment.text)
|
||||
- else
|
||||
es gibt derzeit keine Kommentare.
|
||||
Loading…
Add table
Add a link
Reference in a new issue