Removed finance-controller for more clarity.

This commit is contained in:
Benjamin Meichsner 2009-01-19 16:40:06 +01:00
parent ff6b460cfc
commit 2630ca2b14
10 changed files with 10 additions and 21 deletions

View file

@ -2,6 +2,12 @@ class Finance::BalancingController < ApplicationController
before_filter :authenticate_finance
def index
@financial_transactions = FinancialTransaction.find(:all, :order => "created_on DESC", :limit => 8)
@orders = Order.find(:all, :conditions => 'finished = 1 AND booked = 0', :order => 'ends DESC')
@unpaid_invoices = Invoice.unpaid
end
def list
@orders = Order.finished.paginate :page => params[:page], :per_page => 10, :order => 'ends DESC'
end

View file

@ -1,10 +0,0 @@
class FinanceController < ApplicationController
before_filter :authenticate_finance
def index
@financial_transactions = FinancialTransaction.find(:all, :order => "created_on DESC", :limit => 8)
@orders = Order.find(:all, :conditions => 'finished = 1 AND booked = 0', :order => 'ends DESC')
@unpaid_invoices = Invoice.unpaid
end
end

View file

@ -43,7 +43,7 @@
.box_title
%h2 noch nicht abgerechnet
.column_content
%p= link_to "Bestellungsübersicht", :controller => 'finance/orders'
%p= link_to "Bestellungsübersicht", :controller => 'balancing', :action => 'list'
- unless @orders.empty?
%table.list
%thead

View file

@ -1,2 +0,0 @@
<h1>Finance::Transactions#create</h1>
<p>Find me in app/views/finance/transactions/create.html.erb</p>

View file

@ -1,2 +0,0 @@
<h1>Finance::Transactions#create_collection</h1>
<p>Find me in app/views/finance/transactions/create_collection.html.erb</p>

View file

@ -1,2 +0,0 @@
<h1>Finance::Transactions#new_collection</h1>
<p>Find me in app/views/finance/transactions/new_collection.html.erb</p>

View file

@ -34,11 +34,11 @@
]
},
{ :name => "Finance", :url => "/finance",
:active => ["finance", "finance/invoices", "finance/transactions", "finance/balancing"],
:active => ["finance/invoices", "finance/transactions", "finance/balancing"],
:access? => (u.role_finance?),
:subnav => [
{ :name => "Manage accounts", :url => "/finance/transactions" },
{ :name => "Balance orders", :url => "/finance/balancing" },
{ :name => "Balance orders", :url => "/finance/balancing/list" },
{ :name => "Invoices", :url => finance_invoices_path }
]
},

View file

@ -13,9 +13,8 @@ ActionController::Routing::Routes.draw do |map|
end
map.namespace :finance do |finance|
finance.root :controller => 'balancing'
finance.resources :invoices
finance.connect 'transactions/:action/:id', :controller => 'transactions'
finance.connect 'balancing/:action/:id', :controller => 'balancing'
end
map.resources :suppliers, :collection => { :shared_suppliers => :get } do |suppliers|