Check account balance after creating a transaction.

This commit is contained in:
Benjamin Meichsner 2009-08-04 13:13:46 +02:00
parent 116b1c4ed9
commit f0caabfb53

View file

@ -73,7 +73,7 @@ class Finance::TransactionsController < ApplicationController
begin begin
@group.add_financial_transaction(amount, note, @current_user) @group.add_financial_transaction(amount, note, @current_user)
flash[:notice] = 'Transaktion erfolgreich angelegt.' flash[:notice] = 'Transaktion erfolgreich angelegt.'
redirect_to :action => 'index' redirect_to :action => 'list', :id => @group
rescue => e rescue => e
@financial_transaction = FinancialTransaction.new(params[:financial_transaction]) @financial_transaction = FinancialTransaction.new(params[:financial_transaction])
flash.now[:error] = 'Transaktion konnte nicht angelegt werden!' + ' (' + e.message + ')' flash.now[:error] = 'Transaktion konnte nicht angelegt werden!' + ' (' + e.message + ')'