Removed finance-controller for more clarity.
This commit is contained in:
parent
ff6b460cfc
commit
2630ca2b14
10 changed files with 10 additions and 21 deletions
|
@ -2,6 +2,12 @@ class Finance::BalancingController < ApplicationController
|
||||||
before_filter :authenticate_finance
|
before_filter :authenticate_finance
|
||||||
|
|
||||||
def index
|
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'
|
@orders = Order.finished.paginate :page => params[:page], :per_page => 10, :order => 'ends DESC'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -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
|
|
|
@ -43,7 +43,7 @@
|
||||||
.box_title
|
.box_title
|
||||||
%h2 noch nicht abgerechnet
|
%h2 noch nicht abgerechnet
|
||||||
.column_content
|
.column_content
|
||||||
%p= link_to "Bestellungsübersicht", :controller => 'finance/orders'
|
%p= link_to "Bestellungsübersicht", :controller => 'balancing', :action => 'list'
|
||||||
- unless @orders.empty?
|
- unless @orders.empty?
|
||||||
%table.list
|
%table.list
|
||||||
%thead
|
%thead
|
|
@ -1,2 +0,0 @@
|
||||||
<h1>Finance::Transactions#create</h1>
|
|
||||||
<p>Find me in app/views/finance/transactions/create.html.erb</p>
|
|
|
@ -1,2 +0,0 @@
|
||||||
<h1>Finance::Transactions#create_collection</h1>
|
|
||||||
<p>Find me in app/views/finance/transactions/create_collection.html.erb</p>
|
|
|
@ -1,2 +0,0 @@
|
||||||
<h1>Finance::Transactions#new_collection</h1>
|
|
||||||
<p>Find me in app/views/finance/transactions/new_collection.html.erb</p>
|
|
|
@ -34,11 +34,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{ :name => "Finance", :url => "/finance",
|
{ :name => "Finance", :url => "/finance",
|
||||||
:active => ["finance", "finance/invoices", "finance/transactions", "finance/balancing"],
|
:active => ["finance/invoices", "finance/transactions", "finance/balancing"],
|
||||||
:access? => (u.role_finance?),
|
:access? => (u.role_finance?),
|
||||||
:subnav => [
|
:subnav => [
|
||||||
{ :name => "Manage accounts", :url => "/finance/transactions" },
|
{ :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 }
|
{ :name => "Invoices", :url => finance_invoices_path }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
|
@ -13,9 +13,8 @@ ActionController::Routing::Routes.draw do |map|
|
||||||
end
|
end
|
||||||
|
|
||||||
map.namespace :finance do |finance|
|
map.namespace :finance do |finance|
|
||||||
|
finance.root :controller => 'balancing'
|
||||||
finance.resources :invoices
|
finance.resources :invoices
|
||||||
finance.connect 'transactions/:action/:id', :controller => 'transactions'
|
|
||||||
finance.connect 'balancing/:action/:id', :controller => 'balancing'
|
|
||||||
end
|
end
|
||||||
|
|
||||||
map.resources :suppliers, :collection => { :shared_suppliers => :get } do |suppliers|
|
map.resources :suppliers, :collection => { :shared_suppliers => :get } do |suppliers|
|
||||||
|
|
Loading…
Reference in a new issue