Introduced group_order_article.result to save the result for each group/article.
This commit is contained in:
parent
6fd5d825f9
commit
251ced4fa1
27 changed files with 106 additions and 137 deletions
|
|
@ -15,7 +15,7 @@
|
|||
(Einheit:
|
||||
= group_order_article.order_article.article.unit
|
||||
)
|
||||
= form.text_field :quantity, :size => "6"
|
||||
= form.text_field :result, :size => "6"
|
||||
= submit_tag "Speichern"
|
||||
|
|
||||
= link_to_function 'Abbrechen', "Element.hide('edit_box')"
|
||||
|
|
@ -16,5 +16,5 @@
|
|||
%th Pfand
|
||||
%th{:colspan => "2"}
|
||||
%tbody#result_table
|
||||
- for order_article in @order.order_articles.all(:include => [:article, :article_price])
|
||||
- for order_article in @order.order_articles.ordered.all(:include => [:article, :article_price])
|
||||
= render :partial => "order_article_result", :locals => {:order_article => order_article}
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
%td{:style=>"width:50%"}
|
||||
= group_order_article.group_order.ordergroup.name
|
||||
%td{:id => "group_order_article_#{group_order_article.id}_quantity"}
|
||||
= group_order_article.quantity
|
||||
= group_order_article.result
|
||||
%td.currency
|
||||
= number_to_currency(group_order_article.order_article.price.fc_price * group_order_article.quantity, :unit => "")
|
||||
%td.actions{:style=>"width:1em"}
|
||||
|
|
|
|||
|
|
@ -6,11 +6,11 @@
|
|||
= form.error_messages
|
||||
%p
|
||||
Gruppe:
|
||||
= form.select :ordergroup_id, Ordergroup.all(:order => "name").collect {|og| [og.name, og.id] }
|
||||
= form.select :ordergroup_id, Ordergroup.all(:order => "name").collect{ |og| [og.name, og.id] }
|
||||
%p
|
||||
Menge:
|
||||
= form.text_field "quantity", :size => 5
|
||||
= form.hidden_field "order_article_id"
|
||||
= form.text_field :result, :size => 5
|
||||
= form.hidden_field :order_article_id
|
||||
%p
|
||||
= submit_tag "Speichern"
|
||||
|
|
||||
|
|
|
|||
|
|
@ -3,7 +3,10 @@
|
|||
"Element.toggle('group_order_articles_#{order_article.id}'); |
|
||||
Element.toggleClassName(this.up('td'), 'open')" |
|
||||
%td= order_article.article.order_number
|
||||
%td= order_article.units_to_order
|
||||
%td
|
||||
= order_article.units_to_order
|
||||
- unless order_article.ordered_quantities_equal_to_group_orders?
|
||||
%span{:style => "color:red;font-weight: bold"} !
|
||||
%td= order_article.price.unit_quantity.to_s + ' * ' + order_article.article.unit.to_s
|
||||
%td= number_to_currency(order_article.price.price, :unit => "")
|
||||
%td= number_to_currency(order_article.price.fc_price, :unit => "")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue