erp_invoicing 3.0.0 → 3.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (89) hide show
  1. data/app/controllers/erp_invoicing/erp_app/organizer/bill_pay/accounts_controller.rb +98 -46
  2. data/app/controllers/erp_invoicing/erp_app/organizer/bill_pay/base_controller.rb +1 -1
  3. data/app/controllers/erp_invoicing/erp_app/shared/billing_accounts_controller.rb +111 -0
  4. data/app/controllers/erp_invoicing/erp_app/shared/files_controller.rb +52 -0
  5. data/app/controllers/erp_invoicing/erp_app/shared/invoices_controller.rb +208 -0
  6. data/app/controllers/erp_invoicing/sms_controller.rb +156 -0
  7. data/app/models/billing_account.rb +204 -0
  8. data/app/models/extensions/document.rb +5 -0
  9. data/app/models/extensions/financial_txn.rb +5 -0
  10. data/app/models/extensions/party.rb +10 -0
  11. data/app/models/invoice.rb +100 -7
  12. data/app/models/invoice_item.rb +35 -2
  13. data/app/models/invoice_payment_strategy_type.rb +5 -0
  14. data/app/models/invoice_payment_term.rb +4 -0
  15. data/app/models/invoice_payment_term_set.rb +6 -0
  16. data/app/models/invoice_payment_term_type.rb +3 -0
  17. data/app/models/payment_application.rb +6 -1
  18. data/app/models/recurring_payment.rb +40 -0
  19. data/config/routes.rb +8 -1
  20. data/db/data_migrations/20111121153349_create_bill_pay_organizer_application.rb +1 -1
  21. data/db/data_migrations/20120118181839_create_invoice_management_desktop_application.rb +26 -0
  22. data/db/data_migrations/20120229174322_add_billpay_widget.rb +28 -0
  23. data/db/migrate/20111121000000_invoicing_services.rb +170 -103
  24. data/db/migrate/20120228184317_add_text_to_pay_to_recurring_payments.rb +13 -0
  25. data/db/migrate/20120301155722_add_billing_date_to_billing_account.rb +13 -0
  26. data/lib/erp_invoicing/engine.rb +5 -0
  27. data/lib/erp_invoicing/version.rb +7 -1
  28. data/lib/erp_invoicing.rb +1 -0
  29. data/public/javascripts/erp_app/desktop/applications/invoice_management/billing_accounts_panel.js +80 -0
  30. data/public/javascripts/erp_app/desktop/applications/invoice_management/invoices_panel.js +48 -0
  31. data/public/javascripts/erp_app/desktop/applications/invoice_management/module.js +36 -0
  32. data/public/javascripts/erp_app/organizer/applications/bill_pay/base.js +88 -76
  33. data/public/javascripts/erp_app/organizer/applications/bill_pay/extensions.js +6 -97
  34. data/public/javascripts/erp_app/organizer/applications/bill_pay/make_payment_window.js +19 -13
  35. data/public/javascripts/erp_app/organizer/applications/bill_pay/payment_accounts_grid_panel.js +2 -1
  36. data/public/javascripts/erp_app/shared/add_invoice_window.js +220 -0
  37. data/public/javascripts/erp_app/shared/billing_accounts_grid_panel.js +318 -0
  38. data/public/javascripts/erp_app/shared/invoice_items_grid_panel.js +152 -0
  39. data/public/javascripts/erp_app/shared/invoices_grid_panel.js +363 -0
  40. data/public/javascripts/erp_app/shared/payments_grid_panel.js +74 -0
  41. data/spec/dummy/Rakefile +7 -0
  42. data/spec/dummy/app/assets/javascripts/application.js +9 -0
  43. data/spec/dummy/app/assets/stylesheets/application.css +7 -0
  44. data/spec/dummy/app/controllers/application_controller.rb +3 -0
  45. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  46. data/spec/dummy/app/views/layouts/application.html.erb +14 -0
  47. data/spec/dummy/config/application.rb +50 -0
  48. data/spec/dummy/config/boot.rb +10 -0
  49. data/spec/dummy/config/database.yml +8 -0
  50. data/spec/dummy/config/environment.rb +5 -0
  51. data/spec/dummy/config/environments/spec.rb +27 -0
  52. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  53. data/spec/dummy/config/initializers/inflections.rb +10 -0
  54. data/spec/dummy/config/initializers/mime_types.rb +5 -0
  55. data/spec/dummy/config/initializers/secret_token.rb +7 -0
  56. data/spec/dummy/config/initializers/session_store.rb +8 -0
  57. data/spec/dummy/config/initializers/wrap_parameters.rb +12 -0
  58. data/spec/dummy/config/locales/en.yml +5 -0
  59. data/spec/dummy/config/routes.rb +3 -0
  60. data/spec/dummy/config.ru +4 -0
  61. data/spec/dummy/public/404.html +26 -0
  62. data/spec/dummy/public/422.html +26 -0
  63. data/spec/dummy/public/500.html +26 -0
  64. data/spec/dummy/public/favicon.ico +0 -0
  65. data/spec/dummy/script/rails +6 -0
  66. data/spec/factories/basic.rb +9 -0
  67. data/spec/models/billing_account_spec.rb +78 -0
  68. data/spec/models/invoice_item_spec.rb +22 -0
  69. data/spec/models/invoice_spec.rb +58 -0
  70. data/spec/models/payment_application_spec.rb +17 -0
  71. data/spec/spec_helper.rb +60 -0
  72. metadata +148 -67
  73. data/app/widgets/bill_pay/base.rb +0 -230
  74. data/app/widgets/bill_pay/helpers/controller/bill_pay_controller_helper.rb +0 -3
  75. data/app/widgets/bill_pay/helpers/view/bill_pay_view_helper.rb +0 -3
  76. data/app/widgets/bill_pay/javascript/bill_pay.js +0 -11
  77. data/app/widgets/bill_pay/views/_menu.html.erb +0 -63
  78. data/app/widgets/bill_pay/views/_payment_history_table.html.erb +0 -115
  79. data/app/widgets/bill_pay/views/_statement_table.html.erb +0 -117
  80. data/app/widgets/bill_pay/views/account_home.html.erb +0 -10
  81. data/app/widgets/bill_pay/views/index.html.erb +0 -4
  82. data/app/widgets/bill_pay/views/make_payment.html.erb +0 -24
  83. data/app/widgets/bill_pay/views/payment_account_forms/bank_account.html.erb +0 -28
  84. data/app/widgets/bill_pay/views/payment_account_forms/credit_card.html.erb +0 -48
  85. data/app/widgets/bill_pay/views/payment_accounts.html.erb +0 -120
  86. data/app/widgets/bill_pay/views/payment_history.html.erb +0 -104
  87. data/app/widgets/bill_pay/views/pdf/layout.pdf.erb +0 -35
  88. data/app/widgets/bill_pay/views/statements.html.erb +0 -4
  89. data/public/javascripts/erp_app/organizer/applications/bill_pay/accounts_grid_panel.js +0 -182
