Fix balancing with financial_transaction_types

This commit is contained in:
Patrick Gansterer 2018-04-25 01:06:48 +02:00
parent 954795138d
commit 66e9629858

View file

@ -68,7 +68,7 @@ class Finance::BalancingController < Finance::BaseController
# Balances the Order, Update of the Ordergroup.account_balances # Balances the Order, Update of the Ordergroup.account_balances
def close def close
@order = Order.find(params[:id]) @order = Order.find(params[:id])
@type = FinancialTransactionType.find_by_id(params.permit(:type)) @type = FinancialTransactionType.find_by_id(params.permit(:type)[:type])
@order.close!(@current_user, @type) @order.close!(@current_user, @type)
redirect_to finance_order_index_url, notice: t('finance.balancing.close.notice') redirect_to finance_order_index_url, notice: t('finance.balancing.close.notice')