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
|
|
@ -111,10 +111,10 @@ class Finance::BalancingController < ApplicationController
|
|||
end
|
||||
|
||||
def new_group_order_article
|
||||
group_order_article = OrderArticle.find(params[:id]).group_order_articles.build
|
||||
goa = OrderArticle.find(params[:id]).group_order_articles.build
|
||||
render :update do |page|
|
||||
page["edit_box"].replace_html :partial => "new_group_order_article",
|
||||
:locals => {:group_order_article => group_order_article}
|
||||
:locals => {:group_order_article => goa}
|
||||
page["edit_box"].show
|
||||
end
|
||||
end
|
||||
|
|
@ -185,7 +185,6 @@ class Finance::BalancingController < ApplicationController
|
|||
page["edit_box"].hide
|
||||
page["group_order_articles_#{goa.order_article.id}"].replace_html :partial => 'group_order_articles',
|
||||
:locals => {:order_article => goa.order_article}
|
||||
page["group_order_article_#{goa.id}"].visual_effect :highlight, :duration => 2
|
||||
page["summary"].replace_html :partial => 'summary', :locals => {:order => goa.order_article.order}
|
||||
page["order_profit"].visual_effect :highlight, :duration => 2
|
||||
end
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ class Finance::TransactionsController < ApplicationController
|
|||
amount = params[:financial_transaction][:amount]
|
||||
note = params[:financial_transaction][:note]
|
||||
begin
|
||||
@group.addFinancialTransaction(amount, note, @current_user)
|
||||
@group.add_financial_transaction(amount, note, @current_user)
|
||||
flash[:notice] = 'Transaktion erfolgreich angelegt.'
|
||||
redirect_to :action => 'index'
|
||||
rescue => e
|
||||
|
|
@ -90,7 +90,7 @@ class Finance::TransactionsController < ApplicationController
|
|||
params[:financial_transactions].each do |trans|
|
||||
# ignore empty amount fields ...
|
||||
unless trans[:amount].blank?
|
||||
Ordergroup.find(trans[:ordergroup_id]).addFinancialTransaction trans[:amount], note, @current_user
|
||||
Ordergroup.find(trans[:ordergroup_id]).add_financial_transaction trans[:amount], note, @current_user
|
||||
end
|
||||
end
|
||||
flash[:notice] = 'Saved all transactions successfully'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue