forked from edavis10/chiliproject_invoice
-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.rb
34 lines (27 loc) · 1.17 KB
/
init.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# Empty redmine plguin
require 'redmine'
RAILS_DEFAULT_LOGGER.info 'Starting Invoice plugin for RedMine'
# TODO: Change the name
Redmine::Plugin.register :invoice_plugin do
name 'Invoice plugin'
author 'Eric Davis'
description 'Redmine plugin to create and manage invoices'
version '0.0.1'
settings:default => {
'invoice_company_name' => 'Your Company Name',
'invoice_company_address' => '100 Address',
'invoice_company_email' => '[email protected]',
'invoice_company_website' => 'http://www.example.com',
'invoice_foot_note' => 'Thank you for your business',
'invoice_currency_symbol' => '$',
'invoice_payment_terms' => '30',
'invoice_default_rate' => '50'
}, :partial => 'settings/invoice_settings'
project_module :invoice_module do
permission :show_invoices, { :invoice => [:index, :show]}
permission :edit_invoices, { :invoice => [:new, :edit, :autocreate, :create, :update, :autofill]}
permission :delete_invoices, { :invoice => [:destroy]}
permission :pay_invoices, { :payments => [:new, :create], :invoice => [:outstanding]}
end
menu :project_menu, "Invoices", :controller => 'invoice', :action => 'index'
end