make both ordered and received products visible in order screens and pdfs
This commit is contained in:
parent
ee31c0c2af
commit
8ca95f396f
7 changed files with 60 additions and 30 deletions
|
|
@ -2,8 +2,10 @@
|
|||
%thead
|
||||
%tr
|
||||
%th{:style => 'width:70%'}= t '.ordergroup'
|
||||
%th= t '.ordered'
|
||||
%th= t '.received'
|
||||
%th
|
||||
%acronym{:title => t('shared.articles.ordered_desc')}= t 'shared.articles.ordered'
|
||||
%th
|
||||
%acronym{:title => t('shared.articles.received_desc')}= t 'shared.articles.received'
|
||||
%th= t '.price'
|
||||
|
||||
- for order_article in order.order_articles.ordered.all(:include => [:article, :article_price])
|
||||
|
|
@ -14,7 +16,7 @@
|
|||
= "(#{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
|
||||
%tr{:class => cycle('even', 'odd', :name => 'groups')}
|
||||
%tr{:class => [cycle('even', 'odd', :name => 'groups'), if goa.result == 0 then 'unavailable' end]}
|
||||
%td{:style => "width:70%"}=h goa.group_order.ordergroup.name
|
||||
%td= "#{goa.quantity} + #{goa.tolerance}"
|
||||
%td
|
||||
|
|
|
|||
|
|
@ -3,7 +3,9 @@
|
|||
%tr
|
||||
%th{:style => "width:40%"}= t '.name'
|
||||
%th
|
||||
%acronym{:title => t('.units_desc')}= t '.units'
|
||||
%acronym{:title => t('shared.articles.ordered_desc')}= t 'shared.articles.ordered'
|
||||
%th
|
||||
%acronym{:title => t('shared.articles.received_desc')}= t 'shared.articles.received'
|
||||
%th
|
||||
%acronym{:title => t('.fc_price_desc')}= t '.fc_price'
|
||||
%th
|
||||
|
|
@ -14,7 +16,7 @@
|
|||
- for group_order in order.group_orders.all
|
||||
%thead
|
||||
%tr
|
||||
%th{:colspan => "6"}
|
||||
%th{:colspan => "7"}
|
||||
%h4= group_order.ordergroup.name
|
||||
%tbody
|
||||
- total = 0
|
||||
|
|
@ -22,17 +24,19 @@
|
|||
- fc_price = goa.order_article.price.fc_price
|
||||
- subTotal = fc_price * goa.result
|
||||
- total += subTotal
|
||||
%tr{:class => cycle('even', 'odd', :name => 'articles')}
|
||||
%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= goa.result
|
||||
%td= "#{goa.quantity} + #{goa.tolerance}"
|
||||
%td
|
||||
%b= goa.result
|
||||
%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{:colspan => "6"} Summe
|
||||
%th= number_to_currency(total)
|
||||
%tr
|
||||
%th(colspan="6")
|
||||
%th(colspan="7")
|
||||
- reset_cycle("articles")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue