Upgraded to rails 3.1.8. Fixed various bugs in wiki.
This commit is contained in:
parent
cd91436f7f
commit
29a6cd8b62
106 changed files with 430 additions and 22436 deletions
|
|
@ -3,7 +3,7 @@ class Finance::BalancingController < ApplicationController
|
|||
before_filter :authenticate_finance
|
||||
|
||||
def index
|
||||
@financial_transactions = FinancialTransaction.order(:created_on.desc).limit(8)
|
||||
@financial_transactions = FinancialTransaction.order('created_on DESC').limit(8)
|
||||
@orders = Order.finished_not_closed
|
||||
@unpaid_invoices = Invoice.unpaid
|
||||
end
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ class Finance::FinancialTransactionsController < ApplicationController
|
|||
end
|
||||
|
||||
@financial_transactions = @ordergroup.financial_transactions.order(sort)
|
||||
@financial_transactions = @financial_transactions.where(:note.matches => "%#{params[:query]}%") unless params[:query].nil?
|
||||
@financial_transactions = @financial_transactions.where('note LIKE ?', "%#{params[:query]}%") unless params[:query].nil?
|
||||
|
||||
@financial_transactions = @financial_transactions.paginate :page => params[:page], :per_page => 10
|
||||
|
||||
|
|
@ -39,8 +39,9 @@ class Finance::FinancialTransactionsController < ApplicationController
|
|||
@financial_transaction.user = current_user
|
||||
@financial_transaction.add_transaction!
|
||||
redirect_to finance_ordergroup_transactions_url(@ordergroup), :notice => "Die Transaktion wurde gespeichert."
|
||||
#rescue
|
||||
# render :action => :new
|
||||
rescue ActiveRecord::RecordInvalid => error
|
||||
flash.now[:alert] = error.message
|
||||
render :action => :new
|
||||
end
|
||||
|
||||
def new_collection
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
class Finance::InvoicesController < ApplicationController
|
||||
|
||||
def index
|
||||
@invoices = Invoice.includes(:supplier, :delivery, :order).order(:date.desc).paginate(page: params[:page])
|
||||
@invoices = Invoice.includes(:supplier, :delivery, :order).order('date DESC').paginate(page: params[:page])
|
||||
|
||||
respond_to do |format|
|
||||
format.html # index.html.erb
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ class Finance::OrdergroupsController < ApplicationController
|
|||
end
|
||||
|
||||
@ordergroups = Ordergroup.order(sort)
|
||||
@ordergroups = @ordergroups.where(:name.matches => "%#{params[:query]}%") unless params[:query].nil?
|
||||
@ordergroups = @ordergroups.where('name LIKE ?', "%#{params[:query]}%") unless params[:query].nil?
|
||||
|
||||
@ordergroups = @ordergroups.paginate :page => params[:page], :per_page => @per_page
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue