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
@@ -1,230 +0,0 @@
1
- module Widgets
2
- module BillPay
3
- class Base < ErpApp::Widgets::Base
4
-
5
- def index
6
- @account = {
7
- :account_number => '123455667',
8
- :payment_due => 33.45,
9
- :billing_date => '10/31/2011',
10
- :due_date => '11/15/2011'
11
- }
12
-
13
- @account_home_template = File.join(locate,'views','account_home.html.erb')
14
- render
15
- end
16
-
17
- def account_home
18
- @account = {
19
- :account_number => '123455667',
20
- :payment_due => 33.45,
21
- :billing_date => '10/31/2011',
22
- :due_date => '11/15/2011'
23
- }
24
-
25
- render :update => {:id => "#{@uuid}_result"}
26
- end
27
-
28
- def make_payment
29
- @acccount_id = params[:account]
30
-
31
- @payment_accounts = [
32
- {
33
- :id => 1,
34
- :description => 'My Bank Account',
35
- :account_type => 'Bank Account',
36
- :routing_number => '0123456',
37
- :account_number => '9999321',
38
- :edit_action => :edit_back_account
39
- },
40
- {
41
- :id => 2,
42
- :description => 'American Express',
43
- :account_type => 'Credit Card',
44
- :card_number => '1111222233334444',
45
- :security_code => '123',
46
- :exp_year => '9',
47
- :exp_month => '2012',
48
- :name_on_card => 'John Doe',
49
- :edit_action => :edit_credit_card_account
50
- }
51
- ]
52
-
53
- @accounts = @payment_accounts.collect{|account| [account[:description],account[:id]]}
54
-
55
- render :update => {:id => "#{@uuid}_result"}
56
- end
57
-
58
- def statements
59
- @statement = {
60
- :statement_date => '10/31/2011',
61
- :tranactions => [
62
- {
63
- :date => '10/10/2011',
64
- :description => 'Monthly Billing Amount',
65
- :amount => 50.00
66
- },
67
- {
68
- :date => '10/15/2011',
69
- :description => 'Payment Recieved',
70
- :amount => -50.00
71
- }
72
- ]
73
- }
74
-
75
- render :update => {:id => "#{@uuid}_result"}
76
- end
77
-
78
- def download_statement
79
- @statement = {
80
- :statement_date => '10/31/2011',
81
- :transactions => [
82
- {
83
- :date => '10/10/2011',
84
- :description => 'Monthly Billing Amount',
85
- :amount => 50.00
86
- },
87
- {
88
- :date => '10/15/2011',
89
- :description => 'Payment Recieved',
90
- :amount => -50.00
91
- }
92
- ]
93
- }
94
- @title = "10/31/2011 Statement"
95
- @body_options = {:file => File.join(locate,'views','_statement_table.html.erb'), :locals => {:transactions => @statement[:transactions]}}
96
- html = render_to_string(
97
- :file => File.join(locate,'views','pdf','layout.pdf.erb'),
98
- :layout => false
99
- )
100
-
101
- kit = PDFKit.new(html)
102
- send_data(kit.to_pdf, :filename => "Statement.pdf", :type => "application/pdf")
103
- return
104
- end
105
-
106
- def payment_history
107
- @payments = [{
108
- :payment_account => 'American Express',
109
- :amount => 50.00,
110
- :payment_date => '9/13/2011',
111
- :post_date => '9/16/2011'
112
- },{
113
- :payment_account => 'My Bank',
114
- :amount => 50.00,
115
- :payment_date => '8/13/2011',
116
- :post_date => '8/14/2011'
117
- }]
118
-
119
- render :update => {:id => "#{@uuid}_result"}
120
- end
121
-
122
- def download_payment_history
123
- @payments = [{
124
- :payment_account => 'American Express',
125
- :amount => 50.00,
126
- :payment_date => '9/13/2011',
127
- :post_date => '9/16/2011'
128
- },{
129
- :payment_account => 'My Bank',
130
- :amount => 50.00,
131
- :payment_date => '8/13/2011',
132
- :post_date => '8/14/2011'
133
- }]
134
-
135
- @title = "Payment History"
136
- @body_options = {:file => File.join(locate,'views','_payment_history_table.html.erb'), :locals => {:payments => @payments}}
137
- html = render_to_string(
138
- :file => File.join(locate,'views','pdf','layout.pdf.erb'),
139
- :layout => false
140
- )
141
-
142
- kit = PDFKit.new(html, :page_size => 'Letter')
143
- send_data(kit.to_pdf, :filename => "PaymentHistory.pdf", :type => "application/pdf")
144
- return
145
- end
146
-
147
- def payment_accounts
148
- @payment_accounts = [
149
- {
150
- :description => 'My Bank Account',
151
- :account_type => 'Bank Account',
152
- :routing_number => '0123456',
153
- :account_number => '9999321',
154
- :edit_action => :edit_back_account
155
- },
156
- {
157
- :description => 'American Express',
158
- :account_type => 'Credit Card',
159
- :card_number => '1111222233334444',
160
- :security_code => '123',
161
- :exp_year => '9',
162
- :exp_month => '2012',
163
- :name_on_card => 'John Doe',
164
- :edit_action => :edit_credit_card_account
165
- }
166
- ]
167
-
168
- render :update => {:id => "#{@uuid}_result"}
169
- end
170
-
171
- def delete_payment_account
172
-
173
- end
174
-
175
- def edit_back_account
176
- @account = {
177
- :description => 'My Bank Account',
178
- :account_type => 'Bank Account',
179
- :routing_number => '0123456',
180
- :account_number => '9999321'
181
- }
182
-
183
- render :update => {:id => "#{@uuid}_result", :view => '/payment_account_forms/bank_account'}
184
- end
185
-
186
- def edit_credit_card_account
187
- @account = {
188
- :description => 'American Express',
189
- :account_type => 'Credit Card',
190
- :card_number => '1111222233334444',
191
- :security_code => '123',
192
- :exp_year => '9',
193
- :exp_month => '2012',
194
- :name_on_card => 'John Doe'
195
- }
196
-
197
- render :update => {:id => "#{@uuid}_result", :view => '/payment_account_forms/credit_card'}
198
- end
199
-
200
- #should not be modified
201
- #modify at your own risk
202
- def locate
203
- File.dirname(__FILE__)
204
- end
205
-
206
- class << self
207
- def title
208
- "Bill Pay"
209
- end
210
-
211
- def views_location
212
- File.join(File.dirname(__FILE__),"/views")
213
- end
214
-
215
- def widget_name
216
- File.basename(File.dirname(__FILE__))
217
- end
218
-
219
- def base_layout
220
- begin
221
- file = File.join(File.dirname(__FILE__),"/views/layouts/base.html.erb")
222
- IO.read(file)
223
- rescue
224
- return nil
225
- end
226
- end
227
- end
228
- end#Base
229
- end#AccountPayment
230
- end#Widgets
@@ -1,3 +0,0 @@
1
- module BillPayControllerHelper
2
- #add helper methods for you engines controller
3
- end
@@ -1,3 +0,0 @@
1
- module BillPayViewHelper
2
- #add helper methods for your engines views
3
- end
@@ -1,11 +0,0 @@
1
- Compass.ErpApp.Widgets.BillPay = {
2
- addBillPay:function(){
3
- Ext.getCmp('knitkitCenterRegion').addContentToActiveCodeMirror('<%= render_widget :bill_pay %>');
4
- }
5
- }
6
-
7
- Compass.ErpApp.Widgets.AvailableWidgets.push({
8
- name:'Bill Pay',
9
- iconUrl:'/images/icons/creditcards/creditcards_48x48.png',
10
- onClick:Compass.ErpApp.Widgets.BillPay.addBillPay
11
- });
@@ -1,63 +0,0 @@
1
- <style>
2
- #nav-menu ul
3
- {
4
- list-style: none;
5
- padding: 0;
6
- margin: 0;
7
- }
8
-
9
- #nav-menu li
10
- {
11
- float: left;
12
- margin: 0 0.15em;
13
- }
14
-
15
- #nav-menu li a
16
- {
17
- background: url(background.gif) #fff bottom left repeat-x;
18
- height: 2em;
19
- line-height: 2em;
20
- float: left;
21
- width: 9em;
22
- display: block;
23
- border: 0.1em solid #dcdce9;
24
- color: #0d2474;
25
- text-decoration: none;
26
- text-align: center;
27
- }
28
-
29
- #nav-menu li a:hover
30
- {
31
- background-color:#CCC
32
- }
33
-
34
- #nav-menu span.selected a
35
- {
36
- background-color:#CCC
37
- }
38
-
39
- /* Hide from IE5-Mac \*/
40
- #nav-menu li a
41
- {
42
- float: none
43
- }
44
- /* End hide */
45
- </style>
46
-
47
- <ul id="nav-menu" style="margin:0px;">
48
- <li style="list-style:none">
49
- <%=link_to_remote 'Account Home', build_widget_url(:account_home)%>
50
- </li>
51
- <li style="list-style:none">
52
- <%=link_to_remote 'Statements', build_widget_url(:statements)%>
53
- </li>
54
- <li style="list-style:none">
55
- <%=link_to_remote 'Payment History', build_widget_url(:payment_history)%>
56
- </li>
57
- <li style="list-style:none">
58
- <%=link_to_remote 'Payment Accounts', build_widget_url(:payment_accounts)%>
59
- </li>
60
- </ul>
61
- <br/>
62
- <br/>
63
- <br/>
@@ -1,115 +0,0 @@
1
- <style>
2
- *
3
- {
4
- border: 0;
5
- margin: 0;
6
- padding: 0;
7
- }
8
-
9
- table
10
- {
11
- text-align: left;
12
- border-spacing: 0px;
13
- border: 1px solid #aeb3b6;
14
- border-collapse: collapse;
15
-
16
- }
17
-
18
-
19
- table a, table, tbody, tfoot, tr, th, td
20
- {
21
- font-family: Arial, Helvetica, sans-serif;
22
- line-height: 2.0em;
23
- font-size: 13px;
24
- color: #55595c;
25
- }
26
- tbody td{
27
- line-height: 2.5em;
28
- }
29
-
30
- table caption
31
- {
32
- padding: .4em 0 ;
33
- font-size: 240%;
34
- font-style: normal;
35
- color: #FB7E00;
36
- }
37
-
38
- table a
39
- {
40
- display: block;
41
- text-decoration: none;
42
- color: #FF8E53;
43
- padding-right: 1.5em;
44
-
45
- }
46
-
47
- table a:hover, table a:focus
48
- {
49
- text-decoration: underline;
50
- }
51
-
52
- table th a
53
- {
54
- color: #FF8E53;
55
- text-align: right;
56
- }
57
- table .odd th a,table .odd td a,table .odd td{
58
- color: #666;
59
- padding-right: 1.0 em;
60
- }
61
-
62
- table th a:hover, table th a:focus, tbody tr:hover th
63
- {
64
- background-color: #FFCC99;
65
- color: #fff !important;
66
- }
67
- table .odd th,table .odd td{
68
- background-color: #DDDDDD;
69
- }
70
-
71
- thead th
72
- {
73
- color: #25c1e2;
74
- }
75
-
76
- tbody th
77
- {
78
- padding-right: 1.0em;
79
- color: #25c1e2;
80
- font-style: normal;
81
- background-color: #fff;
82
- border-bottom: 1px dotted #aeb3b6;
83
- }
84
-
85
- td
86
- {
87
- color: #FF8E1C;
88
- border-bottom: 1px dotted #aeb3b6;
89
- padding-right: 0.5em;
90
-
91
- }
92
-
93
- tbody tr.odd
94
- {
95
- border-bottom: 1px dotted #aeb3b6;
96
- }
97
- </style>
98
- <table style="width:100%">
99
- <thead>
100
- <tr>
101
- <th style="color:#55595C">Payment Date</th>
102
- <th style="color:#55595C">Post Date</th>
103
- <th style="color:#55595C">Payment Account</th>
104
- <th style="color:#55595C">Amount</th>
105
- </tr>
106
- </thead>
107
- <% @payments.each do |payment|%>
108
- <tr <%="class=odd" if @payments.index(payment) % 2 == 0 %>>
109
- <td><%= payment[:payment_date]%></td>
110
- <td><%= payment[:post_date]%></td>
111
- <td><%= payment[:payment_account]%></td>
112
- <td><%= number_to_currency(payment[:amount])%></td>
113
- </tr>
114
- <%end%>
115
- </table>
@@ -1,117 +0,0 @@
1
- <style>
2
- *
3
- {
4
- border: 0;
5
- margin: 0;
6
- padding: 0;
7
- }
8
-
9
- table
10
- {
11
- text-align: left;
12
- border-spacing: 0px;
13
- border: 1px solid #aeb3b6;
14
- border-collapse: collapse;
15
-
16
- }
17
-
18
-
19
- table a, table, tbody, tfoot, tr, th, td
20
- {
21
- font-family: Arial, Helvetica, sans-serif;
22
- line-height: 2.0em;
23
- font-size: 13px;
24
- color: #55595c;
25
- }
26
- tbody td{
27
- line-height: 2.5em;
28
- }
29
-
30
- table caption
31
- {
32
- padding: .4em 0 ;
33
- font-size: 240%;
34
- font-style: normal;
35
- color: #FB7E00;
36
- }
37
-
38
- table a
39
- {
40
- display: block;
41
- text-decoration: none;
42
- color: #FF8E53;
43
- padding-right: 1.5em;
44
-
45
- }
46
-
47
- table a:hover, table a:focus
48
- {
49
- text-decoration: underline;
50
- }
51
-
52
- table th a
53
- {
54
- color: #FF8E53;
55
- text-align: right;
56
- }
57
- table .odd th a,table .odd td a,table .odd td{
58
- color: #666;
59
- padding-right: 1.0 em;
60
- }
61
-
62
- table th a:hover, table th a:focus, tbody tr:hover th
63
- {
64
- background-color: #FFCC99;
65
- color: #fff !important;
66
- }
67
- table .odd th,table .odd td{
68
- background-color: #DDDDDD;
69
- }
70
-
71
- thead th
72
- {
73
- text-transform: uppercase;
74
- font-weight: normal;
75
- letter-spacing: 1px;
76
- color: #25c1e2;
77
- }
78
-
79
- tbody th
80
- {
81
- padding-right: 1.0em;
82
- color: #25c1e2;
83
- font-style: normal;
84
- background-color: #fff;
85
- border-bottom: 1px dotted #aeb3b6;
86
- }
87
-
88
- td
89
- {
90
- color: #FF8E1C;
91
- border-bottom: 1px dotted #aeb3b6;
92
- padding-right: 0.5em;
93
-
94
- }
95
-
96
- tbody tr.odd
97
- {
98
- border-bottom: 1px dotted #aeb3b6;
99
- }
100
- </style>
101
-
102
- <table style="width:100%">
103
- <thead>
104
- <tr>
105
- <th style="color:#55595C">Date</th>
106
- <th style="color:#55595C">Description</th>
107
- <th style="color:#55595C">Amount</th>
108
- </tr>
109
- </thead>
110
- <% transactions.each do |transaction|%>
111
- <tr <%="class=odd" if transactions.index(transaction) % 2 == 0 %>>
112
- <td><%= transaction[:date]%></td>
113
- <td><%= transaction[:description]%></td>
114
- <td><%= number_to_currency(transaction[:amount])%></td>
115
- </tr>
116
- <%end%>
117
- </table>
@@ -1,10 +0,0 @@
1
- <h2>Accounts</h2>
2
- <h3>Account <%=@account[:account_number]%></h3>
3
- <table>
4
- <tr><td>Payment Due</td><td><%=number_to_currency(@account[:payment_due])%></td></tr>
5
- <tr><td>Billing Date</td><td><%=@account[:billing_date]%></td></tr>
6
- <tr><td>Due Date</td><td><%=@account[:due_date]%></td></tr>
7
- <tr><td>
8
- <%=link_to_remote 'Make Payment', build_widget_url(:make_payment)%>
9
- </td></tr>
10
- </table>
@@ -1,4 +0,0 @@
1
- <%=render :partial => '/menu'%>
2
- <div id="<%=widget_result_id%>">
3
- <%= render :file => @account_home_template %>
4
- </div>
@@ -1,24 +0,0 @@
1
- <%= form_remote_tag build_widget_url(:submit_payment) do %>
2
- <h2>Make A Payment</h2>
3
- <div class="form_settings">
4
- <div id="errors" style="color:red">
5
- <%=raw @message%>
6
- </div>
7
- <br/>
8
- <p>
9
- <span>Amount</span>
10
- <%= text_field_tag :amount, params[:amount], :style => 'width:75px;' %>
11
- </p>
12
- <p>
13
- <span>Payment Date</span>
14
- <%= text_field_tag :payment_date, params[:payment_date], :style => 'width:75px;', :id => 'payment_date' %>&nbsp;<a href="#" onclick="displayDatePicker('payment_date');">Pick Date</a>
15
- </p>
16
- <p>
17
- <span>Account</span>
18
- <%= select_tag(:account, options_for_select(@accounts, params[:account])) %>
19
- </p>
20
- <p style="padding-top: 15px">
21
- <%= submit_tag "Submit", :disable_with => "Please wait...", :class => "submit", :style => 'margin:0px;' %> | <%=link_to_remote 'Cancel', build_widget_url(:account_home)%>
22
- </p>
23
- </div>
24
- <%end%>
@@ -1,28 +0,0 @@
1
- <%= form_remote_tag build_widget_url(:save_payment_account) do %>
2
- <div class="form_settings">
3
- <h2></h2>
4
- <div id="errors" style="color:red">
5
- <%=raw @message%>
6
- </div>
7
- <br/>
8
- <p>
9
- <span>Description</span>
10
- <%= text_field_tag :description, @account[:description] %>
11
- </p>
12
- <p>
13
- <span>Routing Number</span>
14
- <%= text_field_tag :routing_number, @account[:routing_number] %>
15
- </p>
16
- <p>
17
- <span>Account Number</span>
18
- <%= text_field_tag :account_number, @account[:account_number] %>
19
- </p>
20
- <p>
21
- <span>Confirm Account Number</span>
22
- <%= text_field_tag :account_number, @account[:account_number] %>
23
- </p>
24
- <p style="padding-top: 15px">
25
- <%= submit_tag "Save", :disable_with => "Please wait...", :class => "submit", :style => 'margin:0px;' %> | <%=link_to_remote 'Cancel', build_widget_url(:payment_accounts)%>
26
- </p>
27
- </div>
28
- <%end%>
@@ -1,48 +0,0 @@
1
- <%= form_remote_tag build_widget_url(:save_payment_account) do %>
2
- <div class="form_settings">
3
- <h2></h2>
4
- <div id="errors" style="color:red">
5
- <%=raw @message%>
6
- </div>
7
- <br/>
8
- <p>
9
- <span>Description</span>
10
- <%= text_field_tag :description, @account[:description] %>
11
- </p>
12
- <p>
13
- <span>Name On Card</span>
14
- <%= text_field_tag :name_on_card, @account[:name_on_card] %>
15
- </p>
16
- <p>
17
- <span>Credit Card Number</span>
18
- <%= text_field_tag :card_number, @account[:card_number] %>
19
- </p>
20
- <p>
21
- <span>Expiration Month</span>
22
- <%= select_tag(:exp_month,
23
- options_for_select([["1 - January", 1],
24
- ["2 - Febuary", 2],
25
- ["3 - March",3],
26
- ["4 - April",4],
27
- ["5 - May",5],
28
- ["6 - June",6],
29
- ["7 - July",7],
30
- ["8 - August",8],
31
- ["9 - September",9],
32
- ["10 - October",10],
33
- ["11 - November",11],
34
- ["12 - December",12]], @account[:exp_month])) %>
35
- </p>
36
- <p>
37
- <span>Expiration Year</span>
38
- <%= select_tag(:exp_year, options_for_select((0..30).collect{|addition| Date.today.year + addition}, @account[:exp_year])) %>
39
- </p>
40
- <p>
41
- <span>Card Security Code</span>
42
- <%= text_field_tag :security_code, @account[:security_code] %>
43
- </p>
44
- <p style="padding-top: 15px">
45
- <%= submit_tag "Save", :disable_with => "Please wait...", :class => "submit", :style => 'margin:0px;' %> | <%=link_to_remote 'Cancel', build_widget_url(:payment_accounts)%>
46
- </p>
47
- </div>
48
- <%end%>