@@ -0,0 +1,363 @@
1
+ Ext.define("Compass.ErpApp.Shared.InvoicesGridPanel",{
2
+ extend:"Ext.grid.Panel",
3
+ alias:'widget.shared-invoicesgridpanel',
4
+ title:'Invoices',
5
+ addDocument : function(rec){
6
+ var uploadWindow = new Compass.ErpApp.Shared.UploadWindow({
7
+ standardUploadUrl:'/erp_invoicing/erp_app/shared/invoices/files/'+rec.get('id')+'/upload_file',
8
+ flashUploadUrl:'/erp_invoicing/erp_app/shared/invoices/files/'+rec.get('id')+'/upload_file',
9
+ xhrUploadUrl:'/erp_invoicing/erp_app/shared/invoices/files/'+rec.get('id')+'/upload_file',
10
+ extraPostData:{}
11
+ });
12
+ uploadWindow.show();
13
+ },
14
+
15
+ emailInvoice : function(rec){
16
+ var emailInvoiceWindow = Ext.create("Ext.window.Window",{
17
+ title:'Email Invoice',
18
+ plain: true,
19
+ buttonAlign:'center',
20
+ items: {
21
+ xtype: 'form',
22
+ labelWidth: 110,
23
+ frame:false,
24
+ bodyStyle:'padding:5px 5px 0',
25
+ width: 425,
26
+ url:'/erp_invoicing/erp_app/shared/invoices/email_invoice',
27
+ defaults: {
28
+ width: 225
29
+ },
30
+ items: [
31
+ {
32
+ xtype:'textfield',
33
+ fieldLabel:'Email Address',
34
+ allowBlank:false,
35
+ width:400,
36
+ name:'to_email'
37
+ },
38
+ {
39
+ xtype:'hiddenfield',
40
+ name:'id',
41
+ value:rec.get('id')
42
+ }
43
+ ]
44
+ },
45
+ buttons: [{
46
+ text:'Submit',
47
+ listeners:{
48
+ 'click':function(button){
49
+ var window = button.findParentByType('window');
50
+ var formPanel = window.query('form')[0];
51
+ formPanel.getForm().submit({
52
+ waitMsg:'Emailing Invoice',
53
+ reset:true,
54
+ success:function(form, action){
55
+ var obj = Ext.decode(action.response.responseText);
56
+ if(obj.success){
57
+ emailInvoiceWindow.close();
58
+ Ext.Msg.alert("Success", 'Email has been sent.');
59
+ }
60
+ else{
61
+ Ext.Msg.alert("Error", 'Error sending email.');
62
+ }
63
+ },
64
+ failure:function(form, action){
65
+ Ext.Msg.alert("Error", 'Error sending email.');
66
+ }
67
+ });
68
+ }
69
+ }
70
+ },{
71
+ text: 'Close',
72
+ handler: function(){
73
+ emailInvoiceWindow.close();
74
+ }
75
+ }]
76
+ });
77
+ emailInvoiceWindow.show();
78
+ },
79
+
80
+ sendSmsNotification : function(rec){
81
+ Ext.MessageBox.confirm('Confirm', 'Are you sure you want to send a SMS notification', function(btn){
82
+ if(btn == 'no'){
83
+ return false;
84
+ }
85
+ else
86
+ if(btn == 'yes')
87
+ {
88
+ var waitMsg = Ext.Msg.wait('Status','Sending SMS notification...');
89
+
90
+ Ext.Ajax.request({
91
+ url: '/erp_invoicing/erp_app/shared/invoices/sms_notification',
92
+ method: 'POST',
93
+ params:{
94
+ id:rec.get('id')
95
+ },
96
+ success: function(response) {
97
+ waitMsg.close();
98
+ var obj = Ext.decode(response.responseText);
99
+ if(obj.success){
100
+ Ext.Msg.alert('Success', 'SMS notification sent.');
101
+ }
102
+ else{
103
+ Ext.Msg.alert('Error', 'Could not send notification');
104
+ }
105
+ },
106
+ failure: function(response) {
107
+ waitMsg.close();
108
+ Ext.Msg.alert('Error', 'Could not send notification');
109
+ }
110
+ });
111
+ }
112
+ });
113
+ },
114
+
115
+ initComponent : function(){
116
+ this.callParent(this.arguemnts);
117
+ },
118
+
119
+ constructor : function(config) {
120
+ var self = this;
121
+
122
+ var store = Ext.create('Ext.data.Store', {
123
+ fields:['billed_to_party', 'billed_from_party', 'invoice_number','description', 'message', 'invoice_date', 'due_date', 'payment_due', 'id', 'billing_account'],
124
+ autoLoad: Compass.ErpApp.Utility.isBlank(config['autoLoad']) ? true : config['autoLoad'],
125
+ autoSync: true,
126
+ proxy: {
127
+ type: 'ajax',
128
+ url:'/erp_invoicing/erp_app/shared/invoices/invoices',
129
+ extraParams:{
130
+ invoice_number:null,
131
+ billing_account_id:config.billingAccountId
132
+ },
133
+ reader: {
134
+ type: 'json',
135
+ successProperty: 'success',
136
+ idProperty: 'id',
137
+ root: 'invoices',
138
+ totalProperty:'totalCount',
139
+ messageProperty: 'messages'
140
+ },
141
+ listeners: {
142
+ exception: function(proxy, response, operation){
143
+ Ext.MessageBox.show({
144
+ title: 'REMOTE EXCEPTION',
145
+ msg: 'Error performing action please try again.',
146
+ icon: Ext.MessageBox.ERROR,
147
+ buttons: Ext.Msg.OK
148
+ });
149
+ }
150
+ }
151
+ }
152
+ });
153
+
154
+ var tbar = {
155
+ items:[]
156
+ };
157
+ if(config.showAddDelete){
158
+ tbar.items.push({
159
+ text: 'Add',
160
+ xtype:'button',
161
+ iconCls: 'icon-add',
162
+ handler: function(button) {
163
+ var grid = button.up('shared-invoicesgridpanel');
164
+ var win = Ext.create("widget.shared-addinvoicewindow",{
165
+ billingAccountNumber:grid.billingAccountNumber,
166
+ billingAccountId:grid.billingAccountId,
167
+ listeners:{
168
+ 'create_success':function(){
169
+ store.load();
170
+ }
171
+ }
172
+ });
173
+ win.show();
174
+ }
175
+ });
176
+ tbar.items.push('-');
177
+ tbar.items.push({
178
+ text: 'Delete',
179
+ type:'button',
180
+ iconCls: 'icon-delete',
181
+ handler: function(button) {
182
+ Ext.MessageBox.confirm('Confirm', 'Are you sure you want to delete this invoice?', function(btn){
183
+ if(btn == 'no'){
184
+ return false;
185
+ }
186
+ else
187
+ {
188
+ var selection = self.getView().getSelectionModel().getSelection()[0];
189
+ if (selection) {
190
+ store.remove(selection);
191
+ }
192
+ }
193
+ });
194
+ }
195
+ });
196
+ tbar.items.push('|');
197
+ }
198
+
199
+ tbar.items = tbar.items.concat([
200
+ '<span class="x-btn-inner">Invoice Number:</span>',
201
+ {
202
+ xtype:'numberfield',
203
+ hideLabel:true,
204
+ itemId:'invoiceNumberSearchNumberField'
205
+ },
206
+ {
207
+ text:'Search',
208
+ iconCls:'icon-search',
209
+ handler:function(btn){
210
+ var grid = btn.up('shared-invoicesgridpanel');
211
+ var invoiceNumber = grid.query('#invoiceNumberSearchNumberField').first().getValue();
212
+ grid.store.proxy.extraParams.invoice_number = invoiceNumber;
213
+ grid.store.load();
214
+ }
215
+ },
216
+ '|',
217
+ {
218
+ text: 'All',
219
+ xtype:'button',
220
+ iconCls: 'icon-eye',
221
+ handler: function(btn) {
222
+ var grid = btn.up('shared-invoicesgridpanel');
223
+ grid.store.proxy.extraParams.invoice_number = null;
224
+ grid.store.load();
225
+ }
226
+ },
227
+ ]);
228
+
229
+ config = Ext.apply({
230
+ columns: [
231
+ {
232
+ header:'Invoice Number',
233
+ sortable: true,
234
+ dataIndex: 'invoice_number',
235
+ editor:{
236
+ xtype:'numberfield'
237
+ }
238
+ },
239
+ {
240
+ header:'Description',
241
+ width:300,
242
+ sortable: true,
243
+ dataIndex: 'description'
244
+ },
245
+ {
246
+ header:'Message',
247
+ width:250,
248
+ sortable: true,
249
+ dataIndex: 'message'
250
+ },
251
+ {
252
+ header:'Invoice Date',
253
+ sortable: true,
254
+ width:100,
255
+ dataIndex: 'invoice_date',
256
+ renderer: Ext.util.Format.dateRenderer('m/d/Y'),
257
+ editor:{
258
+ xtype:'datefield'
259
+ }
260
+ },
261
+ {
262
+ header:'Due Date',
263
+ sortable: true,
264
+ width:100,
265
+ dataIndex: 'due_date',
266
+ renderer: Ext.util.Format.dateRenderer('m/d/Y'),
267
+ editor:{
268
+ xtype:'datefield'
269
+ }
270
+ },
271
+ {
272
+ header:'Payment Due',
273
+ sortable: false,
274
+ width:100,
275
+ dataIndex: 'payment_due',
276
+ renderer:function(v){
277
+ return v.toFixed(2);
278
+ }
279
+ },
280
+ {
281
+ header:'Billing Account',
282
+ sortable: false,
283
+ width:100,
284
+ dataIndex: 'billing_account'
285
+ },
286
+ // {
287
+ // header:'Billed To',
288
+ // sortable: false,
289
+ // width:100,
290
+ // dataIndex: 'billed_to_party'
291
+ // },
292
+ // {
293
+ // header:'Billed From',
294
+ // sortable: false,
295
+ // width:100,
296
+ // dataIndex: 'billed_from_party'
297
+ // },
298
+ {
299
+ menuDisabled:true,
300
+ resizable:false,
301
+ xtype:'actioncolumn',
302
+ header:'SMS Notify',
303
+ align:'center',
304
+ width:100,
305
+ items:[{
306
+ icon:'/images/icons/message/message_16x16.png',
307
+ tooltip:'Send SMS notification',
308
+ handler :function(grid, rowIndex, colIndex){
309
+ var rec = grid.getStore().getAt(rowIndex);
310
+ self.sendSmsNotification(rec);
311
+ }
312
+ }]
313
+ },
314
+ {
315
+ menuDisabled:true,
316
+ resizable:false,
317
+ xtype:'actioncolumn',
318
+ header:'Email Invoice',
319
+ align:'center',
320
+ width:100,
321
+ items:[{
322
+ icon:'/images/icons/document/document_16x16.png',
323
+ tooltip:'Email Invoice',
324
+ handler :function(grid, rowIndex, colIndex){
325
+ var rec = grid.getStore().getAt(rowIndex);
326
+ self.emailInvoice(rec);
327
+ }
328
+ }]
329
+ },
330
+ {
331
+ menuDisabled:true,
332
+ resizable:false,
333
+ xtype:'actioncolumn',
334
+ header:'Add Document',
335
+ align:'center',
336
+ width:100,
337
+ items:[{
338
+ icon:'/images/icons/add/add_16x16.png',
339
+ tooltip:'Add Document',
340
+ handler :function(grid, rowIndex, colIndex){
341
+ var rec = grid.getStore().getAt(rowIndex);
342
+ self.addDocument(rec);
343
+ }
344
+ }]
345
+ }
346
+ ],
347
+ store:store,
348
+ loadMask: true,
349
+ autoScroll:true,
350
+ stripeRows: true,
351
+ tbar:tbar,
352
+ bbar:Ext.create("Ext.PagingToolbar",{
353
+ pageSize:50,
354
+ store:store,
355
+ displayInfo: true,
356
+ displayMsg: '{0} - {1} of {2}',
357
+ emptyMsg: "Empty"
358
+ })
359
+ }, config);
360
+
361
+ this.callParent([config]);
362
+ }
363
+ });
@@ -0,0 +1,74 @@
1
+ Ext.define("Compass.ErpApp.Shared.PaymentsGridPanel",{
2
+ extend:"Ext.grid.Panel",
3
+ alias:'widget.shared-paymentsgridpanel',
4
+ title:'Payments',
5
+ initComponent : function(){
6
+ this.callParent(this.arguemnts);
7
+ },
8
+
9
+ constructor : function(config) {
10
+ var self = this;
11
+
12
+ var store = Ext.create('Ext.data.Store', {
13
+ fields:['payment_date','post_date', 'payment_account','amount'],
14
+ autoLoad: false,
15
+ proxy: {
16
+ type: 'ajax',
17
+ url:'/erp_invoicing/erp_app/shared/invoices/invoice_payments',
18
+ reader: {
19
+ type: 'json',
20
+ root: 'payments'
21
+ },
22
+ extraParams:{
23
+ invoice_id:null
24
+ }
25
+ },
26
+ idProperty: 'id',
27
+ remoteSort: true
28
+ });
29
+
30
+ config = Ext.apply({
31
+ layout:'fit',
32
+ columns: [
33
+ {
34
+ header:'Payment Date',
35
+ sortable: false,
36
+ width:150,
37
+ dataIndex: 'payment_date',
38
+ renderer: Ext.util.Format.dateRenderer('m/d/Y H:i:s')
39
+ },
40
+ {
41
+ header:'Post Date',
42
+ sortable: false,
43
+ width:150,
44
+ dataIndex: 'post_date',
45
+ renderer: Ext.util.Format.dateRenderer('m/d/Y H:i:s')
46
+ },
47
+ {
48
+ header:'Payment Account',
49
+ sortable: false,
50
+ width:150,
51
+ dataIndex: 'payment_account'
52
+
53
+ },
54
+ {
55
+ header: 'Amount',
56
+ sortable: false,
57
+ dataIndex: 'amount',
58
+ renderer:function(v){
59
+ return v.toFixed(2);
60
+ }
61
+ }
62
+ ],
63
+ autoScroll:true,
64
+ stripeRows: true,
65
+ store:store,
66
+ viewConfig:{
67
+ loadMask:false,
68
+ forceFit:true
69
+ }
70
+ }, config);
71
+
72
+ this.callParent([config]);
73
+ }
74
+ });
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env rake
2
+ # Add your own tasks in files placed in lib/tasks ending in .rake,
3
+ # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
4
+
5
+ require File.expand_path('../config/application', __FILE__)
6
+
7
+ Dummy::Application.load_tasks
@@ -0,0 +1,9 @@
1
+ // This is a manifest file that'll be compiled into including all the files listed below.
2
+ // Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
3
+ // be included in the compiled file accessible from http://example.com/assets/application.js
4
+ // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
5
+ // the compiled file.
6
+ //
7
+ //= require jquery
8
+ //= require jquery_ujs
9
+ //= require_tree .
@@ -0,0 +1,7 @@
1
+ /*
2
+ * This is a manifest file that'll automatically include all the stylesheets available in this directory
3
+ * and any sub-directories. You're free to add application-wide styles to this file and they'll appear at
4
+ * the top of the compiled file, but it's generally better to create a new file per style scope.
5
+ *= require_self
6
+ *= require_tree .
7
+ */
@@ -0,0 +1,3 @@
1
+ class ApplicationController < ActionController::Base
2
+ protect_from_forgery
3
+ end
@@ -0,0 +1,2 @@
1
+ module ApplicationHelper
2
+ end
@@ -0,0 +1,14 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>Dummy</title>
5
+ <%= stylesheet_link_tag "application" %>
6
+ <%= javascript_include_tag "application" %>
7
+ <%= csrf_meta_tags %>
8
+ </head>
9
+ <body>
10
+
11
+ <%= yield %>
12
+
13
+ </body>
14
+ </html>
@@ -0,0 +1,50 @@
1
+ require File.expand_path('../boot', __FILE__)
2
+
3
+ require 'rails/all'
4
+
5
+ Bundler.require
6
+ require "erp_base_erp_svcs"
7
+ require "erp_app"
8
+ require "erp_txns_and_accts"
9
+ require "erp_agreements"
10
+ require "erp_commerce"
11
+ require "erp_products"
12
+ require "erp_orders"
13
+ require "erp_work_effort"
14
+ require "erp_invoicing"
15
+
16
+ module Dummy
17
+ class Application < Rails::Application
18
+ # Settings in config/environments/* take precedence over those specified here.
19
+ # Application configuration should go into files in config/initializers
20
+ # -- all .rb files in that directory are automatically loaded.
21
+
22
+ # Custom directories with classes and modules you want to be autoloadable.
23
+ # config.autoload_paths += %W(#{config.root}/extras)
24
+
25
+ # Only load the plugins named here, in the order given (default is alphabetical).
26
+ # :all can be used as a placeholder for all plugins not explicitly named.
27
+ # config.plugins = [ :exception_notification, :ssl_requirement, :all ]
28
+
29
+ # Activate observers that should always be running.
30
+ # config.active_record.observers = :cacher, :garbage_collector, :forum_observer
31
+
32
+ # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
33
+ # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
34
+ # config.time_zone = 'Central Time (US & Canada)'
35
+
36
+ # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
37
+ # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
38
+ # config.i18n.default_locale = :de
39
+
40
+ # Configure the default encoding used in templates for Ruby 1.9.
41
+ config.encoding = "utf-8"
42
+
43
+ # Configure sensitive parameters which will be filtered from the log file.
44
+ config.filter_parameters += [:password]
45
+
46
+ # Enable the asset pipeline
47
+ config.assets.enabled = true
48
+ end
49
+ end
50
+
@@ -0,0 +1,10 @@
1
+ require 'rubygems'
2
+ gemfile = File.expand_path('../../../../Gemfile', __FILE__)
3
+
4
+ if File.exist?(gemfile)
5
+ ENV['BUNDLE_GEMFILE'] = gemfile
6
+ require 'bundler'
7
+ Bundler.setup
8
+ end
9
+
10
+ $:.unshift File.expand_path('../../../../lib', __FILE__)
@@ -0,0 +1,8 @@
1
+ # Warning: The database defined as "test" will be erased and
2
+ # re-generated from your development database when you run "rake".
3
+ # Do not set this db to the same as development or production.
4
+ spec:
5
+ adapter: sqlite3
6
+ database: db/spec.sqlite3
7
+ pool: 5
8
+ timeout: 5000
@@ -0,0 +1,5 @@
1
+ # Load the rails application
2
+ require File.expand_path('../application', __FILE__)
3
+
4
+ # Initialize the rails application
5
+ Dummy::Application.initialize!
@@ -0,0 +1,27 @@
1
+ Dummy::Application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb
3
+
4
+ # In the development environment your application's code is reloaded on
5
+ # every request. This slows down response time but is perfect for development
6
+ # since you don't have to restart the web server when you make code changes.
7
+ config.cache_classes = false
8
+
9
+ # Log error messages when you accidentally call methods on nil.
10
+ config.whiny_nils = true
11
+
12
+ # Show full error reports and disable caching
13
+ config.consider_all_requests_local = true
14
+ config.action_controller.perform_caching = false
15
+
16
+ # Don't care if the mailer can't send
17
+ config.action_mailer.raise_delivery_errors = false
18
+
19
+ # Print deprecation notices to the Rails logger
20
+ config.active_support.deprecation = :log
21
+
22
+ # Only use best-standards-support built into browsers
23
+ config.action_dispatch.best_standards_support = :builtin
24
+
25
+ # Do not compress assets
26
+ config.assets.compress = false
27
+ end
@@ -0,0 +1,7 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
4
+ # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
5
+
6
+ # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
7
+ # Rails.backtrace_cleaner.remove_silencers!
@@ -0,0 +1,10 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Add new inflection rules using the following format
4
+ # (all these examples are active by default):
5
+ # ActiveSupport::Inflector.inflections do |inflect|
6
+ # inflect.plural /^(ox)$/i, '\1en'
7
+ # inflect.singular /^(ox)en/i, '\1'
8
+ # inflect.irregular 'person', 'people'
9
+ # inflect.uncountable %w( fish sheep )
10
+ # end
@@ -0,0 +1,5 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Add new mime types for use in respond_to blocks:
4
+ # Mime::Type.register "text/richtext", :rtf
5
+ # Mime::Type.register_alias "text/html", :iphone
@@ -0,0 +1,7 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Your secret key for verifying the integrity of signed cookies.
4
+ # If you change this key, all old signed cookies will become invalid!
5
+ # Make sure the secret is at least 30 characters and all random,
6
+ # no regular words or you'll be exposed to dictionary attacks.
7
+ Dummy::Application.config.secret_token = 'ae0d58840f73a49e40850c9d815a6a135e169865cdb8721cec7f335a738af09f3483de0f99d7c131f8fdecf2d8b508f8fd5e2e33c8d0565dcc9030eadb227695'
@@ -0,0 +1,8 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ Dummy::Application.config.session_store :cookie_store, :key => '_dummy_session'
4
+
5
+ # Use the database for sessions instead of the cookie-based default,
6
+ # which shouldn't be used to store highly confidential information
7
+ # (create the session table with "rails generate session_migration")
8
+ # Dummy::Application.config.session_store :active_record_store
@@ -0,0 +1,12 @@
1
+ # Be sure to restart your server when you modify this file.
2
+ #
3
+ # This file contains settings for ActionController::ParamsWrapper which
4
+ # is enabled by default.
5
+
6
+ # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
7
+ ActionController::Base.wrap_parameters :format => [:json]
8
+
9
+ # Disable root element in JSON by default.
10
+ if defined?(ActiveRecord)
11
+ ActiveRecord::Base.include_root_in_json = false
12
+ end
@@ -0,0 +1,5 @@
1
+ # Sample localization file for English. Add more files in this directory for other locales.
2
+ # See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
3
+
4
+ en:
5
+ hello: "Hello world"
@@ -0,0 +1,3 @@
1
+ Rails.application.routes.draw do
2
+ mount ErpTxnsAndAccts::Engine => "/erp_txns_and_accts"
3
+ end
@@ -0,0 +1,4 @@
1
+ # This file is used by Rack-based servers to start the application.
2
+
3
+ require ::File.expand_path('../config/environment', __FILE__)
4
+ run Dummy::Application